@app-studio/web 0.9.54 → 0.9.56
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 +228 -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 +228 -202
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +228 -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,181 @@
|
|
|
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", "size", "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
|
+
size,
|
|
9570
|
+
views = {},
|
|
9571
|
+
options = [],
|
|
9572
|
+
onChange = () => {},
|
|
9573
|
+
setValue = () => {}
|
|
9574
|
+
} = _ref,
|
|
9575
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
9576
|
+
var {
|
|
9577
|
+
getColor
|
|
9578
|
+
} = appStudio.useTheme();
|
|
9579
|
+
var handleCallback = React.useCallback(option => {
|
|
9580
|
+
setValue(option.value);
|
|
9581
|
+
if (onChange) onChange(option.value);
|
|
9582
|
+
}, [setValue, onChange]);
|
|
9583
|
+
return /*#__PURE__*/React__default.createElement(FieldContainer, {
|
|
9584
|
+
id: id,
|
|
9585
|
+
width: "100%",
|
|
9586
|
+
views: views
|
|
9587
|
+
}, label && (/*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
9588
|
+
fontSize: "10px",
|
|
9589
|
+
letterSpacing: "wider",
|
|
9590
|
+
color: "color.black.500",
|
|
9591
|
+
fontWeight: "bold",
|
|
9592
|
+
marginBottom: 12,
|
|
9593
|
+
alignItems: "center",
|
|
9594
|
+
gap: 6,
|
|
9595
|
+
//Text transform uppercase
|
|
9596
|
+
style: {
|
|
9597
|
+
textTransform: 'uppercase'
|
|
9598
|
+
}
|
|
9599
|
+
}, /*#__PURE__*/React__default.createElement(InfoIcon, {
|
|
9600
|
+
widthHeight: 14
|
|
9601
|
+
}), " ", /*#__PURE__*/React__default.createElement(appStudio.Text, null, label))), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, {
|
|
9602
|
+
gap: 0
|
|
9603
|
+
}, options.map((option, index, arr) => {
|
|
9604
|
+
var isSelected = value === option.value;
|
|
9605
|
+
var borderColor = getColor('color.gray.200');
|
|
9606
|
+
var textColor = getColor('color.gray.500');
|
|
9607
|
+
var bgColor = 'transparent';
|
|
9608
|
+
if (isSelected) {
|
|
9609
|
+
if (option.color) {
|
|
9610
|
+
// We need a way to get related colors (50, 500, 700 etc) from a base color if we want full fidelity.
|
|
9611
|
+
// But passing full style strings is easier.
|
|
9612
|
+
borderColor = getColor(option.color);
|
|
9613
|
+
textColor = getColor(option.color);
|
|
9614
|
+
// Try to approximate background color if possible, or just use white/transparent.
|
|
9615
|
+
// Simplification: if color provided, use it for border/text.
|
|
9616
|
+
// Background is hard to derive without more specific props.
|
|
9617
|
+
// Let's try to use a very light opacity of the color for background.
|
|
9618
|
+
bgColor = 'rgba(0,0,0,0.05)'; // Generic active background
|
|
9619
|
+
} else {
|
|
9620
|
+
// Default active style
|
|
9621
|
+
var primary = getColor('theme.primary');
|
|
9622
|
+
borderColor = primary;
|
|
9623
|
+
textColor = primary;
|
|
9624
|
+
bgColor = 'color.gray.50';
|
|
9625
|
+
}
|
|
9626
|
+
// Specific overrides based on user request "ComplexitySelector" style
|
|
9627
|
+
// If the values match 'High', 'Medium', 'Low' we can hardcode for *demo* fidelity if generic logic fails.
|
|
9628
|
+
// But let's try to make it generic.
|
|
9629
|
+
// The user simply pasted code.
|
|
9630
|
+
if (option.color) {
|
|
9631
|
+
// Fallback for customized options
|
|
9632
|
+
borderColor = getColor(option.color);
|
|
9633
|
+
textColor = getColor(option.color);
|
|
9634
|
+
bgColor = 'transparent';
|
|
9635
|
+
} else {
|
|
9636
|
+
// Default fallback
|
|
9637
|
+
borderColor = getColor('theme.primary');
|
|
9638
|
+
textColor = getColor('theme.primary');
|
|
9639
|
+
bgColor = 'transparent';
|
|
9640
|
+
}
|
|
9641
|
+
}
|
|
9642
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
9643
|
+
key: option.value,
|
|
9644
|
+
onClick: () => handleCallback(option),
|
|
9645
|
+
flex: 1
|
|
9646
|
+
}, size ? {
|
|
9647
|
+
size
|
|
9648
|
+
} : {
|
|
9649
|
+
// Legacy default: keep existing compact look when `size` isn't specified.
|
|
9650
|
+
paddingVertical: 6,
|
|
9651
|
+
fontSize: '12px'
|
|
9652
|
+
}, {
|
|
9653
|
+
fontWeight: isSelected ? 'bold' : 'normal',
|
|
9654
|
+
style: {
|
|
9655
|
+
borderTop: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9656
|
+
borderBottom: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9657
|
+
borderLeft: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9658
|
+
borderRight: index === arr.length - 1 || isSelected ? "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')) : 'none',
|
|
9659
|
+
backgroundColor: bgColor,
|
|
9660
|
+
color: textColor,
|
|
9661
|
+
borderRadius: index === 0 ? '6px 0 0 6px' : index === arr.length - 1 ? '0 6px 6px 0' : '0',
|
|
9662
|
+
zIndex: isSelected ? 1 : 0,
|
|
9663
|
+
boxShadow: 'none'
|
|
9664
|
+
}
|
|
9665
|
+
}, views.item), option.label);
|
|
9666
|
+
})), /*#__PURE__*/React__default.createElement("input", {
|
|
9667
|
+
type: "hidden",
|
|
9668
|
+
id: id,
|
|
9669
|
+
name: name,
|
|
9670
|
+
value: Array.isArray(value) ? value.join(',') : value,
|
|
9671
|
+
onChange: () => {}
|
|
9672
|
+
}));
|
|
9673
|
+
};
|
|
9674
|
+
|
|
9675
|
+
// Defines a functional component named 'SelectorComponent', which is expected to receive 'SelectorProps' as properties.
|
|
9676
|
+
var SelectorComponent = props => {
|
|
9677
|
+
// Ensure options is always an array
|
|
9678
|
+
var safeProps = Object.assign({}, props, {
|
|
9679
|
+
options: props.options || []
|
|
9680
|
+
});
|
|
9681
|
+
// Invokes the 'useSelectorState' hook with props to obtain stateful logic for the Selector component.
|
|
9682
|
+
var selectorStates = useSelectorState(safeProps);
|
|
9683
|
+
// Renders the 'SelectorView' component, passing along any states controlled by 'useSelectorState' and all properties passed to 'SelectorComponent'.
|
|
9684
|
+
return /*#__PURE__*/React__default.createElement(SelectorView, Object.assign({}, selectorStates, safeProps, {
|
|
9685
|
+
onClick: e => {
|
|
9686
|
+
// Stop propagation to prevent the global click handler from closing other dropdowns
|
|
9687
|
+
e.stopPropagation();
|
|
9688
|
+
if (props.onClick) props.onClick(e);
|
|
9689
|
+
}
|
|
9690
|
+
}));
|
|
9691
|
+
};
|
|
9692
|
+
// Exports 'SelectorComponent' as 'Selector', making it available for import in other parts of the application.
|
|
9693
|
+
var Selector = SelectorComponent;
|
|
9694
|
+
|
|
9520
9695
|
// Declaration of the useTextAreaState custom hook for managing the text area component state.
|
|
9521
9696
|
var useTextAreaState = _ref => {
|
|
9522
9697
|
var {
|
|
@@ -9549,7 +9724,7 @@
|
|
|
9549
9724
|
// Export of the useTextAreaState hook for external usage.
|
|
9550
9725
|
};
|
|
9551
9726
|
|
|
9552
|
-
var _excluded$
|
|
9727
|
+
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
9728
|
var TextAreaView = _ref => {
|
|
9554
9729
|
var {
|
|
9555
9730
|
id,
|
|
@@ -9584,7 +9759,7 @@
|
|
|
9584
9759
|
helperText: {}
|
|
9585
9760
|
}
|
|
9586
9761
|
} = _ref,
|
|
9587
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9762
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
9588
9763
|
var showLabel = !!(isFocused && label);
|
|
9589
9764
|
/**
|
|
9590
9765
|
* Styles for the textarea field
|
|
@@ -9723,7 +9898,7 @@
|
|
|
9723
9898
|
};
|
|
9724
9899
|
};
|
|
9725
9900
|
|
|
9726
|
-
var _excluded$
|
|
9901
|
+
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
9902
|
/**
|
|
9728
9903
|
* Input component for text fields
|
|
9729
9904
|
*/
|
|
@@ -9769,7 +9944,7 @@
|
|
|
9769
9944
|
onBlur = () => {},
|
|
9770
9945
|
themeMode: elementMode
|
|
9771
9946
|
} = _ref,
|
|
9772
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9947
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
9773
9948
|
var {
|
|
9774
9949
|
getColor,
|
|
9775
9950
|
themeMode
|
|
@@ -10048,7 +10223,7 @@
|
|
|
10048
10223
|
}
|
|
10049
10224
|
};
|
|
10050
10225
|
|
|
10051
|
-
var _excluded$
|
|
10226
|
+
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
10227
|
var CheckboxView = _ref => {
|
|
10053
10228
|
var {
|
|
10054
10229
|
id,
|
|
@@ -10075,7 +10250,7 @@
|
|
|
10075
10250
|
},
|
|
10076
10251
|
infoText
|
|
10077
10252
|
} = _ref,
|
|
10078
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10253
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
10079
10254
|
var handleHover = () => setIsHovered(!isHovered);
|
|
10080
10255
|
var handleChange = () => {
|
|
10081
10256
|
if (!isReadOnly && !isDisabled) {
|
|
@@ -10533,7 +10708,7 @@
|
|
|
10533
10708
|
value: 'transparent'
|
|
10534
10709
|
}];
|
|
10535
10710
|
|
|
10536
|
-
var _excluded$
|
|
10711
|
+
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
10712
|
var ColorInputView = _ref => {
|
|
10538
10713
|
var {
|
|
10539
10714
|
// Basic props
|
|
@@ -10574,7 +10749,7 @@
|
|
|
10574
10749
|
dropdownRef
|
|
10575
10750
|
// Other props
|
|
10576
10751
|
} = _ref,
|
|
10577
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10752
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
10578
10753
|
var {
|
|
10579
10754
|
getColor
|
|
10580
10755
|
} = appStudio.useTheme();
|
|
@@ -12213,11 +12388,11 @@
|
|
|
12213
12388
|
xl: 16
|
|
12214
12389
|
};
|
|
12215
12390
|
|
|
12216
|
-
var _excluded$
|
|
12391
|
+
var _excluded$z = ["size"],
|
|
12217
12392
|
_excluded2$9 = ["size"],
|
|
12218
12393
|
_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
12394
|
var CountryList = _ref => {
|
|
12220
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12395
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
12221
12396
|
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
12222
12397
|
as: "ul"
|
|
12223
12398
|
}, props));
|
|
@@ -12455,7 +12630,7 @@
|
|
|
12455
12630
|
};
|
|
12456
12631
|
};
|
|
12457
12632
|
|
|
12458
|
-
var _excluded$
|
|
12633
|
+
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
12634
|
var DatePickerContent = props => /*#__PURE__*/React__default.createElement(appStudio.Input, Object.assign({
|
|
12460
12635
|
type: "date"
|
|
12461
12636
|
}, props));
|
|
@@ -12488,7 +12663,7 @@
|
|
|
12488
12663
|
onChange,
|
|
12489
12664
|
onChangeText
|
|
12490
12665
|
} = _ref,
|
|
12491
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12666
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
12492
12667
|
var showLabel = !!(isFocused && label);
|
|
12493
12668
|
var handleHover = () => setIsHovered(!isHovered);
|
|
12494
12669
|
var handleFocus = () => setIsFocused(true);
|
|
@@ -12575,7 +12750,7 @@
|
|
|
12575
12750
|
}, props, textFieldStates);
|
|
12576
12751
|
};
|
|
12577
12752
|
|
|
12578
|
-
var _excluded$
|
|
12753
|
+
var _excluded$B = ["visibleIcon", "hiddenIcon"],
|
|
12579
12754
|
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
12580
12755
|
var PasswordComponent = _ref => {
|
|
12581
12756
|
var {
|
|
@@ -12586,7 +12761,7 @@
|
|
|
12586
12761
|
widthHeight: 14
|
|
12587
12762
|
})
|
|
12588
12763
|
} = _ref,
|
|
12589
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12764
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
12590
12765
|
var _usePasswordState = usePasswordState(props),
|
|
12591
12766
|
{
|
|
12592
12767
|
isVisible,
|
|
@@ -12640,7 +12815,7 @@
|
|
|
12640
12815
|
};
|
|
12641
12816
|
};
|
|
12642
12817
|
|
|
12643
|
-
var _excluded$
|
|
12818
|
+
var _excluded$C = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "views", "isDropdownVisible", "setIsDropdownVisible"];
|
|
12644
12819
|
// Defines the functional component 'ComboBoxView' with destructured props.
|
|
12645
12820
|
var ComboBoxView = _ref => {
|
|
12646
12821
|
var {
|
|
@@ -12665,7 +12840,7 @@
|
|
|
12665
12840
|
setIsDropdownVisible
|
|
12666
12841
|
// Collects all further props not destructured explicitly.
|
|
12667
12842
|
} = _ref,
|
|
12668
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12843
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
12669
12844
|
var {
|
|
12670
12845
|
ref: triggerRef,
|
|
12671
12846
|
relation
|
|
@@ -12844,7 +13019,7 @@
|
|
|
12844
13019
|
}, "No items found")))))));
|
|
12845
13020
|
};
|
|
12846
13021
|
|
|
12847
|
-
var _excluded$
|
|
13022
|
+
var _excluded$D = ["id", "name", "items", "placeholder", "searchPlaceholder"];
|
|
12848
13023
|
// Defines the ComboBoxComponent functional component with ComboBoxProps
|
|
12849
13024
|
var ComboBoxComponent = _ref => {
|
|
12850
13025
|
var {
|
|
@@ -12860,7 +13035,7 @@
|
|
|
12860
13035
|
searchPlaceholder
|
|
12861
13036
|
// Destructures the rest of the props not explicitly defined
|
|
12862
13037
|
} = _ref,
|
|
12863
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13038
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
12864
13039
|
// Initializes ComboBox state using custom hook with items and placeholders
|
|
12865
13040
|
var state = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
12866
13041
|
return (
|
|
@@ -13069,7 +13244,7 @@
|
|
|
13069
13244
|
};
|
|
13070
13245
|
};
|
|
13071
13246
|
|
|
13072
|
-
var _excluded$
|
|
13247
|
+
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
13248
|
/**
|
|
13074
13249
|
* Individual tag chip component
|
|
13075
13250
|
*/
|
|
@@ -13194,7 +13369,7 @@
|
|
|
13194
13369
|
setIsHovered,
|
|
13195
13370
|
onClick
|
|
13196
13371
|
} = _ref2,
|
|
13197
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
13372
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$E);
|
|
13198
13373
|
var {
|
|
13199
13374
|
getColor,
|
|
13200
13375
|
themeMode
|
|
@@ -13277,7 +13452,7 @@
|
|
|
13277
13452
|
}, views == null ? void 0 : views.placeholder), "Maximum ", maxTags, " tags reached")))), right));
|
|
13278
13453
|
};
|
|
13279
13454
|
|
|
13280
|
-
var _excluded$
|
|
13455
|
+
var _excluded$F = ["tags"];
|
|
13281
13456
|
/**
|
|
13282
13457
|
* TagInput Component
|
|
13283
13458
|
*
|
|
@@ -13289,7 +13464,7 @@
|
|
|
13289
13464
|
// Initialize state management with the custom hook
|
|
13290
13465
|
var tagInputState = useTagInputState(props);
|
|
13291
13466
|
// Separate the tags prop to avoid type conflicts
|
|
13292
|
-
var restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13467
|
+
var restProps = _objectWithoutPropertiesLoose(props, _excluded$F);
|
|
13293
13468
|
// Render the view component with combined props and state
|
|
13294
13469
|
return /*#__PURE__*/React__default.createElement(TagInputView, Object.assign({}, tagInputState, restProps));
|
|
13295
13470
|
};
|
|
@@ -13602,7 +13777,7 @@
|
|
|
13602
13777
|
};
|
|
13603
13778
|
};
|
|
13604
13779
|
|
|
13605
|
-
var _excluded$
|
|
13780
|
+
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
13781
|
// Create a context for OTP input slots
|
|
13607
13782
|
var OTPInputContext = /*#__PURE__*/React.createContext({
|
|
13608
13783
|
slots: [],
|
|
@@ -13656,7 +13831,7 @@
|
|
|
13656
13831
|
onFocus = () => {}
|
|
13657
13832
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13658
13833
|
} = _ref,
|
|
13659
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13834
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
13660
13835
|
appStudio.useTheme(); // Initialize theme context
|
|
13661
13836
|
var showLabel = !!label;
|
|
13662
13837
|
// Create context value for slots
|
|
@@ -13888,7 +14063,7 @@
|
|
|
13888
14063
|
};
|
|
13889
14064
|
var OTPInput = OTPInputComponent;
|
|
13890
14065
|
|
|
13891
|
-
var _excluded$
|
|
14066
|
+
var _excluded$H = ["children", "autoFocus", "initFocus", "onChange"];
|
|
13892
14067
|
var FocusContext = /*#__PURE__*/React.createContext({
|
|
13893
14068
|
active: false,
|
|
13894
14069
|
focusNextInput: () => {},
|
|
@@ -13904,7 +14079,7 @@
|
|
|
13904
14079
|
initFocus,
|
|
13905
14080
|
onChange = () => {}
|
|
13906
14081
|
} = _ref,
|
|
13907
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14082
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
13908
14083
|
var formik$1 = formik.useFormikContext();
|
|
13909
14084
|
React.useEffect(() => {
|
|
13910
14085
|
onChange(formik$1.values);
|
|
@@ -13952,7 +14127,7 @@
|
|
|
13952
14127
|
}, /*#__PURE__*/React__default.createElement(appStudio.Form, Object.assign({}, props), children));
|
|
13953
14128
|
};
|
|
13954
14129
|
|
|
13955
|
-
var _excluded$
|
|
14130
|
+
var _excluded$I = ["name", "type"];
|
|
13956
14131
|
var getInputTypeProps = type => {
|
|
13957
14132
|
switch (type) {
|
|
13958
14133
|
case 'email':
|
|
@@ -13991,7 +14166,7 @@
|
|
|
13991
14166
|
name,
|
|
13992
14167
|
type
|
|
13993
14168
|
} = _ref,
|
|
13994
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14169
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
13995
14170
|
var focus = useFormFocus();
|
|
13996
14171
|
var {
|
|
13997
14172
|
touched,
|
|
@@ -14035,13 +14210,13 @@
|
|
|
14035
14210
|
} : {});
|
|
14036
14211
|
};
|
|
14037
14212
|
|
|
14038
|
-
var _excluded$
|
|
14213
|
+
var _excluded$J = ["value"];
|
|
14039
14214
|
var CheckboxComponent$1 = props => {
|
|
14040
14215
|
var _useFormikInput = useFormikInput(props),
|
|
14041
14216
|
{
|
|
14042
14217
|
value
|
|
14043
14218
|
} = _useFormikInput,
|
|
14044
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
14219
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$J);
|
|
14045
14220
|
formProps.isChecked = value;
|
|
14046
14221
|
var checkboxStates = useCheckboxState(props);
|
|
14047
14222
|
return /*#__PURE__*/React__default.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -14761,7 +14936,7 @@
|
|
|
14761
14936
|
};
|
|
14762
14937
|
};
|
|
14763
14938
|
|
|
14764
|
-
var _excluded$
|
|
14939
|
+
var _excluded$K = ["children", "views", "asChild"],
|
|
14765
14940
|
_excluded2$b = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14766
14941
|
// Create context for the HoverCard
|
|
14767
14942
|
var HoverCardContext = /*#__PURE__*/React.createContext({
|
|
@@ -14800,7 +14975,7 @@
|
|
|
14800
14975
|
views,
|
|
14801
14976
|
asChild = false
|
|
14802
14977
|
} = _ref2,
|
|
14803
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
14978
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$K);
|
|
14804
14979
|
var {
|
|
14805
14980
|
openCard,
|
|
14806
14981
|
closeCard,
|
|
@@ -14970,7 +15145,7 @@
|
|
|
14970
15145
|
}, views == null ? void 0 : views.container, props), children);
|
|
14971
15146
|
};
|
|
14972
15147
|
|
|
14973
|
-
var _excluded$
|
|
15148
|
+
var _excluded$L = ["children", "views", "openDelay", "closeDelay"];
|
|
14974
15149
|
/**
|
|
14975
15150
|
* HoverCard component displays floating content when hovering over a trigger element.
|
|
14976
15151
|
* Supports configurable open and close delays for a smoother user experience.
|
|
@@ -14982,7 +15157,7 @@
|
|
|
14982
15157
|
openDelay,
|
|
14983
15158
|
closeDelay
|
|
14984
15159
|
} = _ref,
|
|
14985
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15160
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
14986
15161
|
var hoverCardState = useHoverCardState({
|
|
14987
15162
|
openDelay,
|
|
14988
15163
|
closeDelay
|
|
@@ -15594,7 +15769,7 @@
|
|
|
15594
15769
|
}))));
|
|
15595
15770
|
};
|
|
15596
15771
|
|
|
15597
|
-
var _excluded$
|
|
15772
|
+
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
15773
|
var ChatInputView = _ref => {
|
|
15599
15774
|
var _value$trim$length;
|
|
15600
15775
|
var {
|
|
@@ -15639,7 +15814,7 @@
|
|
|
15639
15814
|
handleDragLeave
|
|
15640
15815
|
// Other props
|
|
15641
15816
|
} = _ref,
|
|
15642
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15817
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
15643
15818
|
var {} = appStudio.useTheme();
|
|
15644
15819
|
// Combine styles
|
|
15645
15820
|
var containerStyles = Object.assign({}, DefaultChatInputStyles.container, Shapes$2[shape], views == null ? void 0 : views.container);
|
|
@@ -15866,13 +16041,13 @@
|
|
|
15866
16041
|
}, views == null ? void 0 : views.bottomTip), errorMessage)));
|
|
15867
16042
|
};
|
|
15868
16043
|
|
|
15869
|
-
var _excluded$
|
|
16044
|
+
var _excluded$N = ["name", "onSubmit"];
|
|
15870
16045
|
var ChatInputComponent = props => {
|
|
15871
16046
|
var {
|
|
15872
16047
|
name,
|
|
15873
16048
|
onSubmit
|
|
15874
16049
|
} = props,
|
|
15875
|
-
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16050
|
+
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$N);
|
|
15876
16051
|
// State for managing pending files
|
|
15877
16052
|
var [pendingFiles, setPendingFiles] = React.useState([]);
|
|
15878
16053
|
// Get Formik integration props
|
|
@@ -15969,7 +16144,7 @@
|
|
|
15969
16144
|
};
|
|
15970
16145
|
var FormikSwitch = SwitchComponent$1;
|
|
15971
16146
|
|
|
15972
|
-
var _excluded$
|
|
16147
|
+
var _excluded$O = ["name"],
|
|
15973
16148
|
_excluded2$c = ["tags"];
|
|
15974
16149
|
/**
|
|
15975
16150
|
* Formik-integrated TagInput component
|
|
@@ -15978,7 +16153,7 @@
|
|
|
15978
16153
|
var {
|
|
15979
16154
|
name
|
|
15980
16155
|
} = props,
|
|
15981
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16156
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$O);
|
|
15982
16157
|
// Get Formik context directly for better control
|
|
15983
16158
|
var {
|
|
15984
16159
|
values,
|
|
@@ -16036,11 +16211,11 @@
|
|
|
16036
16211
|
*/
|
|
16037
16212
|
var FormikTextArea = TextAreaComponent$1;
|
|
16038
16213
|
|
|
16039
|
-
var _excluded$
|
|
16214
|
+
var _excluded$P = ["value"];
|
|
16040
16215
|
var TextFieldComponent$1 = props => {
|
|
16041
16216
|
var formProps = useFormikInput(props);
|
|
16042
16217
|
var _useTextFieldState = useTextFieldState(props),
|
|
16043
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
16218
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$P);
|
|
16044
16219
|
return /*#__PURE__*/React__default.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
16045
16220
|
};
|
|
16046
16221
|
/**
|
|
@@ -16048,7 +16223,7 @@
|
|
|
16048
16223
|
*/
|
|
16049
16224
|
var FormikTextField = TextFieldComponent$1;
|
|
16050
16225
|
|
|
16051
|
-
var _excluded$
|
|
16226
|
+
var _excluded$Q = ["visibleIcon", "hiddenIcon"],
|
|
16052
16227
|
_excluded2$d = ["isVisible", "setIsVisible"];
|
|
16053
16228
|
var PasswordComponent$1 = _ref => {
|
|
16054
16229
|
var {
|
|
@@ -16059,7 +16234,7 @@
|
|
|
16059
16234
|
widthHeight: 14
|
|
16060
16235
|
})
|
|
16061
16236
|
} = _ref,
|
|
16062
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16237
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
16063
16238
|
var formProps = useFormikInput(props);
|
|
16064
16239
|
var _usePasswordState = usePasswordState(formProps),
|
|
16065
16240
|
{
|
|
@@ -16084,14 +16259,14 @@
|
|
|
16084
16259
|
*/
|
|
16085
16260
|
var FormikPassword = PasswordComponent$1;
|
|
16086
16261
|
|
|
16087
|
-
var _excluded$
|
|
16262
|
+
var _excluded$R = ["items", "placeholder", "searchPlaceholder"];
|
|
16088
16263
|
var ComboBoxComponent$1 = _ref => {
|
|
16089
16264
|
var {
|
|
16090
16265
|
items,
|
|
16091
16266
|
placeholder,
|
|
16092
16267
|
searchPlaceholder
|
|
16093
16268
|
} = _ref,
|
|
16094
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16269
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
16095
16270
|
var formProps = useFormikInput(props);
|
|
16096
16271
|
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
16097
16272
|
// Ensure the onChange function from formProps is being called when an item is selected
|
|
@@ -16374,7 +16549,7 @@
|
|
|
16374
16549
|
}
|
|
16375
16550
|
};
|
|
16376
16551
|
|
|
16377
|
-
var _excluded$
|
|
16552
|
+
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
16553
|
var SliderView = _ref => {
|
|
16379
16554
|
var _views$tooltip, _views$tooltip2;
|
|
16380
16555
|
var {
|
|
@@ -16417,7 +16592,7 @@
|
|
|
16417
16592
|
tooltip: {}
|
|
16418
16593
|
}
|
|
16419
16594
|
} = _ref,
|
|
16420
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16595
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$S);
|
|
16421
16596
|
var {
|
|
16422
16597
|
getColor,
|
|
16423
16598
|
themeMode
|
|
@@ -16740,7 +16915,7 @@
|
|
|
16740
16915
|
*/
|
|
16741
16916
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16742
16917
|
|
|
16743
|
-
var _excluded$
|
|
16918
|
+
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16744
16919
|
var defaultUploadFile = (file, onProgress) => {
|
|
16745
16920
|
return api.UploadService.uploadControllerFile({
|
|
16746
16921
|
file
|
|
@@ -16766,7 +16941,7 @@
|
|
|
16766
16941
|
onFileSelect,
|
|
16767
16942
|
multiple = true
|
|
16768
16943
|
} = _ref,
|
|
16769
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16944
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
16770
16945
|
var {
|
|
16771
16946
|
setFieldValue,
|
|
16772
16947
|
setFieldTouched,
|
|
@@ -16836,156 +17011,7 @@
|
|
|
16836
17011
|
};
|
|
16837
17012
|
FormikUploader.displayName = 'FormikUploader';
|
|
16838
17013
|
|
|
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 => {
|
|
17014
|
+
var SelectorComponent$1 = props => {
|
|
16989
17015
|
var formProps = useFormikInput(props);
|
|
16990
17016
|
formProps.selected = formProps.value;
|
|
16991
17017
|
var selectorStates = useSelectorState(props);
|
|
@@ -16994,7 +17020,7 @@
|
|
|
16994
17020
|
/**
|
|
16995
17021
|
* Selector provides a dropdown list of options for the user to choose from.
|
|
16996
17022
|
*/
|
|
16997
|
-
var FormikSelector = SelectorComponent;
|
|
17023
|
+
var FormikSelector = SelectorComponent$1;
|
|
16998
17024
|
|
|
16999
17025
|
var AttachmentPreview = _ref => {
|
|
17000
17026
|
var {
|
|
@@ -28343,6 +28369,7 @@
|
|
|
28343
28369
|
exports.SaveIcon = SaveIcon;
|
|
28344
28370
|
exports.SearchIcon = SearchIcon;
|
|
28345
28371
|
exports.Select = Select;
|
|
28372
|
+
exports.Selector = Selector;
|
|
28346
28373
|
exports.SendIcon = SendIcon;
|
|
28347
28374
|
exports.Separator = Separator;
|
|
28348
28375
|
exports.SettingsIcon = SettingsIcon;
|