diff --git a/.changeset/pre.json b/.changeset/pre.json index fa7f7389..d8c9c9b5 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -11,6 +11,7 @@ "accordion-mycsc-colors", "alert-heading-prop", "alert-mycsc-redesign", + "app-defaults", "autocomplete-external-mode", "autocomplete-option-content-attributes", "autocomplete-search-magnifier", @@ -19,6 +20,9 @@ "chart-data-export", "chart-slots-vivid", "chart-tokens", + "ci-gate", + "component-tests-harness", + "conformance-suites", "dark-mode-mycsc-retune", "dark-mode-subtle-ink", "dark-mode-vivid-retune", @@ -26,9 +30,12 @@ "divider-token-dark-mode", "docs-lint-formatting-gate", "dropdown-hide-details-restore", + "example-smoke", "export-default-seeds", "fix-autocomplete-textfield-states", + "fullscreen-panel-narrow-viewport", "ghost-soft-tint", + "harness-monotonic-clock", "logo-white-in-dark", "menu-item-active-and-icon", "modal-focus-ring-and-initial-focus", @@ -36,6 +43,8 @@ "progress-bar-aria-busy", "progress-circle-component", "radio-self-rendering", + "regression-specs-wave-1", + "regression-specs-wave-2", "select-all-row", "select-autocomplete-multiple", "select-selected-row-check", @@ -47,6 +56,7 @@ "tooltip-popover-components", "transient-panel-peek", "tree-select-component", + "visual-baselines-linux-only", "vue-rewrite-major" ] } diff --git a/packages/csc-ui-react/CHANGELOG.md b/packages/csc-ui-react/CHANGELOG.md index 2930a821..ac2153ce 100644 --- a/packages/csc-ui-react/CHANGELOG.md +++ b/packages/csc-ui-react/CHANGELOG.md @@ -1,5 +1,51 @@ # @cscfi/csc-ui-react +## 4.0.0-alpha.15 + +### Minor Changes + +- [#275](https://github.com/CSCfi/ui/pull/275) [`5855ff9`](https://github.com/CSCfi/ui/commit/5855ff924450fadbb3267d17b61a2ffeeaae60a5) Thanks [@razorfever](https://github.com/razorfever)! - Add app-wide prop defaults (ADR-0048): `applyDefaults()` sets a preference + prop once for every instance of a tag, and `resetDefaults()` clears it. + + - `applyDefaults({ 'c-text-field': { labelOnTop: true } })` makes every text + field label on top; `applyDefaults({ 'c-select': { texts } })` translates + every select in one call. Later calls merge with earlier ones, a key set to + `undefined` clears it, and mounted elements follow live — a locale switch is + one call. + - Only defaultable props take part, badged "app default" in each component's + Properties table and typed as `AppDefaults`: `labelOnTop`, `hideDetails`, + `shadow` and `size` on c-text-field, c-select, c-autocomplete and + c-tree-select; `itemsPerPage` on the three list fields; `texts` on those + three and c-data-table. An unknown tag or prop throws. + - An explicit attribute or property on an instance always wins over the app + default; `texts` merges key by key over the built-in strings. Both functions + are re-exported from `@cscfi/csc-ui-react`. + + Two visible changes for these props: when unset, the element property now + reads `undefined` instead of the built-in (`el.labelOnTop`, `el.size`, + `el.itemsPerPage`), and the host no longer carries the reflected default + attributes `size="default"` / `items-per-page="6"`. + +- [#275](https://github.com/CSCfi/ui/pull/275) [`fd4bf56`](https://github.com/CSCfi/ui/commit/fd4bf56ba38095517dc0c9f95fe0bea263d29e5d) Thanks [@razorfever](https://github.com/razorfever)! - Value-selection fields open a fullscreen panel on narrow viewports. Below + 760px, `c-autocomplete` and `c-tree-select` no longer anchor their panel under + the field: it covers the viewport with a heading row (the field's label and a + close button), the search input pinned beneath it and the options filling the + rest, following the on-screen keyboard so the search stays visible. The page + behind the panel is inert until it closes. `c-select`'s existing phone layout + now covers the whole viewport (no gaps below the small viewport or at the + corners), follows the keyboard the same way and gains the same heading row. + The close button's label is the new `closePanel` text; the row exposes the + `heading-row`, `heading` and `close` parts. + + Transient panels (`c-menu`, `c-popover`, `c-autocomplete`, `c-tree-select`) no + longer close when a scroll or drag gesture starts outside them: light dismiss + now needs the press and its release both outside, as for a native popover. + +### Patch Changes + +- Updated dependencies [[`5855ff9`](https://github.com/CSCfi/ui/commit/5855ff924450fadbb3267d17b61a2ffeeaae60a5), [`fd4bf56`](https://github.com/CSCfi/ui/commit/fd4bf56ba38095517dc0c9f95fe0bea263d29e5d)]: + - @cscfi/csc-ui@4.0.0-alpha.15 + ## 4.0.0-alpha.14 ### Minor Changes diff --git a/packages/csc-ui-react/package.json b/packages/csc-ui-react/package.json index c649878b..d8baed59 100644 --- a/packages/csc-ui-react/package.json +++ b/packages/csc-ui-react/package.json @@ -1,6 +1,6 @@ { "name": "@cscfi/csc-ui-react", - "version": "4.0.0-alpha.14", + "version": "4.0.0-alpha.15", "description": "React components for the @cscfi/csc-ui custom elements, generated from the Custom Elements Manifest.", "author": "My CSC Team ", "type": "module", diff --git a/packages/csc-ui/CHANGELOG.md b/packages/csc-ui/CHANGELOG.md index e59e8806..e519373d 100644 --- a/packages/csc-ui/CHANGELOG.md +++ b/packages/csc-ui/CHANGELOG.md @@ -1,5 +1,46 @@ # @cscfi/csc-ui +## 4.0.0-alpha.15 + +### Minor Changes + +- [#275](https://github.com/CSCfi/ui/pull/275) [`5855ff9`](https://github.com/CSCfi/ui/commit/5855ff924450fadbb3267d17b61a2ffeeaae60a5) Thanks [@razorfever](https://github.com/razorfever)! - Add app-wide prop defaults (ADR-0048): `applyDefaults()` sets a preference + prop once for every instance of a tag, and `resetDefaults()` clears it. + + - `applyDefaults({ 'c-text-field': { labelOnTop: true } })` makes every text + field label on top; `applyDefaults({ 'c-select': { texts } })` translates + every select in one call. Later calls merge with earlier ones, a key set to + `undefined` clears it, and mounted elements follow live — a locale switch is + one call. + - Only defaultable props take part, badged "app default" in each component's + Properties table and typed as `AppDefaults`: `labelOnTop`, `hideDetails`, + `shadow` and `size` on c-text-field, c-select, c-autocomplete and + c-tree-select; `itemsPerPage` on the three list fields; `texts` on those + three and c-data-table. An unknown tag or prop throws. + - An explicit attribute or property on an instance always wins over the app + default; `texts` merges key by key over the built-in strings. Both functions + are re-exported from `@cscfi/csc-ui-react`. + + Two visible changes for these props: when unset, the element property now + reads `undefined` instead of the built-in (`el.labelOnTop`, `el.size`, + `el.itemsPerPage`), and the host no longer carries the reflected default + attributes `size="default"` / `items-per-page="6"`. + +- [#275](https://github.com/CSCfi/ui/pull/275) [`fd4bf56`](https://github.com/CSCfi/ui/commit/fd4bf56ba38095517dc0c9f95fe0bea263d29e5d) Thanks [@razorfever](https://github.com/razorfever)! - Value-selection fields open a fullscreen panel on narrow viewports. Below + 760px, `c-autocomplete` and `c-tree-select` no longer anchor their panel under + the field: it covers the viewport with a heading row (the field's label and a + close button), the search input pinned beneath it and the options filling the + rest, following the on-screen keyboard so the search stays visible. The page + behind the panel is inert until it closes. `c-select`'s existing phone layout + now covers the whole viewport (no gaps below the small viewport or at the + corners), follows the keyboard the same way and gains the same heading row. + The close button's label is the new `closePanel` text; the row exposes the + `heading-row`, `heading` and `close` parts. + + Transient panels (`c-menu`, `c-popover`, `c-autocomplete`, `c-tree-select`) no + longer close when a scroll or drag gesture starts outside them: light dismiss + now needs the press and its release both outside, as for a native popover. + ## 4.0.0-alpha.14 ### Minor Changes diff --git a/packages/csc-ui/package.json b/packages/csc-ui/package.json index 0e9236a5..68aa4483 100644 --- a/packages/csc-ui/package.json +++ b/packages/csc-ui/package.json @@ -1,6 +1,6 @@ { "name": "@cscfi/csc-ui", - "version": "4.0.0-alpha.14", + "version": "4.0.0-alpha.15", "description": "Vue 3-based replacement for @cscfi/csc-ui — same custom element tag names, Vue v-model contract.", "type": "module", "main": "./dist/csc-ui.js",