@statistikzh/leu 0.16.0 → 0.17.0

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 (83) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +7 -0
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Button.js +1 -1
  5. package/dist/ButtonGroup.js +1 -1
  6. package/dist/ChartWrapper.js +1 -1
  7. package/dist/Checkbox.js +1 -1
  8. package/dist/CheckboxGroup.js +1 -1
  9. package/dist/Chip.js +1 -1
  10. package/dist/ChipGroup.js +1 -1
  11. package/dist/ChipLink.js +1 -1
  12. package/dist/ChipRemovable.js +1 -1
  13. package/dist/ChipSelectable.js +1 -1
  14. package/dist/Dialog.js +1 -1
  15. package/dist/Dropdown.js +1 -1
  16. package/dist/Icon.js +1 -1
  17. package/dist/Input.js +1 -1
  18. package/dist/{LeuElement-C0BZ_nPB.js → LeuElement-BRZYxDjR.js} +1 -1
  19. package/dist/Menu.js +1 -1
  20. package/dist/MenuItem.js +1 -1
  21. package/dist/Message.js +1 -1
  22. package/dist/Pagination.js +1 -1
  23. package/dist/Placeholder.js +1 -1
  24. package/dist/Popup.js +1 -1
  25. package/dist/Radio.js +1 -1
  26. package/dist/RadioGroup.js +1 -1
  27. package/dist/Range.js +1 -1
  28. package/dist/ScrollTop.js +1 -1
  29. package/dist/Select.js +1 -1
  30. package/dist/Spinner.js +1 -1
  31. package/dist/Table.js +1 -1
  32. package/dist/Tag.d.ts +17 -0
  33. package/dist/Tag.js +75 -0
  34. package/dist/VisuallyHidden.js +1 -1
  35. package/dist/components/tag/Tag.d.ts +13 -0
  36. package/dist/components/tag/Tag.d.ts.map +1 -0
  37. package/dist/components/tag/leu-tag.d.ts +3 -0
  38. package/dist/components/tag/leu-tag.d.ts.map +1 -0
  39. package/dist/components/tag/stories/tag.stories.d.ts +136 -0
  40. package/dist/components/tag/stories/tag.stories.d.ts.map +1 -0
  41. package/dist/components/tag/test/tag.test.d.ts +2 -0
  42. package/dist/components/tag/test/tag.test.d.ts.map +1 -0
  43. package/dist/index.js +1 -1
  44. package/dist/leu-accordion.js +1 -1
  45. package/dist/leu-button-group.js +1 -1
  46. package/dist/leu-button.js +1 -1
  47. package/dist/leu-chart-wrapper.js +1 -1
  48. package/dist/leu-checkbox-group.js +1 -1
  49. package/dist/leu-checkbox.js +1 -1
  50. package/dist/leu-chip-group.js +1 -1
  51. package/dist/leu-chip-link.js +1 -1
  52. package/dist/leu-chip-removable.js +1 -1
  53. package/dist/leu-chip-selectable.js +1 -1
  54. package/dist/leu-dialog.js +1 -1
  55. package/dist/leu-dropdown.js +1 -1
  56. package/dist/leu-icon.js +1 -1
  57. package/dist/leu-input.js +1 -1
  58. package/dist/leu-menu-item.js +1 -1
  59. package/dist/leu-menu.js +1 -1
  60. package/dist/leu-message.js +1 -1
  61. package/dist/leu-pagination.js +1 -1
  62. package/dist/leu-placeholder.js +1 -1
  63. package/dist/leu-popup.js +1 -1
  64. package/dist/leu-radio-group.js +1 -1
  65. package/dist/leu-radio.js +1 -1
  66. package/dist/leu-range.js +1 -1
  67. package/dist/leu-scroll-top.js +1 -1
  68. package/dist/leu-select.js +1 -1
  69. package/dist/leu-spinner.js +1 -1
  70. package/dist/leu-table.js +1 -1
  71. package/dist/leu-tag.d.ts +4 -0
  72. package/dist/leu-tag.js +9 -0
  73. package/dist/leu-visually-hidden.js +1 -1
  74. package/dist/vscode.html-custom-data.json +20 -0
  75. package/dist/vue/index.d.ts +20 -0
  76. package/dist/web-types.json +29 -1
  77. package/package.json +1 -1
  78. package/src/components/tag/Tag.ts +28 -0
  79. package/src/components/tag/leu-tag.ts +5 -0
  80. package/src/components/tag/stories/tag.stories.ts +107 -0
  81. package/src/components/tag/tag.css +42 -0
  82. package/src/components/tag/test/tag.test.ts +28 -0
  83. package/src/docs/theme.mdx +49 -2
@@ -59,6 +59,7 @@ This is helpful if you want to use the it to style your application or to build
59
59
  ## Table of Contents
60
60
 
61
61
  - [Design System](#design-system)
62
+ - [Quick start](#quick-start)
62
63
  - [Structure of the file](#structure-of-the-file)
63
64
  - [Custom property naming](#custom-property-naming)
64
65
  - [Colors](#colors)
@@ -75,6 +76,50 @@ The theme is based on the official [design system](https://www.zh.ch/de/webangeb
75
76
  Currently there is no automatic workflow that generates the theme from the design system. The theme is manually updated when the design system changes.
76
77
  If you spot any inconsistencies between the theme and the design system, please open an issue.
77
78
 
79
+ ## Quick start
80
+
81
+ The following css snippet is a good starting point when you want to use the theme to style your application.
82
+ Details about the specific definitions can be found in the content below.
83
+
84
+ ```css
85
+ html {
86
+ font-family: var(--leu-font-family-regular);
87
+ font-feature-settings: var(--leu-t-font-feature-settings);
88
+
89
+ /* Prevent browser from synthesizing font weights */
90
+ font-synthesis-weight: none;
91
+ }
92
+
93
+ strong {
94
+ font-family: var(--leu-font-family-black);
95
+ }
96
+
97
+ /* Heading style mapping. Use whatever selector make sense in your project. */
98
+ h1 {
99
+ font: var(--leu-t-curve-huge-black-font);
100
+ }
101
+
102
+ h2 {
103
+ font: var(--leu-t-curve-large-black-font);
104
+ }
105
+
106
+ h3 {
107
+ font: var(--leu-t-curve-medium-black-font);
108
+ }
109
+
110
+ h4 {
111
+ font: var(--leu-t-curve-regular-black-font);
112
+ }
113
+
114
+ /*
115
+ * Prevent "Flash of Unstyled Custom Elements" (FOUCE)
116
+ * https://www.abeautifulsite.net/posts/flash-of-undefined-custom-elements
117
+ */
118
+ :not(:defined) {
119
+ visibility: hidden;
120
+ }
121
+ ```
122
+
78
123
  ## Structure of the file
79
124
 
80
125
  The theme contains custom properties for:
@@ -175,6 +220,8 @@ box-shadow: var(--leu-box-shadow-short);
175
220
 
176
221
  ## z-index
177
222
 
223
+ TODO
224
+
178
225
  ## Typography
179
226
 
180
227
  The design system is based on the [Inter](https://rsms.me/inter/) font family. It just uses the `regular` and `black` weights.
@@ -306,9 +353,9 @@ h1 {
306
353
 
307
354
  As the theme only consist of custom properties, it isn't possible to provide a full set of grid classes.
308
355
  Instead the theme contains just five necessary values that can be applied directly.
356
+ This approach helps us to keep the css footprint as small as possible.
309
357
  Most components don't need a grid anyway and those who do mostly have a very simple configuration.
310
- Alternatively you can use to build your own classes for your application.
311
- This aproach helps us to keep the css footprint small.
358
+ Alternatively you can use the variables to build your own classes. You can find a possible implementation in this [GitHub Gist](https://gist.github.com/daenub/735d657cc0bf297e9a7d2015f003084c).
312
359
 
313
360
  The official design system uses a 6 columns system on smaller screens.
314
361
  For simplicity we use a 12 column grid for all breakpoints.