@orangesix/react 2.4.0-beta.3 → 2.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/accordion/@types/index.d.ts +55 -55
- package/accordion/accordion/index.esm.js.map +1 -1
- package/api/@types/css.d.ts +91 -91
- package/api/@types/field.d.ts +161 -159
- package/api/@types/index.d.ts +29 -27
- package/api/input/index.esm.js.map +1 -1
- package/autocomplete/@types/index.d.ts +69 -67
- package/autocomplete/autocomplete/index.esm.js.map +1 -1
- package/autocomplete/core/core/index.esm.js.map +1 -1
- package/autocomplete/core/event/index.esm.js.map +1 -1
- package/box/@types/index.d.ts +28 -26
- package/box/_box.scss +56 -56
- package/box/box/index.esm.js.map +1 -1
- package/button/@types/index.d.ts +72 -70
- package/button/button/index.esm.js.map +1 -1
- package/button/package.json +5 -5
- package/calendar/@types/index.d.ts +27 -25
- package/calendar/calendar/index.esm.js.map +1 -1
- package/calendar/core/controlled/index.esm.js.map +1 -1
- package/calendar/core/handle/index.esm.js.map +1 -1
- package/calendar/core/hookForm/index.esm.js.map +1 -1
- package/calendar/core/locale/index.esm.js.map +1 -1
- package/calendar/package.json +5 -5
- package/editor/@types/index.d.ts +45 -43
- package/editor/_editor.scss +106 -106
- package/editor/const/index.esm.js.map +1 -1
- package/editor/core/bold/index.esm.js.map +1 -1
- package/editor/core/bulletlist/index.esm.js.map +1 -1
- package/editor/core/code/index.esm.js.map +1 -1
- package/editor/core/color/index.esm.js.map +1 -1
- package/editor/core/highlight/index.esm.js.map +1 -1
- package/editor/core/image/index.esm.js.map +1 -1
- package/editor/core/index/index.esm.js.map +1 -1
- package/editor/core/italic/index.esm.js.map +1 -1
- package/editor/core/link/index.esm.js.map +1 -1
- package/editor/core/orderlist/index.esm.js.map +1 -1
- package/editor/core/strike/index.esm.js.map +1 -1
- package/editor/core/text/index.esm.js.map +1 -1
- package/editor/core/underline/index.esm.js.map +1 -1
- package/editor/editor/index.esm.js.map +1 -1
- package/input/@types/index.d.ts +109 -107
- package/input/core/controlled/index.esm.js.map +1 -1
- package/input/core/hookForm/index.esm.js.map +1 -1
- package/input/input/index.esm.js.map +1 -1
- package/inputfilter/@types/autocomplete.d.ts +20 -20
- package/inputfilter/@types/index.d.ts +42 -40
- package/inputfilter/_inputfilter.scss +58 -58
- package/inputfilter/const/index.esm.js.map +1 -1
- package/inputfilter/core/autocomplete/index.esm.js.map +1 -1
- package/inputfilter/core/date/index.esm.js.map +1 -1
- package/inputfilter/core/number/index.esm.js.map +1 -1
- package/inputfilter/core/text/index.esm.js.map +1 -1
- package/inputfilter/function/handle/index.esm.js.map +1 -1
- package/inputfilter/function/validate/index.esm.js.map +1 -1
- package/inputfilter/inputfilter/index.esm.js.map +1 -1
- package/inputfilter/legend/index.esm.js.map +1 -1
- package/lightbox/@types/index.d.ts +12 -10
- package/lightbox/_lightbox.scss +6 -6
- package/lightbox/core/handle/index.esm.js.map +1 -1
- package/lightbox/lightbox/index.esm.js.map +1 -1
- package/lightbox/package.json +5 -5
- package/loading/@types/index.d.ts +44 -42
- package/loading/_loading.scss +10 -10
- package/loading/loading/index.esm.js.map +1 -1
- package/loading/package.json +5 -5
- package/message/@types/index.d.ts +102 -102
- package/message/core/modal/index.esm.js.map +1 -1
- package/message/message/index.esm.js.map +1 -1
- package/message/package.json +5 -5
- package/modal/@types/index.d.ts +63 -61
- package/modal/core/core/index.esm.js.map +1 -1
- package/modal/modal/index.esm.js.map +1 -1
- package/multiselect/@types/index.d.ts +77 -75
- package/multiselect/core/controlled/index.esm.js.map +1 -1
- package/multiselect/core/hookForm/index.esm.js.map +1 -1
- package/multiselect/multiselect/index.esm.js.map +1 -1
- package/multiselect/package.json +5 -5
- package/package.json +15 -15
- package/pdf/@types/index.d.ts +12 -10
- package/pdf/package.json +5 -5
- package/pdf/pdf/index.esm.js.map +1 -1
- package/pdf/style/pdf.css +53 -53
- package/picklist/@types/index.d.ts +41 -40
- package/picklist/core/core/index.esm.js.map +1 -1
- package/picklist/picklist/index.esm.js.map +1 -1
- package/picklist/types.d.ts +35 -33
- package/radio/@types/index.d.ts +41 -39
- package/radio/core/controlled/index.esm.js.map +1 -1
- package/radio/core/hookForm/index.esm.js.map +1 -1
- package/radio/radio/index.esm.js.map +1 -1
- package/select/@types/index.d.ts +46 -44
- package/select/core/controlled/index.esm.js.map +1 -1
- package/select/core/hookForm/index.esm.js.map +1 -1
- package/select/select/index.esm.js.map +1 -1
- package/style/scss/_variables.scss +929 -929
- package/style/scss/bootstrap.scss +33 -33
- package/style/scss/core/_reset.scss +75 -75
- package/switch/@types/index.d.ts +22 -20
- package/switch/core/controlled/index.esm.js.map +1 -1
- package/switch/core/hookForm/index.esm.js.map +1 -1
- package/switch/switch/index.esm.js.map +1 -1
- package/table/@types/click.d.ts +7 -5
- package/table/@types/column.d.ts +58 -56
- package/table/@types/edit.d.ts +5 -5
- package/table/@types/expand.d.ts +32 -32
- package/table/@types/group.d.ts +20 -20
- package/table/@types/index.d.ts +63 -61
- package/table/@types/pagination.d.ts +26 -26
- package/table/@types/reorder.d.ts +16 -16
- package/table/@types/selection.d.ts +15 -15
- package/table/@types/sort.d.ts +8 -6
- package/table/@types/style.d.ts +20 -20
- package/table/@types/template.d.ts +22 -20
- package/table/core/click/index.esm.js.map +1 -1
- package/table/core/core/index.esm.js.map +1 -1
- package/table/core/expand/index.esm.js.map +1 -1
- package/table/core/group/index.esm.js.map +1 -1
- package/table/core/pagination/index.esm.js.map +1 -1
- package/table/core/reorder/index.esm.js.map +1 -1
- package/table/core/selection/index.esm.js.map +1 -1
- package/table/core/sort/index.esm.js.map +1 -1
- package/table/styled/index.esm.js.map +1 -1
- package/table/table/index.esm.js.map +1 -1
- package/tablepivot/@types/index.d.ts +50 -50
- package/tablepivot/@types/webdatarocks.d.ts +166 -166
- package/tablepivot/_tablepivot.scss +84 -84
- package/tablepivot/function/handle/index.esm.js.map +1 -1
- package/tablepivot/lang/pt-br/index.esm.js.map +1 -1
- package/tablepivot/tablepivot/index.esm.js.map +1 -1
- package/tabview/@types/index.d.ts +61 -59
- package/tabview/_tabview.scss +25 -25
- package/tabview/tabview/index.esm.js.map +1 -1
- package/textarea/@types/index.d.ts +18 -16
- package/textarea/core/controlled/index.esm.js.map +1 -1
- package/textarea/core/hookForm/index.esm.js.map +1 -1
- package/textarea/textarea/index.esm.js.map +1 -1
- package/tooltip/@types/index.d.ts +59 -57
- package/tooltip/core/handle/index.esm.js.map +1 -1
- package/tooltip/package.json +5 -5
- package/tooltip/tooltip/index.esm.js.map +1 -1
- package/utils/@types/index.d.ts +2 -2
- package/utils/@types/message.d.ts +18 -16
- package/utils/@types/request.d.ts +22 -22
- package/utils/@types/response.d.ts +55 -55
- package/utils/const/index.esm.js.map +1 -1
- package/utils/handle/index.esm.js.map +1 -1
- package/utils/helper/index.esm.js.map +1 -1
- package/utils/message/index.esm.js.map +1 -1
- package/utils/request/index.esm.js.map +1 -1
- package/utils/response/index.esm.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangesix/react",
|
|
3
|
-
"version": "2.4.0
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Luiz Fernando Bernardes de Paula",
|
|
6
6
|
"description": "Biblioteca de components React UI.",
|
|
@@ -14,34 +14,34 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@tippyjs/react": "^4.2.6",
|
|
17
|
-
"@tiptap/extension-color": "^3.23.
|
|
18
|
-
"@tiptap/extension-highlight": "^3.23.
|
|
19
|
-
"@tiptap/extension-image": "^3.23.
|
|
20
|
-
"@tiptap/extension-link": "^3.23.
|
|
21
|
-
"@tiptap/extension-text-style": "^3.23.
|
|
22
|
-
"@tiptap/extension-underline": "^3.23.
|
|
23
|
-
"@tiptap/pm": "^3.23.
|
|
24
|
-
"@tiptap/react": "^3.23.
|
|
25
|
-
"@tiptap/starter-kit": "^3.23.
|
|
17
|
+
"@tiptap/extension-color": "^3.23.6",
|
|
18
|
+
"@tiptap/extension-highlight": "^3.23.6",
|
|
19
|
+
"@tiptap/extension-image": "^3.23.6",
|
|
20
|
+
"@tiptap/extension-link": "^3.23.6",
|
|
21
|
+
"@tiptap/extension-text-style": "^3.23.6",
|
|
22
|
+
"@tiptap/extension-underline": "^3.23.6",
|
|
23
|
+
"@tiptap/pm": "^3.23.6",
|
|
24
|
+
"@tiptap/react": "^3.23.6",
|
|
25
|
+
"@tiptap/starter-kit": "^3.23.6",
|
|
26
26
|
"@webdatarocks/react-webdatarocks": "^1.4.23",
|
|
27
27
|
"animate.css": "^4.1.1",
|
|
28
|
-
"axios": "^1.16.
|
|
28
|
+
"axios": "^1.16.1",
|
|
29
29
|
"bootstrap": "^5.3.8",
|
|
30
30
|
"bootstrap-icons": "^1.13.1",
|
|
31
|
-
"date-fns": "^4.
|
|
31
|
+
"date-fns": "^4.3.0",
|
|
32
32
|
"jquery": "^4.0.0",
|
|
33
33
|
"lightbox2": "^2.12.0",
|
|
34
34
|
"node-snackbar": "^0.1.16",
|
|
35
35
|
"primeicons": "^7.0.0",
|
|
36
|
-
"primereact": "^10.9.
|
|
36
|
+
"primereact": "^10.9.8",
|
|
37
37
|
"react-pdf": "^10.4.1",
|
|
38
|
-
"sweetalert2": "^11.26.
|
|
38
|
+
"sweetalert2": "^11.26.25",
|
|
39
39
|
"sweetalert2-react-content": "^5.1.2",
|
|
40
40
|
"tippy.js": "^6.3.7"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
44
44
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
|
-
"react-hook-form": "^7.
|
|
45
|
+
"react-hook-form": "^7.76.1"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/pdf/@types/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ApiComponentProps } from '../../api';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface PDFProps extends ApiComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Dados de entrado do arquivo pdf a ser exibido
|
|
7
|
+
*/
|
|
8
|
+
file: string
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Exibe as informações do pdf de forma total ou em paginação
|
|
12
|
+
*/
|
|
13
|
+
mode?: "total" | "pagination"
|
|
12
14
|
}
|
package/pdf/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"main": "./index.cjs.js",
|
|
3
|
-
"module": "./index.esm.js",
|
|
4
|
-
"types": "./index.d.ts"
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"main": "./index.cjs.js",
|
|
3
|
+
"module": "./index.esm.js",
|
|
4
|
+
"types": "./index.d.ts"
|
|
5
|
+
}
|
package/pdf/pdf/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/pdf/pdf.tsx"],"sourcesContent":["import { Box } from \"../box\";\nimport { PDFProps } from \".\";\nimport * as ReactPDF from \"react-pdf\";\nimport React, { useState, useRef, useEffect } from \"react\";\n\nReactPDF.pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/build/pdf.worker.min.mjs`;\n\nconst ReactPDFOptions = {\n cMapUrl: `https://unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/cmaps/`,\n wasmUrl: `https://unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/wasm/`,\n standardFontDataUrl: `https://unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/standard_fonts/`,\n};\n\n/**\n * Componente - `PDF`\n *\n * Um componente versátil que é utilizado para exibir PDFs no seu aplicativo React como se fossem imagens.\n */\nexport function PDF(props: PDFProps) {\n const pdfContainerRef = useRef<null | HTMLDivElement>(null);\n\n const [width, setWidth] = useState<number>(0);\n const [page, setPage] = useState<number>(0);\n const [currentPage, setCurrentPage] = useState<number>(1);\n const [active, setActive] = useState<boolean>(false);\n\n useEffect(() => {\n setWidth((pdfContainerRef.current?.clientWidth ?? 500) - 50);\n });\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Box className={\"pdf \" + (props.className ?? \"\")}\n css={props.css}\n id={props.id}\n size={props.size ?? \"100\"}>\n <div className=\"pdf-container\"\n ref={pdfContainerRef}>\n <ReactPDF.Document\n file={props.file}\n options={ReactPDFOptions}\n onLoadSuccess={({ numPages }) => setPage(numPages)}\n onMouseEnter={() => setActive(true)}\n onMouseLeave={() => setActive(false)}>\n {props.mode === undefined || props.mode === \"total\"\n ? Array.from(new Array(page), (_el, index) => (\n <ReactPDF.Page\n key={`page_${index + 1}`}\n pageNumber={index + 1}\n width={width}/>\n ))\n : <ReactPDF.Page\n pageNumber={currentPage}\n width={width}/>}\n </ReactPDF.Document>\n {props.mode === \"pagination\"\n && <div className={`pdf-pagination ${active ? \"active\" : \"\"}`}\n onMouseEnter={event => {\n event.preventDefault();\n setActive(true);\n }}>\n <button className=\"pdf-page\"\n disabled={currentPage === 1}\n onClick={event => {\n event.preventDefault();\n if (currentPage > 0) {\n setCurrentPage(currentPage - 1);\n }\n }}><i className=\"bi bi-chevron-double-left\"/></button>\n <span>{currentPage} de {page}</span>\n <button className=\"pdf-page\"\n disabled={currentPage === page}\n onClick={event => {\n event.preventDefault();\n if (currentPage < page) {\n setCurrentPage(currentPage + 1);\n }\n }}><i className=\"bi bi-chevron-double-right\"/></button>\n </div>}\n </div>\n </Box>\n );\n}"],"mappings":";;;;;;AAKA,EAAS,MAAM,oBAAoB,YAAY,0BAA0B,EAAS,MAAM,QAAQ;AAEhG,IAAM,IAAkB;CACpB,SAAS,gCAAgC,EAAS,MAAM,QAAQ;CAChE,SAAS,gCAAgC,EAAS,MAAM,QAAQ;CAChE,qBAAqB,gCAAgC,EAAS,MAAM,QAAQ;
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/pdf/pdf.tsx"],"sourcesContent":["import { Box } from \"../box\";\r\nimport { PDFProps } from \".\";\r\nimport * as ReactPDF from \"react-pdf\";\r\nimport React, { useState, useRef, useEffect } from \"react\";\r\n\r\nReactPDF.pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/build/pdf.worker.min.mjs`;\r\n\r\nconst ReactPDFOptions = {\r\n cMapUrl: `https://unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/cmaps/`,\r\n wasmUrl: `https://unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/wasm/`,\r\n standardFontDataUrl: `https://unpkg.com/pdfjs-dist@${ReactPDF.pdfjs.version}/standard_fonts/`,\r\n};\r\n\r\n/**\r\n * Componente - `PDF`\r\n *\r\n * Um componente versátil que é utilizado para exibir PDFs no seu aplicativo React como se fossem imagens.\r\n */\r\nexport function PDF(props: PDFProps) {\r\n const pdfContainerRef = useRef<null | HTMLDivElement>(null);\r\n\r\n const [width, setWidth] = useState<number>(0);\r\n const [page, setPage] = useState<number>(0);\r\n const [currentPage, setCurrentPage] = useState<number>(1);\r\n const [active, setActive] = useState<boolean>(false);\r\n\r\n useEffect(() => {\r\n setWidth((pdfContainerRef.current?.clientWidth ?? 500) - 50);\r\n });\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Box className={\"pdf \" + (props.className ?? \"\")}\r\n css={props.css}\r\n id={props.id}\r\n size={props.size ?? \"100\"}>\r\n <div className=\"pdf-container\"\r\n ref={pdfContainerRef}>\r\n <ReactPDF.Document\r\n file={props.file}\r\n options={ReactPDFOptions}\r\n onLoadSuccess={({ numPages }) => setPage(numPages)}\r\n onMouseEnter={() => setActive(true)}\r\n onMouseLeave={() => setActive(false)}>\r\n {props.mode === undefined || props.mode === \"total\"\r\n ? Array.from(new Array(page), (_el, index) => (\r\n <ReactPDF.Page\r\n key={`page_${index + 1}`}\r\n pageNumber={index + 1}\r\n width={width}/>\r\n ))\r\n : <ReactPDF.Page\r\n pageNumber={currentPage}\r\n width={width}/>}\r\n </ReactPDF.Document>\r\n {props.mode === \"pagination\"\r\n && <div className={`pdf-pagination ${active ? \"active\" : \"\"}`}\r\n onMouseEnter={event => {\r\n event.preventDefault();\r\n setActive(true);\r\n }}>\r\n <button className=\"pdf-page\"\r\n disabled={currentPage === 1}\r\n onClick={event => {\r\n event.preventDefault();\r\n if (currentPage > 0) {\r\n setCurrentPage(currentPage - 1);\r\n }\r\n }}><i className=\"bi bi-chevron-double-left\"/></button>\r\n <span>{currentPage} de {page}</span>\r\n <button className=\"pdf-page\"\r\n disabled={currentPage === page}\r\n onClick={event => {\r\n event.preventDefault();\r\n if (currentPage < page) {\r\n setCurrentPage(currentPage + 1);\r\n }\r\n }}><i className=\"bi bi-chevron-double-right\"/></button>\r\n </div>}\r\n </div>\r\n </Box>\r\n );\r\n}"],"mappings":";;;;;;AAKA,EAAS,MAAM,oBAAoB,YAAY,0BAA0B,EAAS,MAAM,QAAQ;AAEhG,IAAM,IAAkB;CACpB,SAAS,gCAAgC,EAAS,MAAM,QAAQ;CAChE,SAAS,gCAAgC,EAAS,MAAM,QAAQ;CAChE,qBAAqB,gCAAgC,EAAS,MAAM,QAAQ;AAChF;AAOA,SAAgB,EAAI,GAAiB;CACjC,IAAM,IAAkB,EAA8B,IAAI,GAEpD,CAAC,GAAO,KAAY,EAAiB,CAAC,GACtC,CAAC,GAAM,KAAW,EAAiB,CAAC,GACpC,CAAC,GAAa,KAAkB,EAAiB,CAAC,GAClD,CAAC,GAAQ,KAAa,EAAkB,EAAK;CAWnD,OATA,QAAgB;EACZ,GAAU,EAAgB,SAAS,eAAe,OAAO,EAAE;CAC/D,CAAC,GAQG,kBAAC,GAAD;EAAK,WAAW,UAAU,EAAM,aAAa;EACzC,KAAK,EAAM;EACX,IAAI,EAAM;EACV,MAAM,EAAM,QAAQ;YACpB,kBAAC,OAAD;GAAK,WAAU;GACX,KAAK;aADT,CAEI,kBAAC,EAAS,UAAV;IACI,MAAM,EAAM;IACZ,SAAS;IACT,gBAAgB,EAAE,kBAAe,EAAQ,CAAQ;IACjD,oBAAoB,EAAU,EAAI;IAClC,oBAAoB,EAAU,EAAK;cAClC,EAAM,SAAS,KAAA,KAAa,EAAM,SAAS,UACtC,MAAM,KAAS,MAAM,CAAI,IAAI,GAAK,MAChC,kBAAC,EAAS,MAAV;KAEI,YAAY,IAAQ;KACb;IAAO,GAFT,QAAQ,IAAQ,GAEP,CACrB,IACC,kBAAC,EAAS,MAAV;KACE,YAAY;KACL;IAAO,CAAA;GACP,CAAA,GAClB,EAAM,SAAS,gBACT,kBAAC,OAAD;IAAK,WAAW,kBAAkB,IAAS,WAAW;IACrD,eAAc,MAAS;KAEnB,AADA,EAAM,eAAe,GACrB,EAAU,EAAI;IAClB;cAJD;KAKC,kBAAC,UAAD;MAAQ,WAAU;MACd,UAAU,MAAgB;MAC1B,UAAS,MAAS;OAEd,AADA,EAAM,eAAe,GACjB,IAAc,KACd,EAAe,IAAc,CAAC;MAEtC;gBAAG,kBAAC,KAAD,EAAG,WAAU,4BAA4B,CAAA;KAAS,CAAA;KACzD,kBAAC,QAAD,EAAA,UAAA;MAAO;MAAY;MAAK;KAAW,EAAA,CAAA;KACnC,kBAAC,UAAD;MAAQ,WAAU;MACd,UAAU,MAAgB;MAC1B,UAAS,MAAS;OAEd,AADA,EAAM,eAAe,GACjB,IAAc,KACd,EAAe,IAAc,CAAC;MAEtC;gBAAG,kBAAC,KAAD,EAAG,WAAU,6BAA6B,CAAA;KAAS,CAAA;IACzD;KACR;;CACJ,CAAA;AAEb"}
|
package/pdf/style/pdf.css
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
.pdf {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.pdf .pdf-container {
|
|
7
|
-
width: 100%;
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
align-items: center;
|
|
11
|
-
margin: 0;
|
|
12
|
-
padding: 10px 0;
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.pdf .pdf-container .react-pdf__Document {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.pdf .pdf-container .react-pdf__Page {
|
|
23
|
-
margin: .5em 0;
|
|
24
|
-
box-shadow: 0 30px 40px 0 rgba(16, 36, 94, .2);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.pdf .pdf-container .pdf-pagination {
|
|
28
|
-
position: absolute;
|
|
29
|
-
bottom: 5%;
|
|
30
|
-
left: 50%;
|
|
31
|
-
background: #fff;
|
|
32
|
-
opacity: 0;
|
|
33
|
-
transform: translate(-50%);
|
|
34
|
-
transition: opacity ease-in-out .2s;
|
|
35
|
-
box-shadow: 0 30px 40px 0 rgba(16, 36, 94, .2);
|
|
36
|
-
border-radius: 5px;
|
|
37
|
-
z-index: 2;
|
|
38
|
-
font-size: .9em;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.pdf .pdf-container .pdf-pagination.active {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
transform: translate(-50%);
|
|
44
|
-
transition: opacity ease-in-out .2s;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.pdf .pdf-container .pdf-pagination .pdf-page {
|
|
48
|
-
width: 44px;
|
|
49
|
-
height: 44px;
|
|
50
|
-
background: #fff;
|
|
51
|
-
border: 0;
|
|
52
|
-
font: inherit;
|
|
53
|
-
border-radius: 5px;
|
|
1
|
+
.pdf {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pdf .pdf-container {
|
|
7
|
+
width: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: center;
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 10px 0;
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pdf .pdf-container .react-pdf__Document {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pdf .pdf-container .react-pdf__Page {
|
|
23
|
+
margin: .5em 0;
|
|
24
|
+
box-shadow: 0 30px 40px 0 rgba(16, 36, 94, .2);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pdf .pdf-container .pdf-pagination {
|
|
28
|
+
position: absolute;
|
|
29
|
+
bottom: 5%;
|
|
30
|
+
left: 50%;
|
|
31
|
+
background: #fff;
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: translate(-50%);
|
|
34
|
+
transition: opacity ease-in-out .2s;
|
|
35
|
+
box-shadow: 0 30px 40px 0 rgba(16, 36, 94, .2);
|
|
36
|
+
border-radius: 5px;
|
|
37
|
+
z-index: 2;
|
|
38
|
+
font-size: .9em;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pdf .pdf-container .pdf-pagination.active {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
transform: translate(-50%);
|
|
44
|
+
transition: opacity ease-in-out .2s;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pdf .pdf-container .pdf-pagination .pdf-page {
|
|
48
|
+
width: 44px;
|
|
49
|
+
height: 44px;
|
|
50
|
+
background: #fff;
|
|
51
|
+
border: 0;
|
|
52
|
+
font: inherit;
|
|
53
|
+
border-radius: 5px;
|
|
54
54
|
}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import { ApiComponentProps } from '../../api';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
2
|
+
|
|
3
|
+
import * as PickListPrimeReact from "primereact/picklist";
|
|
4
|
+
|
|
5
|
+
export interface PickListDataProps {
|
|
6
|
+
/**
|
|
7
|
+
* Indificador do objeto
|
|
8
|
+
*/
|
|
9
|
+
id: any;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Label do objeto
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Define se objeto está ativo ou inativo
|
|
18
|
+
*/
|
|
19
|
+
active?: boolean
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface PickListProps extends ApiComponentProps, Pick<PickListPrimeReact.PickListProps, "sourceHeader" | "targetHeader" | "filter" | "filterBy"> {
|
|
23
|
+
/**
|
|
24
|
+
* Define o array de objeto que será manipulado pelo componente
|
|
25
|
+
*/
|
|
26
|
+
data: PickListDataProps[]
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Define a chave de indentificação do objeto de dados
|
|
30
|
+
*/
|
|
31
|
+
dataKey?: string
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Define se componente está desabilitado
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Callback executado quando o valor do PickList é alterado
|
|
40
|
+
*/
|
|
41
|
+
onChange(value: PickListDataProps[]): void;
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/picklist/core/core.tsx"],"sourcesContent":["import React from \"react\";\nimport { Checkbox } from \"primereact/checkbox\";\nimport { PickListDataProps, PickListProps } from \"..\";\nimport * as PickListPrimeReact from \"primereact/picklist\";\n\n/**\n * `Template`\n * Define o template padrão dos item do PickList\n */\nfunction pickListItemTemplate(\n item: PickListDataProps & { selected?: boolean }\n) {\n return (\n <div className=\"w-100 d-flex px-2 align-items-center\">\n <Checkbox checked={item.selected ?? false}\n className=\"me-2\"\n defaultChecked={item.selected}/>\n <p className=\"m-0\">{item.label}</p>\n </div>\n );\n}\n\n/**\n * `Core`\n * Define as propriedades base para funcionamento do picklist\n */\nexport function pickListCore(\n props: PickListProps\n): PickListPrimeReact.PickListProps {\n return {\n dataKey: props.dataKey ?? \"id\",\n showSourceControls: false,\n showTargetControls: false,\n sourceHeader: props.sourceHeader,\n targetHeader: props.targetHeader,\n itemTemplate: pickListItemTemplate,\n\n filter: props.filter ?? undefined,\n filterBy: props.filter ? (props.filterBy ?? \"label\") : undefined,\n sourceFilterPlaceholder: \"Pesquisa pelo nome\",\n targetFilterPlaceholder: \"Pesquisa pelo nome\",\n };\n}"],"mappings":";;;;AASA,SAAS,EACL,GACF;CACE,OACI,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,GAAD;GAAU,SAAS,EAAK,YAAY;GAChC,WAAU;GACV,gBAAgB,EAAK;
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/picklist/core/core.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { Checkbox } from \"primereact/checkbox\";\r\nimport { PickListDataProps, PickListProps } from \"..\";\r\nimport * as PickListPrimeReact from \"primereact/picklist\";\r\n\r\n/**\r\n * `Template`\r\n * Define o template padrão dos item do PickList\r\n */\r\nfunction pickListItemTemplate(\r\n item: PickListDataProps & { selected?: boolean }\r\n) {\r\n return (\r\n <div className=\"w-100 d-flex px-2 align-items-center\">\r\n <Checkbox checked={item.selected ?? false}\r\n className=\"me-2\"\r\n defaultChecked={item.selected}/>\r\n <p className=\"m-0\">{item.label}</p>\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * `Core`\r\n * Define as propriedades base para funcionamento do picklist\r\n */\r\nexport function pickListCore(\r\n props: PickListProps\r\n): PickListPrimeReact.PickListProps {\r\n return {\r\n dataKey: props.dataKey ?? \"id\",\r\n showSourceControls: false,\r\n showTargetControls: false,\r\n sourceHeader: props.sourceHeader,\r\n targetHeader: props.targetHeader,\r\n itemTemplate: pickListItemTemplate,\r\n\r\n filter: props.filter ?? undefined,\r\n filterBy: props.filter ? (props.filterBy ?? \"label\") : undefined,\r\n sourceFilterPlaceholder: \"Pesquisa pelo nome\",\r\n targetFilterPlaceholder: \"Pesquisa pelo nome\",\r\n };\r\n}"],"mappings":";;;;AASA,SAAS,EACL,GACF;CACE,OACI,kBAAC,OAAD;EAAK,WAAU;YAAf,CACI,kBAAC,GAAD;GAAU,SAAS,EAAK,YAAY;GAChC,WAAU;GACV,gBAAgB,EAAK;EAAU,CAAA,GACnC,kBAAC,KAAD;GAAG,WAAU;aAAO,EAAK;EAAS,CAAA,CACjC;;AAEb;AAMA,SAAgB,EACZ,GACgC;CAChC,OAAO;EACH,SAAS,EAAM,WAAW;EAC1B,oBAAoB;EACpB,oBAAoB;EACpB,cAAc,EAAM;EACpB,cAAc,EAAM;EACpB,cAAc;EAEd,QAAQ,EAAM,UAAU,KAAA;EACxB,UAAU,EAAM,SAAU,EAAM,YAAY,UAAW,KAAA;EACvD,yBAAyB;EACzB,yBAAyB;CAC7B;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/picklist/picklist.tsx"],"sourcesContent":["import { Box } from \"../box\";\nimport { PickListProps } from \".\";\nimport { pickListCore } from \"./core/core\";\nimport React, { useState, useEffect } from \"react\";\nimport * as PickListPrimeReact from \"primereact/picklist\";\n\n/**\n * Componente - `PickList`\n *\n * Um componente versátil que é utilizado para reordenar itens entre listas diferentes.\n */\nexport function PickList(props: PickListProps) {\n const [source, setSource] = useState<any>([]);\n const [target, setTarget] = useState<any>([]);\n\n useEffect(() => {\n setSource(props.data.filter(item => item.active === undefined || !item.active));\n setTarget(props.data.filter(item => item.active));\n }, [props.data]);\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Box\n className={props.className}\n css={props.css}\n size={props.size ?? \"100\"}>\n <PickListPrimeReact.PickList\n className=\"w-100\"\n source={source}\n target={target}\n onChange={event => {\n let target = event.target.map((item: any) => {\n delete item.selected;\n return { ...item, active: true };\n });\n let source = event.source.map((item: any) => {\n delete item.selected;\n return { ...item, active: false };\n });\n setTarget(target);\n setSource(source);\n props.onChange([...source, ...target]);\n }}\n onSourceSelectionChange={event => setSource(source.map((item: any) => {\n return {\n ...item,\n selected: event.value?.some((obj: any) => obj.id === item.id)\n };\n }))}\n onTargetSelectionChange={event => setTarget(target.map((item: any) => {\n return {\n ...item,\n selected: event.value?.some((obj: any) => obj.id === item.id)\n };\n }))}\n {...pickListCore(props)}/>\n </Box>\n );\n}\n\nPickList.displayName = \"PickList\";"],"mappings":";;;;;;;AAWA,SAAgB,EAAS,GAAsB;CAC3C,IAAM,CAAC,GAAQ,KAAa,EAAc,
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/picklist/picklist.tsx"],"sourcesContent":["import { Box } from \"../box\";\r\nimport { PickListProps } from \".\";\r\nimport { pickListCore } from \"./core/core\";\r\nimport React, { useState, useEffect } from \"react\";\r\nimport * as PickListPrimeReact from \"primereact/picklist\";\r\n\r\n/**\r\n * Componente - `PickList`\r\n *\r\n * Um componente versátil que é utilizado para reordenar itens entre listas diferentes.\r\n */\r\nexport function PickList(props: PickListProps) {\r\n const [source, setSource] = useState<any>([]);\r\n const [target, setTarget] = useState<any>([]);\r\n\r\n useEffect(() => {\r\n setSource(props.data.filter(item => item.active === undefined || !item.active));\r\n setTarget(props.data.filter(item => item.active));\r\n }, [props.data]);\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Box\r\n className={props.className}\r\n css={props.css}\r\n size={props.size ?? \"100\"}>\r\n <PickListPrimeReact.PickList\r\n className=\"w-100\"\r\n source={source}\r\n target={target}\r\n onChange={event => {\r\n let target = event.target.map((item: any) => {\r\n delete item.selected;\r\n return { ...item, active: true };\r\n });\r\n let source = event.source.map((item: any) => {\r\n delete item.selected;\r\n return { ...item, active: false };\r\n });\r\n setTarget(target);\r\n setSource(source);\r\n props.onChange([...source, ...target]);\r\n }}\r\n onSourceSelectionChange={event => setSource(source.map((item: any) => {\r\n return {\r\n ...item,\r\n selected: event.value?.some((obj: any) => obj.id === item.id)\r\n };\r\n }))}\r\n onTargetSelectionChange={event => setTarget(target.map((item: any) => {\r\n return {\r\n ...item,\r\n selected: event.value?.some((obj: any) => obj.id === item.id)\r\n };\r\n }))}\r\n {...pickListCore(props)}/>\r\n </Box>\r\n );\r\n}\r\n\r\nPickList.displayName = \"PickList\";"],"mappings":";;;;;;;AAWA,SAAgB,EAAS,GAAsB;CAC3C,IAAM,CAAC,GAAQ,KAAa,EAAc,CAAC,CAAC,GACtC,CAAC,GAAQ,KAAa,EAAc,CAAC,CAAC;CAY5C,OAVA,QAAgB;EAEZ,AADA,EAAU,EAAM,KAAK,QAAO,MAAQ,EAAK,WAAW,KAAA,KAAa,CAAC,EAAK,MAAM,CAAC,GAC9E,EAAU,EAAM,KAAK,QAAO,MAAQ,EAAK,MAAM,CAAC;CACpD,GAAG,CAAC,EAAM,IAAI,CAAC,GAQX,kBAAC,GAAD;EACI,WAAW,EAAM;EACjB,KAAK,EAAM;EACX,MAAM,EAAM,QAAQ;YACpB,kBAAC,EAAmB,UAApB;GACI,WAAU;GACF;GACA;GACR,WAAU,MAAS;IACf,IAAI,IAAS,EAAM,OAAO,KAAK,OAC3B,OAAO,EAAK,UACL;KAAE,GAAG;KAAM,QAAQ;IAAK,EAClC,GACG,IAAS,EAAM,OAAO,KAAK,OAC3B,OAAO,EAAK,UACL;KAAE,GAAG;KAAM,QAAQ;IAAM,EACnC;IAGD,AAFA,EAAU,CAAM,GAChB,EAAU,CAAM,GAChB,EAAM,SAAS,CAAC,GAAG,GAAQ,GAAG,CAAM,CAAC;GACzC;GACA,0BAAyB,MAAS,EAAU,EAAO,KAAK,OAC7C;IACH,GAAG;IACH,UAAU,EAAM,OAAO,MAAM,MAAa,EAAI,OAAO,EAAK,EAAE;GAChE,EACH,CAAC;GACF,0BAAyB,MAAS,EAAU,EAAO,KAAK,OAC7C;IACH,GAAG;IACH,UAAU,EAAM,OAAO,MAAM,MAAa,EAAI,OAAO,EAAK,EAAE;GAChE,EACH,CAAC;GACF,GAAI,EAAa,CAAK;EAAG,CAAA;CAC5B,CAAA;AAEb;AAEA,EAAS,cAAc"}
|
package/picklist/types.d.ts
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { ApiComponentProps } from '../api/types';
|
|
2
2
|
import { PickListProps as PickListPrimeProps } from 'primereact/picklist';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface PickListDataProps {
|
|
6
|
+
/**
|
|
7
|
+
* Indificador do objeto
|
|
8
|
+
*/
|
|
9
|
+
id: any;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Label do objeto
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Define se objeto está ativo ou inativo
|
|
18
|
+
*/
|
|
19
|
+
active?: boolean
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface PickListProps extends ApiComponentProps, Pick<PickListPrimeProps, "sourceHeader" | "targetHeader" | "filter" | "filterBy"> {
|
|
23
|
+
/**
|
|
24
|
+
* Define o array de objeto que será manipulado pelo componente
|
|
25
|
+
*/
|
|
26
|
+
data: PickListDataProps[]
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Define a chave de indentificação do objeto de dados
|
|
30
|
+
*/
|
|
31
|
+
dataKey?: string
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Callback executado quando o valor do PickList é alterado
|
|
35
|
+
*/
|
|
36
|
+
onChange(value: PickListDataProps[]): void;
|
|
37
|
+
}
|
package/radio/@types/index.d.ts
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
import { ApiComponentProps, ApiFieldModeProps, ApiFieldHookFormProps, ApiFieldComponentProps, ApiFieldControlledProps } from '../../api';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
interface RadioBaseProps extends ApiComponentProps, ApiFieldComponentProps {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Define o nome do campo
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Array de objeto para definir as opções de escolha
|
|
13
|
+
*/
|
|
14
|
+
options: Array<RadioOptionsProps>
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Define o aliamento das opções de escolha
|
|
18
|
+
*/
|
|
19
|
+
align?: "row" | "column"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type RadioOptionsProps = {
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Define o valor da opção
|
|
26
|
+
*/
|
|
27
|
+
value: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Define a label da opção
|
|
31
|
+
*/
|
|
32
|
+
label: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Define se opção está habilitada ou desabilitada
|
|
36
|
+
*/
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type RadioProps<T extends ApiFieldModeProps> = T extends "Controlled"
|
|
41
|
+
? RadioBaseProps & ApiFieldControlledProps
|
|
42
|
+
: RadioBaseProps & ApiFieldHookFormProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/radio/core/controlled.tsx"],"sourcesContent":["import { RadioProps } from \"..\";\nimport React, { Fragment } from \"react\";\nimport { InputFeedback } from \"../../api\";\n\ntype Props = {\n core: RadioProps<\"Controlled\">\n};\n\n/**\n * Core - `RadioControlled`\n * Define o componente controlled\n */\nexport function RadioControlled({ core, ...props }: RadioProps<\"Controlled\"> & Props) {\n let align = !props.align || props.align === \"row\" ? \"flex-row\" : \"flex-column\";\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return <div className=\"w-100 d-flex flex-column\">\n <div className={`w-100 d-flex gap-3 ${align}`}>\n {props.options.map((item) => {\n return (\n <Fragment key={item.value}>\n <div className=\"d-flex align-items-center form-check\">\n <input checked={item.value === props.value}\n className=\"form-check-input\"\n disabled={props.disabled || item.disabled}\n id={props.name + \"-\" + item.value}\n name={props.name}\n required={props.required}\n type=\"radio\"\n value={item.value}\n onChange={event => {\n if (props.onChange) {\n props.onChange(event.target.value);\n }\n }}/>\n <label className=\"ms-2\"\n htmlFor={props.name + \"-\" + item.value}>{item.label}</label>\n </div>\n </Fragment>\n );\n }\n )}\n </div>\n <InputFeedback {...props}/>\n </div>;\n}"],"mappings":";;;;;AAYA,SAAgB,EAAgB,EAAE,SAAM,GAAG,KAA2C;CAOlF,OAAO,kBAAC,OAAD;EAAK,WAAU;YAAf,CACH,kBAAC,OAAD;GAAK,WAAW,sBAPR,CAAC,EAAM,SAAS,EAAM,UAAU,QAAQ,aAAa;aAQxD,EAAM,QAAQ,KAAK,MAEZ,kBAAC,GAAD,EAAA,UACI,kBAAC,OAAD;IAAK,WAAU;cAAf,CACI,kBAAC,SAAD;KAAO,SAAS,EAAK,UAAU,EAAM;KACjC,WAAU;KACV,UAAU,EAAM,YAAY,EAAK;KACjC,IAAI,EAAM,OAAO,MAAM,EAAK;KAC5B,MAAM,EAAM;KACZ,UAAU,EAAM;KAChB,MAAK;KACL,OAAO,EAAK;KACZ,WAAU,MAAS;MACf,AAAI,EAAM,YACN,EAAM,SAAS,EAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/radio/core/controlled.tsx"],"sourcesContent":["import { RadioProps } from \"..\";\r\nimport React, { Fragment } from \"react\";\r\nimport { InputFeedback } from \"../../api\";\r\n\r\ntype Props = {\r\n core: RadioProps<\"Controlled\">\r\n};\r\n\r\n/**\r\n * Core - `RadioControlled`\r\n * Define o componente controlled\r\n */\r\nexport function RadioControlled({ core, ...props }: RadioProps<\"Controlled\"> & Props) {\r\n let align = !props.align || props.align === \"row\" ? \"flex-row\" : \"flex-column\";\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return <div className=\"w-100 d-flex flex-column\">\r\n <div className={`w-100 d-flex gap-3 ${align}`}>\r\n {props.options.map((item) => {\r\n return (\r\n <Fragment key={item.value}>\r\n <div className=\"d-flex align-items-center form-check\">\r\n <input checked={item.value === props.value}\r\n className=\"form-check-input\"\r\n disabled={props.disabled || item.disabled}\r\n id={props.name + \"-\" + item.value}\r\n name={props.name}\r\n required={props.required}\r\n type=\"radio\"\r\n value={item.value}\r\n onChange={event => {\r\n if (props.onChange) {\r\n props.onChange(event.target.value);\r\n }\r\n }}/>\r\n <label className=\"ms-2\"\r\n htmlFor={props.name + \"-\" + item.value}>{item.label}</label>\r\n </div>\r\n </Fragment>\r\n );\r\n }\r\n )}\r\n </div>\r\n <InputFeedback {...props}/>\r\n </div>;\r\n}"],"mappings":";;;;;AAYA,SAAgB,EAAgB,EAAE,SAAM,GAAG,KAA2C;CAOlF,OAAO,kBAAC,OAAD;EAAK,WAAU;YAAf,CACH,kBAAC,OAAD;GAAK,WAAW,sBAPR,CAAC,EAAM,SAAS,EAAM,UAAU,QAAQ,aAAa;aAQxD,EAAM,QAAQ,KAAK,MAEZ,kBAAC,GAAD,EAAA,UACI,kBAAC,OAAD;IAAK,WAAU;cAAf,CACI,kBAAC,SAAD;KAAO,SAAS,EAAK,UAAU,EAAM;KACjC,WAAU;KACV,UAAU,EAAM,YAAY,EAAK;KACjC,IAAI,EAAM,OAAO,MAAM,EAAK;KAC5B,MAAM,EAAM;KACZ,UAAU,EAAM;KAChB,MAAK;KACL,OAAO,EAAK;KACZ,WAAU,MAAS;MACf,AAAI,EAAM,YACN,EAAM,SAAS,EAAM,OAAO,KAAK;KAEzC;IAAG,CAAA,GACP,kBAAC,SAAD;KAAO,WAAU;KACb,SAAS,EAAM,OAAO,MAAM,EAAK;eAAQ,EAAK;IAAa,CAAA,CAC9D;MACC,GAlBK,EAAK,KAkBV,CAGlB;EACC,CAAA,GACL,kBAAC,GAAD,EAAe,GAAI,EAAO,CAAA,CACzB;;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/radio/core/hookForm.tsx"],"sourcesContent":["import React from \"react\";\nimport { RadioProps } from \"..\";\nimport { InputFeedback } from \"../../api\";\nimport { Controller } from \"react-hook-form\";\n\ntype Props = {\n core: RadioProps<\"HookForm\">\n};\n\n/**\n * Core - `RadioHookForm`\n * Define o componente utilizando o HookForm\n */\nexport function RadioHookForm({ core, ...props }: RadioProps<\"HookForm\"> & Props) {\n let align = !props.align || props.align === \"row\" ? \"flex-row\" : \"flex-column\";\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Controller render={({ field, formState: { errors } }) => {\n return <div className=\"w-100 d-flex flex-column\">\n <div className={`w-100 d-flex gap-3 ${align}`}>\n {props.options.map((item) => {\n return (\n <div className=\"d-flex align-items-center form-check\"\n key={item.value}>\n <input checked={item.value === field.value}\n className={\"form-check-input \" + (!errors[props.name] ? \"\" : \"is-invalid\")}\n disabled={props.disabled || item.disabled}\n id={props.name + \"-\" + item.value}\n type=\"radio\"\n value={item.value}\n onChange={field.onChange}/>\n <label className=\"ms-2 form-check-label\"\n htmlFor={props.name + \"-\" + item.value}>{item.label}</label>\n </div>\n );\n }\n )}\n </div>\n <InputFeedback {...props}\n errors={errors}/>\n </div>;\n }}\n control={props.control}\n name={props.name}\n rules={{ required: !props.required ? false : \"Campo obrigatório\" }}/>\n );\n}"],"mappings":";;;;;;AAaA,SAAgB,EAAc,EAAE,SAAM,GAAG,KAAyC;CAC9E,IAAI,IAAQ,CAAC,EAAM,SAAS,EAAM,UAAU,QAAQ,aAAa;CAOjE,OACI,kBAAC,GAAD;EAAY,SAAS,EAAE,UAAO,WAAW,EAAE,kBAChC,kBAAC,OAAD;GAAK,WAAU;aAAf,CACH,kBAAC,OAAD;IAAK,WAAW,sBAAsB;cACjC,EAAM,QAAQ,KAAK,MAEZ,kBAAC,OAAD;KAAK,WAAU;eAAf,CAEI,kBAAC,SAAD;MAAO,SAAS,EAAK,UAAU,EAAM;MACjC,WAAW,uBAAwB,EAAO,EAAM,QAAa,eAAL;MACxD,UAAU,EAAM,YAAY,EAAK;MACjC,IAAI,EAAM,OAAO,MAAM,EAAK;MAC5B,MAAK;MACL,OAAO,EAAK;MACZ,UAAU,EAAM;
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../../src/radio/core/hookForm.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { RadioProps } from \"..\";\r\nimport { InputFeedback } from \"../../api\";\r\nimport { Controller } from \"react-hook-form\";\r\n\r\ntype Props = {\r\n core: RadioProps<\"HookForm\">\r\n};\r\n\r\n/**\r\n * Core - `RadioHookForm`\r\n * Define o componente utilizando o HookForm\r\n */\r\nexport function RadioHookForm({ core, ...props }: RadioProps<\"HookForm\"> & Props) {\r\n let align = !props.align || props.align === \"row\" ? \"flex-row\" : \"flex-column\";\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Controller render={({ field, formState: { errors } }) => {\r\n return <div className=\"w-100 d-flex flex-column\">\r\n <div className={`w-100 d-flex gap-3 ${align}`}>\r\n {props.options.map((item) => {\r\n return (\r\n <div className=\"d-flex align-items-center form-check\"\r\n key={item.value}>\r\n <input checked={item.value === field.value}\r\n className={\"form-check-input \" + (!errors[props.name] ? \"\" : \"is-invalid\")}\r\n disabled={props.disabled || item.disabled}\r\n id={props.name + \"-\" + item.value}\r\n type=\"radio\"\r\n value={item.value}\r\n onChange={field.onChange}/>\r\n <label className=\"ms-2 form-check-label\"\r\n htmlFor={props.name + \"-\" + item.value}>{item.label}</label>\r\n </div>\r\n );\r\n }\r\n )}\r\n </div>\r\n <InputFeedback {...props}\r\n errors={errors}/>\r\n </div>;\r\n }}\r\n control={props.control}\r\n name={props.name}\r\n rules={{ required: !props.required ? false : \"Campo obrigatório\" }}/>\r\n );\r\n}"],"mappings":";;;;;;AAaA,SAAgB,EAAc,EAAE,SAAM,GAAG,KAAyC;CAC9E,IAAI,IAAQ,CAAC,EAAM,SAAS,EAAM,UAAU,QAAQ,aAAa;CAOjE,OACI,kBAAC,GAAD;EAAY,SAAS,EAAE,UAAO,WAAW,EAAE,kBAChC,kBAAC,OAAD;GAAK,WAAU;aAAf,CACH,kBAAC,OAAD;IAAK,WAAW,sBAAsB;cACjC,EAAM,QAAQ,KAAK,MAEZ,kBAAC,OAAD;KAAK,WAAU;eAAf,CAEI,kBAAC,SAAD;MAAO,SAAS,EAAK,UAAU,EAAM;MACjC,WAAW,uBAAwB,EAAO,EAAM,QAAa,eAAL;MACxD,UAAU,EAAM,YAAY,EAAK;MACjC,IAAI,EAAM,OAAO,MAAM,EAAK;MAC5B,MAAK;MACL,OAAO,EAAK;MACZ,UAAU,EAAM;KAAU,CAAA,GAC9B,kBAAC,SAAD;MAAO,WAAU;MACb,SAAS,EAAM,OAAO,MAAM,EAAK;gBAAQ,EAAK;KAAa,CAAA,CAC9D;OAVI,EAAK,KAUT,CAGb;GACC,CAAA,GACL,kBAAC,GAAD;IAAe,GAAI;IACP;GAAQ,CAAA,CACnB;;EAET,SAAS,EAAM;EACf,MAAM,EAAM;EACZ,OAAO,EAAE,UAAW,EAAM,WAAmB,sBAAR,GAA4B;CAAG,CAAA;AAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/radio/radio.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box } from \"../box\";\nimport { RadioProps } from \".\";\nimport { ApiFieldModeProps } from \"../api\";\nimport { InputLabel, InputProps } from \"../api\";\nimport { RadioHookForm } from \"./core/hookForm\";\nimport { RadioControlled } from \"./core/controlled\";\n\n/**\n * Componente - `Radio`\n *\n * Um componente versátil que é utilizado para entrada de dados de multipla escolha.\n */\nexport function Radio<T extends ApiFieldModeProps = \"Controlled\">(props: RadioProps<T> & { mode?: T }) {\n let propsCore = props as any;\n let core = {\n ...InputProps(propsCore)\n };\n\n /*\n |------------------------------------------\n | render() - Renderização do componente\n |------------------------------------------\n */\n return (\n <Box className={props.className}\n css={props.css}\n size={props.size ?? \"100\"}>\n <InputLabel {...props}/>\n {!props.mode || props.mode === \"Controlled\"\n ? <RadioControlled core={core}\n {...propsCore}/>\n : <RadioHookForm core={core}\n {...propsCore}/>}\n </Box>\n );\n}\n\nRadio.displayName = \"Radio\";"],"mappings":";;;;;;;;;AAaA,SAAgB,EAAkD,GAAqC;CACnG,IAAI,IAAY,GACZ,IAAO,EACP,GAAG,EAAW,
|
|
1
|
+
{"version":3,"file":"index.esm.js","names":[],"sources":["../../../src/radio/radio.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { Box } from \"../box\";\r\nimport { RadioProps } from \".\";\r\nimport { ApiFieldModeProps } from \"../api\";\r\nimport { InputLabel, InputProps } from \"../api\";\r\nimport { RadioHookForm } from \"./core/hookForm\";\r\nimport { RadioControlled } from \"./core/controlled\";\r\n\r\n/**\r\n * Componente - `Radio`\r\n *\r\n * Um componente versátil que é utilizado para entrada de dados de multipla escolha.\r\n */\r\nexport function Radio<T extends ApiFieldModeProps = \"Controlled\">(props: RadioProps<T> & { mode?: T }) {\r\n let propsCore = props as any;\r\n let core = {\r\n ...InputProps(propsCore)\r\n };\r\n\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <Box className={props.className}\r\n css={props.css}\r\n size={props.size ?? \"100\"}>\r\n <InputLabel {...props}/>\r\n {!props.mode || props.mode === \"Controlled\"\r\n ? <RadioControlled core={core}\r\n {...propsCore}/>\r\n : <RadioHookForm core={core}\r\n {...propsCore}/>}\r\n </Box>\r\n );\r\n}\r\n\r\nRadio.displayName = \"Radio\";"],"mappings":";;;;;;;;;AAaA,SAAgB,EAAkD,GAAqC;CACnG,IAAI,IAAY,GACZ,IAAO,EACP,GAAG,EAAW,CAAS,EAC3B;CAOA,OACI,kBAAC,GAAD;EAAK,WAAW,EAAM;EAClB,KAAK,EAAM;EACX,MAAM,EAAM,QAAQ;YAFxB,CAGI,kBAAC,GAAD,EAAY,GAAI,EAAO,CAAA,GACtB,CAAC,EAAM,QAAQ,EAAM,SAAS,eACzB,kBAAC,GAAD;GAAuB;GACrB,GAAI;EAAW,CAAA,IACjB,kBAAC,GAAD;GAAqB;GACnB,GAAI;EAAW,CAAA,CACtB;;AAEb;AAEA,EAAM,cAAc"}
|