tuix-webcomponents 0.0.24 → 0.0.26
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/README.md +56 -25
- package/custom-elements.json +5380 -0
- package/dist/assets/tuix-styles.css +5 -4
- package/dist/src/index.d.ts +2 -2
- package/dist/src/react/index.d.ts +15 -15
- package/dist/src/react/index.js +15 -15
- package/dist/src/tuix-button/TuixBaseButton.d.ts +2 -2
- package/dist/src/tuix-button/TuixBaseButton.js +2 -2
- package/dist/src/tuix-button/TuixButton.d.ts +2 -2
- package/dist/src/tuix-button/TuixButton.js +4 -4
- package/dist/src/tuix-button/TuixButton.styles.js +6 -6
- package/dist/src/tuix-button/enums/tuix-button.enums.d.ts +1 -1
- package/dist/src/tuix-button/enums/tuix-button.enums.js +2 -2
- package/dist/src/tuix-checkbox/TuixCheckbox.d.ts +1 -1
- package/dist/src/tuix-checkbox/TuixCheckbox.js +4 -4
- package/dist/src/tuix-checkbox/TuixCheckbox.styles.js +3 -3
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.d.ts +2 -2
- package/dist/src/tuix-checkbox/enums/tuix-checkbox.enums.js +2 -2
- package/dist/src/tuix-checkbox/interfaces/tuix-checkbox.interface.d.ts +1 -1
- package/dist/src/tuix-dropdown/TuixDropdown.d.ts +3 -3
- package/dist/src/tuix-dropdown/TuixDropdown.js +4 -4
- package/dist/src/tuix-dropdown/TuixDropdown.styles.js +4 -4
- package/dist/src/tuix-dropdown/interfaces/tuix-dropdown.interface.d.ts +2 -2
- package/dist/src/tuix-icon/TuixIcon.d.ts +2 -2
- package/dist/src/tuix-icon/TuixIcon.icons.d.ts +1 -1
- package/dist/src/tuix-icon/TuixIcon.icons.js +10 -2
- package/dist/src/tuix-icon/TuixIcon.js +4 -4
- package/dist/src/tuix-icon/enums/tuix-icon.enums.d.ts +3 -1
- package/dist/src/tuix-icon/enums/tuix-icon.enums.js +2 -0
- package/dist/src/tuix-icon-button/TuixIconButton.d.ts +2 -2
- package/dist/src/tuix-icon-button/TuixIconButton.js +4 -4
- package/dist/src/tuix-input/TuixInput.d.ts +1 -1
- package/dist/src/tuix-input/TuixInput.js +1 -4
- package/dist/src/tuix-input/TuixInput.styles.js +22 -11
- package/dist/src/tuix-input/enums/tuix-input.enums.d.ts +3 -3
- package/dist/src/tuix-input/enums/tuix-input.enums.js +3 -3
- package/dist/src/tuix-input/interfaces/tuix-input.interface.d.ts +5 -5
- package/dist/src/tuix-link/TuixLink.d.ts +2 -2
- package/dist/src/tuix-link/TuixLink.js +4 -4
- package/dist/src/tuix-link/TuixLink.styles.js +3 -3
- package/dist/src/tuix-modal/TuixModal.styles.js +2 -2
- package/dist/src/tuix-paper/TuixPaper.d.ts +1 -1
- package/dist/src/tuix-paper/TuixPaper.js +2 -2
- package/dist/src/tuix-paper/TuixPaper.styles.js +2 -2
- package/dist/src/tuix-radio-button/TuixRadioButton.d.ts +2 -2
- package/dist/src/tuix-radio-button/TuixRadioButton.js +3 -3
- package/dist/src/tuix-radio-button/TuixRadioButton.styles.js +3 -3
- package/dist/src/tuix-radio-button/interfaces/tuix-radio-button.interface.d.ts +1 -1
- package/dist/src/tuix-table/TuixTable.js +4 -4
- package/dist/src/tuix-table/TuixTable.styles.js +1 -1
- package/dist/src/tuix-text/TuixText.styles.js +3 -3
- package/dist/src/tuix-text/enums/tuix-text.enums.js +2 -2
- package/dist/src/tuix-toast/TuixToast.styles.js +1 -1
- package/dist/src/tuix-toast/enums/tuix-toast.enums.d.ts +3 -3
- package/dist/src/tuix-toast/enums/tuix-toast.enums.js +3 -3
- package/dist/src/tuix-toggle-button/TuixToggleButton.d.ts +1 -1
- package/dist/src/tuix-toggle-button/TuixToggleButton.js +3 -3
- package/dist/src/tuix-toggle-button/TuixToggleButton.styles.js +4 -4
- package/dist/src/tuix-toggle-button/interfaces/tuix-toggle.interface.d.ts +1 -1
- package/dist/src/utils/colors.d.ts +1 -0
- package/dist/src/utils/colors.js +1 -0
- package/dist/src/utils/darkColors.d.ts +4 -3
- package/dist/src/utils/darkColors.js +4 -3
- package/package.json +17 -19
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ npm i tuix-webcomponents
|
|
|
12
12
|
|
|
13
13
|
### Webbundle version
|
|
14
14
|
|
|
15
|
-
Webbundle Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-
|
|
16
|
-
Styles Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-
|
|
15
|
+
Webbundle Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-22f6faf@0.91.1.js
|
|
16
|
+
Styles Link: https://tuix-webcomponents.s3.eu-central-1.amazonaws.com/build-22f6faf@0.91.1.css
|
|
17
17
|
|
|
18
18
|
### React
|
|
19
19
|
|
|
@@ -52,10 +52,10 @@ properties are typed with the exported enums, pass `MainVariant.PRIMARY` rather
|
|
|
52
52
|
than the string `'primary'`.
|
|
53
53
|
|
|
54
54
|
The wrappers are generated by `scripts/build-react.ts` during `npm run build`
|
|
55
|
-
and land in `
|
|
56
|
-
hand-kept: the generator reads `src/`, so every element with a
|
|
57
|
-
decorator gets a wrapper, and every event it dispatches gets
|
|
58
|
-
typed with the detail type written at the dispatch site.
|
|
55
|
+
and land in `package-build/src/react`; `src/react/` is gitignored. Nothing
|
|
56
|
+
about them is hand-kept: the generator reads `src/`, so every element with a
|
|
57
|
+
`@customElement` decorator gets a wrapper, and every event it dispatches gets
|
|
58
|
+
its `on*` prop, typed with the detail type written at the dispatch site.
|
|
59
59
|
|
|
60
60
|
### Fonts
|
|
61
61
|
|
|
@@ -88,8 +88,10 @@ and a page per component with live previews of every variant, in English and
|
|
|
88
88
|
German. Pages are MDX files in `docs/content/docs/` (`*.mdx` English,
|
|
89
89
|
`*.de.mdx` German), ordered by `meta.json` and `meta.de.json`.
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
The site is public-facing: it shows and documents the components, and carries no
|
|
92
|
+
contributor workflow. That lives here and in
|
|
93
|
+
`docs/src/modules/docs/README.md`, which covers how the site is put together —
|
|
94
|
+
content locations, the live previews, the framework selector and the locales.
|
|
93
95
|
|
|
94
96
|
## Building the package
|
|
95
97
|
|
|
@@ -97,7 +99,8 @@ See `docs/src/modules/docs/README.md` for how the site is put together, and
|
|
|
97
99
|
npm run build
|
|
98
100
|
```
|
|
99
101
|
|
|
100
|
-
writes `
|
|
102
|
+
writes `package-build/`, and `npm run stage:package` copies that into `dist/`,
|
|
103
|
+
which is what `npm publish` ships (`files: ["dist"]`):
|
|
101
104
|
|
|
102
105
|
| Path | Entry point |
|
|
103
106
|
| -------------------------------- | -------------------------------------------- |
|
|
@@ -105,14 +108,50 @@ writes `dist/`, which is exactly what `npm publish` ships (`files: ["dist"]`):
|
|
|
105
108
|
| `dist/src/react/index.js` | `tuix-webcomponents/react` — the wrappers |
|
|
106
109
|
| `dist/assets/tuix-styles.css` | `tuix-webcomponents/dist/assets/tuix-styles.css` — the design tokens |
|
|
107
110
|
|
|
111
|
+
The two steps are separate on purpose: `dist/` is also where the site is
|
|
112
|
+
assembled, so the package build never writes it. Only the staging step does,
|
|
113
|
+
and that runs inside `prepublishOnly` and `bin/publish.sh` — i.e. in the
|
|
114
|
+
publish job, after the site has already been uploaded from its own job.
|
|
115
|
+
|
|
108
116
|
The steps behind it: `cem analyze` refreshes `custom-elements.json`,
|
|
109
117
|
`scripts/build-react.ts` regenerates `src/react/`, `tsc -p tsconfig.publish.json`
|
|
110
118
|
compiles both entry points with their declarations, `build:css` renders the
|
|
111
119
|
tokens, and `tsc-esm-fix` adds the `.js` extensions Node's ESM resolver needs.
|
|
112
120
|
|
|
113
|
-
`npm publish` re-runs
|
|
114
|
-
stale `dist/`. `npm run publish:local` packs the same output into
|
|
115
|
-
`local/` folder for trying it in another project.
|
|
121
|
+
`npm publish` re-runs build and staging through `prepublishOnly`, so a release
|
|
122
|
+
cannot ship a stale `dist/`. `npm run publish:local` packs the same output into
|
|
123
|
+
a linkable `local/` folder for trying it in another project.
|
|
124
|
+
|
|
125
|
+
## Releases
|
|
126
|
+
|
|
127
|
+
Releases are automatic, from CircleCI. `bin/publish.sh` takes the newest
|
|
128
|
+
`feat(`, `feat!(` or `fix(` subject out of the last ten commits and derives the
|
|
129
|
+
version from it:
|
|
130
|
+
|
|
131
|
+
| Commit prefix | Bump |
|
|
132
|
+
| ------------- | ----- |
|
|
133
|
+
| `feat!(` | major |
|
|
134
|
+
| `feat(` | minor |
|
|
135
|
+
| anything else | patch |
|
|
136
|
+
|
|
137
|
+
Commit subjects are linted by commitlint against
|
|
138
|
+
[Conventional Commits](https://www.conventionalcommits.org), so the prefix is
|
|
139
|
+
not optional.
|
|
140
|
+
|
|
141
|
+
The branch decides the dist-tag, and the two paths differ:
|
|
142
|
+
|
|
143
|
+
| Branch | Dist-tag | Version | Also does |
|
|
144
|
+
| ------------ | --------- | --------------------------------------------- | --------------------------------------------------------------------------- |
|
|
145
|
+
| `master` | `latest` | bumped from the commit subject, per the table | uploads the web bundle to S3, rewrites the two links below, tags `v<version>` |
|
|
146
|
+
| anything else| `staging` | always a patch bump off `staging` | uploads the web bundle to S3 |
|
|
147
|
+
|
|
148
|
+
Both paths build the bundle as `build-<short hash>@<version>.{js,css}` and
|
|
149
|
+
upload it, so every deployment is immutable. Only `latest` rewrites the
|
|
150
|
+
`Webbundle Link:` and `Styles Link:` lines under [Usage](#usage) and commits
|
|
151
|
+
them — which is why those two lines are the one place in the repository that
|
|
152
|
+
tracks the current bundle. `docs/scripts/build-bundle-links.ts` reads them at
|
|
153
|
+
docs build time rather than copying the URLs into a page, so the documentation
|
|
154
|
+
cannot fall a release behind.
|
|
116
155
|
|
|
117
156
|
## Linting and formatting
|
|
118
157
|
|
|
@@ -146,10 +185,11 @@ That writes `dist/storybook`, which is where the deployed site serves it from.
|
|
|
146
185
|
The site root is the documentation, and the Storybook sidebar brand links back
|
|
147
186
|
to it. `scripts/build.sh` is what assembles both into `dist/` for CI.
|
|
148
187
|
|
|
149
|
-
|
|
150
|
-
(`scripts/build.sh
|
|
151
|
-
|
|
152
|
-
|
|
188
|
+
Two builds, two folders, so neither clears the other: the site into `dist/`
|
|
189
|
+
(`scripts/build.sh` — Storybook under `dist/storybook`, the docs export at the
|
|
190
|
+
root) and the npm package into `package-build/` (`npm run build`). `dist/` is
|
|
191
|
+
reused for the package only by `npm run stage:package`, which runs in the
|
|
192
|
+
publish job.
|
|
153
193
|
|
|
154
194
|
|
|
155
195
|
## Tooling configs
|
|
@@ -157,12 +197,3 @@ wins.
|
|
|
157
197
|
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
|
|
158
198
|
|
|
159
199
|
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
160
|
-
|
|
161
|
-
## Local Demo with `web-dev-server`
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
npm start
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
To run a local development server that serves the basic demo located in `demo/index.html`
|
|
168
|
-
|