@corvina/web-components-library 1.0.0-beta.1 → 1.0.0-beta.3

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/CHANGELOG.md CHANGED
@@ -6,12 +6,18 @@ Both packages are built from the same sources and released with the same version
6
6
 
7
7
  Vue 3.5 and Vuetify 4.
8
8
 
9
- ### `@corvina/vue-components-library` (from 0.2.3)
9
+ Browsers: the JS and CSS are built for Vite 8's default target (`baseline-widely-available`: Chrome and
10
+ Edge 111, Firefox 114, Safari and iOS 16.4), with no transpiling to ES2016 anymore (`?.`, `??` and `async`
11
+ are kept).
12
+
13
+ ### `@corvina/vue-components-library` (from 0.2.4)
10
14
 
11
15
  Breaking changes:
12
16
 
13
17
  - `vue` (^3.5) and `vuetify` (^4.3) are peer dependencies, provided by the app: the package no longer
14
- bundles Vuetify 3 (JS 554 → 205 KB, gzip 160 → 76 KB; the ExorFontIcon font is in it as a data URL).
18
+ bundles Vuetify 3 (JS 554 → 202 KB, gzip 160 → 76 KB; the ExorFontIcon font is in it as a data URL).
19
+ - Modern syntax (see Browsers above): an app that targets older browsers transpiles the package with its
20
+ bundler (Vite does it by itself in the build).
15
21
  - ESM only: the CommonJS and UMD builds are gone (`exports` has no `require` condition).
16
22
  - The library CSS no longer contains the Vuetify CSS (132 → 20 KB): the app imports `vuetify/styles`.
17
23
  To get the Corvina look, build the Vuetify styles with the exported settings:
@@ -20,11 +26,14 @@ Breaking changes:
20
26
  CSS is in CSS layers and the first CSS loaded sets their order.
21
27
  - The components use the Vuetify defaults of the app (e.g. the `variant` of fields), not the library ones.
22
28
  - `--color-*` variables: the package CSS now has the components' palette (`--color-primary` #496177,
23
- `--color-highlight` #01a3dd, ...). 0.2.3 ended with an older palette (#004688, #00b0c7, ...).
29
+ `--color-highlight` #01a3dd, ...). 0.2.4 ended with an older palette (#004688, #00b0c7, ...).
24
30
 
25
31
  Added:
26
32
 
27
33
  - `./settings.scss` export (Vuetify Sass settings of the library).
34
+ - `CorvinaTable` cell slots `item.<key>` (as in Vuetify's tables): a column's cells written in the template,
35
+ with `item`, `value`, `index` and `column` (`CORVINA.TABLE.CellSlotProps`). The slot replaces the content of the
36
+ column's `type`, now optional in `TableHeaderEntry`. Columns without a slot render as before.
28
37
 
29
38
  Fixed:
30
39
 
@@ -35,11 +44,12 @@ Fixed:
35
44
  - The package only contains the files it needs (61 → 27): no type declarations of internal modules or of the web
36
45
  components entry, no favicon and logo.
37
46
 
38
- ### `@corvina/web-components-library` (from 0.2.3)
47
+ ### `@corvina/web-components-library` (from 0.2.4)
39
48
 
40
- - Vuetify 4 and Vue 3.5 bundled (were Vuetify 3.7 and Vue 3.5). JS 1.06 → 1.27 MB (gzip 265 → 322 KB),
49
+ - Vuetify 4 and Vue 3.5 bundled (were Vuetify 3.7 and Vue 3.5). JS 1.06 → 1.23 MB (gzip 265 → 312 KB),
41
50
  mostly Vuetify 4 itself.
42
- - No dependencies declared: Vue, Vuetify and the other libraries are bundled (0.2.3 declared `vue` and
51
+ - Runs on the browsers listed above (Browsers): 0.2.4 was transpiled to ES2016.
52
+ - No dependencies declared: Vue, Vuetify and the other libraries are bundled (0.2.4 declared `vue` and
43
53
  `vuetify` 3, installed without being used).
44
54
  - The bundle runs without a bundler (`<script type="module">`): `process` is no longer referenced.
45
55
  - `web-components-library.css` (the page CSS) only has the `--color-*` variables (108 KB → 0.6 KB): no Vuetify
@@ -25,6 +25,8 @@
25
25
  font-variant: normal;
26
26
  text-transform: none;
27
27
  line-height: 1;
28
+ /* override the vertical-align: middle that the :before inherits from .v-icon (vuetify reset), which pushes the glyph down */
29
+ vertical-align: top;
28
30
 
29
31
  /* Better Font Rendering =========== */
30
32
  -webkit-font-smoothing: antialiased;
package/index.d.ts CHANGED
@@ -180,6 +180,17 @@ export declare namespace CORVINA {
180
180
  /** Name of the prop that will contain the row item */
181
181
  itemPropName?: string;
182
182
  }
183
+ /** Props of the `item.<key>` cell slot */
184
+ interface CellSlotProps {
185
+ /** The row item */
186
+ item: any;
187
+ /** `item[key]` */
188
+ value: any;
189
+ /** Index of the row in the page */
190
+ index: number;
191
+ /** The column's header entry */
192
+ column: TableHeaderEntry;
193
+ }
183
194
  /** Use it with `HEADER_CELL_TYPE.VUE_COMPONENT` */
184
195
  interface HeaderVueComponent {
185
196
  /** Name of the Vue component or Vue component definition */
@@ -221,8 +232,8 @@ export declare namespace CORVINA {
221
232
  customHeaderCellGeneratorFunction?: () => HTMLElement;
222
233
  /** The `HeaderVueComponent` describing the vuejs component to use */
223
234
  headerVueComponent?: HeaderVueComponent;
224
- /** Type of the row cells */
225
- type: CELL_TYPE;
235
+ /** Type of the row cells. Not needed when the table has the column's `item.<key>` slot. */
236
+ type?: CELL_TYPE;
226
237
  /** Function that generates the cell virtual dom */
227
238
  customCellGeneratorFunction?: (item: any, header: TableHeaderEntry) => HTMLElement;
228
239
  /** Name of the property of the item object containing the `VueComponent` data */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvina/web-components-library",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "private": false,
5
5
  "description": "Corvina web components (custom elements)",
6
6
  "homepage": "https://docs.components.corvina.cloud/",