dirk-cfx-react 1.1.80 → 1.1.81

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.cjs CHANGED
@@ -5861,25 +5861,46 @@ function AdminPageTitle(props) {
5861
5861
  /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", tt: "uppercase", lts: "0.1em", size: "sm", c: "rgba(255,255,255,0.6)", children: locale(props.title) })
5862
5862
  ] });
5863
5863
  }
5864
- function SwitchPanel({ label: label2, description: description2, checked, onChange, disabled }) {
5864
+ function SwitchPanel({
5865
+ label: label2,
5866
+ description: description2,
5867
+ checked,
5868
+ onChange,
5869
+ disabled,
5870
+ thumbIcon,
5871
+ compact
5872
+ }) {
5865
5873
  const theme2 = core.useMantineTheme();
5866
5874
  const pc = theme2.colors[theme2.primaryColor];
5875
+ const bg = compact ? core.alpha(theme2.colors.dark[6], 0.5) : core.alpha(theme2.colors.dark[5], 0.35);
5876
+ const border = compact ? "0.1vh solid rgba(255,255,255,0.04)" : "0.1vh solid rgba(255,255,255,0.05)";
5867
5877
  return /* @__PURE__ */ jsxRuntime.jsxs(
5868
5878
  core.Flex,
5869
5879
  {
5870
5880
  justify: "space-between",
5871
5881
  align: "center",
5872
- p: "xs",
5882
+ px: compact ? "xs" : "xs",
5883
+ py: compact ? "xxs" : "xs",
5873
5884
  style: {
5874
- background: core.alpha(theme2.colors.dark[5], 0.35),
5875
- border: "0.1vh solid rgba(255,255,255,0.05)",
5885
+ background: bg,
5886
+ border,
5876
5887
  borderRadius: theme2.radius.xs,
5877
5888
  opacity: disabled ? 0.5 : 1
5878
5889
  },
5879
5890
  children: [
5880
5891
  /* @__PURE__ */ jsxRuntime.jsxs(core.Flex, { direction: "column", gap: "xxs", style: { flex: 1, minWidth: 0 }, children: [
5881
- typeof label2 === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xs", c: "rgba(255,255,255,0.85)", children: label2 }) : label2,
5882
- description2 && (typeof description2 === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xxs", c: "rgba(255,255,255,0.45)", children: description2 }) : description2)
5892
+ typeof label2 === "string" ? compact ? /* @__PURE__ */ jsxRuntime.jsx(
5893
+ core.Text,
5894
+ {
5895
+ ff: "Akrobat Bold",
5896
+ size: "xxs",
5897
+ c: "rgba(255,255,255,0.85)",
5898
+ tt: "uppercase",
5899
+ lts: "0.05em",
5900
+ children: label2
5901
+ }
5902
+ ) : /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xs", c: "rgba(255,255,255,0.85)", children: label2 }) : label2,
5903
+ description2 && (typeof description2 === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xxs", c: compact ? "rgba(255,255,255,0.4)" : "rgba(255,255,255,0.45)", children: description2 }) : description2)
5883
5904
  ] }),
5884
5905
  /* @__PURE__ */ jsxRuntime.jsx(
5885
5906
  core.Switch,
@@ -5887,7 +5908,8 @@ function SwitchPanel({ label: label2, description: description2, checked, onChan
5887
5908
  checked,
5888
5909
  disabled,
5889
5910
  onChange: (e) => onChange(e.currentTarget.checked),
5890
- size: "md",
5911
+ size: compact ? "sm" : "md",
5912
+ thumbIcon,
5891
5913
  styles: {
5892
5914
  track: {
5893
5915
  background: checked ? core.alpha(pc[6], 0.4) : "rgba(255,255,255,0.08)",