dce-reactkit 3.7.15 → 3.7.17
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/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ButtonInputGroup.d.ts +2 -0
- package/dist/cjs/types/components/ToggleSwitch.d.ts +1 -0
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ButtonInputGroup.d.ts +2 -0
- package/dist/esm/types/components/ToggleSwitch.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/ButtonInputGroup.tsx +9 -3
- package/src/components/ToggleSwitch.tsx +4 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1570,21 +1570,21 @@ const ButtonInputGroup = (props) => {
|
|
|
1570
1570
|
/*------------------------------------------------------------------------*/
|
|
1571
1571
|
/* -------------- Props ------------- */
|
|
1572
1572
|
// Destructure all props
|
|
1573
|
-
const { label, minLabelWidth, children, className, wrapButtonsAndAddGaps, } = props;
|
|
1573
|
+
const { label, minLabelWidth, children, className, wrapButtonsAndAddGaps, isAdminFeature, noMarginOnBottom, } = props;
|
|
1574
1574
|
/*------------------------------------------------------------------------*/
|
|
1575
1575
|
/* ------------------------------- Render ------------------------------- */
|
|
1576
1576
|
/*------------------------------------------------------------------------*/
|
|
1577
1577
|
/*----------------------------------------*/
|
|
1578
1578
|
/* --------------- Main UI -------------- */
|
|
1579
1579
|
/*----------------------------------------*/
|
|
1580
|
-
return (React__default["default"].createElement("div", { className: `input-group ${className !== null && className !== void 0 ? className : ''}` },
|
|
1580
|
+
return (React__default["default"].createElement("div", { className: `input-group ${className !== null && className !== void 0 ? className : ''} ${noMarginOnBottom ? '' : 'mb-2'}` },
|
|
1581
1581
|
React__default["default"].createElement("div", { className: "input-group-prepend d-flex w-100" },
|
|
1582
|
-
React__default["default"].createElement("span", { className:
|
|
1582
|
+
React__default["default"].createElement("span", { className: `input-group-text ${isAdminFeature ? 'border border-success progress-bar-striped bg-success text-white fw-bold' : ''}`, style: {
|
|
1583
1583
|
minWidth: (minLabelWidth !== null && minLabelWidth !== void 0 ? minLabelWidth : undefined),
|
|
1584
1584
|
borderTopRightRadius: 0,
|
|
1585
1585
|
borderBottomRightRadius: 0,
|
|
1586
1586
|
} }, label),
|
|
1587
|
-
React__default["default"].createElement("span", { className:
|
|
1587
|
+
React__default["default"].createElement("span", { className: `input-group-text flex-grow-1 ${isAdminFeature ? 'border-success ' : ''}rounded-right d-flex flex-wrap`, style: {
|
|
1588
1588
|
backgroundColor: 'white',
|
|
1589
1589
|
borderTopLeftRadius: 0,
|
|
1590
1590
|
borderBottomLeftRadius: 0,
|
|
@@ -12906,7 +12906,7 @@ const ToggleSwitch = (props) => {
|
|
|
12906
12906
|
/*------------------------------------------------------------------------*/
|
|
12907
12907
|
/* -------------- Props ------------- */
|
|
12908
12908
|
// Destructure all props
|
|
12909
|
-
const { isOn, onToggle, id, description, backgroundVariantWhenOn = Variant$1.Info, } = props;
|
|
12909
|
+
const { isOn, onToggle, id, className, description, backgroundVariantWhenOn = Variant$1.Info, } = props;
|
|
12910
12910
|
/*------------------------------------------------------------------------*/
|
|
12911
12911
|
/* ------------------------------- Render ------------------------------- */
|
|
12912
12912
|
/*------------------------------------------------------------------------*/
|
|
@@ -12916,7 +12916,7 @@ const ToggleSwitch = (props) => {
|
|
|
12916
12916
|
const backgroundVariant = (isOn
|
|
12917
12917
|
? backgroundVariantWhenOn
|
|
12918
12918
|
: 'secondary');
|
|
12919
|
-
return (React__default["default"].createElement("button", { id: id, "aria-label": `If on, ${description}. Currently ${isOn ? 'on' : 'off'}. Click to turn ${isOn ? 'off' : 'on'}.`, className: `alert alert-${backgroundVariant} bg-${backgroundVariant} mb-0 rounded-pill d-inline-block pt-0 pb-0 px-3`, onClick: () => {
|
|
12919
|
+
return (React__default["default"].createElement("button", { id: id, "aria-label": `If on, ${description}. Currently ${isOn ? 'on' : 'off'}. Click to turn ${isOn ? 'off' : 'on'}.`, className: `alert alert-${backgroundVariant} bg-${backgroundVariant} mb-0 rounded-pill d-inline-block pt-0 pb-0 px-3 ${className !== null && className !== void 0 ? className : ''}`, onClick: () => {
|
|
12920
12920
|
onToggle(!isOn);
|
|
12921
12921
|
}, type: "button" },
|
|
12922
12922
|
React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faCircle, className: "text-light", style: {
|