anysystem-design 0.0.22 → 0.0.24
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/AutoComplete/AutoComplete.d.ts +5 -2
- package/dist/components/AutoComplete/AutoCompleteBase.d.ts +6 -4
- package/dist/components/AutoComplete/AutoCompleteBase.js +1 -1
- package/dist/components/AutoComplete/AutoCompleteMultiple.d.ts +6 -4
- package/dist/components/DataTable/DataTable.d.ts +4 -5
- package/dist/components/DataTable/DataTable.js +7 -1
- package/dist/components/DataTable/components/DataTableCell.d.ts +4 -4
- package/dist/components/DataTable/components/DataTableHeadCell.d.ts +3 -3
- package/dist/components/DataTable/components/DataTableHeadCell.js +3 -1
- package/dist/components/DataTable/components/DataTableRow.d.ts +3 -3
- package/dist/components/DataTable/components/DataTableRow.js +5 -1
- package/dist/components/DataTable/components/FieldSelectbox.d.ts +1 -3
- package/dist/components/DataTable/contexts/DataTableContext.d.ts +10 -6
- package/dist/components/DataTable/contexts/DataTableContext.js +9 -5
- package/dist/components/DataTable/libs/helper.d.ts +1 -1
- package/dist/components/DataTable/libs/type.d.ts +7 -7
- package/dist/components/Input/Input.d.ts +5 -2
- package/dist/components/Input/InputTel.d.ts +2 -2
- package/dist/components/Input/InputTel.js +8 -1
- package/dist/components/NavList/NavList.d.ts +1 -0
- package/dist/components/NavList/NavList.js +96 -94
- package/dist/components/RadioGroup/RadioGroup.d.ts +4 -5
- package/dist/components/Selectbox/FormSelectbox.d.ts +5 -2
- package/dist/components/Selectbox/Selectbox.d.ts +5 -3
- package/dist/components/Selectbox/SelectboxBase.d.ts +10 -8
- package/dist/components/Selectbox/SelectboxMultiple.d.ts +6 -4
- package/dist/components/Selectbox/helper.d.ts +1 -1
- package/dist/hooks/useLocalStorage.d.ts +1 -1
- package/dist/hooks/useLocalStorage.js +1 -4
- package/dist/layouts/SideMenu/SideMenu.js +17 -16
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { SelectOption } from '../Selectbox';
|
|
2
3
|
import { AutoCompleteBaseHandler, AutoCompleteBaseProps } from './AutoCompleteBase';
|
|
3
4
|
import { AutoCompleteMultipleHandler, AutoCompleteMultipleProps } from './AutoCompleteMultiple';
|
|
4
5
|
|
|
@@ -7,8 +8,10 @@ export { default as AutoCompleteBase } from './AutoCompleteBase';
|
|
|
7
8
|
export * from './AutoCompleteMultiple';
|
|
8
9
|
export { default as AutoCompleteMultiple } from './AutoCompleteMultiple';
|
|
9
10
|
export type AutoCompleteHandler = AutoCompleteBaseHandler | AutoCompleteMultipleHandler;
|
|
10
|
-
export type AutoCompleteProps = (AutoCompleteBaseProps | AutoCompleteMultipleProps) & {
|
|
11
|
+
export type AutoCompleteProps<ListOption extends SelectOption> = (AutoCompleteBaseProps<ListOption> | AutoCompleteMultipleProps<ListOption>) & {
|
|
11
12
|
multiple?: boolean;
|
|
12
13
|
};
|
|
13
|
-
declare const _default:
|
|
14
|
+
declare const _default: <ListOption extends SelectOption>(props: AutoCompleteProps<ListOption> & {
|
|
15
|
+
ref?: React.Ref<AutoCompleteHandler>;
|
|
16
|
+
}) => React.ReactElement;
|
|
14
17
|
export default _default;
|
|
@@ -5,16 +5,18 @@ export type AutoCompleteBaseHandler = {
|
|
|
5
5
|
search: (query: string) => void;
|
|
6
6
|
setValue: (value: string) => void;
|
|
7
7
|
};
|
|
8
|
-
export type AutoCompleteBaseProps = {
|
|
8
|
+
export type AutoCompleteBaseProps<ListOption extends SelectOption> = {
|
|
9
9
|
id?: string;
|
|
10
|
-
options:
|
|
10
|
+
options: ListOption[];
|
|
11
11
|
name: string;
|
|
12
12
|
value?: string | number;
|
|
13
13
|
readOnly?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
onChange?: (value: string | number) => void;
|
|
17
|
-
valueField?: ValueField
|
|
17
|
+
valueField?: ValueField<ListOption>;
|
|
18
18
|
};
|
|
19
|
-
declare const _default:
|
|
19
|
+
declare const _default: <ListOption extends SelectOption>(props: AutoCompleteBaseProps<ListOption> & {
|
|
20
|
+
ref?: React.Ref<AutoCompleteBaseHandler>;
|
|
21
|
+
}) => React.ReactElement;
|
|
20
22
|
export default _default;
|
|
@@ -90,7 +90,7 @@ const H = (t, r) => r.type === "SEARCH" ? {
|
|
|
90
90
|
leaveFrom: "scale-100 transform opacity-100",
|
|
91
91
|
leaveTo: "scale-95 transform opacity-0",
|
|
92
92
|
afterLeave: () => s({ type: "SEARCH", query: "" }),
|
|
93
|
-
children: /* @__PURE__ */ a(N, { className: "absolute z-50 mt-5 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none
|
|
93
|
+
children: /* @__PURE__ */ a(N, { className: "absolute z-50 mt-5 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none dark:bg-gray-900 sm:text-sm", children: m.filterList.map((e) => /* @__PURE__ */ a(L, { as: p, value: e, children: ({ selected: n, focus: g }) => /* @__PURE__ */ f(
|
|
94
94
|
"li",
|
|
95
95
|
{
|
|
96
96
|
className: y(
|
|
@@ -5,16 +5,18 @@ export type AutoCompleteMultipleHandler = {
|
|
|
5
5
|
search: (query: string) => void;
|
|
6
6
|
setValue: (value: string[]) => void;
|
|
7
7
|
};
|
|
8
|
-
export type AutoCompleteMultipleProps = {
|
|
8
|
+
export type AutoCompleteMultipleProps<ListOption extends SelectOption> = {
|
|
9
9
|
id?: string;
|
|
10
|
-
options:
|
|
10
|
+
options: ListOption[];
|
|
11
11
|
name: string;
|
|
12
12
|
value?: string[] | number[];
|
|
13
13
|
readOnly?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
onChange?: (value: string[] | number[]) => void;
|
|
17
|
-
valueField?: ValueField
|
|
17
|
+
valueField?: ValueField<ListOption>;
|
|
18
18
|
};
|
|
19
|
-
declare const _default:
|
|
19
|
+
declare const _default: <ListOption extends SelectOption>(props: AutoCompleteMultipleProps<ListOption> & {
|
|
20
|
+
ref?: React.Ref<AutoCompleteMultipleHandler>;
|
|
21
|
+
}) => React.ReactElement;
|
|
20
22
|
export default _default;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { DataTableField } from './libs/type';
|
|
3
2
|
|
|
4
|
-
export type DataTableProps = {
|
|
5
|
-
data:
|
|
6
|
-
fields: DataTableField[];
|
|
3
|
+
export type DataTableProps<DataType extends object> = {
|
|
4
|
+
data: DataType[];
|
|
5
|
+
fields: DataTableField<DataType>[];
|
|
7
6
|
selectable?: boolean;
|
|
8
7
|
chooseFieldable?: boolean;
|
|
9
8
|
name?: string;
|
|
10
9
|
};
|
|
11
|
-
declare const DataTable:
|
|
10
|
+
declare const DataTable: <DataType extends object>({ name, data, fields, selectable, chooseFieldable, }: DataTableProps<DataType>) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default DataTable;
|
|
@@ -38,7 +38,13 @@ const w = (e, l) => l.type === "SELECT_ALL" ? {
|
|
|
38
38
|
}, [i.DTShowFields]), /* @__PURE__ */ a(
|
|
39
39
|
D,
|
|
40
40
|
{
|
|
41
|
-
value: {
|
|
41
|
+
value: {
|
|
42
|
+
selectable: d,
|
|
43
|
+
fields: r,
|
|
44
|
+
chooseFieldable: T,
|
|
45
|
+
state: i,
|
|
46
|
+
dispatch: t
|
|
47
|
+
},
|
|
42
48
|
children: /* @__PURE__ */ m("div", { className: "relative w-full", children: [
|
|
43
49
|
/* @__PURE__ */ m("table", { className: "table", children: [
|
|
44
50
|
/* @__PURE__ */ a(s, {}),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ValueKey, ValueNode } from '../libs/type';
|
|
3
3
|
|
|
4
|
-
export type DataTableCellProps = {
|
|
4
|
+
export type DataTableCellProps<DataType extends object> = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
-
data?:
|
|
7
|
-
field?: string | ValueNode | ValueKey;
|
|
6
|
+
data?: DataType;
|
|
7
|
+
field?: string | ValueNode<DataType> | ValueKey;
|
|
8
8
|
};
|
|
9
|
-
declare const DataTableCell: React.
|
|
9
|
+
declare const DataTableCell: <DataType extends object>({ children, data, field, }: DataTableCellProps<DataType>) => React.ReactElement;
|
|
10
10
|
export default DataTableCell;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DataTableField } from '../libs/type';
|
|
3
3
|
|
|
4
|
-
export type DataTableHeadCellProps = {
|
|
5
|
-
field: DataTableField
|
|
4
|
+
export type DataTableHeadCellProps<DataType extends object> = {
|
|
5
|
+
field: DataTableField<DataType>;
|
|
6
6
|
};
|
|
7
|
-
declare const DataTableHeadCell: React.
|
|
7
|
+
declare const DataTableHeadCell: <DataType extends object>({ field, }: DataTableHeadCellProps<DataType>) => React.ReactElement;
|
|
8
8
|
export default DataTableHeadCell;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export type DataRowProps = {
|
|
3
|
+
export type DataRowProps<DataType extends object> = {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
row?:
|
|
5
|
+
row?: DataType;
|
|
6
6
|
index: number;
|
|
7
7
|
};
|
|
8
|
-
declare const DataTableRow: React.
|
|
8
|
+
declare const DataTableRow: <DataType extends object>({ row, children, index, }: DataRowProps<DataType>) => React.ReactElement;
|
|
9
9
|
export default DataTableRow;
|
|
@@ -4,7 +4,11 @@ import { _ as p } from "../../../lodash-XYp3qmxI.js";
|
|
|
4
4
|
import { DataTableContext as h } from "../contexts/DataTableContext.js";
|
|
5
5
|
import { CheckboxBase as C } from "../../Checkbox/CheckboxBase.js";
|
|
6
6
|
import b from "./DataTableCell.js";
|
|
7
|
-
const j = ({
|
|
7
|
+
const j = ({
|
|
8
|
+
row: a,
|
|
9
|
+
children: o,
|
|
10
|
+
index: l
|
|
11
|
+
}) => {
|
|
8
12
|
const { selectable: s, fields: m, state: r, dispatch: i } = n.useContext(h);
|
|
9
13
|
return /* @__PURE__ */ d("tr", { children: [
|
|
10
14
|
s && /* @__PURE__ */ e("td", { className: "w-[50px]", children: /* @__PURE__ */ e(
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DataTableField, State, Action } from '../libs/type';
|
|
3
3
|
|
|
4
|
-
export type DataTableContextType = {
|
|
4
|
+
export type DataTableContextType<DataType extends object> = {
|
|
5
5
|
selectable: boolean;
|
|
6
6
|
chooseFieldable: boolean;
|
|
7
|
-
fields: DataTableField[];
|
|
8
|
-
state: State
|
|
9
|
-
dispatch: React.Dispatch<Action
|
|
7
|
+
fields: DataTableField<DataType>[];
|
|
8
|
+
state: State<DataType>;
|
|
9
|
+
dispatch: React.Dispatch<Action<DataType>>;
|
|
10
10
|
};
|
|
11
|
-
export declare const DataTableContext: React.Context<DataTableContextType
|
|
12
|
-
export
|
|
11
|
+
export declare const DataTableContext: React.Context<DataTableContextType<any>>;
|
|
12
|
+
export type DataTableProviderProps<DataType extends object> = {
|
|
13
|
+
value: DataTableContextType<DataType>;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export declare const DataTableProvider: <DataType extends object>({ children, value, }: DataTableProviderProps<DataType>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
const r = o.createContext({
|
|
3
4
|
selectable: !1,
|
|
4
5
|
chooseFieldable: !1,
|
|
5
6
|
fields: [],
|
|
6
7
|
state: { DTChecked: [], DTData: [], DTShowFields: [] },
|
|
7
8
|
dispatch: () => {
|
|
8
9
|
}
|
|
9
|
-
}),
|
|
10
|
+
}), c = ({
|
|
11
|
+
children: e,
|
|
12
|
+
value: t
|
|
13
|
+
}) => /* @__PURE__ */ a(r.Provider, { value: t, children: e });
|
|
10
14
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
r as DataTableContext,
|
|
16
|
+
c as DataTableProvider
|
|
13
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ValueKey, ValueNode } from './type';
|
|
2
2
|
|
|
3
3
|
export declare const isValueKey: (key: string) => key is ValueKey;
|
|
4
|
-
export declare const getValueByKey: (data:
|
|
4
|
+
export declare const getValueByKey: <DataType extends object>(data: DataType, key: ValueKey | ValueNode<DataType> | string) => unknown;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type ValueKey = `$${string}`;
|
|
2
|
-
export type ValueNode = (row:
|
|
3
|
-
export type State = {
|
|
4
|
-
DTData:
|
|
2
|
+
export type ValueNode<DataType extends object> = (row: DataType) => React.ReactNode | string;
|
|
3
|
+
export type State<DataType extends object> = {
|
|
4
|
+
DTData: DataType[];
|
|
5
5
|
DTChecked: boolean[];
|
|
6
6
|
DTShowFields: string[];
|
|
7
7
|
};
|
|
8
|
-
export type Action = {
|
|
8
|
+
export type Action<DataType extends object> = {
|
|
9
9
|
type: "SELECT_ALL";
|
|
10
10
|
} | {
|
|
11
11
|
type: "SELECT_ROW";
|
|
@@ -15,11 +15,11 @@ export type Action = {
|
|
|
15
15
|
fieldKey: string;
|
|
16
16
|
} | {
|
|
17
17
|
type: "SET_FIELD";
|
|
18
|
-
fields: DataTableField[];
|
|
18
|
+
fields: DataTableField<DataType>[];
|
|
19
19
|
};
|
|
20
|
-
export type DataTableField = {
|
|
20
|
+
export type DataTableField<DataType extends object> = {
|
|
21
21
|
key: string;
|
|
22
22
|
label: string;
|
|
23
|
-
value: ValueKey | ValueNode | string;
|
|
23
|
+
value: ValueKey | ValueNode<DataType> | string;
|
|
24
24
|
default?: boolean;
|
|
25
25
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { InputBaseProps } from './InputBase';
|
|
3
3
|
import { InputTelProps } from './InputTel';
|
|
4
|
+
import { SelectOption } from '../Selectbox';
|
|
4
5
|
|
|
5
|
-
export type InputProps = InputBaseProps | InputTelProps
|
|
6
|
-
declare const _default:
|
|
6
|
+
export type InputProps<ListOption extends SelectOption> = InputBaseProps | InputTelProps<ListOption>;
|
|
7
|
+
declare const _default: <ListOption extends SelectOption>(props: InputProps<ListOption> & {
|
|
8
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
9
|
+
}) => JSX.Element;
|
|
7
10
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SelectOption } from '../Selectbox';
|
|
3
3
|
|
|
4
|
-
export type InputTelProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
export type InputTelProps<ListOption extends SelectOption> = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
5
5
|
type: "tel";
|
|
6
6
|
name: string;
|
|
7
7
|
className?: {
|
|
@@ -9,7 +9,7 @@ export type InputTelProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
9
9
|
input?: string;
|
|
10
10
|
};
|
|
11
11
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
12
|
-
phonePrefixOptions:
|
|
12
|
+
phonePrefixOptions: ListOption[];
|
|
13
13
|
phonePrefix?: string;
|
|
14
14
|
onChange?: (value: string) => void;
|
|
15
15
|
};
|
|
@@ -11,7 +11,14 @@ const E = (r, t) => t.type === "SETPREFIX" ? {
|
|
|
11
11
|
...r,
|
|
12
12
|
content: t.value,
|
|
13
13
|
realPhone: `${r.prefix}-${t.value}`
|
|
14
|
-
} : r, N = ({
|
|
14
|
+
} : r, N = ({
|
|
15
|
+
className: r,
|
|
16
|
+
value: t,
|
|
17
|
+
phonePrefix: i,
|
|
18
|
+
phonePrefixOptions: f,
|
|
19
|
+
onChange: a,
|
|
20
|
+
...p
|
|
21
|
+
}, d) => {
|
|
15
22
|
const v = o.useMemo(() => {
|
|
16
23
|
let e = r || { container: void 0, input: void 0 };
|
|
17
24
|
return e.container = T("w-1/2", (e == null ? void 0 : e.container) || ""), e;
|
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
1
|
+
import { jsx as s, jsxs as C, Fragment as ae } from "react/jsx-runtime";
|
|
2
2
|
import { G as ne } from "../../iconBase-Bipuk9tK.js";
|
|
3
|
-
import { t as
|
|
3
|
+
import { t as x } from "../../bundle-mjs-SHnj3fHy.js";
|
|
4
4
|
import W from "../Icon/Icon.js";
|
|
5
5
|
import { b as oe } from "../../index-qfA2zEnA.js";
|
|
6
|
-
import { $ as se, a as
|
|
7
|
-
import
|
|
6
|
+
import { $ as se, a as ie, r as ue } from "../../bugs-CHTtT8VX.js";
|
|
7
|
+
import y, { createContext as R, useRef as D, Fragment as Q, useReducer as ce, useMemo as w, useId as X, useEffect as Y, useContext as N } from "react";
|
|
8
8
|
import { w as de, T as pe } from "../../use-resolve-button-type-DkEA2l9L.js";
|
|
9
|
-
import { M as _, W as B, y as F, T as fe, o as
|
|
10
|
-
import { c as
|
|
9
|
+
import { M as _, W as B, y as F, T as fe, o as E, u as M, H as L, I as Z, D as q } from "../../use-sync-refs-TDnk3jQt.js";
|
|
10
|
+
import { c as ge, i as T, u as he, V as ye, A as be, s as ke } from "../../open-closed-CowzTowH.js";
|
|
11
11
|
import { u as ve } from "../../close-provider-Cs3ZWgEC.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as me, o as S } from "../../keyboard-DnlWU23I.js";
|
|
13
13
|
var J;
|
|
14
|
-
let Pe = (J =
|
|
14
|
+
let Pe = (J = y.startTransition) != null ? J : function(e) {
|
|
15
15
|
e();
|
|
16
16
|
};
|
|
17
|
-
var $e = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))($e || {}),
|
|
18
|
-
let
|
|
17
|
+
var $e = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))($e || {}), Se = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.LinkPanel = 4] = "LinkPanel", e[e.UnlinkPanel = 5] = "UnlinkPanel", e))(Se || {});
|
|
18
|
+
let xe = { 0: (e) => ({ ...e, disclosureState: M(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 4(e) {
|
|
19
19
|
return e.linkedPanel === !0 ? e : { ...e, linkedPanel: !0 };
|
|
20
20
|
}, 5(e) {
|
|
21
21
|
return e.linkedPanel === !1 ? e : { ...e, linkedPanel: !1 };
|
|
22
|
-
}, 2(e,
|
|
23
|
-
return e.buttonId ===
|
|
24
|
-
}, 3(e,
|
|
25
|
-
return e.panelId ===
|
|
26
|
-
} }, O =
|
|
22
|
+
}, 2(e, t) {
|
|
23
|
+
return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
|
|
24
|
+
}, 3(e, t) {
|
|
25
|
+
return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
|
|
26
|
+
} }, O = R(null);
|
|
27
27
|
O.displayName = "DisclosureContext";
|
|
28
28
|
function H(e) {
|
|
29
|
-
let
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
32
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
29
|
+
let t = N(O);
|
|
30
|
+
if (t === null) {
|
|
31
|
+
let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
|
32
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r, H), r;
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return t;
|
|
35
35
|
}
|
|
36
|
-
let j =
|
|
36
|
+
let j = R(null);
|
|
37
37
|
j.displayName = "DisclosureAPIContext";
|
|
38
38
|
function ee(e) {
|
|
39
|
-
let
|
|
40
|
-
if (
|
|
41
|
-
let
|
|
42
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
39
|
+
let t = N(j);
|
|
40
|
+
if (t === null) {
|
|
41
|
+
let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
|
|
42
|
+
throw Error.captureStackTrace && Error.captureStackTrace(r, ee), r;
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return t;
|
|
45
45
|
}
|
|
46
|
-
let U =
|
|
46
|
+
let U = R(null);
|
|
47
47
|
U.displayName = "DisclosurePanelContext";
|
|
48
|
-
function
|
|
48
|
+
function De() {
|
|
49
49
|
return N(U);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return M(
|
|
51
|
+
function Ee(e, t) {
|
|
52
|
+
return M(t.type, xe, e, t);
|
|
53
53
|
}
|
|
54
|
-
let
|
|
55
|
-
function
|
|
56
|
-
let { defaultOpen:
|
|
57
|
-
|
|
58
|
-
}, e.as === void 0 || e.as === Q)),
|
|
59
|
-
|
|
60
|
-
let
|
|
61
|
-
if (!
|
|
62
|
-
let P = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current :
|
|
54
|
+
let we = Q;
|
|
55
|
+
function Te(e, t) {
|
|
56
|
+
let { defaultOpen: r = !1, ...d } = e, n = D(null), i = F(t, fe((c) => {
|
|
57
|
+
n.current = c;
|
|
58
|
+
}, e.as === void 0 || e.as === Q)), l = D(null), a = D(null), o = ce(Ee, { disclosureState: r ? 0 : 1, linkedPanel: !1, buttonRef: a, panelRef: l, buttonId: null, panelId: null }), [{ disclosureState: g, buttonId: u }, h] = o, f = E((c) => {
|
|
59
|
+
h({ type: 1 });
|
|
60
|
+
let k = me(n);
|
|
61
|
+
if (!k || !u) return;
|
|
62
|
+
let P = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : k.getElementById(u) : k.getElementById(u);
|
|
63
63
|
P == null || P.focus();
|
|
64
|
-
}), v =
|
|
65
|
-
return
|
|
64
|
+
}), v = w(() => ({ close: f }), [f]), b = w(() => ({ open: g === 0, close: f }), [g, f]), m = { ref: i };
|
|
65
|
+
return y.createElement(O.Provider, { value: o }, y.createElement(j.Provider, { value: v }, y.createElement(ve, { value: f }, y.createElement(ge, { value: M(g, { 0: T.Open, 1: T.Closed }) }, L({ ourProps: m, theirProps: d, slot: b, defaultTag: we, name: "Disclosure" })))));
|
|
66
66
|
}
|
|
67
|
-
let
|
|
68
|
-
function
|
|
69
|
-
let
|
|
67
|
+
let Ce = "button";
|
|
68
|
+
function Ie(e, t) {
|
|
69
|
+
let r = X(), { id: d = `headlessui-disclosure-button-${r}`, disabled: n = !1, autoFocus: i = !1, ...l } = e, [a, o] = H("Disclosure.Button"), g = De(), u = g === null ? !1 : g === a.panelId, h = D(null), f = F(h, t, u ? null : a.buttonRef), v = Z();
|
|
70
70
|
Y(() => {
|
|
71
|
-
if (!
|
|
71
|
+
if (!u) return o({ type: 2, buttonId: d }), () => {
|
|
72
72
|
o({ type: 2, buttonId: null });
|
|
73
73
|
};
|
|
74
|
-
}, [d, o,
|
|
75
|
-
let b =
|
|
74
|
+
}, [d, o, u]);
|
|
75
|
+
let b = E((p) => {
|
|
76
76
|
var $;
|
|
77
|
-
if (
|
|
78
|
-
if (
|
|
77
|
+
if (u) {
|
|
78
|
+
if (a.disclosureState === 1) return;
|
|
79
79
|
switch (p.key) {
|
|
80
|
-
case
|
|
81
|
-
case
|
|
82
|
-
p.preventDefault(), p.stopPropagation(), o({ type: 0 }), ($ =
|
|
80
|
+
case S.Space:
|
|
81
|
+
case S.Enter:
|
|
82
|
+
p.preventDefault(), p.stopPropagation(), o({ type: 0 }), ($ = a.buttonRef.current) == null || $.focus();
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
85
|
} else switch (p.key) {
|
|
86
|
-
case
|
|
87
|
-
case
|
|
86
|
+
case S.Space:
|
|
87
|
+
case S.Enter:
|
|
88
88
|
p.preventDefault(), p.stopPropagation(), o({ type: 0 });
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
91
|
+
}), m = E((p) => {
|
|
92
92
|
switch (p.key) {
|
|
93
|
-
case
|
|
93
|
+
case S.Space:
|
|
94
94
|
p.preventDefault();
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
|
-
}), c =
|
|
97
|
+
}), c = E((p) => {
|
|
98
98
|
var $;
|
|
99
|
-
|
|
100
|
-
}), { isFocusVisible:
|
|
101
|
-
return L({ mergeRefs: v, ourProps: le, theirProps:
|
|
99
|
+
ue(p.currentTarget) || n || (u ? (o({ type: 0 }), ($ = a.buttonRef.current) == null || $.focus()) : o({ type: 0 }));
|
|
100
|
+
}), { isFocusVisible: k, focusProps: P } = se({ autoFocus: i }), { isHovered: V, hoverProps: z } = ie({ isDisabled: n }), { pressed: A, pressProps: G } = de({ disabled: n }), te = w(() => ({ open: a.disclosureState === 0, hover: V, active: A, disabled: n, focus: k, autofocus: i }), [a, V, A, k, n, i]), K = pe(e, h), le = u ? q({ ref: f, type: K, disabled: n || void 0, autoFocus: i, onKeyDown: b, onClick: c }, P, z, G) : q({ ref: f, id: d, type: K, "aria-expanded": a.disclosureState === 0, "aria-controls": a.linkedPanel ? a.panelId : void 0, disabled: n || void 0, autoFocus: i, onKeyDown: b, onKeyUp: m, onClick: c }, P, z, G);
|
|
101
|
+
return L({ mergeRefs: v, ourProps: le, theirProps: l, slot: te, defaultTag: Ce, name: "Disclosure.Button" });
|
|
102
102
|
}
|
|
103
|
-
let
|
|
104
|
-
function Be(e,
|
|
105
|
-
let
|
|
106
|
-
Pe(() =>
|
|
103
|
+
let Re = "div", Ne = _.RenderStrategy | _.Static;
|
|
104
|
+
function Be(e, t) {
|
|
105
|
+
let r = X(), { id: d = `headlessui-disclosure-panel-${r}`, transition: n = !1, ...i } = e, [l, a] = H("Disclosure.Panel"), { close: o } = ee("Disclosure.Panel"), g = Z(), u = F(t, l.panelRef, (c) => {
|
|
106
|
+
Pe(() => a({ type: c ? 4 : 5 }));
|
|
107
107
|
});
|
|
108
|
-
Y(() => (
|
|
109
|
-
|
|
110
|
-
}), [d,
|
|
111
|
-
let
|
|
112
|
-
return
|
|
108
|
+
Y(() => (a({ type: 3, panelId: d }), () => {
|
|
109
|
+
a({ type: 3, panelId: null });
|
|
110
|
+
}), [d, a]);
|
|
111
|
+
let h = he(), [f, v] = ye(n, l.panelRef, h !== null ? (h & T.Open) === T.Open : l.disclosureState === 0), b = w(() => ({ open: l.disclosureState === 0, close: o }), [l.disclosureState, o]), m = { ref: u, id: d, ...be(v) };
|
|
112
|
+
return y.createElement(ke, null, y.createElement(U.Provider, { value: l.panelId }, L({ mergeRefs: g, ourProps: m, theirProps: i, slot: b, defaultTag: Re, features: Ne, visible: f, name: "Disclosure.Panel" })));
|
|
113
113
|
}
|
|
114
|
-
let Fe = B(
|
|
114
|
+
let Fe = B(Te), I = B(Ie), re = B(Be), Me = Object.assign(Fe, { Button: I, Panel: re });
|
|
115
115
|
function Le(e) {
|
|
116
116
|
return ne({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" }, child: [] }] })(e);
|
|
117
117
|
}
|
|
118
118
|
const Je = ({ list: e }) => {
|
|
119
|
-
const
|
|
120
|
-
return /* @__PURE__ */ s("nav", { className: "w-full bg-white px-4 py-6 dark:bg-gray-950", children: /* @__PURE__ */ s("ul", { children: e && e.map((
|
|
121
|
-
var
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
119
|
+
const t = oe();
|
|
120
|
+
return /* @__PURE__ */ s("nav", { className: "w-full bg-white px-4 py-6 dark:bg-gray-950", children: /* @__PURE__ */ s("ul", { children: e && e.map((r, d) => /* @__PURE__ */ s("li", { children: r != null && r.title ? /* @__PURE__ */ s("div", { className: "px-3 py-2 text-sm font-bold dark:text-white", children: r.label }) : r.list ? /* @__PURE__ */ s(Me, { as: "div", children: ({ open: n }) => {
|
|
121
|
+
var i;
|
|
122
|
+
return /* @__PURE__ */ C(ae, { children: [
|
|
123
|
+
/* @__PURE__ */ C(
|
|
124
|
+
I,
|
|
125
125
|
{
|
|
126
|
-
className:
|
|
126
|
+
className: x(
|
|
127
127
|
"flex w-full items-center gap-2 rounded p-3 text-left font-semibold hover:bg-primary-50 dark:text-white dark:hover:bg-gray-700"
|
|
128
128
|
),
|
|
129
129
|
children: [
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */ s("span", { children:
|
|
130
|
+
r.icon && /* @__PURE__ */ s(W, { name: r.icon, size: 20 }),
|
|
131
|
+
/* @__PURE__ */ s("span", { children: r.label }),
|
|
132
132
|
/* @__PURE__ */ s(
|
|
133
133
|
Le,
|
|
134
134
|
{
|
|
135
|
-
className:
|
|
136
|
-
|
|
135
|
+
className: x(
|
|
136
|
+
n ? "rotate-90 text-gray-500" : "text-gray-400",
|
|
137
137
|
"ml-auto h-4 w-4 shrink-0"
|
|
138
138
|
),
|
|
139
139
|
"aria-hidden": "true"
|
|
@@ -142,30 +142,32 @@ const Je = ({ list: e }) => {
|
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
/* @__PURE__ */ s(
|
|
146
|
-
|
|
145
|
+
/* @__PURE__ */ s(re, { as: "ul", className: "mt-1 px-2", children: (i = r == null ? void 0 : r.list) == null ? void 0 : i.map((l, a) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
|
|
146
|
+
I,
|
|
147
147
|
{
|
|
148
148
|
as: "a",
|
|
149
|
-
href:
|
|
150
|
-
className:
|
|
149
|
+
href: l == null ? void 0 : l.path,
|
|
150
|
+
className: x(
|
|
151
151
|
"block rounded py-2 pl-9 pr-2 text-gray-700 hover:bg-primary-50 dark:text-white dark:hover:bg-gray-700",
|
|
152
|
-
|
|
152
|
+
t.pathname === l.path && "bg-primary-50 dark:bg-gray-700"
|
|
153
153
|
),
|
|
154
|
-
|
|
154
|
+
onClick: l == null ? void 0 : l.onClick,
|
|
155
|
+
children: l.label
|
|
155
156
|
}
|
|
156
|
-
) },
|
|
157
|
+
) }, a)) })
|
|
157
158
|
] });
|
|
158
|
-
} }) : /* @__PURE__ */
|
|
159
|
+
} }) : /* @__PURE__ */ C(
|
|
159
160
|
"a",
|
|
160
161
|
{
|
|
161
|
-
href:
|
|
162
|
-
className:
|
|
162
|
+
href: r == null ? void 0 : r.path,
|
|
163
|
+
className: x(
|
|
163
164
|
"flex w-full items-center justify-start gap-2 rounded p-3 font-semibold hover:bg-primary-50 dark:text-white dark:hover:bg-gray-800",
|
|
164
|
-
|
|
165
|
+
t.pathname === r.path ? "bg-primary-50 dark:bg-gray-800" : ""
|
|
165
166
|
),
|
|
167
|
+
onClick: r == null ? void 0 : r.onClick,
|
|
166
168
|
children: [
|
|
167
|
-
|
|
168
|
-
/* @__PURE__ */ s("span", { children:
|
|
169
|
+
r.icon && /* @__PURE__ */ s(W, { name: r.icon, size: 20 }),
|
|
170
|
+
/* @__PURE__ */ s("span", { children: r.label })
|
|
169
171
|
]
|
|
170
172
|
}
|
|
171
173
|
) }, d)) }) });
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { SelectOption, ValueField } from '../Selectbox/SelectboxBase';
|
|
3
2
|
|
|
4
|
-
export type RadioGroupProps = {
|
|
3
|
+
export type RadioGroupProps<ListOption extends SelectOption> = {
|
|
5
4
|
id?: string;
|
|
6
5
|
name: string;
|
|
7
|
-
options:
|
|
6
|
+
options: ListOption[];
|
|
8
7
|
value: string;
|
|
9
8
|
readOnly?: boolean;
|
|
10
9
|
className?: string;
|
|
11
10
|
placeholder?: string;
|
|
12
11
|
onChange: (value: string) => void;
|
|
13
|
-
valueField?: ValueField
|
|
12
|
+
valueField?: ValueField<ListOption>;
|
|
14
13
|
};
|
|
15
|
-
declare const RadioGroup:
|
|
14
|
+
declare const RadioGroup: <ListOption extends SelectOption>({ options, value, valueField, onChange, }: RadioGroupProps<ListOption>) => import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export default RadioGroup;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SelectboxProps, SelectboxHandler } from './Selectbox';
|
|
3
|
+
import { SelectOption } from './SelectboxBase';
|
|
3
4
|
|
|
4
|
-
export type FormSelectboxProps = SelectboxProps & {
|
|
5
|
+
export type FormSelectboxProps<ListOption extends SelectOption> = SelectboxProps<ListOption> & {
|
|
5
6
|
name: string;
|
|
6
7
|
};
|
|
7
|
-
declare const _default:
|
|
8
|
+
declare const _default: <ListOption extends SelectOption>(props: FormSelectboxProps<ListOption> & {
|
|
9
|
+
ref?: React.Ref<SelectboxHandler>;
|
|
10
|
+
}) => React.ReactElement;
|
|
8
11
|
export default _default;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { SelectboxBaseProps, SelectboxBaseHandler } from './SelectboxBase';
|
|
2
|
+
import { SelectboxBaseProps, SelectboxBaseHandler, SelectOption } from './SelectboxBase';
|
|
3
3
|
import { SelectboxMultipleProps, SelectboxMultipleHandler } from './SelectboxMultiple';
|
|
4
4
|
|
|
5
|
-
export type SelectboxProps = (SelectboxBaseProps | SelectboxMultipleProps) & {
|
|
5
|
+
export type SelectboxProps<ListOption extends SelectOption> = (SelectboxBaseProps<ListOption> | SelectboxMultipleProps<ListOption>) & {
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export type SelectboxHandler = SelectboxBaseHandler | SelectboxMultipleHandler;
|
|
9
|
-
declare const _default:
|
|
9
|
+
declare const _default: <ListOption extends SelectOption>(props: SelectboxProps<ListOption> & {
|
|
10
|
+
ref?: React.Ref<SelectboxHandler>;
|
|
11
|
+
}) => React.ReactElement;
|
|
10
12
|
export default _default;
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export type ValueCallback = (option:
|
|
4
|
-
export type ValueField = ValueCallback | "id" | "value" | "label" | string;
|
|
3
|
+
export type ValueCallback<ListOption extends SelectOption> = (option: ListOption) => string;
|
|
4
|
+
export type ValueField<ListOption extends SelectOption> = ValueCallback<ListOption> | "id" | "value" | "label" | string;
|
|
5
5
|
export type SelectOption = {
|
|
6
6
|
id: string | number;
|
|
7
7
|
label: string;
|
|
8
8
|
value: string | number;
|
|
9
9
|
enable: boolean;
|
|
10
10
|
};
|
|
11
|
-
export type Action = {
|
|
11
|
+
export type Action<ListOption extends SelectOption> = {
|
|
12
12
|
type: "SETVALUE";
|
|
13
13
|
value: string;
|
|
14
14
|
} | {
|
|
15
15
|
type: "SETSELECT";
|
|
16
|
-
selected:
|
|
16
|
+
selected: ListOption;
|
|
17
17
|
};
|
|
18
|
-
export type SelectboxBaseProps = {
|
|
18
|
+
export type SelectboxBaseProps<ListOption extends SelectOption> = {
|
|
19
19
|
id?: string;
|
|
20
20
|
name: string;
|
|
21
|
-
options:
|
|
21
|
+
options: ListOption[];
|
|
22
22
|
value: string | number;
|
|
23
23
|
readOnly?: boolean;
|
|
24
24
|
className?: string;
|
|
25
25
|
placeholder?: string;
|
|
26
26
|
onChange: (value: string | number) => void;
|
|
27
|
-
valueField?: ValueField
|
|
27
|
+
valueField?: ValueField<ListOption>;
|
|
28
28
|
};
|
|
29
29
|
export type SelectboxBaseHandler = {
|
|
30
30
|
setValue: (value: string | number) => void;
|
|
31
31
|
};
|
|
32
|
-
declare const _default:
|
|
32
|
+
declare const _default: <ListOption extends SelectOption>(props: SelectboxBaseProps<ListOption> & {
|
|
33
|
+
ref?: React.Ref<SelectboxBaseHandler>;
|
|
34
|
+
}) => React.ReactElement;
|
|
33
35
|
export default _default;
|
|
@@ -4,16 +4,18 @@ import { SelectOption, ValueField } from './SelectboxBase';
|
|
|
4
4
|
export type SelectboxMultipleHandler = {
|
|
5
5
|
setValue: (value: string[]) => void;
|
|
6
6
|
};
|
|
7
|
-
export interface SelectboxMultipleProps {
|
|
7
|
+
export interface SelectboxMultipleProps<ListOption extends SelectOption> {
|
|
8
8
|
id?: string;
|
|
9
|
-
options:
|
|
9
|
+
options: ListOption[];
|
|
10
10
|
name: string;
|
|
11
11
|
value?: string[] | number[];
|
|
12
12
|
readOnly?: boolean;
|
|
13
13
|
className?: string;
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
onChange?: (value: string[] | number[]) => void;
|
|
16
|
-
valueField?: ValueField
|
|
16
|
+
valueField?: ValueField<ListOption>;
|
|
17
17
|
}
|
|
18
|
-
declare const _default:
|
|
18
|
+
declare const _default: <ListOption extends SelectOption>(props: SelectboxMultipleProps<ListOption> & {
|
|
19
|
+
ref?: React.Ref<SelectboxMultipleHandler>;
|
|
20
|
+
}) => React.ReactElement;
|
|
19
21
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SelectOption, ValueField } from './SelectboxBase';
|
|
2
2
|
|
|
3
|
-
export declare const getValue: (option:
|
|
3
|
+
export declare const getValue: <ListOption extends SelectOption>(option: ListOption, valueField: ValueField<ListOption>) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useLocalStorage: (name: string, defaultValue?:
|
|
1
|
+
export declare const useLocalStorage: <ValueType extends unknown>(name: string, defaultValue?: ValueType) => any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as m, jsx as
|
|
2
|
-
import o, { Fragment as
|
|
3
|
-
import { useLocalStorage as
|
|
1
|
+
import { jsxs as i, Fragment as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import o, { Fragment as w } from "react";
|
|
3
|
+
import { useLocalStorage as c } from "../../hooks/useLocalStorage.js";
|
|
4
4
|
import { t as u } from "../../bundle-mjs-SHnj3fHy.js";
|
|
5
5
|
import { X as h } from "../../transition-6o20faRl.js";
|
|
6
6
|
const p = (e, t) => t.type === "toggleSmMenu" ? {
|
|
@@ -9,10 +9,10 @@ const p = (e, t) => t.type === "toggleSmMenu" ? {
|
|
|
9
9
|
} : t.type === "toggleLgMenu" ? {
|
|
10
10
|
...e,
|
|
11
11
|
showLgMenu: !e.showLgMenu
|
|
12
|
-
} : e, M = ({ header: e, menu: t, menuType:
|
|
13
|
-
const [a, g] =
|
|
12
|
+
} : e, M = ({ header: e, menu: t, menuType: r = "static", children: d }, f) => {
|
|
13
|
+
const [a, g] = c("menuOpen", !0), [l, s] = o.useReducer(p, {
|
|
14
14
|
showSmMenu: !1,
|
|
15
|
-
showLgMenu:
|
|
15
|
+
showLgMenu: r === "fixed" ? !1 : a
|
|
16
16
|
});
|
|
17
17
|
return o.useImperativeHandle(f, () => ({
|
|
18
18
|
toggleMenu: () => {
|
|
@@ -24,10 +24,10 @@ const p = (e, t) => t.type === "toggleSmMenu" ? {
|
|
|
24
24
|
})), o.useEffect(() => {
|
|
25
25
|
s({
|
|
26
26
|
type: "setLgMenu",
|
|
27
|
-
menuOpen:
|
|
27
|
+
menuOpen: r === "fixed" ? !1 : a
|
|
28
28
|
});
|
|
29
|
-
}, [a,
|
|
30
|
-
/* @__PURE__ */
|
|
29
|
+
}, [a, r]), /* @__PURE__ */ i(m, { children: [
|
|
30
|
+
/* @__PURE__ */ n("div", { className: "fixed top-0 w-full left-0 right-0 z-10", children: e }),
|
|
31
31
|
/* @__PURE__ */ i(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
@@ -35,10 +35,10 @@ const p = (e, t) => t.type === "toggleSmMenu" ? {
|
|
|
35
35
|
"flex min-h-full w-full min-w-min flex-col pt-[56px]"
|
|
36
36
|
),
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ n(
|
|
39
39
|
h,
|
|
40
40
|
{
|
|
41
|
-
as:
|
|
41
|
+
as: w,
|
|
42
42
|
show: l.showSmMenu,
|
|
43
43
|
enter: "transform transition duration-300",
|
|
44
44
|
enterFrom: "-translate-y-0",
|
|
@@ -46,26 +46,27 @@ const p = (e, t) => t.type === "toggleSmMenu" ? {
|
|
|
46
46
|
leave: "transform transition duration-200 ease-in-out",
|
|
47
47
|
leaveFrom: "translate-y-0",
|
|
48
48
|
leaveTo: "-translate-y-full",
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ n("div", { className: "absolute bottom-0 top-14 z-10 flex w-full bg-white shadow dark:bg-gray-900 lg:hidden", children: t })
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
52
|
/* @__PURE__ */ i("div", { className: "flex w-full flex-auto", children: [
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ n(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
className: u(
|
|
57
|
-
"hidden w-[320px] shadow dark:shadow-gray-800 dark:bg-gray-900 lg:flex fixed top-[56px] left-0 bottom-0 transform transition duration-300",
|
|
57
|
+
"hidden w-[320px] shadow bg-white dark:shadow-gray-800 dark:bg-gray-900 lg:flex fixed top-[56px] left-0 bottom-0 transform transition duration-300",
|
|
58
|
+
r === "fixed" && "z-50",
|
|
58
59
|
l.showLgMenu === !0 ? "translate-x-0" : "-translate-x-full"
|
|
59
60
|
),
|
|
60
61
|
children: t
|
|
61
62
|
}
|
|
62
63
|
),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ n(
|
|
64
65
|
"div",
|
|
65
66
|
{
|
|
66
67
|
className: u(
|
|
67
68
|
"grow",
|
|
68
|
-
l.showLgMenu === !0 &&
|
|
69
|
+
l.showLgMenu === !0 && r === "static" ? "lg:pl-[320px]" : ""
|
|
69
70
|
),
|
|
70
71
|
children: d
|
|
71
72
|
}
|