@app-studio/web 0.9.54 → 0.9.55
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/index.d.ts +1 -1
- package/dist/web.cjs.development.js +222 -201
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +222 -202
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +222 -201
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +1 -2
|
@@ -9517,6 +9517,175 @@
|
|
|
9517
9517
|
// Exports the SwitchComponent as 'Switch' for use in other parts of the application.
|
|
9518
9518
|
var Switch = SwitchComponent;
|
|
9519
9519
|
|
|
9520
|
+
// Initializes the custom hook 'useSelectorState' for managing the state of the Selector component
|
|
9521
|
+
var useSelectorState = _ref => {
|
|
9522
|
+
var {
|
|
9523
|
+
placeholder,
|
|
9524
|
+
isMulti,
|
|
9525
|
+
options,
|
|
9526
|
+
id = "selector-" + Math.random().toString(36).substr(2, 9)
|
|
9527
|
+
} = _ref;
|
|
9528
|
+
// Determines the default value based on the 'placeholder' and 'isMulti' props, setting to an empty array for multi-select or an empty string/single default option
|
|
9529
|
+
var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
|
|
9530
|
+
: Array.isArray(options) && options.length > 0 ? options[0].value : isMulti ? [] : ''; // If no placeholder, use the first option value if available, otherwise empty array for multi-select or empty string for single select
|
|
9531
|
+
// State hook for tracking mouse hover status over the Selector component
|
|
9532
|
+
var [isHovered, setIsHovered] = React__default.useState(false);
|
|
9533
|
+
// State hook for tracking focus status of the Selector input field
|
|
9534
|
+
var [isFocused, setIsFocused] = React__default.useState(false);
|
|
9535
|
+
// State hook for managing the value(s) selected by the user, initialized with the default value
|
|
9536
|
+
var [value, setValue] = React__default.useState(defaultValue);
|
|
9537
|
+
// State hook for keeping track of the currently highlighted index in the options list
|
|
9538
|
+
var [highlightedIndex, setHighlightedIndex] = React__default.useState(0);
|
|
9539
|
+
// State hook for managing visibility of the Selector dropdown, initially set to hidden
|
|
9540
|
+
var [hide, setHide] = React__default.useState(true);
|
|
9541
|
+
// Returns an object containing all stateful values and their associated setters to manage the Selector component's state
|
|
9542
|
+
return {
|
|
9543
|
+
id,
|
|
9544
|
+
value,
|
|
9545
|
+
setValue,
|
|
9546
|
+
hide,
|
|
9547
|
+
setHide,
|
|
9548
|
+
isHovered,
|
|
9549
|
+
setIsHovered,
|
|
9550
|
+
isFocused,
|
|
9551
|
+
setIsFocused,
|
|
9552
|
+
highlightedIndex,
|
|
9553
|
+
setHighlightedIndex
|
|
9554
|
+
};
|
|
9555
|
+
};
|
|
9556
|
+
|
|
9557
|
+
var _excluded$u = ["id", "name", "label", "value", "views", "options", "onChange", "setValue"];
|
|
9558
|
+
/**
|
|
9559
|
+
* SelectorView Component
|
|
9560
|
+
*
|
|
9561
|
+
* Renders a segmented control style selector.
|
|
9562
|
+
*/
|
|
9563
|
+
var SelectorView = _ref => {
|
|
9564
|
+
var {
|
|
9565
|
+
id,
|
|
9566
|
+
name,
|
|
9567
|
+
label,
|
|
9568
|
+
value,
|
|
9569
|
+
views = {},
|
|
9570
|
+
options = [],
|
|
9571
|
+
onChange = () => {},
|
|
9572
|
+
setValue = () => {}
|
|
9573
|
+
} = _ref,
|
|
9574
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
9575
|
+
var {
|
|
9576
|
+
getColor
|
|
9577
|
+
} = appStudio.useTheme();
|
|
9578
|
+
var handleCallback = React.useCallback(option => {
|
|
9579
|
+
setValue(option.value);
|
|
9580
|
+
if (onChange) onChange(option.value);
|
|
9581
|
+
}, [setValue, onChange]);
|
|
9582
|
+
return /*#__PURE__*/React__default.createElement(FieldContainer, {
|
|
9583
|
+
id: id,
|
|
9584
|
+
width: "100%",
|
|
9585
|
+
views: views
|
|
9586
|
+
}, label && (/*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
9587
|
+
fontSize: "10px",
|
|
9588
|
+
letterSpacing: "wider",
|
|
9589
|
+
color: "color.black.500",
|
|
9590
|
+
fontWeight: "bold",
|
|
9591
|
+
marginBottom: 12,
|
|
9592
|
+
alignItems: "center",
|
|
9593
|
+
gap: 6,
|
|
9594
|
+
//Text transform uppercase
|
|
9595
|
+
style: {
|
|
9596
|
+
textTransform: 'uppercase'
|
|
9597
|
+
}
|
|
9598
|
+
}, /*#__PURE__*/React__default.createElement(InfoIcon, {
|
|
9599
|
+
widthHeight: 14
|
|
9600
|
+
}), " ", /*#__PURE__*/React__default.createElement(appStudio.Text, null, label))), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
9601
|
+
gap: 0
|
|
9602
|
+
}, options.map((option, index, arr) => {
|
|
9603
|
+
var isSelected = value === option.value;
|
|
9604
|
+
var borderColor = getColor('color.gray.200');
|
|
9605
|
+
var textColor = getColor('color.gray.500');
|
|
9606
|
+
var bgColor = 'transparent';
|
|
9607
|
+
if (isSelected) {
|
|
9608
|
+
if (option.color) {
|
|
9609
|
+
// We need a way to get related colors (50, 500, 700 etc) from a base color if we want full fidelity.
|
|
9610
|
+
// But passing full style strings is easier.
|
|
9611
|
+
borderColor = getColor(option.color);
|
|
9612
|
+
textColor = getColor(option.color);
|
|
9613
|
+
// Try to approximate background color if possible, or just use white/transparent.
|
|
9614
|
+
// Simplification: if color provided, use it for border/text.
|
|
9615
|
+
// Background is hard to derive without more specific props.
|
|
9616
|
+
// Let's try to use a very light opacity of the color for background.
|
|
9617
|
+
bgColor = 'rgba(0,0,0,0.05)'; // Generic active background
|
|
9618
|
+
} else {
|
|
9619
|
+
// Default active style
|
|
9620
|
+
var primary = getColor('theme.primary');
|
|
9621
|
+
borderColor = primary;
|
|
9622
|
+
textColor = primary;
|
|
9623
|
+
bgColor = 'color.gray.50';
|
|
9624
|
+
}
|
|
9625
|
+
// Specific overrides based on user request "ComplexitySelector" style
|
|
9626
|
+
// If the values match 'High', 'Medium', 'Low' we can hardcode for *demo* fidelity if generic logic fails.
|
|
9627
|
+
// But let's try to make it generic.
|
|
9628
|
+
// The user simply pasted code.
|
|
9629
|
+
if (option.color) {
|
|
9630
|
+
// Fallback for customized options
|
|
9631
|
+
borderColor = getColor(option.color);
|
|
9632
|
+
textColor = getColor(option.color);
|
|
9633
|
+
bgColor = 'transparent';
|
|
9634
|
+
} else {
|
|
9635
|
+
// Default fallback
|
|
9636
|
+
borderColor = getColor('theme.primary');
|
|
9637
|
+
textColor = getColor('theme.primary');
|
|
9638
|
+
bgColor = getColor('color.blue.50');
|
|
9639
|
+
}
|
|
9640
|
+
}
|
|
9641
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
9642
|
+
key: option.value,
|
|
9643
|
+
onClick: () => handleCallback(option),
|
|
9644
|
+
flex: 1,
|
|
9645
|
+
paddingVertical: 6,
|
|
9646
|
+
fontSize: "12px",
|
|
9647
|
+
fontWeight: isSelected ? 'bold' : 'normal',
|
|
9648
|
+
style: {
|
|
9649
|
+
borderTop: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9650
|
+
borderBottom: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9651
|
+
borderLeft: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9652
|
+
borderRight: index === arr.length - 1 || isSelected ? "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')) : 'none',
|
|
9653
|
+
backgroundColor: bgColor,
|
|
9654
|
+
color: textColor,
|
|
9655
|
+
borderRadius: index === 0 ? '6px 0 0 6px' : index === arr.length - 1 ? '0 6px 6px 0' : '0',
|
|
9656
|
+
zIndex: isSelected ? 1 : 0,
|
|
9657
|
+
boxShadow: 'none'
|
|
9658
|
+
}
|
|
9659
|
+
}, views.item), option.label);
|
|
9660
|
+
})), /*#__PURE__*/React__default.createElement("input", {
|
|
9661
|
+
type: "hidden",
|
|
9662
|
+
id: id,
|
|
9663
|
+
name: name,
|
|
9664
|
+
value: Array.isArray(value) ? value.join(',') : value,
|
|
9665
|
+
onChange: () => {}
|
|
9666
|
+
}));
|
|
9667
|
+
};
|
|
9668
|
+
|
|
9669
|
+
// Defines a functional component named 'SelectorComponent', which is expected to receive 'SelectorProps' as properties.
|
|
9670
|
+
var SelectorComponent = props => {
|
|
9671
|
+
// Ensure options is always an array
|
|
9672
|
+
var safeProps = Object.assign({}, props, {
|
|
9673
|
+
options: props.options || []
|
|
9674
|
+
});
|
|
9675
|
+
// Invokes the 'useSelectorState' hook with props to obtain stateful logic for the Selector component.
|
|
9676
|
+
var selectorStates = useSelectorState(safeProps);
|
|
9677
|
+
// Renders the 'SelectorView' component, passing along any states controlled by 'useSelectorState' and all properties passed to 'SelectorComponent'.
|
|
9678
|
+
return /*#__PURE__*/React__default.createElement(SelectorView, Object.assign({}, selectorStates, safeProps, {
|
|
9679
|
+
onClick: e => {
|
|
9680
|
+
// Stop propagation to prevent the global click handler from closing other dropdowns
|
|
9681
|
+
e.stopPropagation();
|
|
9682
|
+
if (props.onClick) props.onClick(e);
|
|
9683
|
+
}
|
|
9684
|
+
}));
|
|
9685
|
+
};
|
|
9686
|
+
// Exports 'SelectorComponent' as 'Selector', making it available for import in other parts of the application.
|
|
9687
|
+
var Selector = SelectorComponent;
|
|
9688
|
+
|
|
9520
9689
|
// Declaration of the useTextAreaState custom hook for managing the text area component state.
|
|
9521
9690
|
var useTextAreaState = _ref => {
|
|
9522
9691
|
var {
|
|
@@ -9549,7 +9718,7 @@
|
|
|
9549
9718
|
// Export of the useTextAreaState hook for external usage.
|
|
9550
9719
|
};
|
|
9551
9720
|
|
|
9552
|
-
var _excluded$
|
|
9721
|
+
var _excluded$v = ["id", "name", "hint", "error", "value", "label", "shadow", "helperText", "placeholder", "size", "shape", "variant", "isHovered", "isFocused", "isEditable", "isReadOnly", "isDisabled", "isAutoFocus", "isMultiline", "maxRows", "maxCols", "onBlur", "onChange", "onFocus", "setHint", "setValue", "setIsFocused", "setIsHovered", "views"];
|
|
9553
9722
|
var TextAreaView = _ref => {
|
|
9554
9723
|
var {
|
|
9555
9724
|
id,
|
|
@@ -9584,7 +9753,7 @@
|
|
|
9584
9753
|
helperText: {}
|
|
9585
9754
|
}
|
|
9586
9755
|
} = _ref,
|
|
9587
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9756
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
9588
9757
|
var showLabel = !!(isFocused && label);
|
|
9589
9758
|
/**
|
|
9590
9759
|
* Styles for the textarea field
|
|
@@ -9723,7 +9892,7 @@
|
|
|
9723
9892
|
};
|
|
9724
9893
|
};
|
|
9725
9894
|
|
|
9726
|
-
var _excluded$
|
|
9895
|
+
var _excluded$w = ["id", "name", "label", "hint", "value", "onChange", "left", "right", "helperText", "placeholder", "onChangeText", "shadow", "views", "size", "shape", "variant", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isClearable", "isAutoFocus", "setHint", "setIsFocused", "setIsHovered", "setValue", "onClick", "onFocus", "onBlur", "themeMode"];
|
|
9727
9896
|
/**
|
|
9728
9897
|
* Input component for text fields
|
|
9729
9898
|
*/
|
|
@@ -9769,7 +9938,7 @@
|
|
|
9769
9938
|
onBlur = () => {},
|
|
9770
9939
|
themeMode: elementMode
|
|
9771
9940
|
} = _ref,
|
|
9772
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9941
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
9773
9942
|
var {
|
|
9774
9943
|
getColor,
|
|
9775
9944
|
themeMode
|
|
@@ -10048,7 +10217,7 @@
|
|
|
10048
10217
|
}
|
|
10049
10218
|
};
|
|
10050
10219
|
|
|
10051
|
-
var _excluded$
|
|
10220
|
+
var _excluded$x = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "views", "infoText", "helperText"];
|
|
10052
10221
|
var CheckboxView = _ref => {
|
|
10053
10222
|
var {
|
|
10054
10223
|
id,
|
|
@@ -10075,7 +10244,7 @@
|
|
|
10075
10244
|
},
|
|
10076
10245
|
infoText
|
|
10077
10246
|
} = _ref,
|
|
10078
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10247
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
10079
10248
|
var handleHover = () => setIsHovered(!isHovered);
|
|
10080
10249
|
var handleChange = () => {
|
|
10081
10250
|
if (!isReadOnly && !isDisabled) {
|
|
@@ -10533,7 +10702,7 @@
|
|
|
10533
10702
|
value: 'transparent'
|
|
10534
10703
|
}];
|
|
10535
10704
|
|
|
10536
|
-
var _excluded$
|
|
10705
|
+
var _excluded$y = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "shadow", "error", "isDisabled", "isReadOnly", "isFocused", "isHovered", "predefinedColors", "showCustomInput", "showRecentColors", "isOpen", "selectedColor", "recentColors", "customColor", "handleToggle", "handleColorSelect", "handleCustomColorChange", "handleCustomColorSubmit", "setIsFocused", "setIsHovered", "triggerRef", "dropdownRef"];
|
|
10537
10706
|
var ColorInputView = _ref => {
|
|
10538
10707
|
var {
|
|
10539
10708
|
// Basic props
|
|
@@ -10574,7 +10743,7 @@
|
|
|
10574
10743
|
dropdownRef
|
|
10575
10744
|
// Other props
|
|
10576
10745
|
} = _ref,
|
|
10577
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10746
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
10578
10747
|
var {
|
|
10579
10748
|
getColor
|
|
10580
10749
|
} = appStudio.useTheme();
|
|
@@ -12213,11 +12382,11 @@
|
|
|
12213
12382
|
xl: 16
|
|
12214
12383
|
};
|
|
12215
12384
|
|
|
12216
|
-
var _excluded$
|
|
12385
|
+
var _excluded$z = ["size"],
|
|
12217
12386
|
_excluded2$9 = ["size"],
|
|
12218
12387
|
_excluded3$8 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "views", "themeMode"];
|
|
12219
12388
|
var CountryList = _ref => {
|
|
12220
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12389
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
12221
12390
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
12222
12391
|
as: "ul"
|
|
12223
12392
|
}, props));
|
|
@@ -12455,7 +12624,7 @@
|
|
|
12455
12624
|
};
|
|
12456
12625
|
};
|
|
12457
12626
|
|
|
12458
|
-
var _excluded$
|
|
12627
|
+
var _excluded$A = ["id", "icon", "name", "label", "date", "children", "helperText", "shadow", "size", "variant", "shape", "views", "error", "isHovered", "isFocused", "isDisabled", "isReadOnly", "setDate", "setIsFocused", "setIsHovered", "onChange", "onChangeText"];
|
|
12459
12628
|
var DatePickerContent = props => /*#__PURE__*/React__default.createElement(appStudio.Input, Object.assign({
|
|
12460
12629
|
type: "date"
|
|
12461
12630
|
}, props));
|
|
@@ -12488,7 +12657,7 @@
|
|
|
12488
12657
|
onChange,
|
|
12489
12658
|
onChangeText
|
|
12490
12659
|
} = _ref,
|
|
12491
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12660
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
12492
12661
|
var showLabel = !!(isFocused && label);
|
|
12493
12662
|
var handleHover = () => setIsHovered(!isHovered);
|
|
12494
12663
|
var handleFocus = () => setIsFocused(true);
|
|
@@ -12575,7 +12744,7 @@
|
|
|
12575
12744
|
}, props, textFieldStates);
|
|
12576
12745
|
};
|
|
12577
12746
|
|
|
12578
|
-
var _excluded$
|
|
12747
|
+
var _excluded$B = ["visibleIcon", "hiddenIcon"],
|
|
12579
12748
|
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
12580
12749
|
var PasswordComponent = _ref => {
|
|
12581
12750
|
var {
|
|
@@ -12586,7 +12755,7 @@
|
|
|
12586
12755
|
widthHeight: 14
|
|
12587
12756
|
})
|
|
12588
12757
|
} = _ref,
|
|
12589
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12758
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
12590
12759
|
var _usePasswordState = usePasswordState(props),
|
|
12591
12760
|
{
|
|
12592
12761
|
isVisible,
|
|
@@ -12640,7 +12809,7 @@
|
|
|
12640
12809
|
};
|
|
12641
12810
|
};
|
|
12642
12811
|
|
|
12643
|
-
var _excluded$
|
|
12812
|
+
var _excluded$C = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "views", "isDropdownVisible", "setIsDropdownVisible"];
|
|
12644
12813
|
// Defines the functional component 'ComboBoxView' with destructured props.
|
|
12645
12814
|
var ComboBoxView = _ref => {
|
|
12646
12815
|
var {
|
|
@@ -12665,7 +12834,7 @@
|
|
|
12665
12834
|
setIsDropdownVisible
|
|
12666
12835
|
// Collects all further props not destructured explicitly.
|
|
12667
12836
|
} = _ref,
|
|
12668
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12837
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
12669
12838
|
var {
|
|
12670
12839
|
ref: triggerRef,
|
|
12671
12840
|
relation
|
|
@@ -12844,7 +13013,7 @@
|
|
|
12844
13013
|
}, "No items found")))))));
|
|
12845
13014
|
};
|
|
12846
13015
|
|
|
12847
|
-
var _excluded$
|
|
13016
|
+
var _excluded$D = ["id", "name", "items", "placeholder", "searchPlaceholder"];
|
|
12848
13017
|
// Defines the ComboBoxComponent functional component with ComboBoxProps
|
|
12849
13018
|
var ComboBoxComponent = _ref => {
|
|
12850
13019
|
var {
|
|
@@ -12860,7 +13029,7 @@
|
|
|
12860
13029
|
searchPlaceholder
|
|
12861
13030
|
// Destructures the rest of the props not explicitly defined
|
|
12862
13031
|
} = _ref,
|
|
12863
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13032
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
12864
13033
|
// Initializes ComboBox state using custom hook with items and placeholders
|
|
12865
13034
|
var state = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
12866
13035
|
return (
|
|
@@ -13069,7 +13238,7 @@
|
|
|
13069
13238
|
};
|
|
13070
13239
|
};
|
|
13071
13240
|
|
|
13072
|
-
var _excluded$
|
|
13241
|
+
var _excluded$E = ["id", "name", "label", "placeholder", "helperText", "error", "inputValue", "tags", "left", "right", "shadow", "views", "size", "shape", "variant", "isDisabled", "isReadOnly", "isAutoFocus", "isRemovable", "isFocused", "isHovered", "maxTags", "handleInputChange", "handleKeyDown", "handleFocus", "handleBlur", "removeTag", "setIsHovered", "onClick"];
|
|
13073
13242
|
/**
|
|
13074
13243
|
* Individual tag chip component
|
|
13075
13244
|
*/
|
|
@@ -13194,7 +13363,7 @@
|
|
|
13194
13363
|
setIsHovered,
|
|
13195
13364
|
onClick
|
|
13196
13365
|
} = _ref2,
|
|
13197
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
13366
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$E);
|
|
13198
13367
|
var {
|
|
13199
13368
|
getColor,
|
|
13200
13369
|
themeMode
|
|
@@ -13277,7 +13446,7 @@
|
|
|
13277
13446
|
}, views == null ? void 0 : views.placeholder), "Maximum ", maxTags, " tags reached")))), right));
|
|
13278
13447
|
};
|
|
13279
13448
|
|
|
13280
|
-
var _excluded$
|
|
13449
|
+
var _excluded$F = ["tags"];
|
|
13281
13450
|
/**
|
|
13282
13451
|
* TagInput Component
|
|
13283
13452
|
*
|
|
@@ -13289,7 +13458,7 @@
|
|
|
13289
13458
|
// Initialize state management with the custom hook
|
|
13290
13459
|
var tagInputState = useTagInputState(props);
|
|
13291
13460
|
// Separate the tags prop to avoid type conflicts
|
|
13292
|
-
var restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13461
|
+
var restProps = _objectWithoutPropertiesLoose(props, _excluded$F);
|
|
13293
13462
|
// Render the view component with combined props and state
|
|
13294
13463
|
return /*#__PURE__*/React__default.createElement(TagInputView, Object.assign({}, tagInputState, restProps));
|
|
13295
13464
|
};
|
|
@@ -13602,7 +13771,7 @@
|
|
|
13602
13771
|
};
|
|
13603
13772
|
};
|
|
13604
13773
|
|
|
13605
|
-
var _excluded$
|
|
13774
|
+
var _excluded$G = ["id", "name", "label", "value", "length", "onChange", "onChangeText", "onComplete", "helperText", "placeholder", "shadow", "views", "size", "shape", "variant", "gap", "type", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isAutoFocus", "setValue", "setIsFocused", "setIsHovered", "inputRef", "containerRef", "mirrorSelectionStart", "mirrorSelectionEnd", "setMirrorSelectionStart", "setMirrorSelectionEnd", "handlePaste", "handleChange", "handleFocus", "handleBlur", "handleKeyDown", "handleKeyPress", "secureTextEntry", "isFirstColumn", "stepValues", "setInputRef", "onBlur", "onClick", "onFocus"];
|
|
13606
13775
|
// Create a context for OTP input slots
|
|
13607
13776
|
var OTPInputContext = /*#__PURE__*/React.createContext({
|
|
13608
13777
|
slots: [],
|
|
@@ -13656,7 +13825,7 @@
|
|
|
13656
13825
|
onFocus = () => {}
|
|
13657
13826
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13658
13827
|
} = _ref,
|
|
13659
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13828
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
13660
13829
|
appStudio.useTheme(); // Initialize theme context
|
|
13661
13830
|
var showLabel = !!label;
|
|
13662
13831
|
// Create context value for slots
|
|
@@ -13888,7 +14057,7 @@
|
|
|
13888
14057
|
};
|
|
13889
14058
|
var OTPInput = OTPInputComponent;
|
|
13890
14059
|
|
|
13891
|
-
var _excluded$
|
|
14060
|
+
var _excluded$H = ["children", "autoFocus", "initFocus", "onChange"];
|
|
13892
14061
|
var FocusContext = /*#__PURE__*/React.createContext({
|
|
13893
14062
|
active: false,
|
|
13894
14063
|
focusNextInput: () => {},
|
|
@@ -13904,7 +14073,7 @@
|
|
|
13904
14073
|
initFocus,
|
|
13905
14074
|
onChange = () => {}
|
|
13906
14075
|
} = _ref,
|
|
13907
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14076
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
13908
14077
|
var formik$1 = formik.useFormikContext();
|
|
13909
14078
|
React.useEffect(() => {
|
|
13910
14079
|
onChange(formik$1.values);
|
|
@@ -13952,7 +14121,7 @@
|
|
|
13952
14121
|
}, /*#__PURE__*/React__default.createElement(appStudio.Form, Object.assign({}, props), children));
|
|
13953
14122
|
};
|
|
13954
14123
|
|
|
13955
|
-
var _excluded$
|
|
14124
|
+
var _excluded$I = ["name", "type"];
|
|
13956
14125
|
var getInputTypeProps = type => {
|
|
13957
14126
|
switch (type) {
|
|
13958
14127
|
case 'email':
|
|
@@ -13991,7 +14160,7 @@
|
|
|
13991
14160
|
name,
|
|
13992
14161
|
type
|
|
13993
14162
|
} = _ref,
|
|
13994
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14163
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
13995
14164
|
var focus = useFormFocus();
|
|
13996
14165
|
var {
|
|
13997
14166
|
touched,
|
|
@@ -14035,13 +14204,13 @@
|
|
|
14035
14204
|
} : {});
|
|
14036
14205
|
};
|
|
14037
14206
|
|
|
14038
|
-
var _excluded$
|
|
14207
|
+
var _excluded$J = ["value"];
|
|
14039
14208
|
var CheckboxComponent$1 = props => {
|
|
14040
14209
|
var _useFormikInput = useFormikInput(props),
|
|
14041
14210
|
{
|
|
14042
14211
|
value
|
|
14043
14212
|
} = _useFormikInput,
|
|
14044
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
14213
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$J);
|
|
14045
14214
|
formProps.isChecked = value;
|
|
14046
14215
|
var checkboxStates = useCheckboxState(props);
|
|
14047
14216
|
return /*#__PURE__*/React__default.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -14761,7 +14930,7 @@
|
|
|
14761
14930
|
};
|
|
14762
14931
|
};
|
|
14763
14932
|
|
|
14764
|
-
var _excluded$
|
|
14933
|
+
var _excluded$K = ["children", "views", "asChild"],
|
|
14765
14934
|
_excluded2$b = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14766
14935
|
// Create context for the HoverCard
|
|
14767
14936
|
var HoverCardContext = /*#__PURE__*/React.createContext({
|
|
@@ -14800,7 +14969,7 @@
|
|
|
14800
14969
|
views,
|
|
14801
14970
|
asChild = false
|
|
14802
14971
|
} = _ref2,
|
|
14803
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
14972
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$K);
|
|
14804
14973
|
var {
|
|
14805
14974
|
openCard,
|
|
14806
14975
|
closeCard,
|
|
@@ -14970,7 +15139,7 @@
|
|
|
14970
15139
|
}, views == null ? void 0 : views.container, props), children);
|
|
14971
15140
|
};
|
|
14972
15141
|
|
|
14973
|
-
var _excluded$
|
|
15142
|
+
var _excluded$L = ["children", "views", "openDelay", "closeDelay"];
|
|
14974
15143
|
/**
|
|
14975
15144
|
* HoverCard component displays floating content when hovering over a trigger element.
|
|
14976
15145
|
* Supports configurable open and close delays for a smoother user experience.
|
|
@@ -14982,7 +15151,7 @@
|
|
|
14982
15151
|
openDelay,
|
|
14983
15152
|
closeDelay
|
|
14984
15153
|
} = _ref,
|
|
14985
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15154
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
14986
15155
|
var hoverCardState = useHoverCardState({
|
|
14987
15156
|
openDelay,
|
|
14988
15157
|
closeDelay
|
|
@@ -15594,7 +15763,7 @@
|
|
|
15594
15763
|
}))));
|
|
15595
15764
|
};
|
|
15596
15765
|
|
|
15597
|
-
var _excluded$
|
|
15766
|
+
var _excluded$M = ["onSubmit", "placeholder", "loading", "disabled", "isAgentRunning", "enableAudioRecording", "leftButtons", "rightButtons", "onStopAgent", "loadingText", "autoFocus", "sandboxId", "hideAttachments", "attachmentText", "promptExamples", "suggestions", "errorMessage", "size", "shape", "variant", "views", "mentionData", "mentionTrigger", "onMentionSelect", "onAudioRecordingStart", "onAudioRecordingStop", "value", "handleChange", "handleSubmit", "editableRef", "fileInputRef", "isUploading", "uploadProgress", "isDraggingOver", "uploadedFiles", "removeUploadedFile", "setPendingFiles", "setUploadedFiles", "setIsUploading", "startUpload", "selectedModel", "handleModelChange", "modelOptions", "subscriptionStatus", "canAccessModel", "isGuideTipShown", "hideGuideTip", "handlePromptExampleSelect", "handleDragOver", "handleDragLeave"];
|
|
15598
15767
|
var ChatInputView = _ref => {
|
|
15599
15768
|
var _value$trim$length;
|
|
15600
15769
|
var {
|
|
@@ -15639,7 +15808,7 @@
|
|
|
15639
15808
|
handleDragLeave
|
|
15640
15809
|
// Other props
|
|
15641
15810
|
} = _ref,
|
|
15642
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15811
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
15643
15812
|
var {} = appStudio.useTheme();
|
|
15644
15813
|
// Combine styles
|
|
15645
15814
|
var containerStyles = Object.assign({}, DefaultChatInputStyles.container, Shapes$2[shape], views == null ? void 0 : views.container);
|
|
@@ -15866,13 +16035,13 @@
|
|
|
15866
16035
|
}, views == null ? void 0 : views.bottomTip), errorMessage)));
|
|
15867
16036
|
};
|
|
15868
16037
|
|
|
15869
|
-
var _excluded$
|
|
16038
|
+
var _excluded$N = ["name", "onSubmit"];
|
|
15870
16039
|
var ChatInputComponent = props => {
|
|
15871
16040
|
var {
|
|
15872
16041
|
name,
|
|
15873
16042
|
onSubmit
|
|
15874
16043
|
} = props,
|
|
15875
|
-
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16044
|
+
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$N);
|
|
15876
16045
|
// State for managing pending files
|
|
15877
16046
|
var [pendingFiles, setPendingFiles] = React.useState([]);
|
|
15878
16047
|
// Get Formik integration props
|
|
@@ -15969,7 +16138,7 @@
|
|
|
15969
16138
|
};
|
|
15970
16139
|
var FormikSwitch = SwitchComponent$1;
|
|
15971
16140
|
|
|
15972
|
-
var _excluded$
|
|
16141
|
+
var _excluded$O = ["name"],
|
|
15973
16142
|
_excluded2$c = ["tags"];
|
|
15974
16143
|
/**
|
|
15975
16144
|
* Formik-integrated TagInput component
|
|
@@ -15978,7 +16147,7 @@
|
|
|
15978
16147
|
var {
|
|
15979
16148
|
name
|
|
15980
16149
|
} = props,
|
|
15981
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16150
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$O);
|
|
15982
16151
|
// Get Formik context directly for better control
|
|
15983
16152
|
var {
|
|
15984
16153
|
values,
|
|
@@ -16036,11 +16205,11 @@
|
|
|
16036
16205
|
*/
|
|
16037
16206
|
var FormikTextArea = TextAreaComponent$1;
|
|
16038
16207
|
|
|
16039
|
-
var _excluded$
|
|
16208
|
+
var _excluded$P = ["value"];
|
|
16040
16209
|
var TextFieldComponent$1 = props => {
|
|
16041
16210
|
var formProps = useFormikInput(props);
|
|
16042
16211
|
var _useTextFieldState = useTextFieldState(props),
|
|
16043
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
16212
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$P);
|
|
16044
16213
|
return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
16045
16214
|
};
|
|
16046
16215
|
/**
|
|
@@ -16048,7 +16217,7 @@
|
|
|
16048
16217
|
*/
|
|
16049
16218
|
var FormikTextField = TextFieldComponent$1;
|
|
16050
16219
|
|
|
16051
|
-
var _excluded$
|
|
16220
|
+
var _excluded$Q = ["visibleIcon", "hiddenIcon"],
|
|
16052
16221
|
_excluded2$d = ["isVisible", "setIsVisible"];
|
|
16053
16222
|
var PasswordComponent$1 = _ref => {
|
|
16054
16223
|
var {
|
|
@@ -16059,7 +16228,7 @@
|
|
|
16059
16228
|
widthHeight: 14
|
|
16060
16229
|
})
|
|
16061
16230
|
} = _ref,
|
|
16062
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16231
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
16063
16232
|
var formProps = useFormikInput(props);
|
|
16064
16233
|
var _usePasswordState = usePasswordState(formProps),
|
|
16065
16234
|
{
|
|
@@ -16084,14 +16253,14 @@
|
|
|
16084
16253
|
*/
|
|
16085
16254
|
var FormikPassword = PasswordComponent$1;
|
|
16086
16255
|
|
|
16087
|
-
var _excluded$
|
|
16256
|
+
var _excluded$R = ["items", "placeholder", "searchPlaceholder"];
|
|
16088
16257
|
var ComboBoxComponent$1 = _ref => {
|
|
16089
16258
|
var {
|
|
16090
16259
|
items,
|
|
16091
16260
|
placeholder,
|
|
16092
16261
|
searchPlaceholder
|
|
16093
16262
|
} = _ref,
|
|
16094
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16263
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
16095
16264
|
var formProps = useFormikInput(props);
|
|
16096
16265
|
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
16097
16266
|
// Ensure the onChange function from formProps is being called when an item is selected
|
|
@@ -16374,7 +16543,7 @@
|
|
|
16374
16543
|
}
|
|
16375
16544
|
};
|
|
16376
16545
|
|
|
16377
|
-
var _excluded$
|
|
16546
|
+
var _excluded$S = ["min", "max", "step", "currentValue", "stepValues", "shape", "size", "variant", "orientation", "isDisabled", "showValue", "showTooltip", "backgroundColor", "label", "helperText", "themeMode", "shadow", "isDragging", "isHovered", "setIsHovered", "trackRef", "thumbRef", "handleThumbMouseDown", "handleTrackMouseDown", "handleKeyDown", "thumbPositionPercent", "ariaLabel", "views"];
|
|
16378
16547
|
var SliderView = _ref => {
|
|
16379
16548
|
var _views$tooltip, _views$tooltip2;
|
|
16380
16549
|
var {
|
|
@@ -16417,7 +16586,7 @@
|
|
|
16417
16586
|
tooltip: {}
|
|
16418
16587
|
}
|
|
16419
16588
|
} = _ref,
|
|
16420
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16589
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$S);
|
|
16421
16590
|
var {
|
|
16422
16591
|
getColor,
|
|
16423
16592
|
themeMode
|
|
@@ -16740,7 +16909,7 @@
|
|
|
16740
16909
|
*/
|
|
16741
16910
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16742
16911
|
|
|
16743
|
-
var _excluded$
|
|
16912
|
+
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16744
16913
|
var defaultUploadFile = (file, onProgress) => {
|
|
16745
16914
|
return api.UploadService.uploadControllerFile({
|
|
16746
16915
|
file
|
|
@@ -16766,7 +16935,7 @@
|
|
|
16766
16935
|
onFileSelect,
|
|
16767
16936
|
multiple = true
|
|
16768
16937
|
} = _ref,
|
|
16769
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16938
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
16770
16939
|
var {
|
|
16771
16940
|
setFieldValue,
|
|
16772
16941
|
setFieldTouched,
|
|
@@ -16836,156 +17005,7 @@
|
|
|
16836
17005
|
};
|
|
16837
17006
|
FormikUploader.displayName = 'FormikUploader';
|
|
16838
17007
|
|
|
16839
|
-
|
|
16840
|
-
var useSelectorState = _ref => {
|
|
16841
|
-
var {
|
|
16842
|
-
placeholder,
|
|
16843
|
-
isMulti,
|
|
16844
|
-
options,
|
|
16845
|
-
id = "selector-" + Math.random().toString(36).substr(2, 9)
|
|
16846
|
-
} = _ref;
|
|
16847
|
-
// Determines the default value based on the 'placeholder' and 'isMulti' props, setting to an empty array for multi-select or an empty string/single default option
|
|
16848
|
-
var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
|
|
16849
|
-
: Array.isArray(options) && options.length > 0 ? options[0].value : isMulti ? [] : ''; // If no placeholder, use the first option value if available, otherwise empty array for multi-select or empty string for single select
|
|
16850
|
-
// State hook for tracking mouse hover status over the Selector component
|
|
16851
|
-
var [isHovered, setIsHovered] = React__default.useState(false);
|
|
16852
|
-
// State hook for tracking focus status of the Selector input field
|
|
16853
|
-
var [isFocused, setIsFocused] = React__default.useState(false);
|
|
16854
|
-
// State hook for managing the value(s) selected by the user, initialized with the default value
|
|
16855
|
-
var [value, setValue] = React__default.useState(defaultValue);
|
|
16856
|
-
// State hook for keeping track of the currently highlighted index in the options list
|
|
16857
|
-
var [highlightedIndex, setHighlightedIndex] = React__default.useState(0);
|
|
16858
|
-
// State hook for managing visibility of the Selector dropdown, initially set to hidden
|
|
16859
|
-
var [hide, setHide] = React__default.useState(true);
|
|
16860
|
-
// Returns an object containing all stateful values and their associated setters to manage the Selector component's state
|
|
16861
|
-
return {
|
|
16862
|
-
id,
|
|
16863
|
-
value,
|
|
16864
|
-
setValue,
|
|
16865
|
-
hide,
|
|
16866
|
-
setHide,
|
|
16867
|
-
isHovered,
|
|
16868
|
-
setIsHovered,
|
|
16869
|
-
isFocused,
|
|
16870
|
-
setIsFocused,
|
|
16871
|
-
highlightedIndex,
|
|
16872
|
-
setHighlightedIndex
|
|
16873
|
-
};
|
|
16874
|
-
};
|
|
16875
|
-
|
|
16876
|
-
var _excluded$T = ["id", "name", "label", "value", "views", "options", "onChange", "setValue"];
|
|
16877
|
-
/**
|
|
16878
|
-
* SelectorView Component
|
|
16879
|
-
*
|
|
16880
|
-
* Renders a segmented control style selector.
|
|
16881
|
-
*/
|
|
16882
|
-
var SelectorView = _ref => {
|
|
16883
|
-
var {
|
|
16884
|
-
id,
|
|
16885
|
-
name,
|
|
16886
|
-
label,
|
|
16887
|
-
value,
|
|
16888
|
-
views = {},
|
|
16889
|
-
options = [],
|
|
16890
|
-
onChange = () => {},
|
|
16891
|
-
setValue = () => {}
|
|
16892
|
-
} = _ref,
|
|
16893
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
16894
|
-
var {
|
|
16895
|
-
getColor
|
|
16896
|
-
} = appStudio.useTheme();
|
|
16897
|
-
var handleCallback = React.useCallback(option => {
|
|
16898
|
-
setValue(option.value);
|
|
16899
|
-
if (onChange) onChange(option.value);
|
|
16900
|
-
}, [setValue, onChange]);
|
|
16901
|
-
return /*#__PURE__*/React__default.createElement(FieldContainer, {
|
|
16902
|
-
id: id,
|
|
16903
|
-
width: "100%",
|
|
16904
|
-
views: views
|
|
16905
|
-
}, label && (/*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
16906
|
-
fontSize: "10px",
|
|
16907
|
-
letterSpacing: "wider",
|
|
16908
|
-
color: "color.black.500",
|
|
16909
|
-
fontWeight: "bold",
|
|
16910
|
-
marginBottom: 12,
|
|
16911
|
-
alignItems: "center",
|
|
16912
|
-
gap: 6,
|
|
16913
|
-
//Text transform uppercase
|
|
16914
|
-
style: {
|
|
16915
|
-
textTransform: 'uppercase'
|
|
16916
|
-
}
|
|
16917
|
-
}, /*#__PURE__*/React__default.createElement(InfoIcon, {
|
|
16918
|
-
widthHeight: 14
|
|
16919
|
-
}), " ", /*#__PURE__*/React__default.createElement(appStudio.Text, null, label))), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
16920
|
-
gap: 0
|
|
16921
|
-
}, options.map((option, index, arr) => {
|
|
16922
|
-
var isSelected = value === option.value;
|
|
16923
|
-
var borderColor = getColor('color.gray.200');
|
|
16924
|
-
var textColor = getColor('color.gray.500');
|
|
16925
|
-
var bgColor = 'transparent';
|
|
16926
|
-
if (isSelected) {
|
|
16927
|
-
if (option.color) {
|
|
16928
|
-
// We need a way to get related colors (50, 500, 700 etc) from a base color if we want full fidelity.
|
|
16929
|
-
// But passing full style strings is easier.
|
|
16930
|
-
borderColor = getColor(option.color);
|
|
16931
|
-
textColor = getColor(option.color);
|
|
16932
|
-
// Try to approximate background color if possible, or just use white/transparent.
|
|
16933
|
-
// Simplification: if color provided, use it for border/text.
|
|
16934
|
-
// Background is hard to derive without more specific props.
|
|
16935
|
-
// Let's try to use a very light opacity of the color for background.
|
|
16936
|
-
bgColor = 'rgba(0,0,0,0.05)'; // Generic active background
|
|
16937
|
-
} else {
|
|
16938
|
-
// Default active style
|
|
16939
|
-
var primary = getColor('theme.primary');
|
|
16940
|
-
borderColor = primary;
|
|
16941
|
-
textColor = primary;
|
|
16942
|
-
bgColor = 'color.gray.50';
|
|
16943
|
-
}
|
|
16944
|
-
// Specific overrides based on user request "ComplexitySelector" style
|
|
16945
|
-
// If the values match 'High', 'Medium', 'Low' we can hardcode for *demo* fidelity if generic logic fails.
|
|
16946
|
-
// But let's try to make it generic.
|
|
16947
|
-
// The user simply pasted code.
|
|
16948
|
-
if (option.color) {
|
|
16949
|
-
// Fallback for customized options
|
|
16950
|
-
borderColor = getColor(option.color);
|
|
16951
|
-
textColor = getColor(option.color);
|
|
16952
|
-
bgColor = 'transparent';
|
|
16953
|
-
} else {
|
|
16954
|
-
// Default fallback
|
|
16955
|
-
borderColor = getColor('theme.primary');
|
|
16956
|
-
textColor = getColor('theme.primary');
|
|
16957
|
-
bgColor = getColor('color.blue.50');
|
|
16958
|
-
}
|
|
16959
|
-
}
|
|
16960
|
-
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
16961
|
-
key: option.value,
|
|
16962
|
-
onClick: () => handleCallback(option),
|
|
16963
|
-
flex: 1,
|
|
16964
|
-
paddingVertical: 6,
|
|
16965
|
-
fontSize: "12px",
|
|
16966
|
-
fontWeight: isSelected ? 'bold' : 'normal',
|
|
16967
|
-
style: {
|
|
16968
|
-
borderTop: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
16969
|
-
borderBottom: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
16970
|
-
borderLeft: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
16971
|
-
borderRight: index === arr.length - 1 || isSelected ? "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')) : 'none',
|
|
16972
|
-
backgroundColor: bgColor,
|
|
16973
|
-
color: textColor,
|
|
16974
|
-
borderRadius: index === 0 ? '6px 0 0 6px' : index === arr.length - 1 ? '0 6px 6px 0' : '0',
|
|
16975
|
-
zIndex: isSelected ? 1 : 0,
|
|
16976
|
-
boxShadow: 'none'
|
|
16977
|
-
}
|
|
16978
|
-
}, views.item), option.label);
|
|
16979
|
-
})), /*#__PURE__*/React__default.createElement("input", {
|
|
16980
|
-
type: "hidden",
|
|
16981
|
-
id: id,
|
|
16982
|
-
name: name,
|
|
16983
|
-
value: Array.isArray(value) ? value.join(',') : value,
|
|
16984
|
-
onChange: () => {}
|
|
16985
|
-
}));
|
|
16986
|
-
};
|
|
16987
|
-
|
|
16988
|
-
var SelectorComponent = props => {
|
|
17008
|
+
var SelectorComponent$1 = props => {
|
|
16989
17009
|
var formProps = useFormikInput(props);
|
|
16990
17010
|
formProps.selected = formProps.value;
|
|
16991
17011
|
var selectorStates = useSelectorState(props);
|
|
@@ -16994,7 +17014,7 @@
|
|
|
16994
17014
|
/**
|
|
16995
17015
|
* Selector provides a dropdown list of options for the user to choose from.
|
|
16996
17016
|
*/
|
|
16997
|
-
var FormikSelector = SelectorComponent;
|
|
17017
|
+
var FormikSelector = SelectorComponent$1;
|
|
16998
17018
|
|
|
16999
17019
|
var AttachmentPreview = _ref => {
|
|
17000
17020
|
var {
|
|
@@ -28343,6 +28363,7 @@
|
|
|
28343
28363
|
exports.SaveIcon = SaveIcon;
|
|
28344
28364
|
exports.SearchIcon = SearchIcon;
|
|
28345
28365
|
exports.Select = Select;
|
|
28366
|
+
exports.Selector = Selector;
|
|
28346
28367
|
exports.SendIcon = SendIcon;
|
|
28347
28368
|
exports.Separator = Separator;
|
|
28348
28369
|
exports.SettingsIcon = SettingsIcon;
|