@gjsify/adwaita-nativescript 0.41.0 → 0.42.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-nativescript",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -47,10 +47,10 @@
47
47
  "design-system"
48
48
  ],
49
49
  "dependencies": {
50
- "@gjsify/adwaita-core": "^0.41.0",
51
- "@gjsify/adwaita-fonts": "^0.41.0",
52
- "@gjsify/adwaita-icons": "^0.41.0",
53
- "@gjsify/native-platform": "^0.41.0"
50
+ "@gjsify/adwaita-core": "^0.42.0",
51
+ "@gjsify/adwaita-fonts": "^0.42.0",
52
+ "@gjsify/adwaita-icons": "^0.42.0",
53
+ "@gjsify/native-platform": "^0.42.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@nativescript/core": "*"
@@ -61,8 +61,8 @@
61
61
  }
62
62
  },
63
63
  "devDependencies": {
64
- "@gjsify/cli": "^0.41.0",
65
- "@gjsify/unit": "^0.41.0",
64
+ "@gjsify/cli": "^0.42.0",
65
+ "@gjsify/unit": "^0.42.0",
66
66
  "@types/node": "^25.9.2",
67
67
  "typescript": "^6.0.3"
68
68
  },
@@ -74,6 +74,59 @@ Page.adw-window {
74
74
  margin: 0;
75
75
  }
76
76
 
77
+ /* ===== Card (the documented `.card` style class) ===== */
78
+
79
+ /* One surface, two spellings — the pattern `.boxed-list` above already uses.
80
+ * Upstream `.card` and the boxed list ARE the same recipe
81
+ * (stylesheet/widgets/_misc.scss:197-236); `@gjsify/adwaita-web` factors both out
82
+ * of a single `%card` placeholder, so this repeats the colours above rather than
83
+ * inventing a second card. `.adw-card` is the spelling a view copied from the
84
+ * browser twin carries, and it was styled by NOTHING here: a NativeScript view
85
+ * setting `className = 'adw-card'` rendered a transparent box with square corners.
86
+ *
87
+ * No box-shadow, no border: the NS CSS subset has neither, which is why
88
+ * `.boxed-list` has neither. The padding is the one thing the ELEMENT adds over
89
+ * the bare class in the browser port (`--spacing-l`, 18) — a bare `.card` in
90
+ * libadwaita deliberately has none, but every NS view reaching for this name is
91
+ * the element's analogue. */
92
+ .card,
93
+ .adw-card {
94
+ background-color: #ffffff;
95
+ color: rgba(0, 0, 6, 0.8);
96
+ border-radius: 12;
97
+ }
98
+
99
+ /* The padding is the ELEMENT's, not the class's, and both other renderers split them
100
+ * exactly here: libadwaita's `%card` recipe is background / foreground / radius / shadow
101
+ * and no padding (_misc.scss:197-236), and `@gjsify/adwaita-web` puts
102
+ * `padding: var(--spacing-l)` on `adw-card, .adw-card` alone (scss/_card.scss:16-23,
103
+ * `--spacing-l: 18px`). A bare `.card` is a surface you fill yourself. */
104
+ .adw-card {
105
+ padding: 18;
106
+ }
107
+
108
+ /* ===== Label utility classes ===== */
109
+
110
+ /* `.dimmed` is the whole of libadwaita's `dim_label`: an opacity, applied wherever the
111
+ * class lands. This theme only had it as `.adw-shortcut-label .dimmed` below — a
112
+ * SCOPED rule for the separator inside a shortcut label — so a Label carrying `dimmed`
113
+ * anywhere else rendered at full strength. The storybook's shortcut-label story does
114
+ * exactly that (`shortcut-label.ns.ts:70`, a Label added to the GridLayout as a SIBLING
115
+ * of the AdwShortcutLabel), while its browser twin sets the same class and hits
116
+ * `@gjsify/adwaita-web`'s unscoped rule (scss/_labels.scss:48) — one renderer dimmed
117
+ * that column, the other did not.
118
+ *
119
+ * Opacity only, so there is no dark-scheme twin: `--dim-opacity: 55%`
120
+ * (_colors.scss:319) is the same number in both. The scoped rule below still adds the
121
+ * separator's size, colour and padding on top of it, at higher specificity.
122
+ *
123
+ * It is also the first of `_labels.scss`'s utility set to land here; the rest
124
+ * (`.title-1`…`.title-4`, `.accent`/`.success`/`.warning`, `.heading`, `.numeric`, …)
125
+ * is an open entry in status/open-todos.md. */
126
+ .dimmed {
127
+ opacity: 0.55;
128
+ }
129
+
77
130
  /* ===== Rows ===== */
78
131
 
79
132
  .adw-row {
@@ -1532,6 +1585,12 @@ Page.ns-dark.adw-window {
1532
1585
  color: #ffffff;
1533
1586
  }
1534
1587
 
1588
+ .ns-dark .card,
1589
+ .ns-dark .adw-card {
1590
+ background-color: #34343a;
1591
+ color: #ffffff;
1592
+ }
1593
+
1535
1594
  .ns-dark .adw-row,
1536
1595
  .ns-dark .adw-action-row {
1537
1596
  background-color: transparent;