@oliasoft-open-source/react-ui-library 4.17.0 → 4.18.0-beta-2

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/index.d.ts CHANGED
@@ -1197,6 +1197,16 @@ declare interface ISelectSelectedOption {
1197
1197
  testId?: string;
1198
1198
  }
1199
1199
 
1200
+ export declare interface ISettingFieldProps {
1201
+ helpText: string;
1202
+ children: ReactNode;
1203
+ active?: boolean;
1204
+ noPermission?: boolean;
1205
+ isLastField?: boolean;
1206
+ selectedOption: 'all_users' | 'superusers_admin';
1207
+ handleSelectChange: (value: 'all_users' | 'superusers_admin') => void;
1208
+ }
1209
+
1200
1210
  export declare interface ISideBarProps {
1201
1211
  options: {
1202
1212
  title: string;
@@ -1704,6 +1714,8 @@ export declare const Row: ({ alignItems, justifyContent, children, flex, height,
1704
1714
 
1705
1715
  export declare const Select: (props: ISelectProps) => JSX_2.Element;
1706
1716
 
1717
+ export declare const SettingField: ({ helpText, active, children, isLastField, noPermission, selectedOption, handleSelectChange, }: ISettingFieldProps) => JSX_2.Element;
1718
+
1707
1719
  export declare const SideBar: default_2.MemoExoticComponent<({ options, startOpen, onShiftClickToggleOpen, top, }: ISideBarProps) => JSX_2.Element>;
1708
1720
 
1709
1721
  export declare const Slider: ({ name, label, width, labelWidth, value, min, max, step, marks, showArrows, showTooltip, tooltipFormatter, disabled, range, small, vertical, onChange, }: ISliderProps) => JSX_2.Element;
package/dist/index.js CHANGED
@@ -66545,6 +66545,42 @@ const SmartUploadModal = ({
66545
66545
  }
66546
66546
  ) });
66547
66547
  };
66548
+ const SettingField = ({
66549
+ helpText,
66550
+ active: active2 = true,
66551
+ children,
66552
+ isLastField = false,
66553
+ noPermission = false,
66554
+ selectedOption,
66555
+ handleSelectChange
66556
+ }) => {
66557
+ const options = [
66558
+ { label: "All users", value: "all_users" },
66559
+ { label: "Superusers and Admin only", value: "superusers_admin" }
66560
+ ];
66561
+ const onSelectChange = (event) => {
66562
+ handleSelectChange(event.target.value);
66563
+ };
66564
+ return /* @__PURE__ */ jsxs("div", { children: [
66565
+ /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
66566
+ children,
66567
+ !noPermission && /* @__PURE__ */ jsx(
66568
+ Select,
66569
+ {
66570
+ name: "userType",
66571
+ options,
66572
+ value: selectedOption,
66573
+ disabled: !active2,
66574
+ onChange: onSelectChange,
66575
+ "aria-label": "Select user type",
66576
+ width: "auto"
66577
+ }
66578
+ )
66579
+ ] }),
66580
+ /* @__PURE__ */ jsx(Text, { muted: true, children: helpText }),
66581
+ !isLastField && /* @__PURE__ */ jsx(Divider, {})
66582
+ ] });
66583
+ };
66548
66584
  export {
66549
66585
  Accordion,
66550
66586
  AccordionWithDefaultToggle,
@@ -66608,6 +66644,7 @@ export {
66608
66644
  RichTextInput,
66609
66645
  Row$1 as Row,
66610
66646
  Select,
66647
+ SettingField,
66611
66648
  SideBar,
66612
66649
  Slider,
66613
66650
  SmartUploadModal,