react-core-ts 4.0.2 → 4.0.3

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.
Files changed (31) hide show
  1. package/dist/AutoCompleteWithSelectedList.js +1 -1
  2. package/dist/AutoCompleteWithSelectedList.js.map +1 -1
  3. package/dist/AutoCompleteWithTabFilter.js +1 -1
  4. package/dist/AutoCompleteWithTabFilter.js.map +1 -1
  5. package/dist/AutoCompleteWithTreeStructure.js +1 -1
  6. package/dist/AutoCompleteWithTreeStructure.js.map +1 -1
  7. package/dist/ExpandableAutoComplete.js +1 -1
  8. package/dist/ExpandableAutoComplete.js.map +1 -1
  9. package/dist/ReactAutoComplete.js +1 -1
  10. package/dist/ReactAutoComplete.js.map +1 -1
  11. package/dist/ReactAutoCompleteDropdown.js +3 -3
  12. package/dist/ReactAutoCompleteDropdown.js.map +1 -1
  13. package/dist/ReactAutoCompleteSuggections.js +28 -28
  14. package/dist/ReactAutoCompleteSuggections.js.map +1 -1
  15. package/dist/ReactAutoCompleteTableView.js +3 -3
  16. package/dist/ReactAutoCompleteTableView.js.map +1 -1
  17. package/dist/ReactTextArea.js +7 -7
  18. package/dist/ReactTextArea.js.map +1 -1
  19. package/dist/ReactTextField.js +29 -25
  20. package/dist/ReactTextField.js.map +1 -1
  21. package/dist/dummyAutoCompleteWithSelectedList.js +1 -1
  22. package/dist/dummyAutoCompleteWithSelectedList.js.map +1 -1
  23. package/dist/generated/stylesContent.d.ts +1 -1
  24. package/dist/generated/stylesContent.js +1 -1
  25. package/dist/generated/stylesContent.js.map +1 -1
  26. package/dist/react-core-ts.css +293 -35
  27. package/dist/styles/components/autocomplete.css +123 -7
  28. package/dist/styles/components/modern-input.css +159 -0
  29. package/dist/styles/global.css +2 -1
  30. package/dist/styles/library-entry.css +1 -0
  31. package/package.json +1 -1
@@ -22,6 +22,49 @@
22
22
  --table-hover: #f8f8f8;
23
23
  }
24
24
 
25
+ /*
26
+ * Scoped border-box so TextField / Autocomplete heights match pre-4.0.2 behavior.
27
+ * (Removing global body * broke height because padding+border were added outside h-*).
28
+ */
29
+ .qbs-textfield,
30
+ .qbs-textfield *,
31
+ .qbs-autocomplete-selected-comp,
32
+ .qbs-autocomplete-selected-comp *,
33
+ .qbs-autocomplete-suggestions,
34
+ .qbs-autocomplete-suggestions *,
35
+ .autocomplete-suggections,
36
+ .autocomplete-suggections *,
37
+ .qbs-expandable-container,
38
+ .qbs-expandable-container *,
39
+ .tooltip-container,
40
+ .tooltip-container *,
41
+ .react-core-ts-search-container,
42
+ .react-core-ts-search-container *,
43
+ .qbs-autocomplete-container-table-view,
44
+ .qbs-autocomplete-container-table-view * {
45
+ box-sizing: border-box;
46
+ }
47
+
48
+ /* Explicit TextField size heights — reliable even if utility order fights other CSS */
49
+ .qbs-textfield input.qbs-h-10,
50
+ input.qbs-peer.qbs-h-10 {
51
+ height: 2.5rem;
52
+ min-height: 2.5rem;
53
+ box-sizing: border-box;
54
+ }
55
+ .qbs-textfield input.qbs-h-\[25px\],
56
+ input.qbs-peer.qbs-h-\[25px\] {
57
+ height: 25px;
58
+ min-height: 25px;
59
+ box-sizing: border-box;
60
+ }
61
+ .qbs-textfield input.qbs-h-\[34px\],
62
+ input.qbs-peer.qbs-h-\[34px\] {
63
+ height: 34px;
64
+ min-height: 34px;
65
+ box-sizing: border-box;
66
+ }
67
+
25
68
  .custom-spinner {
26
69
  width: 24px !important; /* w-6 */
27
70
  height: 24px; /* h-6 */
@@ -399,7 +442,8 @@ ul {
399
442
  position: absolute;
400
443
  right: 25px;
401
444
  z-index: 99;
402
- top: 18px;
445
+ top: 50%;
446
+ transform: translateY(-50%);
403
447
  flex-wrap: wrap;
404
448
  }
405
449
 
@@ -425,7 +469,8 @@ ul {
425
469
  position: absolute;
426
470
  right: 8px;
427
471
  z-index: 99;
428
- top: 6.5px;
472
+ top: 50%;
473
+ transform: translateY(-50%);
429
474
  flex-wrap: wrap;
430
475
  }
431
476
 
@@ -824,18 +869,89 @@ span.dropdown-search-icon {
824
869
 
825
870
  /* TextField Inner Search Button */
826
871
  .inner-search-button {
872
+ position: absolute;
827
873
  background: #f8f8f8;
828
- border-radius: 6px;
829
- padding: 0px 8px;
874
+ border: none;
875
+ border-radius: 0 3px 3px 0;
876
+ padding: 0 8px;
830
877
  display: flex;
831
878
  align-items: center;
832
- justify-content: center;
879
+ justify-content: center;
833
880
  cursor: pointer;
834
- height: 38px;
881
+ height: calc(100% - 2px);
835
882
  width: 38px;
836
883
  top: 1px;
837
- right: 2px;
884
+ right: 1px;
885
+ z-index: 2;
886
+ box-sizing: border-box;
838
887
  }
839
888
  .search-btn-input {
840
889
  padding-right: 38px;
890
+ }
891
+
892
+ /*
893
+ * Keep end icons inside the input border.
894
+ * (Sibling flex + qbs-w-full previously pushed icons outside the bordered input.)
895
+ */
896
+ .qbs-autocomplete-adorement-wrapper,
897
+ .qbs-input-adorement-wrapper {
898
+ position: absolute;
899
+ top: 0;
900
+ right: 0;
901
+ bottom: 0;
902
+ display: flex;
903
+ align-items: center;
904
+ z-index: 2;
905
+ pointer-events: none;
906
+ }
907
+ .qbs-autocomplete-adorement-wrapper > *,
908
+ .qbs-input-adorement-wrapper > * {
909
+ pointer-events: auto;
910
+ }
911
+
912
+ .qbs-autocomplete-adorement-wrapper .adorement,
913
+ .qbs-autocomplete-adorement-wrapper .qbs-autocomplete-adorement,
914
+ .qbs-input-adorement-wrapper .adorement {
915
+ position: relative !important;
916
+ right: auto !important;
917
+ top: auto !important;
918
+ height: 100%;
919
+ padding-right: 4px;
920
+ box-sizing: border-box;
921
+ }
922
+
923
+ /* Avoid Tailwind `container` utility collision (prefix makes it `.qbs-container`) */
924
+ .qbs-selected-comp-normal {
925
+ position: relative;
926
+ display: block;
927
+ width: 100%;
928
+ max-width: none;
929
+ }
930
+
931
+ .qbs-autocomplete-selected-comp {
932
+ position: relative;
933
+ display: block;
934
+ width: 100%;
935
+ }
936
+
937
+ .qbs-autocomplete-selected-comp > .qbs-textfield-expandable.qbs-normal,
938
+ .qbs-autocomplete-selected-comp > .qbs-textfield-expandable.qbs-normal .qbs-textfield-default {
939
+ display: block;
940
+ width: 100%;
941
+ }
942
+
943
+ /* Tools icon should sit inside the field, vertically centered */
944
+ .qbs-tools-drop-btn {
945
+ position: absolute !important;
946
+ right: 8px !important;
947
+ top: 50% !important;
948
+ transform: translateY(-50%);
949
+ z-index: 2;
950
+ display: inline-flex;
951
+ align-items: center;
952
+ justify-content: center;
953
+ background: transparent;
954
+ border: none;
955
+ padding: 0;
956
+ cursor: pointer;
841
957
  }
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Self-contained modern TextField / Autocomplete input styles.
3
+ * These used to live in host apps; the library must ship them for Vite / local preview.
4
+ */
5
+
6
+ /* Base peer input (height + border) */
7
+ input.qbs-peer,
8
+ .qbs-textfield input[class*='qbs-h-'] {
9
+ box-sizing: border-box !important;
10
+ display: block;
11
+ width: 100%;
12
+ height: 2.5rem !important;
13
+ min-height: 2.5rem !important;
14
+ margin: 0;
15
+ border-style: solid;
16
+ border-width: 1px;
17
+ border-color: #d0d5dd;
18
+ border-radius: 4px;
19
+ background-color: #fff;
20
+ color: #111827;
21
+ font-size: 0.875rem;
22
+ font-weight: 400;
23
+ line-height: 1.25rem;
24
+ padding-left: 0.875rem;
25
+ padding-right: 0.875rem;
26
+ padding-top: 0;
27
+ padding-bottom: 0;
28
+ outline: none;
29
+ -webkit-appearance: none;
30
+ appearance: none;
31
+ }
32
+
33
+ input.qbs-peer.qbs-h-\[34px\],
34
+ .qbs-textfield input.qbs-h-\[34px\] {
35
+ height: 34px !important;
36
+ min-height: 34px !important;
37
+ }
38
+
39
+ input.qbs-peer.qbs-h-\[25px\],
40
+ .qbs-textfield input.qbs-h-\[25px\] {
41
+ height: 25px !important;
42
+ min-height: 25px !important;
43
+ font-size: 0.75rem;
44
+ }
45
+
46
+ input.qbs-peer:focus {
47
+ border-color: #001f3f;
48
+ }
49
+
50
+ input.qbs-peer:disabled {
51
+ color: #98a2b3;
52
+ background-color: #f2f4f7;
53
+ cursor: not-allowed;
54
+ }
55
+
56
+ /* Host-token fallbacks (prefixed utilities that are not in default Tailwind theme) */
57
+ .qbs-border-input-light {
58
+ border-color: #d0d5dd;
59
+ }
60
+ .qbs-text-input-text {
61
+ color: #111827;
62
+ }
63
+ .qbs-text-input-disabled,
64
+ .disabled\:qbs-text-input-disabled:disabled {
65
+ color: #98a2b3;
66
+ }
67
+ .qbs-bg-disabled,
68
+ .disabled\:qbs-bg-disabled:disabled {
69
+ background-color: #f2f4f7;
70
+ }
71
+ .qbs-text-grey-dark {
72
+ color: #344054;
73
+ }
74
+ .qbs-text-error-light {
75
+ color: #f04438;
76
+ }
77
+ .qbs-text-grey-medium {
78
+ color: #667085;
79
+ }
80
+ .qbs-bg-bodyBG {
81
+ background-color: #f9fafb;
82
+ }
83
+ .qbs-text-xxs {
84
+ font-size: 0.625rem;
85
+ line-height: 0.875rem;
86
+ }
87
+ .qbs-input-outline {
88
+ outline: none;
89
+ }
90
+ .text-common {
91
+ font-size: 0.875rem;
92
+ line-height: 1.25rem;
93
+ color: #101828;
94
+ }
95
+ .text-error {
96
+ color: #f04438;
97
+ }
98
+ .text-grey-secondary {
99
+ color: #667085;
100
+ }
101
+ .text-text-primary {
102
+ color: #101828;
103
+ }
104
+
105
+ /* Floating label: hide native placeholder when modern label is used */
106
+ .placeholder-transparent::placeholder {
107
+ color: transparent !important;
108
+ }
109
+ .placeholder-transparent::-webkit-input-placeholder {
110
+ color: transparent !important;
111
+ }
112
+ .focus\:placeholder-grey-secondary:focus::placeholder {
113
+ color: #98a2b3;
114
+ }
115
+
116
+ .modern-input-label-truncate {
117
+ max-width: calc(100% - 1.75rem);
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ white-space: nowrap;
121
+ pointer-events: none;
122
+ background-color: transparent;
123
+ }
124
+
125
+ .modern-input-label-size {
126
+ font-size: 0.875rem;
127
+ line-height: 1.25rem;
128
+ }
129
+
130
+ .modern-input-peer-focus-label-size,
131
+ .peer-focus\:modern-input-peer-focus-label-size {
132
+ font-size: 0.75rem;
133
+ line-height: 1rem;
134
+ }
135
+
136
+ /* When peer has value / is focused, shrink label (Tailwind peer-focus variant class name) */
137
+ .qbs-peer:focus ~ .peer-focus\:modern-input-peer-focus-label-size,
138
+ .qbs-peer:not(:placeholder-shown) ~ .modern-input-peer-focus-label-size,
139
+ .qbs-peer:not(:placeholder-shown) ~ label.modern-input-label-truncate {
140
+ font-size: 0.75rem;
141
+ line-height: 1rem;
142
+ }
143
+
144
+ .active-input-label-bg {
145
+ background-color: #fff;
146
+ padding-left: 0.25rem;
147
+ padding-right: 0.25rem;
148
+ }
149
+
150
+ .disabled-input-label-bg {
151
+ background-color: #f2f4f7;
152
+ padding-left: 0.25rem;
153
+ padding-right: 0.25rem;
154
+ }
155
+
156
+ /* Ensure bordered utility actually draws a border */
157
+ .qbs-border {
158
+ border-style: solid;
159
+ }
@@ -2,7 +2,8 @@
2
2
  @tailwind components;
3
3
  @tailwind utilities;
4
4
 
5
+ @import './components/modern-input.css';
5
6
  @import './components/autocomplete.css';
6
7
  @import './components/treedropdown.css';
7
8
  @import './components/selectedautocomplete.css';
8
- @import './components/tooltip.css';
9
+ @import './components/tooltip.css';
@@ -1,6 +1,7 @@
1
1
  @tailwind components;
2
2
  @tailwind utilities;
3
3
 
4
+ @import './components/modern-input.css';
4
5
  @import './components/autocomplete.css';
5
6
  @import './components/treedropdown.css';
6
7
  @import './components/selectedautocomplete.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-core-ts",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "React Components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",