@unofficialbox/box-open-elements 0.1.0 → 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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@unofficialbox/box-open-elements",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Box Open Elements: an open, framework-agnostic design system and web component library for Box-style experiences",
5
5
  "license": "MIT",
6
- "homepage": "https://components.unofficialbox.dev",
6
+ "homepage": "https://unofficialbox.github.io/box-open-elements",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/unofficialbox/box-open-elements.git"
@@ -1,2 +0,0 @@
1
- export { boeFontFamily, boeType, boeTypeStyles, boeTypographyHostDeclaration, } from "./tokens.js";
2
- export type { BoeTypeRole } from "./tokens.js";
@@ -1 +0,0 @@
1
- export { boeFontFamily, boeType, boeTypeStyles, boeTypographyHostDeclaration, } from "./tokens.js";
@@ -1,76 +0,0 @@
1
- /** Authoritative modern Box typography stack. Lato belongs to legacy BUE only. */
2
- export declare const boeFontFamily: {
3
- readonly base: "var(--boe-token-font-family-base, InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif)";
4
- readonly fallback: "InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif";
5
- };
6
- export interface BoeTypeRole {
7
- fontSize: string;
8
- fontWeight: 400 | 500 | 600 | 700;
9
- letterSpacing: string;
10
- lineHeight: string;
11
- }
12
- /** Product type roles derived from the current Box measurements in the visual reference contract. */
13
- export declare const boeType: {
14
- readonly pageHeading: {
15
- readonly fontSize: "21px";
16
- readonly lineHeight: "32px";
17
- readonly fontWeight: 700;
18
- readonly letterSpacing: "-0.01em";
19
- };
20
- readonly dialogHeading: {
21
- readonly fontSize: "19px";
22
- readonly lineHeight: "24px";
23
- readonly fontWeight: 700;
24
- readonly letterSpacing: "-0.005em";
25
- };
26
- readonly sectionHeading: {
27
- readonly fontSize: "16px";
28
- readonly lineHeight: "24px";
29
- readonly fontWeight: 700;
30
- readonly letterSpacing: "0";
31
- };
32
- readonly button: {
33
- readonly fontSize: "16px";
34
- readonly lineHeight: "24px";
35
- readonly fontWeight: 700;
36
- readonly letterSpacing: "0";
37
- };
38
- readonly menuItem: {
39
- readonly fontSize: "15px";
40
- readonly lineHeight: "20px";
41
- readonly fontWeight: 400;
42
- readonly letterSpacing: "0";
43
- };
44
- readonly body: {
45
- readonly fontSize: "14px";
46
- readonly lineHeight: "20px";
47
- readonly fontWeight: 400;
48
- readonly letterSpacing: "0";
49
- };
50
- readonly bodyStrong: {
51
- readonly fontSize: "14px";
52
- readonly lineHeight: "20px";
53
- readonly fontWeight: 600;
54
- readonly letterSpacing: "0";
55
- };
56
- readonly label: {
57
- readonly fontSize: "13px";
58
- readonly lineHeight: "20px";
59
- readonly fontWeight: 600;
60
- readonly letterSpacing: "0";
61
- };
62
- readonly metadata: {
63
- readonly fontSize: "12px";
64
- readonly lineHeight: "16px";
65
- readonly fontWeight: 400;
66
- readonly letterSpacing: "0";
67
- };
68
- readonly caption: {
69
- readonly fontSize: "11px";
70
- readonly lineHeight: "16px";
71
- readonly fontWeight: 600;
72
- readonly letterSpacing: "0";
73
- };
74
- };
75
- export declare const boeTypographyHostDeclaration: string;
76
- export declare const boeTypeStyles: (selector: string, role: BoeTypeRole) => string;
@@ -1,27 +0,0 @@
1
- /** Authoritative modern Box typography stack. Lato belongs to legacy BUE only. */
2
- export const boeFontFamily = {
3
- base: "var(--boe-token-font-family-base, InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif)",
4
- fallback: "InterVariable, Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",
5
- };
6
- /** Product type roles derived from the current Box measurements in the visual reference contract. */
7
- export const boeType = {
8
- pageHeading: { fontSize: "21px", lineHeight: "32px", fontWeight: 700, letterSpacing: "-0.01em" },
9
- dialogHeading: { fontSize: "19px", lineHeight: "24px", fontWeight: 700, letterSpacing: "-0.005em" },
10
- sectionHeading: { fontSize: "16px", lineHeight: "24px", fontWeight: 700, letterSpacing: "0" },
11
- button: { fontSize: "16px", lineHeight: "24px", fontWeight: 700, letterSpacing: "0" },
12
- menuItem: { fontSize: "15px", lineHeight: "20px", fontWeight: 400, letterSpacing: "0" },
13
- body: { fontSize: "14px", lineHeight: "20px", fontWeight: 400, letterSpacing: "0" },
14
- bodyStrong: { fontSize: "14px", lineHeight: "20px", fontWeight: 600, letterSpacing: "0" },
15
- label: { fontSize: "13px", lineHeight: "20px", fontWeight: 600, letterSpacing: "0" },
16
- metadata: { fontSize: "12px", lineHeight: "16px", fontWeight: 400, letterSpacing: "0" },
17
- caption: { fontSize: "11px", lineHeight: "16px", fontWeight: 600, letterSpacing: "0" },
18
- };
19
- export const boeTypographyHostDeclaration = `font-family: ${boeFontFamily.base};`;
20
- export const boeTypeStyles = (selector, role) => `
21
- ${selector} {
22
- font-size: ${role.fontSize};
23
- line-height: ${role.lineHeight};
24
- font-weight: ${role.fontWeight};
25
- letter-spacing: ${role.letterSpacing};
26
- }
27
- `;