@react-md/core 1.0.0-next.18 → 1.0.0-next.19

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.
@@ -546,9 +546,40 @@ $variables: (
546
546
  $disable-textarea or not
547
547
  $disable-select
548
548
  {
549
- $text-field-floating: ", .rmd-text-field:where(:not(:placeholder-shown))" +
550
- if($disable-select, "", " ~ :where(:not(.rmd-select))") +
551
- " ~ &--floating";
549
+ // The label should automatically float while the input is not focused
550
+ // and there is a value the label _should_ always be the next element.
551
+ // However, password managers might inject an element in the DOM
552
+ // before the label to display their way of autocompleting the field
553
+ // so it also needs to support the label appearing anywhere after the
554
+ // input instead of the next element. It should also ignore the select
555
+ // field since it is more of a hidden input. Here are a few examples:
556
+ //
557
+ // ```html
558
+ // <!-- Simple TextField with no password manager -->
559
+ // <input class="rmd-text-field" type="text" />
560
+ // <label class="rmd-label rmd-label--floating"></label>
561
+ //
562
+ // <!-- Simple TextField with password manager -->
563
+ // <input class="rmd-text-field" type="text" />
564
+ // <div style="position: relative !important; ...">...</div>
565
+ // <label class="rmd-label rmd-label--floating"></label>
566
+ //
567
+ // <!-- Simple Select -->
568
+ // <input class="rmd-select rmd-text-field" type="text" />
569
+ // <span class="rmd-label rmd-label--floating"></span>
570
+ // ```
571
+ $valued-input: ", .rmd-text-field:where(:not(:placeholder-shown))";
572
+
573
+ // so this targets the TextField with no password manager
574
+ $valued-input-with-floating-label-next-element: $valued-input +
575
+ " + &--floating";
576
+ // this targets the TextField with a password manager and excludes the
577
+ // Select
578
+ $valued-input-with-floating-label-any-relative-element: $valued-input +
579
+ " ~ :where(:not(.rmd-select)) ~ &--floating";
580
+
581
+ $text-field-floating: $valued-input-with-floating-label-next-element +
582
+ $valued-input-with-floating-label-any-relative-element;
552
583
 
553
584
  $floating-active-selector: $floating-active-selector +
554
585
  ", .rmd-text-field-container:focus-within &--floating" +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-md/core",
3
- "version": "1.0.0-next.18",
3
+ "version": "1.0.0-next.19",
4
4
  "description": "The core components and functionality for react-md.",
5
5
  "type": "module",
6
6
  "sass": "./dist/_core.scss",
@@ -58,17 +58,17 @@
58
58
  "devDependencies": {
59
59
  "@jest/globals": "^29.7.0",
60
60
  "@jest/types": "^29.6.3",
61
- "@microsoft/api-extractor": "^7.48.1",
61
+ "@microsoft/api-extractor": "^7.49.1",
62
62
  "@mlaursen/eslint-config": "^6.0.0",
63
- "@swc/cli": "^0.5.2",
64
- "@swc/core": "^1.10.1",
63
+ "@swc/cli": "^0.6.0",
64
+ "@swc/core": "^1.10.4",
65
65
  "@swc/jest": "^0.2.37",
66
66
  "@testing-library/dom": "^10.4.0",
67
67
  "@testing-library/jest-dom": "^6.6.3",
68
68
  "@testing-library/react": "^16.1.0",
69
69
  "@testing-library/user-event": "^14.5.2",
70
- "@types/lodash": "^4.17.13",
71
- "@types/node": "^22.10.2",
70
+ "@types/lodash": "^4.17.14",
71
+ "@types/node": "^22.10.5",
72
72
  "@types/react": "^18.3.12",
73
73
  "@types/react-dom": "^18.3.1",
74
74
  "chokidar": "^4.0.3",
@@ -89,10 +89,10 @@
89
89
  "stylelint-config-recommended-scss": "^14.1.0",
90
90
  "stylelint-order": "^6.0.4",
91
91
  "stylelint-scss": "^6.10.0",
92
- "ts-morph": "^24.0.0",
92
+ "ts-morph": "^25.0.0",
93
93
  "ts-node": "^10.9.2",
94
94
  "tsx": "^4.19.2",
95
- "typescript": "^5.5.4"
95
+ "typescript": "^5.7.3"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "@jest/globals": "^29.7.0",