dirk-cfx-react 1.1.84 → 1.1.86
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/components/index.cjs +168 -8
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +35 -5
- package/dist/components/index.d.ts +35 -5
- package/dist/components/index.js +168 -9
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +168 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +168 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, DiscordRole, DiscordRoleSelect, DiscordRoleSelectProps, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, ScenarioSelect, ScenarioSelectProps, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
|
|
1
|
+
export { AccountSelect, AccountSelectProps, AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, DiscordRole, DiscordRoleSelect, DiscordRoleSelectProps, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, FrameworkAccount, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, ScenarioSelect, ScenarioSelectProps, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.cjs';
|
|
2
2
|
export { FrameworkGrade, FrameworkGroup, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GtaControl, GtaControlGroup, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InitialFetch, InternalEvent, InventoryItem, InventoryItems, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useFrameworkGroups, useItems, useItemsList, useProfanityStore, useSettings } from './utils/index.cjs';
|
|
3
3
|
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, ScriptConfigHistoryChange, ScriptConfigHistoryEntry, ScriptConfigHistoryRequest, ScriptConfigHistoryResponse, ScriptConfigInstance, TornEdgeSVGFilter, ValidationRules, ValidatorFn, createFormStore, createScriptConfig, getScriptConfigInstance, useAudio, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useNuiEvent, useTornEdges } from './hooks/index.cjs';
|
|
4
4
|
export { DirkProvider, DirkProviderProps } from './providers/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, DiscordRole, DiscordRoleSelect, DiscordRoleSelectProps, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, ScenarioSelect, ScenarioSelectProps, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
|
|
1
|
+
export { AccountSelect, AccountSelectProps, AdminPageTitle, AdminPageTitleProps, AnimPostFxSelect, AnimPostFxSelectProps, AsyncSaveButton, BlipColorSelect, BlipColorSelectProps, BlipDisplaySelect, BlipDisplaySelectProps, BlipIconSelect, BlipIconSelectProps, BorderedIcon, BorderedIconProps, ButtonProps, ConfigPanel, ConfigPanelProps, ConfirmModal, ConfirmModalProps, ControlMultiSelect, ControlMultiSelectProps, ControlSelect, ControlSelectProps, Counter, DiscordRole, DiscordRoleSelect, DiscordRoleSelectProps, FiveMControls, FiveMKeyBindInput, FloatingParticles, FloatingParticlesProps, FrameworkAccount, GroupName, GroupNameProps, GroupRank, GroupRankProps, GroupSelect, GroupSelectProps, GroupType, GroupValue, InfoBox, InfoBoxProps, InputContainer, InputContainerProps, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProps, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavItem, NavigationContext, NavigationProvider, NavigationStore, ParticleState, PositionPicker, PositionPickerProps, ProgressProps, Prompt, PromptButton, PromptModal, ScenarioSelect, ScenarioSelectProps, SegmentProps, SegmentedControl, SegmentedControlProps, SegmentedProgress, SelectItem, SelectItemProps, StoreModalProps, SwitchPanel, SwitchPanelProps, TestBed, TestBedItem, TestBedPlacement, TestBedProps, ThemeOverrideSection, ThemeOverrideSectionProps, ThemeOverrideValue, Title, TitleProps, TitleSize, Vector4DeleteButton, Vector4Display, Vector4Value, WorldPositionGotoButton, WorldPositionSetButton, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore } from './components/index.js';
|
|
2
2
|
export { FrameworkGrade, FrameworkGroup, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GtaControl, GtaControlGroup, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InitialFetch, InternalEvent, InventoryItem, InventoryItems, SettingsState, SkillSettings, UploadImageProps, colorWithAlpha, copyToClipboard, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAutoFetcher, useFrameworkGroups, useItems, useItemsList, useProfanityStore, useSettings } from './utils/index.js';
|
|
3
3
|
export { FormProvider, FormState, NuiHandlerSignature, NuiMessageData, ScriptConfigHistoryChange, ScriptConfigHistoryEntry, ScriptConfigHistoryRequest, ScriptConfigHistoryResponse, ScriptConfigInstance, TornEdgeSVGFilter, ValidationRules, ValidatorFn, createFormStore, createScriptConfig, getScriptConfigInstance, useAudio, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useNuiEvent, useTornEdges } from './hooks/index.js';
|
|
4
4
|
export { DirkProvider, DirkProviderProps } from './providers/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1244,11 +1244,11 @@ var colorNames = {
|
|
|
1244
1244
|
Yellow: { r: 255, g: 255, b: 0 },
|
|
1245
1245
|
YellowGreen: { r: 154, g: 205, b: 50 }
|
|
1246
1246
|
};
|
|
1247
|
-
function colorWithAlpha(color,
|
|
1247
|
+
function colorWithAlpha(color, alpha12) {
|
|
1248
1248
|
const lowerCasedColor = color.toLowerCase();
|
|
1249
1249
|
if (colorNames[lowerCasedColor]) {
|
|
1250
1250
|
const rgb = colorNames[lowerCasedColor];
|
|
1251
|
-
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${
|
|
1251
|
+
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha12})`;
|
|
1252
1252
|
}
|
|
1253
1253
|
if (/^#([A-Fa-f0-9]{6})$/.test(color)) {
|
|
1254
1254
|
const hex = color.slice(1);
|
|
@@ -1256,12 +1256,12 @@ function colorWithAlpha(color, alpha11) {
|
|
|
1256
1256
|
const r = bigint >> 16 & 255;
|
|
1257
1257
|
const g = bigint >> 8 & 255;
|
|
1258
1258
|
const b = bigint & 255;
|
|
1259
|
-
return `rgba(${r}, ${g}, ${b}, ${
|
|
1259
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha12})`;
|
|
1260
1260
|
}
|
|
1261
1261
|
if (/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/.test(color)) {
|
|
1262
1262
|
const result = color.match(/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/);
|
|
1263
1263
|
if (result) {
|
|
1264
|
-
return `rgba(${result[1]}, ${result[2]}, ${result[3]}, ${
|
|
1264
|
+
return `rgba(${result[1]}, ${result[2]}, ${result[3]}, ${alpha12})`;
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
1267
|
return color;
|
|
@@ -3694,11 +3694,11 @@ function ConfirmModal({
|
|
|
3694
3694
|
placeholder: confirmText,
|
|
3695
3695
|
value: typed,
|
|
3696
3696
|
onChange: (e) => setTyped(e.currentTarget.value),
|
|
3697
|
-
styles: (
|
|
3697
|
+
styles: (t3) => ({
|
|
3698
3698
|
input: {
|
|
3699
|
-
backgroundColor: alpha(
|
|
3699
|
+
backgroundColor: alpha(t3.colors.dark[7], 0.5),
|
|
3700
3700
|
border: `0.1vh solid ${alpha(
|
|
3701
|
-
typed === confirmText ? "#ef4444" :
|
|
3701
|
+
typed === confirmText ? "#ef4444" : t3.colors.dark[5],
|
|
3702
3702
|
0.5
|
|
3703
3703
|
)}`,
|
|
3704
3704
|
color: "rgba(255,255,255,0.85)",
|
|
@@ -7053,9 +7053,16 @@ function DiscordRoleSelect(props) {
|
|
|
7053
7053
|
{
|
|
7054
7054
|
size: "xs",
|
|
7055
7055
|
variant: "subtle",
|
|
7056
|
-
|
|
7056
|
+
onMouseDown: (e) => {
|
|
7057
|
+
e.stopPropagation();
|
|
7058
|
+
},
|
|
7059
|
+
onClick: (e) => {
|
|
7060
|
+
e.stopPropagation();
|
|
7061
|
+
refresh();
|
|
7062
|
+
},
|
|
7057
7063
|
title: t("Refresh", "Refresh"),
|
|
7058
7064
|
loading,
|
|
7065
|
+
"aria-label": t("Refresh", "Refresh"),
|
|
7059
7066
|
children: /* @__PURE__ */ jsx(RefreshCw, { size: "1.2vh" })
|
|
7060
7067
|
}
|
|
7061
7068
|
);
|
|
@@ -7074,6 +7081,7 @@ function DiscordRoleSelect(props) {
|
|
|
7074
7081
|
clearable: true,
|
|
7075
7082
|
disabled: disabled || loading && !roles,
|
|
7076
7083
|
rightSection: refreshButton,
|
|
7084
|
+
rightSectionPointerEvents: "all",
|
|
7077
7085
|
style,
|
|
7078
7086
|
styles,
|
|
7079
7087
|
nothingFoundMessage: errorCode ? `${t("Error", "Error")} (${errorCode})` : t("NoRoles", "No roles found")
|
|
@@ -7094,12 +7102,163 @@ function DiscordRoleSelect(props) {
|
|
|
7094
7102
|
clearable: true,
|
|
7095
7103
|
disabled: disabled || loading && !roles,
|
|
7096
7104
|
rightSection: refreshButton,
|
|
7105
|
+
rightSectionPointerEvents: "all",
|
|
7097
7106
|
style,
|
|
7098
7107
|
styles,
|
|
7099
7108
|
nothingFoundMessage: errorCode ? `${t("Error", "Error")} (${errorCode})` : t("NoRoles", "No roles found")
|
|
7100
7109
|
}
|
|
7101
7110
|
);
|
|
7102
7111
|
}
|
|
7112
|
+
var t2 = (key, fallback) => {
|
|
7113
|
+
const v = locale(key);
|
|
7114
|
+
return v === key ? fallback : v;
|
|
7115
|
+
};
|
|
7116
|
+
var FRAMEWORK_HINTS = {
|
|
7117
|
+
"es_extended": "from ESX Config.Accounts",
|
|
7118
|
+
"qb-core": "from QBCore Money.MoneyTypes",
|
|
7119
|
+
"qbx_core": "default QBox trio (cash/bank/crypto) \u2014 server may have custom names, add them manually",
|
|
7120
|
+
"nd-framework": "ND_Core only supports cash + bank",
|
|
7121
|
+
"unknown": "no framework detected \u2014 type account names manually"
|
|
7122
|
+
};
|
|
7123
|
+
function AccountOption({ account }) {
|
|
7124
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "0", children: [
|
|
7125
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "rgba(255,255,255,0.9)", ff: "Akrobat Bold", tt: "uppercase", lts: "0.04em", children: account.name }),
|
|
7126
|
+
account.label && /* @__PURE__ */ jsx(Text, { size: "xxs", c: "rgba(255,255,255,0.4)", children: account.label })
|
|
7127
|
+
] });
|
|
7128
|
+
}
|
|
7129
|
+
function FrameworkHint({ framework }) {
|
|
7130
|
+
const theme2 = useMantineTheme();
|
|
7131
|
+
if (!framework) return null;
|
|
7132
|
+
const hintKey = `AccountFrameworkHint_${framework}`;
|
|
7133
|
+
const text = t2(hintKey, FRAMEWORK_HINTS[framework] || FRAMEWORK_HINTS.unknown);
|
|
7134
|
+
return /* @__PURE__ */ jsxs(
|
|
7135
|
+
Flex,
|
|
7136
|
+
{
|
|
7137
|
+
align: "center",
|
|
7138
|
+
gap: "xs",
|
|
7139
|
+
px: "xs",
|
|
7140
|
+
py: "0.3vh",
|
|
7141
|
+
style: {
|
|
7142
|
+
background: alpha(theme2.colors.dark[5], 0.4),
|
|
7143
|
+
border: "0.1vh solid rgba(255,255,255,0.04)",
|
|
7144
|
+
borderRadius: theme2.radius.xs
|
|
7145
|
+
},
|
|
7146
|
+
children: [
|
|
7147
|
+
/* @__PURE__ */ jsx(Text, { size: "xxs", ff: "Akrobat Bold", c: "rgba(255,255,255,0.45)", tt: "uppercase", lts: "0.04em", children: framework }),
|
|
7148
|
+
/* @__PURE__ */ jsx(Text, { size: "xxs", ff: "Akrobat", c: "rgba(255,255,255,0.35)", style: { flex: 1 }, lineClamp: 2, children: text })
|
|
7149
|
+
]
|
|
7150
|
+
}
|
|
7151
|
+
);
|
|
7152
|
+
}
|
|
7153
|
+
function AccountSelect(props) {
|
|
7154
|
+
const { endpoint, label: label2, size = "xs", placeholder, disabled, style, styles, hideFrameworkHint } = props;
|
|
7155
|
+
const [accounts, setAccounts] = useState(null);
|
|
7156
|
+
const [framework, setFramework] = useState(void 0);
|
|
7157
|
+
const [loading, setLoading] = useState(false);
|
|
7158
|
+
const refresh = async () => {
|
|
7159
|
+
setLoading(true);
|
|
7160
|
+
try {
|
|
7161
|
+
const res = await fetchNui(endpoint, {}, {
|
|
7162
|
+
// Browser dev fallback. Shows a recognisable ESX-style list.
|
|
7163
|
+
ok: true,
|
|
7164
|
+
framework: "es_extended",
|
|
7165
|
+
accounts: [
|
|
7166
|
+
{ name: "money", label: "Cash" },
|
|
7167
|
+
{ name: "bank", label: "Bank" },
|
|
7168
|
+
{ name: "black_money", label: "Dirty Money" }
|
|
7169
|
+
]
|
|
7170
|
+
});
|
|
7171
|
+
if (res?.ok) {
|
|
7172
|
+
setAccounts(res.accounts ?? []);
|
|
7173
|
+
setFramework(res.framework);
|
|
7174
|
+
} else {
|
|
7175
|
+
setAccounts([]);
|
|
7176
|
+
setFramework(res?.framework);
|
|
7177
|
+
}
|
|
7178
|
+
} finally {
|
|
7179
|
+
setLoading(false);
|
|
7180
|
+
}
|
|
7181
|
+
};
|
|
7182
|
+
useEffect(() => {
|
|
7183
|
+
refresh();
|
|
7184
|
+
}, [endpoint]);
|
|
7185
|
+
const accountsByName = useMemo(() => {
|
|
7186
|
+
const map = {};
|
|
7187
|
+
for (const a of accounts ?? []) map[a.name] = a;
|
|
7188
|
+
if (props.multi) {
|
|
7189
|
+
for (const n of props.value ?? []) {
|
|
7190
|
+
if (n && !map[n]) map[n] = { name: n };
|
|
7191
|
+
}
|
|
7192
|
+
} else if (props.value && !map[props.value]) {
|
|
7193
|
+
map[props.value] = { name: props.value };
|
|
7194
|
+
}
|
|
7195
|
+
return map;
|
|
7196
|
+
}, [accounts, props.multi, props.multi ? props.value?.join(",") : props.value]);
|
|
7197
|
+
const data = Object.values(accountsByName).map((a) => ({
|
|
7198
|
+
value: a.name,
|
|
7199
|
+
label: a.label ? `${a.name} \u2014 ${a.label}` : a.name
|
|
7200
|
+
}));
|
|
7201
|
+
const renderOption = ({ option }) => {
|
|
7202
|
+
const acc = accountsByName[option.value];
|
|
7203
|
+
return acc ? /* @__PURE__ */ jsx(AccountOption, { account: acc }) : /* @__PURE__ */ jsx(Text, { size: "xs", children: option.label });
|
|
7204
|
+
};
|
|
7205
|
+
const refreshButton = /* @__PURE__ */ jsx(
|
|
7206
|
+
ActionIcon,
|
|
7207
|
+
{
|
|
7208
|
+
size: "xs",
|
|
7209
|
+
variant: "subtle",
|
|
7210
|
+
onMouseDown: (e) => {
|
|
7211
|
+
e.stopPropagation();
|
|
7212
|
+
},
|
|
7213
|
+
onClick: (e) => {
|
|
7214
|
+
e.stopPropagation();
|
|
7215
|
+
refresh();
|
|
7216
|
+
},
|
|
7217
|
+
title: t2("Refresh", "Refresh"),
|
|
7218
|
+
loading,
|
|
7219
|
+
"aria-label": t2("Refresh", "Refresh"),
|
|
7220
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { size: "1.2vh" })
|
|
7221
|
+
}
|
|
7222
|
+
);
|
|
7223
|
+
const sharedSelectProps = {
|
|
7224
|
+
label: label2,
|
|
7225
|
+
size,
|
|
7226
|
+
data,
|
|
7227
|
+
searchable: true,
|
|
7228
|
+
clearable: true,
|
|
7229
|
+
disabled: disabled || loading && !accounts,
|
|
7230
|
+
rightSection: refreshButton,
|
|
7231
|
+
rightSectionPointerEvents: "all",
|
|
7232
|
+
style,
|
|
7233
|
+
nothingFoundMessage: t2("NoAccounts", "No accounts available")
|
|
7234
|
+
};
|
|
7235
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "0.3vh", style, children: [
|
|
7236
|
+
props.multi ? /* @__PURE__ */ jsx(
|
|
7237
|
+
MultiSelect,
|
|
7238
|
+
{
|
|
7239
|
+
...sharedSelectProps,
|
|
7240
|
+
placeholder: placeholder || t2("PickAccounts", "Pick accounts (or type custom)..."),
|
|
7241
|
+
value: props.value || [],
|
|
7242
|
+
onChange: (names) => props.onChange(names),
|
|
7243
|
+
renderOption,
|
|
7244
|
+
searchable: true,
|
|
7245
|
+
hidePickedOptions: true,
|
|
7246
|
+
styles
|
|
7247
|
+
}
|
|
7248
|
+
) : /* @__PURE__ */ jsx(
|
|
7249
|
+
Select,
|
|
7250
|
+
{
|
|
7251
|
+
...sharedSelectProps,
|
|
7252
|
+
placeholder: placeholder || t2("PickAccount", "Pick an account..."),
|
|
7253
|
+
value: props.value || null,
|
|
7254
|
+
onChange: (name) => props.onChange(name),
|
|
7255
|
+
renderOption,
|
|
7256
|
+
styles
|
|
7257
|
+
}
|
|
7258
|
+
),
|
|
7259
|
+
!hideFrameworkHint && /* @__PURE__ */ jsx(FrameworkHint, { framework })
|
|
7260
|
+
] });
|
|
7261
|
+
}
|
|
7103
7262
|
function useTornEdges() {
|
|
7104
7263
|
const game = useSettings((state) => state.game);
|
|
7105
7264
|
return game === "rdr3" ? "torn-edge-wrapper" : "";
|
|
@@ -7460,6 +7619,6 @@ var Vector4Schema = z.object({
|
|
|
7460
7619
|
w: z.number()
|
|
7461
7620
|
});
|
|
7462
7621
|
|
|
7463
|
-
export { AdminPageTitle, AnimPostFxSelect, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, ControlMultiSelect, ControlSelect, Counter, DirkProvider, DiscordRoleSelect, FiveMKeyBindInput, FloatingParticles, FormProvider, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GroupName, GroupRank, GroupSelect, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InfoBox, InputContainer, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, ScenarioSelect, SegmentedControl, SegmentedProgress, SelectItem, SwitchPanel, TestBed, ThemeOverrideSection, Title, TornEdgeSVGFilter, Vector2Schema, Vector3Schema, Vector4DeleteButton, Vector4Display, Vector4Schema, WorldPositionGotoButton, WorldPositionSetButton, colorWithAlpha, copyToClipboard, createFormStore, createScriptConfig, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, getScriptConfigInstance, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAudio, useAutoFetcher, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useFrameworkGroups, useItems, useItemsList, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
|
|
7622
|
+
export { AccountSelect, AdminPageTitle, AnimPostFxSelect, AsyncSaveButton, BlipColorSelect, BlipDisplaySelect, BlipIconSelect, BorderedIcon, ConfigPanel, ConfirmModal, ControlMultiSelect, ControlSelect, Counter, DirkProvider, DiscordRoleSelect, FiveMKeyBindInput, FloatingParticles, FormProvider, GTA_CONTROLS, GTA_CONTROL_GROUP_ORDER, GroupName, GroupRank, GroupSelect, INPUT_MAPPER_KEYS_BY_PRIMARY, INPUT_MAPPER_PRIMARY_OPTIONS, InfoBox, InputContainer, LevelBanner, LevelPanel, MissingItemsBanner, Modal, ModalContext, ModalProvider, MotionFlex, MotionIcon, MotionImage, MotionText, NavBar, NavigationContext, NavigationProvider, PositionPicker, PromptModal, ScenarioSelect, SegmentedControl, SegmentedProgress, SelectItem, SwitchPanel, TestBed, ThemeOverrideSection, Title, TornEdgeSVGFilter, Vector2Schema, Vector3Schema, Vector4DeleteButton, Vector4Display, Vector4Schema, WorldPositionGotoButton, WorldPositionSetButton, colorWithAlpha, copyToClipboard, createFormStore, createScriptConfig, createSkill, extractDefaults, fetchLuaTable, fetchNui, formatGtaControl, gameToMap, getGtaControl, getImageShape, getItemImageUrl, getScriptConfigInstance, initialFetches, internalEvent, isEnvBrowser, isProfanity, latPr100, locale, localeStore, mapCenter, mapToGame, noop, numberToRoman, openLink, registerInitialFetch, registerInitialLuaTableFetch, runFetches, selectAllGroups, splitFAString, updatePresignedURL, uploadImage, useAudio, useAutoFetcher, useForm, useFormActions, useFormError, useFormErrors, useFormField, useFormFields, useFrameworkGroups, useItems, useItemsList, useMissingItemsAudit, useModal, useModalActions, useNavigation, useNavigationStore, useNuiEvent, useProfanityStore, useSettings, useTornEdges };
|
|
7464
7623
|
//# sourceMappingURL=index.js.map
|
|
7465
7624
|
//# sourceMappingURL=index.js.map
|