@pnkx-lib/ui 1.2.0 → 1.2.2

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.
@@ -0,0 +1,286 @@
1
+ import ee from "react";
2
+ import { Button as re } from "antd";
3
+ var T = { exports: {} }, R = {};
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.production.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var I;
14
+ function te() {
15
+ if (I) return R;
16
+ I = 1;
17
+ var c = Symbol.for("react.transitional.element"), _ = Symbol.for("react.fragment");
18
+ function f(m, a, s) {
19
+ var d = null;
20
+ if (s !== void 0 && (d = "" + s), a.key !== void 0 && (d = "" + a.key), "key" in a) {
21
+ s = {};
22
+ for (var E in a)
23
+ E !== "key" && (s[E] = a[E]);
24
+ } else s = a;
25
+ return a = s.ref, {
26
+ $$typeof: c,
27
+ type: m,
28
+ key: d,
29
+ ref: a !== void 0 ? a : null,
30
+ props: s
31
+ };
32
+ }
33
+ return R.Fragment = _, R.jsx = f, R.jsxs = f, R;
34
+ }
35
+ var b = {};
36
+ /**
37
+ * @license React
38
+ * react-jsx-runtime.development.js
39
+ *
40
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */
45
+ var F;
46
+ function ne() {
47
+ return F || (F = 1, process.env.NODE_ENV !== "production" && function() {
48
+ function c(e) {
49
+ if (e == null) return null;
50
+ if (typeof e == "function")
51
+ return e.$$typeof === Z ? null : e.displayName || e.name || null;
52
+ if (typeof e == "string") return e;
53
+ switch (e) {
54
+ case p:
55
+ return "Fragment";
56
+ case q:
57
+ return "Profiler";
58
+ case U:
59
+ return "StrictMode";
60
+ case B:
61
+ return "Suspense";
62
+ case G:
63
+ return "SuspenseList";
64
+ case H:
65
+ return "Activity";
66
+ }
67
+ if (typeof e == "object")
68
+ switch (typeof e.tag == "number" && console.error(
69
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
+ ), e.$$typeof) {
71
+ case W:
72
+ return "Portal";
73
+ case z:
74
+ return (e.displayName || "Context") + ".Provider";
75
+ case J:
76
+ return (e._context.displayName || "Context") + ".Consumer";
77
+ case V:
78
+ var r = e.render;
79
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
+ case X:
81
+ return r = e.displayName || null, r !== null ? r : c(e.type) || "Memo";
82
+ case g:
83
+ r = e._payload, e = e._init;
84
+ try {
85
+ return c(e(r));
86
+ } catch {
87
+ }
88
+ }
89
+ return null;
90
+ }
91
+ function _(e) {
92
+ return "" + e;
93
+ }
94
+ function f(e) {
95
+ try {
96
+ _(e);
97
+ var r = !1;
98
+ } catch {
99
+ r = !0;
100
+ }
101
+ if (r) {
102
+ r = console;
103
+ var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
+ return t.call(
105
+ r,
106
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
+ n
108
+ ), _(e);
109
+ }
110
+ }
111
+ function m(e) {
112
+ if (e === p) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === g)
114
+ return "<...>";
115
+ try {
116
+ var r = c(e);
117
+ return r ? "<" + r + ">" : "<...>";
118
+ } catch {
119
+ return "<...>";
120
+ }
121
+ }
122
+ function a() {
123
+ var e = k.A;
124
+ return e === null ? null : e.getOwner();
125
+ }
126
+ function s() {
127
+ return Error("react-stack-top-frame");
128
+ }
129
+ function d(e) {
130
+ if (h.call(e, "key")) {
131
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
132
+ if (r && r.isReactWarning) return !1;
133
+ }
134
+ return e.key !== void 0;
135
+ }
136
+ function E(e, r) {
137
+ function t() {
138
+ y || (y = !0, console.error(
139
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
+ r
141
+ ));
142
+ }
143
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
144
+ get: t,
145
+ configurable: !0
146
+ });
147
+ }
148
+ function L() {
149
+ var e = c(this.type);
150
+ return N[e] || (N[e] = !0, console.error(
151
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
+ )), e = this.props.ref, e !== void 0 ? e : null;
153
+ }
154
+ function M(e, r, t, n, l, u, A, S) {
155
+ return t = u.ref, e = {
156
+ $$typeof: x,
157
+ type: e,
158
+ key: r,
159
+ props: u,
160
+ _owner: l
161
+ }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
162
+ enumerable: !1,
163
+ get: L
164
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
+ configurable: !1,
166
+ enumerable: !1,
167
+ writable: !0,
168
+ value: 0
169
+ }), Object.defineProperty(e, "_debugInfo", {
170
+ configurable: !1,
171
+ enumerable: !1,
172
+ writable: !0,
173
+ value: null
174
+ }), Object.defineProperty(e, "_debugStack", {
175
+ configurable: !1,
176
+ enumerable: !1,
177
+ writable: !0,
178
+ value: A
179
+ }), Object.defineProperty(e, "_debugTask", {
180
+ configurable: !1,
181
+ enumerable: !1,
182
+ writable: !0,
183
+ value: S
184
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
+ }
186
+ function j(e, r, t, n, l, u, A, S) {
187
+ var o = r.children;
188
+ if (o !== void 0)
189
+ if (n)
190
+ if (Q(o)) {
191
+ for (n = 0; n < o.length; n++)
192
+ w(o[n]);
193
+ Object.freeze && Object.freeze(o);
194
+ } else
195
+ console.error(
196
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
+ );
198
+ else w(o);
199
+ if (h.call(r, "key")) {
200
+ o = c(e);
201
+ var i = Object.keys(r).filter(function(K) {
202
+ return K !== "key";
203
+ });
204
+ n = 0 < i.length ? "{key: someKey, " + i.join(": ..., ") + ": ...}" : "{key: someKey}", $[o + n] || (i = 0 < i.length ? "{" + i.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ `A props object containing a "key" prop is being spread into JSX:
206
+ let props = %s;
207
+ <%s {...props} />
208
+ React keys must be passed directly to JSX without using spread:
209
+ let props = %s;
210
+ <%s key={someKey} {...props} />`,
211
+ n,
212
+ o,
213
+ i,
214
+ o
215
+ ), $[o + n] = !0);
216
+ }
217
+ if (o = null, t !== void 0 && (f(t), o = "" + t), d(r) && (f(r.key), o = "" + r.key), "key" in r) {
218
+ t = {};
219
+ for (var P in r)
220
+ P !== "key" && (t[P] = r[P]);
221
+ } else t = r;
222
+ return o && E(
223
+ t,
224
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
+ ), M(
226
+ e,
227
+ o,
228
+ u,
229
+ l,
230
+ a(),
231
+ t,
232
+ A,
233
+ S
234
+ );
235
+ }
236
+ function w(e) {
237
+ typeof e == "object" && e !== null && e.$$typeof === x && e._store && (e._store.validated = 1);
238
+ }
239
+ var v = ee, x = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), z = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), k = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, h = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
240
+ return null;
241
+ };
242
+ v = {
243
+ "react-stack-bottom-frame": function(e) {
244
+ return e();
245
+ }
246
+ };
247
+ var y, N = {}, C = v["react-stack-bottom-frame"].bind(
248
+ v,
249
+ s
250
+ )(), Y = O(m(s)), $ = {};
251
+ b.Fragment = p, b.jsx = function(e, r, t, n, l) {
252
+ var u = 1e4 > k.recentlyCreatedOwnerStacks++;
253
+ return j(
254
+ e,
255
+ r,
256
+ t,
257
+ !1,
258
+ n,
259
+ l,
260
+ u ? Error("react-stack-top-frame") : C,
261
+ u ? O(m(e)) : Y
262
+ );
263
+ }, b.jsxs = function(e, r, t, n, l) {
264
+ var u = 1e4 > k.recentlyCreatedOwnerStacks++;
265
+ return j(
266
+ e,
267
+ r,
268
+ t,
269
+ !0,
270
+ n,
271
+ l,
272
+ u ? Error("react-stack-top-frame") : C,
273
+ u ? O(m(e)) : Y
274
+ );
275
+ };
276
+ }()), b;
277
+ }
278
+ var D;
279
+ function oe() {
280
+ return D || (D = 1, process.env.NODE_ENV === "production" ? T.exports = te() : T.exports = ne()), T.exports;
281
+ }
282
+ var ae = oe();
283
+ const ce = (c) => /* @__PURE__ */ ae.jsx(re, { ...c });
284
+ export {
285
+ ce as B
286
+ };
@@ -1,12 +1 @@
1
- import { D as i, I as s, R as o, a as r } from "../chunks/Switch-DAZukdDR.js";
2
- import { C as l, P as t, R as F, S as c } from "../chunks/Checkbox-CXb4qF1Z.js";
3
- export {
4
- l as CheckboxField,
5
- i as DatePickerField,
6
- s as Input,
7
- t as PnkxField,
8
- F as RadioGroup,
9
- o as RangePickerField,
10
- c as SelectField,
11
- r as TinyMCE
12
- };
1
+
package/dist/index.js CHANGED
@@ -1,39 +1,4 @@
1
- import { g as e, B as o, C as r, f as t, D as l, F as i, L as n, j as p, M as d, k as F, e as P, d as c, P as k, c as x, R as C, S, h as T, i as b, l as g, T as u, b as M, a as R, t as m } from "./chunks/Steps-CqDrt6vm.js";
2
- import { D as f, E as h, I as B, L as D, R as L, a as E, T as w } from "./chunks/Switch-DAZukdDR.js";
3
- import { C as j, P as v, R as G, S as q } from "./chunks/Checkbox-CXb4qF1Z.js";
1
+ import { B as r } from "./chunks/Button-LzEtyXiG.js";
4
2
  export {
5
- e as Breadcrumb,
6
- o as Button,
7
- r as CascaderField,
8
- j as CheckboxField,
9
- t as Col,
10
- f as DatePickerField,
11
- l as Dropdown,
12
- h as ErrorMessage,
13
- i as Flex,
14
- B as Input,
15
- D as Label,
16
- n as Layout,
17
- p as Menu,
18
- d as Modal,
19
- F as Pagination,
20
- P as PnkxBadge,
21
- c as PnkxContainer,
22
- v as PnkxField,
23
- k as PnkxSkeleton,
24
- x as Popover,
25
- G as RadioGroup,
26
- L as RangePickerField,
27
- C as Row,
28
- S as SearchFiltersForm,
29
- q as SelectField,
30
- T as Space,
31
- b as Splitter,
32
- g as Steps,
33
- u as Table,
34
- M as Tabs,
35
- E as TinyMCE,
36
- R as Tooltip,
37
- w as Typography,
38
- m as typeColorMap
3
+ r as Button
39
4
  };
@@ -1,193 +1 @@
1
- import { CheckboxProps } from 'antd';
2
- import { Control } from 'react-hook-form';
3
- import { ControllerFieldState } from 'react-hook-form';
4
- import { ControllerRenderProps } from 'react-hook-form';
5
- import { Dayjs } from 'dayjs';
6
- import { default as default_2 } from 'react';
7
- import { IAllProps } from '@tinymce/tinymce-react';
8
- import { InputProps as InputProps_2 } from 'antd';
9
- import { JSX } from 'react/jsx-runtime';
10
- import { JSX as JSX_2 } from 'react';
11
- import { RadioGroupProps } from 'antd';
12
- import { RangePickerProps } from 'antd/es/date-picker';
13
- import * as React_2 from 'react';
14
- import { ReactDatePickerProps } from 'react-datepicker';
15
- import { SelectProps } from 'antd';
16
- import { SwitchProps } from 'antd';
17
- import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
18
- import { UploadFile } from 'antd';
19
- import { UploadProps } from 'antd';
20
- import { UseFormSetValue } from 'react-hook-form';
21
- import { UseFormStateReturn } from 'react-hook-form';
22
-
23
- export declare const CheckboxField: (props: CheckboxFieldProps) => JSX.Element;
24
-
25
- export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChange" | "checked"> {
26
- field?: ControllerRenderProps<any, any>;
27
- formState?: UseFormStateReturn<any>;
28
- label?: string;
29
- required?: boolean;
30
- afterOnChange?: (checked: boolean) => void;
31
- customStyleContainer?: string;
32
- customStyleCheckbox?: string;
33
- }
34
-
35
- declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
36
-
37
- declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
38
-
39
- export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
40
- field?: ControllerRenderProps<any, any>;
41
- formState?: UseFormStateReturn<any>;
42
- setValue?: UseFormSetValue<any>;
43
- customStyleDatepicker?: string;
44
- disabledInputChange?: boolean;
45
- required?: boolean;
46
- dateFormat?: string | string[];
47
- placeholder?: string;
48
- label?: string;
49
- maxDate?: Date;
50
- showTimeSelect?: boolean;
51
- customOnChange?: (date: any, event: default_2.SyntheticEvent<any>) => void;
52
- customValue?: Date | null;
53
- size?: TSize;
54
- }
55
-
56
- export declare const DatePickerField: (props: DatePickerDMYProps) => JSX.Element;
57
-
58
- export declare const Input: (props: InputProps) => JSX.Element;
59
-
60
- export declare interface InputProps extends InputProps_2 {
61
- field?: ControllerRenderProps<any, any>;
62
- formState?: UseFormStateReturn<any>;
63
- label?: string;
64
- customStyleInput?: string;
65
- type?: CustomInputTypeAttribute;
66
- afterOnChange?: (value: number | string | null) => void;
67
- iconStartInput?: default_2.ReactNode;
68
- iconEndInput?: default_2.ReactNode;
69
- allowNegative?: boolean;
70
- decimalScale?: number;
71
- prefix?: string;
72
- suffix?: string;
73
- }
74
-
75
- export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
76
- render(): JSX.Element;
77
- }
78
-
79
- export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
80
- control: Control<any, any>;
81
- name: string;
82
- component: TComponent;
83
- } & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
84
-
85
- export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
86
- onChange?: (event: any) => void;
87
- afterOnChange?: (value: string | number) => void;
88
- value?: string;
89
- name?: string;
90
- ref: any;
91
- type?: TInputNumberType;
92
- prefix?: string;
93
- suffix?: string;
94
- helperText?: () => JSX_2.Element | null;
95
- }
96
-
97
- export declare const RadioGroup: (props: RadioProps) => JSX.Element;
98
-
99
- export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
100
- field?: ControllerRenderProps<any, any>;
101
- formState?: UseFormStateReturn<any>;
102
- customStyleRadioGroup?: string;
103
- customStyleRadio?: string;
104
- customStyleWrap?: string;
105
- afterOnChange?: (value: any) => void;
106
- options: TOptionGRadio[];
107
- position?: TPositionRadio;
108
- }
109
-
110
- export declare const RangePickerField: (props: RangePickerFieldProps) => JSX.Element;
111
-
112
- export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "value" | "onChange"> {
113
- field?: ControllerRenderProps<any, any>;
114
- formState?: UseFormStateReturn<any>;
115
- label?: string;
116
- required?: boolean;
117
- afterOnChange?: (dates: [Dayjs | null, Dayjs | null] | null, dateStrings: [string, string]) => void;
118
- customStyleContainer?: string;
119
- customStyleDatePicker?: string;
120
- }
121
-
122
- export declare const SelectField: (props: SelectFieldProps) => JSX.Element;
123
-
124
- export declare interface SelectFieldProps extends SelectProps {
125
- field?: ControllerRenderProps<any, any>;
126
- formState?: UseFormStateReturn<any>;
127
- setValue?: UseFormSetValue<any>;
128
- label?: string;
129
- required?: boolean;
130
- afterOnChange?: (value: any) => void;
131
- customStyleContainer?: string;
132
- }
133
-
134
- export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" | "checked"> {
135
- field?: ControllerRenderProps<any, any>;
136
- formState?: UseFormStateReturn<any>;
137
- label?: string;
138
- required?: boolean;
139
- afterOnChange?: (checked: boolean) => void;
140
- customStyleContainer?: string;
141
- customStyleSwitch?: string;
142
- }
143
-
144
- export declare interface TextAreaProps extends TextAreaProps_2 {
145
- field?: ControllerRenderProps<any, any>;
146
- formState?: UseFormStateReturn<any>;
147
- label?: string;
148
- customStyleTextarea?: string;
149
- afterOnChange?: (value: string) => void;
150
- required?: boolean;
151
- }
152
-
153
- declare type TInputNumberType = "number" | "money";
154
-
155
- export declare const TinyMCE: {
156
- (props: TinyProps): JSX.Element;
157
- displayName: string;
158
- };
159
-
160
- export declare interface TinyProps extends IAllProps {
161
- height?: number | string;
162
- openHidenMenubar?: boolean;
163
- required?: boolean;
164
- field?: ControllerRenderProps<any, any>;
165
- formState?: UseFormStateReturn<any>;
166
- label?: string;
167
- customStyleLabel?: string;
168
- text_patterns?: any;
169
- }
170
-
171
- declare type TOptionGRadio = {
172
- label: string;
173
- value: string | number;
174
- };
175
-
176
- declare type TPositionRadio = "before" | "after";
177
-
178
- declare type TSize = "small" | "medium" | "large";
179
-
180
- export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "onChange" | "fileList"> {
181
- field?: ControllerRenderProps<any, any>;
182
- formState?: UseFormStateReturn<any>;
183
- fieldState?: ControllerFieldState;
184
- label?: string;
185
- required?: boolean;
186
- maxFiles?: number;
187
- uploadButtonText?: string;
188
- customStyleContainer?: string;
189
- customStyleUpload?: string;
190
- afterOnChange?: (fileList: UploadFile[]) => void;
191
- }
192
-
193
1
  export { }