@fuf-stack/uniform 0.12.1 → 0.13.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/dist/CheckboxGroup/index.cjs +3 -3
- package/dist/CheckboxGroup/index.d.cts +2 -2
- package/dist/CheckboxGroup/index.d.ts +2 -2
- package/dist/CheckboxGroup/index.js +2 -2
- package/dist/FieldArray/index.cjs +3 -3
- package/dist/FieldArray/index.js +2 -2
- package/dist/Form/index.cjs +3 -3
- package/dist/Form/index.js +2 -2
- package/dist/Input/index.cjs +3 -3
- package/dist/Input/index.js +2 -2
- package/dist/RadioGroup/index.cjs +3 -3
- package/dist/RadioGroup/index.d.cts +2 -2
- package/dist/RadioGroup/index.d.ts +2 -2
- package/dist/RadioGroup/index.js +2 -2
- package/dist/Select/index.cjs +3 -3
- package/dist/Select/index.d.cts +2 -2
- package/dist/Select/index.d.ts +2 -2
- package/dist/Select/index.js +2 -2
- package/dist/SubmitButton/index.cjs +3 -3
- package/dist/SubmitButton/index.js +2 -2
- package/dist/Switch/index.cjs +3 -3
- package/dist/Switch/index.d.cts +2 -2
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/index.js +2 -2
- package/dist/TextArea/index.cjs +3 -3
- package/dist/TextArea/index.js +2 -2
- package/dist/{chunk-WJSY2D3D.cjs → chunk-25LLM544.cjs} +3 -3
- package/dist/{chunk-WJSY2D3D.cjs.map → chunk-25LLM544.cjs.map} +1 -1
- package/dist/{chunk-2L2ZE3VK.js → chunk-AQHKELUR.js} +2 -2
- package/dist/{chunk-AJCTJCJS.js → chunk-BS52M4SZ.js} +2 -2
- package/dist/{chunk-INTF7ABH.js → chunk-BZAPTLMC.js} +3 -2
- package/dist/chunk-BZAPTLMC.js.map +1 -0
- package/dist/{chunk-ADLIMAUY.js → chunk-DDZMDOSG.js} +2 -2
- package/dist/{chunk-22HRAWRF.cjs → chunk-EKE5URXQ.cjs} +3 -3
- package/dist/{chunk-22HRAWRF.cjs.map → chunk-EKE5URXQ.cjs.map} +1 -1
- package/dist/{chunk-FLVDDSDV.js → chunk-GN5NJ6ZU.js} +2 -2
- package/dist/{chunk-F2QAT7VM.cjs → chunk-HZP3EXGR.cjs} +4 -4
- package/dist/chunk-HZP3EXGR.cjs.map +1 -0
- package/dist/{chunk-JODLEFW5.js → chunk-IUNDGVMC.js} +3 -3
- package/dist/chunk-IUNDGVMC.js.map +1 -0
- package/dist/{chunk-6UMW5EPE.js → chunk-NMATVUWS.js} +83 -86
- package/dist/chunk-NMATVUWS.js.map +1 -0
- package/dist/{chunk-5Q6YMU3S.cjs → chunk-P5YZA7VJ.cjs} +3 -3
- package/dist/{chunk-5Q6YMU3S.cjs.map → chunk-P5YZA7VJ.cjs.map} +1 -1
- package/dist/{chunk-R6H6XSOI.cjs → chunk-PZ4LZQI4.cjs} +6 -5
- package/dist/chunk-PZ4LZQI4.cjs.map +1 -0
- package/dist/{chunk-KYBPTL3Y.cjs → chunk-RY4F5YDS.cjs} +3 -3
- package/dist/{chunk-KYBPTL3Y.cjs.map → chunk-RY4F5YDS.cjs.map} +1 -1
- package/dist/{chunk-HWJREI53.js → chunk-TB5USZF4.js} +2 -2
- package/dist/{chunk-NL2RK5NJ.cjs → chunk-V644EZQT.cjs} +86 -89
- package/dist/chunk-V644EZQT.cjs.map +1 -0
- package/dist/{chunk-KGTNPZZO.js → chunk-VP7WDLJM.js} +4 -3
- package/dist/chunk-VP7WDLJM.js.map +1 -0
- package/dist/{chunk-IQ4V57MX.cjs → chunk-VZ5MMFIF.cjs} +3 -3
- package/dist/{chunk-IQ4V57MX.cjs.map → chunk-VZ5MMFIF.cjs.map} +1 -1
- package/dist/{chunk-CMRP3HEK.js → chunk-XJGJ5ZNM.js} +2 -2
- package/dist/{chunk-D276MAWR.cjs → chunk-XJWEUCV3.cjs} +4 -3
- package/dist/chunk-XJWEUCV3.cjs.map +1 -0
- package/dist/{chunk-ANXGDI6O.cjs → chunk-XJZAS7NG.cjs} +3 -3
- package/dist/{chunk-ANXGDI6O.cjs.map → chunk-XJZAS7NG.cjs.map} +1 -1
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -12
- package/package.json +10 -10
- package/dist/chunk-6UMW5EPE.js.map +0 -1
- package/dist/chunk-D276MAWR.cjs.map +0 -1
- package/dist/chunk-F2QAT7VM.cjs.map +0 -1
- package/dist/chunk-INTF7ABH.js.map +0 -1
- package/dist/chunk-JODLEFW5.js.map +0 -1
- package/dist/chunk-KGTNPZZO.js.map +0 -1
- package/dist/chunk-NL2RK5NJ.cjs.map +0 -1
- package/dist/chunk-R6H6XSOI.cjs.map +0 -1
- package/dist/{CheckboxGroup-o-qWkWe1.d.cts → CheckboxGroup-DYxaS51b.d.cts} +5 -5
- package/dist/{CheckboxGroup-o-qWkWe1.d.ts → CheckboxGroup-DYxaS51b.d.ts} +5 -5
- package/dist/{RadioGroup-1J39ASHa.d.cts → RadioGroup-DEwUwnRi.d.cts} +5 -5
- package/dist/{RadioGroup-1J39ASHa.d.ts → RadioGroup-DEwUwnRi.d.ts} +5 -5
- package/dist/{Select-BhS4z0Pj.d.cts → Select-Da_AtPOX.d.cts} +15 -15
- package/dist/{Select-BhS4z0Pj.d.ts → Select-Da_AtPOX.d.ts} +15 -15
- package/dist/{Switch-Fdldj8LV.d.cts → Switch-Coq_VhBW.d.cts} +5 -5
- package/dist/{Switch-Fdldj8LV.d.ts → Switch-Coq_VhBW.d.ts} +5 -5
- /package/dist/{chunk-2L2ZE3VK.js.map → chunk-AQHKELUR.js.map} +0 -0
- /package/dist/{chunk-AJCTJCJS.js.map → chunk-BS52M4SZ.js.map} +0 -0
- /package/dist/{chunk-ADLIMAUY.js.map → chunk-DDZMDOSG.js.map} +0 -0
- /package/dist/{chunk-FLVDDSDV.js.map → chunk-GN5NJ6ZU.js.map} +0 -0
- /package/dist/{chunk-HWJREI53.js.map → chunk-TB5USZF4.js.map} +0 -0
- /package/dist/{chunk-CMRP3HEK.js.map → chunk-XJGJ5ZNM.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRY4F5YDScjs = require('../chunk-RY4F5YDS.cjs');
|
|
5
5
|
require('../chunk-VQWKXSHW.cjs');
|
|
6
6
|
require('../chunk-JU5RT22Y.cjs');
|
|
7
7
|
require('../chunk-OHJYXA6R.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
9
9
|
require('../chunk-BBB4FEY6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.CheckboxGroup =
|
|
13
|
+
exports.CheckboxGroup = _chunkRY4F5YDScjs.CheckboxGroup_default; exports.default = _chunkRY4F5YDScjs.CheckboxGroup_default2;
|
|
14
14
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CheckboxGroup } from '../CheckboxGroup-
|
|
2
|
-
export { b as CheckboxGroupOption, a as CheckboxGroupProps } from '../CheckboxGroup-
|
|
1
|
+
import { C as CheckboxGroup } from '../CheckboxGroup-DYxaS51b.cjs';
|
|
2
|
+
export { b as CheckboxGroupOption, a as CheckboxGroupProps } from '../CheckboxGroup-DYxaS51b.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CheckboxGroup } from '../CheckboxGroup-
|
|
2
|
-
export { b as CheckboxGroupOption, a as CheckboxGroupProps } from '../CheckboxGroup-
|
|
1
|
+
import { C as CheckboxGroup } from '../CheckboxGroup-DYxaS51b.js';
|
|
2
|
+
export { b as CheckboxGroupOption, a as CheckboxGroupProps } from '../CheckboxGroup-DYxaS51b.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckboxGroup_default,
|
|
3
3
|
CheckboxGroup_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XJGJ5ZNM.js";
|
|
5
5
|
import "../chunk-KOKIM2ND.js";
|
|
6
6
|
import "../chunk-2CRY7VDQ.js";
|
|
7
7
|
import "../chunk-WKM2D7LF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BZAPTLMC.js";
|
|
9
9
|
import "../chunk-V46BHM2U.js";
|
|
10
10
|
export {
|
|
11
11
|
CheckboxGroup_default as CheckboxGroup,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkV644EZQTcjs = require('../chunk-V644EZQT.cjs');
|
|
5
5
|
require('../chunk-JU5RT22Y.cjs');
|
|
6
6
|
require('../chunk-OHJYXA6R.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
8
8
|
require('../chunk-BBB4FEY6.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.FieldArray =
|
|
12
|
+
exports.FieldArray = _chunkV644EZQTcjs.FieldArray_default; exports.default = _chunkV644EZQTcjs.FieldArray_default2;
|
|
13
13
|
//# sourceMappingURL=index.cjs.map
|
package/dist/FieldArray/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FieldArray_default,
|
|
3
3
|
FieldArray_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NMATVUWS.js";
|
|
5
5
|
import "../chunk-2CRY7VDQ.js";
|
|
6
6
|
import "../chunk-WKM2D7LF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-BZAPTLMC.js";
|
|
8
8
|
import "../chunk-V46BHM2U.js";
|
|
9
9
|
export {
|
|
10
10
|
FieldArray_default as FieldArray,
|
package/dist/Form/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkPZ4LZQI4cjs = require('../chunk-PZ4LZQI4.cjs');
|
|
5
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
6
6
|
require('../chunk-BBB4FEY6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.Form =
|
|
10
|
+
exports.Form = _chunkPZ4LZQI4cjs.Form_default; exports.default = _chunkPZ4LZQI4cjs.Form_default2;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Form/index.js
CHANGED
package/dist/Input/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkP5YZA7VJcjs = require('../chunk-P5YZA7VJ.cjs');
|
|
5
5
|
require('../chunk-VQWKXSHW.cjs');
|
|
6
6
|
require('../chunk-JU5RT22Y.cjs');
|
|
7
7
|
require('../chunk-OHJYXA6R.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
9
9
|
require('../chunk-BBB4FEY6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.Input =
|
|
13
|
+
exports.Input = _chunkP5YZA7VJcjs.Input_default; exports.default = _chunkP5YZA7VJcjs.Input_default2;
|
|
14
14
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Input/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Input_default,
|
|
3
3
|
Input_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-TB5USZF4.js";
|
|
5
5
|
import "../chunk-KOKIM2ND.js";
|
|
6
6
|
import "../chunk-2CRY7VDQ.js";
|
|
7
7
|
import "../chunk-WKM2D7LF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BZAPTLMC.js";
|
|
9
9
|
import "../chunk-V46BHM2U.js";
|
|
10
10
|
export {
|
|
11
11
|
Input_default as Input,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXJZAS7NGcjs = require('../chunk-XJZAS7NG.cjs');
|
|
5
5
|
require('../chunk-VQWKXSHW.cjs');
|
|
6
6
|
require('../chunk-JU5RT22Y.cjs');
|
|
7
7
|
require('../chunk-OHJYXA6R.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
9
9
|
require('../chunk-BBB4FEY6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.RadioGroup =
|
|
13
|
+
exports.RadioGroup = _chunkXJZAS7NGcjs.RadioGroup_default; exports.default = _chunkXJZAS7NGcjs.RadioGroup_default2;
|
|
14
14
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RadioGroup } from '../RadioGroup-
|
|
2
|
-
export { a as RadioGroupProps } from '../RadioGroup-
|
|
1
|
+
import { R as RadioGroup } from '../RadioGroup-DEwUwnRi.cjs';
|
|
2
|
+
export { a as RadioGroupProps } from '../RadioGroup-DEwUwnRi.cjs';
|
|
3
3
|
import 'tailwind-variants/dist/config.js';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import '@fuf-stack/pixel-utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RadioGroup } from '../RadioGroup-
|
|
2
|
-
export { a as RadioGroupProps } from '../RadioGroup-
|
|
1
|
+
import { R as RadioGroup } from '../RadioGroup-DEwUwnRi.js';
|
|
2
|
+
export { a as RadioGroupProps } from '../RadioGroup-DEwUwnRi.js';
|
|
3
3
|
import 'tailwind-variants/dist/config.js';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import '@fuf-stack/pixel-utils';
|
package/dist/RadioGroup/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RadioGroup_default,
|
|
3
3
|
RadioGroup_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DDZMDOSG.js";
|
|
5
5
|
import "../chunk-KOKIM2ND.js";
|
|
6
6
|
import "../chunk-2CRY7VDQ.js";
|
|
7
7
|
import "../chunk-WKM2D7LF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BZAPTLMC.js";
|
|
9
9
|
import "../chunk-V46BHM2U.js";
|
|
10
10
|
export {
|
|
11
11
|
RadioGroup_default as RadioGroup,
|
package/dist/Select/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkHZP3EXGRcjs = require('../chunk-HZP3EXGR.cjs');
|
|
5
5
|
require('../chunk-VQWKXSHW.cjs');
|
|
6
6
|
require('../chunk-JU5RT22Y.cjs');
|
|
7
7
|
require('../chunk-OHJYXA6R.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
9
9
|
require('../chunk-BBB4FEY6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.Select =
|
|
13
|
+
exports.Select = _chunkHZP3EXGRcjs.Select_default; exports.default = _chunkHZP3EXGRcjs.Select_default2;
|
|
14
14
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Select/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Select } from '../Select-
|
|
2
|
-
export { a as SelectProps } from '../Select-
|
|
1
|
+
import { S as Select } from '../Select-Da_AtPOX.cjs';
|
|
2
|
+
export { a as SelectProps } from '../Select-Da_AtPOX.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Select/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Select } from '../Select-
|
|
2
|
-
export { a as SelectProps } from '../Select-
|
|
1
|
+
import { S as Select } from '../Select-Da_AtPOX.js';
|
|
2
|
+
export { a as SelectProps } from '../Select-Da_AtPOX.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Select/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Select_default,
|
|
3
3
|
Select_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-IUNDGVMC.js";
|
|
5
5
|
import "../chunk-KOKIM2ND.js";
|
|
6
6
|
import "../chunk-2CRY7VDQ.js";
|
|
7
7
|
import "../chunk-WKM2D7LF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BZAPTLMC.js";
|
|
9
9
|
import "../chunk-V46BHM2U.js";
|
|
10
10
|
export {
|
|
11
11
|
Select_default as Select,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkVZ5MMFIFcjs = require('../chunk-VZ5MMFIF.cjs');
|
|
5
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
6
6
|
require('../chunk-BBB4FEY6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.SubmitButton =
|
|
10
|
+
exports.SubmitButton = _chunkVZ5MMFIFcjs.SubmitButton_default; exports.default = _chunkVZ5MMFIFcjs.SubmitButton_default2;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SubmitButton_default,
|
|
3
3
|
SubmitButton_default2
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-GN5NJ6ZU.js";
|
|
5
|
+
import "../chunk-BZAPTLMC.js";
|
|
6
6
|
import "../chunk-V46BHM2U.js";
|
|
7
7
|
export {
|
|
8
8
|
SubmitButton_default as SubmitButton,
|
package/dist/Switch/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkEKE5URXQcjs = require('../chunk-EKE5URXQ.cjs');
|
|
5
5
|
require('../chunk-VQWKXSHW.cjs');
|
|
6
6
|
require('../chunk-JU5RT22Y.cjs');
|
|
7
7
|
require('../chunk-OHJYXA6R.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
9
9
|
require('../chunk-BBB4FEY6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.Switch =
|
|
13
|
+
exports.Switch = _chunkEKE5URXQcjs.Switch_default; exports.default = _chunkEKE5URXQcjs.Switch_default2;
|
|
14
14
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Switch/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Switch } from '../Switch-
|
|
2
|
-
export { a as SwitchProps } from '../Switch-
|
|
1
|
+
import { S as Switch } from '../Switch-Coq_VhBW.cjs';
|
|
2
|
+
export { a as SwitchProps } from '../Switch-Coq_VhBW.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Switch/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Switch } from '../Switch-
|
|
2
|
-
export { a as SwitchProps } from '../Switch-
|
|
1
|
+
import { S as Switch } from '../Switch-Coq_VhBW.js';
|
|
2
|
+
export { a as SwitchProps } from '../Switch-Coq_VhBW.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Switch/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Switch_default,
|
|
3
3
|
Switch_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-BS52M4SZ.js";
|
|
5
5
|
import "../chunk-KOKIM2ND.js";
|
|
6
6
|
import "../chunk-2CRY7VDQ.js";
|
|
7
7
|
import "../chunk-WKM2D7LF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BZAPTLMC.js";
|
|
9
9
|
import "../chunk-V46BHM2U.js";
|
|
10
10
|
export {
|
|
11
11
|
Switch_default as Switch,
|
package/dist/TextArea/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk25LLM544cjs = require('../chunk-25LLM544.cjs');
|
|
5
5
|
require('../chunk-VQWKXSHW.cjs');
|
|
6
6
|
require('../chunk-JU5RT22Y.cjs');
|
|
7
7
|
require('../chunk-OHJYXA6R.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-XJWEUCV3.cjs');
|
|
9
9
|
require('../chunk-BBB4FEY6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.TextArea =
|
|
13
|
+
exports.TextArea = _chunk25LLM544cjs.TextArea_default; exports.default = _chunk25LLM544cjs.TextArea_default2;
|
|
14
14
|
//# sourceMappingURL=index.cjs.map
|
package/dist/TextArea/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextArea_default,
|
|
3
3
|
TextArea_default2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-AQHKELUR.js";
|
|
5
5
|
import "../chunk-KOKIM2ND.js";
|
|
6
6
|
import "../chunk-2CRY7VDQ.js";
|
|
7
7
|
import "../chunk-WKM2D7LF.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BZAPTLMC.js";
|
|
9
9
|
import "../chunk-V46BHM2U.js";
|
|
10
10
|
export {
|
|
11
11
|
TextArea_default as TextArea,
|
|
@@ -9,7 +9,7 @@ var _chunkJU5RT22Ycjs = require('./chunk-JU5RT22Y.cjs');
|
|
|
9
9
|
var _chunkOHJYXA6Rcjs = require('./chunk-OHJYXA6R.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkXJWEUCV3cjs = require('./chunk-XJWEUCV3.cjs');
|
|
13
13
|
|
|
14
14
|
// src/TextArea/TextArea.tsx
|
|
15
15
|
var _input = require('@nextui-org/input');
|
|
@@ -24,7 +24,7 @@ var TextArea = ({
|
|
|
24
24
|
placeholder = " ",
|
|
25
25
|
testId: _testId = void 0
|
|
26
26
|
}) => {
|
|
27
|
-
const { control, debugMode, getFieldState } =
|
|
27
|
+
const { control, debugMode, getFieldState } = _chunkXJWEUCV3cjs.useFormContext.call(void 0, );
|
|
28
28
|
const { error, invalid, required, testId } = getFieldState(name, _testId);
|
|
29
29
|
const showTestIdCopyButton = debugMode === "debug-testids";
|
|
30
30
|
const showLabel = label || showTestIdCopyButton;
|
|
@@ -77,4 +77,4 @@ var TextArea_default2 = TextArea_default;
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
exports.TextArea_default = TextArea_default; exports.TextArea_default2 = TextArea_default2;
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-25LLM544.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-25LLM544.cjs","../src/TextArea/TextArea.tsx","../src/TextArea/index.ts"],"names":["TextArea_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACXA,0CAAyC;AAEzC,oDAAmB;AAyDgB,+CAAA;AA9BnC,IAAM,SAAA,EAAW,CAAC;AAAA,EAChB,SAAA,EAAW,IAAA;AAAA,EACX,UAAA,EAAY,KAAA,CAAA;AAAA,EACZ,SAAA,EAAW,KAAA;AAAA,EACX,MAAA,EAAQ,KAAA,CAAA;AAAA,EACR,IAAA;AAAA,EACA,YAAA,EAAc,GAAA;AAAA,EACd,MAAA,EAAQ,QAAA,EAAU,KAAA;AACpB,CAAA,EAAA,GAAqB;AACnB,EAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,cAAc,EAAA,EAAI,8CAAA,CAAe;AAC7D,EAAA,MAAM,EAAE,KAAA,EAAO,OAAA,EAAS,QAAA,EAAU,OAAO,EAAA,EAAI,aAAA,CAAc,IAAA,EAAM,OA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AAAA,EAAQ,gBAAA;AFoEf;AACA;AACE;AACA;AACF,2FAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-25LLM544.cjs","sourcesContent":[null,"import type { ReactNode } from 'react';\n\nimport { Textarea as NextTextArea } from '@nextui-org/input';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { Controller } from '../Controller';\nimport { useFormContext } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\n\nexport interface TextAreaProps {\n /** Child components. The content of the textarea. */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** Determines if the TextArea is disabled or not. */\n disabled?: boolean;\n /** Label displayed above the TextArea. */\n label?: ReactNode;\n /** Name the TextArea is registered at in HTML forms (react-hook-form). */\n name: string;\n /** placeholder for the textArea content. */\n placeholder?: string;\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * TextArea component based on [NextUI TextArea](https://nextui.org/docs/components/textarea)\n */\nconst TextArea = ({\n children = null,\n className = undefined,\n disabled = false,\n label = undefined,\n name,\n placeholder = ' ',\n testId: _testId = undefined,\n}: TextAreaProps) => {\n const { control, debugMode, getFieldState } = useFormContext();\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const showLabel = label || showTestIdCopyButton;\n\n return (\n <Controller\n control={control}\n name={name}\n disabled={disabled}\n render={({\n field: { disabled: isDisabled, onChange, onBlur, value, ref },\n }) => {\n return (\n <NextTextArea\n className={cn(className)}\n classNames={{\n inputWrapper: 'group-data-[focus=true]:border-focus',\n }}\n data-testid={testId}\n errorMessage={error && <FieldValidationError error={error} />}\n isDisabled={isDisabled}\n isRequired={required}\n isInvalid={invalid}\n label={\n showLabel && (\n <>\n {label}\n {showTestIdCopyButton && (\n <FieldCopyTestIdButton testId={testId} />\n )}\n </>\n )\n }\n labelPlacement=\"outside\"\n placeholder={placeholder}\n name={name}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n ref={ref}\n variant=\"bordered\"\n >\n {children}\n </NextTextArea>\n );\n }}\n />\n );\n};\n\nexport default TextArea;\n","import TextArea from './TextArea';\n\nexport type { TextAreaProps } from './TextArea';\n\nexport { TextArea };\n\nexport default TextArea;\n"]}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-WKM2D7LF.js";
|
|
10
10
|
import {
|
|
11
11
|
useFormContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BZAPTLMC.js";
|
|
13
13
|
|
|
14
14
|
// src/TextArea/TextArea.tsx
|
|
15
15
|
import { Textarea as NextTextArea } from "@nextui-org/input";
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
TextArea_default,
|
|
78
78
|
TextArea_default2
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-AQHKELUR.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-WKM2D7LF.js";
|
|
10
10
|
import {
|
|
11
11
|
useFormContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BZAPTLMC.js";
|
|
13
13
|
|
|
14
14
|
// src/Switch/Switch.tsx
|
|
15
15
|
import { useInput } from "@nextui-org/input";
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
Switch_default,
|
|
102
102
|
Switch_default2
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-BS52M4SZ.js.map
|
|
@@ -17,7 +17,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
17
17
|
var removeNullishFields = (obj) => {
|
|
18
18
|
return JSON.parse(
|
|
19
19
|
JSON.stringify(obj, (_key, value) => {
|
|
20
|
-
return value === null ? void 0 : value;
|
|
20
|
+
return value === "" || value === null ? void 0 : value;
|
|
21
21
|
})
|
|
22
22
|
);
|
|
23
23
|
};
|
|
@@ -125,8 +125,9 @@ var useFormContext = () => {
|
|
|
125
125
|
|
|
126
126
|
export {
|
|
127
127
|
useFieldArray,
|
|
128
|
+
removeNullishFields,
|
|
128
129
|
FormContext_default,
|
|
129
130
|
checkFieldIsRequired,
|
|
130
131
|
useFormContext
|
|
131
132
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-BZAPTLMC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useFieldArray/useFieldArray.ts","../src/hooks/useFormContext/useFormContext.ts","../src/Form/subcomponents/FormContext.tsx"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n\n/** @see https://react-hook-form.com/docs/usefieldarray */\nexport { useFieldArray } from 'react-hook-form';\n","import type { VetoInstance } from '@fuf-stack/veto';\nimport type { FieldError } from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useFormContext as useHookFormContext } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { slugify } from '../../helpers';\n\n/** Schema check whether a field is required or optional */\nexport const checkFieldIsRequired = (\n validation: VetoInstance,\n path: string[],\n): boolean => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const checkRequired = (schema: any) => {\n // arrays with minLength are required\n if (schema.type === 'array' && schema?.minLength) {\n return true;\n }\n // all other fields are required if they are\n // not optional and not nullable\n return !schema.isOptional && !schema.isNullable;\n };\n\n return validation.checkSchemaPath(checkRequired, path);\n};\n\n/**\n * Custom hook that extends react-hook-form's useFormContext to add validation and state management.\n */\nexport const useFormContext = () => {\n const {\n formState,\n // https://react-hook-form.com/docs/useform/getfieldstate\n // for getFieldState a subscription to formState properties is needed!\n getFieldState: getFieldStateOrig,\n ...otherMethods\n } = useHookFormContext();\n\n const uniformContext = useContext(UniformContext);\n\n /**\n * Updated getFieldState method which returns:\n * - Whether the field is required by checking the validation schema\n * - Existing field state information (errors, etc.)\n */\n const getFieldState = (name: string, testId?: string) => {\n const fieldPath =\n typeof name === 'string' ? name.replace(/\\[\\d+\\]/g, '').split('.') : name;\n\n // Check if the field is required using the validation schema\n const required = uniformContext?.validation\n ? checkFieldIsRequired(uniformContext.validation, fieldPath)\n : false;\n\n // Get the original field state (errors, etc.) from react-hook-form\n const { error, ...rest } = getFieldStateOrig(name, formState);\n\n return {\n ...rest,\n error: error as FieldError[] | undefined, // Ensure correct type for error\n required,\n testId: slugify(testId || name),\n };\n };\n\n return {\n ...otherMethods,\n ...uniformContext,\n getFieldState,\n formState,\n };\n};\n","import type { VetoInstance } from '@fuf-stack/veto';\nimport type { ReactNode } from 'react';\nimport type { FieldValues, SubmitHandler } from 'react-hook-form';\n\nimport React, { useMemo, useState } from 'react';\nimport { FormProvider as HookFormProvider, useForm } from 'react-hook-form';\n\nimport { useLocalStorage } from '@fuf-stack/pixels';\n\n/**\n * recursively removes all fields that are null or undefined before\n * the form data is passed to the veto validation function\n */\nexport const removeNullishFields = (obj: Record<string, unknown>) => {\n return JSON.parse(\n JSON.stringify(obj, (_key, value) => {\n return value === '' || value === null ? undefined : value;\n }),\n );\n};\n\ntype DebugMode = 'debug' | 'debug-testids' | 'off' | 'disabled';\n\nexport type DebugModeSettings = {\n /** disable form debug completely */\n disable?: boolean;\n /** custom localStorage key to save debug mode state */\n localStorageKey?: string;\n};\n\nconst DEBUG_MODE_LOCAL_STORAGE_KEY_DEFAULT = 'uniform:debug-mode';\n\n/**\n * The `UniformContext` provides control over the form's submission behavior and may optionally include\n * a Veto validation schema for form validation.\n *\n * Specifically, this context offers:\n * 1. **Form Submission Control**: The `preventSubmit` function allows components to enable or disable\n * form submissions.\n * 2. **Optional Validation Schema**: The `validation` property may hold a Veto validation schema instance\n * that can be used to validate form fields and handle validation logic.\n *\n * This context is useful for components that need to interact with or control the form submission state,\n * or access the validation schema for managing form validation logic.\n */\nexport const UniformContext = React.createContext<{\n /** Form debug mode enabled or not */\n debugMode: DebugMode;\n /** settings for from debug mode */\n debugModeSettings?: DebugModeSettings;\n /** Function to update if the form can currently be submitted */\n preventSubmit: (prevent: boolean) => void;\n /** Setter to enable or disable form debug mode */\n setDebugMode: (debugMode: DebugMode) => void;\n /** Optional Veto validation schema instance for form validation */\n validation?: VetoInstance;\n}>({\n debugMode: 'off',\n preventSubmit: () => undefined,\n setDebugMode: () => undefined,\n validation: undefined,\n});\n\n// Define props for the FormProvider component, extending HookForm's props\ninterface FormProviderProps {\n /** children form render function */\n children: (childProps: {\n handleSubmit: (e?: React.BaseSyntheticEvent) => Promise<void>;\n }) => ReactNode;\n /** settings for from debug mode */\n debugModeSettings?: DebugModeSettings;\n /** initial form values */\n initialValues?: FieldValues;\n /** form submit handler */\n onSubmit: SubmitHandler<FieldValues>;\n /** Veto validation schema instance */\n validation?: VetoInstance;\n /** when the validation should be triggered */\n validationTrigger: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n}\n\n/**\n * FormProvider component provides:\n * - The veto validation schema context\n * - Submit handler creation and submission control with preventSubmit\n * - Form Debug Mode state\n * - React Hook Form context\n */\nconst FormProvider: React.FC<FormProviderProps> = ({\n children,\n debugModeSettings = undefined,\n initialValues = undefined,\n onSubmit,\n validation = undefined,\n validationTrigger,\n}) => {\n // Control if the form can currently be submitted\n const [preventSubmit, setPreventSubmit] = useState(false);\n\n // Form Debug mode state is handled in the form context\n const [debugMode, setDebugMode] = useLocalStorage<DebugMode>(\n debugModeSettings?.localStorageKey || DEBUG_MODE_LOCAL_STORAGE_KEY_DEFAULT,\n 'off',\n );\n\n // Memoize the context value to prevent re-renders\n const contextValue = useMemo(\n () => ({\n // set debugMode to disabled when debugModeSettings.disable is true\n // otherwise use current debug mode from localStorage\n debugMode: debugModeSettings?.disable ? 'disabled' : debugMode,\n preventSubmit: (prevent: boolean) => {\n setPreventSubmit(prevent);\n },\n setDebugMode,\n validation,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [debugMode, debugModeSettings?.disable],\n );\n\n // Initialize react hook form\n const methods = useForm({\n defaultValues: initialValues,\n // add validation config when validation schema provided\n ...(validation\n ? {\n // set rhf mode\n // see: https://react-hook-form.com/docs/useform#mode\n mode: validationTrigger,\n resolver: async (values) => {\n const { data, errors, ...rest } = await validation.validateAsync(\n removeNullishFields(values),\n );\n // https://github.com/react-hook-form/resolvers/blob/master/zod/src/zod.ts\n return { values: data || {}, errors: errors || {}, ...rest };\n },\n }\n : {}),\n });\n\n // Create submit handler\n // eslint-disable-next-line consistent-return\n const handleSubmit = async (e?: React.BaseSyntheticEvent) => {\n // only prevent submit when form state is valid, because otherwise\n // submit will only trigger validation and add errors / focus invalid fields\n if (methods.formState.isValid && preventSubmit) {\n console.warn(\n '[FormProvider] form submit was prevented because preventSubmit is true...',\n );\n e?.preventDefault();\n return Promise.resolve();\n }\n await methods.handleSubmit(onSubmit)(e); // TODO: removeNullishFields here? @Hannes\n };\n\n return (\n <UniformContext.Provider value={contextValue}>\n {/* Spread all hook form props into HookFormProvider */}\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <HookFormProvider {...methods}>\n {children({ handleSubmit })}\n </HookFormProvider>\n </UniformContext.Provider>\n );\n};\n\nexport default FormProvider;\n"],"mappings":";;;;;AAGA,SAAS,qBAAqB;;;ACA9B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB,0BAA0B;;;ACArD,OAAO,SAAS,SAAS,gBAAgB;AACzC,SAAS,gBAAgB,kBAAkB,eAAe;AAE1D,SAAS,uBAAuB;AAyJ1B;AAnJC,IAAM,sBAAsB,CAAC,QAAiC;AACnE,SAAO,KAAK;AAAA,IACV,KAAK,UAAU,KAAK,CAAC,MAAM,UAAU;AACnC,aAAO,UAAU,MAAM,UAAU,OAAO,SAAY;AAAA,IACtD,CAAC;AAAA,EACH;AACF;AAWA,IAAM,uCAAuC;AAetC,IAAM,iBAAiB,MAAM,cAWjC;AAAA,EACD,WAAW;AAAA,EACX,eAAe,MAAM;AAAA,EACrB,cAAc,MAAM;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GACF;AAEJ;AAEA,IAAO,sBAAQ;;;AD7JR,IAAM,uBAAuB,CAClC,YACA,SACY;AAEZ,QAAM,gBAAgB,CAAC,WAAgB;AAErC,QAAI,OAAO,SAAS,WAAW,QAAQ,WAAW;AAChD,aAAO;AAAA,IACT;AAGA,WAAO,CAAC,OAAO,cAAc,CAAC,OAAO;AAAA,EACvC;AAEA,SAAO,WAAW,gBAAgB,eAAe,IAAI;AACvD;AAKO,IAAM,iBAAiB,MAAM;AAClC,QAAM;AAAA,IACJ;AAAA;AAAA;AAAA,IAGA,eAAe;AAAA,IACf,GAAG;AAAA,EACL,IAAI,mBAAmB;AAEvB,QAAM,iBAAiB,WAAW,cAAc;AAOhD,QAAM,gBAAgB,CAAC,MAAc,WAAoB;AACvD,UAAM,YACJ,OAAO,SAAS,WAAW,KAAK,QAAQ,YAAY,EAAE,EAAE,MAAM,GAAG,IAAI;AAGvE,UAAM,WAAW,gBAAgB,aAC7B,qBAAqB,eAAe,YAAY,SAAS,IACzD;AAGJ,UAAM,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,MAAM,SAAS;AAE5D,WAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA;AAAA,MACA;AAAA,MACA,QAAQ,QAAQ,UAAU,IAAI;AAAA,IAChC;AAAA,EACF;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-WKM2D7LF.js";
|
|
10
10
|
import {
|
|
11
11
|
useFormContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BZAPTLMC.js";
|
|
13
13
|
import {
|
|
14
14
|
slugify
|
|
15
15
|
} from "./chunk-V46BHM2U.js";
|
|
@@ -276,4 +276,4 @@ export {
|
|
|
276
276
|
RadioGroup_default,
|
|
277
277
|
RadioGroup_default2
|
|
278
278
|
};
|
|
279
|
-
//# sourceMappingURL=chunk-
|
|
279
|
+
//# sourceMappingURL=chunk-DDZMDOSG.js.map
|
|
@@ -9,7 +9,7 @@ var _chunkJU5RT22Ycjs = require('./chunk-JU5RT22Y.cjs');
|
|
|
9
9
|
var _chunkOHJYXA6Rcjs = require('./chunk-OHJYXA6R.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkXJWEUCV3cjs = require('./chunk-XJWEUCV3.cjs');
|
|
13
13
|
|
|
14
14
|
// src/Switch/Switch.tsx
|
|
15
15
|
var _input = require('@nextui-org/input');
|
|
@@ -37,7 +37,7 @@ var Switch = ({
|
|
|
37
37
|
name,
|
|
38
38
|
testId: _testId = void 0
|
|
39
39
|
}) => {
|
|
40
|
-
const { control, debugMode, getFieldState } =
|
|
40
|
+
const { control, debugMode, getFieldState } = _chunkXJWEUCV3cjs.useFormContext.call(void 0, );
|
|
41
41
|
const { error, required, testId, invalid } = getFieldState(name, _testId);
|
|
42
42
|
const { label, getInputProps, getErrorMessageProps } = _input.useInput.call(void 0, {
|
|
43
43
|
errorMessage: JSON.stringify(error),
|
|
@@ -101,4 +101,4 @@ var Switch_default2 = Switch_default;
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
exports.Switch_default = Switch_default; exports.Switch_default2 = Switch_default2;
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-EKE5URXQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-EKE5URXQ.cjs","../src/Switch/Switch.tsx","../src/Switch/index.ts"],"names":["Switch_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACXA,0CAAyB;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;AAAA,IAAA;AAAA,EAEJ,CAAA;AAEJ,CAAA;AAEA,IAAO,eAAA,EAAQ,MAAA;ADpBf;AACA;AE1FA,IAAOA,gBAAAA,EAAQ,cAAA;AF4Ff;AACA;AACE;AACA;AACF,mFAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/chunk-EKE5URXQ.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\n\nimport { useInput } from '@nextui-org/input';\nimport { Switch as NextSwitch } from '@nextui-org/switch';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { Controller } from '../Controller';\nimport { useFormContext } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\n\nexport const switchVariants = tv({\n slots: {\n base: '',\n endContent: '',\n errorMessage: 'ml-1 mt-1',\n // See NextUI styles for group-data condition, e.g.: https://github.com/nextui-org/nextui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger group-data-[required=true]:after:ml-0.5 group-data-[required=true]:after:text-danger group-data-[required=true]:after:content-[\"*\"]',\n outerWrapper: 'place-content-center',\n startContent: '',\n thumb: '',\n thumbIcon: '',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof switchVariants>;\ntype ClassName = TVClassName<typeof switchVariants>;\n\nexport interface SwitchProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n /** whether the select should be disabled */\n disabled?: boolean;\n /** component displayed next to the switch. */\n label?: React.ReactNode;\n /** name the field is registered under */\n name: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Switch component based on [NextUI Switch](https://nextui.org/docs/components/switch)\n */\nconst Switch = ({\n className = undefined,\n disabled = false,\n label: _label = undefined,\n name,\n testId: _testId = undefined,\n}: SwitchProps) => {\n const { control, debugMode, getFieldState } = useFormContext();\n const { error, required, testId, invalid } = getFieldState(name, _testId);\n\n const { label, getInputProps, getErrorMessageProps } = useInput({\n errorMessage: JSON.stringify(error),\n isInvalid: invalid,\n isRequired: required,\n label: _label,\n labelPlacement: 'outside',\n placeholder: ' ',\n });\n\n const variants = switchVariants();\n const classNames = variantsToClassNames(variants, className, 'outerWrapper');\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n\n return (\n <Controller\n name={name}\n control={control}\n disabled={disabled}\n render={({\n field: { disabled: isDisabled, value, ref, onBlur, onChange },\n }) => (\n <div className={classNames.outerWrapper}>\n <NextSwitch\n aria-describedby={getInputProps()['aria-describedby']}\n classNames={classNames}\n // See NextUI styles for group-data condition (data-invalid), e.g.: https://github.com/nextui-org/nextui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n isDisabled={isDisabled}\n isSelected={!!value}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n ref={ref}\n required={required}\n value={value}\n >\n {label}\n {showTestIdCopyButton && <FieldCopyTestIdButton testId={testId} />}\n </NextSwitch>\n {error && (\n <div className={classNames.errorMessage}>\n <div\n /* eslint-disable-next-line react/jsx-props-no-spreading */\n {...getErrorMessageProps()}\n >\n <FieldValidationError error={error} />\n </div>\n </div>\n )}\n </div>\n )}\n />\n );\n};\n\nexport default Switch;\n","import Switch from './Switch';\n\nexport type { SwitchProps } from './Switch';\n\nexport { Switch };\n\nexport default Switch;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFormContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BZAPTLMC.js";
|
|
4
4
|
import {
|
|
5
5
|
slugify
|
|
6
6
|
} from "./chunk-V46BHM2U.js";
|
|
@@ -45,4 +45,4 @@ export {
|
|
|
45
45
|
SubmitButton_default,
|
|
46
46
|
SubmitButton_default2
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-GN5NJ6ZU.js.map
|
|
@@ -9,7 +9,7 @@ var _chunkJU5RT22Ycjs = require('./chunk-JU5RT22Y.cjs');
|
|
|
9
9
|
var _chunkOHJYXA6Rcjs = require('./chunk-OHJYXA6R.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkXJWEUCV3cjs = require('./chunk-XJWEUCV3.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkBBB4FEY6cjs = require('./chunk-BBB4FEY6.cjs');
|
|
@@ -51,7 +51,7 @@ var selectVariants = _pixelutils.tv.call(void 0, {
|
|
|
51
51
|
option_focused: "bg-default-100 active:bg-default-200",
|
|
52
52
|
option_selected: "bg-default-300",
|
|
53
53
|
option: "rounded px-3 py-2 hover:cursor-pointer",
|
|
54
|
-
placeholder: "py-0.5 pl-1 text-foreground-500",
|
|
54
|
+
placeholder: "ml-1 py-0.5 pl-1 text-sm text-foreground-500",
|
|
55
55
|
selectContainer: "",
|
|
56
56
|
singleValue: "!ml-1 !leading-7",
|
|
57
57
|
valueContainer: "gap-1 p-1"
|
|
@@ -89,7 +89,7 @@ var Select = ({
|
|
|
89
89
|
placeholder = void 0,
|
|
90
90
|
testId: _testId = void 0
|
|
91
91
|
}) => {
|
|
92
|
-
const { control, debugMode, getFieldState } =
|
|
92
|
+
const { control, debugMode, getFieldState } = _chunkXJWEUCV3cjs.useFormContext.call(void 0, );
|
|
93
93
|
const { error, invalid, required, testId } = getFieldState(name, _testId);
|
|
94
94
|
const [isFocused, setIsFocused] = _react.useState.call(void 0, false);
|
|
95
95
|
const variants = selectVariants();
|
|
@@ -238,4 +238,4 @@ var Select_default2 = Select_default;
|
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
exports.Select_default = Select_default; exports.Select_default2 = Select_default2;
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
241
|
+
//# sourceMappingURL=chunk-HZP3EXGR.cjs.map
|