@ng-solid/design-system 22.1.1 → 22.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,8 +1,8 @@
1
1
  {
2
2
  "name": "@ng-solid/design-system",
3
- "version": "22.1.1",
3
+ "version": "22.2.0",
4
4
  "license": "MIT",
5
- "description": "An Angular UI component library based on Ant Design.",
5
+ "description": "Arvisfy, the token-driven Angular design system for ng-solid.",
6
6
  "author": "Ulises Familia Rodríguez <chicromedia@hotmail.com>",
7
7
  "repository": {
8
8
  "type": "git",
@@ -15,30 +15,38 @@
15
15
  "@angular/platform-browser": "^21.0.0",
16
16
  "@angular/router": "^21.0.0",
17
17
  "@angular/core": "^21.0.0",
18
- "@ng-solid/icons": "^22.0.5"
18
+ "@ng-solid/icons": "^22.0.5",
19
+ "tailwindcss": "^4.0.0"
20
+ },
21
+ "peerDependenciesMeta": {
22
+ "tailwindcss": {
23
+ "optional": true
24
+ }
19
25
  },
20
26
  "dependencies": {
21
27
  "@ng-solid/core": "^22.0.4",
22
- "@internationalized/date": "~3.8.1",
28
+ "@internationalized/date": "~3.12.3",
23
29
  "@internationalized/number": "~3.6.2",
24
30
  "tslib": "^2.3.0"
25
31
  },
26
32
  "keywords": [
27
33
  "@ng-solid",
28
34
  "angular",
29
- "ant-design",
35
+ "tailwindcss",
36
+ "design-system",
30
37
  "components",
31
38
  "ui",
32
39
  "frontend"
33
40
  ],
34
- "sideEffects": false,
35
- "engines": {
36
- "node": ">=20.0.0",
37
- "pnpm": ">=11.22.0"
38
- },
39
- "module": "fesm2022/ng-solid-design-system.mjs",
40
- "typings": "types/ng-solid-design-system.d.ts",
41
41
  "exports": {
42
+ "./themes": {
43
+ "sass": "./themes/index.scss",
44
+ "default": "./themes/index.scss"
45
+ },
46
+ "./themes/tailwind.css": {
47
+ "style": "./themes/tailwind.css",
48
+ "default": "./themes/tailwind.css"
49
+ },
42
50
  "./package.json": {
43
51
  "default": "./package.json"
44
52
  },
@@ -47,5 +55,12 @@
47
55
  "default": "./fesm2022/ng-solid-design-system.mjs"
48
56
  }
49
57
  },
58
+ "sideEffects": false,
59
+ "engines": {
60
+ "node": ">=20.0.0",
61
+ "pnpm": ">=11.22.0"
62
+ },
63
+ "module": "fesm2022/ng-solid-design-system.mjs",
64
+ "typings": "types/ng-solid-design-system.d.ts",
50
65
  "type": "module"
51
66
  }
@@ -0,0 +1,75 @@
1
+ # Arvisfy theme
2
+
3
+ Arvisfy is the default ng-solid preset. Its visual language is energetic and
4
+ precise: Klein blue (`#0052ff`) identifies primary actions, while restrained
5
+ neutral surfaces preserve clarity in both light and dark color schemes.
6
+
7
+ ## Design principles
8
+
9
+ - **Clarity:** hierarchy and state must be understandable before decoration.
10
+ - **Consistency:** repeated decisions belong to tokens, not component rules.
11
+ - **Accessibility:** contrast, focus and reduced motion are foundation-level
12
+ contracts.
13
+ - **Composition:** components expose stable APIs and remain visually coherent
14
+ when combined.
15
+ - **Adaptability:** themes may change values without duplicating component CSS.
16
+
17
+ ## Three-tier token architecture
18
+
19
+ 1. `primitive` tokens contain the only raw CSS values.
20
+ 2. `semantic` tokens reference primitives and describe intent for each color
21
+ scheme.
22
+ 3. `components` tokens reference semantic tokens and are the only variables
23
+ consumed by component styles.
24
+
25
+ Applications configure the preset through Angular:
26
+
27
+ ```ts
28
+ import { Arvisfy, provideNsTheme } from '@ng-solid/design-system';
29
+
30
+ export const appConfig = {
31
+ providers: [provideNsTheme({ preset: Arvisfy, colorScheme: 'system' })]
32
+ };
33
+ ```
34
+
35
+ Use `NsThemeService.setScheme('light' | 'dark' | 'system')` for live changes.
36
+ Explicit choices are persisted; `system` delegates to
37
+ `prefers-color-scheme`.
38
+
39
+ Create a compatible preset by extending Arvisfy instead of copying it:
40
+
41
+ ```ts
42
+ import { Arvisfy, defineNsPreset } from '@ng-solid/design-system';
43
+
44
+ export const ProductTheme = defineNsPreset(Arvisfy, {
45
+ name: 'product',
46
+ primitive: {
47
+ color: {
48
+ klein: { 500: '#0052ff' }
49
+ }
50
+ }
51
+ });
52
+ ```
53
+
54
+ Tailwind utilities are composed from SCSS, never placed in ng-solid component
55
+ templates. Consumers that want the same semantic utility bridge may import
56
+ `@ng-solid/design-system/themes/tailwind.css` after Tailwind.
57
+
58
+ Every component stylesheet starts with `@reference` to that bridge and reads
59
+ only `--ns-component-*` variables for component-specific visual decisions.
60
+
61
+ ## HeroUI foundations
62
+
63
+ Arvisfy vendors Inter Variable in `theme/fonts/InterVariable.woff2` (with its
64
+ OFL license) and registers it locally from `tailwind.css`; no runtime font
65
+ request is required. The primary contract is intentionally narrow: only the
66
+ Klein primary `#0052ff` scale identifies primary actions. Neutral, status,
67
+ content-layer, radius, shadow and motion values come from the preset and are
68
+ not substitutes for additional product primary colors.
69
+
70
+ The visual variants map consistently to HeroUI language: `solid` keeps the
71
+ action fill, `soft` maps to `flat`, `outline` maps to `bordered`, and `ghost`
72
+ maps to `light`. Components own their state tokens (for example
73
+ `--ns-component-slider-*` and `--ns-component-input-search-*`) rather than
74
+ borrowing another component's variables; use the matching family when adding
75
+ a visual decision.
Binary file
@@ -0,0 +1,92 @@
1
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font creation
14
+ efforts of academic and linguistic communities, and to provide a free and
15
+ open framework in which fonts may be shared and improved in partnership
16
+ with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The
20
+ fonts, including any derivative works, can be bundled, embedded,
21
+ redistributed and/or sold with any software provided that any reserved
22
+ names are not used by derivative works. The fonts and derivatives,
23
+ however, cannot be released under any other type of license. The
24
+ requirement for fonts to remain under this license does not apply
25
+ to any document created using the fonts or their derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may
30
+ include source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software components as
36
+ distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to, deleting,
39
+ or substituting -- in part or in whole -- any of the components of the
40
+ Original Version, by changing formats or by porting the Font Software to a
41
+ new environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical
44
+ writer or other person who contributed to the Font Software.
45
+
46
+ PERMISSION AND CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
49
+ redistribute, and sell modified and unmodified copies of the Font
50
+ Software, subject to the following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components,
53
+ in Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy
57
+ contains the above copyright notice and this license. These can be
58
+ included either as stand-alone text files, human-readable headers or
59
+ in the appropriate machine-readable metadata fields within text or
60
+ binary files as long as those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font
63
+ Name(s) unless explicit written permission is granted by the corresponding
64
+ Copyright Holder. This restriction only applies to the primary font name as
65
+ presented to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any
69
+ Modified Version, except to acknowledge the contribution(s) of the
70
+ Copyright Holder(s) and the Author(s) or with their explicit written
71
+ permission.
72
+
73
+ 5) The Font Software, modified or unmodified, in part or in whole,
74
+ must be distributed entirely under this license, and must not be
75
+ distributed under any other license. The requirement for fonts to
76
+ remain under this license does not apply to any document created
77
+ using the Font Software.
78
+
79
+ TERMINATION
80
+ This license becomes null and void if any of the above conditions are
81
+ not met.
82
+
83
+ DISCLAIMER
84
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
86
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
87
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
88
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
90
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
91
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
92
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -0,0 +1 @@
1
+ @import './tailwind.css';
@@ -0,0 +1,87 @@
1
+ @font-face {
2
+ font-family: 'Inter Variable';
3
+ font-style: normal;
4
+ font-weight: 100 900;
5
+ font-display: swap;
6
+ src: url('./fonts/InterVariable.woff2') format('woff2');
7
+ }
8
+
9
+ @font-face {
10
+ font-family: 'Roboto';
11
+ font-style: normal;
12
+ font-weight: 500 700;
13
+ font-display: swap;
14
+ src: url('./fonts/Roboto-Variable.ttf') format('truetype');
15
+ }
16
+
17
+ @theme inline {
18
+ --spacing: var(--ns-primitive-space-1);
19
+ --breakpoint-md: 48rem;
20
+ --container-2xl: 42rem;
21
+ --container-3xl: 48rem;
22
+ --container-4xl: 56rem;
23
+ --container-6xl: 72rem;
24
+ --text-xs: var(--ns-semantic-common-text-xs);
25
+ --text-sm: var(--ns-semantic-common-text-sm);
26
+ --text-lg: var(--ns-semantic-common-text-lg);
27
+ --text-xl: var(--ns-primitive-font-size-xl);
28
+ --text-2xl: 1.5rem;
29
+ --text-4xl: 2.25rem;
30
+ --text-5xl: 3rem;
31
+ --text-7xl: 4.5rem;
32
+ --font-sans: var(--ns-semantic-common-font-body);
33
+ --font-weight-semibold: var(--ns-semantic-common-font-weight-semibold);
34
+ --font-weight-bold: var(--ns-semantic-common-font-weight-bold);
35
+ --leading-tight: var(--ns-semantic-common-line-height-compact);
36
+ --leading-relaxed: 1.625;
37
+ --tracking-tight: -0.025em;
38
+ --tracking-widest: 0.1em;
39
+ --color-ns-background: var(--ns-semantic-color-background);
40
+ --color-ns-surface: var(--ns-semantic-color-surface);
41
+ --color-ns-surface-muted: var(--ns-semantic-color-surface-muted);
42
+ --color-ns-surface-emphasis: var(--ns-semantic-color-surface-emphasis);
43
+ --color-ns-text: var(--ns-semantic-color-text);
44
+ --color-ns-text-muted: var(--ns-semantic-color-text-muted);
45
+ --color-ns-border: var(--ns-semantic-color-border);
46
+ --color-ns-primary: var(--ns-semantic-color-primary);
47
+ --color-ns-primary-hover: var(--ns-semantic-color-primary-hover);
48
+ --color-ns-primary-foreground: var(--ns-semantic-color-primary-foreground);
49
+ --color-ns-success: var(--ns-semantic-status-success);
50
+ --color-ns-warning: var(--ns-semantic-status-warning);
51
+ --color-ns-danger: var(--ns-semantic-status-danger);
52
+ --font-ns-body: var(--ns-semantic-common-font-body);
53
+ --font-ns-display: var(--ns-semantic-common-font-display);
54
+ --font-ns-code: var(--ns-semantic-common-font-code);
55
+ --radius-ns-control: var(--ns-semantic-common-radius-control);
56
+ --radius-ns-surface: var(--ns-semantic-common-radius-surface);
57
+ --radius-ns-overlay: var(--ns-semantic-common-radius-overlay);
58
+ --shadow-ns-subtle: var(--ns-semantic-shadow-subtle);
59
+ --shadow-ns-overlay: var(--ns-semantic-shadow-overlay);
60
+ --shadow-ns-focus: var(--ns-semantic-shadow-focus);
61
+ --ease-ns-standard: var(--ns-semantic-common-motion-easing);
62
+ }
63
+
64
+ @media (prefers-reduced-motion: reduce) {
65
+ :root {
66
+ --ns-semantic-motion-fast: 0ms !important;
67
+ --ns-semantic-motion-enter: 0ms !important;
68
+ --ns-semantic-motion-exit: 0ms !important;
69
+ --ns-semantic-motion-normal: 0ms !important;
70
+ --ns-semantic-motion-slow: 0ms !important;
71
+ --ns-semantic-motion-indeterminate: 0ms !important;
72
+ --ns-semantic-motion-shimmer: 0ms !important;
73
+ --ns-semantic-motion-easing: linear !important;
74
+ --ns-semantic-motion-toast-hidden: none !important;
75
+ --ns-semantic-motion-toast-visible: none !important;
76
+ --ns-semantic-common-motion-fast: 0ms !important;
77
+ --ns-semantic-common-motion-enter: 0ms !important;
78
+ --ns-semantic-common-motion-exit: 0ms !important;
79
+ --ns-semantic-common-motion-normal: 0ms !important;
80
+ --ns-semantic-common-motion-slow: 0ms !important;
81
+ --ns-semantic-common-motion-indeterminate: 0ms !important;
82
+ --ns-semantic-common-motion-shimmer: 0ms !important;
83
+ --ns-semantic-common-motion-easing: linear !important;
84
+ --ns-semantic-common-motion-toast-hidden: none !important;
85
+ --ns-semantic-common-motion-toast-visible: none !important;
86
+ }
87
+ }