common_component_library_vue 0.1.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 ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "common_component_library_vue",
3
+ "version": "0.1.0",
4
+ "description": "Vue 3 + TypeScript + Vite 通用组件库,视觉规范由 DESIGN.md(Stripe 风格)定义,包含 15 个可复用组件",
5
+ "type": "module",
6
+ "main": "./dist-lib/common-component-library-vue.umd.js",
7
+ "module": "./dist-lib/common-component-library-vue.mjs",
8
+ "types": "./dist-lib/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist-lib/types/index.d.ts",
12
+ "import": "./dist-lib/common-component-library-vue.mjs",
13
+ "require": "./dist-lib/common-component-library-vue.umd.js"
14
+ },
15
+ "./styles/tokens.css": "./src/styles/tokens.css",
16
+ "./styles/base.css": "./src/styles/base.css",
17
+ "./DESIGN.md": "./DESIGN.md",
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "dist-lib",
22
+ "DESIGN.md",
23
+ "src/styles"
24
+ ],
25
+ "keywords": [
26
+ "vue",
27
+ "vue3",
28
+ "typescript",
29
+ "component-library",
30
+ "design-system",
31
+ "design.md",
32
+ "stripe",
33
+ "ui",
34
+ "vite"
35
+ ],
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/mutou101/common_component_library_vue.git"
40
+ },
41
+ "homepage": "https://github.com/mutou101/common_component_library_vue#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/mutou101/common_component_library_vue/issues"
44
+ },
45
+ "sideEffects": [
46
+ "**/*.css",
47
+ "**/tokens.css",
48
+ "**/base.css"
49
+ ],
50
+ "scripts": {
51
+ "dev": "vite",
52
+ "build": "vue-tsc -b && vite build",
53
+ "build:lib": "vue-tsc -b && vite build --config vite.lib.config.ts && vue-tsc -p tsconfig.lib.json",
54
+ "preview": "vite preview",
55
+ "typecheck": "vue-tsc -b --noEmit",
56
+ "prepublishOnly": "npm run build:lib"
57
+ },
58
+ "dependencies": {
59
+ "vue": "^3.5.41"
60
+ },
61
+ "peerDependencies": {
62
+ "vue": "^3.4.0"
63
+ },
64
+ "devDependencies": {
65
+ "@fontsource/inter": "^5.3.0",
66
+ "@types/node": "^24.13.3",
67
+ "@vitejs/plugin-vue": "^6.0.8",
68
+ "@vue/tsconfig": "^0.9.1",
69
+ "typescript": "~6.0.2",
70
+ "vite": "^8.2.2",
71
+ "vue-tsc": "^3.3.11"
72
+ }
73
+ }
@@ -0,0 +1,79 @@
1
+ /* ==========================================================================
2
+ Base styles — Stripe-inspired design language
3
+ ========================================================================== */
4
+
5
+ @import "./tokens.css";
6
+
7
+ *,
8
+ *::before,
9
+ *::after {
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ html {
14
+ -webkit-text-size-adjust: 100%;
15
+ }
16
+
17
+ body {
18
+ margin: 0;
19
+ font-family: var(--cc-font-family);
20
+ font-weight: 300;
21
+ font-size: 15px;
22
+ line-height: 1.4;
23
+ color: var(--cc-ink);
24
+ background-color: var(--cc-canvas);
25
+ /* The brand enables the ss01 stylistic set globally on the body element */
26
+ font-feature-settings: "ss01";
27
+ -webkit-font-smoothing: antialiased;
28
+ -moz-osx-font-smoothing: grayscale;
29
+ }
30
+
31
+ h1,
32
+ h2,
33
+ h3,
34
+ h4,
35
+ h5,
36
+ h6 {
37
+ margin: 0;
38
+ font-weight: 300;
39
+ color: var(--cc-ink);
40
+ }
41
+
42
+ p {
43
+ margin: 0;
44
+ }
45
+
46
+ a {
47
+ color: var(--cc-primary);
48
+ text-decoration: none;
49
+ }
50
+
51
+ a:hover {
52
+ text-decoration: underline;
53
+ }
54
+
55
+ ::selection {
56
+ background-color: var(--cc-ink);
57
+ color: #f2f2f2;
58
+ }
59
+
60
+ /* Numeric / money cells — tabular figures are the brand's quiet financial signal */
61
+ .tnum,
62
+ .tnum * {
63
+ font-feature-settings: "tnum";
64
+ font-variant-numeric: tabular-nums;
65
+ }
66
+
67
+ /* Utility: type roles */
68
+ .cc-text-display-xxl { font-size: 56px; line-height: 1.03; font-weight: 300; letter-spacing: -1.4px; }
69
+ .cc-text-display-xl { font-size: 48px; line-height: 1.15; font-weight: 300; letter-spacing: -0.96px; }
70
+ .cc-text-display-lg { font-size: 32px; line-height: 1.1; font-weight: 300; letter-spacing: -0.64px; }
71
+ .cc-text-display-md { font-size: 26px; line-height: 1.12; font-weight: 300; letter-spacing: -0.26px; }
72
+ .cc-text-heading-lg { font-size: 22px; line-height: 1.1; font-weight: 300; letter-spacing: -0.22px; }
73
+ .cc-text-heading-md { font-size: 20px; line-height: 1.4; font-weight: 300; letter-spacing: -0.2px; }
74
+ .cc-text-heading-sm { font-size: 18px; line-height: 1.4; font-weight: 300; }
75
+ .cc-text-body-lg { font-size: 16px; line-height: 1.4; font-weight: 300; }
76
+ .cc-text-body-md { font-size: 15px; line-height: 1.4; font-weight: 300; }
77
+ .cc-text-caption { font-size: 13px; line-height: 1.4; font-weight: 400; letter-spacing: -0.39px; font-feature-settings: "tnum"; }
78
+ .cc-text-micro { font-size: 11px; line-height: 1.4; font-weight: 300; }
79
+ .cc-text-micro-cap { font-size: 10px; line-height: 1.15; font-weight: 400; letter-spacing: 0.1px; text-transform: uppercase; }
@@ -0,0 +1,104 @@
1
+ /* ==========================================================================
2
+ DESIGN TOKENS — Stripe-inspired design language
3
+ Source: DESIGN.md (root) · extracted from Stripe by VoltAgent/awesome-design-md
4
+ Fonts: Sohne (proprietary) → Inter at weight 300 is the open-source substitute
5
+ ========================================================================== */
6
+
7
+ :root {
8
+ /* ------------------------------------------------------------------ *
9
+ * Colors
10
+ * ------------------------------------------------------------------ */
11
+
12
+ /* Brand & Accent */
13
+ --cc-primary: #533afd; /* {colors.primary} — signature CTA indigo */
14
+ --cc-primary-deep: #4434d4; /* {colors.primary-deep} — gradient mid-stop, press alternative */
15
+ --cc-primary-press: #2e2b8c; /* {colors.primary-press} — pressed state */
16
+ --cc-primary-soft: #665efd; /* {colors.primary-soft} — lighter indigo for accents */
17
+ --cc-primary-subdued: #b9b9f9; /* {colors.primary-bg-subdued-hover} — soft tag fill */
18
+ --cc-brand-dark-900: #1c1e54; /* {colors.brand-dark-900} — deep navy, dark surfaces */
19
+ --cc-ruby: #ea2261; /* {colors.ruby} — gradient accent, never a button */
20
+ --cc-magenta: #f96bee; /* {colors.magenta} — gradient stop */
21
+ --cc-lemon: #9b6829; /* {colors.lemon} — warm sherbet gradient stop */
22
+
23
+ /* Surface */
24
+ --cc-canvas: #ffffff; /* {colors.canvas} — default page background */
25
+ --cc-canvas-soft: #f6f9fc; /* {colors.canvas-soft} — cool off-white feature band */
26
+ --cc-canvas-cream: #f5e9d4; /* {colors.canvas-cream} — warm interlude band */
27
+ --cc-hairline: #e3e8ee; /* {colors.hairline} — 1px card/table borders */
28
+ --cc-hairline-input: #a8c3de; /* {colors.hairline-input} — cooler input border */
29
+
30
+ /* Text */
31
+ --cc-ink: #0d253d; /* {colors.ink} — default body text, deep navy */
32
+ --cc-ink-secondary: #273951; /* {colors.ink-secondary} — secondary text */
33
+ --cc-ink-mute: #64748d; /* {colors.ink-mute} — helper/caption text */
34
+ --cc-ink-mute-2: #61718a; /* {colors.ink-mute-2} — nav text */
35
+ --cc-on-primary: #ffffff; /* {colors.on-primary} — text on indigo/navy */
36
+
37
+ /* Semantic (dashboard-product UI; not part of the marketing palette) */
38
+ --cc-success: #0a9f6e;
39
+ --cc-success-soft: #e3f5ee;
40
+ --cc-warning: #9b6829; /* reuses {colors.lemon} tone */
41
+ --cc-warning-soft: #faf0e0;
42
+ --cc-error: #ea2261; /* reuses {colors.ruby} tone */
43
+ --cc-error-soft: #fde7ef;
44
+ --cc-info: #533afd; /* reuses {colors.primary} */
45
+
46
+ /* Shadows */
47
+ --cc-shadow-blue: #003770; /* {colors.shadow-blue} — shadow tint */
48
+ --cc-shadow-level-1: rgba(0, 55, 112, 0.08) 0 1px 3px;
49
+ --cc-shadow-level-2: rgba(0, 55, 112, 0.08) 0 8px 24px, rgba(0, 55, 112, 0.04) 0 2px 6px;
50
+ --cc-focus-ring: 0 0 0 3px rgba(83, 58, 253, 0.18);
51
+
52
+ /* ------------------------------------------------------------------ *
53
+ * Typography
54
+ * ------------------------------------------------------------------ */
55
+ --cc-font-family: "Inter", "SF Pro Display", system-ui, -apple-system,
56
+ "Segoe UI", sans-serif;
57
+ --cc-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
58
+ monospace;
59
+
60
+ /* Display tier — weight 300, negative tracking is the brand signature */
61
+ --cc-text-display-xxl: 56px / 1.03 300 -1.4px;
62
+ --cc-text-display-xl: 48px / 1.15 300 -0.96px;
63
+ --cc-text-display-lg: 32px / 1.1 300 -0.64px;
64
+ --cc-text-display-md: 26px / 1.12 300 -0.26px;
65
+ --cc-text-heading-lg: 22px / 1.1 300 -0.22px;
66
+ --cc-text-heading-md: 20px / 1.4 300 -0.2px;
67
+ --cc-text-heading-sm: 18px / 1.4 300 0;
68
+ --cc-text-body-lg: 16px / 1.4 300 0;
69
+ --cc-text-body-md: 15px / 1.4 300 0;
70
+ --cc-text-body-tabular: 14px / 1.4 300 -0.42px; /* tnum for money/numerics */
71
+ --cc-text-button-md: 16px / 1 400 0;
72
+ --cc-text-button-sm: 14px / 1 400 0;
73
+ --cc-text-caption: 13px / 1.4 400 -0.39px; /* tnum */
74
+ --cc-text-micro: 11px / 1.4 300 0;
75
+ --cc-text-micro-cap: 10px / 1.15 400 0.1px; /* all-caps eyebrow */
76
+
77
+ /* ------------------------------------------------------------------ *
78
+ * Radius
79
+ * ------------------------------------------------------------------ */
80
+ --cc-radius-xs: 4px;
81
+ --cc-radius-sm: 6px; /* form inputs */
82
+ --cc-radius-md: 8px; /* compact cards, alerts */
83
+ --cc-radius-lg: 12px; /* pricing / feature cards */
84
+ --cc-radius-xl: 16px; /* dashboard chrome */
85
+ --cc-radius-pill: 9999px; /* all buttons, tag pills */
86
+
87
+ /* ------------------------------------------------------------------ *
88
+ * Spacing (base unit 8px)
89
+ * ------------------------------------------------------------------ */
90
+ --cc-space-xxs: 2px;
91
+ --cc-space-xs: 4px;
92
+ --cc-space-sm: 8px;
93
+ --cc-space-md: 12px;
94
+ --cc-space-lg: 16px;
95
+ --cc-space-xl: 24px;
96
+ --cc-space-xxl: 32px;
97
+ --cc-space-huge: 64px;
98
+
99
+ /* ------------------------------------------------------------------ *
100
+ * Layout
101
+ * ------------------------------------------------------------------ */
102
+ --cc-container-max: 1200px;
103
+ --cc-input-height: 40px;
104
+ }