@darajs/core 1.21.2 → 1.21.3
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.
|
Binary file
|
|
@@ -25239,9 +25239,9 @@
|
|
|
25239
25239
|
setValues(valuesArray);
|
|
25240
25240
|
}
|
|
25241
25241
|
}, [props.values, props.items]);
|
|
25242
|
-
return jsxRuntimeExports.jsxs(CheckboxGroupWrapper, { className: props.className, style: props.style, children: [(props.selectMax || props.selectMin) && jsxRuntimeExports.jsx(CheckboxInfo, { children: infoMessage }), props.items.map((item, index2) => {
|
|
25242
|
+
return jsxRuntimeExports.jsxs(CheckboxGroupWrapper, { className: props.className, style: props.style, id: props.id, children: [(props.selectMax || props.selectMin) && jsxRuntimeExports.jsx(CheckboxInfo, { children: infoMessage }), props.items.map((item, index2) => {
|
|
25243
25243
|
var _a, _b;
|
|
25244
|
-
return jsxRuntimeExports.jsx(CheckboxWrapper, { "aria-disabled": props.disabled, children: jsxRuntimeExports.jsx(Checkbox, { disabled: isSelectPermitted ? props.disabled : ((_a = checkedState.find((option) => option.value === item.value)) === null || _a === void 0 ? void 0 : _a.state) === false,
|
|
25244
|
+
return jsxRuntimeExports.jsx(CheckboxWrapper, { "aria-disabled": props.disabled, children: jsxRuntimeExports.jsx(Checkbox, { id: index2, disabled: isSelectPermitted ? props.disabled : ((_a = checkedState.find((option) => option.value === item.value)) === null || _a === void 0 ? void 0 : _a.state) === false, isListStyle: props.isListStyle, label: item.label ? item.label : item.value, onChange: (checked, e2) => onChangeValue(e2), selected: (_b = checkedState.find((option) => option.value === item.value)) === null || _b === void 0 ? void 0 : _b.state }) }, `item-${index2}`);
|
|
25245
25245
|
})] });
|
|
25246
25246
|
}
|
|
25247
25247
|
var __rest$7 = function(s, e2) {
|
|
@@ -31918,7 +31918,7 @@
|
|
|
31918
31918
|
const newDateTime = getNewDatetime(selectedDate, time2);
|
|
31919
31919
|
(_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, newDateTime);
|
|
31920
31920
|
}, [selectedDate, selectedTime]);
|
|
31921
|
-
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsx(Tooltip, { content: props.errorMsg, disabled: !props.errorMsg, styling: "error", children: jsxRuntimeExports.jsxs(DatepickerWrapper$1, { inline: props.inline, showsRange: props.selectsRange, showsTime: props.showTimeInput, children: [jsxRuntimeExports.jsxs(DatepickerInputs, { children: [jsxRuntimeExports.jsxs(DateTimeWrapper, { isRange: props.selectsRange, children: [jsxRuntimeExports.jsx(DateInput, { isTimeRange: props.selectsRange && props.showTimeInput, onChange: (e2) => {
|
|
31921
|
+
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: jsxRuntimeExports.jsx(Tooltip, { content: props.errorMsg, disabled: !props.errorMsg, styling: "error", children: jsxRuntimeExports.jsxs(DatepickerWrapper$1, { id: props.id, inline: props.inline, showsRange: props.selectsRange, showsTime: props.showTimeInput, children: [jsxRuntimeExports.jsxs(DatepickerInputs, { children: [jsxRuntimeExports.jsxs(DateTimeWrapper, { isRange: props.selectsRange, children: [jsxRuntimeExports.jsx(DateInput, { isTimeRange: props.selectsRange && props.showTimeInput, onChange: (e2) => {
|
|
31922
31922
|
onChangeDateInput(true, e2);
|
|
31923
31923
|
}, onClick: () => {
|
|
31924
31924
|
var _a2;
|
|
@@ -33461,7 +33461,7 @@
|
|
|
33461
33461
|
const menuProps = React__namespace.useMemo(() => getMenuProps({ ref: mergedDropdownRef }), [mergedDropdownRef, getMenuProps]);
|
|
33462
33462
|
const toggleButtonProps = React__namespace.useMemo(() => getToggleButtonProps({ disabled: props.disabled, ref: refs.setReference }), [props.disabled, refs.setReference, getToggleButtonProps]);
|
|
33463
33463
|
const dropdownStyle = React__namespace.useMemo(() => Object.assign(Object.assign({}, floatingStyles), { marginLeft: -1 }), [floatingStyles]);
|
|
33464
|
-
return jsxRuntimeExports.jsx(Tooltip, { content: props.errorMsg, disabled: !props.errorMsg, styling: "error", children: jsxRuntimeExports.jsxs(Wrapper$3, { className: props.className, isDisabled: props.disabled, isErrored: !!props.errorMsg, isOpen, onClick: props.onClick, style: props.style, children: [jsxRuntimeExports.jsxs(SelectButton, Object.assign({ disabled: props.disabled, isOpen }, toggleButtonProps, getReferenceProps(), { type: "button", children: [jsxRuntimeExports.jsx(SelectedItem, { size: props.size, children: (_b = (_a = selectedItem === null ? props.placeholder : selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) !== null && _a !== void 0 ? _a : props.placeholder) !== null && _b !== void 0 ? _b : "Select" }), jsxRuntimeExports.jsx(Chevron$2, { disabled: props.disabled, isOpen })] })), ReactDOM.createPortal(jsxRuntimeExports.jsx(DropdownList$1, { items: props.items, getItemProps, getFloatingProps, style: dropdownStyle, isOpen, getMenuProps, size: props.size, ref: refs.setFloating, className: `${(_c = menuProps === null || menuProps === void 0 ? void 0 : menuProps.className) !== null && _c !== void 0 ? _c : ""} ${props.itemClass}`, itemClass: props.itemClass, maxItems: props.maxItems, selectedItem, kbdHighlightIdx }), document.body)] }) });
|
|
33464
|
+
return jsxRuntimeExports.jsx(Tooltip, { content: props.errorMsg, disabled: !props.errorMsg, styling: "error", children: jsxRuntimeExports.jsxs(Wrapper$3, { className: props.className, isDisabled: props.disabled, isErrored: !!props.errorMsg, isOpen, onClick: props.onClick, style: props.style, id: props.id, children: [jsxRuntimeExports.jsxs(SelectButton, Object.assign({ disabled: props.disabled, isOpen }, toggleButtonProps, getReferenceProps(), { type: "button", children: [jsxRuntimeExports.jsx(SelectedItem, { size: props.size, children: (_b = (_a = selectedItem === null ? props.placeholder : selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) !== null && _a !== void 0 ? _a : props.placeholder) !== null && _b !== void 0 ? _b : "Select" }), jsxRuntimeExports.jsx(Chevron$2, { disabled: props.disabled, isOpen })] })), ReactDOM.createPortal(jsxRuntimeExports.jsx(DropdownList$1, { items: props.items, getItemProps, getFloatingProps, style: dropdownStyle, isOpen, getMenuProps, size: props.size, ref: refs.setFloating, className: `${(_c = menuProps === null || menuProps === void 0 ? void 0 : menuProps.className) !== null && _c !== void 0 ? _c : ""} ${props.itemClass}`, itemClass: props.itemClass, maxItems: props.maxItems, selectedItem, kbdHighlightIdx }), document.body)] }) });
|
|
33465
33465
|
}
|
|
33466
33466
|
const StyledSelect$1 = styled(Select)`
|
|
33467
33467
|
margin: 1px solid ${(props) => props.theme.colors.background};
|
|
@@ -34522,7 +34522,7 @@
|
|
|
34522
34522
|
const { getReferenceProps, getFloatingProps } = useInteractions([role]);
|
|
34523
34523
|
const dropdownStyle = React$1.useMemo(() => Object.assign(Object.assign({}, floatingStyles), { marginLeft: -1 }), [floatingStyles]);
|
|
34524
34524
|
const renderListItem = React$1.useCallback((item, index2) => jsxRuntimeExports.jsx(SectionedListItem, { item, index: index2, getItemProps, isSelected: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value) === item.value, isHighlighted: isOpen && kbdHighlightIdx !== void 0 && kbdHighlightIdx === index2 }, `item-${index2}-${isOpen && (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) === item.label}`), [getItemProps, selectedItem, isOpen, kbdHighlightIdx]);
|
|
34525
|
-
return jsxRuntimeExports.jsxs(Wrapper$6, { className: props.className, isDisabled: props.disabled, isErrored: false, isOpen, style: props.style, children: [jsxRuntimeExports.jsxs(InputWrapper$2, { disabled: props.disabled, isOpen, ref: refs.setReference, children: [jsxRuntimeExports.jsx(Input, Object.assign({}, getInputProps({ value: inputValue }), getReferenceProps())), jsxRuntimeExports.jsx(ChevronButton$1, { disabled: props.disabled, isOpen, getToggleButtonProps })] }), ReactDOM.createPortal(jsxRuntimeExports.jsx(DropdownList$1, { items, getItemProps, getFloatingProps, style: dropdownStyle, isOpen, getMenuProps, ref: refs.setFloating, kbdHighlightIdx, children: renderListItem }), document.body)] });
|
|
34525
|
+
return jsxRuntimeExports.jsxs(Wrapper$6, { className: props.className, isDisabled: props.disabled, isErrored: false, isOpen, style: props.style, id: props.id, children: [jsxRuntimeExports.jsxs(InputWrapper$2, { disabled: props.disabled, isOpen, ref: refs.setReference, children: [jsxRuntimeExports.jsx(Input, Object.assign({}, getInputProps({ value: inputValue }), getReferenceProps())), jsxRuntimeExports.jsx(ChevronButton$1, { disabled: props.disabled, isOpen, getToggleButtonProps })] }), ReactDOM.createPortal(jsxRuntimeExports.jsx(DropdownList$1, { items, getItemProps, getFloatingProps, style: dropdownStyle, isOpen, getMenuProps, ref: refs.setFloating, kbdHighlightIdx, children: renderListItem }), document.body)] });
|
|
34526
34526
|
}
|
|
34527
34527
|
var toInteger_1;
|
|
34528
34528
|
var hasRequiredToInteger;
|
|
@@ -37056,7 +37056,7 @@
|
|
|
37056
37056
|
function Switch({ className, initialValue = false, labels = {
|
|
37057
37057
|
off: "OFF",
|
|
37058
37058
|
on: "ON"
|
|
37059
|
-
}, lightDark = false, onChange: onChange2, style, value }, ref) {
|
|
37059
|
+
}, lightDark = false, onChange: onChange2, style, value, id }, ref) {
|
|
37060
37060
|
const [enabled, setEnabled] = React$1.useState(value || initialValue);
|
|
37061
37061
|
const labelIconToShow = React$1.useMemo(() => {
|
|
37062
37062
|
if (lightDark) {
|
|
@@ -37075,7 +37075,7 @@
|
|
|
37075
37075
|
}
|
|
37076
37076
|
onChange2 === null || onChange2 === void 0 ? void 0 : onChange2(!enabled);
|
|
37077
37077
|
};
|
|
37078
|
-
return jsxRuntimeExports.jsxs(SwitchWrapper, { className, "data-testid": "wrapper", enabled, onClick, ref, style, children: [jsxRuntimeExports.jsx(SwitchHandle, { "data-testid": "handle", enabled }), jsxRuntimeExports.jsx("div", { style: { userSelect: "none" }, children: labelIconToShow })] });
|
|
37078
|
+
return jsxRuntimeExports.jsxs(SwitchWrapper, { className, "data-testid": "wrapper", enabled, onClick, ref, style, id, children: [jsxRuntimeExports.jsx(SwitchHandle, { "data-testid": "handle", enabled }), jsxRuntimeExports.jsx("div", { style: { userSelect: "none" }, children: labelIconToShow })] });
|
|
37079
37079
|
}
|
|
37080
37080
|
React$1.forwardRef(Switch);
|
|
37081
37081
|
var safeIsNaN$1 = Number.isNaN || function ponyfill(value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darajs/core",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
4
4
|
"description": "Dara Framework core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@babel/preset-env": "^7.23.0",
|
|
40
40
|
"@babel/preset-react": "^7.22.15",
|
|
41
41
|
"@babel/preset-typescript": "^7.23.0",
|
|
42
|
-
"@darajs/eslint-config": "1.21.
|
|
43
|
-
"@darajs/prettier-config": "1.21.
|
|
44
|
-
"@darajs/stylelint-config": "1.21.
|
|
42
|
+
"@darajs/eslint-config": "1.21.3",
|
|
43
|
+
"@darajs/prettier-config": "1.21.3",
|
|
44
|
+
"@darajs/stylelint-config": "1.21.3",
|
|
45
45
|
"@rollup/plugin-inject": "^4.0.4",
|
|
46
46
|
"@testing-library/dom": "^9.3.0",
|
|
47
47
|
"@testing-library/jest-dom": "^6.0.0",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"whatwg-fetch": "^3.6.20"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@darajs/styled-components": "1.21.
|
|
79
|
-
"@darajs/ui-components": "1.21.
|
|
80
|
-
"@darajs/ui-notifications": "1.21.
|
|
81
|
-
"@darajs/ui-utils": "1.21.
|
|
78
|
+
"@darajs/styled-components": "1.21.3",
|
|
79
|
+
"@darajs/ui-components": "1.21.3",
|
|
80
|
+
"@darajs/ui-notifications": "1.21.3",
|
|
81
|
+
"@darajs/ui-utils": "1.21.3",
|
|
82
82
|
"@fortawesome/fontawesome-free": "~6.4.0",
|
|
83
83
|
"@recoiljs/refine": "^0.1.1",
|
|
84
84
|
"@tanstack/query-core": "^4.40.0",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"engines": {
|
|
117
117
|
"node": ">=20.19.0"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "ca0217cbace44d9a817b6a4d0b188b0ed00a8f58"
|
|
120
120
|
}
|