@pnkx-lib/ui 1.5.2 → 1.5.4

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.
@@ -1,4 +1,4 @@
1
- import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-eibofcLw.js';
1
+ import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-eMq9KkOy.js';
2
2
  import { Select as Select$1, Radio, Checkbox } from 'antd';
3
3
 
4
4
  const Select = (props) => {
@@ -150,4 +150,4 @@ const CheckboxField = (props) => {
150
150
  };
151
151
 
152
152
  export { CheckboxField as C, RadioGroup as R, Select as S };
153
- //# sourceMappingURL=Checkbox-DCqaSxr5.js.map
153
+ //# sourceMappingURL=Checkbox-CJ_M7IzZ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox-Djkz94gB.js","sources":["../../src/components/fields/Select.tsx","../../src/components/fields/Radio.tsx","../../src/components/fields/Checkbox.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Select as SelectAntd, SelectProps } from \"antd\";\nimport get from \"lodash/get\";\nimport {\n ControllerRenderProps,\n UseFormSetValue,\n UseFormStateReturn,\n} from \"react-hook-form\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\nimport { Label } from \"../ui/Label\";\n\nexport interface SelectFieldProps extends SelectProps {\n field?: ControllerRenderProps<any, any>;\n formState?: UseFormStateReturn<any>;\n setValue?: UseFormSetValue<any>;\n label?: string;\n required?: boolean;\n afterOnChange?: (value: any) => void;\n customStyleContainer?: string;\n}\n\nexport const Select = (props: SelectFieldProps) => {\n //! State\n const {\n field,\n formState,\n label,\n required,\n afterOnChange,\n customStyleContainer,\n ...restProps\n } = props;\n\n const { name, value, onChange, onBlur } = field || {};\n const { touchedFields, errors, isSubmitted } = formState || {};\n const isTouched = get(touchedFields, name!);\n const errorMessage = get(errors, name!)?.message as string;\n\n //! Function\n const handleChange = (val: any) => {\n onChange?.(val);\n afterOnChange?.(val);\n };\n\n const renderErrorMessage = () => {\n if (!errorMessage) return null;\n return (\n <ErrorMessage\n errorMessage={errorMessage}\n isTouched={isTouched}\n isSubmitted={isSubmitted}\n />\n );\n };\n\n //! Render\n return (\n <div className={customStyleContainer}>\n {label && <Label label={label} required={required} />}\n\n <SelectAntd\n onChange={handleChange}\n onBlur={onBlur}\n value={value}\n style={{ width: \"100%\" }}\n optionLabelProp=\"label\"\n status={\n (isTouched || isSubmitted) && Boolean(errorMessage)\n ? \"error\"\n : undefined\n }\n {...restProps}\n />\n {renderErrorMessage()}\n </div>\n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Radio, RadioChangeEvent, RadioGroupProps } from \"antd\";\nimport { ControllerRenderProps, UseFormStateReturn } from \"react-hook-form\";\nimport get from \"lodash/get\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\nimport { Typography } from \"../ui/Typography\";\n\ntype TOptionGRadio = {\n label: string;\n value: string | number;\n};\n\ntype TPositionRadio = \"before\" | \"after\";\n\nexport interface RadioProps\n extends Omit<RadioGroupProps, \"options\" | \"onChange\"> {\n field?: ControllerRenderProps<any, any>;\n formState?: UseFormStateReturn<any>;\n customStyleRadioGroup?: string;\n customStyleRadio?: string;\n customStyleWrap?: string;\n afterOnChange?: (value: any) => void;\n options: TOptionGRadio[];\n position?: TPositionRadio;\n}\n\nexport const RadioGroup = (props: RadioProps) => {\n //! State\n const {\n field,\n formState,\n customStyleRadio,\n customStyleWrap = \"\",\n afterOnChange,\n options,\n ...restProps\n } = props;\n\n const { name, value, onChange } = field || {};\n const { touchedFields, errors, isSubmitted } = formState || {};\n const isTouched = get(touchedFields, name!);\n const errorMessage = get(errors, name!)?.message as string;\n\n //! Function\n const handleChange = (e: RadioChangeEvent) => {\n onChange?.(e);\n afterOnChange?.(e?.target?.value);\n };\n\n const renderErrorMessage = () => {\n if (!errorMessage) return null;\n return (\n <ErrorMessage\n errorMessage={errorMessage}\n isTouched={isTouched}\n isSubmitted={isSubmitted}\n />\n );\n };\n\n //! Render\n return (\n <div className={customStyleWrap}>\n <Radio.Group onChange={handleChange} value={value} {...restProps}>\n {options.map((item) => (\n <Radio\n key={`${name}-${item.value}`}\n value={item.value}\n className={customStyleRadio}\n >\n <Typography.Text> {item.label}</Typography.Text>\n </Radio>\n ))}\n </Radio.Group>\n {renderErrorMessage()}\n </div>\n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Checkbox, CheckboxProps } from \"antd\";\nimport { ControllerRenderProps, UseFormStateReturn } from \"react-hook-form\";\nimport get from \"lodash/get\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\nimport { Typography } from \"../ui/Typography\";\n\nexport interface CheckboxFieldProps\n extends Omit<CheckboxProps, \"onChange\" | \"checked\"> {\n field?: ControllerRenderProps<any, any>;\n formState?: UseFormStateReturn<any>;\n label?: string;\n required?: boolean;\n afterOnChange?: (checked: boolean) => void;\n customStyleContainer?: string;\n customStyleCheckbox?: string;\n}\n\nexport const CheckboxField = (props: CheckboxFieldProps) => {\n //! State\n const {\n field,\n formState,\n label,\n afterOnChange,\n customStyleContainer,\n customStyleCheckbox,\n ...restProps\n } = props;\n\n const { name, value, onChange, onBlur } = field || {};\n const { touchedFields, errors, isSubmitted } = formState || {};\n const isTouched = get(touchedFields, name!);\n const errorMessage = get(errors, name!)?.message as string;\n\n //! Function\n const handleChange: CheckboxProps[\"onChange\"] = (e) => {\n const checked = e.target.checked;\n onChange?.(checked);\n afterOnChange?.(checked);\n };\n\n const renderErrorMessage = () => {\n if (!errorMessage) return null;\n return (\n <ErrorMessage\n errorMessage={errorMessage}\n isTouched={isTouched}\n isSubmitted={isSubmitted}\n />\n );\n };\n\n //! Render\n return (\n <div className={customStyleContainer}>\n <Checkbox\n onBlur={onBlur}\n checked={!!value}\n onChange={handleChange}\n className={customStyleCheckbox}\n {...restProps}\n >\n <Typography.Text>{label}</Typography.Text>\n </Checkbox>\n\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,MAAO,CAAA,OAAA;AACzB,IAAA,QAAA,GAAW,OAAO,CAAA;AAClB,IAAA,aAAA,GAAgB,OAAO,CAAA;AAAA,GACzB;AAEA,EAAA,MAAM,qBAAqB,MAAM;AAC/B,IAAI,IAAA,CAAC,cAAqB,OAAA,IAAA;AAC1B,IACE,uBAAAD,qBAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,YAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,GAEJ;AAAA;AAGA,EACE,uBAAAC,sBAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,oBACd,EAAA,QAAA,EAAA;AAAA,oBAAAD,qBAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,MAAA;AAAA,QACA,OAAA,EAAS,CAAC,CAAC,KAAA;AAAA,QACX,QAAU,EAAA,YAAA;AAAA,QACV,SAAW,EAAA,mBAAA;AAAA,QACV,GAAG,SAAA;AAAA,QAEJ,QAAC,kBAAAA,qBAAA,CAAA,UAAA,CAAW,IAAX,EAAA,EAAiB,QAAM,EAAA,KAAA,EAAA;AAAA;AAAA,KAC1B;AAAA,IAEC,kBAAmB;AAAA,GACtB,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Checkbox-CJ_M7IzZ.js","sources":["../../src/components/fields/Select.tsx","../../src/components/fields/Radio.tsx","../../src/components/fields/Checkbox.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Select as SelectAntd, SelectProps } from \"antd\";\nimport get from \"lodash/get\";\nimport {\n ControllerRenderProps,\n UseFormSetValue,\n UseFormStateReturn,\n} from \"react-hook-form\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\nimport { Label } from \"../ui/Label\";\n\nexport interface SelectFieldProps extends SelectProps {\n field?: ControllerRenderProps<any, any>;\n formState?: UseFormStateReturn<any>;\n setValue?: UseFormSetValue<any>;\n label?: string;\n required?: boolean;\n afterOnChange?: (value: any) => void;\n customStyleContainer?: string;\n}\n\nexport const Select = (props: SelectFieldProps) => {\n //! State\n const {\n field,\n formState,\n label,\n required,\n afterOnChange,\n customStyleContainer,\n ...restProps\n } = props;\n\n const { name, value, onChange, onBlur } = field || {};\n const { touchedFields, errors, isSubmitted } = formState || {};\n const isTouched = get(touchedFields, name!);\n const errorMessage = get(errors, name!)?.message as string;\n\n //! Function\n const handleChange = (val: any) => {\n onChange?.(val);\n afterOnChange?.(val);\n };\n\n const renderErrorMessage = () => {\n if (!errorMessage) return null;\n return (\n <ErrorMessage\n errorMessage={errorMessage}\n isTouched={isTouched}\n isSubmitted={isSubmitted}\n />\n );\n };\n\n //! Render\n return (\n <div className={customStyleContainer}>\n {label && <Label label={label} required={required} />}\n\n <SelectAntd\n onChange={handleChange}\n onBlur={onBlur}\n value={value}\n style={{ width: \"100%\" }}\n optionLabelProp=\"label\"\n status={\n (isTouched || isSubmitted) && Boolean(errorMessage)\n ? \"error\"\n : undefined\n }\n {...restProps}\n />\n {renderErrorMessage()}\n </div>\n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Radio, RadioChangeEvent, RadioGroupProps } from \"antd\";\nimport { ControllerRenderProps, UseFormStateReturn } from \"react-hook-form\";\nimport get from \"lodash/get\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\nimport { Typography } from \"../ui/Typography\";\n\ntype TOptionGRadio = {\n label: string;\n value: string | number;\n};\n\ntype TPositionRadio = \"before\" | \"after\";\n\nexport interface RadioProps\n extends Omit<RadioGroupProps, \"options\" | \"onChange\"> {\n field?: ControllerRenderProps<any, any>;\n formState?: UseFormStateReturn<any>;\n customStyleRadioGroup?: string;\n customStyleRadio?: string;\n customStyleWrap?: string;\n afterOnChange?: (value: any) => void;\n options: TOptionGRadio[];\n position?: TPositionRadio;\n}\n\nexport const RadioGroup = (props: RadioProps) => {\n //! State\n const {\n field,\n formState,\n customStyleRadio,\n customStyleWrap = \"\",\n afterOnChange,\n options,\n ...restProps\n } = props;\n\n const { name, value, onChange } = field || {};\n const { touchedFields, errors, isSubmitted } = formState || {};\n const isTouched = get(touchedFields, name!);\n const errorMessage = get(errors, name!)?.message as string;\n\n //! Function\n const handleChange = (e: RadioChangeEvent) => {\n onChange?.(e);\n afterOnChange?.(e?.target?.value);\n };\n\n const renderErrorMessage = () => {\n if (!errorMessage) return null;\n return (\n <ErrorMessage\n errorMessage={errorMessage}\n isTouched={isTouched}\n isSubmitted={isSubmitted}\n />\n );\n };\n\n //! Render\n return (\n <div className={customStyleWrap}>\n <Radio.Group onChange={handleChange} value={value} {...restProps}>\n {options.map((item) => (\n <Radio\n key={`${name}-${item.value}`}\n value={item.value}\n className={customStyleRadio}\n >\n <Typography.Text> {item.label}</Typography.Text>\n </Radio>\n ))}\n </Radio.Group>\n {renderErrorMessage()}\n </div>\n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Checkbox, CheckboxProps } from \"antd\";\nimport { ControllerRenderProps, UseFormStateReturn } from \"react-hook-form\";\nimport get from \"lodash/get\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\nimport { Typography } from \"../ui/Typography\";\n\nexport interface CheckboxFieldProps\n extends Omit<CheckboxProps, \"onChange\" | \"checked\"> {\n field?: ControllerRenderProps<any, any>;\n formState?: UseFormStateReturn<any>;\n label?: string;\n required?: boolean;\n afterOnChange?: (checked: boolean) => void;\n customStyleContainer?: string;\n customStyleCheckbox?: string;\n}\n\nexport const CheckboxField = (props: CheckboxFieldProps) => {\n //! State\n const {\n field,\n formState,\n label,\n afterOnChange,\n customStyleContainer,\n customStyleCheckbox,\n ...restProps\n } = props;\n\n const { name, value, onChange, onBlur } = field || {};\n const { touchedFields, errors, isSubmitted } = formState || {};\n const isTouched = get(touchedFields, name!);\n const errorMessage = get(errors, name!)?.message as string;\n\n //! Function\n const handleChange: CheckboxProps[\"onChange\"] = (e) => {\n const checked = e.target.checked;\n onChange?.(checked);\n afterOnChange?.(checked);\n };\n\n const renderErrorMessage = () => {\n if (!errorMessage) return null;\n return (\n <ErrorMessage\n errorMessage={errorMessage}\n isTouched={isTouched}\n isSubmitted={isSubmitted}\n />\n );\n };\n\n //! Render\n return (\n <div className={customStyleContainer}>\n <Checkbox\n onBlur={onBlur}\n checked={!!value}\n onChange={handleChange}\n className={customStyleCheckbox}\n {...restProps}\n >\n <Typography.Text>{label}</Typography.Text>\n </Checkbox>\n\n {renderErrorMessage()}\n </div>\n );\n};\n"],"names":["jsx","jsxs","SelectAntd"],"mappings":";;;AAqBa,MAAA,MAAA,GAAS,CAAC,KAA4B,KAAA;AAAA;AAEjD,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,aAAA;AAAA,IACA,oBAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,EAAE,IAAM,EAAA,KAAA,EAAO,UAAU,MAAO,EAAA,GAAI,SAAS,EAAC;AACpD,EAAA,MAAM,EAAE,aAAe,EAAA,MAAA,EAAQ,WAAY,EAAA,GAAI,aAAa,EAAC;AAC7D,EAAM,MAAA,SAAA,GAAY,GAAI,CAAA,aAAA,EAAe,IAAK,CAAA;AAC1C,EAAA,MAAM,YAAe,GAAA,GAAA,CAAI,MAAQ,EAAA,IAAK,CAAG,EAAA,OAAA;AAAA;AAGzC,EAAM,MAAA,YAAA,GAAe,CAAC,GAAa,KAAA;AACjC,IAAA,QAAA,GAAW,GAAG,CAAA;AACd,IAAA,aAAA,GAAgB,GAAG,CAAA;AAAA,GACrB;AAEA,EAAA,MAAM,qBAAqB,MAAM;AAC/B,IAAI,IAAA,CAAC,cAAqB,OAAA,IAAA;AAC1B,IACE,uBAAAA,qBAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,YAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,GAEJ;AAAA;AAGA,EACE,uBAAAC,sBAAA,CAAC,KAA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a,EAAC;AAC7D,EAAM,MAAA,SAAA,GAAY,GAAI,CAAA,aAAA,EAAe,IAAK,CAAA;AAC1C,EAAA,MAAM,YAAe,GAAA,GAAA,CAAI,MAAQ,EAAA,IAAK,CAAG,EAAA,OAAA;AAAA;AAGzC,EAAM,MAAA,YAAA,GAA0C,CAAC,CAAM,KAAA;AACrD,IAAM,MAAA,OAAA,GAAU,EAAE,MAAO,CAAA,OAAA;AACzB,IAAA,QAAA,GAAW,OAAO,CAAA;AAClB,IAAA,aAAA,GAAgB,OAAO,CAAA;AAAA,GACzB;AAEA,EAAA,MAAM,qBAAqB,MAAM;AAC/B,IAAI,IAAA,CAAC,cAAqB,OAAA,IAAA;AAC1B,IACE,uBAAAD,qBAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,YAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,GAEJ;AAAA;AAGA,EACE,uBAAAC,sBAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,oBACd,EAAA,QAAA,EAAA;AAAA,oBAAAD,qBAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,MAAA;AAAA,QACA,OAAA,EAAS,CAAC,CAAC,KAAA;AAAA,QACX,QAAU,EAAA,YAAA;AAAA,QACV,SAAW,EAAA,mBAAA;AAAA,QACV,GAAG,SAAA;AAAA,QAEJ,QAAC,kBAAAA,qBAAA,CAAA,UAAA,CAAW,IAAX,EAAA,EAAiB,QAAM,EAAA,KAAA,EAAA;AAAA;AAAA,KAC1B;AAAA,IAEC,kBAAmB;AAAA,GACtB,EAAA,CAAA;AAEJ;;;;"}
@@ -1,10 +1,10 @@
1
- import { j as jsxRuntimeExports, b as Icon, _ as _extends, c as _typeof, u as useForm, P as PnkxField, I as Input, d as className, e as _arrayLikeToArray, f as _unsupportedIterableToArray, w as warningOnce, h as _createClass, i as _classCallCheck, k as _defineProperty, l as _slicedToArray, m as warning$1, n as canUseDom, o as _objectSpread2, p as updateCSS, r as removeCSS, q as _arrayWithHoles, s as _nonIterableRest, t as resetWarned$1, F as FastColor, v as generate, x as presetPrimaryColors, y as presetPalettes, z as _inherits, A as _createSuper, B as _assertThisInitialized, C as _objectWithoutProperties, G as IconContext } from './Switch-DKjEDP4L.js';
2
- import { Button as Button$1, Cascader, Space as Space$1, Card, Skeleton as Skeleton$1, Popconfirm, Typography, Table as Table$1, Modal as Modal$1, Tooltip as Tooltip$1, Tabs as Tabs$1, Popover as Popover$1, Badge as Badge$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Breadcrumb as Breadcrumb$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Divider as Divider$2 } from 'antd';
1
+ import { j as jsxRuntimeExports, b as Icon, _ as _extends, c as _typeof, u as useForm, P as PnkxField, I as Input, d as classNames, e as _arrayLikeToArray, f as _unsupportedIterableToArray, w as warningOnce, h as _createClass, i as _classCallCheck, k as _defineProperty, l as _slicedToArray, m as warning$1, n as canUseDom, o as _objectSpread2, p as updateCSS, r as removeCSS, q as _arrayWithHoles, s as _nonIterableRest, t as resetWarned$1, F as FastColor, v as generate, x as presetPrimaryColors, y as presetPalettes, z as _inherits, A as _createSuper, B as _assertThisInitialized, C as _objectWithoutProperties, G as IconContext } from './Switch-eMq9KkOy.js';
2
+ import { Button as Button$1, Cascader, Space as Space$1, Card, Skeleton as Skeleton$1, Popconfirm as Popconfirm$1, Typography, Table as Table$1, Modal as Modal$1, Tooltip as Tooltip$1, Tabs as Tabs$1, Popover as Popover$1, Badge as Badge$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Breadcrumb as Breadcrumb$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Divider as Divider$2, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
3
3
  import * as React from 'react';
4
4
  import React__default, { version as version$1, isValidElement, useState, useEffect, useContext, createContext, useRef, useLayoutEffect as useLayoutEffect$1, useMemo as useMemo$1 } from 'react';
5
- import ReactDOM__default from 'react-dom';
6
5
  import { useNavigate, useLocation } from 'react-router-dom';
7
6
  import { u as useToast } from './cloneDeep-BLYi2V0G.js';
7
+ import ReactDOM__default from 'react-dom';
8
8
 
9
9
  const Button = (props) => {
10
10
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { ...props });
@@ -2299,7 +2299,7 @@ const Table = ({
2299
2299
  const editable2 = isEditing(record);
2300
2300
  return editable2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
2301
2301
  /* @__PURE__ */ jsxRuntimeExports.jsx(
2302
- Popconfirm,
2302
+ Popconfirm$1,
2303
2303
  {
2304
2304
  title: "Bạn có chắc chắn muốn huỷ chỉnh sửa?",
2305
2305
  onConfirm: cancel,
@@ -2318,7 +2318,7 @@ const Table = ({
2318
2318
  color: "blue"
2319
2319
  }
2320
2320
  ),
2321
- /* @__PURE__ */ jsxRuntimeExports.jsx(Popconfirm, { title: "Bạn có muốn xoá ?", onConfirm: () => {
2321
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Popconfirm$1, { title: "Bạn có muốn xoá ?", onConfirm: () => {
2322
2322
  }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2323
2323
  Button,
2324
2324
  {
@@ -2407,12 +2407,7 @@ const Table = ({
2407
2407
  return renderTableContent();
2408
2408
  };
2409
2409
 
2410
- const Modal = ({
2411
- children,
2412
- onOk,
2413
- onSubmit,
2414
- ...rest
2415
- }) => {
2410
+ const Modal = ({ children, onOk, onSubmit, ...rest }) => {
2416
2411
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal$1, { onOk: onSubmit ? onSubmit : onOk, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-h-[20rem] overflow-y-auto", children: onSubmit ? /* @__PURE__ */ jsxRuntimeExports.jsx("form", { onSubmit, children }) : children }) });
2417
2412
  };
2418
2413
 
@@ -2548,13 +2543,13 @@ const SearchFiltersForm = ({
2548
2543
 
2549
2544
  const Container = ({
2550
2545
  children,
2551
- className: className$1,
2546
+ className,
2552
2547
  size
2553
2548
  }) => {
2554
2549
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
2555
2550
  "div",
2556
2551
  {
2557
- className: className(size, "mx-auto px-4 sm:px-6 lg:px-8", className$1),
2552
+ className: classNames(size, "mx-auto px-4 sm:px-6 lg:px-8", className),
2558
2553
  children
2559
2554
  }
2560
2555
  );
@@ -4359,7 +4354,7 @@ var parseStyle = function parseStyle(interpolation) {
4359
4354
  function uniqueHash(path, styleStr) {
4360
4355
  return murmur2("".concat(path.join('%')).concat(styleStr));
4361
4356
  }
4362
- function Empty() {
4357
+ function Empty$1() {
4363
4358
  return null;
4364
4359
  }
4365
4360
  var STYLE_PREFIX = 'style';
@@ -4509,7 +4504,7 @@ function useStyleRegister(info, styleFn) {
4509
4504
  return function (node) {
4510
4505
  var styleNode;
4511
4506
  if (!ssrInline || isMergedClientSide || !defaultCache) {
4512
- styleNode = /*#__PURE__*/React.createElement(Empty, null);
4507
+ styleNode = /*#__PURE__*/React.createElement(Empty$1, null);
4513
4508
  } else {
4514
4509
  var _ref6;
4515
4510
  styleNode = /*#__PURE__*/React.createElement("style", _extends({}, (_ref6 = {}, _defineProperty(_ref6, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
@@ -7350,7 +7345,7 @@ function genCSSMotion(config) {
7350
7345
  }
7351
7346
  var motionCls = getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix));
7352
7347
  motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
7353
- className: className(getTransitionName(motionName, status), _defineProperty(_defineProperty({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName === 'string')),
7348
+ className: classNames(getTransitionName(motionName, status), _defineProperty(_defineProperty({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName === 'string')),
7354
7349
  style: statusStyle
7355
7350
  }), setNodeRef);
7356
7351
  }
@@ -8292,7 +8287,7 @@ const generateId = (() => {
8292
8287
  const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
8293
8288
  const {
8294
8289
  prefixCls: customizePrefixCls,
8295
- className: className$1,
8290
+ className,
8296
8291
  trigger,
8297
8292
  children,
8298
8293
  defaultCollapsed = false,
@@ -8370,7 +8365,7 @@ const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
8370
8365
  // special trigger when collapsedWidth == 0
8371
8366
  const zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? (/*#__PURE__*/React.createElement("span", {
8372
8367
  onClick: toggle,
8373
- className: className(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? 'right' : 'left'}`),
8368
+ className: classNames(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? 'right' : 'left'}`),
8374
8369
  style: zeroWidthTriggerStyle
8375
8370
  }, trigger || /*#__PURE__*/React.createElement(RefIcon$6, null))) : null;
8376
8371
  const reverseIcon = direction === 'rtl' === !reverseArrow;
@@ -8393,12 +8388,12 @@ const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
8393
8388
  minWidth: siderWidth,
8394
8389
  width: siderWidth
8395
8390
  });
8396
- const siderCls = className(prefixCls, `${prefixCls}-${theme}`, {
8391
+ const siderCls = classNames(prefixCls, `${prefixCls}-${theme}`, {
8397
8392
  [`${prefixCls}-collapsed`]: !!collapsed,
8398
8393
  [`${prefixCls}-has-trigger`]: collapsible && trigger !== null && !zeroWidthTrigger,
8399
8394
  [`${prefixCls}-below`]: !!below,
8400
8395
  [`${prefixCls}-zero-width`]: parseFloat(siderWidth) === 0
8401
- }, className$1, hashId, cssVarCls);
8396
+ }, className, hashId, cssVarCls);
8402
8397
  const contextValue = React.useMemo(() => ({
8403
8398
  siderCollapsed: collapsed
8404
8399
  }), [collapsed]);
@@ -8458,7 +8453,7 @@ const Basic = /*#__PURE__*/React.forwardRef((props, ref) => {
8458
8453
  const {
8459
8454
  prefixCls: customizePrefixCls,
8460
8455
  suffixCls,
8461
- className: className$1,
8456
+ className,
8462
8457
  tagName: TagName
8463
8458
  } = props,
8464
8459
  others = __rest(props, ["prefixCls", "suffixCls", "className", "tagName"]);
@@ -8469,7 +8464,7 @@ const Basic = /*#__PURE__*/React.forwardRef((props, ref) => {
8469
8464
  const [wrapSSR, hashId, cssVarCls] = useStyle$1(prefixCls);
8470
8465
  const prefixWithSuffixCls = suffixCls ? `${prefixCls}-${suffixCls}` : prefixCls;
8471
8466
  return wrapSSR(/*#__PURE__*/React.createElement(TagName, Object.assign({
8472
- className: className(customizePrefixCls || prefixWithSuffixCls, className$1, hashId, cssVarCls),
8467
+ className: classNames(customizePrefixCls || prefixWithSuffixCls, className, hashId, cssVarCls),
8473
8468
  ref: ref
8474
8469
  }, others)));
8475
8470
  });
@@ -8480,7 +8475,7 @@ const BasicLayout = /*#__PURE__*/React.forwardRef((props, ref) => {
8480
8475
  const [siders, setSiders] = React.useState([]);
8481
8476
  const {
8482
8477
  prefixCls: customizePrefixCls,
8483
- className: className$1,
8478
+ className,
8484
8479
  rootClassName,
8485
8480
  children,
8486
8481
  hasSider,
@@ -8497,10 +8492,10 @@ const BasicLayout = /*#__PURE__*/React.forwardRef((props, ref) => {
8497
8492
  const prefixCls = getPrefixCls('layout', customizePrefixCls);
8498
8493
  const mergedHasSider = useHasSider(siders, children, hasSider);
8499
8494
  const [wrapCSSVar, hashId, cssVarCls] = useStyle$1(prefixCls);
8500
- const classString = className(prefixCls, {
8495
+ const classString = classNames(prefixCls, {
8501
8496
  [`${prefixCls}-has-sider`]: mergedHasSider,
8502
8497
  [`${prefixCls}-rtl`]: direction === 'rtl'
8503
- }, contextClassName, className$1, rootClassName, hashId, cssVarCls);
8498
+ }, contextClassName, className, rootClassName, hashId, cssVarCls);
8504
8499
  const contextValue = React.useMemo(() => ({
8505
8500
  siderHook: {
8506
8501
  addSider: id => {
@@ -11716,11 +11711,8 @@ const getDefaultConfig = () => {
11716
11711
  };
11717
11712
  const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
11718
11713
 
11719
- function classNames(...classes) {
11720
- return classes.filter(Boolean).join(" ");
11721
- }
11722
11714
  const userInfo = {
11723
- avatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
11715
+ avatar: "https://img.freepik.com/premium-vector/character-avatar-isolated_729149-194801.jpg?semt=ais_hybrid&w=740",
11724
11716
  name: "username",
11725
11717
  email: "gmail@gmail.com"
11726
11718
  };
@@ -11731,17 +11723,17 @@ const languageInfo = {
11731
11723
  const bottomMenu = [
11732
11724
  {
11733
11725
  key: "user",
11734
- icon: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "h-8 w-8 rounded-md", src: userInfo.avatar, alt: "" }),
11735
- label: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col whitespace-nowrap", children: [
11736
- /* @__PURE__ */ jsxRuntimeExports.jsx(
11737
- "a",
11738
- {
11739
- href: "#",
11740
- className: "text-sm font-semibold leading-6 text-white group-hover:text-black",
11741
- children: userInfo.name
11742
- }
11743
- ),
11744
- /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: "#", className: "text-xs text-gray-300 group-hover:text-black", children: userInfo.email })
11726
+ icon: /* @__PURE__ */ jsxRuntimeExports.jsx(
11727
+ "img",
11728
+ {
11729
+ className: "h-8 w-8 rounded-md object-cover",
11730
+ src: userInfo.avatar,
11731
+ alt: ""
11732
+ }
11733
+ ),
11734
+ label: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-[32px]", children: [
11735
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-semibold text-white group-hover:text-black", children: userInfo.name }),
11736
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-300", children: userInfo.email })
11745
11737
  ] }),
11746
11738
  show: true
11747
11739
  },
@@ -11839,7 +11831,10 @@ const Sidebar = ({ children, menu }) => {
11839
11831
  /* @__PURE__ */ jsxRuntimeExports.jsx(
11840
11832
  "div",
11841
11833
  {
11842
- className: `relative group ${!collapse ? "hover:bg-[#FFFFFF]" : ""} rounded-bl-full rounded-tl-full hover:text-black`,
11834
+ className: twMerge(
11835
+ "relative group rounded-bl-full rounded-tl-full hover:text-black",
11836
+ !collapse && "hover:bg-[#FFFFFF]"
11837
+ ),
11843
11838
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
11844
11839
  "a",
11845
11840
  {
@@ -11848,7 +11843,7 @@ const Sidebar = ({ children, menu }) => {
11848
11843
  setCollapse(false);
11849
11844
  setOpenSubCollapse(true);
11850
11845
  },
11851
- className: classNames(
11846
+ className: twMerge(
11852
11847
  item.href === activeMainMenu || item.href === pathUrl ? "bg-white text-black hover:text-black" : "text-white hover:bg-[#FFFFFF] hover:text-black",
11853
11848
  `py-2 rounded-md mt-2 text-sm whitespace-nowrap leading-6 font-semibold relative z-10 ${collapse ? "pl-4 mr-2" : "rounded-bl-full rounded-tl-full justify-center "} flex items-center gap-2`
11854
11849
  ),
@@ -11862,14 +11857,13 @@ const Sidebar = ({ children, menu }) => {
11862
11857
  }
11863
11858
  )
11864
11859
  ] }, item.name)) }),
11865
- bottomMenu.map(
11860
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-auto pb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: bottomMenu.map(
11866
11861
  (bm) => bm.show && /* @__PURE__ */ jsxRuntimeExports.jsx(
11867
11862
  "li",
11868
11863
  {
11869
- className: classNames(
11864
+ className: twMerge(
11870
11865
  "-mx-2 list-none flex items-center gap-4 rounded-md whitespace-nowrap group cursor-pointer",
11871
- bm.extraClass || "",
11872
- bm.key === "user" ? "mt-auto" : ""
11866
+ bm.extraClass || ""
11873
11867
  ),
11874
11868
  onClick: () => toast(),
11875
11869
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "hover:bg-[#FFFFFF] flex items-center w-full ml-2 mr-2 whitespace-nowrap gap-2 p-2 rounded-md", children: [
@@ -11879,7 +11873,7 @@ const Sidebar = ({ children, menu }) => {
11879
11873
  },
11880
11874
  bm.key
11881
11875
  )
11882
- )
11876
+ ) }) })
11883
11877
  ] })
11884
11878
  ]
11885
11879
  }
@@ -11888,9 +11882,7 @@ const Sidebar = ({ children, menu }) => {
11888
11882
  "button",
11889
11883
  {
11890
11884
  onClick: () => setOpenSubCollapse(false),
11891
- className: `absolute top-1/19 transform -translate-y-1/2 cursor-pointer bg-white z-10 text-[#3078BD] rounded-full w-10 h-10 flex items-center justify-center shadow transition-all duration-300
11892
- left-44 sm:left-40 md:left-48 lg:left-66
11893
- `,
11885
+ className: "absolute top-1/19 transform -translate-y-1/2 cursor-pointer bg-white z-10 text-[#3078BD] rounded-full w-10 h-10 flex items-center justify-center shadow transition-all duration-300 left-44 sm:left-40 md:left-48 lg:left-66",
11894
11886
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ForwardRef$3, { className: "w-4 h-4" })
11895
11887
  }
11896
11888
  ),
@@ -11899,7 +11891,10 @@ const Sidebar = ({ children, menu }) => {
11899
11891
  /* @__PURE__ */ jsxRuntimeExports.jsx(
11900
11892
  "nav",
11901
11893
  {
11902
- className: `flex flex-1 transition-all duration-300 flex-col ${collapse ? "mt-0" : "mt-6"}`,
11894
+ className: twMerge(
11895
+ "flex flex-1 transition-all duration-300 flex-col",
11896
+ collapse ? "mt-0" : "mt-6"
11897
+ ),
11903
11898
  children: activeMenu && /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { role: "list", className: "-mx-2 space-y-1 cursor-pointer mt-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [
11904
11899
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
11905
11900
  "a",
@@ -11908,7 +11903,7 @@ const Sidebar = ({ children, menu }) => {
11908
11903
  handleOpenSubmenu(activeMenu.name);
11909
11904
  router(activeMenu.href);
11910
11905
  },
11911
- className: classNames(
11906
+ className: twMerge(
11912
11907
  activeMenu.href === pathUrl ? "bg-[#EEEEF0] text-black" : "text-gray-700 hover:bg-[#EEEEF0]",
11913
11908
  "group flex gap-x-3 rounded-md p-2 text-sm leading-6 transition-all duration-300 font-semibold items-center"
11914
11909
  ),
@@ -11923,7 +11918,7 @@ const Sidebar = ({ children, menu }) => {
11923
11918
  "li",
11924
11919
  {
11925
11920
  onClick: () => router(sub.href),
11926
- className: classNames(
11921
+ className: twMerge(
11927
11922
  sub.href === pathUrl ? "bg-[#EEEEF0] text-black" : "",
11928
11923
  "text-xs hover:bg-[#EEEEF0] transition-all duration-300 mt-2 rounded-md py-2 flex items-center gap-2 p-2"
11929
11924
  ),
@@ -11957,7 +11952,7 @@ const Heading = (props) => {
11957
11952
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
11958
11953
  "div",
11959
11954
  {
11960
- className: className(
11955
+ className: classNames(
11961
11956
  "flex justify-between items-end ",
11962
11957
  classNameWrapHeading
11963
11958
  ),
@@ -11983,5 +11978,197 @@ const Divider = ({ children, ...rest }) => {
11983
11978
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Divider$2, { ...rest, children });
11984
11979
  };
11985
11980
 
11986
- export { Button as B, CascaderField as C, Dropdown as D, Flex as F, Heading as H, Layout as L, Modal as M, Popover as P, Row as R, Skeleton as S, Table as T, Tooltip as a, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider as o, typeColorMap as t };
11987
- //# sourceMappingURL=Divider-RlbRBxOQ.js.map
11981
+ const Alert = (props) => {
11982
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert$1, { ...props });
11983
+ };
11984
+
11985
+ const Spin = ({ children, ...rest }) => {
11986
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Spin$1, { ...rest, children });
11987
+ };
11988
+
11989
+ const Drawer = ({ onSubmit, children, ...rest }) => {
11990
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Drawer$1, { ...rest, children: onSubmit ? /* @__PURE__ */ jsxRuntimeExports.jsx(
11991
+ "form",
11992
+ {
11993
+ id: "pnkx-form",
11994
+ onSubmit: (e) => {
11995
+ e.preventDefault();
11996
+ onSubmit?.(e);
11997
+ },
11998
+ method: "POST",
11999
+ children
12000
+ }
12001
+ ) : children });
12002
+ };
12003
+
12004
+ const Popconfirm = ({ children, ...rest }) => {
12005
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Popconfirm$1, { ...rest, children });
12006
+ };
12007
+
12008
+ const QRCode = (props) => {
12009
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(QRCode$1, { ...props });
12010
+ };
12011
+
12012
+ const Result = ({ children, ...rest }) => {
12013
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Result$1, { ...rest, children });
12014
+ };
12015
+
12016
+ const Rate = (props) => {
12017
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Rate$1, { ...props });
12018
+ };
12019
+
12020
+ const Segmented = (props) => {
12021
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Segmented$1, { ...props });
12022
+ };
12023
+
12024
+ const Statistic = (props) => {
12025
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Statistic$1, { ...props });
12026
+ };
12027
+
12028
+ const Timeline = (props) => {
12029
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Timeline$1, { ...props });
12030
+ };
12031
+
12032
+ const Tour = (props) => {
12033
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tour$1, { ...props });
12034
+ };
12035
+
12036
+ const Tree = (props) => {
12037
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Tree$1, { ...props });
12038
+ };
12039
+
12040
+ const Watermark = ({ ...rest }) => {
12041
+ const { Paragraph } = Typography;
12042
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex$1, { gap: "middle", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Watermark$1, { ...rest, children: [
12043
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { children: [
12044
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "The light-speed iteration of the digital world makes products more complex. However, human consciousness and attention resources are limited. Facing this design contradiction, the pursuit of natural interaction will be the consistent direction of Ant Design." }),
12045
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "Natural user cognition: According to cognitive psychology, about 80% of external information is obtained through visual channels. The most important visual elements in the interface design, including layout, colors, illustrations, icons, etc., should fully absorb the laws of nature, thereby reducing the user's cognitive cost and bringing authentic and smooth feelings. In some scenarios, opportunely adding other sensory channels such as hearing, touch can create a richer and more natural product experience." }),
12046
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "Natural user behavior: In the interaction with the system, the designer should fully understand the relationship between users, system roles, and task objectives, and also contextually organize system functions and services. At the same time, a series of methods such as behavior analysis, artificial intelligence and sensors could be applied to assist users to make effective decisions and reduce extra operations of users, to save users' mental and physical resources and make human-computer interaction more natural." })
12047
+ ] }),
12048
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
12049
+ "img",
12050
+ {
12051
+ style: {
12052
+ zIndex: 10,
12053
+ width: "100%",
12054
+ maxWidth: 800,
12055
+ position: "relative"
12056
+ },
12057
+ src: "https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ",
12058
+ alt: "img"
12059
+ }
12060
+ )
12061
+ ] }) });
12062
+ };
12063
+
12064
+ const AnchorContext = /*#__PURE__*/React.createContext(undefined);
12065
+
12066
+ const AnchorLink = props => {
12067
+ const {
12068
+ href,
12069
+ title,
12070
+ prefixCls: customizePrefixCls,
12071
+ children,
12072
+ className,
12073
+ target,
12074
+ replace
12075
+ } = props;
12076
+ const context = React.useContext(AnchorContext);
12077
+ const {
12078
+ registerLink,
12079
+ unregisterLink,
12080
+ scrollTo,
12081
+ onClick,
12082
+ activeLink,
12083
+ direction
12084
+ } = context || {};
12085
+ React.useEffect(() => {
12086
+ registerLink === null || registerLink === void 0 ? void 0 : registerLink(href);
12087
+ return () => {
12088
+ unregisterLink === null || unregisterLink === void 0 ? void 0 : unregisterLink(href);
12089
+ };
12090
+ }, [href]);
12091
+ const handleClick = e => {
12092
+ onClick === null || onClick === void 0 ? void 0 : onClick(e, {
12093
+ title,
12094
+ href
12095
+ });
12096
+ scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
12097
+ // Support clicking on an anchor does not record history.
12098
+ if (e.defaultPrevented) {
12099
+ return;
12100
+ }
12101
+ const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
12102
+ // Support external link
12103
+ if (isExternalLink) {
12104
+ if (replace) {
12105
+ e.preventDefault();
12106
+ window.location.replace(href);
12107
+ }
12108
+ return;
12109
+ }
12110
+ // Handling internal anchor link
12111
+ e.preventDefault();
12112
+ const historyMethod = replace ? 'replaceState' : 'pushState';
12113
+ window.history[historyMethod](null, '', href);
12114
+ };
12115
+ // =================== Warning =====================
12116
+ if (process.env.NODE_ENV !== 'production') {
12117
+ const warning = devUseWarning('Anchor.Link');
12118
+ process.env.NODE_ENV !== "production" ? warning(!children || direction !== 'horizontal', 'usage', '`Anchor.Link children` is not supported when `Anchor` direction is horizontal') : void 0;
12119
+ }
12120
+ const {
12121
+ getPrefixCls
12122
+ } = React.useContext(ConfigContext);
12123
+ const prefixCls = getPrefixCls('anchor', customizePrefixCls);
12124
+ const active = activeLink === href;
12125
+ const wrapperClassName = classNames(`${prefixCls}-link`, className, {
12126
+ [`${prefixCls}-link-active`]: active
12127
+ });
12128
+ const titleClassName = classNames(`${prefixCls}-link-title`, {
12129
+ [`${prefixCls}-link-title-active`]: active
12130
+ });
12131
+ return /*#__PURE__*/React.createElement("div", {
12132
+ className: wrapperClassName
12133
+ }, /*#__PURE__*/React.createElement("a", {
12134
+ className: titleClassName,
12135
+ href: href,
12136
+ title: typeof title === 'string' ? title : '',
12137
+ target: target,
12138
+ onClick: handleClick
12139
+ }, title), direction !== 'horizontal' ? children : null);
12140
+ };
12141
+
12142
+ const AnchorComponent = (props) => {
12143
+ const { containerClassName, spaceClassName, ...restProps } = props;
12144
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor$1, { className: spaceClassName, ...restProps }) });
12145
+ };
12146
+ AnchorComponent.Link = AnchorLink;
12147
+ const Anchor = AnchorComponent;
12148
+
12149
+ const Appfix = ({ children, ...rest }) => {
12150
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Affix, { ...rest, children });
12151
+ };
12152
+
12153
+ const AutoComplete = (props) => {
12154
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(AutoComplete$1, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input$1, {}) });
12155
+ };
12156
+
12157
+ const PnkxCollapse = (props) => {
12158
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Collapse, { ...props });
12159
+ };
12160
+
12161
+ const PnkxColorPicker = (props) => {
12162
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ColorPicker, { ...props });
12163
+ };
12164
+
12165
+ const Empty = (props) => {
12166
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Empty$2, { ...props });
12167
+ };
12168
+
12169
+ const Image = (props) => {
12170
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Image$1, { ...props });
12171
+ };
12172
+
12173
+ export { Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, Watermark as W, Tooltip as a, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
12174
+ //# sourceMappingURL=Image-BfsZyfy4.js.map