@j2-health/design-system 0.3.1 → 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.
- package/README.md +53 -20
- package/dist/src/components/alert/Alert.cjs +12 -2
- package/dist/src/components/alert/Alert.cjs.map +1 -1
- package/dist/src/components/alert/Alert.d.ts +1 -1
- package/dist/src/components/alert/Alert.js +12 -2
- package/dist/src/components/alert/Alert.js.map +1 -1
- package/dist/src/components/alert/Alert.module.css.cjs +1 -1
- package/dist/src/components/alert/Alert.module.css.js +1 -1
- package/dist/src/components/card/Card.cjs +1 -1
- package/dist/src/components/card/Card.cjs.map +1 -1
- package/dist/src/components/card/Card.js +1 -1
- package/dist/src/components/card/Card.js.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.cjs +3 -3
- package/dist/src/components/collapse/Collapse.module.css.js +3 -3
- package/dist/src/components/drawer/Drawer.cjs +3 -1
- package/dist/src/components/drawer/Drawer.cjs.map +1 -1
- package/dist/src/components/drawer/Drawer.js +3 -1
- package/dist/src/components/drawer/Drawer.js.map +1 -1
- package/dist/src/components/filterform/FiltersForm.cjs +14 -2
- package/dist/src/components/filterform/FiltersForm.cjs.map +1 -1
- package/dist/src/components/filterform/FiltersForm.js +14 -2
- package/dist/src/components/filterform/FiltersForm.js.map +1 -1
- package/dist/src/components/form/Form.cjs +21 -4
- package/dist/src/components/form/Form.cjs.map +1 -1
- package/dist/src/components/form/Form.d.ts +10 -3
- package/dist/src/components/form/Form.js +20 -3
- package/dist/src/components/form/Form.js.map +1 -1
- package/dist/src/components/form/FormItem.cjs +42 -0
- package/dist/src/components/form/FormItem.cjs.map +1 -0
- package/dist/src/components/form/FormItem.d.ts +10 -0
- package/dist/src/components/form/FormItem.js +42 -0
- package/dist/src/components/form/FormItem.js.map +1 -0
- package/dist/src/components/form/FormItemFieldContext.cjs +8 -0
- package/dist/src/components/form/FormItemFieldContext.cjs.map +1 -0
- package/dist/src/components/form/FormItemFieldContext.d.ts +2 -0
- package/dist/src/components/form/FormItemFieldContext.js +8 -0
- package/dist/src/components/form/FormItemFieldContext.js.map +1 -0
- package/dist/src/components/form/FormikField.cjs +20 -0
- package/dist/src/components/form/FormikField.cjs.map +1 -0
- package/dist/src/components/form/FormikField.d.ts +8 -0
- package/dist/src/components/form/FormikField.js +20 -0
- package/dist/src/components/form/FormikField.js.map +1 -0
- package/dist/src/components/input/AntdInput.d.ts +72 -26
- package/dist/src/components/input/AntdSearchInput.d.ts +77 -25
- package/dist/src/components/input/Input.cjs +29 -3
- package/dist/src/components/input/Input.cjs.map +1 -1
- package/dist/src/components/input/Input.d.ts +4 -3
- package/dist/src/components/input/Input.js +29 -3
- package/dist/src/components/input/Input.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.cjs +20 -5
- package/dist/src/components/inputnumber/InputNumber.cjs.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.d.ts +4 -3
- package/dist/src/components/inputnumber/InputNumber.js +19 -4
- package/dist/src/components/inputnumber/InputNumber.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.cjs +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.js +1 -1
- package/dist/src/components/modal/Modal.cjs +0 -1
- package/dist/src/components/modal/Modal.cjs.map +1 -1
- package/dist/src/components/modal/Modal.js +0 -1
- package/dist/src/components/modal/Modal.js.map +1 -1
- package/dist/src/components/notification/Notification.module.css.cjs +1 -1
- package/dist/src/components/notification/Notification.module.css.js +1 -1
- package/dist/src/components/notification/useNotification.cjs +5 -2
- package/dist/src/components/notification/useNotification.cjs.map +1 -1
- package/dist/src/components/notification/useNotification.js +5 -2
- package/dist/src/components/notification/useNotification.js.map +1 -1
- package/dist/src/components/pagination/Pagination.cjs +2 -0
- package/dist/src/components/pagination/Pagination.cjs.map +1 -1
- package/dist/src/components/pagination/Pagination.js +2 -0
- package/dist/src/components/pagination/Pagination.js.map +1 -1
- package/dist/src/components/popover/Popover.cjs +3 -1
- package/dist/src/components/popover/Popover.cjs.map +1 -1
- package/dist/src/components/popover/Popover.d.ts +1 -1
- package/dist/src/components/popover/Popover.js +3 -1
- package/dist/src/components/popover/Popover.js.map +1 -1
- package/dist/src/components/popover/Popover.module.css.cjs +9 -9
- package/dist/src/components/popover/Popover.module.css.js +9 -9
- package/dist/src/components/select/Select.cjs +29 -13
- package/dist/src/components/select/Select.cjs.map +1 -1
- package/dist/src/components/select/Select.js +29 -13
- package/dist/src/components/select/Select.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.cjs +8 -8
- package/dist/src/components/select/SummarizedSelect.module.css.js +8 -8
- package/dist/src/components/steps/Steps.cjs +14 -4
- package/dist/src/components/steps/Steps.cjs.map +1 -1
- package/dist/src/components/steps/Steps.d.ts +3 -3
- package/dist/src/components/steps/Steps.js +14 -4
- package/dist/src/components/steps/Steps.js.map +1 -1
- package/dist/src/components/table/Table.cjs +1 -1
- package/dist/src/components/table/Table.cjs.map +1 -1
- package/dist/src/components/table/Table.d.ts +4 -1
- package/dist/src/components/table/Table.js +1 -1
- package/dist/src/components/table/Table.js.map +1 -1
- package/dist/src/components/tag/Tag.cjs +4 -0
- package/dist/src/components/tag/Tag.cjs.map +1 -1
- package/dist/src/components/tag/Tag.d.ts +1 -1
- package/dist/src/components/tag/Tag.js +4 -0
- package/dist/src/components/tag/Tag.js.map +1 -1
- package/dist/style.css +92 -78
- package/package.json +15 -17
|
@@ -1,13 +1,53 @@
|
|
|
1
1
|
import { InputRef } from 'antd';
|
|
2
|
+
import { SearchProps as AntDSearchProps } from 'antd/es/input/Search';
|
|
2
3
|
export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<{
|
|
3
4
|
[x: `data-${string}`]: string | undefined;
|
|
4
5
|
inputPrefixCls?: string | undefined;
|
|
5
6
|
onSearch?: ((value: string, event?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLInputElement>, info?: {
|
|
6
7
|
source?: "clear" | "input";
|
|
7
8
|
}) => void) | undefined;
|
|
9
|
+
searchIcon?: import('react').ReactNode;
|
|
8
10
|
enterButton?: import('react').ReactNode;
|
|
9
11
|
loading?: boolean | undefined;
|
|
10
12
|
onPressEnter?: ((e: React.KeyboardEvent<HTMLInputElement>) => void) | undefined;
|
|
13
|
+
classNames?: ((info: {
|
|
14
|
+
props: AntDSearchProps;
|
|
15
|
+
}) => import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepClassNameType<{
|
|
16
|
+
root?: string;
|
|
17
|
+
input?: string;
|
|
18
|
+
prefix?: string;
|
|
19
|
+
suffix?: string;
|
|
20
|
+
clear?: string;
|
|
21
|
+
count?: string;
|
|
22
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["classNames"];
|
|
23
|
+
} | undefined>) | import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepClassNameType<{
|
|
24
|
+
root?: string;
|
|
25
|
+
input?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
suffix?: string;
|
|
28
|
+
clear?: string;
|
|
29
|
+
count?: string;
|
|
30
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["classNames"];
|
|
31
|
+
} | undefined>;
|
|
32
|
+
styles?: ((info: {
|
|
33
|
+
props: AntDSearchProps;
|
|
34
|
+
}) => import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepStylesType<{
|
|
35
|
+
root?: React.CSSProperties;
|
|
36
|
+
input?: React.CSSProperties;
|
|
37
|
+
prefix?: React.CSSProperties;
|
|
38
|
+
suffix?: React.CSSProperties;
|
|
39
|
+
clear?: React.CSSProperties;
|
|
40
|
+
count?: React.CSSProperties;
|
|
41
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["styles"];
|
|
42
|
+
} | undefined>) | import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepStylesType<{
|
|
43
|
+
root?: React.CSSProperties;
|
|
44
|
+
input?: React.CSSProperties;
|
|
45
|
+
prefix?: React.CSSProperties;
|
|
46
|
+
suffix?: React.CSSProperties;
|
|
47
|
+
clear?: React.CSSProperties;
|
|
48
|
+
count?: React.CSSProperties;
|
|
49
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["styles"];
|
|
50
|
+
} | undefined>;
|
|
11
51
|
rootClassName?: string | undefined;
|
|
12
52
|
size?: import('antd/es/button').ButtonSize;
|
|
13
53
|
disabled?: boolean | undefined;
|
|
@@ -16,9 +56,6 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
16
56
|
addonAfter?: import('react').ReactNode;
|
|
17
57
|
bordered?: boolean | undefined;
|
|
18
58
|
variant?: import('antd/es/config-provider').Variant | undefined;
|
|
19
|
-
classNames?: Partial<Record<"prefix" | "input" | "count" | "suffix", string>> | undefined;
|
|
20
|
-
styles?: Partial<Record<"prefix" | "input" | "count" | "suffix", React.CSSProperties>> | undefined;
|
|
21
|
-
_skipAddonWarning?: boolean | undefined;
|
|
22
59
|
prefix?: import('react').ReactNode;
|
|
23
60
|
height?: number | string | undefined | undefined;
|
|
24
61
|
width?: number | string | undefined | undefined;
|
|
@@ -38,7 +75,9 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
38
75
|
max?: number | string | undefined | undefined;
|
|
39
76
|
min?: number | string | undefined | undefined;
|
|
40
77
|
name?: string | undefined | undefined;
|
|
41
|
-
|
|
78
|
+
nonce?: string | undefined | undefined;
|
|
79
|
+
part?: string | undefined | undefined;
|
|
80
|
+
type?: import('@rc-component/input/lib/utils/types').LiteralUnion<"button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week", string> | undefined;
|
|
42
81
|
role?: import('react').AriaRole | undefined;
|
|
43
82
|
tabIndex?: number | undefined | undefined;
|
|
44
83
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
@@ -113,18 +152,18 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
113
152
|
onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
114
153
|
onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
115
154
|
onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
116
|
-
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
|
117
|
-
onChangeCapture?: import('react').
|
|
155
|
+
onChange?: import('react').ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined;
|
|
156
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLInputElement, Element> | undefined;
|
|
118
157
|
onBeforeInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
119
|
-
onBeforeInputCapture?: import('react').
|
|
120
|
-
onInput?: import('react').
|
|
121
|
-
onInputCapture?: import('react').
|
|
122
|
-
onReset?: import('react').
|
|
123
|
-
onResetCapture?: import('react').
|
|
124
|
-
onSubmit?: import('react').
|
|
125
|
-
onSubmitCapture?: import('react').
|
|
126
|
-
onInvalid?: import('react').
|
|
127
|
-
onInvalidCapture?: import('react').
|
|
158
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
159
|
+
onInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
160
|
+
onInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
161
|
+
onReset?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
162
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
163
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
164
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
165
|
+
onInvalid?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
166
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
128
167
|
onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
129
168
|
onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
130
169
|
onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
@@ -245,6 +284,8 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
245
284
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
|
246
285
|
onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
247
286
|
onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
287
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
288
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
248
289
|
onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
249
290
|
onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
250
291
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
@@ -253,13 +294,23 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
253
294
|
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
254
295
|
onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
255
296
|
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
297
|
+
onToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
298
|
+
onBeforeToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
299
|
+
onTransitionCancel?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
300
|
+
onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
256
301
|
onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
257
302
|
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
258
|
-
|
|
303
|
+
onTransitionRun?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
304
|
+
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
305
|
+
onTransitionStart?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
306
|
+
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
307
|
+
value?: import('@rc-component/input/lib/interface').ValueType;
|
|
259
308
|
prefixCls?: string | undefined;
|
|
309
|
+
list?: string | undefined | undefined;
|
|
260
310
|
step?: number | string | undefined | undefined;
|
|
261
311
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
262
|
-
|
|
312
|
+
hidden?: boolean | undefined | undefined;
|
|
313
|
+
multiple?: boolean | undefined | undefined;
|
|
263
314
|
defaultChecked?: boolean | undefined | undefined;
|
|
264
315
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
265
316
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -270,8 +321,6 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
270
321
|
contextMenu?: string | undefined | undefined;
|
|
271
322
|
dir?: string | undefined | undefined;
|
|
272
323
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
273
|
-
hidden?: boolean | undefined | undefined;
|
|
274
|
-
nonce?: string | undefined | undefined;
|
|
275
324
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
276
325
|
radioGroup?: string | undefined | undefined;
|
|
277
326
|
about?: string | undefined | undefined;
|
|
@@ -293,35 +342,38 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
293
342
|
results?: number | undefined | undefined;
|
|
294
343
|
security?: string | undefined | undefined;
|
|
295
344
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
345
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
346
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
347
|
+
popoverTarget?: string | undefined | undefined;
|
|
348
|
+
inert?: boolean | undefined | undefined;
|
|
296
349
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
297
350
|
is?: string | undefined | undefined;
|
|
298
351
|
exportparts?: string | undefined | undefined;
|
|
299
|
-
|
|
300
|
-
formAction?: string | undefined;
|
|
352
|
+
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
301
353
|
formEncType?: string | undefined | undefined;
|
|
302
354
|
formMethod?: string | undefined | undefined;
|
|
303
355
|
formNoValidate?: boolean | undefined | undefined;
|
|
304
356
|
formTarget?: string | undefined | undefined;
|
|
305
|
-
count?: import('rc-input/lib/interface').CountConfig | undefined;
|
|
357
|
+
count?: import('@rc-component/input/lib/interface').CountConfig | undefined;
|
|
306
358
|
checked?: boolean | undefined | undefined;
|
|
307
359
|
required?: boolean | undefined | undefined;
|
|
308
360
|
alt?: string | undefined | undefined;
|
|
309
361
|
autoComplete?: string | undefined;
|
|
310
362
|
accept?: string | undefined | undefined;
|
|
311
363
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
312
|
-
multiple?: boolean | undefined | undefined;
|
|
313
364
|
maxLength?: number | undefined | undefined;
|
|
314
365
|
minLength?: number | undefined | undefined;
|
|
315
366
|
src?: string | undefined | undefined;
|
|
316
367
|
placeholder?: string | undefined | undefined;
|
|
317
368
|
onClear?: (() => void) | undefined;
|
|
318
369
|
allowClear?: boolean | {
|
|
370
|
+
disabled?: boolean;
|
|
319
371
|
clearIcon?: import('react').ReactNode;
|
|
320
372
|
} | undefined;
|
|
373
|
+
suffix?: import('react').ReactNode;
|
|
321
374
|
readOnly?: boolean | undefined | undefined;
|
|
322
375
|
showCount?: boolean | {
|
|
323
|
-
formatter: import('rc-input/lib/interface').ShowCountFormatter;
|
|
376
|
+
formatter: import('@rc-component/input/lib/interface').ShowCountFormatter;
|
|
324
377
|
} | undefined;
|
|
325
378
|
htmlSize?: number | undefined;
|
|
326
|
-
suffix?: import('react').ReactNode;
|
|
327
379
|
} & import('react').RefAttributes<InputRef>>;
|
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
const antd = require("antd");
|
|
5
|
+
const FormikField = require("../form/FormikField.cjs");
|
|
6
|
+
const Input = ({
|
|
7
|
+
size = "large",
|
|
8
|
+
name,
|
|
9
|
+
validate,
|
|
10
|
+
fast,
|
|
11
|
+
onChange,
|
|
12
|
+
onBlur,
|
|
13
|
+
...props
|
|
14
|
+
}) => {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name, validate, fast, children: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
antd.Input,
|
|
17
|
+
{
|
|
18
|
+
size,
|
|
19
|
+
name,
|
|
20
|
+
id: name,
|
|
21
|
+
...props,
|
|
22
|
+
value: field.value,
|
|
23
|
+
onChange: (event) => {
|
|
24
|
+
field.onChange(event);
|
|
25
|
+
onChange == null ? void 0 : onChange(event);
|
|
26
|
+
},
|
|
27
|
+
onBlur: (event) => {
|
|
28
|
+
field.onBlur(event);
|
|
29
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
7
33
|
};
|
|
8
34
|
exports.Input = Input;
|
|
9
35
|
//# sourceMappingURL=Input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.cjs","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as
|
|
1
|
+
{"version":3,"file":"Input.cjs","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as AntdInput, type InputProps } from 'antd'\nimport { FormikField, type FormikFieldProps } from '../form/FormikField'\ntype Props = Expand<InputProps & FormikFieldProps>\n\nexport const Input = ({\n size = 'large',\n name,\n validate,\n fast,\n onChange,\n onBlur,\n ...props\n}: Props) => {\n return (\n <FormikField name={name} validate={validate} fast={fast}>\n {({ field }) => (\n <AntdInput\n size={size}\n name={name}\n id={name}\n {...props}\n value={field.value}\n onChange={(event) => {\n field.onChange(event)\n onChange?.(event)\n }}\n onBlur={(event) => {\n field.onBlur(event)\n onBlur?.(event)\n }}\n />\n )}\n </FormikField>\n )\n}\n"],"names":["jsx","FormikField","AntdInput"],"mappings":";;;;;AAIO,MAAM,QAAQ,CAAC;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACEA,2BAAAA,IAACC,2BAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,YACFD,2BAAAA;AAAAA,IAACE,KAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,IAAI;AAAA,MACH,GAAG;AAAA,MACJ,OAAO,MAAM;AAAA,MACb,UAAU,CAAC,UAAU;AACnB,cAAM,SAAS,KAAK;AACpB,6CAAW;AAAA,MACb;AAAA,MACA,QAAQ,CAAC,UAAU;AACjB,cAAM,OAAO,KAAK;AAClB,yCAAS;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { InputProps } from '
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { InputProps } from 'antd';
|
|
2
|
+
import { FormikFieldProps } from '../form/FormikField.js';
|
|
3
|
+
type Props = Expand<InputProps & FormikFieldProps>;
|
|
4
|
+
export declare const Input: ({ size, name, validate, fast, onChange, onBlur, ...props }: Props) => import("react").JSX.Element;
|
|
4
5
|
export {};
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Input as Input$1 } from "
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { Input as Input$1 } from "antd";
|
|
3
|
+
import { FormikField } from "../form/FormikField.js";
|
|
4
|
+
const Input = ({
|
|
5
|
+
size = "large",
|
|
6
|
+
name,
|
|
7
|
+
validate,
|
|
8
|
+
fast,
|
|
9
|
+
onChange,
|
|
10
|
+
onBlur,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(FormikField, { name, validate, fast, children: ({ field }) => /* @__PURE__ */ jsx(
|
|
14
|
+
Input$1,
|
|
15
|
+
{
|
|
16
|
+
size,
|
|
17
|
+
name,
|
|
18
|
+
id: name,
|
|
19
|
+
...props,
|
|
20
|
+
value: field.value,
|
|
21
|
+
onChange: (event) => {
|
|
22
|
+
field.onChange(event);
|
|
23
|
+
onChange == null ? void 0 : onChange(event);
|
|
24
|
+
},
|
|
25
|
+
onBlur: (event) => {
|
|
26
|
+
field.onBlur(event);
|
|
27
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
5
31
|
};
|
|
6
32
|
export {
|
|
7
33
|
Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as AntdInput, type InputProps } from 'antd'\nimport { FormikField, type FormikFieldProps } from '../form/FormikField'\ntype Props = Expand<InputProps & FormikFieldProps>\n\nexport const Input = ({\n size = 'large',\n name,\n validate,\n fast,\n onChange,\n onBlur,\n ...props\n}: Props) => {\n return (\n <FormikField name={name} validate={validate} fast={fast}>\n {({ field }) => (\n <AntdInput\n size={size}\n name={name}\n id={name}\n {...props}\n value={field.value}\n onChange={(event) => {\n field.onChange(event)\n onChange?.(event)\n }}\n onBlur={(event) => {\n field.onBlur(event)\n onBlur?.(event)\n }}\n />\n )}\n </FormikField>\n )\n}\n"],"names":["AntdInput"],"mappings":";;;AAIO,MAAM,QAAQ,CAAC;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACE,oBAAC,eAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,YACF;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,IAAI;AAAA,MACH,GAAG;AAAA,MACJ,OAAO,MAAM;AAAA,MACb,UAAU,CAAC,UAAU;AACnB,cAAM,SAAS,KAAK;AACpB,6CAAW;AAAA,MACb;AAAA,MACA,QAAQ,CAAC,UAAU;AACjB,cAAM,OAAO,KAAK;AAClB,yCAAS;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
4
|
+
const antd = require("antd");
|
|
5
|
+
const FormikField = require("../form/FormikField.cjs");
|
|
5
6
|
const cx = require("classnames");
|
|
6
7
|
const InputNumber_module = require("./InputNumber.module.css.cjs");
|
|
7
8
|
const react = require("@phosphor-icons/react");
|
|
@@ -11,12 +12,17 @@ const InputNumber = ({
|
|
|
11
12
|
name,
|
|
12
13
|
max,
|
|
13
14
|
min,
|
|
15
|
+
validate,
|
|
16
|
+
fast,
|
|
17
|
+
onChange,
|
|
18
|
+
onBlur,
|
|
14
19
|
...props
|
|
15
20
|
}) => {
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name, validate, fast, children: ({ field, form }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
+
antd.InputNumber,
|
|
18
23
|
{
|
|
19
24
|
name,
|
|
25
|
+
id: name,
|
|
20
26
|
max,
|
|
21
27
|
min,
|
|
22
28
|
step,
|
|
@@ -24,9 +30,18 @@ const InputNumber = ({
|
|
|
24
30
|
upHandler: /* @__PURE__ */ jsxRuntime.jsx(react.CaretUpIcon, { weight: "bold", size: 12 }),
|
|
25
31
|
downHandler: /* @__PURE__ */ jsxRuntime.jsx(react.CaretDownIcon, { weight: "bold", size: 12 }),
|
|
26
32
|
size,
|
|
27
|
-
...props
|
|
33
|
+
...props,
|
|
34
|
+
value: field.value,
|
|
35
|
+
onChange: (value) => {
|
|
36
|
+
void form.setFieldValue(name, value);
|
|
37
|
+
onChange == null ? void 0 : onChange(value);
|
|
38
|
+
},
|
|
39
|
+
onBlur: (event) => {
|
|
40
|
+
field.onBlur(event);
|
|
41
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
42
|
+
}
|
|
28
43
|
}
|
|
29
|
-
);
|
|
44
|
+
) });
|
|
30
45
|
};
|
|
31
46
|
exports.InputNumber = InputNumber;
|
|
32
47
|
//# sourceMappingURL=InputNumber.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumber.cjs","sources":["../../../../src/components/inputnumber/InputNumber.tsx"],"sourcesContent":["import { InputNumber as
|
|
1
|
+
{"version":3,"file":"InputNumber.cjs","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":["jsx","FormikField","AntdInputNumber","styles","CaretUpIcon","CaretDownIcon"],"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,SACEA,+BAACC,YAAAA,eAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,OAAO,KAAA,MACTD,2BAAAA;AAAAA,IAACE,KAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAGC,mBAAAA,QAAO,eAAe,MAAM,SAAS;AAAA,MACnD,WAAWH,2BAAAA,IAACI,mBAAA,EAAY,QAAO,QAAO,MAAM,IAAI;AAAA,MAChD,aAAaJ,2BAAAA,IAACK,qBAAA,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,9 +1,10 @@
|
|
|
1
|
-
import { InputNumberProps } from '
|
|
2
|
-
|
|
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 "
|
|
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
|
|
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 +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
|
|
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;;"}
|
|
@@ -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
|
|
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;"}
|
|
@@ -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
|
-
...
|
|
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]:
|
|
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 ...
|
|
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
|
-
...
|
|
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]:
|
|
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 ...
|
|
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,
|