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.
@@ -5132,25 +5132,46 @@ function AdminPageTitle(props) {
5132
5132
  /* @__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) })
5133
5133
  ] });
5134
5134
  }
5135
- function SwitchPanel({ label, description, checked, onChange, disabled }) {
5135
+ function SwitchPanel({
5136
+ label,
5137
+ description,
5138
+ checked,
5139
+ onChange,
5140
+ disabled,
5141
+ thumbIcon,
5142
+ compact
5143
+ }) {
5136
5144
  const theme = core.useMantineTheme();
5137
5145
  const pc = theme.colors[theme.primaryColor];
5146
+ const bg = compact ? core.alpha(theme.colors.dark[6], 0.5) : core.alpha(theme.colors.dark[5], 0.35);
5147
+ const border = compact ? "0.1vh solid rgba(255,255,255,0.04)" : "0.1vh solid rgba(255,255,255,0.05)";
5138
5148
  return /* @__PURE__ */ jsxRuntime.jsxs(
5139
5149
  core.Flex,
5140
5150
  {
5141
5151
  justify: "space-between",
5142
5152
  align: "center",
5143
- p: "xs",
5153
+ px: compact ? "xs" : "xs",
5154
+ py: compact ? "xxs" : "xs",
5144
5155
  style: {
5145
- background: core.alpha(theme.colors.dark[5], 0.35),
5146
- border: "0.1vh solid rgba(255,255,255,0.05)",
5156
+ background: bg,
5157
+ border,
5147
5158
  borderRadius: theme.radius.xs,
5148
5159
  opacity: disabled ? 0.5 : 1
5149
5160
  },
5150
5161
  children: [
5151
5162
  /* @__PURE__ */ jsxRuntime.jsxs(core.Flex, { direction: "column", gap: "xxs", style: { flex: 1, minWidth: 0 }, children: [
5152
- typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xs", c: "rgba(255,255,255,0.85)", children: label }) : label,
5153
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xxs", c: "rgba(255,255,255,0.45)", children: description }) : description)
5163
+ typeof label === "string" ? compact ? /* @__PURE__ */ jsxRuntime.jsx(
5164
+ core.Text,
5165
+ {
5166
+ ff: "Akrobat Bold",
5167
+ size: "xxs",
5168
+ c: "rgba(255,255,255,0.85)",
5169
+ tt: "uppercase",
5170
+ lts: "0.05em",
5171
+ children: label
5172
+ }
5173
+ ) : /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ff: "Akrobat Bold", size: "xs", c: "rgba(255,255,255,0.85)", children: label }) : label,
5174
+ description && (typeof description === "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: description }) : description)
5154
5175
  ] }),
5155
5176
  /* @__PURE__ */ jsxRuntime.jsx(
5156
5177
  core.Switch,
@@ -5158,7 +5179,8 @@ function SwitchPanel({ label, description, checked, onChange, disabled }) {
5158
5179
  checked,
5159
5180
  disabled,
5160
5181
  onChange: (e) => onChange(e.currentTarget.checked),
5161
- size: "md",
5182
+ size: compact ? "sm" : "md",
5183
+ thumbIcon,
5162
5184
  styles: {
5163
5185
  track: {
5164
5186
  background: checked ? core.alpha(pc[6], 0.4) : "rgba(255,255,255,0.08)",