@dktunited-techoff/techoff-suite-ui 1.15.7 → 1.15.8

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.
@@ -11,7 +11,7 @@
11
11
  border: 1px solid #949494;
12
12
  cursor: pointer;
13
13
  }
14
- .ts-dropdown-input .icon .ts-icon{
14
+ .ts-dropdown-input .icon .ts-icon {
15
15
  background-color: #3542ba;
16
16
  color: #ffffff;
17
17
  border-radius: 50%;
@@ -29,6 +29,7 @@
29
29
  white-space: nowrap;
30
30
  }
31
31
  .ts-dropdown-input--value {
32
+ display: flex;
32
33
  flex: 1;
33
34
  font-weight: 600;
34
35
  overflow: hidden;
@@ -118,13 +118,13 @@ export const TsDropdown = ({ containerRef, error, errorAction, label, noItemFoun
118
118
  listMode && (React.createElement("div", { className: "ts-dropdown-input--value" }, chosenItems?.length > 0 && (React.createElement(React.Fragment, null,
119
119
  chosenItems.length > 2 ? (React.createElement("div", { className: "ts-dropdown-input--value" },
120
120
  chosenItems
121
- .map(item => getOptionValue(item))
121
+ .map(item => getOptionLabel(item))
122
122
  .slice(0, 2)
123
123
  .join(', '),
124
124
  ' ',
125
125
  "& ",
126
126
  chosenItems.length - 2,
127
- " others")) : (React.createElement("div", { className: "ts-dropdown-input--value" }, chosenItems.map(item => getOptionValue(item)).join(', '))),
127
+ " others")) : (React.createElement("div", { className: "ts-dropdown-input--value" }, chosenItems.map(item => getOptionLabel(item)).join(', '))),
128
128
  React.createElement("div", { className: "icon", onClick: event => handleEmptyList(event) },
129
129
  React.createElement(TsIcon, { name: "close" })))))),
130
130
  React.createElement("div", { className: "ts-dropdown-input--chevron" }, showDropdownMenu ? (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor" },
@@ -152,14 +152,14 @@ export const TsDropdown = <T,>({
152
152
  {chosenItems.length > 2 ? (
153
153
  <div className="ts-dropdown-input--value">
154
154
  {chosenItems
155
- .map(item => getOptionValue(item))
155
+ .map(item => getOptionLabel(item))
156
156
  .slice(0, 2)
157
157
  .join(', ')}{' '}
158
158
  & {chosenItems.length - 2} others
159
159
  </div>
160
160
  ) : (
161
161
  <div className="ts-dropdown-input--value">
162
- {chosenItems.map(item => getOptionValue(item)).join(', ')}
162
+ {chosenItems.map(item => getOptionLabel(item)).join(', ')}
163
163
  </div>
164
164
  )}
165
165
  <div className="icon" onClick={event => handleEmptyList(event)}>
@@ -11,7 +11,7 @@
11
11
  border: 1px solid #949494;
12
12
  cursor: pointer;
13
13
  }
14
- .ts-dropdown-input .icon .ts-icon{
14
+ .ts-dropdown-input .icon .ts-icon {
15
15
  background-color: #3542ba;
16
16
  color: #ffffff;
17
17
  border-radius: 50%;
@@ -29,6 +29,7 @@
29
29
  white-space: nowrap;
30
30
  }
31
31
  .ts-dropdown-input--value {
32
+ display: flex;
32
33
  flex: 1;
33
34
  font-weight: 600;
34
35
  overflow: hidden;
@@ -121,13 +121,13 @@ const TsDropdown = ({ containerRef, error, errorAction, label, noItemFoundMessag
121
121
  listMode && (React.createElement("div", { className: "ts-dropdown-input--value" }, chosenItems?.length > 0 && (React.createElement(React.Fragment, null,
122
122
  chosenItems.length > 2 ? (React.createElement("div", { className: "ts-dropdown-input--value" },
123
123
  chosenItems
124
- .map(item => getOptionValue(item))
124
+ .map(item => getOptionLabel(item))
125
125
  .slice(0, 2)
126
126
  .join(', '),
127
127
  ' ',
128
128
  "& ",
129
129
  chosenItems.length - 2,
130
- " others")) : (React.createElement("div", { className: "ts-dropdown-input--value" }, chosenItems.map(item => getOptionValue(item)).join(', '))),
130
+ " others")) : (React.createElement("div", { className: "ts-dropdown-input--value" }, chosenItems.map(item => getOptionLabel(item)).join(', '))),
131
131
  React.createElement("div", { className: "icon", onClick: event => handleEmptyList(event) },
132
132
  React.createElement(TsIcon_1.TsIcon, { name: "close" })))))),
133
133
  React.createElement("div", { className: "ts-dropdown-input--chevron" }, showDropdownMenu ? (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor" },
@@ -152,14 +152,14 @@ export const TsDropdown = <T,>({
152
152
  {chosenItems.length > 2 ? (
153
153
  <div className="ts-dropdown-input--value">
154
154
  {chosenItems
155
- .map(item => getOptionValue(item))
155
+ .map(item => getOptionLabel(item))
156
156
  .slice(0, 2)
157
157
  .join(', ')}{' '}
158
158
  & {chosenItems.length - 2} others
159
159
  </div>
160
160
  ) : (
161
161
  <div className="ts-dropdown-input--value">
162
- {chosenItems.map(item => getOptionValue(item)).join(', ')}
162
+ {chosenItems.map(item => getOptionLabel(item)).join(', ')}
163
163
  </div>
164
164
  )}
165
165
  <div className="icon" onClick={event => handleEmptyList(event)}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dktunited-techoff/techoff-suite-ui",
3
- "version": "1.15.7",
3
+ "version": "1.15.8",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib",
6
6
  "module": "esm/index.js",
@@ -11,7 +11,7 @@
11
11
  border: 1px solid #949494;
12
12
  cursor: pointer;
13
13
  }
14
- .ts-dropdown-input .icon .ts-icon{
14
+ .ts-dropdown-input .icon .ts-icon {
15
15
  background-color: #3542ba;
16
16
  color: #ffffff;
17
17
  border-radius: 50%;
@@ -29,6 +29,7 @@
29
29
  white-space: nowrap;
30
30
  }
31
31
  .ts-dropdown-input--value {
32
+ display: flex;
32
33
  flex: 1;
33
34
  font-weight: 600;
34
35
  overflow: hidden;
@@ -152,14 +152,14 @@ export const TsDropdown = <T,>({
152
152
  {chosenItems.length > 2 ? (
153
153
  <div className="ts-dropdown-input--value">
154
154
  {chosenItems
155
- .map(item => getOptionValue(item))
155
+ .map(item => getOptionLabel(item))
156
156
  .slice(0, 2)
157
157
  .join(', ')}{' '}
158
158
  & {chosenItems.length - 2} others
159
159
  </div>
160
160
  ) : (
161
161
  <div className="ts-dropdown-input--value">
162
- {chosenItems.map(item => getOptionValue(item)).join(', ')}
162
+ {chosenItems.map(item => getOptionLabel(item)).join(', ')}
163
163
  </div>
164
164
  )}
165
165
  <div className="icon" onClick={event => handleEmptyList(event)}>