@hug/hospitality 0.0.4-alpha.13 → 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.
Files changed (36) 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/index.ts +1 -0
  16. package/material/core/index.ts +1 -0
  17. package/material/core/ng-package.json +7 -0
  18. package/{src/components/form-field/form-field.provider.mjs → material/form-field/form-field.provider.ts} +2 -1
  19. package/material/form-field/index.ts +1 -0
  20. package/material/form-field/ng-package.json +7 -0
  21. package/{src/material → material}/theme/theme.scss +1 -1
  22. package/ng-package.json +10 -0
  23. package/package.json +36 -29
  24. package/tokens/index.ts +38 -0
  25. package/tokens/ng-package.json +7 -0
  26. package/tsconfig.json +16 -0
  27. package/src/components/form-field/form-field.provider.d.ts +0 -3
  28. package/src/tokens/index.d.ts +0 -14
  29. package/src/tokens/index.mjs +0 -3
  30. /package/{src/components → material}/button/button.scss +0 -0
  31. /package/{src → material}/core/directives/components-styling.directive.ts +0 -0
  32. /package/{src/components → material}/dialog/dialog.scss +0 -0
  33. /package/{src/components → material}/form-field/form-field.scss +0 -0
  34. /package/{src/utils/map.scss → material/theme/utils.scss} +0 -0
  35. /package/{src/tokens → tokens}/tokens.css +0 -0
  36. /package/{src/tokens → tokens}/tokens.json +0 -0
package/.editorconfig ADDED
@@ -0,0 +1,18 @@
1
+ # Editor configuration, see https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 4
8
+ end_of_line = lf
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
11
+
12
+ [*.ts]
13
+ quote_type = single
14
+ ij_typescript_use_double_quotes = false
15
+
16
+ [*.md]
17
+ max_line_length = off
18
+ trim_trailing_whitespace = false
package/.eslintignore ADDED
@@ -0,0 +1,47 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+
3
+ # Compiled output
4
+ /dist
5
+ /tmp
6
+ /out-tsc
7
+ /bazel-out
8
+
9
+ # Node
10
+ node_modules
11
+ npm-debug.log
12
+ yarn-error.log
13
+
14
+ # IDEs and editors
15
+ .idea/
16
+ .project
17
+ .classpath
18
+ .c9/
19
+ *.launch
20
+ .settings/
21
+ *.sublime-workspace
22
+
23
+ # Visual Studio Code
24
+ .vscode/*
25
+ !.vscode/settings.json
26
+ !.vscode/tasks.json
27
+ !.vscode/launch.json
28
+ !.vscode/extensions.json
29
+ .history/*
30
+
31
+ # Miscellaneous
32
+ /.angular/cache
33
+ .sass-cache/
34
+ /connect.lock
35
+ /coverage
36
+ /libpeerconnection.log
37
+ testem.log
38
+ /typings
39
+
40
+ # System files
41
+ .DS_Store
42
+ Thumbs.db
43
+
44
+ # Capacitor/Cordova
45
+ capacitor.config.ts
46
+ /android
47
+ /ios
package/.eslintrc.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "root": true,
3
+ "extends": [
4
+ "@hug/eslint-config/moderate"
5
+ ]
6
+ }
@@ -0,0 +1,57 @@
1
+ name: 🐞 Bug report
2
+ description: Report a bug in the library
3
+ title: '[BUG] <title>'
4
+ labels: [bug, needs triage]
5
+
6
+ body:
7
+ - type: checkboxes
8
+ attributes:
9
+ label: Is there an existing issue for this?
10
+ description: |
11
+ Please search open and closed issues before submitting a new one.
12
+ Existing issues often contain information about workarounds, resolution or progress updates.
13
+ options:
14
+ - label: I have searched the existing issues
15
+ required: true
16
+
17
+ - type: input
18
+ attributes:
19
+ label: Library version
20
+ description: Please make sure you have installed the latest version and verified it is still an issue.
21
+ placeholder: latest
22
+ validations:
23
+ required: true
24
+
25
+ - type: textarea
26
+ attributes:
27
+ label: Description
28
+ description: A clear & concise description of what you're experiencing.
29
+ validations:
30
+ required: true
31
+
32
+ - type: textarea
33
+ attributes:
34
+ label: Steps to reproduce
35
+ description: |
36
+ Issues that don't have enough info and can't be reproduced will be closed.
37
+ Please provide the steps to reproduce the behavior and if applicable create a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)
38
+ in a [new repository](https://github.com/new), a [gist](https://gist.github.com) or a [live demo](https://stackblitz.com).
39
+ validations:
40
+ required: false
41
+
42
+ - type: textarea
43
+ attributes:
44
+ label: Environment
45
+ description: |
46
+ examples:
47
+ - **OS Name**: macOS Monterey (version 12.6.1)
48
+ - **System Model Name**: MacBook Pro (16-inch, 2019)
49
+ - **npm**: **`npm -v`**: 7.6.3
50
+ - **Node.js**: **`node -v`**: 13.14.0
51
+ value: |
52
+ - **OS Name**:
53
+ - **System Model Name**:
54
+ - **npm**:
55
+ - **Node.js**:
56
+ validations:
57
+ required: false
@@ -0,0 +1,26 @@
1
+ name: 🚀 Feature request
2
+ description: Suggest a feature for the library
3
+ title: '[FEATURE] <title>'
4
+ labels: [enhancement, needs triage]
5
+
6
+ body:
7
+ - type: textarea
8
+ attributes:
9
+ label: Description
10
+ description: A clear and concise description of the problem or missing capability.
11
+ validations:
12
+ required: true
13
+
14
+ - type: textarea
15
+ attributes:
16
+ label: Proposed solution
17
+ description: If you have a solution in mind, please describe it.
18
+ validations:
19
+ required: true
20
+
21
+ - type: textarea
22
+ attributes:
23
+ label: Alternatives considered
24
+ description: Have you considered any alternative solutions or workarounds?
25
+ validations:
26
+ required: false
@@ -0,0 +1,26 @@
1
+ name: 📚 Docs enhancement
2
+ description: File an enhancement or report an issue in the library's documentation
3
+ title: '[DOCS] <title>'
4
+ labels: [documentation, needs triage]
5
+
6
+ body:
7
+ - type: checkboxes
8
+ attributes:
9
+ label: Documentation can be submitted with pull requests
10
+ options:
11
+ - label: I know that I can edit the docs myself but prefer to file this issue instead
12
+ required: true
13
+
14
+ - type: input
15
+ attributes:
16
+ label: Docs URL
17
+ description: The URL of the page you'd like to see an enhancement to or report a problem from.
18
+ validations:
19
+ required: false
20
+
21
+ - type: textarea
22
+ attributes:
23
+ label: Description
24
+ description: A clear and concise description of the enhancement or problem.
25
+ validations:
26
+ required: true
@@ -0,0 +1,17 @@
1
+ name: Release library
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ ci_release:
9
+ uses: dsi-hug/actions/.github/workflows/action.yml@v3
10
+ secrets:
11
+ NPM_TOKEN: ${{ secrets.DSI_HUG_NPM_TOKEN }}
12
+ with:
13
+ working-directory: .
14
+ lint: true
15
+ test: false
16
+ build: false
17
+ release: true
@@ -0,0 +1,3 @@
1
+ printf "> Validating commit message... "
2
+ npx --no -- commitlint --edit "$1"
3
+ printf "OK\n"
@@ -0,0 +1,17 @@
1
+ printf "> Validating user email... "
2
+ gitUserEmail="$(git config user.email)"
3
+ if [[ $gitUserEmail =~ ^.*@(hcuge|hug).ch$ ]] ; then
4
+ printf "\n"
5
+ printf "For privacy, git user email should not end with @hcuge.ch or @hug.ch\n"
6
+ printf "Received: %s\n" $gitUserEmail
7
+ printf "\n"
8
+ printf "You can fix this with the following command:\n"
9
+ printf "git config --global user.email <your_email>\n"
10
+ exit 1
11
+ else
12
+ printf "OK\n"
13
+ fi
14
+
15
+ printf "> Linting staged files... "
16
+ npx --no -- lint-staged --quiet
17
+ printf "OK\n"
@@ -0,0 +1,6 @@
1
+ {
2
+ "recommendations": [
3
+ "dbaeumer.vscode-eslint",
4
+ "pkief.material-icon-theme"
5
+ ]
6
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "files.eol": "\n",
3
+ "files.watcherExclude": {
4
+ "**/dist/**": true,
5
+ "**/tmp/**": true
6
+ },
7
+ "search.exclude": {
8
+ "**/node_modules": true,
9
+ "**/dist": true,
10
+ "**/tmp": true
11
+ },
12
+ "workbench.iconTheme": "material-icon-theme",
13
+ "material-icon-theme.folders.theme": "none",
14
+ "material-icon-theme.opacity": 0.6,
15
+ "[javascript]": {
16
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
17
+ },
18
+ "[ts]": {
19
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
20
+ },
21
+ "editor.codeActionsOnSave": {
22
+ "source.fixAll.eslint": "explicit"
23
+ },
24
+ "editor.formatOnSave": true,
25
+ "eslint.format.enable": true,
26
+ "html.format.wrapAttributes": "force-aligned",
27
+ "html.format.wrapLineLength": 120,
28
+ "npm.exclude": "**/{dist,tmp}{,/**}",
29
+ "npm.packageManager": "npm",
30
+ "npm.scriptExplorerExclude": [
31
+ "install"
32
+ ]
33
+ }
@@ -0,0 +1,135 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported by opening an issue or contacting one or more of the project maintainers.
63
+
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126
+ at [https://www.contributor-covenant.org/translations][translations].
127
+
128
+
129
+
130
+
131
+ [homepage]: https://www.contributor-covenant.org
132
+ [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
133
+ [Mozilla CoC]: https://github.com/mozilla/diversity
134
+ [FAQ]: https://www.contributor-covenant.org/faq
135
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,289 @@
1
+ # Contributing
2
+
3
+ We would love for you to contribute to this project and help make it even better than it is today!
4
+ As a contributor, here are the guidelines we would like you to follow:
5
+
6
+ - [Code of Conduct](#coc)
7
+ - [Question or Problem?](#question)
8
+ - [Issues and Bugs](#issue)
9
+ - [Feature Requests](#feature)
10
+ - [Submission Guidelines](#submit)
11
+ - [Coding Rules](#rules)
12
+ - [Commit Message Guidelines](#commit)
13
+
14
+ ## <a name="coc"></a> Code of Conduct
15
+
16
+ Please read and follow our [Code of Conduct][coc], and help us keep this project open and inclusive.
17
+
18
+ ## <a name="question"></a> Got a Question or Problem ?
19
+
20
+ Please open an issue and add the `question` label to it.
21
+
22
+ ## <a name="issue"></a> Found a Bug ?
23
+
24
+ If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
25
+
26
+ Even better, you can [submit a Pull Request](#submit-pr) with a fix.
27
+
28
+ ## <a name="feature"></a> Missing a Feature ?
29
+
30
+ You can _request_ a new feature by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
31
+
32
+ If you would like to _implement_ a new feature, please consider the size of the change in order to determine the right steps to proceed:
33
+
34
+ - For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
35
+ This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
36
+
37
+ **Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
38
+
39
+ - **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
40
+
41
+ ## <a name="submit"></a> Submission Guidelines
42
+
43
+ ### <a name="submit-issue"></a> Submitting an Issue
44
+
45
+ Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
46
+
47
+ We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it.
48
+ In order to reproduce bugs, we require that you provide a minimal reproduction.
49
+ Having a minimal reproducible scenario gives us a wealth of important information without going back and forth to you with additional questions.
50
+
51
+ A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
52
+
53
+ We require a minimal reproduction to save maintainers' time and ultimately be able to fix more bugs.
54
+ Often, developers find coding problems themselves while preparing a minimal reproduction.
55
+ We understand that sometimes it might be hard to extract essential bits of code from a larger codebase but we really need to isolate the problem before we can fix it.
56
+
57
+ Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you, we are going to close an issue that doesn't have enough info to be reproduced.
58
+
59
+ You can file new issues by selecting and filling out the issue template from our [new issue templates][issue-templates].
60
+
61
+ ### <a name="submit-pr"></a> Submitting a Pull Request (PR)
62
+
63
+ Before you submit your Pull Request (PR) consider the following guidelines:
64
+
65
+ 1. Search [GitHub][github-pr] for an open or closed PR that relates to your submission.
66
+ You don't want to duplicate existing efforts.
67
+
68
+ 2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
69
+ Discussing the design upfront helps to ensure that we're ready to accept your work.
70
+
71
+ 3. Fork this repository.
72
+
73
+ 4. Make your changes in a new git branch:
74
+
75
+ ```sh
76
+ git checkout -b my-fix-branch master
77
+ ```
78
+
79
+ 5. Create your patch, **including appropriate test cases**.
80
+
81
+ 6. Follow our [Coding Rules](#rules).
82
+
83
+ 7. Run a full test suite and ensure that all tests pass.
84
+
85
+ 8. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit).
86
+ Adherence to these conventions is necessary because release notes are automatically generated from these messages.
87
+
88
+ ```sh
89
+ git commit --all
90
+ ```
91
+
92
+ Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
93
+
94
+ 9. Push your branch to GitHub:
95
+
96
+ ```sh
97
+ git push origin my-fix-branch
98
+ ```
99
+
100
+ 10. In GitHub, send a pull request to `develop` branch.
101
+
102
+ ### Reviewing a Pull Request
103
+
104
+ Pull requests may not be accepted from community members who haven't been good citizens of the community.
105
+
106
+ Such behavior includes not following the [code of conduct](#coc) and applies within or outside of this repository.
107
+
108
+ #### Addressing review feedback
109
+
110
+ If we ask for changes via code reviews then:
111
+
112
+ 1. Make the required updates to the code.
113
+
114
+ 2. Re-run the test suites to ensure tests are still passing.
115
+
116
+ 3. Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
117
+
118
+ ```sh
119
+ git commit --all --fixup HEAD
120
+ git push
121
+ ```
122
+
123
+ That's it! Thank you for your contribution!
124
+
125
+ #### Updating the commit message
126
+
127
+ A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines](#commit)).
128
+
129
+ In order to update the commit message of the last commit on your branch:
130
+
131
+ 1. Check out your branch:
132
+
133
+ ```sh
134
+ git checkout my-fix-branch
135
+ ```
136
+
137
+ 2. Amend the last commit and modify the commit message:
138
+
139
+ ```sh
140
+ git commit --amend
141
+ ```
142
+
143
+ 3. Push to your GitHub repository:
144
+
145
+ ```sh
146
+ git push --force-with-lease
147
+ ```
148
+
149
+ > NOTE:<br />
150
+ > If you need to update the commit message of an earlier commit, you can use `git rebase` in interactive mode.
151
+ > See the [git docs](https://git-scm.com/docs/git-rebase#_interactive_mode) for more details.
152
+
153
+ #### After your pull request is merged
154
+
155
+ After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
156
+
157
+ - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
158
+
159
+ ```sh
160
+ git push origin --delete my-fix-branch
161
+ ```
162
+
163
+ - Check out the master branch:
164
+
165
+ ```sh
166
+ git checkout master -f
167
+ ```
168
+
169
+ - Delete the local branch:
170
+
171
+ ```sh
172
+ git branch -D my-fix-branch
173
+ ```
174
+
175
+ - Update your master with the latest upstream version:
176
+
177
+ ```sh
178
+ git pull --ff upstream master
179
+ ```
180
+
181
+ ## <a name="rules"></a> Coding Rules
182
+
183
+ To ensure consistency throughout the source code, keep these rules in mind as you are working:
184
+
185
+ - All features or bug fixes **must be tested** by one or more specs (unit-tests)
186
+ - All public API methods **must be documented**
187
+ - We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at **100 characters**
188
+
189
+ ## <a name="commit"></a> Commit Message Format
190
+
191
+ _This specification is inspired by and supersedes the [Conventional Commits message format][commit-message-format]._
192
+
193
+ We have very precise rules over how our Git commit messages must be formatted.
194
+
195
+ This format leads to **easier to read commit history**.
196
+
197
+ Each commit message consists of a **header**, a **body**, and a **footer**.
198
+
199
+ ```
200
+ <header>
201
+ <BLANK LINE>
202
+ <body>
203
+ <BLANK LINE>
204
+ <footer>
205
+ ```
206
+
207
+ The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
208
+
209
+ The `body` is mandatory for all commits except for those of type "docs". When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
210
+
211
+ The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
212
+
213
+ Any line of the commit message cannot be longer than 100 characters.
214
+
215
+ #### <a name="commit-header"></a> Commit Message Header
216
+
217
+ ```
218
+ <type>(<scope>): <short summary>
219
+ │ │ │
220
+ │ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
221
+ │ │
222
+ │ └─⫸ Commit Scope (optional): provide additional contextual information
223
+
224
+ └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
225
+ ```
226
+
227
+ ##### Type
228
+
229
+ Must be one of the following:
230
+
231
+ - **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
232
+ - **ci**: Changes to CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
233
+ - **docs**: Documentation only changes
234
+ - **feat**: A new feature
235
+ - **fix**: A bug fix
236
+ - **perf**: A code change that improves performance
237
+ - **refactor**: A code change that neither fixes a bug nor adds a feature
238
+ - **test**: Adding missing tests or correcting existing tests
239
+
240
+ ##### Scope
241
+
242
+ Scope can be anything specifying place of the commit change.
243
+
244
+ ##### Summary
245
+
246
+ Use the summary field to provide a succinct description of the change:
247
+
248
+ - use the imperative, present tense: "change" not "changed" nor "changes"
249
+ - don't capitalize the first letter
250
+ - no dot (.) at the end
251
+
252
+ #### <a name="commit-body"></a> Commit Message Body
253
+
254
+ Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
255
+
256
+ Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making the change.
257
+
258
+ You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
259
+
260
+ #### <a name="commit-footer"></a> Commit Message Footer
261
+
262
+ The footer can contain information about breaking changes and is also the place to reference GitHub issues, Jira tickets, and other PRs that this commit closes or is related to.
263
+
264
+ ```
265
+ BREAKING CHANGE: <breaking change summary>
266
+ <BLANK LINE>
267
+ <breaking change description + migration instructions>
268
+ <BLANK LINE>
269
+ <BLANK LINE>
270
+ Fixes #<issue number>
271
+ ```
272
+
273
+ Breaking Change section should start with the phrase `BREAKING CHANGE: ` followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
274
+
275
+ ### Revert commits
276
+
277
+ If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
278
+
279
+ The content of the commit message body should contain:
280
+
281
+ - information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`
282
+ - a clear description of the reason for reverting the commit message
283
+
284
+ [coc]: https://github.com/dsi-hug/hospitality/blob/main/CODE_OF_CONDUCT.md
285
+ [github]: https://github.com/dsi-hug/hospitality
286
+ [issue-templates]: https://github.com/dsi-hug/hospitality/issues/new/choose
287
+ [github-pr]: https://github.com/dsi-hug/hospitality/pulls
288
+ [js-style-guide]: https://google.github.io/styleguide/jsguide.html
289
+ [commit-message-format]: https://www.conventionalcommits.org/en/v1.0.0
package/DEVELOPER.md ADDED
@@ -0,0 +1,37 @@
1
+ # Development
2
+
3
+ This document describes how you can test, build and publish the library and its documentation.
4
+
5
+ ## Prerequisite
6
+
7
+ Before you can build and test this library you must install and configure the following products on your development machine:
8
+
9
+ - [Git][git]
10
+ - [Node.js][nodejs]
11
+
12
+ You will then need to install the required dependencies:
13
+
14
+ ```sh
15
+ cd <library-path>
16
+ npm install
17
+ ```
18
+
19
+ ## Linting/verifying source code
20
+
21
+ Check that the code is properly formatted and adheres to coding style.
22
+
23
+ ```sh
24
+ npm run lint
25
+ ```
26
+
27
+ ## Publishing the library to NPM repository
28
+
29
+ This project comes with automatic continuous delivery (CD) using _GitHub Actions_.
30
+
31
+ 1. Bump the library version in `package.json`
32
+ 2. Push the changes
33
+ 3. Create a new: [GitHub release](https://github.com/dsi-hug/hospitality/releases/new)
34
+ 4. Watch the results in: [Actions](https://github.com/dsi-hug/hospitality/actions)
35
+
36
+ [git]: https://git-scm.com/
37
+ [nodejs]: https://nodejs.org/
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -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
+ }
@@ -1,6 +1,7 @@
1
+ import type { Provider } from '@angular/core';
1
2
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
2
3
 
3
- export const provideHyFormField = () => ({
4
+ export const provideHyFormField = (): Provider => ({
4
5
  provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
5
6
  useValue: { appearance: 'outline' }
6
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
+ }
@@ -1,5 +1,5 @@
1
1
  @use "@angular/material" as mat;
2
- @use "../../utils/map" as map;
2
+ @use "./utils" as map;
3
3
 
4
4
  $override-colors: (
5
5
  primary: var(--hy-color-primary),
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@hug/hospitality",
3
- "version": "0.0.4-alpha.13",
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,28 +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
- "./core/directives/components-styling": "./src/core/directives/components-styling.directive.ts",
28
- "./components/form-field": "./src/components/form-field/form-field.scss",
29
- "./components/form-field/provider": {
30
- "types": "./src/components/form-field/form-field.provider.d.ts",
31
- "default": "./src/components/form-field/form-field.provider.mjs"
32
- },
33
- "./components/dialog": "./src/components/dialog/dialog.scss",
34
- "./components/button": "./src/components/button/button.scss"
35
- },
36
- "files": [
37
- "README.md",
38
- "LICENSE",
39
- "src/"
40
- ],
41
19
  "keywords": [
42
20
  "TODO:"
43
21
  ],
@@ -46,18 +24,47 @@
46
24
  "prepare": "husky || true",
47
25
  "lint": "eslint . --fix",
48
26
  "lint:ci": "eslint .",
27
+ "build": "ng-packagr -p ng-package.json -c tsconfig.json",
49
28
  "release": "npm publish"
50
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
+ },
51
55
  "devDependencies": {
52
- "@commitlint/cli": "^19.8.0",
53
- "@commitlint/config-conventional": "^19.8.0",
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",
54
64
  "@hug/eslint-config": "^20.3.3",
55
65
  "husky": "^9.1.7",
56
66
  "lint-staged": "^16.2.7"
57
67
  },
58
- "peerDependencies": {
59
- "@angular/material": "19.x.x"
60
- },
61
68
  "commitlint": {
62
69
  "extends": [
63
70
  "@commitlint/config-conventional"
@@ -91,5 +98,5 @@
91
98
  "engines": {
92
99
  "yarn": "Please use Npm instead of Yarn."
93
100
  },
94
- "packageManager": "npm@11.2.0"
101
+ "packageManager": "npm@11.7.0"
95
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
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "./node_modules/ng-packagr/lib/ts/conf/tsconfig.ngc.json",
3
+ "compilerOptions": {
4
+ "strictNullChecks": true,
5
+ "esModuleInterop": true,
6
+ "resolveJsonModule": true
7
+ },
8
+ "files": [],
9
+ "include": ["**/*.ts"],
10
+ "angularCompilerOptions": {
11
+ "enableI18nLegacyMessageIdFormat": false,
12
+ "strictInjectionParameters": true,
13
+ "strictInputAccessModifiers": true,
14
+ "strictTemplates": true
15
+ }
16
+ }
@@ -1,3 +0,0 @@
1
- import { Provider } from '@angular/core';
2
-
3
- export declare function provideHyFormField(): Provider;
@@ -1,14 +0,0 @@
1
- interface Token {
2
- id: string;
3
- name: string;
4
- type: 'COLOR' | 'TYPO';
5
- value: string;
6
- }
7
-
8
- interface Tokens {
9
- references: Token[];
10
- systems: Token[];
11
- }
12
-
13
- declare const tokens: Tokens;
14
- export { tokens };
@@ -1,3 +0,0 @@
1
- import tokens from './tokens.json';
2
-
3
- export { tokens };
File without changes
File without changes
File without changes
File without changes