@hug/hospitality 0.0.4-alpha.10 → 0.0.4-alpha.14
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/.editorconfig +18 -0
- package/.eslintignore +47 -0
- package/.eslintrc.json +6 -0
- package/.github/ISSUE_TEMPLATE/1-bug-report.yml +57 -0
- package/.github/ISSUE_TEMPLATE/2-feature-request.yml +26 -0
- package/.github/ISSUE_TEMPLATE/3-doc-issue.yml +26 -0
- package/.github/workflows/ci_release.yml +17 -0
- package/.husky/commit-msg +3 -0
- package/.husky/pre-commit +17 -0
- package/.vscode/extensions.json +6 -0
- package/.vscode/settings.json +33 -0
- package/CODE_OF_CONDUCT.md +135 -0
- package/CONTRIBUTING.md +289 -0
- package/DEVELOPER.md +37 -0
- package/index.ts +1 -0
- package/material/button/button.scss +237 -0
- package/material/core/directives/components-styling.directive.ts +20 -0
- package/material/core/index.ts +1 -0
- package/material/core/ng-package.json +7 -0
- package/{src/components/form-field/form-field.provider.mjs → material/form-field/form-field.provider.ts} +2 -1
- package/{src/components → material}/form-field/form-field.scss +4 -4
- package/material/form-field/index.ts +1 -0
- package/material/form-field/ng-package.json +7 -0
- package/material/theme/theme.scss +69 -0
- package/material/theme/utils.scss +10 -0
- package/ng-package.json +10 -0
- package/package.json +37 -28
- package/tokens/index.ts +38 -0
- package/tokens/ng-package.json +7 -0
- package/{src/tokens → tokens}/tokens.css +129 -100
- package/tsconfig.json +16 -0
- package/src/components/form-field/form-field.provider.d.ts +0 -3
- package/src/material/theme/theme.scss +0 -65
- package/src/tokens/index.d.ts +0 -14
- package/src/tokens/index.mjs +0 -3
- /package/{src/components → material}/dialog/dialog.scss +0 -0
- /package/{src/tokens → tokens}/tokens.json +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use "@angular/material" as mat;
|
|
2
|
+
@use "./utils" as map;
|
|
3
|
+
|
|
4
|
+
$override-colors: (
|
|
5
|
+
primary: var(--hy-color-primary),
|
|
6
|
+
on-primary: var(--hy-color-on-primary),
|
|
7
|
+
primary-container: var(--hy-color-primary-container),
|
|
8
|
+
on-primary-container: var(--hy-color-on-primary-container),
|
|
9
|
+
primary-fixed: var(--hy-color-primary-fixed),
|
|
10
|
+
primary-fixed-dim: var(--hy-color-primary-fixed-dim),
|
|
11
|
+
on-primary-fixed: var(--hy-color-primary-fixed),
|
|
12
|
+
on-primary-fixed-variant: var(--hy-color-primary-fixed-variant),
|
|
13
|
+
secondary: var(--hy-color-secondary),
|
|
14
|
+
on-secondary: var(--hy-color-on-secondary),
|
|
15
|
+
secondary-container: var(--hy-color-secondary-container),
|
|
16
|
+
on-secondary-conmtainer: var(--hy-color-on-secondary-container),
|
|
17
|
+
secondary-fixed: var(--hy-color-secondary-fixed),
|
|
18
|
+
secondary-fixed-dim: var(--hy-color-secondary-fixed-dim),
|
|
19
|
+
on-secondary-fixed: var(--hy-color-secondary-fixed),
|
|
20
|
+
on-secondary-fixed-variant: var(--hy-color-secondary-fixed-variant),
|
|
21
|
+
tertiary: var(--hy-color-tertiary),
|
|
22
|
+
on-tertiary: var(--hy-color-on-tertiary),
|
|
23
|
+
tertiary-container: var(--hy-color-tertiary-container),
|
|
24
|
+
on-tertiary-conmtainer: var(--hy-color-on-tertiary-container),
|
|
25
|
+
tertiary-fixed: var(--hy-color-tertiary-fixed),
|
|
26
|
+
tertiary-fixed-dim: var(--hy-color-tertiary-fixed-dim),
|
|
27
|
+
on-tertiary-fixed: var(--hy-color-tertiary-fixed),
|
|
28
|
+
on-tertiary-fixed-variant: var(--hy-color-tertiary-fixed-variant),
|
|
29
|
+
error: var(--hy-color-error),
|
|
30
|
+
on-error: var(--hy-color-on-error),
|
|
31
|
+
error-container: var(--hy-color-error-container),
|
|
32
|
+
on-error-conmtainer: var(--hy-color-on-error-container),
|
|
33
|
+
surface: var(--hy-color-surface),
|
|
34
|
+
surface-dim: var(--hy-color-surface-dim),
|
|
35
|
+
surface-bright: var(--hy-color-surface-bright),
|
|
36
|
+
surface-container-lowest: var(--hy-color-surface-container-lowest),
|
|
37
|
+
surface-container-low: var(--hy-color-surface-container-low),
|
|
38
|
+
surface-container: var(--hy-color-surface-container),
|
|
39
|
+
surface-container-high: var(--hy-color-surface-container-high),
|
|
40
|
+
surface-container-highest: var(--hy-color-surface-container-highest),
|
|
41
|
+
on-surface: var(--hy-color-on-surface),
|
|
42
|
+
on-surface-variant: var(--hy-color-on-surface-variant),
|
|
43
|
+
ouline: var(--hy-color-outline),
|
|
44
|
+
ouline-variant: var(--hy-color-outline-variant),
|
|
45
|
+
inverse-surface: var(--hy-color-inverse-surface),
|
|
46
|
+
inverse-on-surface: var(--hy-color-inverse-on-surface),
|
|
47
|
+
inverse-primary: var(--hy-color-inverse-primary),
|
|
48
|
+
background: var(--hy-color-background),
|
|
49
|
+
on-background: var(--hy-color-on-background),
|
|
50
|
+
scrim: var(--hy-color-scrim),
|
|
51
|
+
shadow: var(--hy-color-shadow),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
$override-typography: ();
|
|
55
|
+
|
|
56
|
+
$override-density: ();
|
|
57
|
+
|
|
58
|
+
$overrides: map.merge-all($override-colors, $override-typography);
|
|
59
|
+
|
|
60
|
+
@mixin theme {
|
|
61
|
+
@include mat.theme(
|
|
62
|
+
(
|
|
63
|
+
color: (),
|
|
64
|
+
typography: Roboto,
|
|
65
|
+
density: 0,
|
|
66
|
+
),
|
|
67
|
+
$overrides
|
|
68
|
+
);
|
|
69
|
+
}
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hug/hospitality",
|
|
3
|
-
"version": "0.0.4-alpha.
|
|
3
|
+
"version": "0.0.4-alpha.14",
|
|
4
4
|
"description": "Hospitality Design System",
|
|
5
5
|
"homepage": "https://github.com/dsi-hug/hospitality",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
@@ -16,26 +16,6 @@
|
|
|
16
16
|
"access": "public",
|
|
17
17
|
"tag": "latest"
|
|
18
18
|
},
|
|
19
|
-
"exports": {
|
|
20
|
-
"./tokens": {
|
|
21
|
-
"require": "./src/tokens/index.mjs",
|
|
22
|
-
"types": "./src/tokens/index.d.ts",
|
|
23
|
-
"default": "./src/tokens/tokens.css"
|
|
24
|
-
},
|
|
25
|
-
"./material/theme": "./src/material/theme/theme.scss",
|
|
26
|
-
"./package.json": "./package.json",
|
|
27
|
-
"./form-field": "./src/components/form-field/form-field.scss",
|
|
28
|
-
"./form-field/provider": {
|
|
29
|
-
"types": "./src/components/form-field/form-field.provider.d.ts",
|
|
30
|
-
"default": "./src/components/form-field/form-field.provider.mjs"
|
|
31
|
-
},
|
|
32
|
-
"./dialog": "./src/components/dialog/dialog.scss"
|
|
33
|
-
},
|
|
34
|
-
"files": [
|
|
35
|
-
"README.md",
|
|
36
|
-
"LICENSE",
|
|
37
|
-
"src/"
|
|
38
|
-
],
|
|
39
19
|
"keywords": [
|
|
40
20
|
"TODO:"
|
|
41
21
|
],
|
|
@@ -44,17 +24,46 @@
|
|
|
44
24
|
"prepare": "husky || true",
|
|
45
25
|
"lint": "eslint . --fix",
|
|
46
26
|
"lint:ci": "eslint .",
|
|
27
|
+
"build": "ng-packagr -p ng-package.json -c tsconfig.json",
|
|
47
28
|
"release": "npm publish"
|
|
48
29
|
},
|
|
30
|
+
"exports": {
|
|
31
|
+
"./material/button": {
|
|
32
|
+
"sass": "./material/button/button.scss"
|
|
33
|
+
},
|
|
34
|
+
"./material/dialog": {
|
|
35
|
+
"sass": "./material/dialog/dialog.scss"
|
|
36
|
+
},
|
|
37
|
+
"./material/form-field": {
|
|
38
|
+
"sass": "./material/form-field/form-field.scss"
|
|
39
|
+
},
|
|
40
|
+
"./material/theme": {
|
|
41
|
+
"sass": "./material/theme/theme.scss"
|
|
42
|
+
},
|
|
43
|
+
"./tokens": {
|
|
44
|
+
"style": "./tokens/tokens.css"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@angular/material": "^19.x"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@angular/material": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
49
55
|
"devDependencies": {
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
56
|
+
"@angular/common": "^19.2.17",
|
|
57
|
+
"@angular/compiler-cli": "^19.2.17",
|
|
58
|
+
"@angular/core": "^19.2.17",
|
|
59
|
+
"@angular/forms": "^19.2.17",
|
|
60
|
+
"@angular/material": "^19.2.19",
|
|
61
|
+
"ng-packagr": "^19.2.2",
|
|
62
|
+
"@commitlint/cli": "^20.2.0",
|
|
63
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
52
64
|
"@hug/eslint-config": "^20.3.3",
|
|
53
65
|
"husky": "^9.1.7",
|
|
54
|
-
"lint-staged": "^
|
|
55
|
-
},
|
|
56
|
-
"peerDependencies": {
|
|
57
|
-
"@angular/material": "19.x.x"
|
|
66
|
+
"lint-staged": "^16.2.7"
|
|
58
67
|
},
|
|
59
68
|
"commitlint": {
|
|
60
69
|
"extends": [
|
|
@@ -89,5 +98,5 @@
|
|
|
89
98
|
"engines": {
|
|
90
99
|
"yarn": "Please use Npm instead of Yarn."
|
|
91
100
|
},
|
|
92
|
-
"packageManager": "npm@11.
|
|
101
|
+
"packageManager": "npm@11.7.0"
|
|
93
102
|
}
|
package/tokens/index.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import rawTokens from './tokens.json';
|
|
2
|
+
|
|
3
|
+
export interface Token {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
value: string | number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface TokenSystem {
|
|
11
|
+
id?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
reference: Token[];
|
|
15
|
+
_referenceValue:
|
|
16
|
+
| string
|
|
17
|
+
| {
|
|
18
|
+
weight: number;
|
|
19
|
+
size: number;
|
|
20
|
+
lineHeight: number;
|
|
21
|
+
font: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Tokens {
|
|
26
|
+
references: Token[];
|
|
27
|
+
systems: {
|
|
28
|
+
light: TokenSystem[];
|
|
29
|
+
dark: TokenSystem[];
|
|
30
|
+
} | TokenSystem[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const tokens: {
|
|
34
|
+
colors: Tokens;
|
|
35
|
+
typographies: Tokens;
|
|
36
|
+
} = rawTokens;
|
|
37
|
+
|
|
38
|
+
export { tokens };
|