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

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
@@ -34,9 +34,15 @@ Added:
34
34
  - `CorvinaTable` cell slots `item.<key>` (as in Vuetify's tables): a column's cells written in the template,
35
35
  with `item`, `value`, `index` and `column` (`CORVINA.TABLE.CellSlotProps`). The slot replaces the content of the
36
36
  column's `type`, now optional in `TableHeaderEntry`. Columns without a slot render as before.
37
+ - `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.
40
+ - `CorvinaBreadcrumb` `filterBy`: the `key` of the filter selected in the filter key dropdown, selected again when
41
+ `allowedFilters` change (e.g. on another tab).
37
42
 
38
43
  Fixed:
39
44
 
45
+ - `CorvinaBreadcrumb`: a filter key selected in the dropdown is dropped when `allowedFilters` no longer contain it.
40
46
  - Type declarations: relative imports have the `.js` extension, so they resolve with TypeScript
41
47
  `moduleResolution` `node16`/`nodenext` too (the package is now `"type": "module"`).
42
48
  - `AutocompleteFilter` (breadcrumb and table filters) threw on focus (Vuetify 2 API): the menu now opens on focus.
package/index.d.ts CHANGED
@@ -101,6 +101,17 @@ export declare namespace CORVINA {
101
101
  X_LARGE = "x-large"
102
102
  }
103
103
  }
104
+ namespace TABS {
105
+ /** A tab of CorvinaTabs. */
106
+ interface TAB {
107
+ /** Unique value of the tab: `selected` and the `update:selected` event use it */
108
+ value: string | number;
109
+ /** Text shown in the tab */
110
+ title: string;
111
+ /** The data-qa attribute of the tab, for testing and automation */
112
+ dataQa?: string;
113
+ }
114
+ }
104
115
  namespace TABLE {
105
116
  /** Horizontal alignment of a column (applied as `text-*` and `justify-*` classes) */
106
117
  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.3",
3
+ "version": "1.0.0-beta.4",
4
4
  "private": false,
5
5
  "description": "Corvina web components (custom elements)",
6
6
  "homepage": "https://docs.components.corvina.cloud/",
@@ -103,6 +103,13 @@
103
103
  "value": "Property `allowedFilters`: `CORVINA.BREADCRUMB.FILTER_BY[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.allowedFilters = …`), not as an HTML attribute."
104
104
  }
105
105
  },
106
+ {
107
+ "name": "filter-by",
108
+ "description": {
109
+ "kind": "markdown",
110
+ "value": "Property `filterBy`: `string`"
111
+ }
112
+ },
106
113
  {
107
114
  "name": "filters",
108
115
  "description": {
@@ -598,6 +605,29 @@
598
605
  }
599
606
  }
600
607
  ]
608
+ },
609
+ {
610
+ "name": "corvina-tabs",
611
+ "description": {
612
+ "kind": "markdown",
613
+ "value": "Corvina web component `<corvina-tabs>`.\n\n**Events** (`CustomEvent`, payload in `event.detail[0]`):\n- `update:selected` — `[value: string | number]`\n\n**Slots:** `append`, `default`"
614
+ },
615
+ "attributes": [
616
+ {
617
+ "name": "tabs",
618
+ "description": {
619
+ "kind": "markdown",
620
+ "value": "Property `tabs`: `CORVINA.TABS.TAB[]`\n\n⚠️ Complex value: set it as a JavaScript property (`element.tabs = …`), not as an HTML attribute."
621
+ }
622
+ },
623
+ {
624
+ "name": "selected",
625
+ "description": {
626
+ "kind": "markdown",
627
+ "value": "Property `selected`: `string | number | null`\n\nDefault: `null`"
628
+ }
629
+ }
630
+ ]
601
631
  }
602
632
  ]
603
633
  }