@scalewing/react 1.59.0 → 1.59.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scalewing/react
2
2
 
3
+ ## 1.59.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3f78164: An xs `Field`'s own text input (`input` of a typed kind, or `textarea`) now draws at the xs size: the document canvas's `[data-theme]` typed-input rule outranked `.sw-field-xs`, so the control kept the md min-height (44 px) and the inherited font size beside a 28 px xs `Select`. The xs rule now matches it under `[data-theme]` (caption type, xs min-height and padding), and on a coarse pointer the control is the 44 px touch target. Adorned and search inputs keep their frames' rules. No API change.
8
+
3
9
  ## 1.59.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,6 @@
1
1
  import { typographyVariants } from '@scalewing/tokens';
2
2
  import { appHeaderBarClassCatalog, cssAppHeaderBarClasses, } from './css-app-header-bar.js';
3
+ import { typedInputs } from './css-document.js';
3
4
  import { cssNavWordsClasses, navWordsClassCatalog } from './css-nav-words.js';
4
5
  import { zIndex } from './stacking.js';
5
6
  import { coarsePointerQuery, touchTarget } from './touch-target.js';
@@ -71,6 +72,26 @@ ${cssNavWordsClasses()}
71
72
  padding-inline-end: calc(
72
73
  var(--sw-control-xs-padding-inline) + var(--sw-space-5)
73
74
  );
75
+ }
76
+
77
+ /*
78
+ * The document canvas sizes every typed input under [data-theme] (0,2,1),
79
+ * which outranks the xs rule above, so an xs field's own text control
80
+ * matches it there. Adorned and search inputs sit one level deeper and keep
81
+ * their frames' rules. On a coarse pointer it is the 44 px touch target.
82
+ */
83
+ [data-theme] .sw-field-xs > :is(${typedInputs}) {
84
+ font-size: ${caption.fontSize}px;
85
+ letter-spacing: ${caption.letterSpacing}px;
86
+ line-height: ${caption.lineHeight}px;
87
+ min-height: var(--sw-control-xs-min-height);
88
+ padding-inline: var(--sw-control-xs-padding-inline);
89
+ }
90
+
91
+ @media ${coarsePointerQuery} {
92
+ [data-theme] .sw-field-xs > :is(${typedInputs}) {
93
+ min-height: ${touchTarget};
94
+ }
74
95
  }`;
75
96
  }
76
97
  export function chromeClassCatalog() {
package/dist/styles.css CHANGED
@@ -5045,6 +5045,26 @@ button.sw-date-toggle-day[aria-disabled='true'] {
5045
5045
  );
5046
5046
  }
5047
5047
 
5048
+ /*
5049
+ * The document canvas sizes every typed input under [data-theme] (0,2,1),
5050
+ * which outranks the xs rule above, so an xs field's own text control
5051
+ * matches it there. Adorned and search inputs sit one level deeper and keep
5052
+ * their frames' rules. On a coarse pointer it is the 44 px touch target.
5053
+ */
5054
+ [data-theme] .sw-field-xs > :is(input[type='text'], input[type='email'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], input:not([type]), textarea) {
5055
+ font-size: 13px;
5056
+ letter-spacing: -0.08px;
5057
+ line-height: 18px;
5058
+ min-height: var(--sw-control-xs-min-height);
5059
+ padding-inline: var(--sw-control-xs-padding-inline);
5060
+ }
5061
+
5062
+ @media (pointer: coarse) {
5063
+ [data-theme] .sw-field-xs > :is(input[type='text'], input[type='email'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], input:not([type]), textarea) {
5064
+ min-height: var(--sw-control-md-min-height);
5065
+ }
5066
+ }
5067
+
5048
5068
  .sw-section-nav-list {
5049
5069
  border-bottom: 1px solid var(--sw-color-border);
5050
5070
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalewing/react",
3
- "version": "1.59.0",
3
+ "version": "1.59.1",
4
4
  "description": "Scalewing DOM components and package-owned CSS utilities.",
5
5
  "type": "module",
6
6
  "license": "MIT",