@corvina/web-components-library 1.0.0-beta.4 → 1.0.0-beta.6

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
@@ -27,6 +27,11 @@ Breaking changes:
27
27
  - The components use the Vuetify defaults of the app (e.g. the `variant` of fields), not the library ones.
28
28
  - `--color-*` variables: the package CSS now has the components' palette (`--color-primary` #496177,
29
29
  `--color-highlight` #01a3dd, ...). 0.2.4 ended with an older palette (#004688, #00b0c7, ...).
30
+ - `CorvinaTable` (paginated) is as tall as its rows, at most as its container, as in frontend-new: with few rows the
31
+ footer follows the last one, with more than fit it stays at the bottom while the rows scroll. It no longer fills
32
+ its container with a white area (`style="height: 100%"` on the root and on the `v-data-table-server` are gone).
33
+ A container that sizes the table with `height` keeps working; a flex container needs `min-height: 0` on its
34
+ items. With `infiniteScroll` the table still fills its container.
30
35
 
31
36
  Added:
32
37
 
@@ -35,25 +40,49 @@ Added:
35
40
  with `item`, `value`, `index` and `column` (`CORVINA.TABLE.CellSlotProps`). The slot replaces the content of the
36
41
  column's `type`, now optional in `TableHeaderEntry`. Columns without a slot render as before.
37
42
  - `CorvinaTabs` (`<corvina-tabs>`): the tabs of a page with the Corvina look, `tabs` (`CORVINA.TABS.TAB[]`) and
38
- `selected` owned by the parent (`update:selected` on a click), the content of the selected tab in the default slot
39
- and actions on the right of the bar in the `append` slot.
43
+ `selected` owned by the parent (`update:selected` on a click), a content for each tab in the `tab.<value>` slots
44
+ (only the selected one is shown; web components: `slot="tab.<value>"` children), or one in the default slot, and
45
+ actions on the right of the bar in the `append` slot.
46
+ - `CorvinaDateRange` (`<corvina-date-range>`): a range of days for the breadcrumb, `model` (`CORVINA.DATE_RANGE.RANGE`,
47
+ ISO days) owned by the parent (`update:model` from the accept button), `presets` (`CORVINA.DATE_RANGE.PRESET[]`) and
48
+ the start and end calendars; highlighted while a range is set, underlined as frontend-new's field (highlight color
49
+ on hover).
50
+ - `CorvinaHelpPanel` (`<corvina-help-panel>`): the help of a page as in frontend-new, the lower half of the window slid up
51
+ from the bottom, `open` owned by the parent (`update:open` from the close button), `title` and `closeLabel`, the help
52
+ in the default slot with the docs look (headings, lists, tables; in the web components the slotted content keeps
53
+ the page's styles).
54
+ - `CorvinaBreadcrumb` sort, as in frontend-new: `allowedSorts` (`CORVINA.BREADCRUMB.SORT_BY[]`) shows a sort dropdown
55
+ and the direction button after the slot, `sort` (`CORVINA.BREADCRUMB.SORT`, `key` and `desc`) owned by the parent
56
+ (`update:sort`), `sortPlaceholder`. Without `allowedSorts` there is no sort.
40
57
  - `CorvinaBreadcrumb` `filterBy`: the `key` of the filter selected in the filter key dropdown, selected again when
41
58
  `allowedFilters` change (e.g. on another tab).
42
59
 
43
60
  Fixed:
44
61
 
45
62
  - `CorvinaBreadcrumb`: a filter key selected in the dropdown is dropped when `allowedFilters` no longer contain it.
63
+ - `CorvinaBreadcrumb` looks like frontend-new's breadcrumb: full-height light dividers (`CorvinaBreadcrumbDivider` too,
64
+ was a 25px dark line), the filter area 860px wide and starting with a divider, the filter key dropdown 13em on the
65
+ g1 background without the underline, the filter value field 16px from it.
66
+ - `CorvinaTable` rows are highlighted on hover (Vuetify's standard `hover`), the expanded content is not, as in
67
+ frontend-new; the items-per-page select of the footer is underlined, with "Rows per page:" (Vuetify's
68
+ `dataTable.itemsPerPageText`, translated) and the selected value of its menu in the highlight color, as in
69
+ frontend-new.
70
+ - Scrollbars as in frontend-new: thin, a highlight thumb on g1, in every component (the `custom-scrollbars` class
71
+ on their root, also in the package CSS for the app's own containers).
46
72
  - Type declarations: relative imports have the `.js` extension, so they resolve with TypeScript
47
73
  `moduleResolution` `node16`/`nodenext` too (the package is now `"type": "module"`).
48
74
  - `AutocompleteFilter` (breadcrumb and table filters) threw on focus (Vuetify 2 API): the menu now opens on focus.
75
+ - `AutocompleteFilter` imports `VCombobox` from `vuetify/components/VCombobox`, not from the `vuetify/components`
76
+ barrel: an app whose Vite dev server does not pre-bundle Vuetify loaded every Vuetify component (a Log page with
77
+ the breadcrumb: 777 → 484 module requests).
49
78
  - Breadcrumb filter chip arrows are 25px as in the web components (the Vuetify 52px rule won before).
50
79
  - The package only contains the files it needs (61 → 27): no type declarations of internal modules or of the web
51
80
  components entry, no favicon and logo.
52
81
 
53
82
  ### `@corvina/web-components-library` (from 0.2.4)
54
83
 
55
- - 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),
56
- mostly Vuetify 4 itself.
84
+ - Vuetify 4 and Vue 3.5 bundled (were Vuetify 3.7 and Vue 3.5). JS 1.06 → 1.38 MB (gzip 265 → 344 KB),
85
+ mostly Vuetify 4 itself (its date picker for `CorvinaDateRange` included).
57
86
  - Runs on the browsers listed above (Browsers): 0.2.4 was transpiled to ES2016.
58
87
  - No dependencies declared: Vue, Vuetify and the other libraries are bundled (0.2.4 declared `vue` and
59
88
  `vuetify` 3, installed without being used).
package/index.d.ts CHANGED
@@ -73,6 +73,20 @@ export declare namespace CORVINA {
73
73
  /** Text shown in the chip instead of the value: the `itemsTitleKey` property of the selected item for FILTER_BY_ENUM.AUTOCOMPLETE */
74
74
  title?: string;
75
75
  }
76
+ /** An array of this structure defines what the user can sort by. */
77
+ interface SORT_BY {
78
+ /** Unique key of the sort, `SORT.key` when selected */
79
+ key: string;
80
+ /** Title shown in the sort dropdown */
81
+ title: string;
82
+ }
83
+ /** The sort selected by the user. */
84
+ interface SORT {
85
+ /** Key of the selected `SORT_BY` */
86
+ key: string;
87
+ /** Descending order */
88
+ desc: boolean;
89
+ }
76
90
  interface CUSTOM_VUE_COMPONENT {
77
91
  /** Name of the Vue component or Vue component definition */
78
92
  component: string | Component;
@@ -112,6 +126,22 @@ export declare namespace CORVINA {
112
126
  dataQa?: string;
113
127
  }
114
128
  }
129
+ namespace DATE_RANGE {
130
+ /** A range of days of CorvinaDateRange, both days included. */
131
+ interface RANGE {
132
+ /** First day, ISO `yyyy-MM-dd` */
133
+ start: string;
134
+ /** Last day, ISO `yyyy-MM-dd` */
135
+ end: string;
136
+ }
137
+ /** A preset of CorvinaDateRange: a button above the calendars that selects its range. */
138
+ interface PRESET {
139
+ /** Text of the button */
140
+ title: string;
141
+ /** The range it selects, `null` to clear the selection */
142
+ range: RANGE | null;
143
+ }
144
+ }
115
145
  namespace TABLE {
116
146
  /** Horizontal alignment of a column (applied as `text-*` and `justify-*` classes) */
117
147
  enum ALIGN {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvina/web-components-library",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "private": false,
5
5
  "description": "Corvina web components (custom elements)",
6
6
  "homepage": "https://docs.components.corvina.cloud/",
@@ -6,7 +6,7 @@
6
6
  "name": "corvina-breadcrumb",
7
7
  "description": {
8
8
  "kind": "markdown",
9
- "value": "Corvina web component `<corvina-breadcrumb>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:searchModel` — `[value: string]`\n- `update:activeControl` — `[value: CORVINA.BREADCRUMB.ACTIVE_CONTROL]`\n- `update:filters` — `[value: CORVINA.BREADCRUMB.FILTER[]]`\n- `update:filterBy` — `[value: CORVINA.BREADCRUMB.FILTER_BY]`\n\n**Slots:** `default`"
9
+ "value": "Corvina web component `<corvina-breadcrumb>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:searchModel` — `[value: string]`\n- `update:activeControl` — `[value: CORVINA.BREADCRUMB.ACTIVE_CONTROL]`\n- `update:filters` — `[value: CORVINA.BREADCRUMB.FILTER[]]`\n- `update:filterBy` — `[value: CORVINA.BREADCRUMB.FILTER_BY]`\n- `update:sort` — `[value: CORVINA.BREADCRUMB.SORT]`\n\n**Slots:** `default`"
10
10
  },
11
11
  "attributes": [
12
12
  {
@@ -123,6 +123,27 @@
123
123
  "kind": "markdown",
124
124
  "value": "Property `filtersCustomComponent`: `CORVINA.BREADCRUMB.CUSTOM_VUE_COMPONENT`\n\n⚠️ Complex value: set it as a JavaScript property (`element.filtersCustomComponent = …`), not as an HTML attribute."
125
125
  }
126
+ },
127
+ {
128
+ "name": "allowed-sorts",
129
+ "description": {
130
+ "kind": "markdown",
131
+ "value": "Property `allowedSorts`: `CORVINA.BREADCRUMB.SORT_BY[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.allowedSorts = …`), not as an HTML attribute."
132
+ }
133
+ },
134
+ {
135
+ "name": "sort",
136
+ "description": {
137
+ "kind": "markdown",
138
+ "value": "Property `sort`: `CORVINA.BREADCRUMB.SORT | null`\n\nDefault: `null`\n\n⚠️ Complex value: set it as a JavaScript property (`element.sort = …`), not as an HTML attribute."
139
+ }
140
+ },
141
+ {
142
+ "name": "sort-placeholder",
143
+ "description": {
144
+ "kind": "markdown",
145
+ "value": "Property `sortPlaceholder`: `string`\n\nDefault: `Sort by:`"
146
+ }
126
147
  }
127
148
  ]
128
149
  },
@@ -266,6 +287,110 @@
266
287
  }
267
288
  ]
268
289
  },
290
+ {
291
+ "name": "corvina-date-range",
292
+ "description": {
293
+ "kind": "markdown",
294
+ "value": "Corvina web component `<corvina-date-range>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:model` — `[value: CORVINA.DATE_RANGE.RANGE | null]`"
295
+ },
296
+ "attributes": [
297
+ {
298
+ "name": "model",
299
+ "description": {
300
+ "kind": "markdown",
301
+ "value": "Property `model`: `CORVINA.DATE_RANGE.RANGE | null`\n\nDefault: `null`\n\n⚠️ Complex value: set it as a JavaScript property (`element.model = …`), not as an HTML attribute."
302
+ }
303
+ },
304
+ {
305
+ "name": "presets",
306
+ "description": {
307
+ "kind": "markdown",
308
+ "value": "Property `presets`: `CORVINA.DATE_RANGE.PRESET[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.presets = …`), not as an HTML attribute."
309
+ }
310
+ },
311
+ {
312
+ "name": "start-label",
313
+ "description": {
314
+ "kind": "markdown",
315
+ "value": "Property `startLabel`: `string`\n\nDefault: `Start Date`"
316
+ }
317
+ },
318
+ {
319
+ "name": "end-label",
320
+ "description": {
321
+ "kind": "markdown",
322
+ "value": "Property `endLabel`: `string`\n\nDefault: `End Date`"
323
+ }
324
+ },
325
+ {
326
+ "name": "separator",
327
+ "description": {
328
+ "kind": "markdown",
329
+ "value": "Property `separator`: `string`\n\nDefault: ` to `"
330
+ }
331
+ },
332
+ {
333
+ "name": "min",
334
+ "description": {
335
+ "kind": "markdown",
336
+ "value": "Property `min`: `string`"
337
+ }
338
+ },
339
+ {
340
+ "name": "max",
341
+ "description": {
342
+ "kind": "markdown",
343
+ "value": "Property `max`: `string`"
344
+ }
345
+ },
346
+ {
347
+ "name": "first-day-of-week",
348
+ "description": {
349
+ "kind": "markdown",
350
+ "value": "Property `firstDayOfWeek`: `number`\n\nDefault: `1`"
351
+ }
352
+ },
353
+ {
354
+ "name": "disabled",
355
+ "description": {
356
+ "kind": "markdown",
357
+ "value": "Property `disabled`: `boolean`\n\nDefault: `false`"
358
+ },
359
+ "valueSet": "v"
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "name": "corvina-help-panel",
365
+ "description": {
366
+ "kind": "markdown",
367
+ "value": "Corvina web component `<corvina-help-panel>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:open` — `[value: boolean]`\n\n**Slots:** `default`"
368
+ },
369
+ "attributes": [
370
+ {
371
+ "name": "open",
372
+ "description": {
373
+ "kind": "markdown",
374
+ "value": "Property `open`: `boolean`\n\nDefault: `false`"
375
+ },
376
+ "valueSet": "v"
377
+ },
378
+ {
379
+ "name": "title",
380
+ "description": {
381
+ "kind": "markdown",
382
+ "value": "Property `title`: `string`\n\nDefault: `Need help?`"
383
+ }
384
+ },
385
+ {
386
+ "name": "close-label",
387
+ "description": {
388
+ "kind": "markdown",
389
+ "value": "Property `closeLabel`: `string`\n\nDefault: `Close`"
390
+ }
391
+ }
392
+ ]
393
+ },
269
394
  {
270
395
  "name": "corvina-icon",
271
396
  "description": {