@hug/hospitality 0.0.4-alpha.16 → 0.0.4-alpha.17
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/dist/LICENSE +674 -0
- package/dist/README.md +85 -0
- package/dist/material/button/button.scss +237 -0
- package/dist/material/dialog/dialog.scss +29 -0
- package/dist/material/form-field/form-field.scss +97 -0
- package/dist/material/theme/theme.scss +69 -0
- package/dist/material/theme/utils.scss +10 -0
- package/dist/tokens/tokens.css +823 -0
- package/index.ts +1 -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/material/form-field/form-field.provider.ts +7 -0
- package/material/form-field/index.ts +1 -0
- package/material/form-field/ng-package.json +7 -0
- package/ng-package.json +10 -0
- package/package.json +92 -92
- package/tokens/index.ts +38 -0
- package/tokens/ng-package.json +7 -0
- package/tokens/tokens.json +5042 -0
- package/tsconfig.json +16 -0
- /package/{fesm2022 → dist/fesm2022}/core.mjs +0 -0
- /package/{fesm2022 → dist/fesm2022}/core.mjs.map +0 -0
- /package/{fesm2022 → dist/fesm2022}/form-field.mjs +0 -0
- /package/{fesm2022 → dist/fesm2022}/form-field.mjs.map +0 -0
- /package/{fesm2022 → dist/fesm2022}/hug-hospitality.mjs +0 -0
- /package/{fesm2022 → dist/fesm2022}/hug-hospitality.mjs.map +0 -0
- /package/{fesm2022 → dist/fesm2022}/tokens.mjs +0 -0
- /package/{fesm2022 → dist/fesm2022}/tokens.mjs.map +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{material → dist/material}/core/directives/components-styling.directive.d.ts +0 -0
- /package/{material → dist/material}/core/index.d.ts +0 -0
- /package/{material → dist/material}/form-field/form-field.provider.d.ts +0 -0
- /package/{material → dist/material}/form-field/index.d.ts +0 -0
- /package/{tokens → dist/tokens}/index.d.ts +0 -0
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
import { Directive, input } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
export type HySizeType = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
5
|
+
|
|
6
|
+
@Directive({
|
|
7
|
+
selector: `
|
|
8
|
+
[hy-size],
|
|
9
|
+
[hy-appearance]
|
|
10
|
+
`,
|
|
11
|
+
standalone: true,
|
|
12
|
+
host: {
|
|
13
|
+
'[attr.hy-size]': 'hySize()',
|
|
14
|
+
'[attr.hy-appearance]': 'hyAppearance()'
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
export class ComponentsStylingDirective {
|
|
18
|
+
public hySize = input<HySizeType | null>(null, { alias: 'hy-size' });
|
|
19
|
+
public hyAppearance = input<string | null>(null, { alias: 'hy-appearance' });
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComponentsStylingDirective } from './directives/components-styling.directive';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Provider } from '@angular/core';
|
|
2
|
+
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
3
|
+
|
|
4
|
+
export const provideHyFormField = (): Provider => ({
|
|
5
|
+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
6
|
+
useValue: { appearance: 'outline' }
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { provideHyFormField } from './form-field.provider';
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,102 +1,102 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public",
|
|
17
|
-
"tag": "latest"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"TODO:"
|
|
21
|
-
],
|
|
22
|
-
"exports": {
|
|
23
|
-
"./material/button": {
|
|
24
|
-
"sass": "./material/button/button.scss"
|
|
2
|
+
"name": "@hug/hospitality",
|
|
3
|
+
"version": "0.0.4-alpha.17",
|
|
4
|
+
"description": "Hospitality Design System",
|
|
5
|
+
"homepage": "https://github.com/dsi-hug/hospitality",
|
|
6
|
+
"license": "GPL-3.0-only",
|
|
7
|
+
"author": "HUG - Hôpitaux Universitaires Genève",
|
|
8
|
+
"contributors": [
|
|
9
|
+
"badisi (https://github.com/badisi)"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/dsi-hug/hospitality.git"
|
|
25
14
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"tag": "latest"
|
|
28
18
|
},
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
"keywords": [
|
|
20
|
+
"TODO:"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"ncu": "npx npm-check-updates -i --format=group --packageFile '{,projects/**/}package.json'",
|
|
24
|
+
"prepare": "husky || true",
|
|
25
|
+
"lint": "eslint . --fix",
|
|
26
|
+
"lint:ci": "eslint .",
|
|
27
|
+
"build": "ng-packagr -p ng-package.json -c tsconfig.json",
|
|
28
|
+
"release": "npm publish"
|
|
33
29
|
},
|
|
34
|
-
"
|
|
35
|
-
|
|
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
|
+
}
|
|
36
46
|
},
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"types": "./tokens/index.d.ts",
|
|
40
|
-
"default": "./fesm2022/tokens.mjs"
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@angular/material": "^19.x"
|
|
41
49
|
},
|
|
42
|
-
"
|
|
43
|
-
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@angular/material": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
44
54
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
"devDependencies": {
|
|
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",
|
|
64
|
+
"@hug/eslint-config": "^20.3.3",
|
|
65
|
+
"husky": "^9.1.7",
|
|
66
|
+
"lint-staged": "^16.2.7"
|
|
48
67
|
},
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"perf",
|
|
78
|
-
"refactor",
|
|
79
|
-
"revert",
|
|
80
|
-
"style",
|
|
81
|
-
"test",
|
|
82
|
-
"deps"
|
|
68
|
+
"commitlint": {
|
|
69
|
+
"extends": [
|
|
70
|
+
"@commitlint/config-conventional"
|
|
71
|
+
],
|
|
72
|
+
"rules": {
|
|
73
|
+
"type-enum": [
|
|
74
|
+
2,
|
|
75
|
+
"always",
|
|
76
|
+
[
|
|
77
|
+
"build",
|
|
78
|
+
"chore",
|
|
79
|
+
"ci",
|
|
80
|
+
"docs",
|
|
81
|
+
"feat",
|
|
82
|
+
"fix",
|
|
83
|
+
"perf",
|
|
84
|
+
"refactor",
|
|
85
|
+
"revert",
|
|
86
|
+
"style",
|
|
87
|
+
"test",
|
|
88
|
+
"deps"
|
|
89
|
+
]
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"lint-staged": {
|
|
94
|
+
"**/*.{js,ts,html,json}": [
|
|
95
|
+
"npm run lint"
|
|
83
96
|
]
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
"npm run lint"
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"engines": {
|
|
93
|
-
"yarn": "Please use Npm instead of Yarn."
|
|
94
|
-
},
|
|
95
|
-
"packageManager": "npm@11.7.0",
|
|
96
|
-
"module": "fesm2022/hug-hospitality.mjs",
|
|
97
|
-
"typings": "index.d.ts",
|
|
98
|
-
"sideEffects": false,
|
|
99
|
-
"dependencies": {
|
|
100
|
-
"tslib": "^2.3.0"
|
|
101
|
-
}
|
|
97
|
+
},
|
|
98
|
+
"engines": {
|
|
99
|
+
"yarn": "Please use Npm instead of Yarn."
|
|
100
|
+
},
|
|
101
|
+
"packageManager": "npm@11.7.0"
|
|
102
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 };
|