@vialiq/flux-ui 0.0.1 → 0.0.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 +20 -20
- package/_index.scss +3 -1
- package/components/_button.scss +16 -14
- package/components/_index.scss +1 -1
- package/index.d.ts +1 -1
- package/package.json +10 -6
- package/styles/_index.scss +1 -1
- package/styles/index.d.ts +9 -9
- package/styles/index.js +4 -4
package/README.md
CHANGED
|
@@ -18,9 +18,9 @@ A custom, lightweight CSS/SASS framework built for microfrontend architectures.
|
|
|
18
18
|
### NPM
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npm install @
|
|
21
|
+
npm install @vialiq/flux-ui
|
|
22
22
|
# or
|
|
23
|
-
yarn add @
|
|
23
|
+
yarn add @vialiq/flux-ui
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### Monorepo (Local)
|
|
@@ -30,9 +30,9 @@ yarn add @vi/flux-ui
|
|
|
30
30
|
{
|
|
31
31
|
"compilerOptions": {
|
|
32
32
|
"paths": {
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
33
|
+
"@vialiq/flux-ui": ["libs/flux-ui/src/index.ts"],
|
|
34
|
+
"@vialiq/flux-ui/tokens": ["libs/flux-ui/src/tokens/index.ts"],
|
|
35
|
+
"@vialiq/flux-ui/styles": ["libs/flux-ui/src/styles/index.ts"]
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -47,15 +47,15 @@ yarn add @vi/flux-ui
|
|
|
47
47
|
```scss
|
|
48
48
|
// In your app/src/styles.scss (or global style)
|
|
49
49
|
|
|
50
|
-
@use '@
|
|
51
|
-
@use '@
|
|
52
|
-
@use '@
|
|
53
|
-
@use '@
|
|
50
|
+
@use '@vialiq/flux-ui/styles/_variables.scss' as *;
|
|
51
|
+
@use '@vialiq/flux-ui/styles/_reset.scss';
|
|
52
|
+
@use '@vialiq/flux-ui/styles/_layout.scss';
|
|
53
|
+
@use '@vialiq/flux-ui/styles/_utilities.scss';
|
|
54
54
|
|
|
55
55
|
// Now all utilities available:
|
|
56
56
|
// - Classes: .p-md, .text-lg, .bg-primary, .flex, .gap-sm, etc.
|
|
57
57
|
// - Variables: $spacing-md, $color-primary, $font-size-base, etc.
|
|
58
|
-
// - Theming: @use '@
|
|
58
|
+
// - Theming: @use '@vialiq/flux-ui/styles/theme' as theme; then @include theme.vi-theme(theme.$vi-theme--light, $emit-custom-properties: true);
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
**Advantages:**
|
|
@@ -68,8 +68,8 @@ yarn add @vi/flux-ui
|
|
|
68
68
|
**Example Component (Angular):**
|
|
69
69
|
```scss
|
|
70
70
|
// button.component.scss
|
|
71
|
-
@use '@
|
|
72
|
-
@use '@
|
|
71
|
+
@use '@vialiq/flux-ui/styles/variables' as *;
|
|
72
|
+
@use '@vialiq/flux-ui/styles/theme' as theme;
|
|
73
73
|
|
|
74
74
|
:host {
|
|
75
75
|
@include theme.vi-theme(theme.$vi-theme--light, $emit-custom-properties: true);
|
|
@@ -93,7 +93,7 @@ yarn add @vi/flux-ui
|
|
|
93
93
|
|
|
94
94
|
```html
|
|
95
95
|
<!-- In your HTML <head> -->
|
|
96
|
-
<link rel="stylesheet" href="./node_modules/@
|
|
96
|
+
<link rel="stylesheet" href="./node_modules/@vialiq/flux-ui/flux-ui.css">
|
|
97
97
|
|
|
98
98
|
<!-- Now all utilities available via classes -->
|
|
99
99
|
<div class="flex justify-center items-center gap-md p-lg">
|
|
@@ -120,8 +120,8 @@ yarn add @vi/flux-ui
|
|
|
120
120
|
|
|
121
121
|
```typescript
|
|
122
122
|
// In your component file
|
|
123
|
-
import '@
|
|
124
|
-
import { tokens } from '@
|
|
123
|
+
import '@vialiq/flux-ui/flux-ui.css'; // Import pre-compiled CSS
|
|
124
|
+
import { tokens } from '@vialiq/flux-ui'; // Import tokens for JS styling
|
|
125
125
|
|
|
126
126
|
class MyComponent extends LitElement {
|
|
127
127
|
static styles = css`
|
|
@@ -150,7 +150,7 @@ class MyComponent extends LitElement {
|
|
|
150
150
|
## Using Tokens
|
|
151
151
|
|
|
152
152
|
```typescript
|
|
153
|
-
import { tokens } from '@
|
|
153
|
+
import { tokens } from '@vialiq/flux-ui';
|
|
154
154
|
|
|
155
155
|
const buttonStyle = {
|
|
156
156
|
padding: tokens.spacing.md, // 24px
|
|
@@ -216,7 +216,7 @@ Design System (Shared)
|
|
|
216
216
|
|
|
217
217
|
```typescript
|
|
218
218
|
// apps/shell/src/bootstrap.ts
|
|
219
|
-
import '@
|
|
219
|
+
import '@vialiq/flux-ui/flux-ui.css'; // Load once for all MFEs
|
|
220
220
|
|
|
221
221
|
bootstrapApplication(App).catch(err => console.error(err));
|
|
222
222
|
```
|
|
@@ -227,7 +227,7 @@ bootstrapApplication(App).catch(err => console.error(err));
|
|
|
227
227
|
// apps/remote1/src/bootstrap.ts
|
|
228
228
|
// ❌ DO NOT import styles (shell already loaded them)
|
|
229
229
|
|
|
230
|
-
import { tokens } from '@
|
|
230
|
+
import { tokens } from '@vialiq/flux-ui'; // ✅ Import tokens only
|
|
231
231
|
|
|
232
232
|
bootstrapApplication(RemoteEntry).catch(err => console.error(err));
|
|
233
233
|
```
|
|
@@ -237,7 +237,7 @@ bootstrapApplication(RemoteEntry).catch(err => console.error(err));
|
|
|
237
237
|
### TypeScript (Type-Safe)
|
|
238
238
|
|
|
239
239
|
```typescript
|
|
240
|
-
import { tokens } from '@
|
|
240
|
+
import { tokens } from '@vialiq/flux-ui';
|
|
241
241
|
|
|
242
242
|
const value = tokens.spacing.md; // IDE autocomplete, type checking
|
|
243
243
|
```
|
|
@@ -245,7 +245,7 @@ const value = tokens.spacing.md; // IDE autocomplete, type checking
|
|
|
245
245
|
### SCSS (Build-Time)
|
|
246
246
|
|
|
247
247
|
```scss
|
|
248
|
-
@use '@
|
|
248
|
+
@use '@vialiq/flux-ui/styles/variables' as *;
|
|
249
249
|
|
|
250
250
|
.button {
|
|
251
251
|
padding: $spacing-md;
|
package/_index.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Complete flux-ui style import.
|
|
3
3
|
*
|
|
4
|
-
* Usage: @use '@
|
|
4
|
+
* Usage: @use '@vialiq/flux-ui';
|
|
5
5
|
*
|
|
6
6
|
* Forwards all style modules in preferred order:
|
|
7
7
|
* 1. Root (cascade layers)
|
|
@@ -9,5 +9,7 @@
|
|
|
9
9
|
* 3. Theme (design tokens)
|
|
10
10
|
* 4. Layout (structural helpers)
|
|
11
11
|
* 5. Utilities (low-level classes)
|
|
12
|
+
* 6. Components (vi-button, etc.)
|
|
12
13
|
*/
|
|
13
14
|
@forward 'styles';
|
|
15
|
+
@forward 'components';
|
package/components/_button.scss
CHANGED
|
@@ -8,18 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
@use '../styles/variables' as tokens;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
@layer components {
|
|
12
|
+
.button {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
gap: #{tokens.$spacing-xs};
|
|
17
|
+
border: #{tokens.$border-width-thin} solid transparent;
|
|
18
|
+
border-radius: var(--vi-button-shape-border-radius, #{tokens.$border-radius-md});
|
|
19
|
+
padding: var(--vi-button-spacing-padding-block, #{tokens.$spacing-sm}) var(--vi-button-spacing-padding-inline, #{tokens.$spacing-md});
|
|
20
|
+
font-size: var(--vi-button-typography-font-size, #{tokens.$font-size-base});
|
|
21
|
+
font-weight: var(--vi-button-typography-font-weight, #{tokens.$font-weight-semibold});
|
|
22
|
+
line-height: #{tokens.$line-height-tight};
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
user-select: none;
|
|
25
|
+
transition: opacity var(--vi-button-effect-transition-duration, 160ms) ease;
|
|
26
|
+
}
|
|
25
27
|
}
|
package/components/_index.scss
CHANGED
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vialiq/flux-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Custom minimal CSS/SASS framework for microfrontend product",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,17 +8,21 @@
|
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
11
|
+
"default": "./index.js",
|
|
12
12
|
"types": "./index.d.ts"
|
|
13
13
|
},
|
|
14
14
|
"./tokens": {
|
|
15
|
-
"
|
|
15
|
+
"default": "./tokens/index.js",
|
|
16
16
|
"types": "./tokens/index.d.ts"
|
|
17
17
|
},
|
|
18
|
-
"./styles":
|
|
19
|
-
|
|
18
|
+
"./styles": {
|
|
19
|
+
"sass": "./styles/_index.scss",
|
|
20
|
+
"default": "./styles/index.js",
|
|
21
|
+
"types": "./styles/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./styles/*": "./styles/*",
|
|
20
24
|
"./components": "./components/_index.scss",
|
|
21
|
-
"./components/*": "./components
|
|
25
|
+
"./components/*": "./components/*",
|
|
22
26
|
"./flux-ui.css": "./flux-ui.css"
|
|
23
27
|
},
|
|
24
28
|
"files": [
|
package/styles/_index.scss
CHANGED
package/styles/index.d.ts
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
* Flux UI — Styles Entry Point
|
|
3
3
|
* =============================
|
|
4
4
|
*
|
|
5
|
-
* This is a built entry point (@
|
|
5
|
+
* This is a built entry point (@vialiq/flux-ui/styles) that exports the paths
|
|
6
6
|
* to each SCSS partial shipped in the package. Use the paths below in your
|
|
7
7
|
* application's SCSS to import individual layers, or import all at once:
|
|
8
8
|
*
|
|
9
9
|
* In your global styles.scss:
|
|
10
10
|
*
|
|
11
|
-
* @use '@
|
|
12
|
-
* @use '@
|
|
13
|
-
* @use '@
|
|
14
|
-
* @use '@
|
|
11
|
+
* @use '@vialiq/flux-ui/styles/_variables.scss' as *;
|
|
12
|
+
* @use '@vialiq/flux-ui/styles/_reset.scss';
|
|
13
|
+
* @use '@vialiq/flux-ui/styles/_layout.scss';
|
|
14
|
+
* @use '@vialiq/flux-ui/styles/_utilities.scss';
|
|
15
15
|
*
|
|
16
16
|
* Import order matters: variables first (provides CSS custom properties
|
|
17
17
|
* via :root and the @layer order declaration), then reset, layout, utilities.
|
|
18
18
|
*/
|
|
19
19
|
export declare const fluxUiStyles: {
|
|
20
|
-
readonly variables: "@
|
|
21
|
-
readonly reset: "@
|
|
22
|
-
readonly layout: "@
|
|
23
|
-
readonly utilities: "@
|
|
20
|
+
readonly variables: "@vialiq/flux-ui/styles/_variables.scss";
|
|
21
|
+
readonly reset: "@vialiq/flux-ui/styles/_reset.scss";
|
|
22
|
+
readonly layout: "@vialiq/flux-ui/styles/_layout.scss";
|
|
23
|
+
readonly utilities: "@vialiq/flux-ui/styles/_utilities.scss";
|
|
24
24
|
};
|
|
25
25
|
export type FluxUiStyleKey = keyof typeof fluxUiStyles;
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
package/styles/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// libs/flux-ui/src/styles/index.ts
|
|
2
2
|
var fluxUiStyles = {
|
|
3
|
-
variables: "@
|
|
4
|
-
reset: "@
|
|
5
|
-
layout: "@
|
|
6
|
-
utilities: "@
|
|
3
|
+
variables: "@vialiq/flux-ui/styles/_variables.scss",
|
|
4
|
+
reset: "@vialiq/flux-ui/styles/_reset.scss",
|
|
5
|
+
layout: "@vialiq/flux-ui/styles/_layout.scss",
|
|
6
|
+
utilities: "@vialiq/flux-ui/styles/_utilities.scss"
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
fluxUiStyles
|