@charcoal-ui/foundation 2.4.0 → 2.6.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/dist/border-radius.d.ts +28 -28
- package/dist/breakpoint.d.ts +7 -7
- package/dist/color.d.ts +5 -5
- package/dist/color.d.ts.map +1 -1
- package/dist/effect.d.ts +38 -38
- package/dist/effect.d.ts.map +1 -1
- package/dist/grid.d.ts +14 -14
- package/dist/index.cjs.js +121 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.esm.js +85 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/spacing.d.ts +13 -13
- package/dist/typography.d.ts +28 -28
- package/package.json +13 -13
- package/dist/index.cjs +0 -132
- package/dist/index.cjs.map +0 -1
- package/dist/index.modern.js +0 -127
- package/dist/index.modern.js.map +0 -1
- package/dist/index.module.js +0 -123
- package/dist/index.module.js.map +0 -1
package/dist/border-radius.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export declare const BORDER_RADIUS: {
|
|
2
|
-
/**
|
|
3
|
-
* 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)
|
|
4
|
-
*/
|
|
5
|
-
readonly none: 0;
|
|
6
|
-
/**
|
|
7
|
-
* 用途: バッジ, 高さ40px以下の要素
|
|
8
|
-
*/
|
|
9
|
-
readonly 4: 4;
|
|
10
|
-
/**
|
|
11
|
-
* 用途: サムネイル
|
|
12
|
-
*/
|
|
13
|
-
readonly 8: 8;
|
|
14
|
-
/**
|
|
15
|
-
* 用途: チュートリアルツールチップ
|
|
16
|
-
*/
|
|
17
|
-
readonly 16: 16;
|
|
18
|
-
/**
|
|
19
|
-
* 用途: モーダル
|
|
20
|
-
*/
|
|
21
|
-
readonly 24: 24;
|
|
22
|
-
/**
|
|
23
|
-
* 真円 or 左右が丸まっている矩形 を作る時に用いる
|
|
24
|
-
*
|
|
25
|
-
* 用途: ボタン
|
|
26
|
-
*/
|
|
27
|
-
readonly oval: 999999;
|
|
28
|
-
};
|
|
1
|
+
export declare const BORDER_RADIUS: {
|
|
2
|
+
/**
|
|
3
|
+
* 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)
|
|
4
|
+
*/
|
|
5
|
+
readonly none: 0;
|
|
6
|
+
/**
|
|
7
|
+
* 用途: バッジ, 高さ40px以下の要素
|
|
8
|
+
*/
|
|
9
|
+
readonly 4: 4;
|
|
10
|
+
/**
|
|
11
|
+
* 用途: サムネイル
|
|
12
|
+
*/
|
|
13
|
+
readonly 8: 8;
|
|
14
|
+
/**
|
|
15
|
+
* 用途: チュートリアルツールチップ
|
|
16
|
+
*/
|
|
17
|
+
readonly 16: 16;
|
|
18
|
+
/**
|
|
19
|
+
* 用途: モーダル
|
|
20
|
+
*/
|
|
21
|
+
readonly 24: 24;
|
|
22
|
+
/**
|
|
23
|
+
* 真円 or 左右が丸まっている矩形 を作る時に用いる
|
|
24
|
+
*
|
|
25
|
+
* 用途: ボタン
|
|
26
|
+
*/
|
|
27
|
+
readonly oval: 999999;
|
|
28
|
+
};
|
|
29
29
|
//# sourceMappingURL=border-radius.d.ts.map
|
package/dist/breakpoint.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const HORIZONTAL_MIN_MARGIN = 72;
|
|
2
|
-
export declare const BREAKPOINT: {
|
|
3
|
-
readonly 6: number;
|
|
4
|
-
readonly 8: number;
|
|
5
|
-
readonly 10: number;
|
|
6
|
-
readonly 12: number;
|
|
7
|
-
};
|
|
1
|
+
export declare const HORIZONTAL_MIN_MARGIN = 72;
|
|
2
|
+
export declare const BREAKPOINT: {
|
|
3
|
+
readonly 6: number;
|
|
4
|
+
readonly 8: number;
|
|
5
|
+
readonly 10: number;
|
|
6
|
+
readonly 12: number;
|
|
7
|
+
};
|
|
8
8
|
//# sourceMappingURL=breakpoint.d.ts.map
|
package/dist/color.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
readonly color: Material;
|
|
4
|
-
readonly ratio: number;
|
|
5
|
-
}[];
|
|
1
|
+
export type Material = string;
|
|
2
|
+
export type GradientMaterial = readonly {
|
|
3
|
+
readonly color: Material;
|
|
4
|
+
readonly ratio: number;
|
|
5
|
+
}[];
|
|
6
6
|
//# sourceMappingURL=color.d.ts.map
|
package/dist/color.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../src/color.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../src/color.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAA;AAE7B,MAAM,MAAM,gBAAgB,GAAG,SAAS;IACtC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,EAAE,CAAA"}
|
package/dist/effect.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
interface BaseEffect {
|
|
4
|
-
}
|
|
5
|
-
export interface AlphaEffect extends BaseEffect {
|
|
6
|
-
readonly type: 'alpha';
|
|
7
|
-
/**
|
|
8
|
-
* Color to blend with the base color using alpha blending.
|
|
9
|
-
*/
|
|
10
|
-
readonly color: string;
|
|
11
|
-
/**
|
|
12
|
-
* Multiplied with the alpha value of the effect's `color` before blending.
|
|
13
|
-
*
|
|
14
|
-
* `1` by default.
|
|
15
|
-
*/
|
|
16
|
-
readonly opacity?: number;
|
|
17
|
-
}
|
|
18
|
-
export interface OpacityEffect extends BaseEffect {
|
|
19
|
-
readonly type: 'opacity';
|
|
20
|
-
/**
|
|
21
|
-
* Value to multiply with the current color's alpha value.
|
|
22
|
-
*/
|
|
23
|
-
readonly opacity: number;
|
|
24
|
-
}
|
|
25
|
-
export interface ReplaceEffect extends BaseEffect {
|
|
26
|
-
readonly type: 'replace';
|
|
27
|
-
/**
|
|
28
|
-
* Replaces any given color with this color
|
|
29
|
-
*/
|
|
30
|
-
readonly color?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Replaces the alpha value with this opacity.
|
|
33
|
-
*
|
|
34
|
-
* Overrides the `color`'s opacity as well.
|
|
35
|
-
*/
|
|
36
|
-
readonly opacity?: number;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
1
|
+
export type Effects = Readonly<Effect> | readonly Readonly<Effect>[];
|
|
2
|
+
export type Effect = AlphaEffect | OpacityEffect | ReplaceEffect;
|
|
3
|
+
interface BaseEffect {
|
|
4
|
+
}
|
|
5
|
+
export interface AlphaEffect extends BaseEffect {
|
|
6
|
+
readonly type: 'alpha';
|
|
7
|
+
/**
|
|
8
|
+
* Color to blend with the base color using alpha blending.
|
|
9
|
+
*/
|
|
10
|
+
readonly color: string;
|
|
11
|
+
/**
|
|
12
|
+
* Multiplied with the alpha value of the effect's `color` before blending.
|
|
13
|
+
*
|
|
14
|
+
* `1` by default.
|
|
15
|
+
*/
|
|
16
|
+
readonly opacity?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface OpacityEffect extends BaseEffect {
|
|
19
|
+
readonly type: 'opacity';
|
|
20
|
+
/**
|
|
21
|
+
* Value to multiply with the current color's alpha value.
|
|
22
|
+
*/
|
|
23
|
+
readonly opacity: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ReplaceEffect extends BaseEffect {
|
|
26
|
+
readonly type: 'replace';
|
|
27
|
+
/**
|
|
28
|
+
* Replaces any given color with this color
|
|
29
|
+
*/
|
|
30
|
+
readonly color?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Replaces the alpha value with this opacity.
|
|
33
|
+
*
|
|
34
|
+
* Overrides the `color`'s opacity as well.
|
|
35
|
+
*/
|
|
36
|
+
readonly opacity?: number;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
39
|
//# sourceMappingURL=effect.d.ts.map
|
package/dist/effect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../src/effect.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../src/effect.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAA;AAEpE,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,aAAa,GAAG,aAAa,CAAA;AAEhE,UAAU,UAAU;CAAG;AAEvB,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B"}
|
package/dist/grid.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit for grid column (px)
|
|
3
|
-
*/
|
|
4
|
-
export declare const COLUMN_UNIT = 80;
|
|
5
|
-
/**
|
|
6
|
-
* Unit for grid gutter width (px)
|
|
7
|
-
*/
|
|
8
|
-
export declare const GUTTER_UNIT = 24;
|
|
9
|
-
/**
|
|
10
|
-
* Calculate px occupied by the span of the columns with gutter gap
|
|
11
|
-
*
|
|
12
|
-
* @param span column span count
|
|
13
|
-
*/
|
|
14
|
-
export declare function columnSystem(span: number, column: number, gutter: number): number;
|
|
1
|
+
/**
|
|
2
|
+
* Unit for grid column (px)
|
|
3
|
+
*/
|
|
4
|
+
export declare const COLUMN_UNIT = 80;
|
|
5
|
+
/**
|
|
6
|
+
* Unit for grid gutter width (px)
|
|
7
|
+
*/
|
|
8
|
+
export declare const GUTTER_UNIT = 24;
|
|
9
|
+
/**
|
|
10
|
+
* Calculate px occupied by the span of the columns with gutter gap
|
|
11
|
+
*
|
|
12
|
+
* @param span column span count
|
|
13
|
+
*/
|
|
14
|
+
export declare function columnSystem(span: number, column: number, gutter: number): number;
|
|
15
15
|
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1,121 @@
|
|
|
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/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
BORDER_RADIUS: () => BORDER_RADIUS,
|
|
24
|
+
BREAKPOINT: () => BREAKPOINT,
|
|
25
|
+
COLUMN_UNIT: () => COLUMN_UNIT,
|
|
26
|
+
GUTTER_UNIT: () => GUTTER_UNIT,
|
|
27
|
+
HORIZONTAL_MIN_MARGIN: () => HORIZONTAL_MIN_MARGIN,
|
|
28
|
+
SPACING: () => SPACING,
|
|
29
|
+
TYPOGRAPHY_SIZE: () => TYPOGRAPHY_SIZE,
|
|
30
|
+
TYPOGRAPHY_VARIANT: () => TYPOGRAPHY_VARIANT,
|
|
31
|
+
TYPOGRAPHY_WEIGHT: () => TYPOGRAPHY_WEIGHT,
|
|
32
|
+
columnSystem: () => columnSystem
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(src_exports);
|
|
35
|
+
|
|
36
|
+
// src/typography.ts
|
|
37
|
+
var TYPOGRAPHY_SIZE = {
|
|
38
|
+
12: {
|
|
39
|
+
fontSize: 12,
|
|
40
|
+
lineHeight: 20
|
|
41
|
+
},
|
|
42
|
+
14: {
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
lineHeight: 22
|
|
45
|
+
},
|
|
46
|
+
16: {
|
|
47
|
+
fontSize: 16,
|
|
48
|
+
lineHeight: 24
|
|
49
|
+
},
|
|
50
|
+
20: {
|
|
51
|
+
fontSize: 20,
|
|
52
|
+
lineHeight: 28
|
|
53
|
+
},
|
|
54
|
+
32: {
|
|
55
|
+
fontSize: 32,
|
|
56
|
+
lineHeight: 40
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var TYPOGRAPHY_WEIGHT = [
|
|
60
|
+
"regular",
|
|
61
|
+
"bold"
|
|
62
|
+
];
|
|
63
|
+
var TYPOGRAPHY_VARIANT = [
|
|
64
|
+
"proportional",
|
|
65
|
+
"monospace"
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// src/spacing.ts
|
|
69
|
+
var SPACING = {
|
|
70
|
+
0: 0,
|
|
71
|
+
4: 4,
|
|
72
|
+
8: 8,
|
|
73
|
+
16: 16,
|
|
74
|
+
24: 24,
|
|
75
|
+
40: 40,
|
|
76
|
+
64: 64,
|
|
77
|
+
104: 104,
|
|
78
|
+
168: 168,
|
|
79
|
+
272: 272,
|
|
80
|
+
440: 440
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// src/grid.ts
|
|
84
|
+
var COLUMN_UNIT = 80;
|
|
85
|
+
var GUTTER_UNIT = 24;
|
|
86
|
+
function columnSystem(span, column, gutter) {
|
|
87
|
+
return span * column + (span - 1) * gutter;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// src/border-radius.ts
|
|
91
|
+
var BORDER_RADIUS = {
|
|
92
|
+
none: 0,
|
|
93
|
+
4: 4,
|
|
94
|
+
8: 8,
|
|
95
|
+
16: 16,
|
|
96
|
+
24: 24,
|
|
97
|
+
oval: 999999
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// src/breakpoint.ts
|
|
101
|
+
var HORIZONTAL_MIN_MARGIN = 72;
|
|
102
|
+
var BREAKPOINT = {
|
|
103
|
+
[6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
104
|
+
[8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
105
|
+
[10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
106
|
+
[12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2
|
|
107
|
+
};
|
|
108
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
+
0 && (module.exports = {
|
|
110
|
+
BORDER_RADIUS,
|
|
111
|
+
BREAKPOINT,
|
|
112
|
+
COLUMN_UNIT,
|
|
113
|
+
GUTTER_UNIT,
|
|
114
|
+
HORIZONTAL_MIN_MARGIN,
|
|
115
|
+
SPACING,
|
|
116
|
+
TYPOGRAPHY_SIZE,
|
|
117
|
+
TYPOGRAPHY_VARIANT,
|
|
118
|
+
TYPOGRAPHY_WEIGHT,
|
|
119
|
+
columnSystem
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/typography.ts","../src/spacing.ts","../src/grid.ts","../src/border-radius.ts","../src/breakpoint.ts"],"sourcesContent":["export * from './typography'\nexport * from './spacing'\nexport * from './grid'\nexport * from './border-radius'\nexport * from './breakpoint'\nexport * from './color'\nexport * from './effect'\n","export interface TypographyDescriptor {\n readonly lineHeight: number\n readonly fontSize: number\n}\n\nexport const TYPOGRAPHY_SIZE = {\n 12: {\n fontSize: 12,\n lineHeight: 20,\n },\n 14: {\n fontSize: 14,\n lineHeight: 22,\n },\n 16: {\n fontSize: 16,\n lineHeight: 24,\n },\n 20: {\n fontSize: 20,\n lineHeight: 28,\n },\n 32: {\n fontSize: 32,\n lineHeight: 40,\n },\n} as const\n\nexport const TYPOGRAPHY_WEIGHT = [\n /**\n * Regular font weight\n *\n * <font-weight-absolute> ~ 400\n *\n * It should be the **DEFAULT** weight\n */\n 'regular',\n /**\n * Bolder than `regular` weight\n *\n * <font-weight-absolute> ~ 700\n */\n 'bold',\n] as const\n\nexport const TYPOGRAPHY_VARIANT = [\n /**\n * Proportional font (which has the variable amount of horizontal space)\n *\n * It should be the **DEFAULT** variant\n */\n 'proportional',\n /**\n * Monospaced font (which has the same amount of horizontal space)\n */\n 'monospace',\n] as const\n","export const SPACING = {\n 0: 0,\n 4: 4,\n 8: 8,\n 16: 16,\n 24: 24,\n 40: 40,\n 64: 64,\n 104: 104,\n 168: 168,\n 272: 272,\n 440: 440,\n} as const\n","/**\n * Unit for grid column (px)\n */\nexport const COLUMN_UNIT = 80\n\n/**\n * Unit for grid gutter width (px)\n */\nexport const GUTTER_UNIT = 24\n\n// TODO: Grid definition with breakpoint\n\n/**\n * Calculate px occupied by the span of the columns with gutter gap\n *\n * @param span column span count\n */\nexport function columnSystem(span: number, column: number, gutter: number) {\n return span * column + (span - 1) * gutter\n}\n","export const BORDER_RADIUS = {\n /**\n * 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)\n */\n none: 0,\n /**\n * 用途: バッジ, 高さ40px以下の要素\n */\n 4: 4,\n /**\n * 用途: サムネイル\n */\n 8: 8,\n /**\n * 用途: チュートリアルツールチップ\n */\n 16: 16,\n /**\n * 用途: モーダル\n */\n 24: 24,\n /**\n * 真円 or 左右が丸まっている矩形 を作る時に用いる\n *\n * 用途: ボタン\n */\n oval: 999999,\n} as const\n","import { COLUMN_UNIT, GUTTER_UNIT, columnSystem } from './grid'\n\nexport const HORIZONTAL_MIN_MARGIN = 72\n\nexport const BREAKPOINT = {\n [6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n} as const\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,kBAAkB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AACF;AAEO,IAAM,oBAAoB;AAAA,EAQ/B;AAAA,EAMA;AACF;AAEO,IAAM,qBAAqB;AAAA,EAMhC;AAAA,EAIA;AACF;;;ACxDO,IAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;;;ACTO,IAAM,cAAc;AAKpB,IAAM,cAAc;AASpB,SAAS,aAAa,MAAc,QAAgB,QAAgB;AACzE,SAAO,OAAO,UAAU,OAAO,KAAK;AACtC;;;ACnBO,IAAM,gBAAgB;AAAA,EAI3B,MAAM;AAAA,EAIN,GAAG;AAAA,EAIH,GAAG;AAAA,EAIH,IAAI;AAAA,EAIJ,IAAI;AAAA,EAMJ,MAAM;AACR;;;ACzBO,IAAM,wBAAwB;AAE9B,IAAM,aAAa;AAAA,EACxB,CAAC,IAAI,aAAa,GAAG,aAAa,WAAW,IAAI,wBAAwB;AAAA,EACzE,CAAC,IAAI,aAAa,GAAG,aAAa,WAAW,IAAI,wBAAwB;AAAA,EACzE,CAAC,KAAK,aAAa,IAAI,aAAa,WAAW,IAAI,wBAAwB;AAAA,EAC3E,CAAC,KAAK,aAAa,IAAI,aAAa,WAAW,IAAI,wBAAwB;AAC7E;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './typography';
|
|
2
|
-
export * from './spacing';
|
|
3
|
-
export * from './grid';
|
|
4
|
-
export * from './border-radius';
|
|
5
|
-
export * from './breakpoint';
|
|
6
|
-
export * from './color';
|
|
7
|
-
export * from './effect';
|
|
1
|
+
export * from './typography';
|
|
2
|
+
export * from './spacing';
|
|
3
|
+
export * from './grid';
|
|
4
|
+
export * from './border-radius';
|
|
5
|
+
export * from './breakpoint';
|
|
6
|
+
export * from './color';
|
|
7
|
+
export * from './effect';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/typography.ts
|
|
2
|
+
var TYPOGRAPHY_SIZE = {
|
|
3
|
+
12: {
|
|
4
|
+
fontSize: 12,
|
|
5
|
+
lineHeight: 20
|
|
6
|
+
},
|
|
7
|
+
14: {
|
|
8
|
+
fontSize: 14,
|
|
9
|
+
lineHeight: 22
|
|
10
|
+
},
|
|
11
|
+
16: {
|
|
12
|
+
fontSize: 16,
|
|
13
|
+
lineHeight: 24
|
|
14
|
+
},
|
|
15
|
+
20: {
|
|
16
|
+
fontSize: 20,
|
|
17
|
+
lineHeight: 28
|
|
18
|
+
},
|
|
19
|
+
32: {
|
|
20
|
+
fontSize: 32,
|
|
21
|
+
lineHeight: 40
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var TYPOGRAPHY_WEIGHT = [
|
|
25
|
+
"regular",
|
|
26
|
+
"bold"
|
|
27
|
+
];
|
|
28
|
+
var TYPOGRAPHY_VARIANT = [
|
|
29
|
+
"proportional",
|
|
30
|
+
"monospace"
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
// src/spacing.ts
|
|
34
|
+
var SPACING = {
|
|
35
|
+
0: 0,
|
|
36
|
+
4: 4,
|
|
37
|
+
8: 8,
|
|
38
|
+
16: 16,
|
|
39
|
+
24: 24,
|
|
40
|
+
40: 40,
|
|
41
|
+
64: 64,
|
|
42
|
+
104: 104,
|
|
43
|
+
168: 168,
|
|
44
|
+
272: 272,
|
|
45
|
+
440: 440
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/grid.ts
|
|
49
|
+
var COLUMN_UNIT = 80;
|
|
50
|
+
var GUTTER_UNIT = 24;
|
|
51
|
+
function columnSystem(span, column, gutter) {
|
|
52
|
+
return span * column + (span - 1) * gutter;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// src/border-radius.ts
|
|
56
|
+
var BORDER_RADIUS = {
|
|
57
|
+
none: 0,
|
|
58
|
+
4: 4,
|
|
59
|
+
8: 8,
|
|
60
|
+
16: 16,
|
|
61
|
+
24: 24,
|
|
62
|
+
oval: 999999
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// src/breakpoint.ts
|
|
66
|
+
var HORIZONTAL_MIN_MARGIN = 72;
|
|
67
|
+
var BREAKPOINT = {
|
|
68
|
+
[6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
69
|
+
[8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
70
|
+
[10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
71
|
+
[12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
BORDER_RADIUS,
|
|
75
|
+
BREAKPOINT,
|
|
76
|
+
COLUMN_UNIT,
|
|
77
|
+
GUTTER_UNIT,
|
|
78
|
+
HORIZONTAL_MIN_MARGIN,
|
|
79
|
+
SPACING,
|
|
80
|
+
TYPOGRAPHY_SIZE,
|
|
81
|
+
TYPOGRAPHY_VARIANT,
|
|
82
|
+
TYPOGRAPHY_WEIGHT,
|
|
83
|
+
columnSystem
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/typography.ts","../src/spacing.ts","../src/grid.ts","../src/border-radius.ts","../src/breakpoint.ts"],"sourcesContent":["export interface TypographyDescriptor {\n readonly lineHeight: number\n readonly fontSize: number\n}\n\nexport const TYPOGRAPHY_SIZE = {\n 12: {\n fontSize: 12,\n lineHeight: 20,\n },\n 14: {\n fontSize: 14,\n lineHeight: 22,\n },\n 16: {\n fontSize: 16,\n lineHeight: 24,\n },\n 20: {\n fontSize: 20,\n lineHeight: 28,\n },\n 32: {\n fontSize: 32,\n lineHeight: 40,\n },\n} as const\n\nexport const TYPOGRAPHY_WEIGHT = [\n /**\n * Regular font weight\n *\n * <font-weight-absolute> ~ 400\n *\n * It should be the **DEFAULT** weight\n */\n 'regular',\n /**\n * Bolder than `regular` weight\n *\n * <font-weight-absolute> ~ 700\n */\n 'bold',\n] as const\n\nexport const TYPOGRAPHY_VARIANT = [\n /**\n * Proportional font (which has the variable amount of horizontal space)\n *\n * It should be the **DEFAULT** variant\n */\n 'proportional',\n /**\n * Monospaced font (which has the same amount of horizontal space)\n */\n 'monospace',\n] as const\n","export const SPACING = {\n 0: 0,\n 4: 4,\n 8: 8,\n 16: 16,\n 24: 24,\n 40: 40,\n 64: 64,\n 104: 104,\n 168: 168,\n 272: 272,\n 440: 440,\n} as const\n","/**\n * Unit for grid column (px)\n */\nexport const COLUMN_UNIT = 80\n\n/**\n * Unit for grid gutter width (px)\n */\nexport const GUTTER_UNIT = 24\n\n// TODO: Grid definition with breakpoint\n\n/**\n * Calculate px occupied by the span of the columns with gutter gap\n *\n * @param span column span count\n */\nexport function columnSystem(span: number, column: number, gutter: number) {\n return span * column + (span - 1) * gutter\n}\n","export const BORDER_RADIUS = {\n /**\n * 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)\n */\n none: 0,\n /**\n * 用途: バッジ, 高さ40px以下の要素\n */\n 4: 4,\n /**\n * 用途: サムネイル\n */\n 8: 8,\n /**\n * 用途: チュートリアルツールチップ\n */\n 16: 16,\n /**\n * 用途: モーダル\n */\n 24: 24,\n /**\n * 真円 or 左右が丸まっている矩形 を作る時に用いる\n *\n * 用途: ボタン\n */\n oval: 999999,\n} as const\n","import { COLUMN_UNIT, GUTTER_UNIT, columnSystem } from './grid'\n\nexport const HORIZONTAL_MIN_MARGIN = 72\n\nexport const BREAKPOINT = {\n [6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n} as const\n"],"mappings":";AAKO,IAAM,kBAAkB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AAAA,EACA,IAAI;AAAA,IACF,UAAU;AAAA,IACV,YAAY;AAAA,EACd;AACF;AAEO,IAAM,oBAAoB;AAAA,EAQ/B;AAAA,EAMA;AACF;AAEO,IAAM,qBAAqB;AAAA,EAMhC;AAAA,EAIA;AACF;;;ACxDO,IAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;;;ACTO,IAAM,cAAc;AAKpB,IAAM,cAAc;AASpB,SAAS,aAAa,MAAc,QAAgB,QAAgB;AACzE,SAAO,OAAO,UAAU,OAAO,KAAK;AACtC;;;ACnBO,IAAM,gBAAgB;AAAA,EAI3B,MAAM;AAAA,EAIN,GAAG;AAAA,EAIH,GAAG;AAAA,EAIH,IAAI;AAAA,EAIJ,IAAI;AAAA,EAMJ,MAAM;AACR;;;ACzBO,IAAM,wBAAwB;AAE9B,IAAM,aAAa;AAAA,EACxB,CAAC,IAAI,aAAa,GAAG,aAAa,WAAW,IAAI,wBAAwB;AAAA,EACzE,CAAC,IAAI,aAAa,GAAG,aAAa,WAAW,IAAI,wBAAwB;AAAA,EACzE,CAAC,KAAK,aAAa,IAAI,aAAa,WAAW,IAAI,wBAAwB;AAAA,EAC3E,CAAC,KAAK,aAAa,IAAI,aAAa,WAAW,IAAI,wBAAwB;AAC7E;","names":[]}
|
package/dist/spacing.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare const SPACING: {
|
|
2
|
-
readonly 0: 0;
|
|
3
|
-
readonly 4: 4;
|
|
4
|
-
readonly 8: 8;
|
|
5
|
-
readonly 16: 16;
|
|
6
|
-
readonly 24: 24;
|
|
7
|
-
readonly 40: 40;
|
|
8
|
-
readonly 64: 64;
|
|
9
|
-
readonly 104: 104;
|
|
10
|
-
readonly 168: 168;
|
|
11
|
-
readonly 272: 272;
|
|
12
|
-
readonly 440: 440;
|
|
13
|
-
};
|
|
1
|
+
export declare const SPACING: {
|
|
2
|
+
readonly 0: 0;
|
|
3
|
+
readonly 4: 4;
|
|
4
|
+
readonly 8: 8;
|
|
5
|
+
readonly 16: 16;
|
|
6
|
+
readonly 24: 24;
|
|
7
|
+
readonly 40: 40;
|
|
8
|
+
readonly 64: 64;
|
|
9
|
+
readonly 104: 104;
|
|
10
|
+
readonly 168: 168;
|
|
11
|
+
readonly 272: 272;
|
|
12
|
+
readonly 440: 440;
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=spacing.d.ts.map
|
package/dist/typography.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export interface TypographyDescriptor {
|
|
2
|
-
readonly lineHeight: number;
|
|
3
|
-
readonly fontSize: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const TYPOGRAPHY_SIZE: {
|
|
6
|
-
readonly 12: {
|
|
7
|
-
readonly fontSize: 12;
|
|
8
|
-
readonly lineHeight: 20;
|
|
9
|
-
};
|
|
10
|
-
readonly 14: {
|
|
11
|
-
readonly fontSize: 14;
|
|
12
|
-
readonly lineHeight: 22;
|
|
13
|
-
};
|
|
14
|
-
readonly 16: {
|
|
15
|
-
readonly fontSize: 16;
|
|
16
|
-
readonly lineHeight: 24;
|
|
17
|
-
};
|
|
18
|
-
readonly 20: {
|
|
19
|
-
readonly fontSize: 20;
|
|
20
|
-
readonly lineHeight: 28;
|
|
21
|
-
};
|
|
22
|
-
readonly 32: {
|
|
23
|
-
readonly fontSize: 32;
|
|
24
|
-
readonly lineHeight: 40;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare const TYPOGRAPHY_WEIGHT: readonly ["regular", "bold"];
|
|
28
|
-
export declare const TYPOGRAPHY_VARIANT: readonly ["proportional", "monospace"];
|
|
1
|
+
export interface TypographyDescriptor {
|
|
2
|
+
readonly lineHeight: number;
|
|
3
|
+
readonly fontSize: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const TYPOGRAPHY_SIZE: {
|
|
6
|
+
readonly 12: {
|
|
7
|
+
readonly fontSize: 12;
|
|
8
|
+
readonly lineHeight: 20;
|
|
9
|
+
};
|
|
10
|
+
readonly 14: {
|
|
11
|
+
readonly fontSize: 14;
|
|
12
|
+
readonly lineHeight: 22;
|
|
13
|
+
};
|
|
14
|
+
readonly 16: {
|
|
15
|
+
readonly fontSize: 16;
|
|
16
|
+
readonly lineHeight: 24;
|
|
17
|
+
};
|
|
18
|
+
readonly 20: {
|
|
19
|
+
readonly fontSize: 20;
|
|
20
|
+
readonly lineHeight: 28;
|
|
21
|
+
};
|
|
22
|
+
readonly 32: {
|
|
23
|
+
readonly fontSize: 32;
|
|
24
|
+
readonly lineHeight: 40;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const TYPOGRAPHY_WEIGHT: readonly ["regular", "bold"];
|
|
28
|
+
export declare const TYPOGRAPHY_VARIANT: readonly ["proportional", "monospace"];
|
|
29
29
|
//# sourceMappingURL=typography.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcoal-ui/foundation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"main": "./dist/index.cjs",
|
|
8
|
-
"module": "./dist/index.module.js",
|
|
5
|
+
"main": "./dist/index.cjs.js",
|
|
6
|
+
"module": "./dist/index.esm.js",
|
|
9
7
|
"exports": {
|
|
10
|
-
"require": "./dist/index.cjs",
|
|
11
|
-
"default": "./dist/index.
|
|
8
|
+
"require": "./dist/index.cjs.js",
|
|
9
|
+
"default": "./dist/index.esm.js"
|
|
12
10
|
},
|
|
13
11
|
"types": "./dist/index.d.ts",
|
|
14
12
|
"sideEffects": false,
|
|
15
13
|
"scripts": {
|
|
16
|
-
"build": "
|
|
17
|
-
"
|
|
18
|
-
"
|
|
14
|
+
"build": "run-p --print-label 'build:*'",
|
|
15
|
+
"build:bundle": "FORCE_COLOR=1 tsup",
|
|
16
|
+
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
|
|
17
|
+
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
|
|
18
|
+
"clean": "rimraf dist .tsbuildinfo"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"microbundle": "^0.14.2",
|
|
22
21
|
"npm-run-all": "^4.1.5",
|
|
23
22
|
"rimraf": "^3.0.2",
|
|
24
|
-
"
|
|
23
|
+
"tsup": "^6.5.0",
|
|
24
|
+
"typescript": "^4.9.5"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"src",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"url": "https://github.com/pixiv/charcoal.git",
|
|
36
36
|
"directory": "packages/foundation"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "8579b406b316285a35858512030d2143524ae154"
|
|
39
39
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
var TYPOGRAPHY_SIZE = {
|
|
2
|
-
12: {
|
|
3
|
-
fontSize: 12,
|
|
4
|
-
lineHeight: 20
|
|
5
|
-
},
|
|
6
|
-
14: {
|
|
7
|
-
fontSize: 14,
|
|
8
|
-
lineHeight: 22
|
|
9
|
-
},
|
|
10
|
-
16: {
|
|
11
|
-
fontSize: 16,
|
|
12
|
-
lineHeight: 24
|
|
13
|
-
},
|
|
14
|
-
20: {
|
|
15
|
-
fontSize: 20,
|
|
16
|
-
lineHeight: 28
|
|
17
|
-
},
|
|
18
|
-
32: {
|
|
19
|
-
fontSize: 32,
|
|
20
|
-
lineHeight: 40
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var TYPOGRAPHY_WEIGHT = [
|
|
24
|
-
/**
|
|
25
|
-
* Regular font weight
|
|
26
|
-
*
|
|
27
|
-
* <font-weight-absolute> ~ 400
|
|
28
|
-
*
|
|
29
|
-
* It should be the **DEFAULT** weight
|
|
30
|
-
*/
|
|
31
|
-
'regular',
|
|
32
|
-
/**
|
|
33
|
-
* Bolder than `regular` weight
|
|
34
|
-
*
|
|
35
|
-
* <font-weight-absolute> ~ 700
|
|
36
|
-
*/
|
|
37
|
-
'bold'];
|
|
38
|
-
var TYPOGRAPHY_VARIANT = [
|
|
39
|
-
/**
|
|
40
|
-
* Proportional font (which has the variable amount of horizontal space)
|
|
41
|
-
*
|
|
42
|
-
* It should be the **DEFAULT** variant
|
|
43
|
-
*/
|
|
44
|
-
'proportional',
|
|
45
|
-
/**
|
|
46
|
-
* Monospaced font (which has the same amount of horizontal space)
|
|
47
|
-
*/
|
|
48
|
-
'monospace'];
|
|
49
|
-
|
|
50
|
-
var SPACING = {
|
|
51
|
-
0: 0,
|
|
52
|
-
4: 4,
|
|
53
|
-
8: 8,
|
|
54
|
-
16: 16,
|
|
55
|
-
24: 24,
|
|
56
|
-
40: 40,
|
|
57
|
-
64: 64,
|
|
58
|
-
104: 104,
|
|
59
|
-
168: 168,
|
|
60
|
-
272: 272,
|
|
61
|
-
440: 440
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Unit for grid column (px)
|
|
66
|
-
*/
|
|
67
|
-
var COLUMN_UNIT = 80;
|
|
68
|
-
/**
|
|
69
|
-
* Unit for grid gutter width (px)
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
var GUTTER_UNIT = 24; // TODO: Grid definition with breakpoint
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Calculate px occupied by the span of the columns with gutter gap
|
|
76
|
-
*
|
|
77
|
-
* @param span column span count
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
function columnSystem(span, column, gutter) {
|
|
81
|
-
return span * column + (span - 1) * gutter;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var BORDER_RADIUS = {
|
|
85
|
-
/**
|
|
86
|
-
* 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)
|
|
87
|
-
*/
|
|
88
|
-
none: 0,
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* 用途: バッジ, 高さ40px以下の要素
|
|
92
|
-
*/
|
|
93
|
-
4: 4,
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 用途: サムネイル
|
|
97
|
-
*/
|
|
98
|
-
8: 8,
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* 用途: チュートリアルツールチップ
|
|
102
|
-
*/
|
|
103
|
-
16: 16,
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 用途: モーダル
|
|
107
|
-
*/
|
|
108
|
-
24: 24,
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* 真円 or 左右が丸まっている矩形 を作る時に用いる
|
|
112
|
-
*
|
|
113
|
-
* 用途: ボタン
|
|
114
|
-
*/
|
|
115
|
-
oval: 999999
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
var _BREAKPOINT;
|
|
119
|
-
var HORIZONTAL_MIN_MARGIN = 72;
|
|
120
|
-
var BREAKPOINT = (_BREAKPOINT = {}, _BREAKPOINT[6] = columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT[8] = columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT[10] = columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT[12] = columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT);
|
|
121
|
-
|
|
122
|
-
exports.BORDER_RADIUS = BORDER_RADIUS;
|
|
123
|
-
exports.BREAKPOINT = BREAKPOINT;
|
|
124
|
-
exports.COLUMN_UNIT = COLUMN_UNIT;
|
|
125
|
-
exports.GUTTER_UNIT = GUTTER_UNIT;
|
|
126
|
-
exports.HORIZONTAL_MIN_MARGIN = HORIZONTAL_MIN_MARGIN;
|
|
127
|
-
exports.SPACING = SPACING;
|
|
128
|
-
exports.TYPOGRAPHY_SIZE = TYPOGRAPHY_SIZE;
|
|
129
|
-
exports.TYPOGRAPHY_VARIANT = TYPOGRAPHY_VARIANT;
|
|
130
|
-
exports.TYPOGRAPHY_WEIGHT = TYPOGRAPHY_WEIGHT;
|
|
131
|
-
exports.columnSystem = columnSystem;
|
|
132
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/typography.ts","../src/spacing.ts","../src/grid.ts","../src/border-radius.ts","../src/breakpoint.ts"],"sourcesContent":["export interface TypographyDescriptor {\n readonly lineHeight: number\n readonly fontSize: number\n}\n\nexport const TYPOGRAPHY_SIZE = {\n 12: {\n fontSize: 12,\n lineHeight: 20,\n },\n 14: {\n fontSize: 14,\n lineHeight: 22,\n },\n 16: {\n fontSize: 16,\n lineHeight: 24,\n },\n 20: {\n fontSize: 20,\n lineHeight: 28,\n },\n 32: {\n fontSize: 32,\n lineHeight: 40,\n },\n} as const\n\nexport const TYPOGRAPHY_WEIGHT = [\n /**\n * Regular font weight\n *\n * <font-weight-absolute> ~ 400\n *\n * It should be the **DEFAULT** weight\n */\n 'regular',\n /**\n * Bolder than `regular` weight\n *\n * <font-weight-absolute> ~ 700\n */\n 'bold',\n] as const\n\nexport const TYPOGRAPHY_VARIANT = [\n /**\n * Proportional font (which has the variable amount of horizontal space)\n *\n * It should be the **DEFAULT** variant\n */\n 'proportional',\n /**\n * Monospaced font (which has the same amount of horizontal space)\n */\n 'monospace',\n] as const\n","export const SPACING = {\n 0: 0,\n 4: 4,\n 8: 8,\n 16: 16,\n 24: 24,\n 40: 40,\n 64: 64,\n 104: 104,\n 168: 168,\n 272: 272,\n 440: 440,\n} as const\n","/**\n * Unit for grid column (px)\n */\nexport const COLUMN_UNIT = 80\n\n/**\n * Unit for grid gutter width (px)\n */\nexport const GUTTER_UNIT = 24\n\n// TODO: Grid definition with breakpoint\n\n/**\n * Calculate px occupied by the span of the columns with gutter gap\n *\n * @param span column span count\n */\nexport function columnSystem(span: number, column: number, gutter: number) {\n return span * column + (span - 1) * gutter\n}\n","export const BORDER_RADIUS = {\n /**\n * 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)\n */\n none: 0,\n /**\n * 用途: バッジ, 高さ40px以下の要素\n */\n 4: 4,\n /**\n * 用途: サムネイル\n */\n 8: 8,\n /**\n * 用途: チュートリアルツールチップ\n */\n 16: 16,\n /**\n * 用途: モーダル\n */\n 24: 24,\n /**\n * 真円 or 左右が丸まっている矩形 を作る時に用いる\n *\n * 用途: ボタン\n */\n oval: 999999,\n} as const\n","import { COLUMN_UNIT, GUTTER_UNIT, columnSystem } from './grid'\n\nexport const HORIZONTAL_MIN_MARGIN = 72\n\nexport const BREAKPOINT = {\n [6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n} as const\n"],"names":["TYPOGRAPHY_SIZE","fontSize","lineHeight","TYPOGRAPHY_WEIGHT","TYPOGRAPHY_VARIANT","SPACING","COLUMN_UNIT","GUTTER_UNIT","columnSystem","span","column","gutter","BORDER_RADIUS","none","oval","HORIZONTAL_MIN_MARGIN","BREAKPOINT"],"mappings":"AAKO,IAAMA,eAAe,GAAG;EAC7B,EAAI,EAAA;AACFC,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAHe;EAK7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAPe;EAS7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAXe;EAa7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAfe;EAiB7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;AAFV,GAAA;AAjByB,EAAxB;AAuBA,IAAMC,iBAAiB,GAAG;AAC/B;;;;;;AAMG;AACH,SAR+B;AAS/B;;;;AAIG;AACH,MAd+B,EAA1B;AAiBA,IAAMC,kBAAkB,GAAG;AAChC;;;;AAIG;AACH,cANgC;AAOhC;;AAEG;AACH,WAVgC;;AC7C3B,IAAMC,OAAO,GAAG;AACrB,EAAA,CAAA,EAAG,CADkB;AAErB,EAAA,CAAA,EAAG,CAFkB;AAGrB,EAAA,CAAA,EAAG,CAHkB;AAIrB,EAAA,EAAA,EAAI,EAJiB;AAKrB,EAAA,EAAA,EAAI,EALiB;AAMrB,EAAA,EAAA,EAAI,EANiB;AAOrB,EAAA,EAAA,EAAI,EAPiB;AAQrB,EAAA,GAAA,EAAK,GARgB;AASrB,EAAA,GAAA,EAAK,GATgB;AAUrB,EAAA,GAAA,EAAK,GAVgB;EAWrB,GAAK,EAAA,GAAA;AAXgB;;ACAvB;;AAEG;AACI,IAAMC,WAAW,GAAG,GAApB;AAEP;;AAEG;;AACUC,IAAAA,WAAW,GAAG;;AAI3B;;;;AAIG;;SACaC,aAAaC,MAAcC,QAAgBC,QAAc;EACvE,OAAOF,IAAI,GAAGC,MAAP,GAAgB,CAACD,IAAI,GAAG,CAAR,IAAaE,MAApC,CAAA;AACD;;ACnBM,IAAMC,aAAa,GAAG;AAC3B;;AAEG;AACHC,EAAAA,IAAI,EAAE,CAJqB;;AAK3B;;AAEG;AACH,EAAA,CAAA,EAAG,CARwB;;AAS3B;;AAEG;AACH,EAAA,CAAA,EAAG,CAZwB;;AAa3B;;AAEG;AACH,EAAA,EAAA,EAAI,EAhBuB;;AAiB3B;;AAEG;AACH,EAAA,EAAA,EAAI,EApBuB;;AAqB3B;;;;AAIG;AACHC,EAAAA,IAAI,EAAE,MAAA;AA1BqB;;;ACEtB,IAAMC,qBAAqB,GAAG,GAA9B;AAEMC,IAAAA,UAAU,IACpB,WAAA,GAAA,EAAA,EAAA,WAAA,CAAA,CADoB,CAChBR,GAAAA,YAAY,CAAC,CAAD,EAAIF,WAAJ,EAAiBC,WAAjB,CAAZ,GAA4CQ,qBAAqB,GAAG,CADpD,EAAA,WAAA,CAEpB,CAFoB,CAAA,GAEhBP,YAAY,CAAC,CAAD,EAAIF,WAAJ,EAAiBC,WAAjB,CAAZ,GAA4CQ,qBAAqB,GAAG,CAFpD,EAAA,WAAA,CAGpB,EAHoB,CAAA,GAGfP,YAAY,CAAC,EAAD,EAAKF,WAAL,EAAkBC,WAAlB,CAAZ,GAA6CQ,qBAAqB,GAAG,CAHtD,EAIpB,WAAA,CAAA,EAJoB,CAIfP,GAAAA,YAAY,CAAC,EAAD,EAAKF,WAAL,EAAkBC,WAAlB,CAAZ,GAA6CQ,qBAAqB,GAAG,CAJtD,EAAhB,WAAA;;;;;;;;;;;;;"}
|
package/dist/index.modern.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
const TYPOGRAPHY_SIZE = {
|
|
2
|
-
12: {
|
|
3
|
-
fontSize: 12,
|
|
4
|
-
lineHeight: 20
|
|
5
|
-
},
|
|
6
|
-
14: {
|
|
7
|
-
fontSize: 14,
|
|
8
|
-
lineHeight: 22
|
|
9
|
-
},
|
|
10
|
-
16: {
|
|
11
|
-
fontSize: 16,
|
|
12
|
-
lineHeight: 24
|
|
13
|
-
},
|
|
14
|
-
20: {
|
|
15
|
-
fontSize: 20,
|
|
16
|
-
lineHeight: 28
|
|
17
|
-
},
|
|
18
|
-
32: {
|
|
19
|
-
fontSize: 32,
|
|
20
|
-
lineHeight: 40
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const TYPOGRAPHY_WEIGHT = [
|
|
24
|
-
/**
|
|
25
|
-
* Regular font weight
|
|
26
|
-
*
|
|
27
|
-
* <font-weight-absolute> ~ 400
|
|
28
|
-
*
|
|
29
|
-
* It should be the **DEFAULT** weight
|
|
30
|
-
*/
|
|
31
|
-
'regular',
|
|
32
|
-
/**
|
|
33
|
-
* Bolder than `regular` weight
|
|
34
|
-
*
|
|
35
|
-
* <font-weight-absolute> ~ 700
|
|
36
|
-
*/
|
|
37
|
-
'bold'];
|
|
38
|
-
const TYPOGRAPHY_VARIANT = [
|
|
39
|
-
/**
|
|
40
|
-
* Proportional font (which has the variable amount of horizontal space)
|
|
41
|
-
*
|
|
42
|
-
* It should be the **DEFAULT** variant
|
|
43
|
-
*/
|
|
44
|
-
'proportional',
|
|
45
|
-
/**
|
|
46
|
-
* Monospaced font (which has the same amount of horizontal space)
|
|
47
|
-
*/
|
|
48
|
-
'monospace'];
|
|
49
|
-
|
|
50
|
-
const SPACING = {
|
|
51
|
-
0: 0,
|
|
52
|
-
4: 4,
|
|
53
|
-
8: 8,
|
|
54
|
-
16: 16,
|
|
55
|
-
24: 24,
|
|
56
|
-
40: 40,
|
|
57
|
-
64: 64,
|
|
58
|
-
104: 104,
|
|
59
|
-
168: 168,
|
|
60
|
-
272: 272,
|
|
61
|
-
440: 440
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Unit for grid column (px)
|
|
66
|
-
*/
|
|
67
|
-
const COLUMN_UNIT = 80;
|
|
68
|
-
/**
|
|
69
|
-
* Unit for grid gutter width (px)
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
const GUTTER_UNIT = 24; // TODO: Grid definition with breakpoint
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Calculate px occupied by the span of the columns with gutter gap
|
|
76
|
-
*
|
|
77
|
-
* @param span column span count
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
function columnSystem(span, column, gutter) {
|
|
81
|
-
return span * column + (span - 1) * gutter;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const BORDER_RADIUS = {
|
|
85
|
-
/**
|
|
86
|
-
* 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)
|
|
87
|
-
*/
|
|
88
|
-
none: 0,
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* 用途: バッジ, 高さ40px以下の要素
|
|
92
|
-
*/
|
|
93
|
-
4: 4,
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 用途: サムネイル
|
|
97
|
-
*/
|
|
98
|
-
8: 8,
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* 用途: チュートリアルツールチップ
|
|
102
|
-
*/
|
|
103
|
-
16: 16,
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 用途: モーダル
|
|
107
|
-
*/
|
|
108
|
-
24: 24,
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* 真円 or 左右が丸まっている矩形 を作る時に用いる
|
|
112
|
-
*
|
|
113
|
-
* 用途: ボタン
|
|
114
|
-
*/
|
|
115
|
-
oval: 999999
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const HORIZONTAL_MIN_MARGIN = 72;
|
|
119
|
-
const BREAKPOINT = {
|
|
120
|
-
[6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
121
|
-
[8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
122
|
-
[10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,
|
|
123
|
-
[12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export { BORDER_RADIUS, BREAKPOINT, COLUMN_UNIT, GUTTER_UNIT, HORIZONTAL_MIN_MARGIN, SPACING, TYPOGRAPHY_SIZE, TYPOGRAPHY_VARIANT, TYPOGRAPHY_WEIGHT, columnSystem };
|
|
127
|
-
//# sourceMappingURL=index.modern.js.map
|
package/dist/index.modern.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.modern.js","sources":["../src/typography.ts","../src/spacing.ts","../src/grid.ts","../src/border-radius.ts","../src/breakpoint.ts"],"sourcesContent":["export interface TypographyDescriptor {\n readonly lineHeight: number\n readonly fontSize: number\n}\n\nexport const TYPOGRAPHY_SIZE = {\n 12: {\n fontSize: 12,\n lineHeight: 20,\n },\n 14: {\n fontSize: 14,\n lineHeight: 22,\n },\n 16: {\n fontSize: 16,\n lineHeight: 24,\n },\n 20: {\n fontSize: 20,\n lineHeight: 28,\n },\n 32: {\n fontSize: 32,\n lineHeight: 40,\n },\n} as const\n\nexport const TYPOGRAPHY_WEIGHT = [\n /**\n * Regular font weight\n *\n * <font-weight-absolute> ~ 400\n *\n * It should be the **DEFAULT** weight\n */\n 'regular',\n /**\n * Bolder than `regular` weight\n *\n * <font-weight-absolute> ~ 700\n */\n 'bold',\n] as const\n\nexport const TYPOGRAPHY_VARIANT = [\n /**\n * Proportional font (which has the variable amount of horizontal space)\n *\n * It should be the **DEFAULT** variant\n */\n 'proportional',\n /**\n * Monospaced font (which has the same amount of horizontal space)\n */\n 'monospace',\n] as const\n","export const SPACING = {\n 0: 0,\n 4: 4,\n 8: 8,\n 16: 16,\n 24: 24,\n 40: 40,\n 64: 64,\n 104: 104,\n 168: 168,\n 272: 272,\n 440: 440,\n} as const\n","/**\n * Unit for grid column (px)\n */\nexport const COLUMN_UNIT = 80\n\n/**\n * Unit for grid gutter width (px)\n */\nexport const GUTTER_UNIT = 24\n\n// TODO: Grid definition with breakpoint\n\n/**\n * Calculate px occupied by the span of the columns with gutter gap\n *\n * @param span column span count\n */\nexport function columnSystem(span: number, column: number, gutter: number) {\n return span * column + (span - 1) * gutter\n}\n","export const BORDER_RADIUS = {\n /**\n * 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)\n */\n none: 0,\n /**\n * 用途: バッジ, 高さ40px以下の要素\n */\n 4: 4,\n /**\n * 用途: サムネイル\n */\n 8: 8,\n /**\n * 用途: チュートリアルツールチップ\n */\n 16: 16,\n /**\n * 用途: モーダル\n */\n 24: 24,\n /**\n * 真円 or 左右が丸まっている矩形 を作る時に用いる\n *\n * 用途: ボタン\n */\n oval: 999999,\n} as const\n","import { COLUMN_UNIT, GUTTER_UNIT, columnSystem } from './grid'\n\nexport const HORIZONTAL_MIN_MARGIN = 72\n\nexport const BREAKPOINT = {\n [6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n} as const\n"],"names":["TYPOGRAPHY_SIZE","fontSize","lineHeight","TYPOGRAPHY_WEIGHT","TYPOGRAPHY_VARIANT","SPACING","COLUMN_UNIT","GUTTER_UNIT","columnSystem","span","column","gutter","BORDER_RADIUS","none","oval","HORIZONTAL_MIN_MARGIN","BREAKPOINT"],"mappings":"AAKO,MAAMA,eAAe,GAAG;EAC7B,EAAI,EAAA;AACFC,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAHe;EAK7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAPe;EAS7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAXe;EAa7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAfe;EAiB7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;AAFV,GAAA;AAjByB,EAAxB;AAuBA,MAAMC,iBAAiB,GAAG;AAC/B;;;;;;AAMG;AACH,SAR+B;AAS/B;;;;AAIG;AACH,MAd+B,EAA1B;AAiBA,MAAMC,kBAAkB,GAAG;AAChC;;;;AAIG;AACH,cANgC;AAOhC;;AAEG;AACH,WAVgC;;AC7C3B,MAAMC,OAAO,GAAG;AACrB,EAAA,CAAA,EAAG,CADkB;AAErB,EAAA,CAAA,EAAG,CAFkB;AAGrB,EAAA,CAAA,EAAG,CAHkB;AAIrB,EAAA,EAAA,EAAI,EAJiB;AAKrB,EAAA,EAAA,EAAI,EALiB;AAMrB,EAAA,EAAA,EAAI,EANiB;AAOrB,EAAA,EAAA,EAAI,EAPiB;AAQrB,EAAA,GAAA,EAAK,GARgB;AASrB,EAAA,GAAA,EAAK,GATgB;AAUrB,EAAA,GAAA,EAAK,GAVgB;EAWrB,GAAK,EAAA,GAAA;AAXgB;;ACAvB;;AAEG;AACI,MAAMC,WAAW,GAAG,GAApB;AAEP;;AAEG;;AACUC,MAAAA,WAAW,GAAG;;AAI3B;;;;AAIG;;SACaC,aAAaC,MAAcC,QAAgBC,QAAc;EACvE,OAAOF,IAAI,GAAGC,MAAP,GAAgB,CAACD,IAAI,GAAG,CAAR,IAAaE,MAApC,CAAA;AACD;;ACnBM,MAAMC,aAAa,GAAG;AAC3B;;AAEG;AACHC,EAAAA,IAAI,EAAE,CAJqB;;AAK3B;;AAEG;AACH,EAAA,CAAA,EAAG,CARwB;;AAS3B;;AAEG;AACH,EAAA,CAAA,EAAG,CAZwB;;AAa3B;;AAEG;AACH,EAAA,EAAA,EAAI,EAhBuB;;AAiB3B;;AAEG;AACH,EAAA,EAAA,EAAI,EApBuB;;AAqB3B;;;;AAIG;AACHC,EAAAA,IAAI,EAAE,MAAA;AA1BqB;;ACEtB,MAAMC,qBAAqB,GAAG,GAA9B;AAEA,MAAMC,UAAU,GAAG;AACxB,EAAA,CAAC,CAAD,GAAKR,YAAY,CAAC,CAAD,EAAIF,WAAJ,EAAiBC,WAAjB,CAAZ,GAA4CQ,qBAAqB,GAAG,CADjD;AAExB,EAAA,CAAC,CAAD,GAAKP,YAAY,CAAC,CAAD,EAAIF,WAAJ,EAAiBC,WAAjB,CAAZ,GAA4CQ,qBAAqB,GAAG,CAFjD;AAGxB,EAAA,CAAC,EAAD,GAAMP,YAAY,CAAC,EAAD,EAAKF,WAAL,EAAkBC,WAAlB,CAAZ,GAA6CQ,qBAAqB,GAAG,CAHnD;AAIxB,EAAA,CAAC,EAAD,GAAMP,YAAY,CAAC,EAAD,EAAKF,WAAL,EAAkBC,WAAlB,CAAZ,GAA6CQ,qBAAqB,GAAG,CAAA;AAJnD;;;;"}
|
package/dist/index.module.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
var TYPOGRAPHY_SIZE = {
|
|
2
|
-
12: {
|
|
3
|
-
fontSize: 12,
|
|
4
|
-
lineHeight: 20
|
|
5
|
-
},
|
|
6
|
-
14: {
|
|
7
|
-
fontSize: 14,
|
|
8
|
-
lineHeight: 22
|
|
9
|
-
},
|
|
10
|
-
16: {
|
|
11
|
-
fontSize: 16,
|
|
12
|
-
lineHeight: 24
|
|
13
|
-
},
|
|
14
|
-
20: {
|
|
15
|
-
fontSize: 20,
|
|
16
|
-
lineHeight: 28
|
|
17
|
-
},
|
|
18
|
-
32: {
|
|
19
|
-
fontSize: 32,
|
|
20
|
-
lineHeight: 40
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var TYPOGRAPHY_WEIGHT = [
|
|
24
|
-
/**
|
|
25
|
-
* Regular font weight
|
|
26
|
-
*
|
|
27
|
-
* <font-weight-absolute> ~ 400
|
|
28
|
-
*
|
|
29
|
-
* It should be the **DEFAULT** weight
|
|
30
|
-
*/
|
|
31
|
-
'regular',
|
|
32
|
-
/**
|
|
33
|
-
* Bolder than `regular` weight
|
|
34
|
-
*
|
|
35
|
-
* <font-weight-absolute> ~ 700
|
|
36
|
-
*/
|
|
37
|
-
'bold'];
|
|
38
|
-
var TYPOGRAPHY_VARIANT = [
|
|
39
|
-
/**
|
|
40
|
-
* Proportional font (which has the variable amount of horizontal space)
|
|
41
|
-
*
|
|
42
|
-
* It should be the **DEFAULT** variant
|
|
43
|
-
*/
|
|
44
|
-
'proportional',
|
|
45
|
-
/**
|
|
46
|
-
* Monospaced font (which has the same amount of horizontal space)
|
|
47
|
-
*/
|
|
48
|
-
'monospace'];
|
|
49
|
-
|
|
50
|
-
var SPACING = {
|
|
51
|
-
0: 0,
|
|
52
|
-
4: 4,
|
|
53
|
-
8: 8,
|
|
54
|
-
16: 16,
|
|
55
|
-
24: 24,
|
|
56
|
-
40: 40,
|
|
57
|
-
64: 64,
|
|
58
|
-
104: 104,
|
|
59
|
-
168: 168,
|
|
60
|
-
272: 272,
|
|
61
|
-
440: 440
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Unit for grid column (px)
|
|
66
|
-
*/
|
|
67
|
-
var COLUMN_UNIT = 80;
|
|
68
|
-
/**
|
|
69
|
-
* Unit for grid gutter width (px)
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
var GUTTER_UNIT = 24; // TODO: Grid definition with breakpoint
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Calculate px occupied by the span of the columns with gutter gap
|
|
76
|
-
*
|
|
77
|
-
* @param span column span count
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
function columnSystem(span, column, gutter) {
|
|
81
|
-
return span * column + (span - 1) * gutter;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var BORDER_RADIUS = {
|
|
85
|
-
/**
|
|
86
|
-
* 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)
|
|
87
|
-
*/
|
|
88
|
-
none: 0,
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* 用途: バッジ, 高さ40px以下の要素
|
|
92
|
-
*/
|
|
93
|
-
4: 4,
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 用途: サムネイル
|
|
97
|
-
*/
|
|
98
|
-
8: 8,
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* 用途: チュートリアルツールチップ
|
|
102
|
-
*/
|
|
103
|
-
16: 16,
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 用途: モーダル
|
|
107
|
-
*/
|
|
108
|
-
24: 24,
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* 真円 or 左右が丸まっている矩形 を作る時に用いる
|
|
112
|
-
*
|
|
113
|
-
* 用途: ボタン
|
|
114
|
-
*/
|
|
115
|
-
oval: 999999
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
var _BREAKPOINT;
|
|
119
|
-
var HORIZONTAL_MIN_MARGIN = 72;
|
|
120
|
-
var BREAKPOINT = (_BREAKPOINT = {}, _BREAKPOINT[6] = columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT[8] = columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT[10] = columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT[12] = columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2, _BREAKPOINT);
|
|
121
|
-
|
|
122
|
-
export { BORDER_RADIUS, BREAKPOINT, COLUMN_UNIT, GUTTER_UNIT, HORIZONTAL_MIN_MARGIN, SPACING, TYPOGRAPHY_SIZE, TYPOGRAPHY_VARIANT, TYPOGRAPHY_WEIGHT, columnSystem };
|
|
123
|
-
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.js","sources":["../src/typography.ts","../src/spacing.ts","../src/grid.ts","../src/border-radius.ts","../src/breakpoint.ts"],"sourcesContent":["export interface TypographyDescriptor {\n readonly lineHeight: number\n readonly fontSize: number\n}\n\nexport const TYPOGRAPHY_SIZE = {\n 12: {\n fontSize: 12,\n lineHeight: 20,\n },\n 14: {\n fontSize: 14,\n lineHeight: 22,\n },\n 16: {\n fontSize: 16,\n lineHeight: 24,\n },\n 20: {\n fontSize: 20,\n lineHeight: 28,\n },\n 32: {\n fontSize: 32,\n lineHeight: 40,\n },\n} as const\n\nexport const TYPOGRAPHY_WEIGHT = [\n /**\n * Regular font weight\n *\n * <font-weight-absolute> ~ 400\n *\n * It should be the **DEFAULT** weight\n */\n 'regular',\n /**\n * Bolder than `regular` weight\n *\n * <font-weight-absolute> ~ 700\n */\n 'bold',\n] as const\n\nexport const TYPOGRAPHY_VARIANT = [\n /**\n * Proportional font (which has the variable amount of horizontal space)\n *\n * It should be the **DEFAULT** variant\n */\n 'proportional',\n /**\n * Monospaced font (which has the same amount of horizontal space)\n */\n 'monospace',\n] as const\n","export const SPACING = {\n 0: 0,\n 4: 4,\n 8: 8,\n 16: 16,\n 24: 24,\n 40: 40,\n 64: 64,\n 104: 104,\n 168: 168,\n 272: 272,\n 440: 440,\n} as const\n","/**\n * Unit for grid column (px)\n */\nexport const COLUMN_UNIT = 80\n\n/**\n * Unit for grid gutter width (px)\n */\nexport const GUTTER_UNIT = 24\n\n// TODO: Grid definition with breakpoint\n\n/**\n * Calculate px occupied by the span of the columns with gutter gap\n *\n * @param span column span count\n */\nexport function columnSystem(span: number, column: number, gutter: number) {\n return span * column + (span - 1) * gutter\n}\n","export const BORDER_RADIUS = {\n /**\n * 用途: 打ち消し用(モバイルのときに角丸じゃなくなる、などを表現する)\n */\n none: 0,\n /**\n * 用途: バッジ, 高さ40px以下の要素\n */\n 4: 4,\n /**\n * 用途: サムネイル\n */\n 8: 8,\n /**\n * 用途: チュートリアルツールチップ\n */\n 16: 16,\n /**\n * 用途: モーダル\n */\n 24: 24,\n /**\n * 真円 or 左右が丸まっている矩形 を作る時に用いる\n *\n * 用途: ボタン\n */\n oval: 999999,\n} as const\n","import { COLUMN_UNIT, GUTTER_UNIT, columnSystem } from './grid'\n\nexport const HORIZONTAL_MIN_MARGIN = 72\n\nexport const BREAKPOINT = {\n [6]: columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [8]: columnSystem(8, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [10]: columnSystem(10, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n [12]: columnSystem(12, COLUMN_UNIT, GUTTER_UNIT) + HORIZONTAL_MIN_MARGIN * 2,\n} as const\n"],"names":["TYPOGRAPHY_SIZE","fontSize","lineHeight","TYPOGRAPHY_WEIGHT","TYPOGRAPHY_VARIANT","SPACING","COLUMN_UNIT","GUTTER_UNIT","columnSystem","span","column","gutter","BORDER_RADIUS","none","oval","HORIZONTAL_MIN_MARGIN","BREAKPOINT"],"mappings":"AAKO,IAAMA,eAAe,GAAG;EAC7B,EAAI,EAAA;AACFC,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAHe;EAK7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAPe;EAS7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAXe;EAa7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;GAfe;EAiB7B,EAAI,EAAA;AACFD,IAAAA,QAAQ,EAAE,EADR;AAEFC,IAAAA,UAAU,EAAE,EAAA;AAFV,GAAA;AAjByB,EAAxB;AAuBA,IAAMC,iBAAiB,GAAG;AAC/B;;;;;;AAMG;AACH,SAR+B;AAS/B;;;;AAIG;AACH,MAd+B,EAA1B;AAiBA,IAAMC,kBAAkB,GAAG;AAChC;;;;AAIG;AACH,cANgC;AAOhC;;AAEG;AACH,WAVgC;;AC7C3B,IAAMC,OAAO,GAAG;AACrB,EAAA,CAAA,EAAG,CADkB;AAErB,EAAA,CAAA,EAAG,CAFkB;AAGrB,EAAA,CAAA,EAAG,CAHkB;AAIrB,EAAA,EAAA,EAAI,EAJiB;AAKrB,EAAA,EAAA,EAAI,EALiB;AAMrB,EAAA,EAAA,EAAI,EANiB;AAOrB,EAAA,EAAA,EAAI,EAPiB;AAQrB,EAAA,GAAA,EAAK,GARgB;AASrB,EAAA,GAAA,EAAK,GATgB;AAUrB,EAAA,GAAA,EAAK,GAVgB;EAWrB,GAAK,EAAA,GAAA;AAXgB;;ACAvB;;AAEG;AACI,IAAMC,WAAW,GAAG,GAApB;AAEP;;AAEG;;AACUC,IAAAA,WAAW,GAAG;;AAI3B;;;;AAIG;;SACaC,aAAaC,MAAcC,QAAgBC,QAAc;EACvE,OAAOF,IAAI,GAAGC,MAAP,GAAgB,CAACD,IAAI,GAAG,CAAR,IAAaE,MAApC,CAAA;AACD;;ACnBM,IAAMC,aAAa,GAAG;AAC3B;;AAEG;AACHC,EAAAA,IAAI,EAAE,CAJqB;;AAK3B;;AAEG;AACH,EAAA,CAAA,EAAG,CARwB;;AAS3B;;AAEG;AACH,EAAA,CAAA,EAAG,CAZwB;;AAa3B;;AAEG;AACH,EAAA,EAAA,EAAI,EAhBuB;;AAiB3B;;AAEG;AACH,EAAA,EAAA,EAAI,EApBuB;;AAqB3B;;;;AAIG;AACHC,EAAAA,IAAI,EAAE,MAAA;AA1BqB;;;ACEtB,IAAMC,qBAAqB,GAAG,GAA9B;AAEMC,IAAAA,UAAU,IACpB,WAAA,GAAA,EAAA,EAAA,WAAA,CAAA,CADoB,CAChBR,GAAAA,YAAY,CAAC,CAAD,EAAIF,WAAJ,EAAiBC,WAAjB,CAAZ,GAA4CQ,qBAAqB,GAAG,CADpD,EAAA,WAAA,CAEpB,CAFoB,CAAA,GAEhBP,YAAY,CAAC,CAAD,EAAIF,WAAJ,EAAiBC,WAAjB,CAAZ,GAA4CQ,qBAAqB,GAAG,CAFpD,EAAA,WAAA,CAGpB,EAHoB,CAAA,GAGfP,YAAY,CAAC,EAAD,EAAKF,WAAL,EAAkBC,WAAlB,CAAZ,GAA6CQ,qBAAqB,GAAG,CAHtD,EAIpB,WAAA,CAAA,EAJoB,CAIfP,GAAAA,YAAY,CAAC,EAAD,EAAKF,WAAL,EAAkBC,WAAlB,CAAZ,GAA6CQ,qBAAqB,GAAG,CAJtD,EAAhB,WAAA;;;;"}
|