@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.
Files changed (49) hide show
  1. package/.editorconfig +18 -0
  2. package/.eslintignore +47 -0
  3. package/.eslintrc.json +6 -0
  4. package/.github/ISSUE_TEMPLATE/1-bug-report.yml +57 -0
  5. package/.github/ISSUE_TEMPLATE/2-feature-request.yml +26 -0
  6. package/.github/ISSUE_TEMPLATE/3-doc-issue.yml +26 -0
  7. package/.github/workflows/ci_release.yml +17 -0
  8. package/.husky/commit-msg +3 -0
  9. package/.husky/pre-commit +17 -0
  10. package/.vscode/extensions.json +6 -0
  11. package/.vscode/settings.json +33 -0
  12. package/CODE_OF_CONDUCT.md +135 -0
  13. package/CONTRIBUTING.md +289 -0
  14. package/DEVELOPER.md +37 -0
  15. package/dist/LICENSE +674 -0
  16. package/dist/README.md +85 -0
  17. package/dist/material/button/button.scss +237 -0
  18. package/dist/material/dialog/dialog.scss +29 -0
  19. package/dist/material/form-field/form-field.scss +97 -0
  20. package/dist/material/theme/theme.scss +69 -0
  21. package/dist/material/theme/utils.scss +10 -0
  22. package/dist/tokens/tokens.css +823 -0
  23. package/index.ts +1 -0
  24. package/material/core/directives/components-styling.directive.ts +20 -0
  25. package/material/core/index.ts +1 -0
  26. package/material/core/ng-package.json +7 -0
  27. package/material/form-field/form-field.provider.ts +7 -0
  28. package/material/form-field/index.ts +1 -0
  29. package/material/form-field/ng-package.json +7 -0
  30. package/ng-package.json +10 -0
  31. package/package.json +92 -92
  32. package/tokens/index.ts +38 -0
  33. package/tokens/ng-package.json +7 -0
  34. package/tokens/tokens.json +5042 -0
  35. package/tsconfig.json +16 -0
  36. /package/{fesm2022 → dist/fesm2022}/core.mjs +0 -0
  37. /package/{fesm2022 → dist/fesm2022}/core.mjs.map +0 -0
  38. /package/{fesm2022 → dist/fesm2022}/form-field.mjs +0 -0
  39. /package/{fesm2022 → dist/fesm2022}/form-field.mjs.map +0 -0
  40. /package/{fesm2022 → dist/fesm2022}/hug-hospitality.mjs +0 -0
  41. /package/{fesm2022 → dist/fesm2022}/hug-hospitality.mjs.map +0 -0
  42. /package/{fesm2022 → dist/fesm2022}/tokens.mjs +0 -0
  43. /package/{fesm2022 → dist/fesm2022}/tokens.mjs.map +0 -0
  44. /package/{index.d.ts → dist/index.d.ts} +0 -0
  45. /package/{material → dist/material}/core/directives/components-styling.directive.d.ts +0 -0
  46. /package/{material → dist/material}/core/index.d.ts +0 -0
  47. /package/{material → dist/material}/form-field/form-field.provider.d.ts +0 -0
  48. /package/{material → dist/material}/form-field/index.d.ts +0 -0
  49. /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
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "lib": {
4
+ "flatModuleFile": "core",
5
+ "entryFile": "./index.ts"
6
+ }
7
+ }
@@ -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';
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "lib": {
4
+ "flatModuleFile": "form-field",
5
+ "entryFile": "./index.ts"
6
+ }
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
+ "assets": [
4
+ "./material/**/*.scss",
5
+ "./tokens/tokens.css"
6
+ ],
7
+ "lib": {
8
+ "entryFile": "./index.ts"
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,102 +1,102 @@
1
1
  {
2
- "name": "@hug/hospitality",
3
- "version": "0.0.4-alpha.16",
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"
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
- "./material/dialog": {
27
- "sass": "./material/dialog/dialog.scss"
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "tag": "latest"
28
18
  },
29
- "./material/form-field": {
30
- "sass": "./material/form-field/form-field.scss",
31
- "types": "./material/form-field/index.d.ts",
32
- "default": "./fesm2022/form-field.mjs"
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
- "./material/theme": {
35
- "sass": "./material/theme/theme.scss"
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
- "./tokens": {
38
- "style": "./tokens/tokens.css",
39
- "types": "./tokens/index.d.ts",
40
- "default": "./fesm2022/tokens.mjs"
47
+ "peerDependencies": {
48
+ "@angular/material": "^19.x"
41
49
  },
42
- "./package.json": {
43
- "default": "./package.json"
50
+ "peerDependenciesMeta": {
51
+ "@angular/material": {
52
+ "optional": true
53
+ }
44
54
  },
45
- ".": {
46
- "types": "./index.d.ts",
47
- "default": "./fesm2022/hug-hospitality.mjs"
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
- "./material/core": {
50
- "types": "./material/core/index.d.ts",
51
- "default": "./fesm2022/core.mjs"
52
- }
53
- },
54
- "peerDependencies": {
55
- "@angular/material": "^19.x"
56
- },
57
- "peerDependenciesMeta": {
58
- "@angular/material": {
59
- "optional": true
60
- }
61
- },
62
- "commitlint": {
63
- "extends": [
64
- "@commitlint/config-conventional"
65
- ],
66
- "rules": {
67
- "type-enum": [
68
- 2,
69
- "always",
70
- [
71
- "build",
72
- "chore",
73
- "ci",
74
- "docs",
75
- "feat",
76
- "fix",
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
- "lint-staged": {
88
- "**/*.{js,ts,html,json}": [
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
  }
@@ -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 };
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../node_modules/ng-packagr/ng-package.schema.json",
3
+ "lib": {
4
+ "flatModuleFile": "tokens",
5
+ "entryFile": "./index.ts"
6
+ }
7
+ }