@uipath/apollo-wind 2.84.0 → 2.85.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/dist/components/ui/index.cjs +32 -32
- package/dist/components/ui/json-tree-view/DecorationChip.cjs +6 -4
- package/dist/components/ui/json-tree-view/DecorationChip.js +6 -4
- package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +13 -2
- package/dist/components/ui/model-picker/ModelTagChip.cjs +9 -3
- package/dist/components/ui/model-picker/ModelTagChip.d.ts +1 -0
- package/dist/components/ui/model-picker/ModelTagChip.js +5 -2
- package/dist/components/ui/model-picker/labels.cjs +2 -0
- package/dist/components/ui/model-picker/labels.d.ts +4 -0
- package/dist/components/ui/model-picker/labels.js +2 -0
- package/dist/components/ui/model-picker/primitives/ModelOptionRow.cjs +6 -8
- package/dist/components/ui/model-picker/primitives/ModelOptionRow.js +6 -8
- package/dist/components/ui/model-picker/primitives/ModelTagStrip.cjs +96 -0
- package/dist/components/ui/model-picker/primitives/ModelTagStrip.d.ts +10 -0
- package/dist/components/ui/model-picker/primitives/ModelTagStrip.js +62 -0
- package/dist/components/ui/model-picker/primitives/PickerTrigger.cjs +7 -9
- package/dist/components/ui/model-picker/primitives/PickerTrigger.js +7 -9
- package/dist/components/ui/select.cjs +2 -2
- package/dist/components/ui/select.js +2 -2
- package/dist/components/ui/use-visible-count.cjs +4 -3
- package/dist/components/ui/use-visible-count.d.ts +1 -1
- package/dist/components/ui/use-visible-count.js +4 -3
- package/dist/styles.css +25 -12
- package/package.json +2 -2
|
@@ -18,7 +18,7 @@ var __webpack_modules__ = {
|
|
|
18
18
|
"./avatar" (module) {
|
|
19
19
|
module.exports = require("./avatar.cjs");
|
|
20
20
|
},
|
|
21
|
-
"
|
|
21
|
+
"./badge" (module) {
|
|
22
22
|
module.exports = require("./badge.cjs");
|
|
23
23
|
},
|
|
24
24
|
"./boolean-radio-group" (module) {
|
|
@@ -51,13 +51,13 @@ var __webpack_modules__ = {
|
|
|
51
51
|
"./chat-hero" (module) {
|
|
52
52
|
module.exports = require("./chat-hero.cjs");
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"./checkbox" (module) {
|
|
55
55
|
module.exports = require("./checkbox.cjs");
|
|
56
56
|
},
|
|
57
57
|
"./citation" (module) {
|
|
58
58
|
module.exports = require("./citation.cjs");
|
|
59
59
|
},
|
|
60
|
-
"
|
|
60
|
+
"@/components/ui/code-block" (module) {
|
|
61
61
|
module.exports = require("./code-block.cjs");
|
|
62
62
|
},
|
|
63
63
|
"./collapsible" (module) {
|
|
@@ -66,10 +66,10 @@ var __webpack_modules__ = {
|
|
|
66
66
|
"./combobox" (module) {
|
|
67
67
|
module.exports = require("./combobox.cjs");
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"./command" (module) {
|
|
70
70
|
module.exports = require("./command.cjs");
|
|
71
71
|
},
|
|
72
|
-
"
|
|
72
|
+
"./context-menu" (module) {
|
|
73
73
|
module.exports = require("./context-menu.cjs");
|
|
74
74
|
},
|
|
75
75
|
"./data-table" (module) {
|
|
@@ -90,13 +90,13 @@ var __webpack_modules__ = {
|
|
|
90
90
|
"./drawer" (module) {
|
|
91
91
|
module.exports = require("./drawer.cjs");
|
|
92
92
|
},
|
|
93
|
-
"
|
|
93
|
+
"./dropdown-menu" (module) {
|
|
94
94
|
module.exports = require("./dropdown-menu.cjs");
|
|
95
95
|
},
|
|
96
96
|
"./dropzone-overlay" (module) {
|
|
97
97
|
module.exports = require("./dropzone-overlay.cjs");
|
|
98
98
|
},
|
|
99
|
-
"
|
|
99
|
+
"./editable-cell" (module) {
|
|
100
100
|
module.exports = require("./editable-cell.cjs");
|
|
101
101
|
},
|
|
102
102
|
"./editable-text" (module) {
|
|
@@ -117,25 +117,25 @@ var __webpack_modules__ = {
|
|
|
117
117
|
"./file-validation" (module) {
|
|
118
118
|
module.exports = require("./file-validation.cjs");
|
|
119
119
|
},
|
|
120
|
-
"
|
|
120
|
+
"@/components/ui/form-field" (module) {
|
|
121
121
|
module.exports = require("./form-field.cjs");
|
|
122
122
|
},
|
|
123
123
|
"./hover-card" (module) {
|
|
124
124
|
module.exports = require("./hover-card.cjs");
|
|
125
125
|
},
|
|
126
|
-
"
|
|
126
|
+
"@/components/ui/info-tooltip" (module) {
|
|
127
127
|
module.exports = require("./info-tooltip.cjs");
|
|
128
128
|
},
|
|
129
|
-
"
|
|
129
|
+
"./input-group" (module) {
|
|
130
130
|
module.exports = require("./input-group.cjs");
|
|
131
131
|
},
|
|
132
|
-
"
|
|
132
|
+
"./input" (module) {
|
|
133
133
|
module.exports = require("./input.cjs");
|
|
134
134
|
},
|
|
135
135
|
"./json-tree-view" (module) {
|
|
136
136
|
module.exports = require("./json-tree-view/index.cjs");
|
|
137
137
|
},
|
|
138
|
-
"
|
|
138
|
+
"@/components/ui/label" (module) {
|
|
139
139
|
module.exports = require("./label.cjs");
|
|
140
140
|
},
|
|
141
141
|
"@/components/ui/layout" (module) {
|
|
@@ -207,7 +207,7 @@ var __webpack_modules__ = {
|
|
|
207
207
|
"./reference-chip-colors" (module) {
|
|
208
208
|
module.exports = require("./reference-chip-colors.cjs");
|
|
209
209
|
},
|
|
210
|
-
"
|
|
210
|
+
"./reference-chip" (module) {
|
|
211
211
|
module.exports = require("./reference-chip.cjs");
|
|
212
212
|
},
|
|
213
213
|
"./resizable" (module) {
|
|
@@ -255,7 +255,7 @@ var __webpack_modules__ = {
|
|
|
255
255
|
"./switch" (module) {
|
|
256
256
|
module.exports = require("./switch.cjs");
|
|
257
257
|
},
|
|
258
|
-
"
|
|
258
|
+
"./table" (module) {
|
|
259
259
|
module.exports = require("./table.cjs");
|
|
260
260
|
},
|
|
261
261
|
"./tabs" (module) {
|
|
@@ -270,7 +270,7 @@ var __webpack_modules__ = {
|
|
|
270
270
|
"./toggle-group" (module) {
|
|
271
271
|
module.exports = require("./toggle-group.cjs");
|
|
272
272
|
},
|
|
273
|
-
"
|
|
273
|
+
"@/components/ui/toggle" (module) {
|
|
274
274
|
module.exports = require("./toggle.cjs");
|
|
275
275
|
},
|
|
276
276
|
"./tool-call" (module) {
|
|
@@ -282,7 +282,7 @@ var __webpack_modules__ = {
|
|
|
282
282
|
"./tree-view" (module) {
|
|
283
283
|
module.exports = require("./tree-view.cjs");
|
|
284
284
|
},
|
|
285
|
-
"
|
|
285
|
+
"./variable-picker" (module) {
|
|
286
286
|
module.exports = require("./variable-picker/index.cjs");
|
|
287
287
|
},
|
|
288
288
|
"./variable-value-control" (module) {
|
|
@@ -398,7 +398,7 @@ var __webpack_exports__ = {};
|
|
|
398
398
|
"ReferenceChip"
|
|
399
399
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_avatar__rspack_import_5[__rspack_import_key];
|
|
400
400
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
401
|
-
var _badge__rspack_import_6 = __webpack_require__("
|
|
401
|
+
var _badge__rspack_import_6 = __webpack_require__("./badge");
|
|
402
402
|
var __rspack_reexport = {};
|
|
403
403
|
for(const __rspack_import_key in _badge__rspack_import_6)if ([
|
|
404
404
|
"getReferenceChipColors",
|
|
@@ -508,7 +508,7 @@ var __webpack_exports__ = {};
|
|
|
508
508
|
"ReferenceChip"
|
|
509
509
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_chat_hero__rspack_import_16[__rspack_import_key];
|
|
510
510
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
511
|
-
var _checkbox__rspack_import_17 = __webpack_require__("
|
|
511
|
+
var _checkbox__rspack_import_17 = __webpack_require__("./checkbox");
|
|
512
512
|
var __rspack_reexport = {};
|
|
513
513
|
for(const __rspack_import_key in _checkbox__rspack_import_17)if ([
|
|
514
514
|
"getReferenceChipColors",
|
|
@@ -528,7 +528,7 @@ var __webpack_exports__ = {};
|
|
|
528
528
|
"ReferenceChip"
|
|
529
529
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_citation__rspack_import_18[__rspack_import_key];
|
|
530
530
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
531
|
-
var _code_block__rspack_import_19 = __webpack_require__("
|
|
531
|
+
var _code_block__rspack_import_19 = __webpack_require__("@/components/ui/code-block");
|
|
532
532
|
var __rspack_reexport = {};
|
|
533
533
|
for(const __rspack_import_key in _code_block__rspack_import_19)if ([
|
|
534
534
|
"getReferenceChipColors",
|
|
@@ -558,7 +558,7 @@ var __webpack_exports__ = {};
|
|
|
558
558
|
"ReferenceChip"
|
|
559
559
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_combobox__rspack_import_21[__rspack_import_key];
|
|
560
560
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
561
|
-
var _command__rspack_import_22 = __webpack_require__("
|
|
561
|
+
var _command__rspack_import_22 = __webpack_require__("./command");
|
|
562
562
|
var __rspack_reexport = {};
|
|
563
563
|
for(const __rspack_import_key in _command__rspack_import_22)if ([
|
|
564
564
|
"getReferenceChipColors",
|
|
@@ -568,7 +568,7 @@ var __webpack_exports__ = {};
|
|
|
568
568
|
"ReferenceChip"
|
|
569
569
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_command__rspack_import_22[__rspack_import_key];
|
|
570
570
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
571
|
-
var _context_menu__rspack_import_23 = __webpack_require__("
|
|
571
|
+
var _context_menu__rspack_import_23 = __webpack_require__("./context-menu");
|
|
572
572
|
var __rspack_reexport = {};
|
|
573
573
|
for(const __rspack_import_key in _context_menu__rspack_import_23)if ([
|
|
574
574
|
"getReferenceChipColors",
|
|
@@ -638,7 +638,7 @@ var __webpack_exports__ = {};
|
|
|
638
638
|
"ReferenceChip"
|
|
639
639
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_drawer__rspack_import_29[__rspack_import_key];
|
|
640
640
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
641
|
-
var _dropdown_menu__rspack_import_30 = __webpack_require__("
|
|
641
|
+
var _dropdown_menu__rspack_import_30 = __webpack_require__("./dropdown-menu");
|
|
642
642
|
var __rspack_reexport = {};
|
|
643
643
|
for(const __rspack_import_key in _dropdown_menu__rspack_import_30)if ([
|
|
644
644
|
"getReferenceChipColors",
|
|
@@ -658,7 +658,7 @@ var __webpack_exports__ = {};
|
|
|
658
658
|
"ReferenceChip"
|
|
659
659
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_dropzone_overlay__rspack_import_31[__rspack_import_key];
|
|
660
660
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
661
|
-
var _editable_cell__rspack_import_32 = __webpack_require__("
|
|
661
|
+
var _editable_cell__rspack_import_32 = __webpack_require__("./editable-cell");
|
|
662
662
|
var __rspack_reexport = {};
|
|
663
663
|
for(const __rspack_import_key in _editable_cell__rspack_import_32)if ([
|
|
664
664
|
"getReferenceChipColors",
|
|
@@ -728,7 +728,7 @@ var __webpack_exports__ = {};
|
|
|
728
728
|
"ReferenceChip"
|
|
729
729
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_file_validation__rspack_import_38[__rspack_import_key];
|
|
730
730
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
731
|
-
var _form_field__rspack_import_39 = __webpack_require__("
|
|
731
|
+
var _form_field__rspack_import_39 = __webpack_require__("@/components/ui/form-field");
|
|
732
732
|
var __rspack_reexport = {};
|
|
733
733
|
for(const __rspack_import_key in _form_field__rspack_import_39)if ([
|
|
734
734
|
"getReferenceChipColors",
|
|
@@ -748,7 +748,7 @@ var __webpack_exports__ = {};
|
|
|
748
748
|
"ReferenceChip"
|
|
749
749
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hover_card__rspack_import_40[__rspack_import_key];
|
|
750
750
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
751
|
-
var _info_tooltip__rspack_import_41 = __webpack_require__("
|
|
751
|
+
var _info_tooltip__rspack_import_41 = __webpack_require__("@/components/ui/info-tooltip");
|
|
752
752
|
var __rspack_reexport = {};
|
|
753
753
|
for(const __rspack_import_key in _info_tooltip__rspack_import_41)if ([
|
|
754
754
|
"getReferenceChipColors",
|
|
@@ -758,7 +758,7 @@ var __webpack_exports__ = {};
|
|
|
758
758
|
"ReferenceChip"
|
|
759
759
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_info_tooltip__rspack_import_41[__rspack_import_key];
|
|
760
760
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
761
|
-
var _input__rspack_import_42 = __webpack_require__("
|
|
761
|
+
var _input__rspack_import_42 = __webpack_require__("./input");
|
|
762
762
|
var __rspack_reexport = {};
|
|
763
763
|
for(const __rspack_import_key in _input__rspack_import_42)if ([
|
|
764
764
|
"getReferenceChipColors",
|
|
@@ -768,7 +768,7 @@ var __webpack_exports__ = {};
|
|
|
768
768
|
"ReferenceChip"
|
|
769
769
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_input__rspack_import_42[__rspack_import_key];
|
|
770
770
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
771
|
-
var _input_group__rspack_import_43 = __webpack_require__("
|
|
771
|
+
var _input_group__rspack_import_43 = __webpack_require__("./input-group");
|
|
772
772
|
var __rspack_reexport = {};
|
|
773
773
|
for(const __rspack_import_key in _input_group__rspack_import_43)if ([
|
|
774
774
|
"getReferenceChipColors",
|
|
@@ -788,7 +788,7 @@ var __webpack_exports__ = {};
|
|
|
788
788
|
"ReferenceChip"
|
|
789
789
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_json_tree_view__rspack_import_44[__rspack_import_key];
|
|
790
790
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
791
|
-
var _label__rspack_import_45 = __webpack_require__("
|
|
791
|
+
var _label__rspack_import_45 = __webpack_require__("@/components/ui/label");
|
|
792
792
|
var __rspack_reexport = {};
|
|
793
793
|
for(const __rspack_import_key in _label__rspack_import_45)if ([
|
|
794
794
|
"getReferenceChipColors",
|
|
@@ -1018,7 +1018,7 @@ var __webpack_exports__ = {};
|
|
|
1018
1018
|
"ReferenceChip"
|
|
1019
1019
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_radio_group__rspack_import_67[__rspack_import_key];
|
|
1020
1020
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
1021
|
-
var _reference_chip__rspack_import_68 = __webpack_require__("
|
|
1021
|
+
var _reference_chip__rspack_import_68 = __webpack_require__("./reference-chip");
|
|
1022
1022
|
var _reference_chip_colors__rspack_import_69 = __webpack_require__("./reference-chip-colors");
|
|
1023
1023
|
var _resizable__rspack_import_70 = __webpack_require__("./resizable");
|
|
1024
1024
|
var __rspack_reexport = {};
|
|
@@ -1170,7 +1170,7 @@ var __webpack_exports__ = {};
|
|
|
1170
1170
|
"ReferenceChip"
|
|
1171
1171
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_switch__rspack_import_84[__rspack_import_key];
|
|
1172
1172
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
1173
|
-
var _table__rspack_import_85 = __webpack_require__("
|
|
1173
|
+
var _table__rspack_import_85 = __webpack_require__("./table");
|
|
1174
1174
|
var __rspack_reexport = {};
|
|
1175
1175
|
for(const __rspack_import_key in _table__rspack_import_85)if ([
|
|
1176
1176
|
"getReferenceChipColors",
|
|
@@ -1210,7 +1210,7 @@ var __webpack_exports__ = {};
|
|
|
1210
1210
|
"ReferenceChip"
|
|
1211
1211
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_thinking_indicator__rspack_import_88[__rspack_import_key];
|
|
1212
1212
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
1213
|
-
var _toggle__rspack_import_89 = __webpack_require__("
|
|
1213
|
+
var _toggle__rspack_import_89 = __webpack_require__("@/components/ui/toggle");
|
|
1214
1214
|
var __rspack_reexport = {};
|
|
1215
1215
|
for(const __rspack_import_key in _toggle__rspack_import_89)if ([
|
|
1216
1216
|
"getReferenceChipColors",
|
|
@@ -1252,7 +1252,7 @@ var __webpack_exports__ = {};
|
|
|
1252
1252
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
1253
1253
|
var _tree_view__rspack_import_93 = __webpack_require__("./tree-view");
|
|
1254
1254
|
var _tree_view__rspack_import_93_default = /*#__PURE__*/ __webpack_require__.n(_tree_view__rspack_import_93);
|
|
1255
|
-
var _variable_picker__rspack_import_94 = __webpack_require__("
|
|
1255
|
+
var _variable_picker__rspack_import_94 = __webpack_require__("./variable-picker");
|
|
1256
1256
|
var __rspack_reexport = {};
|
|
1257
1257
|
for(const __rspack_import_key in _variable_picker__rspack_import_94)if ([
|
|
1258
1258
|
"getReferenceChipColors",
|
|
@@ -45,6 +45,8 @@ function DecorationChip({ decoration }) {
|
|
|
45
45
|
const chip = decoration?.chip;
|
|
46
46
|
if (!chip || null == chip.label && null == chip.icon) return null;
|
|
47
47
|
const tone = chip.tone ?? 'neutral';
|
|
48
|
+
const hasTooltip = null != chip.tooltip && false !== chip.tooltip && '' !== chip.tooltip;
|
|
49
|
+
const iconName = chip.ariaLabel ?? ('string' == typeof chip.tooltip ? chip.tooltip : void 0);
|
|
48
50
|
const content = chip.label ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
49
51
|
className: (0, index_cjs_namespaceObject.cn)('flex min-w-0 items-center gap-1 truncate rounded-full border px-1.5 py-px text-[10px] font-medium leading-none', CHIP_TONE_BORDER_CLASS[tone], CHIP_TONE_TEXT_CLASS[tone]),
|
|
50
52
|
children: [
|
|
@@ -56,16 +58,16 @@ function DecorationChip({ decoration }) {
|
|
|
56
58
|
]
|
|
57
59
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
58
60
|
className: (0, index_cjs_namespaceObject.cn)('flex shrink-0 items-center', CHIP_TONE_TEXT_CLASS[tone]),
|
|
59
|
-
...
|
|
61
|
+
...iconName ? {
|
|
60
62
|
role: 'img',
|
|
61
|
-
'aria-label':
|
|
63
|
+
'aria-label': iconName
|
|
62
64
|
} : {},
|
|
63
65
|
children: chip.icon
|
|
64
66
|
});
|
|
65
|
-
if (!
|
|
67
|
+
if (!hasTooltip) return content;
|
|
66
68
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_JsonTreeTooltip_cjs_namespaceObject.JsonTreeTooltip, {
|
|
67
69
|
placement: "top",
|
|
68
|
-
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("
|
|
70
|
+
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
69
71
|
className: "text-xs",
|
|
70
72
|
children: chip.tooltip
|
|
71
73
|
}),
|
|
@@ -17,6 +17,8 @@ function DecorationChip({ decoration }) {
|
|
|
17
17
|
const chip = decoration?.chip;
|
|
18
18
|
if (!chip || null == chip.label && null == chip.icon) return null;
|
|
19
19
|
const tone = chip.tone ?? 'neutral';
|
|
20
|
+
const hasTooltip = null != chip.tooltip && false !== chip.tooltip && '' !== chip.tooltip;
|
|
21
|
+
const iconName = chip.ariaLabel ?? ('string' == typeof chip.tooltip ? chip.tooltip : void 0);
|
|
20
22
|
const content = chip.label ? /*#__PURE__*/ jsxs("span", {
|
|
21
23
|
className: cn('flex min-w-0 items-center gap-1 truncate rounded-full border px-1.5 py-px text-[10px] font-medium leading-none', CHIP_TONE_BORDER_CLASS[tone], CHIP_TONE_TEXT_CLASS[tone]),
|
|
22
24
|
children: [
|
|
@@ -28,16 +30,16 @@ function DecorationChip({ decoration }) {
|
|
|
28
30
|
]
|
|
29
31
|
}) : /*#__PURE__*/ jsx("span", {
|
|
30
32
|
className: cn('flex shrink-0 items-center', CHIP_TONE_TEXT_CLASS[tone]),
|
|
31
|
-
...
|
|
33
|
+
...iconName ? {
|
|
32
34
|
role: 'img',
|
|
33
|
-
'aria-label':
|
|
35
|
+
'aria-label': iconName
|
|
34
36
|
} : {},
|
|
35
37
|
children: chip.icon
|
|
36
38
|
});
|
|
37
|
-
if (!
|
|
39
|
+
if (!hasTooltip) return content;
|
|
38
40
|
return /*#__PURE__*/ jsx(JsonTreeTooltip, {
|
|
39
41
|
placement: "top",
|
|
40
|
-
content: /*#__PURE__*/ jsx("
|
|
42
|
+
content: /*#__PURE__*/ jsx("div", {
|
|
41
43
|
className: "text-xs",
|
|
42
44
|
children: chip.tooltip
|
|
43
45
|
}),
|
|
@@ -91,8 +91,19 @@ export interface NodeDecorationChip {
|
|
|
91
91
|
label?: string;
|
|
92
92
|
/** Icon rendered before the label (or alone when there is no label). */
|
|
93
93
|
icon?: ReactNode;
|
|
94
|
-
/**
|
|
95
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Tooltip shown on hover. Rich content (lists, `<code>`, line breaks) is
|
|
96
|
+
* fine, but keep it non-interactive: the chip takes no focus and a tooltip
|
|
97
|
+
* must not hold controls, so put actions in `nodeActions` instead. On an
|
|
98
|
+
* icon-only chip a string tooltip also becomes its accessible name.
|
|
99
|
+
*/
|
|
100
|
+
tooltip?: ReactNode;
|
|
101
|
+
/**
|
|
102
|
+
* Accessible name for an icon-only chip, winning over a string `tooltip`.
|
|
103
|
+
* Required when the tooltip isn't a string, or the icon goes unnamed.
|
|
104
|
+
* Ignored on a chip with a `label`, which already names it.
|
|
105
|
+
*/
|
|
106
|
+
ariaLabel?: string;
|
|
96
107
|
tone?: NodeDecorationTone;
|
|
97
108
|
}
|
|
98
109
|
/** Overrides for the row's type badge (the leading icon-in-a-box). */
|
|
@@ -25,7 +25,8 @@ var __webpack_require__ = {};
|
|
|
25
25
|
var __webpack_exports__ = {};
|
|
26
26
|
__webpack_require__.r(__webpack_exports__);
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
ModelTagChip: ()=>ModelTagChip
|
|
28
|
+
ModelTagChip: ()=>ModelTagChip,
|
|
29
|
+
tagVariantToken: ()=>tagVariantToken
|
|
29
30
|
});
|
|
30
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
32
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
@@ -44,6 +45,9 @@ const VARIANT_MAP = {
|
|
|
44
45
|
'cost-standard': 'mini',
|
|
45
46
|
'cost-premium': 'mini'
|
|
46
47
|
};
|
|
48
|
+
function tagVariantToken(tag, variants) {
|
|
49
|
+
return tag.variant ?? variants?.[tag.kind] ?? VARIANT_MAP[tag.kind] ?? 'mini';
|
|
50
|
+
}
|
|
47
51
|
const BADGE_VARIANT = {
|
|
48
52
|
mini: 'secondary',
|
|
49
53
|
'info-mini': 'info',
|
|
@@ -59,7 +63,7 @@ const ICON_MAP = {
|
|
|
59
63
|
'out-of-region': external_lucide_react_namespaceObject.GlobeLock
|
|
60
64
|
};
|
|
61
65
|
const ModelTagChip = ({ tag, variants, icons, disableTooltip })=>{
|
|
62
|
-
const variantToken = tag
|
|
66
|
+
const variantToken = tagVariantToken(tag, variants);
|
|
63
67
|
const Icon = icons && tag.kind in icons ? icons[tag.kind] : ICON_MAP[tag.kind];
|
|
64
68
|
const chip = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_badge_cjs_namespaceObject.Badge, {
|
|
65
69
|
className: (0, index_cjs_namespaceObject.cn)('h-4 gap-0.5 border-transparent px-1.5 py-0 text-[10px] leading-4 font-semibold pointer-events-none', 'mini' === variantToken && 'bg-foreground/10', variantToken),
|
|
@@ -93,8 +97,10 @@ const ModelTagChip = ({ tag, variants, icons, disableTooltip })=>{
|
|
|
93
97
|
return chip;
|
|
94
98
|
};
|
|
95
99
|
exports.ModelTagChip = __webpack_exports__.ModelTagChip;
|
|
100
|
+
exports.tagVariantToken = __webpack_exports__.tagVariantToken;
|
|
96
101
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
97
|
-
"ModelTagChip"
|
|
102
|
+
"ModelTagChip",
|
|
103
|
+
"tagVariantToken"
|
|
98
104
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
99
105
|
Object.defineProperty(exports, '__esModule', {
|
|
100
106
|
value: true
|
|
@@ -16,6 +16,9 @@ const VARIANT_MAP = {
|
|
|
16
16
|
'cost-standard': 'mini',
|
|
17
17
|
'cost-premium': 'mini'
|
|
18
18
|
};
|
|
19
|
+
function tagVariantToken(tag, variants) {
|
|
20
|
+
return tag.variant ?? variants?.[tag.kind] ?? VARIANT_MAP[tag.kind] ?? 'mini';
|
|
21
|
+
}
|
|
19
22
|
const BADGE_VARIANT = {
|
|
20
23
|
mini: 'secondary',
|
|
21
24
|
'info-mini': 'info',
|
|
@@ -31,7 +34,7 @@ const ICON_MAP = {
|
|
|
31
34
|
'out-of-region': GlobeLock
|
|
32
35
|
};
|
|
33
36
|
const ModelTagChip = ({ tag, variants, icons, disableTooltip })=>{
|
|
34
|
-
const variantToken = tag
|
|
37
|
+
const variantToken = tagVariantToken(tag, variants);
|
|
35
38
|
const Icon = icons && tag.kind in icons ? icons[tag.kind] : ICON_MAP[tag.kind];
|
|
36
39
|
const chip = /*#__PURE__*/ jsxs(Badge, {
|
|
37
40
|
className: cn('h-4 gap-0.5 border-transparent px-1.5 py-0 text-[10px] leading-4 font-semibold pointer-events-none', 'mini' === variantToken && 'bg-foreground/10', variantToken),
|
|
@@ -64,4 +67,4 @@ const ModelTagChip = ({ tag, variants, icons, disableTooltip })=>{
|
|
|
64
67
|
});
|
|
65
68
|
return chip;
|
|
66
69
|
};
|
|
67
|
-
export { ModelTagChip };
|
|
70
|
+
export { ModelTagChip, tagVariantToken };
|
|
@@ -56,6 +56,8 @@ const DEFAULT_MODEL_PICKER_LABELS = {
|
|
|
56
56
|
substitutedTagTooltip: (target)=>`This model is retired. Your traffic is currently being routed to ${target}. Update your configuration to make this explicit.`,
|
|
57
57
|
outOfRegionTag: (geography)=>`Out of region (${geography})`,
|
|
58
58
|
outOfRegionTagTooltip: (homeRegion)=>`Routes traffic outside ${homeRegion}`,
|
|
59
|
+
hiddenTagCount: (count)=>`+${count}`,
|
|
60
|
+
hiddenTagCountTooltip: (hidden)=>hidden.join(', '),
|
|
59
61
|
costBasic: 'Basic',
|
|
60
62
|
costStandard: 'Standard',
|
|
61
63
|
costPremium: 'Premium',
|
|
@@ -30,6 +30,10 @@ export interface ModelPickerLabels {
|
|
|
30
30
|
substitutedTagTooltip: (target: string) => string;
|
|
31
31
|
outOfRegionTag: (geography: string) => string;
|
|
32
32
|
outOfRegionTagTooltip: (homeRegion: string) => string;
|
|
33
|
+
/** The count of the chips a name has no room beside, e.g. "+2". */
|
|
34
|
+
hiddenTagCount: (count: number) => string;
|
|
35
|
+
/** The count's tooltip in the list, naming the chips it stands for. */
|
|
36
|
+
hiddenTagCountTooltip: (hidden: readonly string[]) => string;
|
|
33
37
|
costBasic: string;
|
|
34
38
|
costStandard: string;
|
|
35
39
|
costPremium: string;
|
|
@@ -26,6 +26,8 @@ const DEFAULT_MODEL_PICKER_LABELS = {
|
|
|
26
26
|
substitutedTagTooltip: (target)=>`This model is retired. Your traffic is currently being routed to ${target}. Update your configuration to make this explicit.`,
|
|
27
27
|
outOfRegionTag: (geography)=>`Out of region (${geography})`,
|
|
28
28
|
outOfRegionTagTooltip: (homeRegion)=>`Routes traffic outside ${homeRegion}`,
|
|
29
|
+
hiddenTagCount: (count)=>`+${count}`,
|
|
30
|
+
hiddenTagCountTooltip: (hidden)=>hidden.join(', '),
|
|
29
31
|
costBasic: 'Basic',
|
|
30
32
|
costStandard: 'Standard',
|
|
31
33
|
costPremium: 'Premium',
|
|
@@ -36,8 +36,8 @@ const external_react_namespaceObject = require("react");
|
|
|
36
36
|
const external_tooltip_cjs_namespaceObject = require("../../tooltip.cjs");
|
|
37
37
|
const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
|
|
38
38
|
const external_labels_cjs_namespaceObject = require("../labels.cjs");
|
|
39
|
-
const external_ModelTagChip_cjs_namespaceObject = require("../ModelTagChip.cjs");
|
|
40
39
|
const external_utils_cjs_namespaceObject = require("../utils.cjs");
|
|
40
|
+
const external_ModelTagStrip_cjs_namespaceObject = require("./ModelTagStrip.cjs");
|
|
41
41
|
const FULL_OPTION_HEIGHT = 64;
|
|
42
42
|
const DENSE_OPTION_HEIGHT = 44;
|
|
43
43
|
const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActivate, tagContext, tagVariants, renderActions, renderMeta, dense, hideTagKinds, id, 'data-testid': dataTestId })=>{
|
|
@@ -72,13 +72,11 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
72
72
|
className: (0, index_cjs_namespaceObject.cn)('min-w-0 flex-[0_1_auto] truncate leading-snug font-semibold text-foreground', dense ? 'text-xs' : 'text-sm'),
|
|
73
73
|
children: primary
|
|
74
74
|
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})
|
|
81
|
-
}, `${t.kind}-${t.label}`))
|
|
75
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ModelTagStrip_cjs_namespaceObject.ModelTagStrip, {
|
|
76
|
+
labels: labels,
|
|
77
|
+
tagVariants: tagVariants,
|
|
78
|
+
tags: inlineTags
|
|
79
|
+
})
|
|
82
80
|
]
|
|
83
81
|
}),
|
|
84
82
|
techId && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
@@ -5,8 +5,8 @@ import { memo } from "react";
|
|
|
5
5
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../tooltip.js";
|
|
6
6
|
import { cn } from "../../../../lib/index.js";
|
|
7
7
|
import { DEFAULT_MODEL_PICKER_LABELS } from "../labels.js";
|
|
8
|
-
import { ModelTagChip } from "../ModelTagChip.js";
|
|
9
8
|
import { deriveModelTags, isByoModel } from "../utils.js";
|
|
9
|
+
import { ModelTagStrip } from "./ModelTagStrip.js";
|
|
10
10
|
const FULL_OPTION_HEIGHT = 64;
|
|
11
11
|
const DENSE_OPTION_HEIGHT = 44;
|
|
12
12
|
const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActivate, tagContext, tagVariants, renderActions, renderMeta, dense, hideTagKinds, id, 'data-testid': dataTestId })=>{
|
|
@@ -41,13 +41,11 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
41
41
|
className: cn('min-w-0 flex-[0_1_auto] truncate leading-snug font-semibold text-foreground', dense ? 'text-xs' : 'text-sm'),
|
|
42
42
|
children: primary
|
|
43
43
|
}),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
})
|
|
50
|
-
}, `${t.kind}-${t.label}`))
|
|
44
|
+
/*#__PURE__*/ jsx(ModelTagStrip, {
|
|
45
|
+
labels: labels,
|
|
46
|
+
tagVariants: tagVariants,
|
|
47
|
+
tags: inlineTags
|
|
48
|
+
})
|
|
51
49
|
]
|
|
52
50
|
}),
|
|
53
51
|
techId && /*#__PURE__*/ jsx("span", {
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
ModelTagStrip: ()=>ModelTagStrip
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_use_visible_count_cjs_namespaceObject = require("../../use-visible-count.cjs");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
|
|
33
|
+
const external_ModelTagChip_cjs_namespaceObject = require("../ModelTagChip.cjs");
|
|
34
|
+
const CHIP_GAP = 6;
|
|
35
|
+
const SEVERITY_RANK = {
|
|
36
|
+
'error-mini': 0,
|
|
37
|
+
'warning-mini': 1
|
|
38
|
+
};
|
|
39
|
+
const OTHER_RANK = 2;
|
|
40
|
+
const tagKey = (t)=>`${t.kind}-${t.label}`;
|
|
41
|
+
const ModelTagStrip = ({ tags, labels, tagVariants, disableTooltip })=>{
|
|
42
|
+
const rank = (t)=>SEVERITY_RANK[(0, external_ModelTagChip_cjs_namespaceObject.tagVariantToken)(t, tagVariants)] ?? OTHER_RANK;
|
|
43
|
+
const ordered = [
|
|
44
|
+
...tags
|
|
45
|
+
].sort((a, b)=>rank(a) - rank(b));
|
|
46
|
+
const { containerRef, itemRefs, overflowRef, visibleCount } = (0, external_use_visible_count_cjs_namespaceObject.useVisibleCount)(ordered.length > 0, ordered.map(tagKey), CHIP_GAP, 0);
|
|
47
|
+
if (0 === ordered.length) return null;
|
|
48
|
+
const hiddenCount = ordered.length - visibleCount;
|
|
49
|
+
const hiddenLabels = ordered.slice(visibleCount).map((t)=>t.label);
|
|
50
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
51
|
+
className: "relative grid flex-1 basis-0 grid-cols-[minmax(0,max-content)_auto] items-center justify-start",
|
|
52
|
+
"data-slot": "model-picker-tags",
|
|
53
|
+
ref: containerRef,
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
56
|
+
className: "relative flex min-w-0 items-center gap-1.5 overflow-hidden",
|
|
57
|
+
children: ordered.map((t, i)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
58
|
+
className: (0, index_cjs_namespaceObject.cn)('flex shrink-0 items-center whitespace-nowrap', i >= visibleCount && 'pointer-events-none absolute opacity-0'),
|
|
59
|
+
ref: (el)=>{
|
|
60
|
+
itemRefs.current[i] = el;
|
|
61
|
+
},
|
|
62
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ModelTagChip_cjs_namespaceObject.ModelTagChip, {
|
|
63
|
+
disableTooltip: disableTooltip,
|
|
64
|
+
tag: t,
|
|
65
|
+
variants: tagVariants
|
|
66
|
+
})
|
|
67
|
+
}, tagKey(t)))
|
|
68
|
+
}),
|
|
69
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
70
|
+
"aria-hidden": true,
|
|
71
|
+
className: (0, index_cjs_namespaceObject.cn)('ml-1.5 grid whitespace-nowrap', 0 === hiddenCount && 'absolute opacity-0'),
|
|
72
|
+
"data-overflow": "",
|
|
73
|
+
ref: overflowRef,
|
|
74
|
+
children: ordered.map((t, i)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
75
|
+
className: (0, index_cjs_namespaceObject.cn)('col-start-1 row-start-1 flex items-center', i + 1 !== hiddenCount && 'invisible'),
|
|
76
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ModelTagChip_cjs_namespaceObject.ModelTagChip, {
|
|
77
|
+
disableTooltip: disableTooltip,
|
|
78
|
+
tag: {
|
|
79
|
+
kind: 'overflow',
|
|
80
|
+
label: labels.hiddenTagCount(i + 1),
|
|
81
|
+
tooltip: i + 1 === hiddenCount ? labels.hiddenTagCountTooltip(hiddenLabels) : void 0,
|
|
82
|
+
variant: 'mini'
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}, tagKey(t)))
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
exports.ModelTagStrip = __webpack_exports__.ModelTagStrip;
|
|
91
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
92
|
+
"ModelTagStrip"
|
|
93
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
94
|
+
Object.defineProperty(exports, '__esModule', {
|
|
95
|
+
value: true
|
|
96
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { ModelPickerLabels } from '../labels';
|
|
3
|
+
import type { ModelTag } from '../types';
|
|
4
|
+
export interface ModelTagStripProps {
|
|
5
|
+
tags: readonly ModelTag[];
|
|
6
|
+
labels: ModelPickerLabels;
|
|
7
|
+
tagVariants?: Record<string, string>;
|
|
8
|
+
disableTooltip?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ModelTagStrip: React.FC<ModelTagStripProps>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useVisibleCount } from "../../use-visible-count.js";
|
|
4
|
+
import { cn } from "../../../../lib/index.js";
|
|
5
|
+
import { ModelTagChip, tagVariantToken } from "../ModelTagChip.js";
|
|
6
|
+
const CHIP_GAP = 6;
|
|
7
|
+
const SEVERITY_RANK = {
|
|
8
|
+
'error-mini': 0,
|
|
9
|
+
'warning-mini': 1
|
|
10
|
+
};
|
|
11
|
+
const OTHER_RANK = 2;
|
|
12
|
+
const tagKey = (t)=>`${t.kind}-${t.label}`;
|
|
13
|
+
const ModelTagStrip = ({ tags, labels, tagVariants, disableTooltip })=>{
|
|
14
|
+
const rank = (t)=>SEVERITY_RANK[tagVariantToken(t, tagVariants)] ?? OTHER_RANK;
|
|
15
|
+
const ordered = [
|
|
16
|
+
...tags
|
|
17
|
+
].sort((a, b)=>rank(a) - rank(b));
|
|
18
|
+
const { containerRef, itemRefs, overflowRef, visibleCount } = useVisibleCount(ordered.length > 0, ordered.map(tagKey), CHIP_GAP, 0);
|
|
19
|
+
if (0 === ordered.length) return null;
|
|
20
|
+
const hiddenCount = ordered.length - visibleCount;
|
|
21
|
+
const hiddenLabels = ordered.slice(visibleCount).map((t)=>t.label);
|
|
22
|
+
return /*#__PURE__*/ jsxs("span", {
|
|
23
|
+
className: "relative grid flex-1 basis-0 grid-cols-[minmax(0,max-content)_auto] items-center justify-start",
|
|
24
|
+
"data-slot": "model-picker-tags",
|
|
25
|
+
ref: containerRef,
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ jsx("span", {
|
|
28
|
+
className: "relative flex min-w-0 items-center gap-1.5 overflow-hidden",
|
|
29
|
+
children: ordered.map((t, i)=>/*#__PURE__*/ jsx("span", {
|
|
30
|
+
className: cn('flex shrink-0 items-center whitespace-nowrap', i >= visibleCount && 'pointer-events-none absolute opacity-0'),
|
|
31
|
+
ref: (el)=>{
|
|
32
|
+
itemRefs.current[i] = el;
|
|
33
|
+
},
|
|
34
|
+
children: /*#__PURE__*/ jsx(ModelTagChip, {
|
|
35
|
+
disableTooltip: disableTooltip,
|
|
36
|
+
tag: t,
|
|
37
|
+
variants: tagVariants
|
|
38
|
+
})
|
|
39
|
+
}, tagKey(t)))
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ jsx("span", {
|
|
42
|
+
"aria-hidden": true,
|
|
43
|
+
className: cn('ml-1.5 grid whitespace-nowrap', 0 === hiddenCount && 'absolute opacity-0'),
|
|
44
|
+
"data-overflow": "",
|
|
45
|
+
ref: overflowRef,
|
|
46
|
+
children: ordered.map((t, i)=>/*#__PURE__*/ jsx("span", {
|
|
47
|
+
className: cn('col-start-1 row-start-1 flex items-center', i + 1 !== hiddenCount && 'invisible'),
|
|
48
|
+
children: /*#__PURE__*/ jsx(ModelTagChip, {
|
|
49
|
+
disableTooltip: disableTooltip,
|
|
50
|
+
tag: {
|
|
51
|
+
kind: 'overflow',
|
|
52
|
+
label: labels.hiddenTagCount(i + 1),
|
|
53
|
+
tooltip: i + 1 === hiddenCount ? labels.hiddenTagCountTooltip(hiddenLabels) : void 0,
|
|
54
|
+
variant: 'mini'
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}, tagKey(t)))
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export { ModelTagStrip };
|
|
@@ -32,8 +32,8 @@ const external_lucide_react_namespaceObject = require("lucide-react");
|
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
33
|
const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
|
|
34
34
|
const external_labels_cjs_namespaceObject = require("../labels.cjs");
|
|
35
|
-
const external_ModelTagChip_cjs_namespaceObject = require("../ModelTagChip.cjs");
|
|
36
35
|
const external_utils_cjs_namespaceObject = require("../utils.cjs");
|
|
36
|
+
const external_ModelTagStrip_cjs_namespaceObject = require("./ModelTagStrip.cjs");
|
|
37
37
|
const PickerTrigger_PickerTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ id, selected, unknownValue, pendingValue, placeholder = 'Select a model', disabled, open, invalid, tagContext, tagVariants, extra, onClick, hideTagKinds, controlsId, describedById, required, className, 'data-testid': dataTestId, ...rest }, ref) {
|
|
38
38
|
const labels = tagContext?.labels ?? external_labels_cjs_namespaceObject.DEFAULT_MODEL_PICKER_LABELS;
|
|
39
39
|
const effectiveCtx = tagContext ?? {
|
|
@@ -70,14 +70,12 @@ const PickerTrigger_PickerTrigger = /*#__PURE__*/ external_react_namespaceObject
|
|
|
70
70
|
className: "max-w-full truncate text-foreground",
|
|
71
71
|
children: primary
|
|
72
72
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})
|
|
80
|
-
}, `${t.kind}-${t.label}`))
|
|
73
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ModelTagStrip_cjs_namespaceObject.ModelTagStrip, {
|
|
74
|
+
disableTooltip: true,
|
|
75
|
+
labels: labels,
|
|
76
|
+
tagVariants: tagVariants,
|
|
77
|
+
tags: inlineTags
|
|
78
|
+
})
|
|
81
79
|
]
|
|
82
80
|
}) : pendingValue ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
83
81
|
className: "max-w-full truncate text-foreground",
|
|
@@ -4,8 +4,8 @@ import { ChevronDown } from "lucide-react";
|
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { cn } from "../../../../lib/index.js";
|
|
6
6
|
import { DEFAULT_MODEL_PICKER_LABELS } from "../labels.js";
|
|
7
|
-
import { ModelTagChip } from "../ModelTagChip.js";
|
|
8
7
|
import { deriveModelTags } from "../utils.js";
|
|
8
|
+
import { ModelTagStrip } from "./ModelTagStrip.js";
|
|
9
9
|
const PickerTrigger_PickerTrigger = /*#__PURE__*/ forwardRef(function({ id, selected, unknownValue, pendingValue, placeholder = 'Select a model', disabled, open, invalid, tagContext, tagVariants, extra, onClick, hideTagKinds, controlsId, describedById, required, className, 'data-testid': dataTestId, ...rest }, ref) {
|
|
10
10
|
const labels = tagContext?.labels ?? DEFAULT_MODEL_PICKER_LABELS;
|
|
11
11
|
const effectiveCtx = tagContext ?? {
|
|
@@ -42,14 +42,12 @@ const PickerTrigger_PickerTrigger = /*#__PURE__*/ forwardRef(function({ id, sele
|
|
|
42
42
|
className: "max-w-full truncate text-foreground",
|
|
43
43
|
children: primary
|
|
44
44
|
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})
|
|
52
|
-
}, `${t.kind}-${t.label}`))
|
|
45
|
+
/*#__PURE__*/ jsx(ModelTagStrip, {
|
|
46
|
+
disableTooltip: true,
|
|
47
|
+
labels: labels,
|
|
48
|
+
tagVariants: tagVariants,
|
|
49
|
+
tags: inlineTags
|
|
50
|
+
})
|
|
53
51
|
]
|
|
54
52
|
}) : pendingValue ? /*#__PURE__*/ jsx("span", {
|
|
55
53
|
className: "max-w-full truncate text-foreground",
|
|
@@ -62,10 +62,10 @@ const SelectValue = /*#__PURE__*/ external_react_namespaceObject.forwardRef((pro
|
|
|
62
62
|
...props
|
|
63
63
|
}));
|
|
64
64
|
SelectValue.displayName = react_select_namespaceObject.Value.displayName;
|
|
65
|
-
const selectTriggerVariants = (0, external_class_variance_authority_namespaceObject.cva)('flex w-full cursor-pointer items-center justify-between bg-transparent text-
|
|
65
|
+
const selectTriggerVariants = (0, external_class_variance_authority_namespaceObject.cva)('flex w-full cursor-pointer items-center justify-between bg-transparent text-sm transition-colors data-[placeholder]:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 whitespace-nowrap *:data-[slot=select-value]:truncate *:data-[slot=select-value]:text-left [&_svg]:pointer-events-none [&_svg]:shrink-0 future:font-normal', {
|
|
66
66
|
variants: {
|
|
67
67
|
grouped: {
|
|
68
|
-
false: 'h-9 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 future:focus:ring-primary future:focus-visible:ring-primary future:aria-invalid:focus:ring-error future:aria-invalid:focus-visible:ring-error',
|
|
68
|
+
false: 'h-9 gap-2 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 future:focus:ring-primary future:focus-visible:ring-primary future:aria-invalid:focus:ring-error future:aria-invalid:focus-visible:ring-error',
|
|
69
69
|
true: 'h-full min-h-5 min-w-0 flex-1 gap-2 p-0'
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -25,10 +25,10 @@ const SelectValue = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx(Val
|
|
|
25
25
|
...props
|
|
26
26
|
}));
|
|
27
27
|
SelectValue.displayName = Value.displayName;
|
|
28
|
-
const selectTriggerVariants = cva('flex w-full cursor-pointer items-center justify-between bg-transparent text-
|
|
28
|
+
const selectTriggerVariants = cva('flex w-full cursor-pointer items-center justify-between bg-transparent text-sm transition-colors data-[placeholder]:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 whitespace-nowrap *:data-[slot=select-value]:truncate *:data-[slot=select-value]:text-left [&_svg]:pointer-events-none [&_svg]:shrink-0 future:font-normal', {
|
|
29
29
|
variants: {
|
|
30
30
|
grouped: {
|
|
31
|
-
false: 'h-9 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 future:focus:ring-primary future:focus-visible:ring-primary future:aria-invalid:focus:ring-error future:aria-invalid:focus-visible:ring-error',
|
|
31
|
+
false: 'h-9 gap-2 rounded-md border border-input px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring focus-visible:ring-2 focus-visible:ring-ring future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:hover:bg-surface-hover future:px-4 future:gap-4 aria-invalid:border-error aria-invalid:focus-visible:ring-error future:aria-invalid:ring-1 future:aria-invalid:ring-error/40 future:focus:ring-primary future:focus-visible:ring-primary future:aria-invalid:focus:ring-error future:aria-invalid:focus-visible:ring-error',
|
|
32
32
|
true: 'h-full min-h-5 min-w-0 flex-1 gap-2 p-0'
|
|
33
33
|
}
|
|
34
34
|
},
|
|
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
useVisibleCount: ()=>useVisibleCount
|
|
28
28
|
});
|
|
29
29
|
const external_react_namespaceObject = require("react");
|
|
30
|
-
function useVisibleCount(enabled, keys, gap) {
|
|
30
|
+
function useVisibleCount(enabled, keys, gap, minVisible = 1) {
|
|
31
31
|
const containerRef = (0, external_react_namespaceObject.useRef)(null);
|
|
32
32
|
const itemRefs = (0, external_react_namespaceObject.useRef)([]);
|
|
33
33
|
const overflowRef = (0, external_react_namespaceObject.useRef)(null);
|
|
@@ -52,12 +52,13 @@ function useVisibleCount(enabled, keys, gap) {
|
|
|
52
52
|
used += width + gap;
|
|
53
53
|
fits += 1;
|
|
54
54
|
}
|
|
55
|
-
next = Math.max(
|
|
55
|
+
next = Math.max(minVisible, fits);
|
|
56
56
|
}
|
|
57
57
|
setVisibleCount((prev)=>prev === next ? prev : next);
|
|
58
58
|
}, [
|
|
59
59
|
itemCount,
|
|
60
|
-
gap
|
|
60
|
+
gap,
|
|
61
|
+
minVisible
|
|
61
62
|
]);
|
|
62
63
|
const key = keys.join('\u0000');
|
|
63
64
|
(0, external_react_namespaceObject.useLayoutEffect)(()=>{
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* sliced row could only ever shrink. Render the chip always too, with `overflowRef` attached and its
|
|
11
11
|
* widest text, so its width is known before anything overflows.
|
|
12
12
|
*/
|
|
13
|
-
export declare function useVisibleCount(enabled: boolean, keys: readonly string[], gap: number): {
|
|
13
|
+
export declare function useVisibleCount(enabled: boolean, keys: readonly string[], gap: number, minVisible?: number): {
|
|
14
14
|
containerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
15
15
|
itemRefs: import("react").RefObject<(HTMLElement | null)[]>;
|
|
16
16
|
overflowRef: import("react").RefObject<HTMLElement | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
function useVisibleCount(enabled, keys, gap) {
|
|
2
|
+
function useVisibleCount(enabled, keys, gap, minVisible = 1) {
|
|
3
3
|
const containerRef = useRef(null);
|
|
4
4
|
const itemRefs = useRef([]);
|
|
5
5
|
const overflowRef = useRef(null);
|
|
@@ -24,12 +24,13 @@ function useVisibleCount(enabled, keys, gap) {
|
|
|
24
24
|
used += width + gap;
|
|
25
25
|
fits += 1;
|
|
26
26
|
}
|
|
27
|
-
next = Math.max(
|
|
27
|
+
next = Math.max(minVisible, fits);
|
|
28
28
|
}
|
|
29
29
|
setVisibleCount((prev)=>prev === next ? prev : next);
|
|
30
30
|
}, [
|
|
31
31
|
itemCount,
|
|
32
|
-
gap
|
|
32
|
+
gap,
|
|
33
|
+
minVisible
|
|
33
34
|
]);
|
|
34
35
|
const key = keys.join('\u0000');
|
|
35
36
|
useLayoutEffect(()=>{
|
package/dist/styles.css
CHANGED
|
@@ -999,6 +999,9 @@
|
|
|
999
999
|
.ml-1 {
|
|
1000
1000
|
margin-left: calc(var(--spacing) * 1);
|
|
1001
1001
|
}
|
|
1002
|
+
.ml-1\.5 {
|
|
1003
|
+
margin-left: calc(var(--spacing) * 1.5);
|
|
1004
|
+
}
|
|
1002
1005
|
.ml-2 {
|
|
1003
1006
|
margin-left: calc(var(--spacing) * 2);
|
|
1004
1007
|
}
|
|
@@ -1991,6 +1994,9 @@
|
|
|
1991
1994
|
.grow {
|
|
1992
1995
|
flex-grow: 1;
|
|
1993
1996
|
}
|
|
1997
|
+
.basis-0 {
|
|
1998
|
+
flex-basis: calc(var(--spacing) * 0);
|
|
1999
|
+
}
|
|
1994
2000
|
.caption-bottom {
|
|
1995
2001
|
caption-side: bottom;
|
|
1996
2002
|
}
|
|
@@ -2305,6 +2311,9 @@
|
|
|
2305
2311
|
.grid-cols-\[minmax\(0\,1fr\)\] {
|
|
2306
2312
|
grid-template-columns: minmax(0,1fr);
|
|
2307
2313
|
}
|
|
2314
|
+
.grid-cols-\[minmax\(0\,max-content\)_auto\] {
|
|
2315
|
+
grid-template-columns: minmax(0,max-content) auto;
|
|
2316
|
+
}
|
|
2308
2317
|
.grid-rows-2 {
|
|
2309
2318
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
|
2310
2319
|
}
|
|
@@ -8187,6 +8196,22 @@
|
|
|
8187
8196
|
}
|
|
8188
8197
|
}
|
|
8189
8198
|
}
|
|
8199
|
+
.\*\:data-\[slot\=select-value\]\:truncate {
|
|
8200
|
+
:is(& > *) {
|
|
8201
|
+
&[data-slot="select-value"] {
|
|
8202
|
+
overflow: hidden;
|
|
8203
|
+
text-overflow: ellipsis;
|
|
8204
|
+
white-space: nowrap;
|
|
8205
|
+
}
|
|
8206
|
+
}
|
|
8207
|
+
}
|
|
8208
|
+
.\*\:data-\[slot\=select-value\]\:text-left {
|
|
8209
|
+
:is(& > *) {
|
|
8210
|
+
&[data-slot="select-value"] {
|
|
8211
|
+
text-align: left;
|
|
8212
|
+
}
|
|
8213
|
+
}
|
|
8214
|
+
}
|
|
8190
8215
|
.data-\[spacing\=0\]\:rounded-none {
|
|
8191
8216
|
&[data-spacing="0"] {
|
|
8192
8217
|
border-radius: 0;
|
|
@@ -9769,18 +9794,6 @@
|
|
|
9769
9794
|
}
|
|
9770
9795
|
}
|
|
9771
9796
|
}
|
|
9772
|
-
.\[\&_\[data-slot\=model-picker-tag\]\]\:max-w-full {
|
|
9773
|
-
& [data-slot=model-picker-tag] {
|
|
9774
|
-
max-width: 100%;
|
|
9775
|
-
}
|
|
9776
|
-
}
|
|
9777
|
-
.\[\&_\[data-slot\=model-picker-tag\]\]\:truncate {
|
|
9778
|
-
& [data-slot=model-picker-tag] {
|
|
9779
|
-
overflow: hidden;
|
|
9780
|
-
text-overflow: ellipsis;
|
|
9781
|
-
white-space: nowrap;
|
|
9782
|
-
}
|
|
9783
|
-
}
|
|
9784
9797
|
.\[\&_\[data-slot\=thinking-indicator-icon\]\]\:size-3\.5 {
|
|
9785
9798
|
& [data-slot=thinking-indicator-icon] {
|
|
9786
9799
|
width: calc(var(--spacing) * 3.5);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-wind",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.85.1",
|
|
4
4
|
"description": "UiPath wind design system - A Tailwind CSS based React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"storybook": "^10.6.2",
|
|
185
185
|
"typescript": "^5.9.3",
|
|
186
186
|
"vitest": "^4.1.12",
|
|
187
|
-
"@uipath/apollo-ui-icons-react": "
|
|
187
|
+
"@uipath/apollo-ui-icons-react": "1.0.0"
|
|
188
188
|
},
|
|
189
189
|
"keywords": [
|
|
190
190
|
"react",
|