@mrcaktuz/sds-react 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  Synerglass Design System — React components, styled on import.
4
4
  Usable in a React project (Vite, Next.js) and in a **Vaadin Flow** application through React adapters (see [Usage in Vaadin](#usage-in-vaadin)).
5
5
 
6
- > **Vaadin version for this release: `25.3.6`**
7
- > Built and tested with `@vaadin/react-components` `25.3.6` (peer dependency `~25.3.6`: patches `25.3.x` accepted).
8
- > In a Vaadin application, set `<vaadin.version>25.3.6</vaadin.version>` in the `pom.xml` (see [Versions](#versions)).
6
+ > **Vaadin platform for this release: `25.3.5`**
7
+ > In a Vaadin application, set `<vaadin.version>25.3.5</vaadin.version>` in the `pom.xml` (see [Versions](#versions)).
8
+ > Built and tested with `@vaadin/react-components` `25.3.5`, the npm version pinned by this platform.
9
+ > Peer dependency `~25.3.5`: later `25.3.x` patches are accepted.
9
10
 
10
11
  ## Installation
11
12
 
@@ -18,10 +19,14 @@ Peer dependencies, provided by the host project:
18
19
  | Package | Version | Needed for |
19
20
  | -------------------------- | --------- | ------------------------------------------------------------------------------ |
20
21
  | `react`, `react-dom` | `^19` | Every component |
21
- | `@vaadin/react-components` | `~25.3.6` | The `/grid` entry only. In a Vaadin app, the version comes from the `pom.xml` |
22
+ | `@vaadin/react-components` | `~25.3.5` | The `/grid` entry only. In a Vaadin app, the version comes from the `pom.xml` |
22
23
 
23
24
  npm (v7+) and pnpm install peer dependencies automatically; Yarn needs them added by hand.
24
25
 
26
+ **Outside of Vaadin** (Vite, Next.js), pin every `@vaadin/*` package to the same version with `overrides` (npm, pnpm) or `resolutions` (Yarn).
27
+ The Vaadin packages depend on each other with `~` ranges: without overrides, some resolve to a newer patch and two versions end up in the page.
28
+ A Vaadin application does not need this: Flow already pins them from the platform version.
29
+
25
30
  ## Entries
26
31
 
27
32
  | Import | Components | Server-side rendering |
@@ -161,19 +166,31 @@ The DS publishes the React components; **the adapters and Java classes are writt
161
166
 
162
167
  ### Versions
163
168
 
164
- **The DS decides the Vaadin version**: each release of this package states the Vaadin version it requires (`@vaadin/react-components` peer dependency).
165
- In a Vaadin application, the `pom.xml` sets the version of every `@vaadin/*` package: if it differs, the application version wins and the grid theme may break silently.
169
+ **The DS decides the Vaadin version**: each release of this package states the Vaadin platform it requires.
170
+ In a Vaadin application, the `pom.xml` sets the version of every `@vaadin/*` npm package: if it differs, the application version wins and the grid theme may break silently.
171
+
172
+ Two version numbers, not to be mixed up:
173
+
174
+ | Number | Where | For this release |
175
+ | ------------------------------------------------------- | ----------------------------------------- | ---------------- |
176
+ | **Vaadin platform** (Maven `com.vaadin:vaadin-bom`) | `vaadin.version` in the `pom.xml` | `25.3.5` |
177
+ | **Web components** (npm `@vaadin/react-components`…) | Peer dependency of this package | `25.3.5` |
178
+
179
+ The web components get their own patches on npm before a platform release includes them
180
+ (e.g. `@vaadin/react-components` `25.3.6` exists on npm, the `25.3.6` platform does not yet).
181
+ The DS always targets a **released platform** and the npm versions it pins
182
+ (see `versions.json` in [vaadin/platform](https://github.com/vaadin/platform), at the platform tag).
166
183
 
167
184
  On each DS release, update both in **the same pull request**:
168
185
 
169
186
  ```xml
170
- <vaadin.version>25.3.6</vaadin.version> <!-- must match the DS release notes -->
187
+ <vaadin.version>25.3.5</vaadin.version> <!-- must match the DS release notes -->
171
188
  ```
172
189
 
173
190
  ```java
174
191
  public final class SdsVersion {
175
192
  public static final String PACKAGE = "@mrcaktuz/sds-react";
176
- public static final String VERSION = "0.1.0"; // the only line to change on each DS release
193
+ public static final String VERSION = "0.1.1"; // the only line to change on each DS release
177
194
  }
178
195
  ```
179
196
 
package/dist/grid.cjs CHANGED
@@ -90,7 +90,7 @@ function dashToCamelCase(dash) {
90
90
  return dash.replace(/-[a-z]/gu, (m) => m[1].toUpperCase());
91
91
  }
92
92
  var experimentalMap = {};
93
- function defineCustomElement(CustomElement, version = "25.3.6") {
93
+ function defineCustomElement(CustomElement, version = "25.3.5") {
94
94
  Object.defineProperty(CustomElement, "version", {
95
95
  get() {
96
96
  return version;
@@ -5938,7 +5938,6 @@ var import_lit14 = require("lit");
5938
5938
  var import_lit13 = require("lit");
5939
5939
  var checkable = (part, propName = part) => import_lit13.css`
5940
5940
  :host {
5941
- position: relative;
5942
5941
  align-items: baseline;
5943
5942
  column-gap: var(--vaadin-${(0, import_lit13.unsafeCSS)(propName)}-gap, var(--vaadin-gap-s));
5944
5943
  grid-template: none;
@@ -5955,6 +5954,7 @@ var checkable = (part, propName = part) => import_lit13.css`
5955
5954
  }
5956
5955
 
5957
5956
  [part='${(0, import_lit13.unsafeCSS)(part)}'],
5957
+ ::slotted(input),
5958
5958
  [part='label'],
5959
5959
  ::slotted(label) {
5960
5960
  grid-row: 1;
@@ -5970,7 +5970,8 @@ var checkable = (part, propName = part) => import_lit13.css`
5970
5970
  cursor: var(--_cursor);
5971
5971
  }
5972
5972
 
5973
- [part='${(0, import_lit13.unsafeCSS)(part)}'] {
5973
+ [part='${(0, import_lit13.unsafeCSS)(part)}'],
5974
+ ::slotted(input) {
5974
5975
  grid-column: 1;
5975
5976
  }
5976
5977
 
@@ -5999,28 +6000,17 @@ var checkable = (part, propName = part) => import_lit13.css`
5999
6000
 
6000
6001
  /* visually hidden */
6001
6002
  ::slotted(input) {
6003
+ cursor: inherit;
6004
+ align-self: stretch;
6002
6005
  appearance: none;
6003
6006
  cursor: var(--_cursor);
6004
- /* Cover the label row to make the space next to the label clickable */
6005
- position: absolute;
6006
- /* Explicit end line, or the input also covers the helper rows */
6007
- grid-row: 1 / 2;
6008
- grid-column: 1 / -1;
6009
- /* Ensure minimum click target (WCAG) */
6010
- inset-block: min(0px, (100% - 24px) / 2);
6011
- inset-inline: min(0px, (100% - 24px) / 2);
6012
6007
  /* Override 16px from iOS UA stylesheet and CSS resets */
6013
6008
  width: auto !important;
6014
6009
  height: auto !important;
6015
- margin: 0 !important;
6016
- }
6017
-
6018
- [part='label'] {
6019
- justify-self: start;
6020
- }
6021
-
6022
- ::slotted(label) {
6023
- position: relative;
6010
+ /* Ensure minimum click target (WCAG) */
6011
+ margin: min(0px, (24px - 100%) / -2) !important;
6012
+ /* Extend the input to cover the gap between the checkbox/radio and label */
6013
+ margin-inline-end: calc(min(0px, (24px - 100%) / -2) - var(--vaadin-${(0, import_lit13.unsafeCSS)(propName)}-gap, var(--vaadin-gap-s))) !important;
6024
6014
  }
6025
6015
 
6026
6016
  /* Control container (checkbox, radio button) */
@@ -6111,9 +6101,14 @@ var checkable = (part, propName = part) => import_lit13.css`
6111
6101
  grid-column: 1;
6112
6102
  }
6113
6103
 
6114
- [part='${(0, import_lit13.unsafeCSS)(part)}'] {
6104
+ [part='${(0, import_lit13.unsafeCSS)(part)}'],
6105
+ ::slotted(input) {
6115
6106
  grid-column: 2;
6116
6107
  }
6108
+
6109
+ ::slotted(input) {
6110
+ margin-inline: calc(min(0px, (24px - 100%) / -2) - var(--vaadin-${(0, import_lit13.unsafeCSS)(propName)}-gap, var(--vaadin-gap-s))) 0 !important;
6111
+ }
6117
6112
  }
6118
6113
 
6119
6114
  @media (forced-colors: active) {
package/dist/grid.js CHANGED
@@ -45,7 +45,7 @@ function dashToCamelCase(dash) {
45
45
  return dash.replace(/-[a-z]/gu, (m) => m[1].toUpperCase());
46
46
  }
47
47
  var experimentalMap = {};
48
- function defineCustomElement(CustomElement, version = "25.3.6") {
48
+ function defineCustomElement(CustomElement, version = "25.3.5") {
49
49
  Object.defineProperty(CustomElement, "version", {
50
50
  get() {
51
51
  return version;
@@ -5893,7 +5893,6 @@ import { css as css8 } from "lit";
5893
5893
  import { css as css7, unsafeCSS as unsafeCSS2 } from "lit";
5894
5894
  var checkable = (part, propName = part) => css7`
5895
5895
  :host {
5896
- position: relative;
5897
5896
  align-items: baseline;
5898
5897
  column-gap: var(--vaadin-${unsafeCSS2(propName)}-gap, var(--vaadin-gap-s));
5899
5898
  grid-template: none;
@@ -5910,6 +5909,7 @@ var checkable = (part, propName = part) => css7`
5910
5909
  }
5911
5910
 
5912
5911
  [part='${unsafeCSS2(part)}'],
5912
+ ::slotted(input),
5913
5913
  [part='label'],
5914
5914
  ::slotted(label) {
5915
5915
  grid-row: 1;
@@ -5925,7 +5925,8 @@ var checkable = (part, propName = part) => css7`
5925
5925
  cursor: var(--_cursor);
5926
5926
  }
5927
5927
 
5928
- [part='${unsafeCSS2(part)}'] {
5928
+ [part='${unsafeCSS2(part)}'],
5929
+ ::slotted(input) {
5929
5930
  grid-column: 1;
5930
5931
  }
5931
5932
 
@@ -5954,28 +5955,17 @@ var checkable = (part, propName = part) => css7`
5954
5955
 
5955
5956
  /* visually hidden */
5956
5957
  ::slotted(input) {
5958
+ cursor: inherit;
5959
+ align-self: stretch;
5957
5960
  appearance: none;
5958
5961
  cursor: var(--_cursor);
5959
- /* Cover the label row to make the space next to the label clickable */
5960
- position: absolute;
5961
- /* Explicit end line, or the input also covers the helper rows */
5962
- grid-row: 1 / 2;
5963
- grid-column: 1 / -1;
5964
- /* Ensure minimum click target (WCAG) */
5965
- inset-block: min(0px, (100% - 24px) / 2);
5966
- inset-inline: min(0px, (100% - 24px) / 2);
5967
5962
  /* Override 16px from iOS UA stylesheet and CSS resets */
5968
5963
  width: auto !important;
5969
5964
  height: auto !important;
5970
- margin: 0 !important;
5971
- }
5972
-
5973
- [part='label'] {
5974
- justify-self: start;
5975
- }
5976
-
5977
- ::slotted(label) {
5978
- position: relative;
5965
+ /* Ensure minimum click target (WCAG) */
5966
+ margin: min(0px, (24px - 100%) / -2) !important;
5967
+ /* Extend the input to cover the gap between the checkbox/radio and label */
5968
+ margin-inline-end: calc(min(0px, (24px - 100%) / -2) - var(--vaadin-${unsafeCSS2(propName)}-gap, var(--vaadin-gap-s))) !important;
5979
5969
  }
5980
5970
 
5981
5971
  /* Control container (checkbox, radio button) */
@@ -6066,9 +6056,14 @@ var checkable = (part, propName = part) => css7`
6066
6056
  grid-column: 1;
6067
6057
  }
6068
6058
 
6069
- [part='${unsafeCSS2(part)}'] {
6059
+ [part='${unsafeCSS2(part)}'],
6060
+ ::slotted(input) {
6070
6061
  grid-column: 2;
6071
6062
  }
6063
+
6064
+ ::slotted(input) {
6065
+ margin-inline: calc(min(0px, (24px - 100%) / -2) - var(--vaadin-${unsafeCSS2(propName)}-gap, var(--vaadin-gap-s))) 0 !important;
6066
+ }
6072
6067
  }
6073
6068
 
6074
6069
  @media (forced-colors: active) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mrcaktuz/sds-react",
3
3
  "description": "Synerglass Design System — React components, styled on import",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
@@ -26,7 +26,7 @@
26
26
  "peerDependencies": {
27
27
  "react": ">=19 <20",
28
28
  "react-dom": ">=19 <20",
29
- "@vaadin/react-components": "~25.3.6"
29
+ "@vaadin/react-components": "~25.3.5"
30
30
  },
31
31
  "dependencies": {
32
32
  "@lit/react": "^1.0.8",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/react": "^19.3.0",
40
- "@vaadin/react-components": "~25.3.6",
40
+ "@vaadin/react-components": "25.3.5",
41
41
  "react": "^19.3.1",
42
42
  "tsup": "^8.5.1",
43
43
  "typescript": "^5.9.3"