@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
package/dist/web.esm.js
CHANGED
|
@@ -9549,6 +9549,175 @@ var SwitchComponent = props => {
|
|
|
9549
9549
|
// Exports the SwitchComponent as 'Switch' for use in other parts of the application.
|
|
9550
9550
|
var Switch = SwitchComponent;
|
|
9551
9551
|
|
|
9552
|
+
// Initializes the custom hook 'useSelectorState' for managing the state of the Selector component
|
|
9553
|
+
var useSelectorState = _ref => {
|
|
9554
|
+
var {
|
|
9555
|
+
placeholder,
|
|
9556
|
+
isMulti,
|
|
9557
|
+
options,
|
|
9558
|
+
id = "selector-" + Math.random().toString(36).substr(2, 9)
|
|
9559
|
+
} = _ref;
|
|
9560
|
+
// 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
|
|
9561
|
+
var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
|
|
9562
|
+
: 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
|
|
9563
|
+
// State hook for tracking mouse hover status over the Selector component
|
|
9564
|
+
var [isHovered, setIsHovered] = React.useState(false);
|
|
9565
|
+
// State hook for tracking focus status of the Selector input field
|
|
9566
|
+
var [isFocused, setIsFocused] = React.useState(false);
|
|
9567
|
+
// State hook for managing the value(s) selected by the user, initialized with the default value
|
|
9568
|
+
var [value, setValue] = React.useState(defaultValue);
|
|
9569
|
+
// State hook for keeping track of the currently highlighted index in the options list
|
|
9570
|
+
var [highlightedIndex, setHighlightedIndex] = React.useState(0);
|
|
9571
|
+
// State hook for managing visibility of the Selector dropdown, initially set to hidden
|
|
9572
|
+
var [hide, setHide] = React.useState(true);
|
|
9573
|
+
// Returns an object containing all stateful values and their associated setters to manage the Selector component's state
|
|
9574
|
+
return {
|
|
9575
|
+
id,
|
|
9576
|
+
value,
|
|
9577
|
+
setValue,
|
|
9578
|
+
hide,
|
|
9579
|
+
setHide,
|
|
9580
|
+
isHovered,
|
|
9581
|
+
setIsHovered,
|
|
9582
|
+
isFocused,
|
|
9583
|
+
setIsFocused,
|
|
9584
|
+
highlightedIndex,
|
|
9585
|
+
setHighlightedIndex
|
|
9586
|
+
};
|
|
9587
|
+
};
|
|
9588
|
+
|
|
9589
|
+
var _excluded$u = ["id", "name", "label", "value", "views", "options", "onChange", "setValue"];
|
|
9590
|
+
/**
|
|
9591
|
+
* SelectorView Component
|
|
9592
|
+
*
|
|
9593
|
+
* Renders a segmented control style selector.
|
|
9594
|
+
*/
|
|
9595
|
+
var SelectorView = _ref => {
|
|
9596
|
+
var {
|
|
9597
|
+
id,
|
|
9598
|
+
name,
|
|
9599
|
+
label,
|
|
9600
|
+
value,
|
|
9601
|
+
views = {},
|
|
9602
|
+
options = [],
|
|
9603
|
+
onChange = () => {},
|
|
9604
|
+
setValue = () => {}
|
|
9605
|
+
} = _ref,
|
|
9606
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
9607
|
+
var {
|
|
9608
|
+
getColor
|
|
9609
|
+
} = useTheme();
|
|
9610
|
+
var handleCallback = useCallback(option => {
|
|
9611
|
+
setValue(option.value);
|
|
9612
|
+
if (onChange) onChange(option.value);
|
|
9613
|
+
}, [setValue, onChange]);
|
|
9614
|
+
return /*#__PURE__*/React.createElement(FieldContainer, {
|
|
9615
|
+
id: id,
|
|
9616
|
+
width: "100%",
|
|
9617
|
+
views: views
|
|
9618
|
+
}, label && (/*#__PURE__*/React.createElement(Horizontal, {
|
|
9619
|
+
fontSize: "10px",
|
|
9620
|
+
letterSpacing: "wider",
|
|
9621
|
+
color: "color.black.500",
|
|
9622
|
+
fontWeight: "bold",
|
|
9623
|
+
marginBottom: 12,
|
|
9624
|
+
alignItems: "center",
|
|
9625
|
+
gap: 6,
|
|
9626
|
+
//Text transform uppercase
|
|
9627
|
+
style: {
|
|
9628
|
+
textTransform: 'uppercase'
|
|
9629
|
+
}
|
|
9630
|
+
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
9631
|
+
widthHeight: 14
|
|
9632
|
+
}), " ", /*#__PURE__*/React.createElement(Text, null, label))), /*#__PURE__*/React.createElement(Horizontal, {
|
|
9633
|
+
gap: 0
|
|
9634
|
+
}, options.map((option, index, arr) => {
|
|
9635
|
+
var isSelected = value === option.value;
|
|
9636
|
+
var borderColor = getColor('color.gray.200');
|
|
9637
|
+
var textColor = getColor('color.gray.500');
|
|
9638
|
+
var bgColor = 'transparent';
|
|
9639
|
+
if (isSelected) {
|
|
9640
|
+
if (option.color) {
|
|
9641
|
+
// We need a way to get related colors (50, 500, 700 etc) from a base color if we want full fidelity.
|
|
9642
|
+
// But passing full style strings is easier.
|
|
9643
|
+
borderColor = getColor(option.color);
|
|
9644
|
+
textColor = getColor(option.color);
|
|
9645
|
+
// Try to approximate background color if possible, or just use white/transparent.
|
|
9646
|
+
// Simplification: if color provided, use it for border/text.
|
|
9647
|
+
// Background is hard to derive without more specific props.
|
|
9648
|
+
// Let's try to use a very light opacity of the color for background.
|
|
9649
|
+
bgColor = 'rgba(0,0,0,0.05)'; // Generic active background
|
|
9650
|
+
} else {
|
|
9651
|
+
// Default active style
|
|
9652
|
+
var primary = getColor('theme.primary');
|
|
9653
|
+
borderColor = primary;
|
|
9654
|
+
textColor = primary;
|
|
9655
|
+
bgColor = 'color.gray.50';
|
|
9656
|
+
}
|
|
9657
|
+
// Specific overrides based on user request "ComplexitySelector" style
|
|
9658
|
+
// If the values match 'High', 'Medium', 'Low' we can hardcode for *demo* fidelity if generic logic fails.
|
|
9659
|
+
// But let's try to make it generic.
|
|
9660
|
+
// The user simply pasted code.
|
|
9661
|
+
if (option.color) {
|
|
9662
|
+
// Fallback for customized options
|
|
9663
|
+
borderColor = getColor(option.color);
|
|
9664
|
+
textColor = getColor(option.color);
|
|
9665
|
+
bgColor = 'transparent';
|
|
9666
|
+
} else {
|
|
9667
|
+
// Default fallback
|
|
9668
|
+
borderColor = getColor('theme.primary');
|
|
9669
|
+
textColor = getColor('theme.primary');
|
|
9670
|
+
bgColor = getColor('color.blue.50');
|
|
9671
|
+
}
|
|
9672
|
+
}
|
|
9673
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
9674
|
+
key: option.value,
|
|
9675
|
+
onClick: () => handleCallback(option),
|
|
9676
|
+
flex: 1,
|
|
9677
|
+
paddingVertical: 6,
|
|
9678
|
+
fontSize: "12px",
|
|
9679
|
+
fontWeight: isSelected ? 'bold' : 'normal',
|
|
9680
|
+
style: {
|
|
9681
|
+
borderTop: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9682
|
+
borderBottom: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9683
|
+
borderLeft: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9684
|
+
borderRight: index === arr.length - 1 || isSelected ? "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')) : 'none',
|
|
9685
|
+
backgroundColor: bgColor,
|
|
9686
|
+
color: textColor,
|
|
9687
|
+
borderRadius: index === 0 ? '6px 0 0 6px' : index === arr.length - 1 ? '0 6px 6px 0' : '0',
|
|
9688
|
+
zIndex: isSelected ? 1 : 0,
|
|
9689
|
+
boxShadow: 'none'
|
|
9690
|
+
}
|
|
9691
|
+
}, views.item), option.label);
|
|
9692
|
+
})), /*#__PURE__*/React.createElement("input", {
|
|
9693
|
+
type: "hidden",
|
|
9694
|
+
id: id,
|
|
9695
|
+
name: name,
|
|
9696
|
+
value: Array.isArray(value) ? value.join(',') : value,
|
|
9697
|
+
onChange: () => {}
|
|
9698
|
+
}));
|
|
9699
|
+
};
|
|
9700
|
+
|
|
9701
|
+
// Defines a functional component named 'SelectorComponent', which is expected to receive 'SelectorProps' as properties.
|
|
9702
|
+
var SelectorComponent = props => {
|
|
9703
|
+
// Ensure options is always an array
|
|
9704
|
+
var safeProps = Object.assign({}, props, {
|
|
9705
|
+
options: props.options || []
|
|
9706
|
+
});
|
|
9707
|
+
// Invokes the 'useSelectorState' hook with props to obtain stateful logic for the Selector component.
|
|
9708
|
+
var selectorStates = useSelectorState(safeProps);
|
|
9709
|
+
// Renders the 'SelectorView' component, passing along any states controlled by 'useSelectorState' and all properties passed to 'SelectorComponent'.
|
|
9710
|
+
return /*#__PURE__*/React.createElement(SelectorView, Object.assign({}, selectorStates, safeProps, {
|
|
9711
|
+
onClick: e => {
|
|
9712
|
+
// Stop propagation to prevent the global click handler from closing other dropdowns
|
|
9713
|
+
e.stopPropagation();
|
|
9714
|
+
if (props.onClick) props.onClick(e);
|
|
9715
|
+
}
|
|
9716
|
+
}));
|
|
9717
|
+
};
|
|
9718
|
+
// Exports 'SelectorComponent' as 'Selector', making it available for import in other parts of the application.
|
|
9719
|
+
var Selector = SelectorComponent;
|
|
9720
|
+
|
|
9552
9721
|
// Declaration of the useTextAreaState custom hook for managing the text area component state.
|
|
9553
9722
|
var useTextAreaState = _ref => {
|
|
9554
9723
|
var {
|
|
@@ -9581,7 +9750,7 @@ var useTextAreaState = _ref => {
|
|
|
9581
9750
|
// Export of the useTextAreaState hook for external usage.
|
|
9582
9751
|
};
|
|
9583
9752
|
|
|
9584
|
-
var _excluded$
|
|
9753
|
+
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"];
|
|
9585
9754
|
var TextAreaView = _ref => {
|
|
9586
9755
|
var {
|
|
9587
9756
|
id,
|
|
@@ -9616,7 +9785,7 @@ var TextAreaView = _ref => {
|
|
|
9616
9785
|
helperText: {}
|
|
9617
9786
|
}
|
|
9618
9787
|
} = _ref,
|
|
9619
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9788
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
9620
9789
|
var showLabel = !!(isFocused && label);
|
|
9621
9790
|
/**
|
|
9622
9791
|
* Styles for the textarea field
|
|
@@ -9755,7 +9924,7 @@ var useTextFieldState = _ref => {
|
|
|
9755
9924
|
};
|
|
9756
9925
|
};
|
|
9757
9926
|
|
|
9758
|
-
var _excluded$
|
|
9927
|
+
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"];
|
|
9759
9928
|
/**
|
|
9760
9929
|
* Input component for text fields
|
|
9761
9930
|
*/
|
|
@@ -9801,7 +9970,7 @@ var TextFieldView = _ref => {
|
|
|
9801
9970
|
onBlur = () => {},
|
|
9802
9971
|
themeMode: elementMode
|
|
9803
9972
|
} = _ref,
|
|
9804
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9973
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
9805
9974
|
var {
|
|
9806
9975
|
getColor,
|
|
9807
9976
|
themeMode
|
|
@@ -10080,7 +10249,7 @@ var StateStyles = {
|
|
|
10080
10249
|
}
|
|
10081
10250
|
};
|
|
10082
10251
|
|
|
10083
|
-
var _excluded$
|
|
10252
|
+
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"];
|
|
10084
10253
|
var CheckboxView = _ref => {
|
|
10085
10254
|
var {
|
|
10086
10255
|
id,
|
|
@@ -10107,7 +10276,7 @@ var CheckboxView = _ref => {
|
|
|
10107
10276
|
},
|
|
10108
10277
|
infoText
|
|
10109
10278
|
} = _ref,
|
|
10110
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10279
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
10111
10280
|
var handleHover = () => setIsHovered(!isHovered);
|
|
10112
10281
|
var handleChange = () => {
|
|
10113
10282
|
if (!isReadOnly && !isDisabled) {
|
|
@@ -10565,7 +10734,7 @@ var DefaultColorPalette = [
|
|
|
10565
10734
|
value: 'transparent'
|
|
10566
10735
|
}];
|
|
10567
10736
|
|
|
10568
|
-
var _excluded$
|
|
10737
|
+
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"];
|
|
10569
10738
|
var ColorInputView = _ref => {
|
|
10570
10739
|
var {
|
|
10571
10740
|
// Basic props
|
|
@@ -10606,7 +10775,7 @@ var ColorInputView = _ref => {
|
|
|
10606
10775
|
dropdownRef
|
|
10607
10776
|
// Other props
|
|
10608
10777
|
} = _ref,
|
|
10609
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10778
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
10610
10779
|
var {
|
|
10611
10780
|
getColor
|
|
10612
10781
|
} = useTheme();
|
|
@@ -12245,11 +12414,11 @@ var IconSizes$4 = {
|
|
|
12245
12414
|
xl: 16
|
|
12246
12415
|
};
|
|
12247
12416
|
|
|
12248
|
-
var _excluded$
|
|
12417
|
+
var _excluded$z = ["size"],
|
|
12249
12418
|
_excluded2$9 = ["size"],
|
|
12250
12419
|
_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"];
|
|
12251
12420
|
var CountryList = _ref => {
|
|
12252
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12421
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
12253
12422
|
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
12254
12423
|
as: "ul"
|
|
12255
12424
|
}, props));
|
|
@@ -12487,7 +12656,7 @@ var useDatePickerState = () => {
|
|
|
12487
12656
|
};
|
|
12488
12657
|
};
|
|
12489
12658
|
|
|
12490
|
-
var _excluded$
|
|
12659
|
+
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"];
|
|
12491
12660
|
var DatePickerContent = props => /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
12492
12661
|
type: "date"
|
|
12493
12662
|
}, props));
|
|
@@ -12520,7 +12689,7 @@ var DatePickerView = _ref => {
|
|
|
12520
12689
|
onChange,
|
|
12521
12690
|
onChangeText
|
|
12522
12691
|
} = _ref,
|
|
12523
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12692
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
12524
12693
|
var showLabel = !!(isFocused && label);
|
|
12525
12694
|
var handleHover = () => setIsHovered(!isHovered);
|
|
12526
12695
|
var handleFocus = () => setIsFocused(true);
|
|
@@ -12607,7 +12776,7 @@ var usePasswordState = props => {
|
|
|
12607
12776
|
}, props, textFieldStates);
|
|
12608
12777
|
};
|
|
12609
12778
|
|
|
12610
|
-
var _excluded$
|
|
12779
|
+
var _excluded$B = ["visibleIcon", "hiddenIcon"],
|
|
12611
12780
|
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
12612
12781
|
var PasswordComponent = _ref => {
|
|
12613
12782
|
var {
|
|
@@ -12618,7 +12787,7 @@ var PasswordComponent = _ref => {
|
|
|
12618
12787
|
widthHeight: 14
|
|
12619
12788
|
})
|
|
12620
12789
|
} = _ref,
|
|
12621
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12790
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
12622
12791
|
var _usePasswordState = usePasswordState(props),
|
|
12623
12792
|
{
|
|
12624
12793
|
isVisible,
|
|
@@ -12672,7 +12841,7 @@ var useComboBoxState = (items, placeholder, searchPlaceholder) => {
|
|
|
12672
12841
|
};
|
|
12673
12842
|
};
|
|
12674
12843
|
|
|
12675
|
-
var _excluded$
|
|
12844
|
+
var _excluded$C = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "views", "isDropdownVisible", "setIsDropdownVisible"];
|
|
12676
12845
|
// Defines the functional component 'ComboBoxView' with destructured props.
|
|
12677
12846
|
var ComboBoxView = _ref => {
|
|
12678
12847
|
var {
|
|
@@ -12697,7 +12866,7 @@ var ComboBoxView = _ref => {
|
|
|
12697
12866
|
setIsDropdownVisible
|
|
12698
12867
|
// Collects all further props not destructured explicitly.
|
|
12699
12868
|
} = _ref,
|
|
12700
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12869
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
12701
12870
|
var {
|
|
12702
12871
|
ref: triggerRef,
|
|
12703
12872
|
relation
|
|
@@ -12876,7 +13045,7 @@ var ComboBoxView = _ref => {
|
|
|
12876
13045
|
}, "No items found")))))));
|
|
12877
13046
|
};
|
|
12878
13047
|
|
|
12879
|
-
var _excluded$
|
|
13048
|
+
var _excluded$D = ["id", "name", "items", "placeholder", "searchPlaceholder"];
|
|
12880
13049
|
// Defines the ComboBoxComponent functional component with ComboBoxProps
|
|
12881
13050
|
var ComboBoxComponent = _ref => {
|
|
12882
13051
|
var {
|
|
@@ -12892,7 +13061,7 @@ var ComboBoxComponent = _ref => {
|
|
|
12892
13061
|
searchPlaceholder
|
|
12893
13062
|
// Destructures the rest of the props not explicitly defined
|
|
12894
13063
|
} = _ref,
|
|
12895
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13064
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
12896
13065
|
// Initializes ComboBox state using custom hook with items and placeholders
|
|
12897
13066
|
var state = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
12898
13067
|
return (
|
|
@@ -13101,7 +13270,7 @@ var useTagInputState = props => {
|
|
|
13101
13270
|
};
|
|
13102
13271
|
};
|
|
13103
13272
|
|
|
13104
|
-
var _excluded$
|
|
13273
|
+
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"];
|
|
13105
13274
|
/**
|
|
13106
13275
|
* Individual tag chip component
|
|
13107
13276
|
*/
|
|
@@ -13226,7 +13395,7 @@ var TagInputView = _ref2 => {
|
|
|
13226
13395
|
setIsHovered,
|
|
13227
13396
|
onClick
|
|
13228
13397
|
} = _ref2,
|
|
13229
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
13398
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$E);
|
|
13230
13399
|
var {
|
|
13231
13400
|
getColor,
|
|
13232
13401
|
themeMode
|
|
@@ -13309,7 +13478,7 @@ var TagInputView = _ref2 => {
|
|
|
13309
13478
|
}, views == null ? void 0 : views.placeholder), "Maximum ", maxTags, " tags reached")))), right));
|
|
13310
13479
|
};
|
|
13311
13480
|
|
|
13312
|
-
var _excluded$
|
|
13481
|
+
var _excluded$F = ["tags"];
|
|
13313
13482
|
/**
|
|
13314
13483
|
* TagInput Component
|
|
13315
13484
|
*
|
|
@@ -13321,7 +13490,7 @@ var TagInputComponent = props => {
|
|
|
13321
13490
|
// Initialize state management with the custom hook
|
|
13322
13491
|
var tagInputState = useTagInputState(props);
|
|
13323
13492
|
// Separate the tags prop to avoid type conflicts
|
|
13324
|
-
var restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13493
|
+
var restProps = _objectWithoutPropertiesLoose(props, _excluded$F);
|
|
13325
13494
|
// Render the view component with combined props and state
|
|
13326
13495
|
return /*#__PURE__*/React.createElement(TagInputView, Object.assign({}, tagInputState, restProps));
|
|
13327
13496
|
};
|
|
@@ -13634,7 +13803,7 @@ var useOTPInputState = _ref => {
|
|
|
13634
13803
|
};
|
|
13635
13804
|
};
|
|
13636
13805
|
|
|
13637
|
-
var _excluded$
|
|
13806
|
+
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"];
|
|
13638
13807
|
// Create a context for OTP input slots
|
|
13639
13808
|
var OTPInputContext = /*#__PURE__*/createContext({
|
|
13640
13809
|
slots: [],
|
|
@@ -13688,7 +13857,7 @@ var OTPInputView = _ref => {
|
|
|
13688
13857
|
onFocus = () => {}
|
|
13689
13858
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13690
13859
|
} = _ref,
|
|
13691
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13860
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
13692
13861
|
useTheme(); // Initialize theme context
|
|
13693
13862
|
var showLabel = !!label;
|
|
13694
13863
|
// Create context value for slots
|
|
@@ -13920,7 +14089,7 @@ var OTPInputComponent = props => {
|
|
|
13920
14089
|
};
|
|
13921
14090
|
var OTPInput = OTPInputComponent;
|
|
13922
14091
|
|
|
13923
|
-
var _excluded$
|
|
14092
|
+
var _excluded$H = ["children", "autoFocus", "initFocus", "onChange"];
|
|
13924
14093
|
var FocusContext = /*#__PURE__*/createContext({
|
|
13925
14094
|
active: false,
|
|
13926
14095
|
focusNextInput: () => {},
|
|
@@ -13936,7 +14105,7 @@ var FormikForm = _ref => {
|
|
|
13936
14105
|
initFocus,
|
|
13937
14106
|
onChange = () => {}
|
|
13938
14107
|
} = _ref,
|
|
13939
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14108
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
13940
14109
|
var formik = useFormikContext();
|
|
13941
14110
|
useEffect(() => {
|
|
13942
14111
|
onChange(formik.values);
|
|
@@ -13984,7 +14153,7 @@ var FormikForm = _ref => {
|
|
|
13984
14153
|
}, /*#__PURE__*/React.createElement(Form, Object.assign({}, props), children));
|
|
13985
14154
|
};
|
|
13986
14155
|
|
|
13987
|
-
var _excluded$
|
|
14156
|
+
var _excluded$I = ["name", "type"];
|
|
13988
14157
|
var getInputTypeProps = type => {
|
|
13989
14158
|
switch (type) {
|
|
13990
14159
|
case 'email':
|
|
@@ -14023,7 +14192,7 @@ var useFormikInput = _ref => {
|
|
|
14023
14192
|
name,
|
|
14024
14193
|
type
|
|
14025
14194
|
} = _ref,
|
|
14026
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14195
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
14027
14196
|
var focus = useFormFocus();
|
|
14028
14197
|
var {
|
|
14029
14198
|
touched,
|
|
@@ -14067,13 +14236,13 @@ var useFormikInput = _ref => {
|
|
|
14067
14236
|
} : {});
|
|
14068
14237
|
};
|
|
14069
14238
|
|
|
14070
|
-
var _excluded$
|
|
14239
|
+
var _excluded$J = ["value"];
|
|
14071
14240
|
var CheckboxComponent$1 = props => {
|
|
14072
14241
|
var _useFormikInput = useFormikInput(props),
|
|
14073
14242
|
{
|
|
14074
14243
|
value
|
|
14075
14244
|
} = _useFormikInput,
|
|
14076
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
14245
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$J);
|
|
14077
14246
|
formProps.isChecked = value;
|
|
14078
14247
|
var checkboxStates = useCheckboxState(props);
|
|
14079
14248
|
return /*#__PURE__*/React.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -14793,7 +14962,7 @@ var useHoverCardState = function useHoverCardState(_temp) {
|
|
|
14793
14962
|
};
|
|
14794
14963
|
};
|
|
14795
14964
|
|
|
14796
|
-
var _excluded$
|
|
14965
|
+
var _excluded$K = ["children", "views", "asChild"],
|
|
14797
14966
|
_excluded2$b = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14798
14967
|
// Create context for the HoverCard
|
|
14799
14968
|
var HoverCardContext = /*#__PURE__*/createContext({
|
|
@@ -14832,7 +15001,7 @@ var HoverCardTrigger = _ref2 => {
|
|
|
14832
15001
|
views,
|
|
14833
15002
|
asChild = false
|
|
14834
15003
|
} = _ref2,
|
|
14835
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
15004
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$K);
|
|
14836
15005
|
var {
|
|
14837
15006
|
openCard,
|
|
14838
15007
|
closeCard,
|
|
@@ -15002,7 +15171,7 @@ var HoverCardContent = _ref3 => {
|
|
|
15002
15171
|
}, views == null ? void 0 : views.container, props), children);
|
|
15003
15172
|
};
|
|
15004
15173
|
|
|
15005
|
-
var _excluded$
|
|
15174
|
+
var _excluded$L = ["children", "views", "openDelay", "closeDelay"];
|
|
15006
15175
|
/**
|
|
15007
15176
|
* HoverCard component displays floating content when hovering over a trigger element.
|
|
15008
15177
|
* Supports configurable open and close delays for a smoother user experience.
|
|
@@ -15014,7 +15183,7 @@ var HoverCardComponent = _ref => {
|
|
|
15014
15183
|
openDelay,
|
|
15015
15184
|
closeDelay
|
|
15016
15185
|
} = _ref,
|
|
15017
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15186
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
15018
15187
|
var hoverCardState = useHoverCardState({
|
|
15019
15188
|
openDelay,
|
|
15020
15189
|
closeDelay
|
|
@@ -15626,7 +15795,7 @@ var AudioRecorder = _ref => {
|
|
|
15626
15795
|
}))));
|
|
15627
15796
|
};
|
|
15628
15797
|
|
|
15629
|
-
var _excluded$
|
|
15798
|
+
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"];
|
|
15630
15799
|
var ChatInputView = _ref => {
|
|
15631
15800
|
var _value$trim$length;
|
|
15632
15801
|
var {
|
|
@@ -15671,7 +15840,7 @@ var ChatInputView = _ref => {
|
|
|
15671
15840
|
handleDragLeave
|
|
15672
15841
|
// Other props
|
|
15673
15842
|
} = _ref,
|
|
15674
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15843
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
15675
15844
|
var {} = useTheme();
|
|
15676
15845
|
// Combine styles
|
|
15677
15846
|
var containerStyles = Object.assign({}, DefaultChatInputStyles.container, Shapes$2[shape], views == null ? void 0 : views.container);
|
|
@@ -15898,13 +16067,13 @@ var ChatInputView = _ref => {
|
|
|
15898
16067
|
}, views == null ? void 0 : views.bottomTip), errorMessage)));
|
|
15899
16068
|
};
|
|
15900
16069
|
|
|
15901
|
-
var _excluded$
|
|
16070
|
+
var _excluded$N = ["name", "onSubmit"];
|
|
15902
16071
|
var ChatInputComponent = props => {
|
|
15903
16072
|
var {
|
|
15904
16073
|
name,
|
|
15905
16074
|
onSubmit
|
|
15906
16075
|
} = props,
|
|
15907
|
-
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16076
|
+
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$N);
|
|
15908
16077
|
// State for managing pending files
|
|
15909
16078
|
var [pendingFiles, setPendingFiles] = useState([]);
|
|
15910
16079
|
// Get Formik integration props
|
|
@@ -16001,7 +16170,7 @@ var SwitchComponent$1 = props => {
|
|
|
16001
16170
|
};
|
|
16002
16171
|
var FormikSwitch = SwitchComponent$1;
|
|
16003
16172
|
|
|
16004
|
-
var _excluded$
|
|
16173
|
+
var _excluded$O = ["name"],
|
|
16005
16174
|
_excluded2$c = ["tags"];
|
|
16006
16175
|
/**
|
|
16007
16176
|
* Formik-integrated TagInput component
|
|
@@ -16010,7 +16179,7 @@ var TagInputComponent$1 = props => {
|
|
|
16010
16179
|
var {
|
|
16011
16180
|
name
|
|
16012
16181
|
} = props,
|
|
16013
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16182
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$O);
|
|
16014
16183
|
// Get Formik context directly for better control
|
|
16015
16184
|
var {
|
|
16016
16185
|
values,
|
|
@@ -16068,11 +16237,11 @@ var TextAreaComponent$1 = props => {
|
|
|
16068
16237
|
*/
|
|
16069
16238
|
var FormikTextArea = TextAreaComponent$1;
|
|
16070
16239
|
|
|
16071
|
-
var _excluded$
|
|
16240
|
+
var _excluded$P = ["value"];
|
|
16072
16241
|
var TextFieldComponent$1 = props => {
|
|
16073
16242
|
var formProps = useFormikInput(props);
|
|
16074
16243
|
var _useTextFieldState = useTextFieldState(props),
|
|
16075
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
16244
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$P);
|
|
16076
16245
|
return /*#__PURE__*/React.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
16077
16246
|
};
|
|
16078
16247
|
/**
|
|
@@ -16080,7 +16249,7 @@ var TextFieldComponent$1 = props => {
|
|
|
16080
16249
|
*/
|
|
16081
16250
|
var FormikTextField = TextFieldComponent$1;
|
|
16082
16251
|
|
|
16083
|
-
var _excluded$
|
|
16252
|
+
var _excluded$Q = ["visibleIcon", "hiddenIcon"],
|
|
16084
16253
|
_excluded2$d = ["isVisible", "setIsVisible"];
|
|
16085
16254
|
var PasswordComponent$1 = _ref => {
|
|
16086
16255
|
var {
|
|
@@ -16091,7 +16260,7 @@ var PasswordComponent$1 = _ref => {
|
|
|
16091
16260
|
widthHeight: 14
|
|
16092
16261
|
})
|
|
16093
16262
|
} = _ref,
|
|
16094
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16263
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
16095
16264
|
var formProps = useFormikInput(props);
|
|
16096
16265
|
var _usePasswordState = usePasswordState(formProps),
|
|
16097
16266
|
{
|
|
@@ -16116,14 +16285,14 @@ var PasswordComponent$1 = _ref => {
|
|
|
16116
16285
|
*/
|
|
16117
16286
|
var FormikPassword = PasswordComponent$1;
|
|
16118
16287
|
|
|
16119
|
-
var _excluded$
|
|
16288
|
+
var _excluded$R = ["items", "placeholder", "searchPlaceholder"];
|
|
16120
16289
|
var ComboBoxComponent$1 = _ref => {
|
|
16121
16290
|
var {
|
|
16122
16291
|
items,
|
|
16123
16292
|
placeholder,
|
|
16124
16293
|
searchPlaceholder
|
|
16125
16294
|
} = _ref,
|
|
16126
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16295
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
16127
16296
|
var formProps = useFormikInput(props);
|
|
16128
16297
|
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
16129
16298
|
// Ensure the onChange function from formProps is being called when an item is selected
|
|
@@ -16406,7 +16575,7 @@ var OrientationStyles = {
|
|
|
16406
16575
|
}
|
|
16407
16576
|
};
|
|
16408
16577
|
|
|
16409
|
-
var _excluded$
|
|
16578
|
+
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"];
|
|
16410
16579
|
var SliderView = _ref => {
|
|
16411
16580
|
var _views$tooltip, _views$tooltip2;
|
|
16412
16581
|
var {
|
|
@@ -16449,7 +16618,7 @@ var SliderView = _ref => {
|
|
|
16449
16618
|
tooltip: {}
|
|
16450
16619
|
}
|
|
16451
16620
|
} = _ref,
|
|
16452
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16621
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$S);
|
|
16453
16622
|
var {
|
|
16454
16623
|
getColor,
|
|
16455
16624
|
themeMode
|
|
@@ -16772,7 +16941,7 @@ var OTPInputComponent$1 = props => {
|
|
|
16772
16941
|
*/
|
|
16773
16942
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16774
16943
|
|
|
16775
|
-
var _excluded$
|
|
16944
|
+
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16776
16945
|
var defaultUploadFile = (file, onProgress) => {
|
|
16777
16946
|
return UploadService.uploadControllerFile({
|
|
16778
16947
|
file
|
|
@@ -16798,7 +16967,7 @@ var FormikUploader = _ref => {
|
|
|
16798
16967
|
onFileSelect,
|
|
16799
16968
|
multiple = true
|
|
16800
16969
|
} = _ref,
|
|
16801
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16970
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
16802
16971
|
var {
|
|
16803
16972
|
setFieldValue,
|
|
16804
16973
|
setFieldTouched,
|
|
@@ -16868,156 +17037,7 @@ var FormikUploader = _ref => {
|
|
|
16868
17037
|
};
|
|
16869
17038
|
FormikUploader.displayName = 'FormikUploader';
|
|
16870
17039
|
|
|
16871
|
-
|
|
16872
|
-
var useSelectorState = _ref => {
|
|
16873
|
-
var {
|
|
16874
|
-
placeholder,
|
|
16875
|
-
isMulti,
|
|
16876
|
-
options,
|
|
16877
|
-
id = "selector-" + Math.random().toString(36).substr(2, 9)
|
|
16878
|
-
} = _ref;
|
|
16879
|
-
// 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
|
|
16880
|
-
var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
|
|
16881
|
-
: 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
|
|
16882
|
-
// State hook for tracking mouse hover status over the Selector component
|
|
16883
|
-
var [isHovered, setIsHovered] = React.useState(false);
|
|
16884
|
-
// State hook for tracking focus status of the Selector input field
|
|
16885
|
-
var [isFocused, setIsFocused] = React.useState(false);
|
|
16886
|
-
// State hook for managing the value(s) selected by the user, initialized with the default value
|
|
16887
|
-
var [value, setValue] = React.useState(defaultValue);
|
|
16888
|
-
// State hook for keeping track of the currently highlighted index in the options list
|
|
16889
|
-
var [highlightedIndex, setHighlightedIndex] = React.useState(0);
|
|
16890
|
-
// State hook for managing visibility of the Selector dropdown, initially set to hidden
|
|
16891
|
-
var [hide, setHide] = React.useState(true);
|
|
16892
|
-
// Returns an object containing all stateful values and their associated setters to manage the Selector component's state
|
|
16893
|
-
return {
|
|
16894
|
-
id,
|
|
16895
|
-
value,
|
|
16896
|
-
setValue,
|
|
16897
|
-
hide,
|
|
16898
|
-
setHide,
|
|
16899
|
-
isHovered,
|
|
16900
|
-
setIsHovered,
|
|
16901
|
-
isFocused,
|
|
16902
|
-
setIsFocused,
|
|
16903
|
-
highlightedIndex,
|
|
16904
|
-
setHighlightedIndex
|
|
16905
|
-
};
|
|
16906
|
-
};
|
|
16907
|
-
|
|
16908
|
-
var _excluded$T = ["id", "name", "label", "value", "views", "options", "onChange", "setValue"];
|
|
16909
|
-
/**
|
|
16910
|
-
* SelectorView Component
|
|
16911
|
-
*
|
|
16912
|
-
* Renders a segmented control style selector.
|
|
16913
|
-
*/
|
|
16914
|
-
var SelectorView = _ref => {
|
|
16915
|
-
var {
|
|
16916
|
-
id,
|
|
16917
|
-
name,
|
|
16918
|
-
label,
|
|
16919
|
-
value,
|
|
16920
|
-
views = {},
|
|
16921
|
-
options = [],
|
|
16922
|
-
onChange = () => {},
|
|
16923
|
-
setValue = () => {}
|
|
16924
|
-
} = _ref,
|
|
16925
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
16926
|
-
var {
|
|
16927
|
-
getColor
|
|
16928
|
-
} = useTheme();
|
|
16929
|
-
var handleCallback = useCallback(option => {
|
|
16930
|
-
setValue(option.value);
|
|
16931
|
-
if (onChange) onChange(option.value);
|
|
16932
|
-
}, [setValue, onChange]);
|
|
16933
|
-
return /*#__PURE__*/React.createElement(FieldContainer, {
|
|
16934
|
-
id: id,
|
|
16935
|
-
width: "100%",
|
|
16936
|
-
views: views
|
|
16937
|
-
}, label && (/*#__PURE__*/React.createElement(Horizontal, {
|
|
16938
|
-
fontSize: "10px",
|
|
16939
|
-
letterSpacing: "wider",
|
|
16940
|
-
color: "color.black.500",
|
|
16941
|
-
fontWeight: "bold",
|
|
16942
|
-
marginBottom: 12,
|
|
16943
|
-
alignItems: "center",
|
|
16944
|
-
gap: 6,
|
|
16945
|
-
//Text transform uppercase
|
|
16946
|
-
style: {
|
|
16947
|
-
textTransform: 'uppercase'
|
|
16948
|
-
}
|
|
16949
|
-
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
16950
|
-
widthHeight: 14
|
|
16951
|
-
}), " ", /*#__PURE__*/React.createElement(Text, null, label))), /*#__PURE__*/React.createElement(Horizontal, {
|
|
16952
|
-
gap: 0
|
|
16953
|
-
}, options.map((option, index, arr) => {
|
|
16954
|
-
var isSelected = value === option.value;
|
|
16955
|
-
var borderColor = getColor('color.gray.200');
|
|
16956
|
-
var textColor = getColor('color.gray.500');
|
|
16957
|
-
var bgColor = 'transparent';
|
|
16958
|
-
if (isSelected) {
|
|
16959
|
-
if (option.color) {
|
|
16960
|
-
// We need a way to get related colors (50, 500, 700 etc) from a base color if we want full fidelity.
|
|
16961
|
-
// But passing full style strings is easier.
|
|
16962
|
-
borderColor = getColor(option.color);
|
|
16963
|
-
textColor = getColor(option.color);
|
|
16964
|
-
// Try to approximate background color if possible, or just use white/transparent.
|
|
16965
|
-
// Simplification: if color provided, use it for border/text.
|
|
16966
|
-
// Background is hard to derive without more specific props.
|
|
16967
|
-
// Let's try to use a very light opacity of the color for background.
|
|
16968
|
-
bgColor = 'rgba(0,0,0,0.05)'; // Generic active background
|
|
16969
|
-
} else {
|
|
16970
|
-
// Default active style
|
|
16971
|
-
var primary = getColor('theme.primary');
|
|
16972
|
-
borderColor = primary;
|
|
16973
|
-
textColor = primary;
|
|
16974
|
-
bgColor = 'color.gray.50';
|
|
16975
|
-
}
|
|
16976
|
-
// Specific overrides based on user request "ComplexitySelector" style
|
|
16977
|
-
// If the values match 'High', 'Medium', 'Low' we can hardcode for *demo* fidelity if generic logic fails.
|
|
16978
|
-
// But let's try to make it generic.
|
|
16979
|
-
// The user simply pasted code.
|
|
16980
|
-
if (option.color) {
|
|
16981
|
-
// Fallback for customized options
|
|
16982
|
-
borderColor = getColor(option.color);
|
|
16983
|
-
textColor = getColor(option.color);
|
|
16984
|
-
bgColor = 'transparent';
|
|
16985
|
-
} else {
|
|
16986
|
-
// Default fallback
|
|
16987
|
-
borderColor = getColor('theme.primary');
|
|
16988
|
-
textColor = getColor('theme.primary');
|
|
16989
|
-
bgColor = getColor('color.blue.50');
|
|
16990
|
-
}
|
|
16991
|
-
}
|
|
16992
|
-
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
16993
|
-
key: option.value,
|
|
16994
|
-
onClick: () => handleCallback(option),
|
|
16995
|
-
flex: 1,
|
|
16996
|
-
paddingVertical: 6,
|
|
16997
|
-
fontSize: "12px",
|
|
16998
|
-
fontWeight: isSelected ? 'bold' : 'normal',
|
|
16999
|
-
style: {
|
|
17000
|
-
borderTop: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
17001
|
-
borderBottom: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
17002
|
-
borderLeft: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
17003
|
-
borderRight: index === arr.length - 1 || isSelected ? "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')) : 'none',
|
|
17004
|
-
backgroundColor: bgColor,
|
|
17005
|
-
color: textColor,
|
|
17006
|
-
borderRadius: index === 0 ? '6px 0 0 6px' : index === arr.length - 1 ? '0 6px 6px 0' : '0',
|
|
17007
|
-
zIndex: isSelected ? 1 : 0,
|
|
17008
|
-
boxShadow: 'none'
|
|
17009
|
-
}
|
|
17010
|
-
}, views.item), option.label);
|
|
17011
|
-
})), /*#__PURE__*/React.createElement("input", {
|
|
17012
|
-
type: "hidden",
|
|
17013
|
-
id: id,
|
|
17014
|
-
name: name,
|
|
17015
|
-
value: Array.isArray(value) ? value.join(',') : value,
|
|
17016
|
-
onChange: () => {}
|
|
17017
|
-
}));
|
|
17018
|
-
};
|
|
17019
|
-
|
|
17020
|
-
var SelectorComponent = props => {
|
|
17040
|
+
var SelectorComponent$1 = props => {
|
|
17021
17041
|
var formProps = useFormikInput(props);
|
|
17022
17042
|
formProps.selected = formProps.value;
|
|
17023
17043
|
var selectorStates = useSelectorState(props);
|
|
@@ -17026,7 +17046,7 @@ var SelectorComponent = props => {
|
|
|
17026
17046
|
/**
|
|
17027
17047
|
* Selector provides a dropdown list of options for the user to choose from.
|
|
17028
17048
|
*/
|
|
17029
|
-
var FormikSelector = SelectorComponent;
|
|
17049
|
+
var FormikSelector = SelectorComponent$1;
|
|
17030
17050
|
|
|
17031
17051
|
var AttachmentPreview = _ref => {
|
|
17032
17052
|
var {
|
|
@@ -28248,5 +28268,5 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
|
28248
28268
|
});
|
|
28249
28269
|
Background.displayName = 'Background';
|
|
28250
28270
|
|
|
28251
|
-
export { Accordion, Alert, ArrowIcon, AspectRatio, AttachmentIcon, AttachmentPreview, AudioIcon, AudioInput, AudioWaveform, Avatar, BackIcon, Background, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, ChatInput, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ColorInput, ColorPicker, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DragHandleLinesIcon, Drawer, DropdownMenu, DustBinIcon, EditIcon, EmojiPicker, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, FolderIcon, FormikChatInput, FormikCheckbox, FormikColorInput, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSelector, FormikSlider, FormikSwitch, FormikTagInput, FormikTextArea, FormikTextField, FormikUploader, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, LikeIcon, Link, LinkedinIcon, Loader, LoadingSpinnerIcon, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MediaPreview, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, ProgressBar, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, SendIcon, Separator, SettingsIcon, ShapeIcon, ShareButton, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SpinnerIcon, StarIcon, StatusIndicator, StopIcon, SuccessIcon, Switch, Table, Tabs, TagInput, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TrashIcon, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, showToast, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
28271
|
+
export { Accordion, Alert, ArrowIcon, AspectRatio, AttachmentIcon, AttachmentPreview, AudioIcon, AudioInput, AudioWaveform, Avatar, BackIcon, Background, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, ChatInput, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ColorInput, ColorPicker, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DragHandleLinesIcon, Drawer, DropdownMenu, DustBinIcon, EditIcon, EmojiPicker, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, FolderIcon, FormikChatInput, FormikCheckbox, FormikColorInput, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSelector, FormikSlider, FormikSwitch, FormikTagInput, FormikTextArea, FormikTextField, FormikUploader, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, LikeIcon, Link, LinkedinIcon, Loader, LoadingSpinnerIcon, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MediaPreview, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, ProgressBar, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, Selector, SendIcon, Separator, SettingsIcon, ShapeIcon, ShareButton, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SpinnerIcon, StarIcon, StatusIndicator, StopIcon, SuccessIcon, Switch, Table, Tabs, TagInput, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TrashIcon, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, showToast, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
28252
28272
|
//# sourceMappingURL=web.esm.js.map
|