@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
package/dist/web.esm.js
CHANGED
|
@@ -9549,6 +9549,181 @@ 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", "size", "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
|
+
size,
|
|
9602
|
+
views = {},
|
|
9603
|
+
options = [],
|
|
9604
|
+
onChange = () => {},
|
|
9605
|
+
setValue = () => {}
|
|
9606
|
+
} = _ref,
|
|
9607
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
9608
|
+
var {
|
|
9609
|
+
getColor
|
|
9610
|
+
} = useTheme();
|
|
9611
|
+
var handleCallback = useCallback(option => {
|
|
9612
|
+
setValue(option.value);
|
|
9613
|
+
if (onChange) onChange(option.value);
|
|
9614
|
+
}, [setValue, onChange]);
|
|
9615
|
+
return /*#__PURE__*/React.createElement(FieldContainer, {
|
|
9616
|
+
id: id,
|
|
9617
|
+
width: "100%",
|
|
9618
|
+
views: views
|
|
9619
|
+
}, label && (/*#__PURE__*/React.createElement(Horizontal, {
|
|
9620
|
+
fontSize: "10px",
|
|
9621
|
+
letterSpacing: "wider",
|
|
9622
|
+
color: "color.black.500",
|
|
9623
|
+
fontWeight: "bold",
|
|
9624
|
+
marginBottom: 12,
|
|
9625
|
+
alignItems: "center",
|
|
9626
|
+
gap: 6,
|
|
9627
|
+
//Text transform uppercase
|
|
9628
|
+
style: {
|
|
9629
|
+
textTransform: 'uppercase'
|
|
9630
|
+
}
|
|
9631
|
+
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
9632
|
+
widthHeight: 14
|
|
9633
|
+
}), " ", /*#__PURE__*/React.createElement(Text, null, label))), /*#__PURE__*/React.createElement(Horizontal, {
|
|
9634
|
+
gap: 0
|
|
9635
|
+
}, options.map((option, index, arr) => {
|
|
9636
|
+
var isSelected = value === option.value;
|
|
9637
|
+
var borderColor = getColor('color.gray.200');
|
|
9638
|
+
var textColor = getColor('color.gray.500');
|
|
9639
|
+
var bgColor = 'transparent';
|
|
9640
|
+
if (isSelected) {
|
|
9641
|
+
if (option.color) {
|
|
9642
|
+
// We need a way to get related colors (50, 500, 700 etc) from a base color if we want full fidelity.
|
|
9643
|
+
// But passing full style strings is easier.
|
|
9644
|
+
borderColor = getColor(option.color);
|
|
9645
|
+
textColor = getColor(option.color);
|
|
9646
|
+
// Try to approximate background color if possible, or just use white/transparent.
|
|
9647
|
+
// Simplification: if color provided, use it for border/text.
|
|
9648
|
+
// Background is hard to derive without more specific props.
|
|
9649
|
+
// Let's try to use a very light opacity of the color for background.
|
|
9650
|
+
bgColor = 'rgba(0,0,0,0.05)'; // Generic active background
|
|
9651
|
+
} else {
|
|
9652
|
+
// Default active style
|
|
9653
|
+
var primary = getColor('theme.primary');
|
|
9654
|
+
borderColor = primary;
|
|
9655
|
+
textColor = primary;
|
|
9656
|
+
bgColor = 'color.gray.50';
|
|
9657
|
+
}
|
|
9658
|
+
// Specific overrides based on user request "ComplexitySelector" style
|
|
9659
|
+
// If the values match 'High', 'Medium', 'Low' we can hardcode for *demo* fidelity if generic logic fails.
|
|
9660
|
+
// But let's try to make it generic.
|
|
9661
|
+
// The user simply pasted code.
|
|
9662
|
+
if (option.color) {
|
|
9663
|
+
// Fallback for customized options
|
|
9664
|
+
borderColor = getColor(option.color);
|
|
9665
|
+
textColor = getColor(option.color);
|
|
9666
|
+
bgColor = 'transparent';
|
|
9667
|
+
} else {
|
|
9668
|
+
// Default fallback
|
|
9669
|
+
borderColor = getColor('theme.primary');
|
|
9670
|
+
textColor = getColor('theme.primary');
|
|
9671
|
+
bgColor = 'transparent';
|
|
9672
|
+
}
|
|
9673
|
+
}
|
|
9674
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
9675
|
+
key: option.value,
|
|
9676
|
+
onClick: () => handleCallback(option),
|
|
9677
|
+
flex: 1
|
|
9678
|
+
}, size ? {
|
|
9679
|
+
size
|
|
9680
|
+
} : {
|
|
9681
|
+
// Legacy default: keep existing compact look when `size` isn't specified.
|
|
9682
|
+
paddingVertical: 6,
|
|
9683
|
+
fontSize: '12px'
|
|
9684
|
+
}, {
|
|
9685
|
+
fontWeight: isSelected ? 'bold' : 'normal',
|
|
9686
|
+
style: {
|
|
9687
|
+
borderTop: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9688
|
+
borderBottom: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9689
|
+
borderLeft: "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')),
|
|
9690
|
+
borderRight: index === arr.length - 1 || isSelected ? "1px solid " + (isSelected ? borderColor : getColor('color.gray.200')) : 'none',
|
|
9691
|
+
backgroundColor: bgColor,
|
|
9692
|
+
color: textColor,
|
|
9693
|
+
borderRadius: index === 0 ? '6px 0 0 6px' : index === arr.length - 1 ? '0 6px 6px 0' : '0',
|
|
9694
|
+
zIndex: isSelected ? 1 : 0,
|
|
9695
|
+
boxShadow: 'none'
|
|
9696
|
+
}
|
|
9697
|
+
}, views.item), option.label);
|
|
9698
|
+
})), /*#__PURE__*/React.createElement("input", {
|
|
9699
|
+
type: "hidden",
|
|
9700
|
+
id: id,
|
|
9701
|
+
name: name,
|
|
9702
|
+
value: Array.isArray(value) ? value.join(',') : value,
|
|
9703
|
+
onChange: () => {}
|
|
9704
|
+
}));
|
|
9705
|
+
};
|
|
9706
|
+
|
|
9707
|
+
// Defines a functional component named 'SelectorComponent', which is expected to receive 'SelectorProps' as properties.
|
|
9708
|
+
var SelectorComponent = props => {
|
|
9709
|
+
// Ensure options is always an array
|
|
9710
|
+
var safeProps = Object.assign({}, props, {
|
|
9711
|
+
options: props.options || []
|
|
9712
|
+
});
|
|
9713
|
+
// Invokes the 'useSelectorState' hook with props to obtain stateful logic for the Selector component.
|
|
9714
|
+
var selectorStates = useSelectorState(safeProps);
|
|
9715
|
+
// Renders the 'SelectorView' component, passing along any states controlled by 'useSelectorState' and all properties passed to 'SelectorComponent'.
|
|
9716
|
+
return /*#__PURE__*/React.createElement(SelectorView, Object.assign({}, selectorStates, safeProps, {
|
|
9717
|
+
onClick: e => {
|
|
9718
|
+
// Stop propagation to prevent the global click handler from closing other dropdowns
|
|
9719
|
+
e.stopPropagation();
|
|
9720
|
+
if (props.onClick) props.onClick(e);
|
|
9721
|
+
}
|
|
9722
|
+
}));
|
|
9723
|
+
};
|
|
9724
|
+
// Exports 'SelectorComponent' as 'Selector', making it available for import in other parts of the application.
|
|
9725
|
+
var Selector = SelectorComponent;
|
|
9726
|
+
|
|
9552
9727
|
// Declaration of the useTextAreaState custom hook for managing the text area component state.
|
|
9553
9728
|
var useTextAreaState = _ref => {
|
|
9554
9729
|
var {
|
|
@@ -9581,7 +9756,7 @@ var useTextAreaState = _ref => {
|
|
|
9581
9756
|
// Export of the useTextAreaState hook for external usage.
|
|
9582
9757
|
};
|
|
9583
9758
|
|
|
9584
|
-
var _excluded$
|
|
9759
|
+
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
9760
|
var TextAreaView = _ref => {
|
|
9586
9761
|
var {
|
|
9587
9762
|
id,
|
|
@@ -9616,7 +9791,7 @@ var TextAreaView = _ref => {
|
|
|
9616
9791
|
helperText: {}
|
|
9617
9792
|
}
|
|
9618
9793
|
} = _ref,
|
|
9619
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9794
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
9620
9795
|
var showLabel = !!(isFocused && label);
|
|
9621
9796
|
/**
|
|
9622
9797
|
* Styles for the textarea field
|
|
@@ -9755,7 +9930,7 @@ var useTextFieldState = _ref => {
|
|
|
9755
9930
|
};
|
|
9756
9931
|
};
|
|
9757
9932
|
|
|
9758
|
-
var _excluded$
|
|
9933
|
+
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
9934
|
/**
|
|
9760
9935
|
* Input component for text fields
|
|
9761
9936
|
*/
|
|
@@ -9801,7 +9976,7 @@ var TextFieldView = _ref => {
|
|
|
9801
9976
|
onBlur = () => {},
|
|
9802
9977
|
themeMode: elementMode
|
|
9803
9978
|
} = _ref,
|
|
9804
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9979
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
9805
9980
|
var {
|
|
9806
9981
|
getColor,
|
|
9807
9982
|
themeMode
|
|
@@ -10080,7 +10255,7 @@ var StateStyles = {
|
|
|
10080
10255
|
}
|
|
10081
10256
|
};
|
|
10082
10257
|
|
|
10083
|
-
var _excluded$
|
|
10258
|
+
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
10259
|
var CheckboxView = _ref => {
|
|
10085
10260
|
var {
|
|
10086
10261
|
id,
|
|
@@ -10107,7 +10282,7 @@ var CheckboxView = _ref => {
|
|
|
10107
10282
|
},
|
|
10108
10283
|
infoText
|
|
10109
10284
|
} = _ref,
|
|
10110
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10285
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
10111
10286
|
var handleHover = () => setIsHovered(!isHovered);
|
|
10112
10287
|
var handleChange = () => {
|
|
10113
10288
|
if (!isReadOnly && !isDisabled) {
|
|
@@ -10565,7 +10740,7 @@ var DefaultColorPalette = [
|
|
|
10565
10740
|
value: 'transparent'
|
|
10566
10741
|
}];
|
|
10567
10742
|
|
|
10568
|
-
var _excluded$
|
|
10743
|
+
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
10744
|
var ColorInputView = _ref => {
|
|
10570
10745
|
var {
|
|
10571
10746
|
// Basic props
|
|
@@ -10606,7 +10781,7 @@ var ColorInputView = _ref => {
|
|
|
10606
10781
|
dropdownRef
|
|
10607
10782
|
// Other props
|
|
10608
10783
|
} = _ref,
|
|
10609
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10784
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
10610
10785
|
var {
|
|
10611
10786
|
getColor
|
|
10612
10787
|
} = useTheme();
|
|
@@ -12245,11 +12420,11 @@ var IconSizes$4 = {
|
|
|
12245
12420
|
xl: 16
|
|
12246
12421
|
};
|
|
12247
12422
|
|
|
12248
|
-
var _excluded$
|
|
12423
|
+
var _excluded$z = ["size"],
|
|
12249
12424
|
_excluded2$9 = ["size"],
|
|
12250
12425
|
_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
12426
|
var CountryList = _ref => {
|
|
12252
|
-
var props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12427
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
12253
12428
|
return /*#__PURE__*/React.createElement(Element, Object.assign({
|
|
12254
12429
|
as: "ul"
|
|
12255
12430
|
}, props));
|
|
@@ -12487,7 +12662,7 @@ var useDatePickerState = () => {
|
|
|
12487
12662
|
};
|
|
12488
12663
|
};
|
|
12489
12664
|
|
|
12490
|
-
var _excluded$
|
|
12665
|
+
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
12666
|
var DatePickerContent = props => /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
12492
12667
|
type: "date"
|
|
12493
12668
|
}, props));
|
|
@@ -12520,7 +12695,7 @@ var DatePickerView = _ref => {
|
|
|
12520
12695
|
onChange,
|
|
12521
12696
|
onChangeText
|
|
12522
12697
|
} = _ref,
|
|
12523
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12698
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
12524
12699
|
var showLabel = !!(isFocused && label);
|
|
12525
12700
|
var handleHover = () => setIsHovered(!isHovered);
|
|
12526
12701
|
var handleFocus = () => setIsFocused(true);
|
|
@@ -12607,7 +12782,7 @@ var usePasswordState = props => {
|
|
|
12607
12782
|
}, props, textFieldStates);
|
|
12608
12783
|
};
|
|
12609
12784
|
|
|
12610
|
-
var _excluded$
|
|
12785
|
+
var _excluded$B = ["visibleIcon", "hiddenIcon"],
|
|
12611
12786
|
_excluded2$a = ["isVisible", "setIsVisible"];
|
|
12612
12787
|
var PasswordComponent = _ref => {
|
|
12613
12788
|
var {
|
|
@@ -12618,7 +12793,7 @@ var PasswordComponent = _ref => {
|
|
|
12618
12793
|
widthHeight: 14
|
|
12619
12794
|
})
|
|
12620
12795
|
} = _ref,
|
|
12621
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12796
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
12622
12797
|
var _usePasswordState = usePasswordState(props),
|
|
12623
12798
|
{
|
|
12624
12799
|
isVisible,
|
|
@@ -12672,7 +12847,7 @@ var useComboBoxState = (items, placeholder, searchPlaceholder) => {
|
|
|
12672
12847
|
};
|
|
12673
12848
|
};
|
|
12674
12849
|
|
|
12675
|
-
var _excluded$
|
|
12850
|
+
var _excluded$C = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "views", "isDropdownVisible", "setIsDropdownVisible"];
|
|
12676
12851
|
// Defines the functional component 'ComboBoxView' with destructured props.
|
|
12677
12852
|
var ComboBoxView = _ref => {
|
|
12678
12853
|
var {
|
|
@@ -12697,7 +12872,7 @@ var ComboBoxView = _ref => {
|
|
|
12697
12872
|
setIsDropdownVisible
|
|
12698
12873
|
// Collects all further props not destructured explicitly.
|
|
12699
12874
|
} = _ref,
|
|
12700
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12875
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
12701
12876
|
var {
|
|
12702
12877
|
ref: triggerRef,
|
|
12703
12878
|
relation
|
|
@@ -12876,7 +13051,7 @@ var ComboBoxView = _ref => {
|
|
|
12876
13051
|
}, "No items found")))))));
|
|
12877
13052
|
};
|
|
12878
13053
|
|
|
12879
|
-
var _excluded$
|
|
13054
|
+
var _excluded$D = ["id", "name", "items", "placeholder", "searchPlaceholder"];
|
|
12880
13055
|
// Defines the ComboBoxComponent functional component with ComboBoxProps
|
|
12881
13056
|
var ComboBoxComponent = _ref => {
|
|
12882
13057
|
var {
|
|
@@ -12892,7 +13067,7 @@ var ComboBoxComponent = _ref => {
|
|
|
12892
13067
|
searchPlaceholder
|
|
12893
13068
|
// Destructures the rest of the props not explicitly defined
|
|
12894
13069
|
} = _ref,
|
|
12895
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13070
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
12896
13071
|
// Initializes ComboBox state using custom hook with items and placeholders
|
|
12897
13072
|
var state = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
12898
13073
|
return (
|
|
@@ -13101,7 +13276,7 @@ var useTagInputState = props => {
|
|
|
13101
13276
|
};
|
|
13102
13277
|
};
|
|
13103
13278
|
|
|
13104
|
-
var _excluded$
|
|
13279
|
+
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
13280
|
/**
|
|
13106
13281
|
* Individual tag chip component
|
|
13107
13282
|
*/
|
|
@@ -13226,7 +13401,7 @@ var TagInputView = _ref2 => {
|
|
|
13226
13401
|
setIsHovered,
|
|
13227
13402
|
onClick
|
|
13228
13403
|
} = _ref2,
|
|
13229
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
13404
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$E);
|
|
13230
13405
|
var {
|
|
13231
13406
|
getColor,
|
|
13232
13407
|
themeMode
|
|
@@ -13309,7 +13484,7 @@ var TagInputView = _ref2 => {
|
|
|
13309
13484
|
}, views == null ? void 0 : views.placeholder), "Maximum ", maxTags, " tags reached")))), right));
|
|
13310
13485
|
};
|
|
13311
13486
|
|
|
13312
|
-
var _excluded$
|
|
13487
|
+
var _excluded$F = ["tags"];
|
|
13313
13488
|
/**
|
|
13314
13489
|
* TagInput Component
|
|
13315
13490
|
*
|
|
@@ -13321,7 +13496,7 @@ var TagInputComponent = props => {
|
|
|
13321
13496
|
// Initialize state management with the custom hook
|
|
13322
13497
|
var tagInputState = useTagInputState(props);
|
|
13323
13498
|
// Separate the tags prop to avoid type conflicts
|
|
13324
|
-
var restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
13499
|
+
var restProps = _objectWithoutPropertiesLoose(props, _excluded$F);
|
|
13325
13500
|
// Render the view component with combined props and state
|
|
13326
13501
|
return /*#__PURE__*/React.createElement(TagInputView, Object.assign({}, tagInputState, restProps));
|
|
13327
13502
|
};
|
|
@@ -13634,7 +13809,7 @@ var useOTPInputState = _ref => {
|
|
|
13634
13809
|
};
|
|
13635
13810
|
};
|
|
13636
13811
|
|
|
13637
|
-
var _excluded$
|
|
13812
|
+
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
13813
|
// Create a context for OTP input slots
|
|
13639
13814
|
var OTPInputContext = /*#__PURE__*/createContext({
|
|
13640
13815
|
slots: [],
|
|
@@ -13688,7 +13863,7 @@ var OTPInputView = _ref => {
|
|
|
13688
13863
|
onFocus = () => {}
|
|
13689
13864
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13690
13865
|
} = _ref,
|
|
13691
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13866
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
13692
13867
|
useTheme(); // Initialize theme context
|
|
13693
13868
|
var showLabel = !!label;
|
|
13694
13869
|
// Create context value for slots
|
|
@@ -13920,7 +14095,7 @@ var OTPInputComponent = props => {
|
|
|
13920
14095
|
};
|
|
13921
14096
|
var OTPInput = OTPInputComponent;
|
|
13922
14097
|
|
|
13923
|
-
var _excluded$
|
|
14098
|
+
var _excluded$H = ["children", "autoFocus", "initFocus", "onChange"];
|
|
13924
14099
|
var FocusContext = /*#__PURE__*/createContext({
|
|
13925
14100
|
active: false,
|
|
13926
14101
|
focusNextInput: () => {},
|
|
@@ -13936,7 +14111,7 @@ var FormikForm = _ref => {
|
|
|
13936
14111
|
initFocus,
|
|
13937
14112
|
onChange = () => {}
|
|
13938
14113
|
} = _ref,
|
|
13939
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14114
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
13940
14115
|
var formik = useFormikContext();
|
|
13941
14116
|
useEffect(() => {
|
|
13942
14117
|
onChange(formik.values);
|
|
@@ -13984,7 +14159,7 @@ var FormikForm = _ref => {
|
|
|
13984
14159
|
}, /*#__PURE__*/React.createElement(Form, Object.assign({}, props), children));
|
|
13985
14160
|
};
|
|
13986
14161
|
|
|
13987
|
-
var _excluded$
|
|
14162
|
+
var _excluded$I = ["name", "type"];
|
|
13988
14163
|
var getInputTypeProps = type => {
|
|
13989
14164
|
switch (type) {
|
|
13990
14165
|
case 'email':
|
|
@@ -14023,7 +14198,7 @@ var useFormikInput = _ref => {
|
|
|
14023
14198
|
name,
|
|
14024
14199
|
type
|
|
14025
14200
|
} = _ref,
|
|
14026
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14201
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
14027
14202
|
var focus = useFormFocus();
|
|
14028
14203
|
var {
|
|
14029
14204
|
touched,
|
|
@@ -14067,13 +14242,13 @@ var useFormikInput = _ref => {
|
|
|
14067
14242
|
} : {});
|
|
14068
14243
|
};
|
|
14069
14244
|
|
|
14070
|
-
var _excluded$
|
|
14245
|
+
var _excluded$J = ["value"];
|
|
14071
14246
|
var CheckboxComponent$1 = props => {
|
|
14072
14247
|
var _useFormikInput = useFormikInput(props),
|
|
14073
14248
|
{
|
|
14074
14249
|
value
|
|
14075
14250
|
} = _useFormikInput,
|
|
14076
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
14251
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$J);
|
|
14077
14252
|
formProps.isChecked = value;
|
|
14078
14253
|
var checkboxStates = useCheckboxState(props);
|
|
14079
14254
|
return /*#__PURE__*/React.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -14793,7 +14968,7 @@ var useHoverCardState = function useHoverCardState(_temp) {
|
|
|
14793
14968
|
};
|
|
14794
14969
|
};
|
|
14795
14970
|
|
|
14796
|
-
var _excluded$
|
|
14971
|
+
var _excluded$K = ["children", "views", "asChild"],
|
|
14797
14972
|
_excluded2$b = ["children", "views", "side", "align", "sideOffset", "style", "backgroundColor", "borderRadius", "boxShadow", "padding", "minWidth", "maxWidth"];
|
|
14798
14973
|
// Create context for the HoverCard
|
|
14799
14974
|
var HoverCardContext = /*#__PURE__*/createContext({
|
|
@@ -14832,7 +15007,7 @@ var HoverCardTrigger = _ref2 => {
|
|
|
14832
15007
|
views,
|
|
14833
15008
|
asChild = false
|
|
14834
15009
|
} = _ref2,
|
|
14835
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
15010
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$K);
|
|
14836
15011
|
var {
|
|
14837
15012
|
openCard,
|
|
14838
15013
|
closeCard,
|
|
@@ -15002,7 +15177,7 @@ var HoverCardContent = _ref3 => {
|
|
|
15002
15177
|
}, views == null ? void 0 : views.container, props), children);
|
|
15003
15178
|
};
|
|
15004
15179
|
|
|
15005
|
-
var _excluded$
|
|
15180
|
+
var _excluded$L = ["children", "views", "openDelay", "closeDelay"];
|
|
15006
15181
|
/**
|
|
15007
15182
|
* HoverCard component displays floating content when hovering over a trigger element.
|
|
15008
15183
|
* Supports configurable open and close delays for a smoother user experience.
|
|
@@ -15014,7 +15189,7 @@ var HoverCardComponent = _ref => {
|
|
|
15014
15189
|
openDelay,
|
|
15015
15190
|
closeDelay
|
|
15016
15191
|
} = _ref,
|
|
15017
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15192
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
15018
15193
|
var hoverCardState = useHoverCardState({
|
|
15019
15194
|
openDelay,
|
|
15020
15195
|
closeDelay
|
|
@@ -15626,7 +15801,7 @@ var AudioRecorder = _ref => {
|
|
|
15626
15801
|
}))));
|
|
15627
15802
|
};
|
|
15628
15803
|
|
|
15629
|
-
var _excluded$
|
|
15804
|
+
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
15805
|
var ChatInputView = _ref => {
|
|
15631
15806
|
var _value$trim$length;
|
|
15632
15807
|
var {
|
|
@@ -15671,7 +15846,7 @@ var ChatInputView = _ref => {
|
|
|
15671
15846
|
handleDragLeave
|
|
15672
15847
|
// Other props
|
|
15673
15848
|
} = _ref,
|
|
15674
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
15849
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
15675
15850
|
var {} = useTheme();
|
|
15676
15851
|
// Combine styles
|
|
15677
15852
|
var containerStyles = Object.assign({}, DefaultChatInputStyles.container, Shapes$2[shape], views == null ? void 0 : views.container);
|
|
@@ -15898,13 +16073,13 @@ var ChatInputView = _ref => {
|
|
|
15898
16073
|
}, views == null ? void 0 : views.bottomTip), errorMessage)));
|
|
15899
16074
|
};
|
|
15900
16075
|
|
|
15901
|
-
var _excluded$
|
|
16076
|
+
var _excluded$N = ["name", "onSubmit"];
|
|
15902
16077
|
var ChatInputComponent = props => {
|
|
15903
16078
|
var {
|
|
15904
16079
|
name,
|
|
15905
16080
|
onSubmit
|
|
15906
16081
|
} = props,
|
|
15907
|
-
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16082
|
+
chatInputProps = _objectWithoutPropertiesLoose(props, _excluded$N);
|
|
15908
16083
|
// State for managing pending files
|
|
15909
16084
|
var [pendingFiles, setPendingFiles] = useState([]);
|
|
15910
16085
|
// Get Formik integration props
|
|
@@ -16001,7 +16176,7 @@ var SwitchComponent$1 = props => {
|
|
|
16001
16176
|
};
|
|
16002
16177
|
var FormikSwitch = SwitchComponent$1;
|
|
16003
16178
|
|
|
16004
|
-
var _excluded$
|
|
16179
|
+
var _excluded$O = ["name"],
|
|
16005
16180
|
_excluded2$c = ["tags"];
|
|
16006
16181
|
/**
|
|
16007
16182
|
* Formik-integrated TagInput component
|
|
@@ -16010,7 +16185,7 @@ var TagInputComponent$1 = props => {
|
|
|
16010
16185
|
var {
|
|
16011
16186
|
name
|
|
16012
16187
|
} = props,
|
|
16013
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16188
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$O);
|
|
16014
16189
|
// Get Formik context directly for better control
|
|
16015
16190
|
var {
|
|
16016
16191
|
values,
|
|
@@ -16068,11 +16243,11 @@ var TextAreaComponent$1 = props => {
|
|
|
16068
16243
|
*/
|
|
16069
16244
|
var FormikTextArea = TextAreaComponent$1;
|
|
16070
16245
|
|
|
16071
|
-
var _excluded$
|
|
16246
|
+
var _excluded$P = ["value"];
|
|
16072
16247
|
var TextFieldComponent$1 = props => {
|
|
16073
16248
|
var formProps = useFormikInput(props);
|
|
16074
16249
|
var _useTextFieldState = useTextFieldState(props),
|
|
16075
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
16250
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$P);
|
|
16076
16251
|
return /*#__PURE__*/React.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
16077
16252
|
};
|
|
16078
16253
|
/**
|
|
@@ -16080,7 +16255,7 @@ var TextFieldComponent$1 = props => {
|
|
|
16080
16255
|
*/
|
|
16081
16256
|
var FormikTextField = TextFieldComponent$1;
|
|
16082
16257
|
|
|
16083
|
-
var _excluded$
|
|
16258
|
+
var _excluded$Q = ["visibleIcon", "hiddenIcon"],
|
|
16084
16259
|
_excluded2$d = ["isVisible", "setIsVisible"];
|
|
16085
16260
|
var PasswordComponent$1 = _ref => {
|
|
16086
16261
|
var {
|
|
@@ -16091,7 +16266,7 @@ var PasswordComponent$1 = _ref => {
|
|
|
16091
16266
|
widthHeight: 14
|
|
16092
16267
|
})
|
|
16093
16268
|
} = _ref,
|
|
16094
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16269
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
16095
16270
|
var formProps = useFormikInput(props);
|
|
16096
16271
|
var _usePasswordState = usePasswordState(formProps),
|
|
16097
16272
|
{
|
|
@@ -16116,14 +16291,14 @@ var PasswordComponent$1 = _ref => {
|
|
|
16116
16291
|
*/
|
|
16117
16292
|
var FormikPassword = PasswordComponent$1;
|
|
16118
16293
|
|
|
16119
|
-
var _excluded$
|
|
16294
|
+
var _excluded$R = ["items", "placeholder", "searchPlaceholder"];
|
|
16120
16295
|
var ComboBoxComponent$1 = _ref => {
|
|
16121
16296
|
var {
|
|
16122
16297
|
items,
|
|
16123
16298
|
placeholder,
|
|
16124
16299
|
searchPlaceholder
|
|
16125
16300
|
} = _ref,
|
|
16126
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16301
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$R);
|
|
16127
16302
|
var formProps = useFormikInput(props);
|
|
16128
16303
|
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
16129
16304
|
// Ensure the onChange function from formProps is being called when an item is selected
|
|
@@ -16406,7 +16581,7 @@ var OrientationStyles = {
|
|
|
16406
16581
|
}
|
|
16407
16582
|
};
|
|
16408
16583
|
|
|
16409
|
-
var _excluded$
|
|
16584
|
+
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
16585
|
var SliderView = _ref => {
|
|
16411
16586
|
var _views$tooltip, _views$tooltip2;
|
|
16412
16587
|
var {
|
|
@@ -16449,7 +16624,7 @@ var SliderView = _ref => {
|
|
|
16449
16624
|
tooltip: {}
|
|
16450
16625
|
}
|
|
16451
16626
|
} = _ref,
|
|
16452
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16627
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$S);
|
|
16453
16628
|
var {
|
|
16454
16629
|
getColor,
|
|
16455
16630
|
themeMode
|
|
@@ -16772,7 +16947,7 @@ var OTPInputComponent$1 = props => {
|
|
|
16772
16947
|
*/
|
|
16773
16948
|
var FormikOTPInput = OTPInputComponent$1;
|
|
16774
16949
|
|
|
16775
|
-
var _excluded$
|
|
16950
|
+
var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
|
|
16776
16951
|
var defaultUploadFile = (file, onProgress) => {
|
|
16777
16952
|
return UploadService.uploadControllerFile({
|
|
16778
16953
|
file
|
|
@@ -16798,7 +16973,7 @@ var FormikUploader = _ref => {
|
|
|
16798
16973
|
onFileSelect,
|
|
16799
16974
|
multiple = true
|
|
16800
16975
|
} = _ref,
|
|
16801
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
16976
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
16802
16977
|
var {
|
|
16803
16978
|
setFieldValue,
|
|
16804
16979
|
setFieldTouched,
|
|
@@ -16868,156 +17043,7 @@ var FormikUploader = _ref => {
|
|
|
16868
17043
|
};
|
|
16869
17044
|
FormikUploader.displayName = 'FormikUploader';
|
|
16870
17045
|
|
|
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 => {
|
|
17046
|
+
var SelectorComponent$1 = props => {
|
|
17021
17047
|
var formProps = useFormikInput(props);
|
|
17022
17048
|
formProps.selected = formProps.value;
|
|
17023
17049
|
var selectorStates = useSelectorState(props);
|
|
@@ -17026,7 +17052,7 @@ var SelectorComponent = props => {
|
|
|
17026
17052
|
/**
|
|
17027
17053
|
* Selector provides a dropdown list of options for the user to choose from.
|
|
17028
17054
|
*/
|
|
17029
|
-
var FormikSelector = SelectorComponent;
|
|
17055
|
+
var FormikSelector = SelectorComponent$1;
|
|
17030
17056
|
|
|
17031
17057
|
var AttachmentPreview = _ref => {
|
|
17032
17058
|
var {
|
|
@@ -28248,5 +28274,5 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
|
|
|
28248
28274
|
});
|
|
28249
28275
|
Background.displayName = 'Background';
|
|
28250
28276
|
|
|
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 };
|
|
28277
|
+
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
28278
|
//# sourceMappingURL=web.esm.js.map
|