@flitsmeister/design-system 2.2.0 → 2.2.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.
Files changed (2) hide show
  1. package/README.md +43 -37
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -1,60 +1,66 @@
1
+
1
2
  # Flitsmeister Design System
2
3
 
3
- ## Consuming the Design System CSS in Other Projects
4
+ This project serves two main purposes:
4
5
 
5
- To use the design system's CSS in your project, import the bundled CSS file from the package:
6
+ 1. **Dev Docs Site**: A documentation and demo site for developing and previewing the design system.
7
+ 2. **Library Use**: A consumable library of Vue components and design tokens for use in other projects.
6
8
 
7
- ```js
8
- import '@flitsmeister/design-system/main.css';
9
- ```
9
+ ---
10
10
 
11
- This will include all design tokens, Tailwind utilities, and custom styles. Ensure your build system supports PostCSS or standard CSS imports.
11
+ ## Consuming the Design System as a Library
12
12
 
13
- If you use a framework like Vue, React, or Next.js, you can add this import in your main entry file (e.g., `main.js`, `index.js`, or `_app.js`).
13
+ ### 1. Using Design Tokens (CSS)
14
14
 
15
- ---
16
- Contains support for Flitsmeister design system colors, typography, buttons, icons and input
17
15
 
16
+ Design tokens are exported as platform-specific files in `tokens/schema_exports/`. For easier consumption, the package maps these files to the `themes/` export path (see the `exports` field in `package.json`).
18
17
 
19
- ## Automated Design Token Export Workflow
18
+ **How to import CSS tokens:**
20
19
 
21
- This repo uses a robust, automated workflow to manage design tokens exported from Figma and generate platform-specific outputs (CSS, iOS JSON, Android XML, etc.) with full reference resolution.
20
+ - Choose the appropriate CSS file for your schema (e.g., `fm-design-system.css`) and import it using the `themes/` alias:
22
21
 
23
- ### 1. Source of Truth
22
+ ```js
23
+ import '@flitsmeister/design-system/themes/fm-design-system/fm-design-system.css';
24
+ ```
24
25
 
25
- - All design tokens are exported from Figma as JSON and stored in `tokens/schema_sourcefiles/`.
26
- - Each schema (e.g., `fm-design-system.json`, `safedrive.json`) is a complete, reference-rich token set.
26
+ - This will provide all color, spacing, and other design tokens as CSS custom properties. You can use these variables directly in your own CSS or with Tailwind.
27
27
 
28
- ### 2. Automated Exports
29
28
 
30
- - The main export script is `tokens/scripts/export-tokens.js`.
31
- - This script:
32
- - Loads all schemas from `tokens/schema_sourcefiles/`.
33
- - Resolves all references (including cross-schema and nested references) using a global lookup.
34
- - Outputs platform-specific files to `tokens/schema_exports/{schema}/`:
35
- - CSS variables for Tailwind 4 and SCSS
36
- - iOS JSON tokens
37
- - Android XML tokens
29
+ ### 2. Using Vue Components
38
30
 
39
- - All exports are fully resolved and ready for direct use in their respective platforms.
31
+ You can import individual Vue components directly from the package:
40
32
 
41
- ### 3. Schema Index & Documentation
33
+ ```js
34
+ import { fmxButton, fmxInput } from "@flitsmeister/design-system";
35
+ ```
42
36
 
43
- - A build-time script (`tokens/scripts/generate-schemas-data.js`) scans all available schemas and their exports.
44
- - It generates `web/static/schemas.data.json`, which powers the `/schemas` page in the app.
45
- - This page lists all schemas, their source JSON, and all available export formats with direct download links.
37
+ These are standard Vue 3 single-file components. Register and use them in your app as you would any other Vue component.
46
38
 
47
- ### 4. Static File Serving
39
+ ### 3. Using Icons
48
40
 
49
- - Both schema sourcefiles and exports are served as static files at:
50
- - `/tokens/schema_sourcefiles/{schema}.json`
51
- - `/tokens/schema_exports/{schema}/{exportfile}`
41
+ SVG icon files are available via the `icons/` export path. You can import any icon directly:
52
42
 
53
- - This works in both development and production, so you can always download the latest tokens and exports.
43
+ ```js
44
+ import iconCar from '@flitsmeister/design-system/icons/filled/car.svg';
45
+ ```
46
+
47
+ You can also reference icons by their path for use in `<img>`, `<svg>`, or as assets in your build system.
48
+
49
+ > **Browse all available icons and their names at:** [https://fmdx.netlify.app/icons](https://fmdx.netlify.app/icons)
50
+
51
+ ---
52
+
53
+ ## About the Design System
54
54
 
55
- ### 5. Best Practices
55
+ - Provides Flitsmeister design system colors, typography, buttons, icons, and input components.
56
+ - Design tokens are managed and exported from Figma, with automated scripts generating platform-specific outputs (CSS, iOS JSON, Android XML, etc.).
57
+ - See the `/tokens/schema_exports/` directory for all available exports.
58
+
59
+ ## Automated Design Token Export Workflow
56
60
 
57
- - Never edit generated files by hand.
58
- - Always update the Figma export and re-run the export script to propagate changes.
59
- - Use the `/schemas` page to browse, verify, and download all token files.
61
+ 1. **Source of Truth**: All design tokens are exported from Figma as JSON and stored in `tokens/schema_sourcefiles/`.
62
+ 2. **Automated Exports**: Run `tokens/scripts/export-tokens.js` to generate fully resolved, platform-specific files in `tokens/schema_exports/{schema}/`.
63
+ 3. **Schema Index & Documentation**: The `/schemas` page in the dev site lists all schemas and export formats with download links.
64
+ 4. **Static File Serving**: All schema sourcefiles and exports are served as static files for easy download and integration.
65
+ 5. **Best Practices**: Never edit generated files by hand. Always update the Figma export and re-run the export script to propagate changes.
60
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flitsmeister/design-system",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Flitsmeister design system and demo site",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -8,7 +8,9 @@
8
8
  "./fmxInput": "./web/components/fmxInput.vue",
9
9
  "./fmxButton": "./web/components/fmxButton.vue",
10
10
  "./main.css": "./dist-lib/main.css",
11
- "./themes/*": "./tokens/schema_exports/*"
11
+ "./themes/*": "./tokens/schema_exports/*",
12
+ "./components/*": "./web/components/*",
13
+ "./icons/*": "./web/icons/*"
12
14
  },
13
15
  "scripts": {
14
16
  "dev": "vite",