@j2-health/design-system 0.3.2 → 0.4.0

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.
Files changed (98) hide show
  1. package/README.md +53 -20
  2. package/dist/src/components/alert/Alert.cjs +12 -2
  3. package/dist/src/components/alert/Alert.cjs.map +1 -1
  4. package/dist/src/components/alert/Alert.d.ts +1 -1
  5. package/dist/src/components/alert/Alert.js +12 -2
  6. package/dist/src/components/alert/Alert.js.map +1 -1
  7. package/dist/src/components/alert/Alert.module.css.cjs +1 -1
  8. package/dist/src/components/alert/Alert.module.css.js +1 -1
  9. package/dist/src/components/card/Card.cjs +1 -1
  10. package/dist/src/components/card/Card.cjs.map +1 -1
  11. package/dist/src/components/card/Card.js +1 -1
  12. package/dist/src/components/card/Card.js.map +1 -1
  13. package/dist/src/components/collapse/Collapse.module.css.cjs +3 -3
  14. package/dist/src/components/collapse/Collapse.module.css.js +3 -3
  15. package/dist/src/components/drawer/Drawer.cjs +3 -1
  16. package/dist/src/components/drawer/Drawer.cjs.map +1 -1
  17. package/dist/src/components/drawer/Drawer.js +3 -1
  18. package/dist/src/components/drawer/Drawer.js.map +1 -1
  19. package/dist/src/components/form/Form.cjs +21 -4
  20. package/dist/src/components/form/Form.cjs.map +1 -1
  21. package/dist/src/components/form/Form.d.ts +10 -3
  22. package/dist/src/components/form/Form.js +20 -3
  23. package/dist/src/components/form/Form.js.map +1 -1
  24. package/dist/src/components/form/FormItem.cjs +42 -0
  25. package/dist/src/components/form/FormItem.cjs.map +1 -0
  26. package/dist/src/components/form/FormItem.d.ts +10 -0
  27. package/dist/src/components/form/FormItem.js +42 -0
  28. package/dist/src/components/form/FormItem.js.map +1 -0
  29. package/dist/src/components/form/FormItemFieldContext.cjs +8 -0
  30. package/dist/src/components/form/FormItemFieldContext.cjs.map +1 -0
  31. package/dist/src/components/form/FormItemFieldContext.d.ts +2 -0
  32. package/dist/src/components/form/FormItemFieldContext.js +8 -0
  33. package/dist/src/components/form/FormItemFieldContext.js.map +1 -0
  34. package/dist/src/components/form/FormikField.cjs +20 -0
  35. package/dist/src/components/form/FormikField.cjs.map +1 -0
  36. package/dist/src/components/form/FormikField.d.ts +8 -0
  37. package/dist/src/components/form/FormikField.js +20 -0
  38. package/dist/src/components/form/FormikField.js.map +1 -0
  39. package/dist/src/components/input/AntdInput.d.ts +72 -26
  40. package/dist/src/components/input/AntdSearchInput.d.ts +77 -25
  41. package/dist/src/components/input/Input.cjs +29 -3
  42. package/dist/src/components/input/Input.cjs.map +1 -1
  43. package/dist/src/components/input/Input.d.ts +4 -3
  44. package/dist/src/components/input/Input.js +29 -3
  45. package/dist/src/components/input/Input.js.map +1 -1
  46. package/dist/src/components/inputnumber/InputNumber.cjs +20 -5
  47. package/dist/src/components/inputnumber/InputNumber.cjs.map +1 -1
  48. package/dist/src/components/inputnumber/InputNumber.d.ts +4 -3
  49. package/dist/src/components/inputnumber/InputNumber.js +19 -4
  50. package/dist/src/components/inputnumber/InputNumber.js.map +1 -1
  51. package/dist/src/components/inputnumber/InputNumber.module.css.cjs +1 -1
  52. package/dist/src/components/inputnumber/InputNumber.module.css.js +1 -1
  53. package/dist/src/components/modal/Modal.cjs +0 -1
  54. package/dist/src/components/modal/Modal.cjs.map +1 -1
  55. package/dist/src/components/modal/Modal.js +0 -1
  56. package/dist/src/components/modal/Modal.js.map +1 -1
  57. package/dist/src/components/notification/Notification.module.css.cjs +1 -1
  58. package/dist/src/components/notification/Notification.module.css.js +1 -1
  59. package/dist/src/components/notification/useNotification.cjs +5 -2
  60. package/dist/src/components/notification/useNotification.cjs.map +1 -1
  61. package/dist/src/components/notification/useNotification.js +5 -2
  62. package/dist/src/components/notification/useNotification.js.map +1 -1
  63. package/dist/src/components/pagination/Pagination.cjs +2 -0
  64. package/dist/src/components/pagination/Pagination.cjs.map +1 -1
  65. package/dist/src/components/pagination/Pagination.js +2 -0
  66. package/dist/src/components/pagination/Pagination.js.map +1 -1
  67. package/dist/src/components/popover/Popover.cjs +3 -1
  68. package/dist/src/components/popover/Popover.cjs.map +1 -1
  69. package/dist/src/components/popover/Popover.d.ts +1 -1
  70. package/dist/src/components/popover/Popover.js +3 -1
  71. package/dist/src/components/popover/Popover.js.map +1 -1
  72. package/dist/src/components/popover/Popover.module.css.cjs +9 -9
  73. package/dist/src/components/popover/Popover.module.css.js +9 -9
  74. package/dist/src/components/select/Select.cjs +29 -13
  75. package/dist/src/components/select/Select.cjs.map +1 -1
  76. package/dist/src/components/select/Select.js +29 -13
  77. package/dist/src/components/select/Select.js.map +1 -1
  78. package/dist/src/components/select/SummarizedSelect.cjs.map +1 -1
  79. package/dist/src/components/select/SummarizedSelect.js.map +1 -1
  80. package/dist/src/components/select/SummarizedSelect.module.css.cjs +8 -8
  81. package/dist/src/components/select/SummarizedSelect.module.css.js +8 -8
  82. package/dist/src/components/steps/Steps.cjs +14 -4
  83. package/dist/src/components/steps/Steps.cjs.map +1 -1
  84. package/dist/src/components/steps/Steps.d.ts +3 -3
  85. package/dist/src/components/steps/Steps.js +14 -4
  86. package/dist/src/components/steps/Steps.js.map +1 -1
  87. package/dist/src/components/table/Table.cjs +1 -1
  88. package/dist/src/components/table/Table.cjs.map +1 -1
  89. package/dist/src/components/table/Table.d.ts +4 -1
  90. package/dist/src/components/table/Table.js +1 -1
  91. package/dist/src/components/table/Table.js.map +1 -1
  92. package/dist/src/components/tag/Tag.cjs +4 -0
  93. package/dist/src/components/tag/Tag.cjs.map +1 -1
  94. package/dist/src/components/tag/Tag.d.ts +1 -1
  95. package/dist/src/components/tag/Tag.js +4 -0
  96. package/dist/src/components/tag/Tag.js.map +1 -1
  97. package/dist/style.css +92 -78
  98. package/package.json +11 -13
@@ -1,9 +1,10 @@
1
- import { InputNumberProps } from 'formik-antd';
2
- type Props = Expand<InputNumberProps> & {
1
+ import { InputNumberProps } from 'antd';
2
+ import { FormikFieldProps } from '../form/FormikField.js';
3
+ type Props = Expand<InputNumberProps & FormikFieldProps> & {
3
4
  name: string;
4
5
  max?: number;
5
6
  min?: number;
6
7
  step?: number;
7
8
  };
8
- export declare const InputNumber: ({ size, step, name, max, min, ...props }: Props) => import("react").JSX.Element;
9
+ export declare const InputNumber: ({ size, step, name, max, min, validate, fast, onChange, onBlur, ...props }: Props) => import("react").JSX.Element;
9
10
  export {};
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { InputNumber as InputNumber$1 } from "formik-antd";
2
+ import { InputNumber as InputNumber$1 } from "antd";
3
+ import { FormikField } from "../form/FormikField.js";
3
4
  import cx from "classnames";
4
5
  import styles from "./InputNumber.module.css.js";
5
6
  import { CaretDownIcon, CaretUpIcon } from "@phosphor-icons/react";
@@ -9,12 +10,17 @@ const InputNumber = ({
9
10
  name,
10
11
  max,
11
12
  min,
13
+ validate,
14
+ fast,
15
+ onChange,
16
+ onBlur,
12
17
  ...props
13
18
  }) => {
14
- return /* @__PURE__ */ jsx(
19
+ return /* @__PURE__ */ jsx(FormikField, { name, validate, fast, children: ({ field, form }) => /* @__PURE__ */ jsx(
15
20
  InputNumber$1,
16
21
  {
17
22
  name,
23
+ id: name,
18
24
  max,
19
25
  min,
20
26
  step,
@@ -22,9 +28,18 @@ const InputNumber = ({
22
28
  upHandler: /* @__PURE__ */ jsx(CaretUpIcon, { weight: "bold", size: 12 }),
23
29
  downHandler: /* @__PURE__ */ jsx(CaretDownIcon, { weight: "bold", size: 12 }),
24
30
  size,
25
- ...props
31
+ ...props,
32
+ value: field.value,
33
+ onChange: (value) => {
34
+ void form.setFieldValue(name, value);
35
+ onChange == null ? void 0 : onChange(value);
36
+ },
37
+ onBlur: (event) => {
38
+ field.onBlur(event);
39
+ onBlur == null ? void 0 : onBlur(event);
40
+ }
26
41
  }
27
- );
42
+ ) });
28
43
  };
29
44
  export {
30
45
  InputNumber
@@ -1 +1 @@
1
- {"version":3,"file":"InputNumber.js","sources":["../../../../src/components/inputnumber/InputNumber.tsx"],"sourcesContent":["import { InputNumber as FormikInputNumber, InputNumberProps } from 'formik-antd'\nimport cx from 'classnames'\nimport styles from './InputNumber.module.css'\nimport { CaretDownIcon, CaretUpIcon } from '@phosphor-icons/react'\ntype Props = Expand<InputNumberProps> & {\n name: string\n max?: number\n min?: number\n step?: number\n}\n\nexport const InputNumber = ({\n size = 'large',\n step = 1,\n name,\n max,\n min,\n ...props\n}: Props) => {\n return (\n <FormikInputNumber\n name={name}\n max={max}\n min={min}\n step={step}\n className={cx(styles.j2InputNumber, props.className)}\n upHandler={<CaretUpIcon weight=\"bold\" size={12} />}\n downHandler={<CaretDownIcon weight=\"bold\" size={12} />}\n size={size}\n {...props}\n />\n )\n}\n"],"names":["FormikInputNumber"],"mappings":";;;;;AAWO,MAAM,cAAc,CAAC;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAG,OAAO,eAAe,MAAM,SAAS;AAAA,MACnD,WAAW,oBAAC,aAAA,EAAY,QAAO,QAAO,MAAM,IAAI;AAAA,MAChD,aAAa,oBAAC,eAAA,EAAc,QAAO,QAAO,MAAM,IAAI;AAAA,MACpD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"InputNumber.js","sources":["../../../../src/components/inputnumber/InputNumber.tsx"],"sourcesContent":["import { InputNumber as AntdInputNumber, type InputNumberProps } from 'antd'\nimport { FormikField, type FormikFieldProps } from '../form/FormikField'\nimport cx from 'classnames'\nimport styles from './InputNumber.module.css'\nimport { CaretDownIcon, CaretUpIcon } from '@phosphor-icons/react'\ntype Props = Expand<InputNumberProps & FormikFieldProps> & {\n name: string\n max?: number\n min?: number\n step?: number\n}\n\nexport const InputNumber = ({\n size = 'large',\n step = 1,\n name,\n max,\n min,\n validate,\n fast,\n onChange,\n onBlur,\n ...props\n}: Props) => {\n return (\n <FormikField name={name} validate={validate} fast={fast}>\n {({ field, form }) => (\n <AntdInputNumber\n name={name}\n id={name}\n max={max}\n min={min}\n step={step}\n className={cx(styles.j2InputNumber, props.className)}\n upHandler={<CaretUpIcon weight=\"bold\" size={12} />}\n downHandler={<CaretDownIcon weight=\"bold\" size={12} />}\n size={size}\n {...props}\n value={field.value}\n onChange={(value) => {\n void form.setFieldValue(name, value)\n onChange?.(value)\n }}\n onBlur={(event) => {\n field.onBlur(event)\n onBlur?.(event)\n }}\n />\n )}\n </FormikField>\n )\n}\n"],"names":["AntdInputNumber"],"mappings":";;;;;;AAYO,MAAM,cAAc,CAAC;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACE,oBAAC,eAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,OAAO,KAAA,MACT;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAG,OAAO,eAAe,MAAM,SAAS;AAAA,MACnD,WAAW,oBAAC,aAAA,EAAY,QAAO,QAAO,MAAM,IAAI;AAAA,MAChD,aAAa,oBAAC,eAAA,EAAc,QAAO,QAAO,MAAM,IAAI;AAAA,MACpD;AAAA,MACC,GAAG;AAAA,MACJ,OAAO,MAAM;AAAA,MACb,UAAU,CAAC,UAAU;AACnB,aAAK,KAAK,cAAc,MAAM,KAAK;AACnC,6CAAW;AAAA,MACb;AAAA,MACA,QAAQ,CAAC,UAAU;AACjB,cAAM,OAAO,KAAK;AAClB,yCAAS;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const j2InputNumber = "_j2InputNumber_1jmfn_1";
3
+ const j2InputNumber = "_j2InputNumber_1t2hv_1";
4
4
  const styles = {
5
5
  j2InputNumber
6
6
  };
@@ -1,4 +1,4 @@
1
- const j2InputNumber = "_j2InputNumber_1jmfn_1";
1
+ const j2InputNumber = "_j2InputNumber_1t2hv_1";
2
2
  const styles = {
3
3
  j2InputNumber
4
4
  };
@@ -18,7 +18,6 @@ const Modal = ({
18
18
  {
19
19
  title,
20
20
  className: cx("j2-modal"),
21
- maskClosable: true,
22
21
  centered: true,
23
22
  closeIcon: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { size: 22, weight: "regular" }),
24
23
  onCancel,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.cjs","sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import { Modal as AntdModal, ModalProps } from 'antd'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Modal.css'\nimport cx from 'classnames'\n\nexport type Props = {\n withContentPadding?: boolean\n} & Expand<ModalProps>\n\nconst Modal = ({\n open,\n title,\n children,\n onCancel,\n withContentPadding: withPadding = true,\n ...props\n}: Props) => {\n return (\n <AntdModal\n title={title}\n className={cx('j2-modal')}\n maskClosable={true}\n centered\n closeIcon={<XIcon size={22} weight=\"regular\" />}\n onCancel={onCancel}\n open={open}\n {...props}\n >\n <div className={cx(withPadding ? 'px-6 py-3' : 'px-0 py-0')}>\n {children}\n </div>\n </AntdModal>\n )\n}\n\nexport { Modal }\n"],"names":["jsx","AntdModal","XIcon"],"mappings":";;;;;;;AASA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB,cAAc;AAAA,EAClC,GAAG;AACL,MAAa;AACX,SACEA,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,UAAU;AAAA,MACxB,cAAc;AAAA,MACd,UAAQ;AAAA,MACR,WAAWD,2BAAAA,IAACE,aAAA,EAAM,MAAM,IAAI,QAAO,WAAU;AAAA,MAC7C;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAAF,2BAAAA,IAAC,SAAI,WAAW,GAAG,cAAc,cAAc,WAAW,GACvD,SAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
1
+ {"version":3,"file":"Modal.cjs","sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import { Modal as AntdModal, ModalProps } from 'antd'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Modal.css'\nimport cx from 'classnames'\n\nexport type Props = {\n withContentPadding?: boolean\n} & Expand<ModalProps>\n\nconst Modal = ({\n open,\n title,\n children,\n onCancel,\n withContentPadding: withPadding = true,\n ...props\n}: Props) => {\n return (\n <AntdModal\n title={title}\n className={cx('j2-modal')}\n centered\n closeIcon={<XIcon size={22} weight=\"regular\" />}\n onCancel={onCancel}\n open={open}\n {...props}\n >\n <div className={cx(withPadding ? 'px-6 py-3' : 'px-0 py-0')}>\n {children}\n </div>\n </AntdModal>\n )\n}\n\nexport { Modal }\n"],"names":["jsx","AntdModal","XIcon"],"mappings":";;;;;;;AASA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB,cAAc;AAAA,EAClC,GAAG;AACL,MAAa;AACX,SACEA,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,UAAU;AAAA,MACxB,UAAQ;AAAA,MACR,WAAWD,2BAAAA,IAACE,aAAA,EAAM,MAAM,IAAI,QAAO,WAAU;AAAA,MAC7C;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAAF,2BAAAA,IAAC,SAAI,WAAW,GAAG,cAAc,cAAc,WAAW,GACvD,SAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
@@ -16,7 +16,6 @@ const Modal = ({
16
16
  {
17
17
  title,
18
18
  className: cx("j2-modal"),
19
- maskClosable: true,
20
19
  centered: true,
21
20
  closeIcon: /* @__PURE__ */ jsx(XIcon, { size: 22, weight: "regular" }),
22
21
  onCancel,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import { Modal as AntdModal, ModalProps } from 'antd'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Modal.css'\nimport cx from 'classnames'\n\nexport type Props = {\n withContentPadding?: boolean\n} & Expand<ModalProps>\n\nconst Modal = ({\n open,\n title,\n children,\n onCancel,\n withContentPadding: withPadding = true,\n ...props\n}: Props) => {\n return (\n <AntdModal\n title={title}\n className={cx('j2-modal')}\n maskClosable={true}\n centered\n closeIcon={<XIcon size={22} weight=\"regular\" />}\n onCancel={onCancel}\n open={open}\n {...props}\n >\n <div className={cx(withPadding ? 'px-6 py-3' : 'px-0 py-0')}>\n {children}\n </div>\n </AntdModal>\n )\n}\n\nexport { Modal }\n"],"names":["AntdModal"],"mappings":";;;;;AASA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB,cAAc;AAAA,EAClC,GAAG;AACL,MAAa;AACX,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,UAAU;AAAA,MACxB,cAAc;AAAA,MACd,UAAQ;AAAA,MACR,WAAW,oBAAC,OAAA,EAAM,MAAM,IAAI,QAAO,WAAU;AAAA,MAC7C;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAA,oBAAC,SAAI,WAAW,GAAG,cAAc,cAAc,WAAW,GACvD,SAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Modal.js","sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import { Modal as AntdModal, ModalProps } from 'antd'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Modal.css'\nimport cx from 'classnames'\n\nexport type Props = {\n withContentPadding?: boolean\n} & Expand<ModalProps>\n\nconst Modal = ({\n open,\n title,\n children,\n onCancel,\n withContentPadding: withPadding = true,\n ...props\n}: Props) => {\n return (\n <AntdModal\n title={title}\n className={cx('j2-modal')}\n centered\n closeIcon={<XIcon size={22} weight=\"regular\" />}\n onCancel={onCancel}\n open={open}\n {...props}\n >\n <div className={cx(withPadding ? 'px-6 py-3' : 'px-0 py-0')}>\n {children}\n </div>\n </AntdModal>\n )\n}\n\nexport { Modal }\n"],"names":["AntdModal"],"mappings":";;;;;AASA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB,cAAc;AAAA,EAClC,GAAG;AACL,MAAa;AACX,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,UAAU;AAAA,MACxB,UAAQ;AAAA,MACR,WAAW,oBAAC,OAAA,EAAM,MAAM,IAAI,QAAO,WAAU;AAAA,MAC7C;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAA,oBAAC,SAAI,WAAW,GAAG,cAAc,cAAc,WAAW,GACvD,SAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const messageOnly = "_messageOnly_1pxqk_14";
3
+ const messageOnly = "_messageOnly_a124a_14";
4
4
  const s = {
5
5
  messageOnly
6
6
  };
@@ -1,4 +1,4 @@
1
- const messageOnly = "_messageOnly_1pxqk_14";
1
+ const messageOnly = "_messageOnly_a124a_14";
2
2
  const s = {
3
3
  messageOnly
4
4
  };
@@ -34,12 +34,15 @@ const getIcon = (type) => {
34
34
  const useNotification = () => {
35
35
  const [api, contextHolder] = antd.notification.useNotification();
36
36
  const openNotification = (type, config) => {
37
+ const { message, title, btn, actions, ...restConfig } = config;
37
38
  api[type]({
38
39
  icon: getIcon(type),
39
- ...config,
40
+ ...restConfig,
41
+ title: title ?? message,
42
+ actions: actions ?? btn,
40
43
  closeIcon: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { color: "var(--j2-color-icon)", size: 22, weight: "regular" }),
41
44
  className: cx({
42
- [Notification_module.default.messageOnly]: config.message && !config.description
45
+ [Notification_module.default.messageOnly]: (title ?? message) && !config.description
43
46
  })
44
47
  });
45
48
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useNotification.cjs","sources":["../../../../src/components/notification/useNotification.tsx"],"sourcesContent":["import { notification } from 'antd'\nimport type { NotificationArgsProps } from 'antd'\nimport s from './Notification.module.css'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport cx from 'classnames'\nimport React from 'react'\n\ntype NotificationType = 'success' | 'info' | 'warning' | 'error'\n\nexport type OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n) => void\n\nconst getIcon = (type: NotificationType) => {\n switch (type) {\n case 'error':\n return (\n <XCircleIcon color=\"var(--j2-color-error)\" weight=\"duotone\" size={24} />\n )\n case 'success':\n return (\n <CheckCircleIcon\n color=\"var(--j2-color-success)\"\n weight=\"duotone\"\n size={24}\n />\n )\n case 'info':\n return (\n <InfoIcon color=\"var(--j2-color-info)\" weight=\"duotone\" size={24} />\n )\n case 'warning':\n return (\n <WarningCircleIcon\n color=\"var(--j2-color-warning)\"\n weight=\"duotone\"\n size={24}\n />\n )\n }\n}\n\nexport const useNotification = () => {\n const [api, contextHolder] = notification.useNotification()\n\n const openNotification: OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n ) => {\n api[type]({\n icon: getIcon(type),\n ...config,\n closeIcon: (\n <XIcon color=\"var(--j2-color-icon)\" size={22} weight=\"regular\" />\n ),\n className: cx({\n [s.messageOnly]: config.message && !config.description,\n }),\n })\n }\n\n const closeNotification = (key?: React.Key) => {\n api.destroy(key)\n }\n\n return { openNotification, closeNotification, contextHolder }\n}\n"],"names":["XCircleIcon","jsx","CheckCircleIcon","InfoIcon","WarningCircleIcon","notification","XIcon","s"],"mappings":";;;;;;;AAoBA,MAAM,UAAU,CAAC,SAA2B;AAC1C,UAAQ,MAAA;AAAA,IACN,KAAK;AACH,4CACGA,mBAAA,EAAY,OAAM,yBAAwB,QAAO,WAAU,MAAM,IAAI;AAAA,IAE1E,KAAK;AACH,aACEC,2BAAAA;AAAAA,QAACC,MAAAA;AAAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAGZ,KAAK;AACH,4CACGC,gBAAA,EAAS,OAAM,wBAAuB,QAAO,WAAU,MAAM,IAAI;AAAA,IAEtE,KAAK;AACH,aACEF,2BAAAA;AAAAA,QAACG,MAAAA;AAAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,EACR;AAGR;AAEO,MAAM,kBAAkB,MAAM;AACnC,QAAM,CAAC,KAAK,aAAa,IAAIC,KAAAA,aAAa,gBAAA;AAE1C,QAAM,mBAAyC,CAC7C,MACA,WACG;AACH,QAAI,IAAI,EAAE;AAAA,MACR,MAAM,QAAQ,IAAI;AAAA,MAClB,GAAG;AAAA,MACH,0CACGC,MAAAA,OAAA,EAAM,OAAM,wBAAuB,MAAM,IAAI,QAAO,WAAU;AAAA,MAEjE,WAAW,GAAG;AAAA,QACZ,CAACC,oBAAAA,QAAE,WAAW,GAAG,OAAO,WAAW,CAAC,OAAO;AAAA,MAAA,CAC5C;AAAA,IAAA,CACF;AAAA,EACH;AAEA,QAAM,oBAAoB,CAAC,QAAoB;AAC7C,QAAI,QAAQ,GAAG;AAAA,EACjB;AAEA,SAAO,EAAE,kBAAkB,mBAAmB,cAAA;AAChD;;"}
1
+ {"version":3,"file":"useNotification.cjs","sources":["../../../../src/components/notification/useNotification.tsx"],"sourcesContent":["import { notification } from 'antd'\nimport type { NotificationArgsProps } from 'antd'\nimport s from './Notification.module.css'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport cx from 'classnames'\nimport React from 'react'\n\ntype NotificationType = 'success' | 'info' | 'warning' | 'error'\n\nexport type OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n) => void\n\nconst getIcon = (type: NotificationType) => {\n switch (type) {\n case 'error':\n return (\n <XCircleIcon color=\"var(--j2-color-error)\" weight=\"duotone\" size={24} />\n )\n case 'success':\n return (\n <CheckCircleIcon\n color=\"var(--j2-color-success)\"\n weight=\"duotone\"\n size={24}\n />\n )\n case 'info':\n return (\n <InfoIcon color=\"var(--j2-color-info)\" weight=\"duotone\" size={24} />\n )\n case 'warning':\n return (\n <WarningCircleIcon\n color=\"var(--j2-color-warning)\"\n weight=\"duotone\"\n size={24}\n />\n )\n }\n}\n\nexport const useNotification = () => {\n const [api, contextHolder] = notification.useNotification()\n\n const openNotification: OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n ) => {\n const { message, title, btn, actions, ...restConfig } = config\n api[type]({\n icon: getIcon(type),\n ...restConfig,\n title: title ?? message,\n actions: actions ?? btn,\n closeIcon: (\n <XIcon color=\"var(--j2-color-icon)\" size={22} weight=\"regular\" />\n ),\n className: cx({\n [s.messageOnly]: (title ?? message) && !config.description,\n }),\n })\n }\n\n const closeNotification = (key?: React.Key) => {\n api.destroy(key)\n }\n\n return { openNotification, closeNotification, contextHolder }\n}\n"],"names":["XCircleIcon","jsx","CheckCircleIcon","InfoIcon","WarningCircleIcon","notification","XIcon","s"],"mappings":";;;;;;;AAoBA,MAAM,UAAU,CAAC,SAA2B;AAC1C,UAAQ,MAAA;AAAA,IACN,KAAK;AACH,4CACGA,mBAAA,EAAY,OAAM,yBAAwB,QAAO,WAAU,MAAM,IAAI;AAAA,IAE1E,KAAK;AACH,aACEC,2BAAAA;AAAAA,QAACC,MAAAA;AAAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAGZ,KAAK;AACH,4CACGC,gBAAA,EAAS,OAAM,wBAAuB,QAAO,WAAU,MAAM,IAAI;AAAA,IAEtE,KAAK;AACH,aACEF,2BAAAA;AAAAA,QAACG,MAAAA;AAAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,EACR;AAGR;AAEO,MAAM,kBAAkB,MAAM;AACnC,QAAM,CAAC,KAAK,aAAa,IAAIC,KAAAA,aAAa,gBAAA;AAE1C,QAAM,mBAAyC,CAC7C,MACA,WACG;AACH,UAAM,EAAE,SAAS,OAAO,KAAK,SAAS,GAAG,eAAe;AACxD,QAAI,IAAI,EAAE;AAAA,MACR,MAAM,QAAQ,IAAI;AAAA,MAClB,GAAG;AAAA,MACH,OAAO,SAAS;AAAA,MAChB,SAAS,WAAW;AAAA,MACpB,0CACGC,MAAAA,OAAA,EAAM,OAAM,wBAAuB,MAAM,IAAI,QAAO,WAAU;AAAA,MAEjE,WAAW,GAAG;AAAA,QACZ,CAACC,oBAAAA,QAAE,WAAW,IAAI,SAAS,YAAY,CAAC,OAAO;AAAA,MAAA,CAChD;AAAA,IAAA,CACF;AAAA,EACH;AAEA,QAAM,oBAAoB,CAAC,QAAoB;AAC7C,QAAI,QAAQ,GAAG;AAAA,EACjB;AAEA,SAAO,EAAE,kBAAkB,mBAAmB,cAAA;AAChD;;"}
@@ -32,12 +32,15 @@ const getIcon = (type) => {
32
32
  const useNotification = () => {
33
33
  const [api, contextHolder] = notification.useNotification();
34
34
  const openNotification = (type, config) => {
35
+ const { message, title, btn, actions, ...restConfig } = config;
35
36
  api[type]({
36
37
  icon: getIcon(type),
37
- ...config,
38
+ ...restConfig,
39
+ title: title ?? message,
40
+ actions: actions ?? btn,
38
41
  closeIcon: /* @__PURE__ */ jsx(XIcon, { color: "var(--j2-color-icon)", size: 22, weight: "regular" }),
39
42
  className: cx({
40
- [s.messageOnly]: config.message && !config.description
43
+ [s.messageOnly]: (title ?? message) && !config.description
41
44
  })
42
45
  });
43
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useNotification.js","sources":["../../../../src/components/notification/useNotification.tsx"],"sourcesContent":["import { notification } from 'antd'\nimport type { NotificationArgsProps } from 'antd'\nimport s from './Notification.module.css'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport cx from 'classnames'\nimport React from 'react'\n\ntype NotificationType = 'success' | 'info' | 'warning' | 'error'\n\nexport type OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n) => void\n\nconst getIcon = (type: NotificationType) => {\n switch (type) {\n case 'error':\n return (\n <XCircleIcon color=\"var(--j2-color-error)\" weight=\"duotone\" size={24} />\n )\n case 'success':\n return (\n <CheckCircleIcon\n color=\"var(--j2-color-success)\"\n weight=\"duotone\"\n size={24}\n />\n )\n case 'info':\n return (\n <InfoIcon color=\"var(--j2-color-info)\" weight=\"duotone\" size={24} />\n )\n case 'warning':\n return (\n <WarningCircleIcon\n color=\"var(--j2-color-warning)\"\n weight=\"duotone\"\n size={24}\n />\n )\n }\n}\n\nexport const useNotification = () => {\n const [api, contextHolder] = notification.useNotification()\n\n const openNotification: OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n ) => {\n api[type]({\n icon: getIcon(type),\n ...config,\n closeIcon: (\n <XIcon color=\"var(--j2-color-icon)\" size={22} weight=\"regular\" />\n ),\n className: cx({\n [s.messageOnly]: config.message && !config.description,\n }),\n })\n }\n\n const closeNotification = (key?: React.Key) => {\n api.destroy(key)\n }\n\n return { openNotification, closeNotification, contextHolder }\n}\n"],"names":[],"mappings":";;;;;AAoBA,MAAM,UAAU,CAAC,SAA2B;AAC1C,UAAQ,MAAA;AAAA,IACN,KAAK;AACH,iCACG,aAAA,EAAY,OAAM,yBAAwB,QAAO,WAAU,MAAM,IAAI;AAAA,IAE1E,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAGZ,KAAK;AACH,iCACG,UAAA,EAAS,OAAM,wBAAuB,QAAO,WAAU,MAAM,IAAI;AAAA,IAEtE,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,EACR;AAGR;AAEO,MAAM,kBAAkB,MAAM;AACnC,QAAM,CAAC,KAAK,aAAa,IAAI,aAAa,gBAAA;AAE1C,QAAM,mBAAyC,CAC7C,MACA,WACG;AACH,QAAI,IAAI,EAAE;AAAA,MACR,MAAM,QAAQ,IAAI;AAAA,MAClB,GAAG;AAAA,MACH,+BACG,OAAA,EAAM,OAAM,wBAAuB,MAAM,IAAI,QAAO,WAAU;AAAA,MAEjE,WAAW,GAAG;AAAA,QACZ,CAAC,EAAE,WAAW,GAAG,OAAO,WAAW,CAAC,OAAO;AAAA,MAAA,CAC5C;AAAA,IAAA,CACF;AAAA,EACH;AAEA,QAAM,oBAAoB,CAAC,QAAoB;AAC7C,QAAI,QAAQ,GAAG;AAAA,EACjB;AAEA,SAAO,EAAE,kBAAkB,mBAAmB,cAAA;AAChD;"}
1
+ {"version":3,"file":"useNotification.js","sources":["../../../../src/components/notification/useNotification.tsx"],"sourcesContent":["import { notification } from 'antd'\nimport type { NotificationArgsProps } from 'antd'\nimport s from './Notification.module.css'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport cx from 'classnames'\nimport React from 'react'\n\ntype NotificationType = 'success' | 'info' | 'warning' | 'error'\n\nexport type OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n) => void\n\nconst getIcon = (type: NotificationType) => {\n switch (type) {\n case 'error':\n return (\n <XCircleIcon color=\"var(--j2-color-error)\" weight=\"duotone\" size={24} />\n )\n case 'success':\n return (\n <CheckCircleIcon\n color=\"var(--j2-color-success)\"\n weight=\"duotone\"\n size={24}\n />\n )\n case 'info':\n return (\n <InfoIcon color=\"var(--j2-color-info)\" weight=\"duotone\" size={24} />\n )\n case 'warning':\n return (\n <WarningCircleIcon\n color=\"var(--j2-color-warning)\"\n weight=\"duotone\"\n size={24}\n />\n )\n }\n}\n\nexport const useNotification = () => {\n const [api, contextHolder] = notification.useNotification()\n\n const openNotification: OpenNotificationFunc = (\n type: Expand<NotificationType>,\n config: Expand<NotificationArgsProps>\n ) => {\n const { message, title, btn, actions, ...restConfig } = config\n api[type]({\n icon: getIcon(type),\n ...restConfig,\n title: title ?? message,\n actions: actions ?? btn,\n closeIcon: (\n <XIcon color=\"var(--j2-color-icon)\" size={22} weight=\"regular\" />\n ),\n className: cx({\n [s.messageOnly]: (title ?? message) && !config.description,\n }),\n })\n }\n\n const closeNotification = (key?: React.Key) => {\n api.destroy(key)\n }\n\n return { openNotification, closeNotification, contextHolder }\n}\n"],"names":[],"mappings":";;;;;AAoBA,MAAM,UAAU,CAAC,SAA2B;AAC1C,UAAQ,MAAA;AAAA,IACN,KAAK;AACH,iCACG,aAAA,EAAY,OAAM,yBAAwB,QAAO,WAAU,MAAM,IAAI;AAAA,IAE1E,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAGZ,KAAK;AACH,iCACG,UAAA,EAAS,OAAM,wBAAuB,QAAO,WAAU,MAAM,IAAI;AAAA,IAEtE,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,EACR;AAGR;AAEO,MAAM,kBAAkB,MAAM;AACnC,QAAM,CAAC,KAAK,aAAa,IAAI,aAAa,gBAAA;AAE1C,QAAM,mBAAyC,CAC7C,MACA,WACG;AACH,UAAM,EAAE,SAAS,OAAO,KAAK,SAAS,GAAG,eAAe;AACxD,QAAI,IAAI,EAAE;AAAA,MACR,MAAM,QAAQ,IAAI;AAAA,MAClB,GAAG;AAAA,MACH,OAAO,SAAS;AAAA,MAChB,SAAS,WAAW;AAAA,MACpB,+BACG,OAAA,EAAM,OAAM,wBAAuB,MAAM,IAAI,QAAO,WAAU;AAAA,MAEjE,WAAW,GAAG;AAAA,QACZ,CAAC,EAAE,WAAW,IAAI,SAAS,YAAY,CAAC,OAAO;AAAA,MAAA,CAChD;AAAA,IAAA,CACF;AAAA,EACH;AAEA,QAAM,oBAAoB,CAAC,QAAoB;AAC7C,QAAI,QAAQ,GAAG;AAAA,EACjB;AAEA,SAAO,EAAE,kBAAkB,mBAAmB,cAAA;AAChD;"}
@@ -47,6 +47,8 @@ const withDesignSystemPaginationOverrides = (pagination, { paginationTextLabels
47
47
  return {
48
48
  ...pagination,
49
49
  locale: { ...getPaginationLocale(small), ...pagination.locale },
50
+ // Keep antd in charge of visibility (including Table's filtered total).
51
+ // showSizeChanger's SelectProps alternative would force it visible.
50
52
  selectComponentClass: paginationSelectComponentClass,
51
53
  itemRender: buildItemRender({
52
54
  paginationTextLabels,
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.cjs","sources":["../../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import {\n Pagination as AntdPagination,\n PaginationProps,\n Select,\n SelectProps,\n Button,\n} from 'antd'\nimport cx from 'classnames'\nimport {\n CaretLeftIcon,\n CaretRightIcon,\n CaretDownIcon,\n DotsThreeIcon,\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n} from '@phosphor-icons/react'\n\nimport s from './Pagination.module.css'\n\ntype Overrides = {\n paginationTextLabels?: boolean\n /** Forces small-size rendering independent of the config's own `size`. */\n isSmall?: boolean\n}\n\ntype Props = Expand<PaginationProps & { paginationTextLabels?: boolean }>\n\nconst renderIconButton = (\n icon: React.ReactNode,\n isSmall: boolean,\n customClassName?: string\n) => (\n <Button\n type=\"link\"\n size={isSmall ? 'small' : 'middle'}\n className={cx(customClassName, isSmall ? '!w-6' : '!w-8')}\n >\n {icon}\n </Button>\n)\n\nconst renderJumpItem = (\n icon: React.ReactNode,\n doubleIcon: React.ReactNode,\n isSmall: boolean\n) => (\n <a className=\"ant-pagination-item-link\">\n <div className=\"ant-pagination-item-container\">\n <span className=\"ant-pagination-item-ellipsis\">\n {renderIconButton(icon, isSmall, s['jump-button'])}\n </span>\n <span className=\"ant-pagination-item-link-icon\">\n {renderIconButton(doubleIcon, isSmall, s['jump-button'])}\n </span>\n </div>\n </a>\n)\n\nconst buildItemRender =\n ({ paginationTextLabels, isSmall }: Required<Overrides>) =>\n (\n _page: number,\n type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next',\n element: React.ReactNode\n ) => {\n if (type === 'prev') {\n return (\n <a>\n {paginationTextLabels\n ? 'Previous'\n : renderIconButton(<CaretLeftIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'next') {\n return (\n <a>\n {paginationTextLabels\n ? 'Next'\n : renderIconButton(<CaretRightIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'jump-prev') {\n return renderJumpItem(<DotsThreeIcon />, <CaretDoubleLeftIcon />, isSmall)\n }\n if (type === 'jump-next') {\n return renderJumpItem(\n <DotsThreeIcon />,\n <CaretDoubleRightIcon />,\n isSmall\n )\n }\n return element\n }\n\nconst paginationSelectComponentClass = (selectProps: SelectProps) => (\n <Select {...selectProps} suffixIcon={<CaretDownIcon />} />\n)\n\nconst getPaginationLocale = (isSmall: boolean) => ({\n jump_to: `Go to\\u00A0${isSmall ? ':\\u00A0\\u00A0\\u00A0' : ''}`,\n page: isSmall ? '' : 'page',\n})\n\n/**\n * Applies design-system overrides (Phosphor icons, locale, custom select\n * chrome) to an antd Pagination config. Used by the standalone\n * {@link Pagination} component, and by `<Table>`'s `pagination` prop so\n * both share identical visuals.\n */\nexport const withDesignSystemPaginationOverrides = (\n pagination: PaginationProps,\n { paginationTextLabels = false, isSmall }: Overrides = {}\n): PaginationProps => {\n const small = isSmall ?? pagination.size === 'small'\n return {\n ...pagination,\n locale: { ...getPaginationLocale(small), ...pagination.locale },\n selectComponentClass: paginationSelectComponentClass,\n itemRender: buildItemRender({\n paginationTextLabels,\n isSmall: small,\n }),\n }\n}\n\nconst Pagination = ({ paginationTextLabels = false, ...props }: Props) => {\n const enriched = withDesignSystemPaginationOverrides(props, {\n paginationTextLabels,\n })\n return <AntdPagination {...enriched} />\n}\n\nexport { Pagination }\n"],"names":["jsx","Button","jsxs","s","CaretLeftIcon","CaretRightIcon","DotsThreeIcon","CaretDoubleLeftIcon","CaretDoubleRightIcon","Select","CaretDownIcon","AntdPagination"],"mappings":";;;;;;;AA2BA,MAAM,mBAAmB,CACvB,MACA,SACA,oBAEAA,2BAAAA;AAAAA,EAACC,KAAAA;AAAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,UAAU,UAAU;AAAA,IAC1B,WAAW,GAAG,iBAAiB,UAAU,SAAS,MAAM;AAAA,IAEvD,UAAA;AAAA,EAAA;AACH;AAGF,MAAM,iBAAiB,CACrB,MACA,YACA,YAEAD,2BAAAA,IAAC,KAAA,EAAE,WAAU,4BACX,UAAAE,2BAAAA,KAAC,OAAA,EAAI,WAAU,iCACb,UAAA;AAAA,EAAAF,2BAAAA,IAAC,QAAA,EAAK,WAAU,gCACb,UAAA,iBAAiB,MAAM,SAASG,kBAAE,aAAa,CAAC,EAAA,CACnD;AAAA,EACAH,2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,KAAK,GAAG,GAAG,WAAW,OAAA;AAAA,IACvD,sBAAsB;AAAA,IACtB,YAAY,gBAAgB;AAAA,MAC1B;AAAA,MACA,SAAS;AAAA,IAAA,CACV;AAAA,EAAA;AAEL;AAEA,MAAM,aAAa,CAAC,EAAE,uBAAuB,OAAO,GAAG,YAAmB;AACxE,QAAM,WAAW,oCAAoC,OAAO;AAAA,IAC1D;AAAA,EAAA,CACD;AACD,SAAOV,+BAACW,KAAAA,YAAA,EAAgB,GAAG,SAAA,CAAU;AACvC;;;"}
1
+ {"version":3,"file":"Pagination.cjs","sources":["../../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import {\n Pagination as AntdPagination,\n PaginationProps,\n Button,\n Select,\n SelectProps,\n} from 'antd'\nimport cx from 'classnames'\nimport {\n CaretLeftIcon,\n CaretRightIcon,\n CaretDownIcon,\n DotsThreeIcon,\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n} from '@phosphor-icons/react'\n\nimport s from './Pagination.module.css'\n\ntype Overrides = {\n paginationTextLabels?: boolean\n /** Forces small-size rendering independent of the config's own `size`. */\n isSmall?: boolean\n}\n\ntype Props = Expand<PaginationProps & { paginationTextLabels?: boolean }>\n\nconst renderIconButton = (\n icon: React.ReactNode,\n isSmall: boolean,\n customClassName?: string\n) => (\n <Button\n type=\"link\"\n size={isSmall ? 'small' : 'middle'}\n className={cx(customClassName, isSmall ? '!w-6' : '!w-8')}\n >\n {icon}\n </Button>\n)\n\nconst renderJumpItem = (\n icon: React.ReactNode,\n doubleIcon: React.ReactNode,\n isSmall: boolean\n) => (\n <a className=\"ant-pagination-item-link\">\n <div className=\"ant-pagination-item-container\">\n <span className=\"ant-pagination-item-ellipsis\">\n {renderIconButton(icon, isSmall, s['jump-button'])}\n </span>\n <span className=\"ant-pagination-item-link-icon\">\n {renderIconButton(doubleIcon, isSmall, s['jump-button'])}\n </span>\n </div>\n </a>\n)\n\nconst buildItemRender =\n ({ paginationTextLabels, isSmall }: Required<Overrides>) =>\n (\n _page: number,\n type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next',\n element: React.ReactNode\n ) => {\n if (type === 'prev') {\n return (\n <a>\n {paginationTextLabels\n ? 'Previous'\n : renderIconButton(<CaretLeftIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'next') {\n return (\n <a>\n {paginationTextLabels\n ? 'Next'\n : renderIconButton(<CaretRightIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'jump-prev') {\n return renderJumpItem(<DotsThreeIcon />, <CaretDoubleLeftIcon />, isSmall)\n }\n if (type === 'jump-next') {\n return renderJumpItem(\n <DotsThreeIcon />,\n <CaretDoubleRightIcon />,\n isSmall\n )\n }\n return element\n }\n\nconst paginationSelectComponentClass = (selectProps: SelectProps) => (\n <Select {...selectProps} suffixIcon={<CaretDownIcon />} />\n)\n\nconst getPaginationLocale = (isSmall: boolean) => ({\n jump_to: `Go to\\u00A0${isSmall ? ':\\u00A0\\u00A0\\u00A0' : ''}`,\n page: isSmall ? '' : 'page',\n})\n\n/**\n * Applies design-system overrides (Phosphor icons, locale, custom select\n * chrome) to an antd Pagination config. Used by the standalone\n * {@link Pagination} component, and by `<Table>`'s `pagination` prop so\n * both share identical visuals.\n */\nexport const withDesignSystemPaginationOverrides = (\n pagination: PaginationProps,\n { paginationTextLabels = false, isSmall }: Overrides = {}\n): PaginationProps => {\n const small = isSmall ?? pagination.size === 'small'\n return {\n ...pagination,\n locale: { ...getPaginationLocale(small), ...pagination.locale },\n // Keep antd in charge of visibility (including Table's filtered total).\n // showSizeChanger's SelectProps alternative would force it visible.\n selectComponentClass: paginationSelectComponentClass,\n itemRender: buildItemRender({\n paginationTextLabels,\n isSmall: small,\n }),\n }\n}\n\nconst Pagination = ({ paginationTextLabels = false, ...props }: Props) => {\n const enriched = withDesignSystemPaginationOverrides(props, {\n paginationTextLabels,\n })\n return <AntdPagination {...enriched} />\n}\n\nexport { Pagination }\n"],"names":["jsx","Button","jsxs","s","CaretLeftIcon","CaretRight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,aAAa;AACxB,WAAO;AAAA,qCACJD,MAAAA,eAAA,EAAc;AAAA,qCACdE,MAAAA,sBAAA,EAAqB;AAAA,MACtB;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;AAEF,MAAM,iCAAiC,CAAC,gBACtCR,2BAAAA,IAACS,KAAAA,QAAA,EAAQ,GAAG,aAAa,YAAYT,2BAAAA,IAACU,qBAAA,CAAA,CAAc,EAAA,CAAI;AAG1D,MAAM,sBAAsB,CAAC,aAAsB;AAAA,EACjD,SAAS,SAAc,UAAU,SAAwB,EAAE;AAAA,EAC3D,MAAM,UAAU,KAAK;AACvB;AAQO,MAAM,sCAAsC,CACjD,YACA,EAAE,uBAAuB,OAAO,QAAA,IAAuB,OACnC;AACpB,QAAM,QAAQ,WAAW,WAAW,SAAS;AAC7C,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ,EAAE,GAAG,oBAAoB,KAAK,GAAG,GAAG,WAAW,OAAA;AAAA;AAAA;AAAA,IAGvD,sBAAsB;AAAA,IACtB,YAAY,gBAAgB;AAAA,MAC1B;AAAA,MACA,SAAS;AAAA,IAAA,CACV;AAAA,EAAA;AAEL;AAEA,MAAM,aAAa,CAAC,EAAE,uBAAuB,OAAO,GAAG,YAAmB;AACxE,QAAM,WAAW,oCAAoC,OAAO;AAAA,IAC1D;AAAA,EAAA,CACD;AACD,SAAOV,+BAACW,KAAAA,YAAA,EAAgB,GAAG,SAAA,CAAU;AACvC;;;"}
@@ -45,6 +45,8 @@ const withDesignSystemPaginationOverrides = (pagination, { paginationTextLabels
45
45
  return {
46
46
  ...pagination,
47
47
  locale: { ...getPaginationLocale(small), ...pagination.locale },
48
+ // Keep antd in charge of visibility (including Table's filtered total).
49
+ // showSizeChanger's SelectProps alternative would force it visible.
48
50
  selectComponentClass: paginationSelectComponentClass,
49
51
  itemRender: buildItemRender({
50
52
  paginationTextLabels,
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":["../../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import {\n Pagination as AntdPagination,\n PaginationProps,\n Select,\n SelectProps,\n Button,\n} from 'antd'\nimport cx from 'classnames'\nimport {\n CaretLeftIcon,\n CaretRightIcon,\n CaretDownIcon,\n DotsThreeIcon,\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n} from '@phosphor-icons/react'\n\nimport s from './Pagination.module.css'\n\ntype Overrides = {\n paginationTextLabels?: boolean\n /** Forces small-size rendering independent of the config's own `size`. */\n isSmall?: boolean\n}\n\ntype Props = Expand<PaginationProps & { paginationTextLabels?: boolean }>\n\nconst renderIconButton = (\n icon: React.ReactNode,\n isSmall: boolean,\n customClassName?: string\n) => (\n <Button\n type=\"link\"\n size={isSmall ? 'small' : 'middle'}\n className={cx(customClassName, isSmall ? '!w-6' : '!w-8')}\n >\n {icon}\n </Button>\n)\n\nconst renderJumpItem = (\n icon: React.ReactNode,\n doubleIcon: React.ReactNode,\n isSmall: boolean\n) => (\n <a className=\"ant-pagination-item-link\">\n <div className=\"ant-pagination-item-container\">\n <span className=\"ant-pagination-item-ellipsis\">\n {renderIconButton(icon, isSmall, s['jump-button'])}\n </span>\n <span className=\"ant-pagination-item-link-icon\">\n {renderIconButton(doubleIcon, isSmall, s['jump-button'])}\n </span>\n </div>\n </a>\n)\n\nconst buildItemRender =\n ({ paginationTextLabels, isSmall }: Required<Overrides>) =>\n (\n _page: number,\n type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next',\n element: React.ReactNode\n ) => {\n if (type === 'prev') {\n return (\n <a>\n {paginationTextLabels\n ? 'Previous'\n : renderIconButton(<CaretLeftIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'next') {\n return (\n <a>\n {paginationTextLabels\n ? 'Next'\n : renderIconButton(<CaretRightIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'jump-prev') {\n return renderJumpItem(<DotsThreeIcon />, <CaretDoubleLeftIcon />, isSmall)\n }\n if (type === 'jump-next') {\n return renderJumpItem(\n <DotsThreeIcon />,\n <CaretDoubleRightIcon />,\n isSmall\n )\n }\n return element\n }\n\nconst paginationSelectComponentClass = (selectProps: SelectProps) => (\n <Select {...selectProps} suffixIcon={<CaretDownIcon />} />\n)\n\nconst getPaginationLocale = (isSmall: boolean) => ({\n jump_to: `Go to\\u00A0${isSmall ? ':\\u00A0\\u00A0\\u00A0' : ''}`,\n page: isSmall ? '' : 'page',\n})\n\n/**\n * Applies design-system overrides (Phosphor icons, locale, custom select\n * chrome) to an antd Pagination config. Used by the standalone\n * {@link Pagination} component, and by `<Table>`'s `pagination` prop so\n * both share identical visuals.\n */\nexport const withDesignSystemPaginationOverrides = (\n pagination: PaginationProps,\n { paginationTextLabels = false, isSmall }: Overrides = {}\n): PaginationProps => {\n const small = isSmall ?? pagination.size === 'small'\n return {\n ...pagination,\n locale: { ...getPaginationLocale(small), ...pagination.locale },\n selectComponentClass: paginationSelectComponentClass,\n itemRender: buildItemRender({\n paginationTextLabels,\n isSmall: small,\n }),\n }\n}\n\nconst Pagination = ({ paginationTextLabels = false, ...props }: Props) => {\n const enriched = withDesignSystemPaginationOverrides(props, {\n paginationTextLabels,\n })\n return <AntdPagination {...enriched} />\n}\n\nexport { Pagination }\n"],"names":["AntdPagination"],"mappings":";;;;;AA2BA,MAAM,mBAAmB,CACvB,MACA,SACA,oBAEA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,UAAU,UAAU;AAAA,IAC1B,WAAW,GAAG,iBAAiB,UAAU,SAAS,MAAM;AAAA,IAEvD,UAAA;AAAA,EAAA;AACH;AAGF,MAAM,iBAAiB,CACrB,MACA,YACA,YAEA,oBAAC,KAAA,EAAE,WAAU,4BACX,UAAA,qBAAC,OAAA,EAAI,WAAU,iCACb,UAAA;AAAA,EAAA,oBAAC,QAAA,EAAK,WAAU,gCACb,UAAA,iBAAiB,MAAM,SAAS,EAAE,aAAa,CAAC,EAAA,CACnD;AAAA,EACA,oBAAC,QAAA,EAAK,WAAU,iC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MAAM,aAAa,CAAC,EAAE,uBAAuB,OAAO,GAAG,YAAmB;AACxE,QAAM,WAAW,oCAAoC,OAAO;AAAA,IAC1D;AAAA,EAAA,CACD;AACD,SAAO,oBAACA,cAAA,EAAgB,GAAG,SAAA,CAAU;AACvC;"}
1
+ {"version":3,"file":"Pagination.js","sources":["../../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import {\n Pagination as AntdPagination,\n PaginationProps,\n Button,\n Select,\n SelectProps,\n} from 'antd'\nimport cx from 'classnames'\nimport {\n CaretLeftIcon,\n CaretRightIcon,\n CaretDownIcon,\n DotsThreeIcon,\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n} from '@phosphor-icons/react'\n\nimport s from './Pagination.module.css'\n\ntype Overrides = {\n paginationTextLabels?: boolean\n /** Forces small-size rendering independent of the config's own `size`. */\n isSmall?: boolean\n}\n\ntype Props = Expand<PaginationProps & { paginationTextLabels?: boolean }>\n\nconst renderIconButton = (\n icon: React.ReactNode,\n isSmall: boolean,\n customClassName?: string\n) => (\n <Button\n type=\"link\"\n size={isSmall ? 'small' : 'middle'}\n className={cx(customClassName, isSmall ? '!w-6' : '!w-8')}\n >\n {icon}\n </Button>\n)\n\nconst renderJumpItem = (\n icon: React.ReactNode,\n doubleIcon: React.ReactNode,\n isSmall: boolean\n) => (\n <a className=\"ant-pagination-item-link\">\n <div className=\"ant-pagination-item-container\">\n <span className=\"ant-pagination-item-ellipsis\">\n {renderIconButton(icon, isSmall, s['jump-button'])}\n </span>\n <span className=\"ant-pagination-item-link-icon\">\n {renderIconButton(doubleIcon, isSmall, s['jump-button'])}\n </span>\n </div>\n </a>\n)\n\nconst buildItemRender =\n ({ paginationTextLabels, isSmall }: Required<Overrides>) =>\n (\n _page: number,\n type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next',\n element: React.ReactNode\n ) => {\n if (type === 'prev') {\n return (\n <a>\n {paginationTextLabels\n ? 'Previous'\n : renderIconButton(<CaretLeftIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'next') {\n return (\n <a>\n {paginationTextLabels\n ? 'Next'\n : renderIconButton(<CaretRightIcon />, isSmall)}\n </a>\n )\n }\n if (type === 'jump-prev') {\n return renderJumpItem(<DotsThreeIcon />, <CaretDoubleLeftIcon />, isSmall)\n }\n if (type === 'jump-next') {\n return renderJumpItem(\n <DotsThreeIcon />,\n <CaretDoubleRightIcon />,\n isSmall\n )\n }\n return element\n }\n\nconst paginationSelectComponentClass = (selectProps: SelectProps) => (\n <Select {...selectProps} suffixIcon={<CaretDownIcon />} />\n)\n\nconst getPaginationLocale = (isSmall: boolean) => ({\n jump_to: `Go to\\u00A0${isSmall ? ':\\u00A0\\u00A0\\u00A0' : ''}`,\n page: isSmall ? '' : 'page',\n})\n\n/**\n * Applies design-system overrides (Phosphor icons, locale, custom select\n * chrome) to an antd Pagination config. Used by the standalone\n * {@link Pagination} component, and by `<Table>`'s `pagination` prop so\n * both share identical visuals.\n */\nexport const withDesignSystemPaginationOverrides = (\n pagination: PaginationProps,\n { paginationTextLabels = false, isSmall }: Overrides = {}\n): PaginationProps => {\n const small = isSmall ?? pagination.size === 'small'\n return {\n ...pagination,\n locale: { ...getPaginationLocale(small), ...pagination.locale },\n // Keep antd in charge of visibility (including Table's filtered total).\n // showSizeChanger's SelectProps alternative would force it visible.\n selectComponentClass: paginationSelectComponentClass,\n itemRender: buildItemRender({\n paginationTextLabels,\n isSmall: small,\n }),\n }\n}\n\nconst Pagination = ({ paginationTextLabels = false, ...props }: Props) => {\n const enriched = withDesignSystemPaginationOverrides(props, {\n paginationTextLabels,\n })\n return <AntdPagination {...enriched} />\n}\n\nexport { Pagination }\n"],"names":["AntdPagination"],"mappings":";;;;;AA2BA,MAAM,mBAAmB,CACvB,MACA,SACA,oBAEA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,UAAU,UAAU;AAAA,IAC1B,WAAW,GAAG,iBAAiB,UAAU,SAAS,MAAM;AAAA,IAE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B,OAAO,QAAA,IAAuB,OACnC;AACpB,QAAM,QAAQ,WAAW,WAAW,SAAS;AAC7C,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ,EAAE,GAAG,oBAAoB,KAAK,GAAG,GAAG,WAAW,OAAA;AAAA;AAAA;AAAA,IAGvD,sBAAsB;AAAA,IACtB,YAAY,gBAAgB;AAAA,MAC1B;AAAA,MACA,SAAS;AAAA,IAAA,CACV;AAAA,EAAA;AAEL;AAEA,MAAM,aAAa,CAAC,EAAE,uBAAuB,OAAO,GAAG,YAAmB;AACxE,QAAM,WAAW,oCAAoC,OAAO;AAAA,IAC1D;AAAA,EAAA,CACD;AACD,SAAO,oBAACA,cAAA,EAAgB,GAAG,SAAA,CAAU;AACvC;"}
@@ -13,12 +13,14 @@ const Popover = ({
13
13
  smallPadding = false,
14
14
  paddingSize,
15
15
  arrow = false,
16
+ rootClassName,
16
17
  ...props
17
18
  }) => {
18
19
  return /* @__PURE__ */ jsxRuntime.jsx(
19
20
  antd.Popover,
20
21
  {
21
- overlayClassName: cx(
22
+ rootClassName: cx(
23
+ rootClassName,
22
24
  Popover_module.default.j2Popover,
23
25
  scrollable && Popover_module.default.scrollable,
24
26
  smallPadding && Popover_module.default.smallPadding,
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.cjs","sources":["../../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Popover as AntdPopover, PopoverProps as AntdPopoverProps } from 'antd'\nimport cx from 'classnames'\nimport styles from './Popover.module.css'\n\ntype _Props = AntdPopoverProps & {\n contentPadding?: boolean\n scrollable?: boolean\n /* @deprecated use paddingSize instead */\n smallPadding?: boolean\n /* default padding is large */\n paddingSize?: 'xxs' | 'xs' | 'sm' | 'md' | 'xl'\n}\n\nexport type PopoverProps = Expand<_Props>\n\nconst Popover = ({\n children,\n placement = 'top',\n scrollable = false,\n contentPadding = true,\n content,\n smallPadding = false,\n paddingSize,\n arrow = false,\n ...props\n}: PopoverProps) => {\n return (\n <AntdPopover\n overlayClassName={cx(\n styles.j2Popover,\n scrollable && styles.scrollable,\n smallPadding && styles.smallPadding,\n paddingSize && styles[`${paddingSize}Padding`]\n )}\n {...props}\n placement={placement}\n arrow={arrow}\n content={() => {\n if (!contentPadding) {\n return <div>{typeof content == 'function' ? content() : content}</div>\n }\n\n return typeof content == 'function' ? content() : content\n }}\n >\n <div>{children}</div>\n </AntdPopover>\n )\n}\n\nexport { Popover }\n"],"names":["jsx","AntdPopover","styles"],"mappings":";;;;;;AAeA,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,MAAoB;AAClB,SACEA,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACC,kBAAkB;AAAA,QAChBC,eAAAA,QAAO;AAAA,QACP,cAAcA,eAAAA,QAAO;AAAA,QACrB,gBAAgBA,eAAAA,QAAO;AAAA,QACvB,eAAeA,eAAAA,QAAO,GAAG,WAAW,SAAS;AAAA,MAAA;AAAA,MAE9C,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,SAAS,MAAM;AACb,YAAI,CAAC,gBAAgB;AACnB,gDAAQ,OAAA,EAAK,UAAA,OAAO,WAAW,aAAa,YAAY,SAAQ;AAAA,QAClE;AAEA,eAAO,OAAO,WAAW,aAAa,QAAA,IAAY;AAAA,MACpD;AAAA,MAEA,UAAAF,2BAAAA,IAAC,SAAK,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrB;;"}
1
+ {"version":3,"file":"Popover.cjs","sources":["../../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Popover as AntdPopover, PopoverProps as AntdPopoverProps } from 'antd'\nimport cx from 'classnames'\nimport styles from './Popover.module.css'\n\ntype _Props = AntdPopoverProps & {\n contentPadding?: boolean\n scrollable?: boolean\n /* @deprecated use paddingSize instead */\n smallPadding?: boolean\n /* default padding is large */\n paddingSize?: 'xxs' | 'xs' | 'sm' | 'md' | 'xl'\n}\n\nexport type PopoverProps = Expand<_Props>\n\nconst Popover = ({\n children,\n placement = 'top',\n scrollable = false,\n contentPadding = true,\n content,\n smallPadding = false,\n paddingSize,\n arrow = false,\n rootClassName,\n ...props\n}: PopoverProps) => {\n return (\n <AntdPopover\n rootClassName={cx(\n rootClassName,\n styles.j2Popover,\n scrollable && styles.scrollable,\n smallPadding && styles.smallPadding,\n paddingSize && styles[`${paddingSize}Padding`]\n )}\n {...props}\n placement={placement}\n arrow={arrow}\n content={() => {\n if (!contentPadding) {\n return <div>{typeof content == 'function' ? content() : content}</div>\n }\n\n return typeof content == 'function' ? content() : content\n }}\n >\n <div>{children}</div>\n </AntdPopover>\n )\n}\n\nexport { Popover }\n"],"names":["jsx","AntdPopover","styles"],"mappings":";;;;;;AAeA,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,MAAoB;AAClB,SACEA,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACC,eAAe;AAAA,QACb;AAAA,QACAC,eAAAA,QAAO;AAAA,QACP,cAAcA,eAAAA,QAAO;AAAA,QACrB,gBAAgBA,eAAAA,QAAO;AAAA,QACvB,eAAeA,eAAAA,QAAO,GAAG,WAAW,SAAS;AAAA,MAAA;AAAA,MAE9C,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,SAAS,MAAM;AACb,YAAI,CAAC,gBAAgB;AACnB,gDAAQ,OAAA,EAAK,UAAA,OAAO,WAAW,aAAa,YAAY,SAAQ;AAAA,QAClE;AAEA,eAAO,OAAO,WAAW,aAAa,QAAA,IAAY;AAAA,MACpD;AAAA,MAEA,UAAAF,2BAAAA,IAAC,SAAK,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrB;;"}
@@ -6,5 +6,5 @@ type _Props = AntdPopoverProps & {
6
6
  paddingSize?: 'xxs' | 'xs' | 'sm' | 'md' | 'xl';
7
7
  };
8
8
  export type PopoverProps = Expand<_Props>;
9
- declare const Popover: ({ children, placement, scrollable, contentPadding, content, smallPadding, paddingSize, arrow, ...props }: PopoverProps) => import("react").JSX.Element;
9
+ declare const Popover: ({ children, placement, scrollable, contentPadding, content, smallPadding, paddingSize, arrow, rootClassName, ...props }: PopoverProps) => import("react").JSX.Element;
10
10
  export { Popover };
@@ -11,12 +11,14 @@ const Popover = ({
11
11
  smallPadding = false,
12
12
  paddingSize,
13
13
  arrow = false,
14
+ rootClassName,
14
15
  ...props
15
16
  }) => {
16
17
  return /* @__PURE__ */ jsx(
17
18
  Popover$1,
18
19
  {
19
- overlayClassName: cx(
20
+ rootClassName: cx(
21
+ rootClassName,
20
22
  styles.j2Popover,
21
23
  scrollable && styles.scrollable,
22
24
  smallPadding && styles.smallPadding,
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Popover as AntdPopover, PopoverProps as AntdPopoverProps } from 'antd'\nimport cx from 'classnames'\nimport styles from './Popover.module.css'\n\ntype _Props = AntdPopoverProps & {\n contentPadding?: boolean\n scrollable?: boolean\n /* @deprecated use paddingSize instead */\n smallPadding?: boolean\n /* default padding is large */\n paddingSize?: 'xxs' | 'xs' | 'sm' | 'md' | 'xl'\n}\n\nexport type PopoverProps = Expand<_Props>\n\nconst Popover = ({\n children,\n placement = 'top',\n scrollable = false,\n contentPadding = true,\n content,\n smallPadding = false,\n paddingSize,\n arrow = false,\n ...props\n}: PopoverProps) => {\n return (\n <AntdPopover\n overlayClassName={cx(\n styles.j2Popover,\n scrollable && styles.scrollable,\n smallPadding && styles.smallPadding,\n paddingSize && styles[`${paddingSize}Padding`]\n )}\n {...props}\n placement={placement}\n arrow={arrow}\n content={() => {\n if (!contentPadding) {\n return <div>{typeof content == 'function' ? content() : content}</div>\n }\n\n return typeof content == 'function' ? content() : content\n }}\n >\n <div>{children}</div>\n </AntdPopover>\n )\n}\n\nexport { Popover }\n"],"names":["AntdPopover"],"mappings":";;;;AAeA,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,MAAoB;AAClB,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,kBAAkB;AAAA,QAChB,OAAO;AAAA,QACP,cAAc,OAAO;AAAA,QACrB,gBAAgB,OAAO;AAAA,QACvB,eAAe,OAAO,GAAG,WAAW,SAAS;AAAA,MAAA;AAAA,MAE9C,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,SAAS,MAAM;AACb,YAAI,CAAC,gBAAgB;AACnB,qCAAQ,OAAA,EAAK,UAAA,OAAO,WAAW,aAAa,YAAY,SAAQ;AAAA,QAClE;AAEA,eAAO,OAAO,WAAW,aAAa,QAAA,IAAY;AAAA,MACpD;AAAA,MAEA,UAAA,oBAAC,SAAK,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrB;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Popover as AntdPopover, PopoverProps as AntdPopoverProps } from 'antd'\nimport cx from 'classnames'\nimport styles from './Popover.module.css'\n\ntype _Props = AntdPopoverProps & {\n contentPadding?: boolean\n scrollable?: boolean\n /* @deprecated use paddingSize instead */\n smallPadding?: boolean\n /* default padding is large */\n paddingSize?: 'xxs' | 'xs' | 'sm' | 'md' | 'xl'\n}\n\nexport type PopoverProps = Expand<_Props>\n\nconst Popover = ({\n children,\n placement = 'top',\n scrollable = false,\n contentPadding = true,\n content,\n smallPadding = false,\n paddingSize,\n arrow = false,\n rootClassName,\n ...props\n}: PopoverProps) => {\n return (\n <AntdPopover\n rootClassName={cx(\n rootClassName,\n styles.j2Popover,\n scrollable && styles.scrollable,\n smallPadding && styles.smallPadding,\n paddingSize && styles[`${paddingSize}Padding`]\n )}\n {...props}\n placement={placement}\n arrow={arrow}\n content={() => {\n if (!contentPadding) {\n return <div>{typeof content == 'function' ? content() : content}</div>\n }\n\n return typeof content == 'function' ? content() : content\n }}\n >\n <div>{children}</div>\n </AntdPopover>\n )\n}\n\nexport { Popover }\n"],"names":["AntdPopover"],"mappings":";;;;AAeA,MAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,MAAoB;AAClB,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,eAAe;AAAA,QACb;AAAA,QACA,OAAO;AAAA,QACP,cAAc,OAAO;AAAA,QACrB,gBAAgB,OAAO;AAAA,QACvB,eAAe,OAAO,GAAG,WAAW,SAAS;AAAA,MAAA;AAAA,MAE9C,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,SAAS,MAAM;AACb,YAAI,CAAC,gBAAgB;AACnB,qCAAQ,OAAA,EAAK,UAAA,OAAO,WAAW,aAAa,YAAY,SAAQ;AAAA,QAClE;AAEA,eAAO,OAAO,WAAW,aAAa,QAAA,IAAY;AAAA,MACpD;AAAA,MAEA,UAAA,oBAAC,SAAK,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGrB;"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const j2Popover = "_j2Popover_1egkj_1";
4
- const smallPadding = "_smallPadding_1egkj_6";
5
- const smPadding = "_smPadding_1egkj_7";
6
- const xxsPadding = "_xxsPadding_1egkj_11";
7
- const xsPadding = "_xsPadding_1egkj_15";
8
- const mdPadding = "_mdPadding_1egkj_19";
9
- const xlPadding = "_xlPadding_1egkj_23";
10
- const popoverHeader = "_popoverHeader_1egkj_34";
11
- const scrollable = "_scrollable_1egkj_40";
3
+ const j2Popover = "_j2Popover_wjtre_1";
4
+ const smallPadding = "_smallPadding_wjtre_6";
5
+ const smPadding = "_smPadding_wjtre_7";
6
+ const xxsPadding = "_xxsPadding_wjtre_11";
7
+ const xsPadding = "_xsPadding_wjtre_15";
8
+ const mdPadding = "_mdPadding_wjtre_19";
9
+ const xlPadding = "_xlPadding_wjtre_23";
10
+ const popoverHeader = "_popoverHeader_wjtre_34";
11
+ const scrollable = "_scrollable_wjtre_40";
12
12
  const styles = {
13
13
  j2Popover,
14
14
  smallPadding,
@@ -1,12 +1,12 @@
1
- const j2Popover = "_j2Popover_1egkj_1";
2
- const smallPadding = "_smallPadding_1egkj_6";
3
- const smPadding = "_smPadding_1egkj_7";
4
- const xxsPadding = "_xxsPadding_1egkj_11";
5
- const xsPadding = "_xsPadding_1egkj_15";
6
- const mdPadding = "_mdPadding_1egkj_19";
7
- const xlPadding = "_xlPadding_1egkj_23";
8
- const popoverHeader = "_popoverHeader_1egkj_34";
9
- const scrollable = "_scrollable_1egkj_40";
1
+ const j2Popover = "_j2Popover_wjtre_1";
2
+ const smallPadding = "_smallPadding_wjtre_6";
3
+ const smPadding = "_smPadding_wjtre_7";
4
+ const xxsPadding = "_xxsPadding_wjtre_11";
5
+ const xsPadding = "_xsPadding_wjtre_15";
6
+ const mdPadding = "_mdPadding_wjtre_19";
7
+ const xlPadding = "_xlPadding_wjtre_23";
8
+ const popoverHeader = "_popoverHeader_wjtre_34";
9
+ const scrollable = "_scrollable_wjtre_40";
10
10
  const styles = {
11
11
  j2Popover,
12
12
  smallPadding,
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const formikAntd = require("formik-antd");
5
4
  const antd = require("antd");
6
5
  const Icon = require("@ant-design/icons");
7
6
  const react = require("@phosphor-icons/react");
8
7
  const React = require("react");
9
- const formik = require("formik");
8
+ const FormikField = require("../form/FormikField.cjs");
10
9
  const isGroupOption = (opt) => "options" in opt && Array.isArray(opt.options);
11
10
  const flattenOptions = (opts) => {
12
11
  if (!opts) return [];
@@ -14,20 +13,25 @@ const flattenOptions = (opts) => {
14
13
  (o) => isGroupOption(o) ? flattenOptions(o.options) : [o]
15
14
  );
16
15
  };
17
- const Select = (props) => {
16
+ const Select = (props) => /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name: props.name, children: ({ field, form }) => /* @__PURE__ */ jsxRuntime.jsx(SelectControl, { props, field, form }) });
17
+ const SelectControl = ({
18
+ props,
19
+ field,
20
+ form
21
+ }) => {
18
22
  var _a;
19
23
  const [isFocused, setIsFocused] = React.useState(false);
20
24
  const [isSearching, setIsSearching] = React.useState(false);
21
- const [field, , helpers] = formik.useField(props.name);
25
+ const helpers = form.getFieldHelpers(props.name);
22
26
  const isMultiple = props.mode === "multiple";
27
+ const isSearchable = props.mode === "tags" || (props.showSearch ?? isMultiple);
23
28
  const hasOptions = (((_a = props.options) == null ? void 0 : _a.length) ?? 0) > 0;
24
29
  const currentValue = Array.isArray(field.value) ? field.value : [];
25
30
  const showSelectAllFooter = isMultiple && !props.loading && !props.disabled && hasOptions && !isSearching;
26
31
  const handleSearch = (value) => {
27
32
  setIsSearching(value.length > 0);
28
- if (props.onSearch) {
29
- props.onSearch(value);
30
- }
33
+ const onSearch = typeof props.showSearch === "object" ? props.showSearch.onSearch ?? props.onSearch : props.onSearch;
34
+ onSearch == null ? void 0 : onSearch(value);
31
35
  };
32
36
  const handleToggleAll = () => {
33
37
  var _a2, _b;
@@ -76,7 +80,7 @@ const Select = (props) => {
76
80
  ] });
77
81
  };
78
82
  return /* @__PURE__ */ jsxRuntime.jsx(
79
- formikAntd.Select,
83
+ antd.Select,
80
84
  {
81
85
  suffixIcon: props.loading ? /* @__PURE__ */ jsxRuntime.jsx(
82
86
  antd.Spin,
@@ -85,19 +89,31 @@ const Select = (props) => {
85
89
  size: "small",
86
90
  "data-testid": "loading-spinner"
87
91
  }
88
- ) : props.showSearch && isFocused ? /* @__PURE__ */ jsxRuntime.jsx(react.MagnifyingGlassIcon, { size: 14, "data-testid": "magnifying-glass" }) : /* @__PURE__ */ jsxRuntime.jsx(react.CaretDownIcon, { size: 14, "data-testid": "caret-down" }),
92
+ ) : isSearchable && isFocused ? /* @__PURE__ */ jsxRuntime.jsx(react.MagnifyingGlassIcon, { size: 14, "data-testid": "magnifying-glass" }) : /* @__PURE__ */ jsxRuntime.jsx(react.CaretDownIcon, { size: 14, "data-testid": "caret-down" }),
89
93
  ...props,
94
+ id: props.id ?? props.name,
95
+ value: field.value === "" || field.value === null ? void 0 : field.value,
96
+ onChange: (value, option) => {
97
+ var _a2;
98
+ void helpers.setValue(value);
99
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, value, option);
100
+ },
90
101
  popupRender: dropdownRender,
91
102
  removeIcon: /* @__PURE__ */ jsxRuntime.jsx(react.XCircleIcon, { size: 12 }),
92
103
  allowClear: props.allowClear ? { clearIcon: /* @__PURE__ */ jsxRuntime.jsx(react.XCircleIcon, { size: 14 }) } : false,
93
- showSearch: props.showSearch,
94
- onSearch: handleSearch,
95
- onFocus: () => {
104
+ showSearch: typeof props.showSearch === "object" ? { ...props.showSearch, onSearch: handleSearch } : props.showSearch,
105
+ onSearch: isSearchable ? handleSearch : void 0,
106
+ onFocus: (event) => {
107
+ var _a2;
96
108
  setIsFocused(true);
109
+ (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, event);
97
110
  },
98
- onBlur: () => {
111
+ onBlur: (event) => {
112
+ var _a2;
113
+ void helpers.setTouched(true);
99
114
  setIsFocused(false);
100
115
  setIsSearching(false);
116
+ (_a2 = props.onBlur) == null ? void 0 : _a2.call(props, event);
101
117
  },
102
118
  size: props.size || "large"
103
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Select.cjs","sources":["../../../../src/components/select/Select.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Select as AntDSelect } from 'formik-antd'\nimport { Spin } from 'antd'\nimport { LoadingOutlined } from '@ant-design/icons'\nimport type {\n SelectProps as AntDSelectProps,\n DefaultOptionType,\n} from 'antd/es/select'\nimport {\n CaretDownIcon,\n MagnifyingGlassIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport { useState } from 'react'\nimport { useField } from 'formik'\n\ntype SelectProps = Expand<AntDSelectProps> & {\n name: string\n}\n\ntype GroupOption = { label?: React.ReactNode; options: DefaultOptionType[] }\n\nconst isGroupOption = (\n opt: DefaultOptionType | GroupOption\n): opt is GroupOption =>\n 'options' in opt && Array.isArray((opt as GroupOption).options)\n\nconst flattenOptions = (\n opts: (DefaultOptionType | GroupOption)[] | undefined\n): DefaultOptionType[] => {\n if (!opts) return []\n return opts.flatMap((o) =>\n isGroupOption(o) ? flattenOptions(o.options) : [o]\n )\n}\n\nexport const Select = (props: SelectProps) => {\n const [isFocused, setIsFocused] = useState(false)\n const [isSearching, setIsSearching] = useState(false)\n const [field, , helpers] = useField(props.name)\n\n const isMultiple = props.mode === 'multiple'\n const hasOptions = (props.options?.length ?? 0) > 0\n const currentValue: unknown[] = Array.isArray(field.value) ? field.value : []\n const showSelectAllFooter =\n isMultiple &&\n !props.loading &&\n !props.disabled &&\n hasOptions &&\n !isSearching\n\n const handleSearch = (value: string) => {\n setIsSearching(value.length > 0)\n if (props.onSearch) {\n props.onSearch(value)\n }\n }\n\n const handleToggleAll = () => {\n if (props.disabled) return\n\n if (currentValue.length === 0) {\n const flat = flattenOptions(\n props.options as (DefaultOptionType | GroupOption)[] | undefined\n )\n const allOptions = flat.filter(\n (opt) => opt.value !== undefined && opt.value !== null && !opt.disabled\n )\n // antd's labelInValue mode expects values shaped as { value, label }\n // rather than raw scalars; mirror that contract so the field state\n // and downstream onChange payload match what consumers expect.\n const payload = props.labelInValue\n ? allOptions.map((opt) => ({ value: opt.value, label: opt.label }))\n : allOptions.map((opt) => opt.value as string | number)\n void helpers.setValue(payload)\n props.onChange?.(payload, allOptions)\n } else {\n void helpers.setValue([])\n props.onChange?.([], [])\n }\n }\n\n const dropdownRender = (menu: React.ReactElement): React.ReactElement => {\n if (props.loading) {\n return (\n <div className=\"flex items-center justify-between px-3 py-1\">\n <span>Loading...</span>\n <Spin indicator={<LoadingOutlined spin />} size=\"small\" />\n </div>\n )\n }\n\n if (!props.options || (props.options && props.options.length === 0)) {\n return <div className=\"px-3 py-1\">No options</div>\n }\n\n if (!showSelectAllFooter) return menu\n\n const label = currentValue.length === 0 ? 'Select all' : 'Clear all'\n\n return (\n <>\n {menu}\n <div className=\"mt-1 pt-1 border-t border-j2-border-secondary\">\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n onMouseDown={(e) => e.preventDefault()}\n onClick={handleToggleAll}\n className=\"w-full text-center font-semibold text-sm py-1.5 rounded cursor-pointer text-j2-primary hover:bg-j2-primary-bg-hover bg-transparent border-0\"\n >\n {label}\n </button>\n </div>\n </>\n )\n }\n\n return (\n <AntDSelect\n suffixIcon={\n props.loading ? (\n <Spin\n indicator={<LoadingOutlined spin />}\n size=\"small\"\n data-testid=\"loading-spinner\"\n />\n ) : props.showSearch && isFocused ? (\n <MagnifyingGlassIcon size={14} data-testid=\"magnifying-glass\" />\n ) : (\n <CaretDownIcon size={14} data-testid=\"caret-down\" />\n )\n }\n {...props}\n popupRender={dropdownRender}\n removeIcon={<XCircleIcon size={12} />}\n allowClear={\n props.allowClear ? { clearIcon: <XCircleIcon size={14} /> } : false\n }\n showSearch={props.showSearch}\n onSearch={handleSearch}\n onFocus={() => {\n setIsFocused(true)\n }}\n onBlur={() => {\n setIsFocused(false)\n setIsSearching(false)\n }}\n size={props.size || 'large'}\n />\n )\n}\n"],"names":["useState","useField","_a","jsxs","jsx","Spin","LoadingOutlined","Fragment","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AACC,KAAAA;AAAAA,QAAA;AAAA,UACC,WAAWD,2BAAAA,IAACE,KAAAA,iBAAA,EAAgB,MAAI,KAAA,CAAC;AAAA,UACjC,MAAK;AAAA,UACL,eAAY;AAAA,QAAA;AAAA,MAAA,IAEZ,MAAM,cAAc,YACtBF,2BAAAA,IAACK,6BAAoB,MAAM,IAAI,eAAY,oBAAmB,IAE9DL,2BAAAA,IAACM,qBAAA,EAAc,MAAM,IAAI,eAAY,cAAa;AAAA,MAGrD,GAAG;AAAA,MACJ,aAAa;AAAA,MACb,YAAYN,2BAAAA,IAACO,MAAAA,aAAA,EAAY,MAAM,GAAA,CAAI;AAAA,MACnC,YACE,MAAM,aAAa,EAAE,0CAAYA,MAAAA,aAAA,EAAY,MAAM,GAAA,CAAI,EAAA,IAAO;AAAA,MAEhE,YAAY,MAAM;AAAA,MAClB,UAAU;AAAA,MACV,SAAS,MAAM;AACb,qBAAa,IAAI;AAAA,MACnB;AAAA,MACA,QAAQ,MAAM;AACZ,qBAAa,KAAK;AAClB,uBAAe,KAAK;AAAA,MACtB;AAAA,MACA,MAAM,MAAM,QAAQ;AAAA,IAAA;AAAA,EAAA;AAG1B;;"}
1
+ {"version":3,"file":"Select.cjs","sources":["../../../../src/components/select/Select.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Select as AntDSelect, Spin } from 'antd'\nimport { LoadingOutlined } from '@ant-design/icons'\nimport type {\n SelectProps as AntDSelectProps,\n DefaultOptionType,\n} from 'antd/es/select'\nimport {\n CaretDownIcon,\n MagnifyingGlassIcon,\n XCircleIcon,\n} from '@phosphor-icons/react'\nimport { useState } from 'react'\nimport type { FieldProps } from 'formik'\nimport { FormikField } from '../form/FormikField'\n\ntype SelectProps = Expand<AntDSelectProps> & {\n name: string\n}\n\ntype GroupOption = { label?: React.ReactNode; options: DefaultOptionType[] }\n\nconst isGroupOption = (\n opt: DefaultOptionType | GroupOption\n): opt is GroupOption =>\n 'options' in opt && Array.isArray((opt as GroupOption).options)\n\nconst flattenOptions = (\n opts: (DefaultOptionType | GroupOption)[] | undefined\n): DefaultOptionType[] => {\n if (!opts) return []\n return opts.flatMap((o) =>\n isGroupOption(o) ? flattenOptions(o.options) : [o]\n )\n}\n\nexport const Select = (props: SelectProps) => (\n <FormikField name={props.name}>\n {({ field, form }) => (\n <SelectControl props={props} field={field} form={form} />\n )}\n </FormikField>\n)\n\nconst SelectControl = ({\n props,\n field,\n form,\n}: { props: SelectProps } & Pick<FieldProps, 'field' | 'form'>) => {\n const [isFocused, setIsFocused] = useState(false)\n const [isSearching, setIsSearching] = useState(false)\n const helpers = form.getFieldHelpers(props.name)\n\n const isMultiple = props.mode === 'multiple'\n const isSearchable = props.mode === 'tags' || (props.showSearch ?? isMultiple)\n const hasOptions = (props.options?.length ?? 0) > 0\n const currentValue: unknown[] = Array.isArray(field.value) ? field.value : []\n const showSelectAllFooter =\n isMultiple &&\n !props.loading &&\n !props.disabled &&\n hasOptions &&\n !isSearching\n\n const handleSearch = (value: string) => {\n setIsSearching(value.length > 0)\n const onSearch =\n typeof props.showSearch === 'object'\n ? (props.showSearch.onSearch ?? props.onSearch)\n : props.onSearch\n onSearch?.(value)\n }\n\n const handleToggleAll = () => {\n if (props.disabled) return\n\n if (currentValue.length === 0) {\n const flat = flattenOptions(\n props.options as (DefaultOptionType | GroupOption)[] | undefined\n )\n const allOptions = flat.filter(\n (opt) => opt.value !== undefined && opt.value !== null && !opt.disabled\n )\n // antd's labelInValue mode expects values shaped as { value, label }\n // rather than raw scalars; mirror that contract so the field state\n // and downstream onChange payload match what consumers expect.\n const payload = props.labelInValue\n ? allOptions.map((opt) => ({ value: opt.value, label: opt.label }))\n : allOptions.map((opt) => opt.value as string | number)\n void helpers.setValue(payload)\n props.onChange?.(payload, allOptions)\n } else {\n void helpers.setValue([])\n props.onChange?.([], [])\n }\n }\n\n const dropdownRender = (menu: React.ReactElement): React.ReactElement => {\n if (props.loading) {\n return (\n <div className=\"flex items-center justify-between px-3 py-1\">\n <span>Loading...</span>\n <Spin indicator={<LoadingOutlined spin />} size=\"small\" />\n </div>\n )\n }\n\n if (!props.options || (props.options && props.options.length === 0)) {\n return <div className=\"px-3 py-1\">No options</div>\n }\n\n if (!showSelectAllFooter) return menu\n\n const label = currentValue.length === 0 ? 'Select all' : 'Clear all'\n\n return (\n <>\n {menu}\n <div className=\"mt-1 pt-1 border-t border-j2-border-secondary\">\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n onMouseDown={(e) => e.preventDefault()}\n onClick={handleToggleAll}\n className=\"w-full text-center font-semibold text-sm py-1.5 rounded cursor-pointer text-j2-primary hover:bg-j2-primary-bg-hover bg-transparent border-0\"\n >\n {label}\n </button>\n </div>\n </>\n )\n }\n\n return (\n <AntDSelect\n suffixIcon={\n props.loading ? (\n <Spin\n indicator={<LoadingOutlined spin />}\n size=\"small\"\n data-testid=\"loading-spinner\"\n />\n ) : isSearchable && isFocused ? (\n <MagnifyingGlassIcon size={14} data-testid=\"magnifying-glass\" />\n ) : (\n <CaretDownIcon size={14} data-testid=\"caret-down\" />\n )\n }\n {...props}\n id={props.id ?? props.name}\n value={\n field.value === '' || field.value === null ? undefined : field.value\n }\n onChange={(value, option) => {\n void helpers.setValue(value)\n props.onChange?.(value, option)\n }}\n popupRender={dropdownRender}\n removeIcon={<XCircleIcon size={12} />}\n allowClear={\n props.allowClear ? { clearIcon: <XCircleIcon size={14} /> } : false\n }\n showSearch={\n typeof props.showSearch === 'object'\n ? { ...props.showSearch, onSearch: handleSearch }\n : props.showSearch\n }\n onSearch={isSearchable ? handleSearch : undefined}\n onFocus={(event) => {\n setIsFocused(true)\n props.onFocus?.(event)\n }}\n onBlur={(event) => {\n void helpers.setTouched(true)\n setIsFocused(false)\n setIsSearching(false)\n props.onBlur?.(event)\n }}\n size={props.size || 'large'}\n />\n )\n}\n"],"names":["FormikField","jsx","useState","_a","jsxs","Spin","LoadingOutlined","Fragment","AntDSelect","MagnifyingGlassIcon","CaretDownIcon","XCircleIcon"],"mappings":";;;;;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