react-toolkits 2.24.17 → 2.24.19
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/CHANGELOG.md +12 -0
- package/lib/chunk-7X2LW6EY.js +73 -0
- package/lib/chunk-7X2LW6EY.js.map +1 -0
- package/lib/chunk-D75NVCYN.js +2 -0
- package/lib/chunk-D75NVCYN.js.map +1 -0
- package/lib/chunk-DLTAWT6S.js +2 -0
- package/lib/chunk-DLTAWT6S.js.map +1 -0
- package/lib/chunk-E6L6VKSV.js +227 -0
- package/lib/chunk-E6L6VKSV.js.map +1 -0
- package/lib/chunk-ESCBNFWD.js +498 -0
- package/lib/chunk-ESCBNFWD.js.map +1 -0
- package/lib/chunk-FSXYUF4U.js +276 -0
- package/lib/chunk-FSXYUF4U.js.map +1 -0
- package/lib/chunk-H5Y4DYUL.js +2 -0
- package/lib/chunk-H5Y4DYUL.js.map +1 -0
- package/lib/chunk-LXMQLSQY.js +46 -0
- package/lib/chunk-LXMQLSQY.js.map +1 -0
- package/lib/chunk-MTRFNFEM.js +2 -0
- package/lib/chunk-MTRFNFEM.js.map +1 -0
- package/lib/chunk-NNXVZIY2.js +2 -0
- package/lib/chunk-NNXVZIY2.js.map +1 -0
- package/lib/chunk-OH74GXG4.js +570 -0
- package/lib/chunk-OH74GXG4.js.map +1 -0
- package/lib/chunk-P25BHLH3.js +3 -0
- package/lib/chunk-P25BHLH3.js.map +1 -0
- package/lib/chunk-QACSRYJY.js +147 -0
- package/lib/chunk-QACSRYJY.js.map +1 -0
- package/lib/chunk-ST7VUWJ4.js +2 -0
- package/lib/chunk-ST7VUWJ4.js.map +1 -0
- package/lib/chunk-UPO7NB6O.js +2 -0
- package/lib/chunk-UPO7NB6O.js.map +1 -0
- package/lib/chunk-Z6PDWY44.js +17 -0
- package/lib/chunk-Z6PDWY44.js.map +1 -0
- package/lib/chunk-ZF7POJAA.js +2 -0
- package/lib/chunk-ZF7POJAA.js.map +1 -0
- package/lib/chunk-ZOHMJAAX.js +120 -0
- package/lib/chunk-ZOHMJAAX.js.map +1 -0
- package/lib/createMenuItem-CICLQWU6.js +86 -0
- package/lib/createMenuItem-CICLQWU6.js.map +1 -0
- package/lib/createMenuItem-SXFYDNCW.js +2 -0
- package/lib/createMenuItem-SXFYDNCW.js.map +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +16 -11
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/menuItemList-EHQSS4YZ.js +132 -0
- package/lib/{menuItemList-VPYVIEYR.js.map → menuItemList-EHQSS4YZ.js.map} +1 -1
- package/lib/menuItemList-NIBRDRTA.js +2 -0
- package/lib/menuItemList-NIBRDRTA.js.map +1 -0
- package/lib/{roleDetail-EYQ2HREL.js → roleDetail-7HEBW7IS.js} +2 -2
- package/lib/roleDetail-7HEBW7IS.js.map +1 -0
- package/lib/roleDetail-JCDOXKAM.js +72 -0
- package/lib/roleDetail-JCDOXKAM.js.map +1 -0
- package/lib/roleList-4C77ULPK.js +161 -0
- package/lib/roleList-4C77ULPK.js.map +1 -0
- package/lib/roleList-WGLD3HXB.js +2 -0
- package/lib/roleList-WGLD3HXB.js.map +1 -0
- package/lib/updateMenuItem-K62CKVXP.js +109 -0
- package/lib/updateMenuItem-K62CKVXP.js.map +1 -0
- package/lib/updateMenuItem-TECCUD6Z.js +2 -0
- package/lib/updateMenuItem-TECCUD6Z.js.map +1 -0
- package/lib/userDetail-WGQJ7IC5.js +2 -0
- package/lib/userDetail-WGQJ7IC5.js.map +1 -0
- package/lib/userDetail-WYN52ZJ2.js +116 -0
- package/lib/userDetail-WYN52ZJ2.js.map +1 -0
- package/lib/{userList-AFTI4FQV.js → userList-2S2FRAG6.js} +2 -2
- package/lib/userList-2S2FRAG6.js.map +1 -0
- package/lib/userList-AMVG7RCE.js +195 -0
- package/lib/userList-AMVG7RCE.js.map +1 -0
- package/locale/context.js +7 -1
- package/locale/context.js.map +1 -1
- package/locale/en_GB.js +94 -1
- package/locale/en_GB.js.map +1 -1
- package/locale/hooks.js +18 -1
- package/locale/hooks.js.map +1 -1
- package/locale/index.d.ts +1 -1
- package/locale/index.js +2 -1
- package/locale/ja_JP.js +94 -1
- package/locale/ja_JP.js.map +1 -1
- package/locale/ko_KR.js +94 -1
- package/locale/ko_KR.js.map +1 -1
- package/locale/zh_CN.js +94 -1
- package/locale/zh_CN.js.map +1 -1
- package/package.json +10 -10
- package/lib/chunk-2OEQYX3O.js +0 -2
- package/lib/chunk-2OEQYX3O.js.map +0 -1
- package/lib/chunk-47QCX44D.js +0 -2
- package/lib/chunk-47QCX44D.js.map +0 -1
- package/lib/chunk-4EBAPE4B.js +0 -2
- package/lib/chunk-4EBAPE4B.js.map +0 -1
- package/lib/chunk-4XO7JAVX.js +0 -2
- package/lib/chunk-4XO7JAVX.js.map +0 -1
- package/lib/chunk-RMU775LC.js +0 -2
- package/lib/chunk-RMU775LC.js.map +0 -1
- package/lib/chunk-RPEFI7RP.js +0 -3
- package/lib/chunk-RPEFI7RP.js.map +0 -1
- package/lib/chunk-WOYFKIRH.js +0 -2
- package/lib/chunk-WOYFKIRH.js.map +0 -1
- package/lib/chunk-Y3RYS76E.js +0 -2
- package/lib/chunk-Y3RYS76E.js.map +0 -1
- package/lib/chunk-ZFIKMQD3.js +0 -2
- package/lib/chunk-ZFIKMQD3.js.map +0 -1
- package/lib/createMenuItem-SETFJ7U7.js +0 -2
- package/lib/createMenuItem-SETFJ7U7.js.map +0 -1
- package/lib/menuItemList-VPYVIEYR.js +0 -2
- package/lib/roleDetail-EYQ2HREL.js.map +0 -1
- package/lib/roleList-ZW4RLM25.js +0 -2
- package/lib/roleList-ZW4RLM25.js.map +0 -1
- package/lib/updateMenuItem-2ZS3SMYT.js +0 -2
- package/lib/updateMenuItem-2ZS3SMYT.js.map +0 -1
- package/lib/userDetail-5NE5PUBC.js +0 -2
- package/lib/userDetail-5NE5PUBC.js.map +0 -1
- package/lib/userList-AFTI4FQV.js.map +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { useTranslation } from './chunk-Z6PDWY44.js';
|
|
2
|
+
import { useAuth } from './chunk-7X2LW6EY.js';
|
|
3
|
+
import { createVisibilityStore, __name, generateId } from './chunk-OH74GXG4.js';
|
|
4
|
+
import { Modal, Form, Button, Tooltip } from 'antd';
|
|
5
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
import { useMemo, useEffect, useState, useCallback } from 'react';
|
|
7
|
+
|
|
8
|
+
var AuthButton = /* @__PURE__ */ __name((props) => {
|
|
9
|
+
const { children, code, showLoading, disabled, config, ...restProps } = props;
|
|
10
|
+
const codes = code ? Array.isArray(code) ? code : [code] : [];
|
|
11
|
+
const { data, isLoading } = useAuth(codes, config);
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const hasPermission = data && (typeof data === "boolean" || Object.values(data).some(Boolean));
|
|
14
|
+
const isButtonDisabled = disabled || !hasPermission || isLoading && !showLoading;
|
|
15
|
+
const isButtonLoading = isLoading && showLoading;
|
|
16
|
+
const shouldShowTooltip = isButtonDisabled;
|
|
17
|
+
const buttonNode = /* @__PURE__ */ jsx(Button, { disabled: isButtonDisabled, loading: isButtonLoading, ...restProps, children });
|
|
18
|
+
if (shouldShowTooltip) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Tooltip, { defaultOpen: false, title: t("global.noEntitlement"), children: buttonNode });
|
|
20
|
+
}
|
|
21
|
+
return buttonNode;
|
|
22
|
+
}, "AuthButton");
|
|
23
|
+
var AuthButton_default = AuthButton;
|
|
24
|
+
|
|
25
|
+
// src/hooks/modal/stores.ts
|
|
26
|
+
var useModalStore = createVisibilityStore();
|
|
27
|
+
function useModal(props) {
|
|
28
|
+
const { content, onConfirm, afterOpen, afterClose, ...modalProps } = props;
|
|
29
|
+
const _id = useMemo(() => generateId(), []);
|
|
30
|
+
const { show, hide, isOpen, cleanup } = useModalStore();
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
return () => {
|
|
33
|
+
cleanup(_id);
|
|
34
|
+
};
|
|
35
|
+
}, [_id, cleanup]);
|
|
36
|
+
const open = isOpen(_id);
|
|
37
|
+
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
38
|
+
const isRenderFunction = typeof content === "function";
|
|
39
|
+
const _show = useCallback(async () => {
|
|
40
|
+
show(_id);
|
|
41
|
+
await afterOpen?.();
|
|
42
|
+
}, [_id, show, afterOpen]);
|
|
43
|
+
const _hide = useCallback(() => {
|
|
44
|
+
hide(_id);
|
|
45
|
+
}, [_id, hide]);
|
|
46
|
+
const onCancel = useCallback(async () => {
|
|
47
|
+
_hide();
|
|
48
|
+
await afterClose?.();
|
|
49
|
+
}, [_hide, afterClose]);
|
|
50
|
+
const onOk = useCallback(async () => {
|
|
51
|
+
try {
|
|
52
|
+
setConfirmLoading(true);
|
|
53
|
+
await onConfirm?.();
|
|
54
|
+
_hide();
|
|
55
|
+
await afterClose?.();
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error("Modal confirm error:", error);
|
|
58
|
+
throw error;
|
|
59
|
+
} finally {
|
|
60
|
+
setConfirmLoading(false);
|
|
61
|
+
}
|
|
62
|
+
}, [onConfirm, _hide, afterClose]);
|
|
63
|
+
const internalModal = /* @__PURE__ */ jsx(Modal, { ...modalProps, open, confirmLoading, onOk, onCancel, children: isRenderFunction ? /* @__PURE__ */ jsx(Fragment, { children: content({ hide: _hide }) }) : /* @__PURE__ */ jsx(Fragment, { children: content }) });
|
|
64
|
+
return {
|
|
65
|
+
id: _id,
|
|
66
|
+
show: _show,
|
|
67
|
+
hide: _hide,
|
|
68
|
+
modal: internalModal
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
__name(useModal, "useModal");
|
|
72
|
+
function useFormModal(props) {
|
|
73
|
+
const { content, form, formProps, onConfirm, onSuccess, afterClose, ...modalProps } = props;
|
|
74
|
+
const [internalExtraValues, setInternalExtraValues] = useState({});
|
|
75
|
+
const [internalForm] = Form.useForm(form);
|
|
76
|
+
const isRenderFunction = typeof content === "function";
|
|
77
|
+
const { id, show, hide, modal } = useModal({
|
|
78
|
+
...modalProps,
|
|
79
|
+
content: /* @__PURE__ */ __name((operation) => /* @__PURE__ */ jsx(Form, { ...formProps, form: internalForm, children: isRenderFunction ? /* @__PURE__ */ jsx(Fragment, { children: content(internalExtraValues, operation) }) : /* @__PURE__ */ jsx(Fragment, { children: content }) }), "content"),
|
|
80
|
+
onConfirm: /* @__PURE__ */ __name(async () => {
|
|
81
|
+
try {
|
|
82
|
+
const values = await internalForm.validateFields();
|
|
83
|
+
await onConfirm?.(values, internalExtraValues);
|
|
84
|
+
onSuccess?.();
|
|
85
|
+
hide();
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error("Form validation or submission error:", error);
|
|
88
|
+
throw error;
|
|
89
|
+
}
|
|
90
|
+
}, "onConfirm"),
|
|
91
|
+
afterClose: /* @__PURE__ */ __name(() => {
|
|
92
|
+
setInternalExtraValues({});
|
|
93
|
+
afterClose?.(internalForm);
|
|
94
|
+
}, "afterClose")
|
|
95
|
+
});
|
|
96
|
+
const showForm = useCallback(
|
|
97
|
+
(options) => {
|
|
98
|
+
const { initialValues, extraValues } = options || {};
|
|
99
|
+
if (extraValues !== void 0) {
|
|
100
|
+
setInternalExtraValues(extraValues);
|
|
101
|
+
}
|
|
102
|
+
if (initialValues) {
|
|
103
|
+
internalForm.setFieldsValue(initialValues);
|
|
104
|
+
}
|
|
105
|
+
show();
|
|
106
|
+
},
|
|
107
|
+
[internalForm, show]
|
|
108
|
+
);
|
|
109
|
+
return {
|
|
110
|
+
id,
|
|
111
|
+
show: showForm,
|
|
112
|
+
hide,
|
|
113
|
+
modal
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
__name(useFormModal, "useFormModal");
|
|
117
|
+
|
|
118
|
+
export { AuthButton_default, useFormModal, useModal, useModalStore };
|
|
119
|
+
//# sourceMappingURL=chunk-ZOHMJAAX.js.map
|
|
120
|
+
//# sourceMappingURL=chunk-ZOHMJAAX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/authButton/AuthButton.tsx","../src/hooks/modal/stores.ts","../src/hooks/modal/modal.tsx","../src/hooks/modal/formModal.tsx"],"names":["jsx","useState","Fragment","useCallback"],"mappings":";;;;;;;AAwBA,IAAM,6BAAqD,MAAA,CAAA,CAAA,KAAA,KAAS;AAClE,EAAA,MAAM,EAAE,UAAU,IAAA,EAAM,WAAA,EAAa,UAAU,MAAA,EAAQ,GAAG,WAAU,GAAI,KAAA;AACxE,EAAA,MAAM,KAAA,GAAQ,IAAA,GAAQ,KAAA,CAAM,OAAA,CAAQ,IAAI,IAAI,IAAA,GAAO,CAAC,IAAI,CAAA,GAAK,EAAC;AAC9D,EAAA,MAAM,EAAE,IAAA,EAAM,SAAA,EAAU,GAAI,OAAA,CAAQ,OAAO,MAAM,CAAA;AACjD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAG7B,EAAA,MAAM,aAAA,GAAgB,IAAA,KAAS,OAAO,IAAA,KAAS,SAAA,IAAa,OAAO,MAAA,CAAO,IAAI,CAAA,CAAE,IAAA,CAAK,OAAO,CAAA,CAAA;AAG5F,EAAA,MAAM,gBAAA,GAAmB,QAAA,IAAY,CAAC,aAAA,IAAkB,aAAa,CAAC,WAAA;AACtE,EAAA,MAAM,kBAAkB,SAAA,IAAa,WAAA;AAGrC,EAAA,MAAM,iBAAA,GAAoB,gBAAA;AAE1B,EAAA,MAAM,UAAA,uBACH,MAAA,EAAA,EAAO,QAAA,EAAU,kBAAkB,OAAA,EAAS,eAAA,EAAkB,GAAG,SAAA,EAC/D,QAAA,EACH,CAAA;AAGF,EAAA,IAAI,iBAAA,EAAmB;AACrB,IAAA,uBACE,GAAA,CAAC,WAAQ,WAAA,EAAa,KAAA,EAAO,OAAO,CAAA,CAAE,sBAAsB,GACzD,QAAA,EAAA,UAAA,EACH,CAAA;AAAA,EAEJ;AAEA,EAAA,OAAO,U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,EAAW;AAC7B,QAAA,sBAAA,CAAuB,WAAW,CAAA;AAAA,MACpC;AAEA,MAAA,IAAI,aAAA,EAAe;AACjB,QAAA,YAAA,CAAa,eAAe,aAAa,CAAA;AAAA,MAC3C;AAEA,MAAA,IAAA,EAAK;AAAA,IACP,CAAA;AAAA,IACA,CAAC,cAAc,IAAI;AAAA,GACrB;AAEA,EAAA,OAAO;AAAA,IACL,EAAA;AAAA,IACA,IAAA,EAAM,QAAA;AAAA,IACN,IAAA;AAAA,IACA;AAAA,GACF;AACF;AAxDgB,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA","file":"chunk-ZOHMJAAX.js","sourcesContent":["import type { ButtonProps } from 'antd'\nimport { Button, Tooltip } from 'antd'\nimport type { Options as KyOptions } from 'ky'\nimport type { FC, PropsWithChildren } from 'react'\n\nimport { useTranslation } from '@/locale'\nimport { useAuth } from '@/services'\n\nexport interface AuthButtonProps extends ButtonProps {\n /** 权限码,支持单个或多个 */\n code?: string | string[]\n /** 加载时是否显示 loading 状态 */\n showLoading?: boolean\n /** 请求配置 */\n config?: KyOptions\n}\n\n/**\n * 授权按钮组件\n * 根据权限码自动控制按钮的启用/禁用状态\n * - 有权限:正常显示可点击按钮\n * - 无权限:显示禁用按钮并带有提示\n * - 加载中:显示加载状态\n */\nconst AuthButton: FC<PropsWithChildren<AuthButtonProps>> = props => {\n const { children, code, showLoading, disabled, config, ...restProps } = props\n const codes = code ? (Array.isArray(code) ? code : [code]) : []\n const { data, isLoading } = useAuth(codes, config)\n const { t } = useTranslation()\n\n // 判断是否有权限\n const hasPermission = data && (typeof data === 'boolean' || Object.values(data).some(Boolean))\n\n // 计算最终的禁用状态和加载状态\n const isButtonDisabled = disabled || !hasPermission || (isLoading && !showLoading)\n const isButtonLoading = isLoading && showLoading\n\n // 判断是否需要显示 tooltip(任何禁用状态都显示)\n const shouldShowTooltip = isButtonDisabled\n\n const buttonNode = (\n <Button disabled={isButtonDisabled} loading={isButtonLoading} {...restProps}>\n {children}\n </Button>\n )\n\n if (shouldShowTooltip) {\n return (\n <Tooltip defaultOpen={false} title={t('global.noEntitlement')}>\n {buttonNode}\n </Tooltip>\n )\n }\n\n return buttonNode\n}\n\nexport default AuthButton\n","import { createVisibilityStore } from '@/utils'\n\nexport const useModalStore = createVisibilityStore()\n","import type { ModalProps } from 'antd'\nimport { Modal } from 'antd'\nimport { type ReactNode, useCallback, useEffect, useMemo, useState } from 'react'\n\nimport { generateId } from '@/utils'\n\nimport { useModalStore } from './stores'\n\nexport interface UseModalOperation {\n hide: () => void\n}\n\nexport interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {\n content?: ReactNode | ((operation: UseModalOperation) => ReactNode)\n onConfirm?: () => void | Promise<void>\n afterOpen?: () => void | Promise<void>\n afterClose?: () => void | Promise<void>\n}\n\nexport function useModal(props: UseModalProps) {\n const { content, onConfirm, afterOpen, afterClose, ...modalProps } = props\n\n const _id = useMemo(() => generateId(), [])\n const { show, hide, isOpen, cleanup } = useModalStore()\n\n // 组件销毁时清理 ID\n useEffect(() => {\n return () => {\n cleanup(_id)\n }\n }, [_id, cleanup])\n\n const open = isOpen(_id)\n const [confirmLoading, setConfirmLoading] = useState(false)\n const isRenderFunction = typeof content === 'function'\n\n const _show = useCallback(async () => {\n show(_id)\n await afterOpen?.()\n }, [_id, show, afterOpen])\n\n const _hide = useCallback(() => {\n hide(_id)\n }, [_id, hide])\n\n const onCancel: ModalProps['onCancel'] = useCallback(async () => {\n _hide()\n await afterClose?.()\n }, [_hide, afterClose])\n\n const onOk = useCallback(async () => {\n try {\n setConfirmLoading(true)\n await onConfirm?.()\n _hide()\n await afterClose?.()\n } catch (error) {\n console.error('Modal confirm error:', error)\n throw error\n } finally {\n setConfirmLoading(false)\n }\n }, [onConfirm, _hide, afterClose])\n\n const internalModal = (\n <Modal {...modalProps} open={open} confirmLoading={confirmLoading} onOk={onOk} onCancel={onCancel}>\n {isRenderFunction ? <>{content({ hide: _hide })}</> : <>{content}</>}\n </Modal>\n )\n\n return {\n id: _id,\n show: _show,\n hide: _hide,\n modal: internalModal,\n }\n}\n","import type { FormInstance, FormProps } from 'antd'\nimport { Form } from 'antd'\nimport type { AnyObject } from 'antd/es/_util/type'\nimport type { ReactNode } from 'react'\nimport { useCallback, useState } from 'react'\n\nimport type { RecursivePartial } from '@/types'\n\nimport { useModal, type UseModalOperation, type UseModalProps } from './modal'\n\nexport interface ShowFormOptions<Values extends AnyObject, ExtraValues> {\n initialValues?: RecursivePartial<Values>\n extraValues?: ExtraValues\n}\n\nexport interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues = Record<string, unknown>>\n extends Omit<UseModalProps, 'onConfirm' | 'content' | 'onShow' | 'afterClose'> {\n formProps?: Omit<FormProps, 'form'>\n form?: FormInstance<Values>\n content?: ReactNode | ((extraValues: ExtraValues, operation: UseModalOperation) => ReactNode)\n onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>\n onSuccess?: () => void\n afterClose?: (form: FormInstance<Values>) => void\n}\n\nexport interface UseFormModalReturn<Values extends AnyObject, ExtraValues> {\n id: number\n show: (options?: ShowFormOptions<Values, ExtraValues>) => void\n hide: () => void\n modal: ReactNode\n}\n\nexport function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = Record<string, unknown>>(\n props: UseFormModalProps<Values, ExtraValues>,\n): UseFormModalReturn<Values, ExtraValues> {\n const { content, form, formProps, onConfirm, onSuccess, afterClose, ...modalProps } = props\n const [internalExtraValues, setInternalExtraValues] = useState<ExtraValues>({} as ExtraValues)\n const [internalForm] = Form.useForm<Values>(form)\n\n const isRenderFunction = typeof content === 'function'\n\n const { id, show, hide, modal } = useModal({\n ...modalProps,\n content: operation => (\n <Form {...formProps} form={internalForm}>\n {isRenderFunction ? <>{content(internalExtraValues, operation)}</> : <>{content}</>}\n </Form>\n ),\n onConfirm: async () => {\n try {\n const values = await internalForm.validateFields()\n await onConfirm?.(values, internalExtraValues)\n onSuccess?.()\n hide()\n } catch (error) {\n console.error('Form validation or submission error:', error)\n throw error\n }\n },\n afterClose: () => {\n setInternalExtraValues({} as ExtraValues)\n afterClose?.(internalForm)\n },\n })\n\n const showForm = useCallback(\n (options?: ShowFormOptions<Values, ExtraValues>) => {\n const { initialValues, extraValues } = options || {}\n\n if (extraValues !== undefined) {\n setInternalExtraValues(extraValues)\n }\n\n if (initialValues) {\n internalForm.setFieldsValue(initialValues)\n }\n\n show()\n },\n [internalForm, show],\n )\n\n return {\n id,\n show: showForm,\n hide,\n modal,\n }\n}\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { useCreateMenu } from './chunk-LXMQLSQY.js';
|
|
2
|
+
import { withContext, __name, FRONTEND_ROUTE_PREFIX } from './chunk-OH74GXG4.js';
|
|
3
|
+
import { Editor } from '@monaco-editor/react';
|
|
4
|
+
import { App, Form, Card, Input, Switch, InputNumber, Button } from 'antd';
|
|
5
|
+
import { useNavigate } from 'react-router-dom';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var CreateMenuItem = withContext(
|
|
9
|
+
() => {
|
|
10
|
+
const { message } = App.useApp();
|
|
11
|
+
const [form] = Form.useForm();
|
|
12
|
+
const navigate = useNavigate();
|
|
13
|
+
const { mutateAsync: createMenu } = useCreateMenu();
|
|
14
|
+
const onFinish = /* @__PURE__ */ __name(async (values) => {
|
|
15
|
+
const { permissions, front_route, ...rest } = values;
|
|
16
|
+
await createMenu({
|
|
17
|
+
...rest,
|
|
18
|
+
front_route: FRONTEND_ROUTE_PREFIX + front_route,
|
|
19
|
+
permissions: permissions ? JSON.parse(permissions) : void 0
|
|
20
|
+
});
|
|
21
|
+
message.success("\u521B\u5EFA\u6210\u529F", 0.8, () => navigate("..", { relative: "route" }));
|
|
22
|
+
}, "onFinish");
|
|
23
|
+
return /* @__PURE__ */ jsx(Card, { title: "\u521B\u5EFA\u83DC\u5355\u9879", children: /* @__PURE__ */ jsxs(
|
|
24
|
+
Form,
|
|
25
|
+
{
|
|
26
|
+
scrollToFirstError: true,
|
|
27
|
+
form,
|
|
28
|
+
labelCol: { flex: "120px" },
|
|
29
|
+
initialValues: { is_common: false, is_model: false, order: 0 },
|
|
30
|
+
onFinish,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "\u83DC\u5355\u9879\u540D\u79F0", name: "category", rules: [{ required: true }], children: /* @__PURE__ */ jsx(Input, {}) }),
|
|
33
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "\u524D\u7AEF\u8DEF\u7531", name: "front_route", rules: [{ required: true }], children: /* @__PURE__ */ jsx(Input, { prefix: FRONTEND_ROUTE_PREFIX }) }),
|
|
34
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "\u6A21\u677F\u540D\u79F0", name: "model_name", rules: [{ required: true }], children: /* @__PURE__ */ jsx(Input, {}) }),
|
|
35
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "Is Common", name: "is_common", rules: [{ required: true }], valuePropName: "checked", children: /* @__PURE__ */ jsx(Switch, {}) }),
|
|
36
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "Order", name: "order", children: /* @__PURE__ */ jsx(InputNumber, { className: "w-full" }) }),
|
|
37
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "\u63A5\u53E3\u89C4\u5219", name: "permissions", children: /* @__PURE__ */ jsx(
|
|
38
|
+
Editor,
|
|
39
|
+
{
|
|
40
|
+
theme: "vs-dark",
|
|
41
|
+
height: "300px",
|
|
42
|
+
language: "json",
|
|
43
|
+
options: {
|
|
44
|
+
minimap: {
|
|
45
|
+
enabled: false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
) }),
|
|
50
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "Schema", name: "scheme", rules: [{ required: true }], children: /* @__PURE__ */ jsx(
|
|
51
|
+
Editor,
|
|
52
|
+
{
|
|
53
|
+
theme: "vs-dark",
|
|
54
|
+
height: "600px",
|
|
55
|
+
language: "json",
|
|
56
|
+
options: {
|
|
57
|
+
minimap: {
|
|
58
|
+
enabled: false
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
) }),
|
|
63
|
+
/* @__PURE__ */ jsx(Form.Item, { label: "Ext", name: "ext", children: /* @__PURE__ */ jsx(Input.TextArea, { rows: 5 }) }),
|
|
64
|
+
/* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center gap-8", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Button, { type: "primary", htmlType: "submit", children: "\u63D0\u4EA4" }),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
Button,
|
|
68
|
+
{
|
|
69
|
+
onClick: () => {
|
|
70
|
+
navigate("..", { relative: "path" });
|
|
71
|
+
},
|
|
72
|
+
children: "\u53D6\u6D88"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }) })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
) });
|
|
79
|
+
},
|
|
80
|
+
{ isGlobal: true }
|
|
81
|
+
);
|
|
82
|
+
var createMenuItem_default = CreateMenuItem;
|
|
83
|
+
|
|
84
|
+
export { createMenuItem_default as default };
|
|
85
|
+
//# sourceMappingURL=createMenuItem-CICLQWU6.js.map
|
|
86
|
+
//# sourceMappingURL=createMenuItem-CICLQWU6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/modules/menu/pages/createMenuItem/index.tsx"],"names":[],"mappings":";;;;;;;AAYA,IAAM,cAAA,GAAiB,WAAA;AAAA,EACrB,MAAM;AACJ,IAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,GAAA,CAAI,MAAA,EAAO;AAC/B,IAAA,MAAM,CAAC,IAAI,CAAA,GAAI,IAAA,CAAK,OAAA,EAAoB;AACxC,IAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,IAAA,MAAM,EA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cACP,QAAA,EAAS,MAAA;AAAA,cACT,OAAA,EAAS;AAAA,gBACP,OAAA,EAAS;AAAA,kBACP,OAAA,EAAS;AAAA;AACX;AACF;AAAA,WACF,EACF,CAAA;AAAA,0BACA,GAAA,CAAC,IAAA,CAAK,IAAA,EAAL,EAAU,OAAM,KAAA,EAAM,IAAA,EAAK,KAAA,EAC1B,QAAA,kBAAA,GAAA,CAAC,KAAA,CAAM,QAAA,EAAN,EAAe,IAAA,EAAM,GAAG,CAAA,EAC3B,CAAA;AAAA,8BACC,IAAA,CAAK,IAAA,EAAL,EACC,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,2BAAA,EACb,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,MAAA,EAAA,EAAO,IAAA,EAAK,SAAA,EAAU,QAAA,EAAS,UAAS,QAAA,EAAA,cAAA,EAEzC,CAAA;AAAA,4BACA,GAAA;AAAA,cAAC,MAAA;AAAA,cAAA;AAAA,gBACC,SAAS,MAAM;AACb,kBAAA,QAAA,CAAS,IAAA,EAAM,EAAE,QAAA,EAAU,MAAA,EAAQ,CAAA;AAAA,gBACrC,CAAA;AAAA,gBACD,QAAA,EAAA;AAAA;AAAA;AAED,WAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,KACF,EACF,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA,EAAE,UAAU,IAAA;AACd,CAAA;AAEA,IAAO,sBAAA,GAAQ","file":"createMenuItem-CICLQWU6.js","sourcesContent":["import { Editor } from '@monaco-editor/react'\nimport { App, Button, Card, Form, Input, InputNumber, Switch } from 'antd'\nimport { useNavigate } from 'react-router-dom'\n\nimport { withContext } from '@/components/toolkitsProvider'\nimport { FRONTEND_ROUTE_PREFIX } from '@/constants'\nimport type { MenuListItem } from '@/types'\n\nimport { useCreateMenu } from '../../services'\n\ntype FormSchema = Omit<MenuListItem, 'id' | 'permissions'> & { permissions: string }\n\nconst CreateMenuItem = withContext(\n () => {\n const { message } = App.useApp()\n const [form] = Form.useForm<FormSchema>()\n const navigate = useNavigate()\n const { mutateAsync: createMenu } = useCreateMenu()\n\n const onFinish = async (values: FormSchema) => {\n const { permissions, front_route, ...rest } = values\n await createMenu({\n ...rest,\n front_route: FRONTEND_ROUTE_PREFIX + front_route,\n permissions: permissions ? JSON.parse(permissions) : undefined,\n })\n message.success('创建成功', 0.8, () => navigate('..', { relative: 'route' }))\n }\n\n return (\n <Card title=\"创建菜单项\">\n <Form\n scrollToFirstError\n form={form}\n labelCol={{ flex: '120px' }}\n initialValues={{ is_common: false, is_model: false, order: 0 }}\n onFinish={onFinish}\n >\n <Form.Item label=\"菜单项名称\" name=\"category\" rules={[{ required: true }]}>\n <Input />\n </Form.Item>\n <Form.Item label=\"前端路由\" name=\"front_route\" rules={[{ required: true }]}>\n <Input prefix={FRONTEND_ROUTE_PREFIX} />\n </Form.Item>\n <Form.Item label=\"模板名称\" name=\"model_name\" rules={[{ required: true }]}>\n <Input />\n </Form.Item>\n <Form.Item label=\"Is Common\" name=\"is_common\" rules={[{ required: true }]} valuePropName=\"checked\">\n <Switch />\n </Form.Item>\n <Form.Item label=\"Order\" name=\"order\">\n <InputNumber className=\"w-full\" />\n </Form.Item>\n <Form.Item label=\"接口规则\" name=\"permissions\">\n <Editor\n theme=\"vs-dark\"\n height=\"300px\"\n language=\"json\"\n options={{\n minimap: {\n enabled: false,\n },\n }}\n />\n </Form.Item>\n <Form.Item label=\"Schema\" name=\"scheme\" rules={[{ required: true }]}>\n <Editor\n theme=\"vs-dark\"\n height=\"600px\"\n language=\"json\"\n options={{\n minimap: {\n enabled: false,\n },\n }}\n />\n </Form.Item>\n <Form.Item label=\"Ext\" name=\"ext\">\n <Input.TextArea rows={5} />\n </Form.Item>\n <Form.Item>\n <div className=\"flex justify-center gap-8\">\n <Button type=\"primary\" htmlType=\"submit\">\n 提交\n </Button>\n <Button\n onClick={() => {\n navigate('..', { relative: 'path' })\n }}\n >\n 取消\n </Button>\n </div>\n </Form.Item>\n </Form>\n </Card>\n )\n },\n { isGlobal: true },\n)\n\nexport default CreateMenuItem\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-UPO7NB6O.js';import {j,f}from'./chunk-P25BHLH3.js';import {Editor}from'@monaco-editor/react';import {App,Form,Card,Input,Switch,InputNumber,Button}from'antd';import {useNavigate}from'react-router-dom';import {jsx,jsxs}from'react/jsx-runtime';var v=j(()=>{let{message:p}=App.useApp(),[c]=Form.useForm(),o=useNavigate(),{mutateAsync:I}=a();return jsx(Card,{title:"\u521B\u5EFA\u83DC\u5355\u9879",children:jsxs(Form,{scrollToFirstError:true,form:c,labelCol:{flex:"120px"},initialValues:{is_common:false,is_model:false,order:0},onFinish:async d=>{let{permissions:s,front_route:f$1,...F}=d;await I({...F,front_route:f+f$1,permissions:s?JSON.parse(s):void 0}),p.success("\u521B\u5EFA\u6210\u529F",.8,()=>o("..",{relative:"route"}));},children:[jsx(Form.Item,{label:"\u83DC\u5355\u9879\u540D\u79F0",name:"category",rules:[{required:true}],children:jsx(Input,{})}),jsx(Form.Item,{label:"\u524D\u7AEF\u8DEF\u7531",name:"front_route",rules:[{required:true}],children:jsx(Input,{prefix:f})}),jsx(Form.Item,{label:"\u6A21\u677F\u540D\u79F0",name:"model_name",rules:[{required:true}],children:jsx(Input,{})}),jsx(Form.Item,{label:"Is Common",name:"is_common",rules:[{required:true}],valuePropName:"checked",children:jsx(Switch,{})}),jsx(Form.Item,{label:"Order",name:"order",children:jsx(InputNumber,{className:"w-full"})}),jsx(Form.Item,{label:"\u63A5\u53E3\u89C4\u5219",name:"permissions",children:jsx(Editor,{theme:"vs-dark",height:"300px",language:"json",options:{minimap:{enabled:false}}})}),jsx(Form.Item,{label:"Schema",name:"scheme",rules:[{required:true}],children:jsx(Editor,{theme:"vs-dark",height:"600px",language:"json",options:{minimap:{enabled:false}}})}),jsx(Form.Item,{label:"Ext",name:"ext",children:jsx(Input.TextArea,{rows:5})}),jsx(Form.Item,{children:jsxs("div",{className:"flex justify-center gap-8",children:[jsx(Button,{type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"}),jsx(Button,{onClick:()=>{o("..",{relative:"path"});},children:"\u53D6\u6D88"})]})})]})})},{isGlobal:true}),M=v;export{M as default};//# sourceMappingURL=createMenuItem-SXFYDNCW.js.map
|
|
2
|
+
//# sourceMappingURL=createMenuItem-SXFYDNCW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/modules/menu/pages/createMenuItem/index.tsx"],"names":["CreateMenuItem","withContext","message","App","form","Form","navigate","useNavigate","createMenu","useCreateMenu","jsx","Card","jsxs","values","permissions","front_route","rest","FRONTEND_ROUTE_PREFIX","Input","Switch","InputNumber","Editor","Button","createMenuItem_default"],"mappings":"6QAYMA,CAAAA,CAAiBC,CAAAA,CACrB,IAAM,CACJ,GAAM,CAAE,OAAA,CAAAC,CAAQ,EAAIC,GAAAA,CAAI,MAAA,GAClB,CAACC,CAAI,CAAA,CAAIC,IAAAA,CAAK,SAAoB,CAClCC,CAAAA,CAAWC,aAAY,CACvB,CAAE,YAAaC,CAAW,CAAA,CAAIC,CAAAA,EAAc,CAYlD,OACEC,GAAAA,CAACC,IAAAA,CAAA,CAAK,KAAA,CAAM,gCAAA,CACV,SAAAC,IAAAA,CAACP,IAAAA,CAAA,CACC,kBAAA,CAAkB,KAClB,IAAA,CAAMD,CAAAA,CACN,SAAU,CAAE,IAAA,CAAM,OAAQ,CAAA,CAC1B,aAAA,CAAe,CAAE,SAAA,CAAW,KAAA,CAAO,SAAU,KAAA,CAAO,KAAA,CAAO,CAAE,CAAA,CAC7D,QAAA,CAjBW,MAAOS,CAAAA,EAAuB,CAC7C,GAAM,CAAE,YAAAC,CAAAA,CAAa,WAAA,CAAAC,IAAa,GAAGC,CAAK,EAAIH,CAAAA,CAC9C,MAAML,CAAAA,CAAW,CACf,GAAGQ,CAAAA,CACH,WAAA,CAAaC,EAAwBF,GAAAA,CACrC,WAAA,CA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import { Editor } from '@monaco-editor/react'\nimport { App, Button, Card, Form, Input, InputNumber, Switch } from 'antd'\nimport { useNavigate } from 'react-router-dom'\n\nimport { withContext } from '@/components/toolkitsProvider'\nimport { FRONTEND_ROUTE_PREFIX } from '@/constants'\nimport type { MenuListItem } from '@/types'\n\nimport { useCreateMenu } from '../../services'\n\ntype FormSchema = Omit<MenuListItem, 'id' | 'permissions'> & { permissions: string }\n\nconst CreateMenuItem = withContext(\n () => {\n const { message } = App.useApp()\n const [form] = Form.useForm<FormSchema>()\n const navigate = useNavigate()\n const { mutateAsync: createMenu } = useCreateMenu()\n\n const onFinish = async (values: FormSchema) => {\n const { permissions, front_route, ...rest } = values\n await createMenu({\n ...rest,\n front_route: FRONTEND_ROUTE_PREFIX + front_route,\n permissions: permissions ? JSON.parse(permissions) : undefined,\n })\n message.success('创建成功', 0.8, () => navigate('..', { relative: 'route' }))\n }\n\n return (\n <Card title=\"创建菜单项\">\n <Form\n scrollToFirstError\n form={form}\n labelCol={{ flex: '120px' }}\n initialValues={{ is_common: false, is_model: false, order: 0 }}\n onFinish={onFinish}\n >\n <Form.Item label=\"菜单项名称\" name=\"category\" rules={[{ required: true }]}>\n <Input />\n </Form.Item>\n <Form.Item label=\"前端路由\" name=\"front_route\" rules={[{ required: true }]}>\n <Input prefix={FRONTEND_ROUTE_PREFIX} />\n </Form.Item>\n <Form.Item label=\"模板名称\" name=\"model_name\" rules={[{ required: true }]}>\n <Input />\n </Form.Item>\n <Form.Item label=\"Is Common\" name=\"is_common\" rules={[{ required: true }]} valuePropName=\"checked\">\n <Switch />\n </Form.Item>\n <Form.Item label=\"Order\" name=\"order\">\n <InputNumber className=\"w-full\" />\n </Form.Item>\n <Form.Item label=\"接口规则\" name=\"permissions\">\n <Editor\n theme=\"vs-dark\"\n height=\"300px\"\n language=\"json\"\n options={{\n minimap: {\n enabled: false,\n },\n }}\n />\n </Form.Item>\n <Form.Item label=\"Schema\" name=\"scheme\" rules={[{ required: true }]}>\n <Editor\n theme=\"vs-dark\"\n height=\"600px\"\n language=\"json\"\n options={{\n minimap: {\n enabled: false,\n },\n }}\n />\n </Form.Item>\n <Form.Item label=\"Ext\" name=\"ext\">\n <Input.TextArea rows={5} />\n </Form.Item>\n <Form.Item>\n <div className=\"flex justify-center gap-8\">\n <Button type=\"primary\" htmlType=\"submit\">\n 提交\n </Button>\n <Button\n onClick={() => {\n navigate('..', { relative: 'path' })\n }}\n >\n 取消\n </Button>\n </div>\n </Form.Item>\n </Form>\n </Card>\n )\n },\n { isGlobal: true },\n)\n\nexport default CreateMenuItem\n"]}
|
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-inset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-medium:500;--font-weight-bold:700;--leading-tight:1.25;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}table{border-collapse:collapse;border-color:inherit;text-indent:0}menu{list-style:none}img,object,svg{display:block;vertical-align:middle}img{height:auto;max-width:100%}button,select{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-6{top:calc(var(--spacing)*6)}.top-16{top:calc(var(--spacing)*16)}.right-0{right:calc(var(--spacing)*0)}.right-16{right:calc(var(--spacing)*16)}.left-14{left:calc(var(--spacing)*14)}.z-10{z-index:10}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-12{margin-block:calc(var(--spacing)*12)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-6{margin-right:calc(var(--spacing)*6)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-10{height:calc(var(--spacing)*10)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.w-8{width:calc(var(--spacing)*8)}.w-full{width:100%}.w-screen{width:100vw}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-grow-0{flex-grow:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:var(--radius-lg)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab}.bg-gradient-to-br,.bg-gradient-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab}.from-gray-800{--tw-gradient-from:var(--color-gray-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:calc(var(--spacing)*1)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-36{padding-inline:calc(var(--spacing)*36)}.py-2{padding-block:calc(var(--spacing)*2)}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{font-weight:var(--font-weight-bold)}.font-medium{font-weight:var(--font-weight-medium)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-gray-500{color:var(--color-gray-500)}.text-transparent{color:#0000}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media (hover:hover){.hover\:bg-white\/50:hover{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/50:hover{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.hover\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-blue-500:hover{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
1
|
+
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-inset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-medium:500;--font-weight-bold:700;--leading-tight:1.25;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}table{border-collapse:collapse;border-color:inherit;text-indent:0}menu{list-style:none}img,object,svg{display:block;vertical-align:middle}img{height:auto;max-width:100%}button,select{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-6{top:calc(var(--spacing)*6)}.top-16{top:calc(var(--spacing)*16)}.right-0{right:calc(var(--spacing)*0)}.right-16{right:calc(var(--spacing)*16)}.left-14{left:calc(var(--spacing)*14)}.z-10{z-index:10}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.my-12{margin-block:calc(var(--spacing)*12)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-6{margin-right:calc(var(--spacing)*6)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-10{height:calc(var(--spacing)*10)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.w-8{width:calc(var(--spacing)*8)}.w-full{width:100%}.w-screen{width:100vw}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-grow-0{flex-grow:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:var(--radius-lg)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab}.bg-gradient-to-br,.bg-gradient-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab}.from-gray-800{--tw-gradient-from:var(--color-gray-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:calc(var(--spacing)*1)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-36{padding-inline:calc(var(--spacing)*36)}.py-2{padding-block:calc(var(--spacing)*2)}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{font-weight:var(--font-weight-bold)}.font-medium{font-weight:var(--font-weight-medium)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-gray-500{color:var(--color-gray-500)}.text-transparent{color:#0000}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media (hover:hover){.hover\:bg-white\/50:hover{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/50:hover{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.hover\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:to-blue-500:hover{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, FormInstance, MenuProps, SelectProps, DrawerProps, Button, FormProps, ModalProps } from 'antd';
|
|
2
2
|
import { Options } from 'ky';
|
|
3
|
-
import * as react from 'react';
|
|
4
3
|
import { FC, PropsWithChildren, Key, ReactNode, ReactElement, Ref, DetailedHTMLProps, ImgHTMLAttributes, ComponentType, ComponentProps } from 'react';
|
|
5
4
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
|
6
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -131,7 +130,7 @@ interface InfiniteListState {
|
|
|
131
130
|
getInstance(id: string): InfiniteListInstance | undefined;
|
|
132
131
|
getAllInstances(): InfiniteListInstance[];
|
|
133
132
|
}
|
|
134
|
-
declare const useInfiniteListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<InfiniteListState>, "setState"> & {
|
|
133
|
+
declare const useInfiniteListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<InfiniteListState>, "setState" | "devtools"> & {
|
|
135
134
|
setState(partial: InfiniteListState | Partial<InfiniteListState> | ((state: InfiniteListState) => InfiniteListState | Partial<InfiniteListState>), replace?: false | undefined, action?: (string | {
|
|
136
135
|
[x: string]: unknown;
|
|
137
136
|
[x: number]: unknown;
|
|
@@ -144,6 +143,9 @@ declare const useInfiniteListStore: zustand.UseBoundStore<Omit<Omit<zustand.Stor
|
|
|
144
143
|
[x: symbol]: unknown;
|
|
145
144
|
type: string;
|
|
146
145
|
}) | undefined): void;
|
|
146
|
+
devtools: {
|
|
147
|
+
cleanup: () => void;
|
|
148
|
+
};
|
|
147
149
|
}, "subscribe"> & {
|
|
148
150
|
subscribe: {
|
|
149
151
|
(listener: (selectedState: InfiniteListState, previousSelectedState: InfiniteListState) => void): () => void;
|
|
@@ -157,12 +159,12 @@ declare const useInfiniteListStore: zustand.UseBoundStore<Omit<Omit<zustand.Stor
|
|
|
157
159
|
type NavMenuItemType = Merge<MenuItemType, {
|
|
158
160
|
route?: string;
|
|
159
161
|
}>;
|
|
160
|
-
|
|
162
|
+
interface NavSubMenuType extends Omit<SubMenuType, 'children'> {
|
|
161
163
|
children?: NavItem[];
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
+
}
|
|
165
|
+
interface NavMenuItemGroupType extends Omit<MenuItemGroupType, 'children'> {
|
|
164
166
|
children?: NavItem[];
|
|
165
|
-
}
|
|
167
|
+
}
|
|
166
168
|
type NavItem = Exclude<ItemType, SubMenuType | MenuItemGroupType | MenuItemType> | NavMenuItemType | NavSubMenuType | NavMenuItemGroupType;
|
|
167
169
|
|
|
168
170
|
interface NavProps {
|
|
@@ -170,7 +172,7 @@ interface NavProps {
|
|
|
170
172
|
theme?: MenuProps['theme'];
|
|
171
173
|
loading?: boolean;
|
|
172
174
|
}
|
|
173
|
-
declare const Nav:
|
|
175
|
+
declare const Nav: (props: NavProps) => react_jsx_runtime.JSX.Element;
|
|
174
176
|
|
|
175
177
|
type Area = 'all' | 'cn' | 'global';
|
|
176
178
|
type ScreenOrientation = 0 | 1;
|
|
@@ -289,7 +291,7 @@ interface QueryListState {
|
|
|
289
291
|
getInstance(id: string): QueryListInstance | undefined;
|
|
290
292
|
getAllInstances(): QueryListInstance[];
|
|
291
293
|
}
|
|
292
|
-
declare const useQueryListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<QueryListState>, "setState"> & {
|
|
294
|
+
declare const useQueryListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<QueryListState>, "setState" | "devtools"> & {
|
|
293
295
|
setState(partial: QueryListState | Partial<QueryListState> | ((state: QueryListState) => QueryListState | Partial<QueryListState>), replace?: false | undefined, action?: (string | {
|
|
294
296
|
[x: string]: unknown;
|
|
295
297
|
[x: number]: unknown;
|
|
@@ -302,6 +304,9 @@ declare const useQueryListStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreAp
|
|
|
302
304
|
[x: symbol]: unknown;
|
|
303
305
|
type: string;
|
|
304
306
|
}) | undefined): void;
|
|
307
|
+
devtools: {
|
|
308
|
+
cleanup: () => void;
|
|
309
|
+
};
|
|
305
310
|
}, "subscribe"> & {
|
|
306
311
|
subscribe: {
|
|
307
312
|
(listener: (selectedState: QueryListState, previousSelectedState: QueryListState) => void): () => void;
|
|
@@ -393,7 +398,7 @@ type Locale = {
|
|
|
393
398
|
RequireGame: {
|
|
394
399
|
description: string;
|
|
395
400
|
};
|
|
396
|
-
|
|
401
|
+
UserDropdown: {
|
|
397
402
|
signOutText: string;
|
|
398
403
|
};
|
|
399
404
|
User: {
|
|
@@ -484,7 +489,7 @@ declare const withContext: (Component: ComponentType, providerProps: Omit<Toolki
|
|
|
484
489
|
displayName: string;
|
|
485
490
|
};
|
|
486
491
|
|
|
487
|
-
declare const
|
|
492
|
+
declare const UserDropdown: FC;
|
|
488
493
|
|
|
489
494
|
interface UseDrawerOperation {
|
|
490
495
|
hide: () => void;
|
|
@@ -828,4 +833,4 @@ declare function useAuth(code?: string | string[], config?: Options): {
|
|
|
828
833
|
declare function useMenuList(): _tanstack_react_query.UseQueryResult<MenuListItem[], Error>;
|
|
829
834
|
declare const useGames: () => _tanstack_react_query.UseQueryResult<Game[], Error>;
|
|
830
835
|
|
|
831
|
-
export { APP_ID_HEADER, AuthButton, type AuthButtonProps, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, InfiniteListAction, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, Layout, type LayoutProps, Logo, type LogoProps, type MenuListItem, Nav, type NavItem, NotFound, _default as OperationLogList, type Permission, PermissionVersion, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, RequireAuth, type RequireAuthProps, RequireGame, SSO_URL, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseFormDrawerProps, type UseFormModalProps,
|
|
836
|
+
export { APP_ID_HEADER, AuthButton, type AuthButtonProps, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FRONTEND_ROUTE_PREFIX, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, InfiniteListAction, type InfiniteListPayload, type InfiniteListProps, type InfiniteListRef, type InfiniteListRequestConfig, Layout, type LayoutProps, Logo, type LogoProps, type MenuListItem, Nav, type NavItem, NotFound, _default as OperationLogList, type Permission, PermissionVersion, QueryList, QueryListAction, type QueryListPayload, type QueryListProps, type QueryListRef, type RecursivePartial, RequireAuth, type RequireAuthProps, RequireGame, SSO_URL, SignIn, ToolkitsProvider, type ToolkitsProviderProps, type UseFormDrawerProps, type UseFormModalProps, UserDropdown, type VisibilityState, WILDCARD, createVisibilityStore, generateId, _default$2 as menu, mixedStorage, _default$1 as permission, useAuth, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useGames, useInfiniteListStore, useMenuList, useModal, useModalStore, useQueryListStore, useToolkitsStore, withContext };
|