react-core-ts 4.0.2 → 4.0.4

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 (34) hide show
  1. package/dist/AutoCompleteWithSelectedList.js +1 -1
  2. package/dist/AutoCompleteWithSelectedList.js.map +1 -1
  3. package/dist/AutoCompleteWithTabFilter.js +2 -2
  4. package/dist/AutoCompleteWithTabFilter.js.map +1 -1
  5. package/dist/AutoCompleteWithTreeStructure.js +2 -2
  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 +8 -8
  10. package/dist/ReactAutoComplete.js.map +1 -1
  11. package/dist/ReactAutoCompleteDropdown.js +9 -9
  12. package/dist/ReactAutoCompleteDropdown.js.map +1 -1
  13. package/dist/ReactAutoCompleteSuggections.js +34 -34
  14. package/dist/ReactAutoCompleteSuggections.js.map +1 -1
  15. package/dist/ReactAutoCompleteTableView.js +9 -9
  16. package/dist/ReactAutoCompleteTableView.js.map +1 -1
  17. package/dist/ReactTextArea.js +13 -13
  18. package/dist/ReactTextArea.js.map +1 -1
  19. package/dist/ReactTextField.js +36 -33
  20. package/dist/ReactTextField.js.map +1 -1
  21. package/dist/components/TreeNode.js +1 -1
  22. package/dist/components/TreeNode.js.map +1 -1
  23. package/dist/dummyAutoCompleteWithSelectedList.js +1 -1
  24. package/dist/dummyAutoCompleteWithSelectedList.js.map +1 -1
  25. package/dist/generated/stylesContent.d.ts +1 -1
  26. package/dist/generated/stylesContent.js +1 -1
  27. package/dist/generated/stylesContent.js.map +1 -1
  28. package/dist/react-core-ts.css +519 -46
  29. package/dist/styles/components/autocomplete.css +123 -7
  30. package/dist/styles/components/modern-input.css +209 -0
  31. package/dist/styles/components/qbs-fallbacks.css +174 -0
  32. package/dist/styles/global.css +3 -1
  33. package/dist/styles/library-entry.css +2 -0
  34. 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,209 @@
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:not(.qbs-input-error) {
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
+ /*
57
+ * Error state — must beat `input.qbs-peer` / `:focus` (element+class specificity).
58
+ * Broken Tailwind classes like `focus:qbs-border-error-[#FDA29B]` never ship in CSS.
59
+ */
60
+ input.qbs-peer.qbs-input-error,
61
+ .qbs-textfield input.qbs-input-error,
62
+ .qbs-autocomplete-container-table-view input.qbs-input-error {
63
+ border-color: #fda29b !important;
64
+ outline: none;
65
+ }
66
+
67
+ input.qbs-peer.qbs-input-error:focus,
68
+ .qbs-textfield input.qbs-input-error:focus,
69
+ .qbs-autocomplete-container-table-view input.qbs-input-error:focus {
70
+ border-color: #fda29b !important;
71
+ outline: none;
72
+ box-shadow: 0 0 0 3px rgba(253, 162, 155, 0.35);
73
+ }
74
+
75
+ /* Host-token fallbacks (prefixed utilities that are not in default Tailwind theme) */
76
+ .qbs-border-input-light {
77
+ border-color: #d0d5dd;
78
+ }
79
+ .qbs-text-input-text {
80
+ color: #111827;
81
+ }
82
+ .qbs-text-input-disabled,
83
+ .disabled\:qbs-text-input-disabled:disabled {
84
+ color: #98a2b3;
85
+ }
86
+ .qbs-bg-disabled,
87
+ .disabled\:qbs-bg-disabled:disabled {
88
+ background-color: #f2f4f7;
89
+ }
90
+ .qbs-text-grey-dark {
91
+ color: #344054;
92
+ }
93
+ .qbs-text-error-light {
94
+ color: #f04438;
95
+ }
96
+ .qbs-text-error-icon,
97
+ .qbs-text-error-label {
98
+ color: #f04438;
99
+ }
100
+ .qbs-text-warning-icon,
101
+ .qbs-text-warning-label {
102
+ color: #f79009;
103
+ }
104
+ .qbs-text-tick-label {
105
+ color: #28b440;
106
+ }
107
+ .qbs-text-grey-medium {
108
+ color: #667085;
109
+ }
110
+ .qbs-border-grey-light {
111
+ border-color: #d0d5dd;
112
+ }
113
+ .qbs-text-table-bodyColor {
114
+ color: #667085;
115
+ }
116
+ .placeholder-input-label::placeholder {
117
+ color: #667085;
118
+ }
119
+ .qbs-bg-bodyBG {
120
+ background-color: #f9fafb;
121
+ }
122
+ .qbs-text-xxs {
123
+ font-size: 0.625rem;
124
+ line-height: 0.875rem;
125
+ }
126
+ .qbs-input-outline {
127
+ outline: none;
128
+ }
129
+ .text-common {
130
+ font-size: 0.875rem;
131
+ line-height: 1.25rem;
132
+ color: #101828;
133
+ }
134
+ .text-error {
135
+ color: #f04438;
136
+ }
137
+ .text-grey-secondary {
138
+ color: #667085;
139
+ }
140
+ .text-text-primary {
141
+ color: #101828;
142
+ }
143
+
144
+ /* Floating label: hide native placeholder when modern label is used */
145
+ .placeholder-transparent::placeholder {
146
+ color: transparent !important;
147
+ }
148
+ .placeholder-transparent::-webkit-input-placeholder {
149
+ color: transparent !important;
150
+ }
151
+ .focus\:placeholder-grey-secondary:focus::placeholder {
152
+ color: #98a2b3;
153
+ }
154
+
155
+ .modern-input-label-truncate {
156
+ max-width: calc(100% - 1.75rem);
157
+ overflow: hidden;
158
+ text-overflow: ellipsis;
159
+ white-space: nowrap;
160
+ pointer-events: none;
161
+ background-color: transparent;
162
+ }
163
+
164
+ .modern-input-label-size {
165
+ font-size: 0.875rem;
166
+ line-height: 1.25rem;
167
+ }
168
+
169
+ .modern-input-peer-focus-label-size,
170
+ .peer-focus\:modern-input-peer-focus-label-size {
171
+ font-size: 0.75rem;
172
+ line-height: 1rem;
173
+ }
174
+
175
+ /* When peer has value / is focused, shrink label (Tailwind peer-focus variant class name) */
176
+ .qbs-peer:focus ~ .peer-focus\:modern-input-peer-focus-label-size,
177
+ .qbs-peer:not(:placeholder-shown) ~ .modern-input-peer-focus-label-size,
178
+ .qbs-peer:not(:placeholder-shown) ~ label.modern-input-label-truncate {
179
+ font-size: 0.75rem;
180
+ line-height: 1rem;
181
+ }
182
+
183
+ .active-input-label-bg {
184
+ background-color: #fff;
185
+ padding-left: 0.25rem;
186
+ padding-right: 0.25rem;
187
+ }
188
+
189
+ .disabled-input-label-bg {
190
+ background-color: #f2f4f7;
191
+ padding-left: 0.25rem;
192
+ padding-right: 0.25rem;
193
+ }
194
+
195
+ /* Ensure bordered utility actually draws a border */
196
+ .qbs-border {
197
+ border-style: solid;
198
+ }
199
+
200
+ /* Utilities that apps expect but Tailwind may not emit / lose specificity */
201
+ .qbs-z-1 {
202
+ z-index: 1;
203
+ }
204
+ .qbs-start-\[14px\] {
205
+ inset-inline-start: 14px;
206
+ }
207
+ .hover\:qbs-text-dark:hover {
208
+ color: #101828;
209
+ }
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Semantic / host-token fallbacks that Tailwind may not emit, or that
3
+ * need guaranteed styles when the library is consumed in Vite apps.
4
+ */
5
+
6
+ /* --- Missing important / RTL utilities --- */
7
+ .\!qbs-pt-\[10px\] {
8
+ padding-top: 10px !important;
9
+ }
10
+ .\!qbs-pl-\[45px\] {
11
+ padding-left: 45px !important;
12
+ }
13
+
14
+ /* TextArea RTL peer-focus nudge (class used in ReactTextArea) */
15
+ [dir='rtl'] .qbs-peer:focus ~ .rtl\:peer-focus\:qbs-translate-x-1\/6,
16
+ .qbs-peer:focus ~ .rtl\:peer-focus\:qbs-translate-x-1\/6:where([dir='rtl'] *) {
17
+ transform: translateX(16.666667%);
18
+ }
19
+
20
+ /* --- Labels / selected chrome --- */
21
+ .qbs-label-text,
22
+ .labels.qbs-label-text {
23
+ font-size: 12px;
24
+ font-weight: 500;
25
+ color: #344054;
26
+ line-height: 16px;
27
+ }
28
+ .qbs-selected-label-text {
29
+ color: #344054;
30
+ font-size: 14px;
31
+ font-weight: 500;
32
+ line-height: 20px;
33
+ white-space: nowrap;
34
+ }
35
+ .qbs-text-hundred-plus {
36
+ font-size: 10px;
37
+ letter-spacing: -0.02em;
38
+ }
39
+ .qbs-text-grey-label {
40
+ color: #667085;
41
+ font-size: 0.875rem;
42
+ }
43
+
44
+ /* --- Search-on-button chrome --- */
45
+ .qbs-btn-search-on {
46
+ background: transparent;
47
+ border: none;
48
+ border-radius: 4px;
49
+ color: #667085;
50
+ cursor: pointer;
51
+ display: inline-flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ }
55
+ .qbs-btn-search-on:disabled {
56
+ opacity: 0.7;
57
+ cursor: not-allowed;
58
+ }
59
+ .qbs-btn-search-on:focus-visible {
60
+ outline: 2px solid #cbd5e1;
61
+ outline-offset: 1px;
62
+ }
63
+
64
+ /* --- Adornment hooks --- */
65
+ .qbs-custom-dorpdown-adorement,
66
+ .qbs-auto-dorpdown-adorement,
67
+ .qbs-autocomplete-adorement {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ gap: 4px;
71
+ height: 100%;
72
+ padding-right: 4px;
73
+ box-sizing: border-box;
74
+ }
75
+ .adorement {
76
+ display: inline-flex;
77
+ align-items: center;
78
+ }
79
+
80
+ /* --- Loader / empty dropdown padding --- */
81
+ .qbs-autocomplete-loader {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ width: 100%;
86
+ min-height: 64px;
87
+ padding-top: 4rem;
88
+ box-sizing: border-box;
89
+ }
90
+
91
+ /* --- Suggestion list (Name/Count autocomplete) --- */
92
+ .qbs-autocomplete-with-suggection {
93
+ width: 100%;
94
+ }
95
+ .qbs-suggection-list {
96
+ margin-top: 4px;
97
+ width: 100%;
98
+ }
99
+ .qbs-suggection-item {
100
+ cursor: pointer;
101
+ padding-top: 4px;
102
+ padding-bottom: 4px;
103
+ }
104
+ .qbs-suggection-item:hover {
105
+ background-color: #f8f8f8;
106
+ }
107
+ .qbs-suggection-label {
108
+ color: #344054;
109
+ font-size: 0.75rem;
110
+ line-height: 1rem;
111
+ }
112
+ .qbs-suggection-count {
113
+ background-color: #f97316;
114
+ color: #fff;
115
+ }
116
+ .qbs-autosuggection-list {
117
+ position: absolute;
118
+ z-index: 50;
119
+ }
120
+
121
+ /* Warning / success suggestion containers */
122
+ .suggection-warning-container .qbs-peer {
123
+ border-color: #fdb022;
124
+ }
125
+ .suggection-okey-container .qbs-peer {
126
+ border-color: #28b440;
127
+ }
128
+
129
+ /* --- Radio / checkbox hooks --- */
130
+ .qbs-custom-radio-container {
131
+ gap: 8px;
132
+ }
133
+ .qbs-radio-button {
134
+ cursor: pointer;
135
+ }
136
+
137
+ /* --- Misc icon hooks (no-op safe defaults) --- */
138
+ .qbs-all-dropdow-arrow-icon,
139
+ .qbs-tools-arrow-icon,
140
+ .qbs-tree-single-select-icon {
141
+ display: inline-block;
142
+ vertical-align: middle;
143
+ }
144
+
145
+ /* Extra color tokens often expected from host design systems */
146
+ .qbs-text-gray-500 {
147
+ color: #6b7280;
148
+ }
149
+ .qbs-text-gray-700 {
150
+ color: #374151;
151
+ }
152
+ .qbs-text-gray-900 {
153
+ color: #111827;
154
+ }
155
+ .qbs-bg-gray-100 {
156
+ background-color: #f3f4f6;
157
+ }
158
+ .qbs-shadow-gray-300 {
159
+ --tw-shadow-color: #d1d5db;
160
+ }
161
+ .qbs-border-b {
162
+ border-bottom-width: 1px;
163
+ border-bottom-style: solid;
164
+ }
165
+ .qbs-border-r {
166
+ border-right-width: 1px;
167
+ border-right-style: solid;
168
+ }
169
+
170
+ /* Ensure focus outline utilities work when host CSS resets outlines */
171
+ .focus-visible\:qbs-outline-slate-100:focus-visible {
172
+ outline: 2px solid #f1f5f9;
173
+ outline-offset: 2px;
174
+ }
@@ -2,7 +2,9 @@
2
2
  @tailwind components;
3
3
  @tailwind utilities;
4
4
 
5
+ @import './components/modern-input.css';
6
+ @import './components/qbs-fallbacks.css';
5
7
  @import './components/autocomplete.css';
6
8
  @import './components/treedropdown.css';
7
9
  @import './components/selectedautocomplete.css';
8
- @import './components/tooltip.css';
10
+ @import './components/tooltip.css';
@@ -1,6 +1,8 @@
1
1
  @tailwind components;
2
2
  @tailwind utilities;
3
3
 
4
+ @import './components/modern-input.css';
5
+ @import './components/qbs-fallbacks.css';
4
6
  @import './components/autocomplete.css';
5
7
  @import './components/treedropdown.css';
6
8
  @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.4",
4
4
  "description": "React Components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",