@pnkx-lib/ui 1.9.11 → 1.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-eMq9KkOy.js';
2
- import { Select as Select$1, Radio, Checkbox } from 'antd';
1
+ import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-za5Skgtp.js';
2
+ import { Select as Select$1, Radio } from 'antd';
3
3
 
4
4
  const Select = (props) => {
5
5
  //! State
@@ -100,53 +100,4 @@ const RadioGroup = (props) => {
100
100
  ] });
101
101
  };
102
102
 
103
- const CheckboxField = (props) => {
104
- //! State
105
- const {
106
- field,
107
- formState,
108
- label,
109
- afterOnChange,
110
- customStyleContainer,
111
- customStyleCheckbox,
112
- ...restProps
113
- } = props;
114
- const { name, value, onChange, onBlur } = field || {};
115
- const { touchedFields, errors, isSubmitted } = formState || {};
116
- const isTouched = get(touchedFields, name);
117
- const errorMessage = get(errors, name)?.message;
118
- //! Function
119
- const handleChange = (e) => {
120
- const checked = e.target.checked;
121
- onChange?.(checked);
122
- afterOnChange?.(checked);
123
- };
124
- const renderErrorMessage = () => {
125
- if (!errorMessage) return null;
126
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
127
- ErrorMessage,
128
- {
129
- errorMessage,
130
- isTouched,
131
- isSubmitted
132
- }
133
- );
134
- };
135
- //! Render
136
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
137
- /* @__PURE__ */ jsxRuntimeExports.jsx(
138
- Checkbox,
139
- {
140
- onBlur,
141
- checked: !!value,
142
- onChange: handleChange,
143
- className: customStyleCheckbox,
144
- ...restProps,
145
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: label })
146
- }
147
- ),
148
- renderErrorMessage()
149
- ] });
150
- };
151
-
152
- export { CheckboxField as C, RadioGroup as R, Select as S };
103
+ export { RadioGroup as R, Select as S };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useRef, useState, useEffect, useLayoutEffect, useMemo, forwardRef, useCallback, createElement, Component, createRef, createContext, useContext } from 'react';
3
- import { Typography as Typography$1, Input as Input$1, DatePicker, Upload, Image, Switch } from 'antd';
3
+ import { Typography as Typography$1, Input as Input$1, Checkbox, DatePicker, Upload, Image, Switch } from 'antd';
4
4
  import { g as require_baseGetTag, h as requireIsObjectLike, k as requireIsArray, d as require_MapCache, o as require_Symbol, p as getDefaultExportFromCjs, q as commonjsGlobal, T as TINY_API } from './common-b3FKGF0Y.js';
5
5
  import * as ReactDOM from 'react-dom';
6
6
  import ReactDOM__default, { findDOMNode } from 'react-dom';
@@ -24793,6 +24793,55 @@ const Textarea = forwardRef(
24793
24793
  );
24794
24794
  React__default.memo(Textarea);
24795
24795
 
24796
+ const CheckboxField = (props) => {
24797
+ //! State
24798
+ const {
24799
+ field,
24800
+ formState,
24801
+ label,
24802
+ afterOnChange,
24803
+ customStyleContainer,
24804
+ customStyleCheckbox,
24805
+ ...restProps
24806
+ } = props;
24807
+ const { name, value, onChange, onBlur } = field || {};
24808
+ const { touchedFields, errors, isSubmitted } = formState || {};
24809
+ const isTouched = get$1(touchedFields, name);
24810
+ const errorMessage = get$1(errors, name)?.message;
24811
+ //! Function
24812
+ const handleChange = (e) => {
24813
+ const checked = e.target.checked;
24814
+ onChange?.(checked);
24815
+ afterOnChange?.(checked);
24816
+ };
24817
+ const renderErrorMessage = () => {
24818
+ if (!errorMessage) return null;
24819
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
24820
+ ErrorMessage,
24821
+ {
24822
+ errorMessage,
24823
+ isTouched,
24824
+ isSubmitted
24825
+ }
24826
+ );
24827
+ };
24828
+ //! Render
24829
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
24830
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24831
+ Checkbox,
24832
+ {
24833
+ onBlur,
24834
+ checked: !!value,
24835
+ onChange: handleChange,
24836
+ className: customStyleCheckbox,
24837
+ ...restProps,
24838
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: label })
24839
+ }
24840
+ ),
24841
+ renderErrorMessage()
24842
+ ] });
24843
+ };
24844
+
24796
24845
  function _typeof(o) {
24797
24846
  "@babel/helpers - typeof";
24798
24847
 
@@ -39335,4 +39384,4 @@ const SwitchField = (props) => {
39335
39384
  };
39336
39385
  React__default.memo(SwitchField);
39337
39386
 
39338
- export { _createSuper as A, _assertThisInitialized$1 as B, _objectWithoutProperties as C, DatePickerField as D, ErrorMessage as E, FastColor as F, IconContext as G, Input as I, Label as L, PnkxField as P, RangePickerField as R, Typography as T, _extends as _, TinyMCE as a, Icon as b, _typeof as c, classNames as d, _arrayLikeToArray as e, _unsupportedIterableToArray as f, get$1 as g, _createClass as h, _classCallCheck as i, jsxRuntimeExports as j, _defineProperty as k, _slicedToArray as l, warning$1 as m, canUseDom as n, _objectSpread2 as o, updateCSS as p, _arrayWithHoles as q, removeCSS as r, _nonIterableRest as s, resetWarned as t, useForm as u, generate$1 as v, warningOnce as w, presetPrimaryColors as x, presetPalettes as y, _inherits as z };
39387
+ export { _createSuper as A, _assertThisInitialized$1 as B, CheckboxField as C, DatePickerField as D, ErrorMessage as E, FastColor as F, _objectWithoutProperties as G, IconContext as H, Input as I, Label as L, PnkxField as P, RangePickerField as R, Typography as T, _extends as _, TinyMCE as a, Icon as b, _typeof as c, classNames as d, _arrayLikeToArray as e, _unsupportedIterableToArray as f, get$1 as g, _createClass as h, _classCallCheck as i, jsxRuntimeExports as j, _defineProperty as k, _slicedToArray as l, warning$1 as m, canUseDom as n, _objectSpread2 as o, updateCSS as p, _arrayWithHoles as q, removeCSS as r, _nonIterableRest as s, resetWarned as t, useForm as u, generate$1 as v, warningOnce as w, presetPrimaryColors as x, presetPalettes as y, _inherits as z };
@@ -1,2 +1,2 @@
1
- export { D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, a as TinyMCE } from '../chunks/Switch-eMq9KkOy.js';
2
- export { C as CheckboxField, R as RadioGroup, S as Select } from '../chunks/Checkbox-CJ_M7IzZ.js';
1
+ export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, a as TinyMCE } from '../chunks/Switch-za5Skgtp.js';
2
+ export { R as RadioGroup, S as Select } from '../chunks/Radio-D2me1zZ-.js';
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/CategoryStatus-CKERJGNO.js';
2
- export { D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TinyMCE, T as Typography } from './chunks/Switch-eMq9KkOy.js';
1
+ export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/CategoryStatus-D1aD1Nbe.js';
2
+ export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TinyMCE, T as Typography } from './chunks/Switch-za5Skgtp.js';
3
3
  import 'react-router';
4
- export { C as CheckboxField, R as RadioGroup, S as Select } from './chunks/Checkbox-CJ_M7IzZ.js';
4
+ export { R as RadioGroup, S as Select } from './chunks/Radio-D2me1zZ-.js';
5
5
  export { u as useToast } from './chunks/cloneDeep-BLYi2V0G.js';
6
6
  export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-D_-VT5B4.js';
package/es/ui/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/CategoryStatus-CKERJGNO.js';
2
- export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-eMq9KkOy.js';
1
+ export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/CategoryStatus-D1aD1Nbe.js';
2
+ export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-za5Skgtp.js';
3
3
  import 'react-router';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.11",
4
+ "version": "1.9.12",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",