@orangesix/react 1.0.0 → 1.0.6
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/api/index.cjs.js +2 -0
- package/api/index.cjs.js.map +1 -0
- package/api/index.d.ts +26 -0
- package/api/index.esm.js +2 -0
- package/api/index.esm.js.map +1 -0
- package/api/package.json +5 -0
- package/api/theme.css +1 -0
- package/box/_box.scss +83 -0
- package/box/index.cjs.js +2 -0
- package/box/index.cjs.js.map +1 -0
- package/box/index.d.ts +147 -0
- package/box/index.esm.js +2 -0
- package/box/index.esm.js.map +1 -0
- package/box/package.json +5 -0
- package/editor/_editor.scss +53 -0
- package/editor/index.cjs.js +2 -0
- package/editor/index.cjs.js.map +1 -0
- package/editor/index.d.ts +92 -0
- package/editor/index.esm.js +2 -0
- package/editor/index.esm.js.map +1 -0
- package/editor/package.json +5 -0
- package/package.json +33 -23
- package/table/_table.scss +136 -0
- package/table/index.cjs.js +2 -0
- package/table/index.cjs.js.map +1 -0
- package/table/index.d.ts +256 -0
- package/table/index.esm.js +2 -0
- package/table/index.esm.js.map +1 -0
- package/table/package.json +5 -0
- package/utils/index.cjs.js +2 -0
- package/utils/index.cjs.js.map +1 -0
- package/utils/index.d.ts +155 -0
- package/utils/index.esm.js +2 -0
- package/utils/index.esm.js.map +1 -0
- package/utils/package.json +5 -0
- package/LICENSE +0 -21
- package/README.md +0 -2
package/api/index.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/api/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Define as tipagens `default` de todos os componentes do pacote
|
|
5
|
+
*/
|
|
6
|
+
interface ApiComponentProps {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Adiciona no atributo `class` do componente o valor atribuido nessa propriedade
|
|
10
|
+
*/
|
|
11
|
+
className?: string
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Define o tamanho da box do componente de acordo com o valores abaixo
|
|
15
|
+
*/
|
|
16
|
+
size?: "5" | "10" | "12-5" | "15" | "17-5" | "20" | "22-5" | "25" | "30" | "33" | "35" | "40" | "45" | "50" | "55" | "60" | "65" | "70" | "75" | "80" | "85" | "90" | "95" | "100"
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Define as propriedades css do component `style`
|
|
20
|
+
*/
|
|
21
|
+
css?: CSSProperties
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type IAPIComponentProps = ApiComponentProps;
|
|
25
|
+
|
|
26
|
+
export type { IAPIComponentProps };
|
package/api/index.esm.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/api/package.json
ADDED
package/api/theme.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--box-size-5: 5%;--box-size-10: 10%;--box-size-12-5: 12.5%;--box-size-15: 15%;--box-size-17-5: 17.5%;--box-size-20: 20%;--box-size-22-5: 25.5%;--box-size-25: 25%;--box-size-30: 30%;--box-size-33: 33.3333%;--box-size-35: 35%;--box-size-40: 40%;--box-size-45: 45%;--box-size-50: 50%;--box-size-55: 55%;--box-size-60: 60%;--box-size-65: 65%;--box-size-70: 70%;--box-size-75: 75%;--box-size-80: 80%;--box-size-85: 85%;--box-size-90: 90%;--box-size-95: 95%;--box-size-100: 100%}.box{display:flex;flex-wrap:wrap;position:relative}.box.box-size-5{width:calc(var(--box-size-5, 5%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-5{width:calc(100% - .5rem)}}.box.box-size-10{width:calc(var(--box-size-10, 10%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-10{width:calc(100% - .5rem)}}.box.box-size-12-5{width:calc(var(--box-size-12-5, 12.5%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-12-5{width:calc(100% - .5rem)}}.box.box-size-15{width:calc(var(--box-size-15, 15%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-15{width:calc(100% - .5rem)}}.box.box-size-17-5{width:calc(var(--box-size-17-5, 17.5%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-17-5{width:calc(100% - .5rem)}}.box.box-size-20{width:calc(var(--box-size-20, 20%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-20{width:calc(100% - .5rem)}}.box.box-size-22-5{width:calc(var(--box-size-22-5, 25.5%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-22-5{width:calc(100% - .5rem)}}.box.box-size-25{width:calc(var(--box-size-25, 25%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-25{width:calc(100% - .5rem)}}.box.box-size-30{width:calc(var(--box-size-30, 30%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-30{width:calc(100% - .5rem)}}.box.box-size-33{width:calc(var(--box-size-33, 33%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-33{width:calc(100% - .5rem)}}.box.box-size-35{width:calc(var(--box-size-35, 35%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-35{width:calc(100% - .5rem)}}.box.box-size-40{width:calc(var(--box-size-40, 40%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-40{width:calc(100% - .5rem)}}.box.box-size-45{width:calc(var(--box-size-45, 45%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-45{width:calc(100% - .5rem)}}.box.box-size-50{width:calc(var(--box-size-50, 50%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-50{width:calc(100% - .5rem)}}.box.box-size-55{width:calc(var(--box-size-55, 55%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-55{width:calc(100% - .5rem)}}.box.box-size-60{width:calc(var(--box-size-60, 60%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-60{width:calc(100% - .5rem)}}.box.box-size-65{width:calc(var(--box-size-65, 65%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-65{width:calc(100% - .5rem)}}.box.box-size-70{width:calc(var(--box-size-70, 70%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-70{width:calc(100% - .5rem)}}.box.box-size-75{width:calc(var(--box-size-75, 75%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-75{width:calc(100% - .5rem)}}.box.box-size-80{width:calc(var(--box-size-80, 80%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-80{width:calc(100% - .5rem)}}.box.box-size-85{width:calc(var(--box-size-85, 85%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-85{width:calc(100% - .5rem)}}.box.box-size-90{width:calc(var(--box-size-90, 90%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-90{width:calc(100% - .5rem)}}.box.box-size-95{width:calc(var(--box-size-95, 95%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-95{width:calc(100% - .5rem)}}.box.box-size-100{width:calc(var(--box-size-100, 100%) - .5rem);margin:.5rem calc(.5rem / 2);padding:.5rem}@media (max-width: 576px){.box.box-size-100{width:calc(100% - .5rem)}}.box.box-direction-row{flex-direction:row}.box.box-direction-column{flex-direction:column}:root{--table-frozen: #fff;--table-sort-size: 12px;--table-sort-active: #0D6EFD;--table-checkbox-size: 17px;--table-scrollbar: #e1e1e1;--table-select: var(--bs-light, #e1e1e1);--table-header: var(--bs-light, #f5f5f5);--table-footer: var(--bs-light, #f5f5f5);--table-paginator-color: var(--bs-secondary-300, #b9b9b9);--table-paginator-active: var(--bs-primary, #0D6EFD)}.table-responsive{width:100%}.table{width:100%;margin-bottom:0}.table-footer,.table-header{width:100%;display:flex;padding:0;margin:0;background:var(--table-header, #f5f5f5);border-bottom:1px solid #dee2e6}.table-footer{border-top:1px solid #dee2e6;background:var(--table-footer, #f5f5f5)}.table-sort{cursor:pointer;color:var(--bs-secondary, rgba(85,85,85,0.333333))}.table-sort svg{width:var(--table-sort-size, 12px);height:var(--table-sort-size, 12px)}.table-sort-active span[data-pc-section='sort'] svg{color:var(--bs-primary, #0D6EFD)}.table-resizable{text-overflow:ellipsis}.p-datatable .p-datatable-wrapper::-webkit-scrollbar{height:8px}.p-datatable .p-datatable-wrapper::-webkit-scrollbar-thumb{background:var(--table-scrollbar, #e1e1e1);border-radius:10px}.p-datatable .p-datatable-tbody .p-highlight{background:var(--table-select, #e1e1e1)}.p-datatable .p-datatable-tbody .p-highlight td{font-weight:bolder}.p-datatable .p-datatable-tbody .p-highlight td.p-frozen-column{background:var(--table-select, #e1e1e1)}.p-datatable .p-datatable-tbody .p-row-toggler{width:14px;height:14px;margin-left:5px}.p-datatable .p-frozen-column{position:sticky}.p-datatable .p-frozen-column[data-pc-section="bodycell"]{background:var(--table-frozen, #fff)}.p-datatable .p-checkbox-box{width:var(--table-checkbox-size, 17px);height:var(--table-checkbox-size, 17px)}.p-datatable .p-checkbox.p-highlight .p-checkbox-box{background:var(--bs-primary, #0D6EFD);border-color:var(--bs-primary, #0D6EFD)}.p-datatable .p-checkbox:has(.p-checkbox-input:hover) .p-highlight .p-checkbox-box{border-color:var(--bs-primary, #0D6EFD)}.p-datatable .p-paginator .p-paginator-first,.p-datatable .p-paginator .p-paginator-page,.p-datatable .p-paginator .p-paginator-last{font-size:.9em;min-width:28px;height:28px;color:var(--table-paginator-color, #b9b9b9)}.p-datatable .p-paginator .p-paginator-page.p-highlight{color:#fff;border:none;background:var(--table-paginator-active, #0D6EFD)}:root{--editor-border-color: #dee2e6;--editor-background: #fff;--editor-color: #555;--editor-active: var(--bs-primary, #0D6EFD);--editor-toolbar: var(--bs-light, #F6F6F6);--editor-toolbar-color: #6c757d}.p-editor-container .p-editor-toolbar{background:var(--editor-toolbar) !important}.p-editor-container .ql-snow{border-color:var(--editor-border-color, #dee2e6) !important}.p-editor-container .ql-editor{color:var(--editor-color) !important;background:var(--editor-background) !important}.p-editor-container .ql-snow.ql-toolbar button.ql-active .ql-stroke{color:var(--editor-active) !important;stroke:var(--editor-active) !important}.p-editor-container .ql-snow.ql-toolbar button.ql-active .ql-fill{fill:var(--editor-active) !important}.p-editor-container .ql-fill{fill:var(--editor-toolbar-color) !important}.p-editor-container .ql-stroke{stroke:var(--editor-toolbar-color) !important}.p-editor-container .ql-picker-label{color:var(--editor-toolbar-color) !important}
|
package/box/_box.scss
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--box-size-5: 5%;
|
|
3
|
+
--box-size-10: 10%;
|
|
4
|
+
--box-size-12-5: 12.5%;
|
|
5
|
+
--box-size-15: 15%;
|
|
6
|
+
--box-size-17-5: 17.5%;
|
|
7
|
+
--box-size-20: 20%;
|
|
8
|
+
--box-size-22-5: 25.5%;
|
|
9
|
+
--box-size-25: 25%;
|
|
10
|
+
--box-size-30: 30%;
|
|
11
|
+
--box-size-33: 33.3333%;
|
|
12
|
+
--box-size-35: 35%;
|
|
13
|
+
--box-size-40: 40%;
|
|
14
|
+
--box-size-45: 45%;
|
|
15
|
+
--box-size-50: 50%;
|
|
16
|
+
--box-size-55: 55%;
|
|
17
|
+
--box-size-60: 60%;
|
|
18
|
+
--box-size-65: 65%;
|
|
19
|
+
--box-size-70: 70%;
|
|
20
|
+
--box-size-75: 75%;
|
|
21
|
+
--box-size-80: 80%;
|
|
22
|
+
--box-size-85: 85%;
|
|
23
|
+
--box-size-90: 90%;
|
|
24
|
+
--box-size-95: 95%;
|
|
25
|
+
--box-size-100: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
$box-sizes: (
|
|
29
|
+
'5': 5%,
|
|
30
|
+
'10': 10%,
|
|
31
|
+
'12-5':12.5%,
|
|
32
|
+
'15': 15%,
|
|
33
|
+
'17-5':17.5%,
|
|
34
|
+
'20': 20%,
|
|
35
|
+
'22-5':25.5%,
|
|
36
|
+
'25': 25%,
|
|
37
|
+
'30': 30%,
|
|
38
|
+
'33': 33%,
|
|
39
|
+
'35': 35%,
|
|
40
|
+
'40': 40%,
|
|
41
|
+
'45': 45%,
|
|
42
|
+
'50': 50%,
|
|
43
|
+
'55': 55%,
|
|
44
|
+
'60': 60%,
|
|
45
|
+
'65': 65%,
|
|
46
|
+
'70': 70%,
|
|
47
|
+
'75': 75%,
|
|
48
|
+
'80': 80%,
|
|
49
|
+
'85': 85%,
|
|
50
|
+
'90': 90%,
|
|
51
|
+
'95': 95%,
|
|
52
|
+
'100': 100%
|
|
53
|
+
) !default;
|
|
54
|
+
|
|
55
|
+
$box-space-margin: .5rem !default;
|
|
56
|
+
$box-space-padding: .5rem !default;
|
|
57
|
+
|
|
58
|
+
.box {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-wrap: wrap;
|
|
61
|
+
position: relative;
|
|
62
|
+
|
|
63
|
+
@each $key, $value in $box-sizes {
|
|
64
|
+
&.box-size-#{$key} {
|
|
65
|
+
width: calc(var(--box-size-#{$key}, #{$value}) - #{$box-space-margin});
|
|
66
|
+
margin: #{$box-space-margin} calc(#{$box-space-margin} / 2);
|
|
67
|
+
padding: #{$box-space-padding};
|
|
68
|
+
|
|
69
|
+
@media (max-width: 576px) {
|
|
70
|
+
width: calc(100% - #{$box-space-margin});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.box-direction-row {
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.box-direction-column {
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
package/box/index.cjs.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=require("react"),e=require("primereact/utils");exports.Box=({children:r,...s})=>{const t={size:`box-size-${s.size??"100"}`,direction:`box-direction-${s.direction??"row"}`,justify:void 0===s.justify?"":Array.isArray(s.justify)?s.justify?.join(" "):s.justify,align:void 0===s.align?"":Array.isArray(s.align)?s.align?.join(" "):s.align},a={className:e.classNames(["box",s.className??"",t.size,t.direction,t.justify,t.align]),style:s.css};return i.createElement("div",{...a},r)};
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/box/box.tsx"],"sourcesContent":["import { BoxProps } from \"./types\";\r\nimport React, { HTMLAttributes } from \"react\";\r\nimport { classNames } from \"primereact/utils\";\r\n\r\n/**\r\n * Componente - `Box`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar seções ou caixas em uma página.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n *\r\n * Exemplo de uso:\r\n * ```tsx\r\n * <Box align=\"align-items-center\"\r\n * justify=\"justify-content-end\"\r\n * size=\"25\">\r\n * ...conteúdo HTML\r\n * </Box>\r\n * ```\r\n */\r\nexport const Box = ({ children, ...props }: BoxProps) => {\r\n const css = {\r\n size: `box-size-${(props.size ?? \"100\")}`,\r\n direction: `box-direction-${props.direction ?? \"row\"}`,\r\n justify: props.justify === undefined ? \"\" : Array.isArray(props.justify) ? props.justify?.join(\" \") : props.justify,\r\n align: props.align === undefined ? \"\" : Array.isArray(props.align) ? props.align?.join(\" \") : props.align\r\n };\r\n\r\n const attr: HTMLAttributes<\"div\"> & Omit<BoxProps, \"children\"> = {\r\n className: classNames([\r\n \"box\",\r\n props.className ?? \"\",\r\n css.size,\r\n css.direction,\r\n css.justify,\r\n css.align\r\n ]),\r\n style: props.css\r\n };\r\n\r\n return (\r\n <div {...attr as any}>{children}</div>\r\n );\r\n};"],"names":["children","props","css","size","direction","justify","undefined","Array","isArray","join","align","attr","className","classNames","style","React","createElement"],"mappings":"8EAmBmB,EAAGA,cAAaC,MAC/B,MAAMC,EAAM,CACRC,KAAM,YAAaF,EAAME,MAAQ,QACjCC,UAAW,iBAAiBH,EAAMG,WAAa,QAC/CC,aAA2BC,IAAlBL,EAAMI,QAAwB,GAAKE,MAAMC,QAAQP,EAAMI,SAAWJ,EAAMI,SAASI,KAAK,KAAOR,EAAMI,QAC5GK,WAAuBJ,IAAhBL,EAAMS,MAAsB,GAAKH,MAAMC,QAAQP,EAAMS,OAAST,EAAMS,OAAOD,KAAK,KAAOR,EAAMS,OAGlGC,EAA2D,CAC7DC,UAAWC,EAAAA,WAAW,CAClB,MACAZ,EAAMW,WAAa,GACnBV,EAAIC,KACJD,EAAIE,UACJF,EAAIG,QACJH,EAAIQ,QAERI,MAAOb,EAAMC,KAGjB,OACIa,EAASC,cAAA,MAAA,IAAAL,GAAcX,EACzB"}
|
package/box/index.d.ts
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Realiza o mapeamento dos valores da propriedades css `align-items`
|
|
5
|
+
*/
|
|
6
|
+
type AlignItemsProps =
|
|
7
|
+
| "align-items-start"
|
|
8
|
+
| "align-items-end"
|
|
9
|
+
| "align-items-center"
|
|
10
|
+
| "align-items-baseline"
|
|
11
|
+
| "align-items-stretch"
|
|
12
|
+
| "align-items-sm-start"
|
|
13
|
+
| "align-items-sm-end"
|
|
14
|
+
| "align-items-sm-center"
|
|
15
|
+
| "align-items-sm-baseline"
|
|
16
|
+
| "align-items-sm-stretch"
|
|
17
|
+
| "align-items-md-start"
|
|
18
|
+
| "align-items-md-end"
|
|
19
|
+
| "align-items-md-center"
|
|
20
|
+
| "align-items-md-baseline"
|
|
21
|
+
| "align-items-md-stretch"
|
|
22
|
+
| "align-items-lg-start"
|
|
23
|
+
| "align-items-lg-end"
|
|
24
|
+
| "align-items-lg-center"
|
|
25
|
+
| "align-items-lg-baseline"
|
|
26
|
+
| "align-items-lg-stretch"
|
|
27
|
+
| "align-items-xl-start"
|
|
28
|
+
| "align-items-xl-end"
|
|
29
|
+
| "align-items-xl-center"
|
|
30
|
+
| "align-items-xl-baseline"
|
|
31
|
+
| "align-items-xl-stretch"
|
|
32
|
+
| "align-items-xxl-start"
|
|
33
|
+
| "align-items-xxl-end"
|
|
34
|
+
| "align-items-xxl-center"
|
|
35
|
+
| "align-items-xxl-baseline"
|
|
36
|
+
| "align-items-xxl-stretch"
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Realiza o mapeamento dos valores da propriedades css `justify-content`
|
|
40
|
+
*/
|
|
41
|
+
type JustifyContentProps =
|
|
42
|
+
| "justify-content-start"
|
|
43
|
+
| "justify-content-end"
|
|
44
|
+
| "justify-content-center"
|
|
45
|
+
| "justify-content-between"
|
|
46
|
+
| "justify-content-around"
|
|
47
|
+
| "justify-content-evenly"
|
|
48
|
+
| "justify-content-sm-start"
|
|
49
|
+
| "justify-content-sm-end"
|
|
50
|
+
| "justify-content-sm-center"
|
|
51
|
+
| "justify-content-sm-between"
|
|
52
|
+
| "justify-content-sm-around"
|
|
53
|
+
| "justify-content-sm-evenly"
|
|
54
|
+
| "justify-content-md-start"
|
|
55
|
+
| "justify-content-md-end"
|
|
56
|
+
| "justify-content-md-center"
|
|
57
|
+
| "justify-content-md-between"
|
|
58
|
+
| "justify-content-md-around"
|
|
59
|
+
| "justify-content-md-evenly"
|
|
60
|
+
| "justify-content-lg-start"
|
|
61
|
+
| "justify-content-lg-end"
|
|
62
|
+
| "justify-content-lg-center"
|
|
63
|
+
| "justify-content-lg-between"
|
|
64
|
+
| "justify-content-lg-around"
|
|
65
|
+
| "justify-content-lg-evenly"
|
|
66
|
+
| "justify-content-xl-start"
|
|
67
|
+
| "justify-content-xl-end"
|
|
68
|
+
| "justify-content-xl-center"
|
|
69
|
+
| "justify-content-xl-between"
|
|
70
|
+
| "justify-content-xl-around"
|
|
71
|
+
| "justify-content-xl-evenly"
|
|
72
|
+
| "justify-content-xxl-start"
|
|
73
|
+
| "justify-content-xxl-end"
|
|
74
|
+
| "justify-content-xxl-center"
|
|
75
|
+
| "justify-content-xxl-between"
|
|
76
|
+
| "justify-content-xxl-around"
|
|
77
|
+
| "justify-content-xxl-evenly"
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Define as tipagens `default` de todos os componentes do pacote
|
|
81
|
+
*/
|
|
82
|
+
interface ApiComponentProps {
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Adiciona no atributo `class` do componente o valor atribuido nessa propriedade
|
|
86
|
+
*/
|
|
87
|
+
className?: string
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Define o tamanho da box do componente de acordo com o valores abaixo
|
|
91
|
+
*/
|
|
92
|
+
size?: "5" | "10" | "12-5" | "15" | "17-5" | "20" | "22-5" | "25" | "30" | "33" | "35" | "40" | "45" | "50" | "55" | "60" | "65" | "70" | "75" | "80" | "85" | "90" | "95" | "100"
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Define as propriedades css do component `style`
|
|
96
|
+
*/
|
|
97
|
+
css?: CSSProperties
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface BoxProps extends ApiComponentProps {
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A propriedade `direction` determina o valor do estilo CSS `flex-direction`,
|
|
104
|
+
* definindo a direção em que os itens flexíveis são dispostos dentro de um contêiner flexível.
|
|
105
|
+
*/
|
|
106
|
+
direction?: "row" | "column"
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* A propriedade `align` determina o alinhamento do conteúdo base na propriedade `direction`.
|
|
110
|
+
* Essa propriedade ajusta os estilos CSS `align-items`, permitindo um controle preciso do layout.
|
|
111
|
+
*/
|
|
112
|
+
align?: AlignItemsProps | AlignItemsProps[]
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* A propriedade `justify` determina o alinhamento do conteúdo base na propriedade `direction`.
|
|
116
|
+
* Essa propriedade ajusta os estilos CSS `justify-content`, permitindo um controle preciso do layout.
|
|
117
|
+
*/
|
|
118
|
+
justify?: JustifyContentProps | JustifyContentProps[]
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* A propriedade `children` representa o conteúdo ou elementos filho que serão
|
|
122
|
+
* renderizados dentro deste componente. Pode incluir texto, elementos React,
|
|
123
|
+
* ou até mesmo outros componentes.
|
|
124
|
+
*/
|
|
125
|
+
children: React.ReactNode
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Componente - `Box`
|
|
130
|
+
*
|
|
131
|
+
* Um componente versátil que pode ser utilizado para criar seções ou caixas em uma página.
|
|
132
|
+
* Permite personalizar o estilo e o conteúdo através de propriedades.
|
|
133
|
+
*
|
|
134
|
+
* Exemplo de uso:
|
|
135
|
+
* ```tsx
|
|
136
|
+
* <Box align="align-items-center"
|
|
137
|
+
* justify="justify-content-end"
|
|
138
|
+
* size="25">
|
|
139
|
+
* ...conteúdo HTML
|
|
140
|
+
* </Box>
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
declare const Box: ({ children, ...props }: BoxProps) => React.JSX.Element;
|
|
144
|
+
|
|
145
|
+
type IBoxProps = BoxProps;
|
|
146
|
+
|
|
147
|
+
export { Box, type IBoxProps };
|
package/box/index.esm.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import i from"react";import{classNames as r}from"primereact/utils";const s=({children:s,...t})=>{const e={size:`box-size-${t.size??"100"}`,direction:`box-direction-${t.direction??"row"}`,justify:void 0===t.justify?"":Array.isArray(t.justify)?t.justify?.join(" "):t.justify,align:void 0===t.align?"":Array.isArray(t.align)?t.align?.join(" "):t.align},o={className:r(["box",t.className??"",e.size,e.direction,e.justify,e.align]),style:t.css};return i.createElement("div",{...o},s)};export{s as Box};
|
|
2
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/box/box.tsx"],"sourcesContent":["import { BoxProps } from \"./types\";\r\nimport React, { HTMLAttributes } from \"react\";\r\nimport { classNames } from \"primereact/utils\";\r\n\r\n/**\r\n * Componente - `Box`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar seções ou caixas em uma página.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n *\r\n * Exemplo de uso:\r\n * ```tsx\r\n * <Box align=\"align-items-center\"\r\n * justify=\"justify-content-end\"\r\n * size=\"25\">\r\n * ...conteúdo HTML\r\n * </Box>\r\n * ```\r\n */\r\nexport const Box = ({ children, ...props }: BoxProps) => {\r\n const css = {\r\n size: `box-size-${(props.size ?? \"100\")}`,\r\n direction: `box-direction-${props.direction ?? \"row\"}`,\r\n justify: props.justify === undefined ? \"\" : Array.isArray(props.justify) ? props.justify?.join(\" \") : props.justify,\r\n align: props.align === undefined ? \"\" : Array.isArray(props.align) ? props.align?.join(\" \") : props.align\r\n };\r\n\r\n const attr: HTMLAttributes<\"div\"> & Omit<BoxProps, \"children\"> = {\r\n className: classNames([\r\n \"box\",\r\n props.className ?? \"\",\r\n css.size,\r\n css.direction,\r\n css.justify,\r\n css.align\r\n ]),\r\n style: props.css\r\n };\r\n\r\n return (\r\n <div {...attr as any}>{children}</div>\r\n );\r\n};"],"names":["Box","children","props","css","size","direction","justify","undefined","Array","isArray","join","align","attr","className","classNames","style","React","createElement"],"mappings":"mEAmBO,MAAMA,EAAM,EAAGC,cAAaC,MAC/B,MAAMC,EAAM,CACRC,KAAM,YAAaF,EAAME,MAAQ,QACjCC,UAAW,iBAAiBH,EAAMG,WAAa,QAC/CC,aAA2BC,IAAlBL,EAAMI,QAAwB,GAAKE,MAAMC,QAAQP,EAAMI,SAAWJ,EAAMI,SAASI,KAAK,KAAOR,EAAMI,QAC5GK,WAAuBJ,IAAhBL,EAAMS,MAAsB,GAAKH,MAAMC,QAAQP,EAAMS,OAAST,EAAMS,OAAOD,KAAK,KAAOR,EAAMS,OAGlGC,EAA2D,CAC7DC,UAAWC,EAAW,CAClB,MACAZ,EAAMW,WAAa,GACnBV,EAAIC,KACJD,EAAIE,UACJF,EAAIG,QACJH,EAAIQ,QAERI,MAAOb,EAAMC,KAGjB,OACIa,EAASC,cAAA,MAAA,IAAAL,GAAcX,EACzB"}
|
package/box/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
$input-bg: #fff !default;
|
|
2
|
+
$input-color: #555 !default;
|
|
3
|
+
$input-border-color: #dee2e6 !default;
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--editor-border-color: #{$input-border-color};
|
|
7
|
+
--editor-background: #{$input-bg};
|
|
8
|
+
--editor-color: #{$input-color};
|
|
9
|
+
--editor-active: var(--bs-primary, #0D6EFD);
|
|
10
|
+
--editor-toolbar: var(--bs-light, #F6F6F6);
|
|
11
|
+
--editor-toolbar-color: #6c757d;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.p-editor-container {
|
|
15
|
+
|
|
16
|
+
.p-editor-toolbar {
|
|
17
|
+
background: var(--editor-toolbar) !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ql-snow {
|
|
21
|
+
border-color: var(--editor-border-color, #{$input-border-color}) !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//Altera a cor de fundo do palco e cor da fonte
|
|
25
|
+
.ql-editor {
|
|
26
|
+
color: var(--editor-color) !important;
|
|
27
|
+
background: var(--editor-background) !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//Modifica a cor das opções ativas
|
|
31
|
+
.ql-snow.ql-toolbar button.ql-active {
|
|
32
|
+
.ql-stroke {
|
|
33
|
+
color: var(--editor-active) !important;
|
|
34
|
+
stroke: var(--editor-active) !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ql-fill {
|
|
38
|
+
fill: var(--editor-active) !important;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ql-fill {
|
|
43
|
+
fill: var(--editor-toolbar-color) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ql-stroke {
|
|
47
|
+
stroke: var(--editor-toolbar-color) !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ql-picker-label {
|
|
51
|
+
color: var(--editor-toolbar-color) !important;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react"),a=require("primereact/utils"),i=require("primereact/editor");const t=({children:i,...t})=>{const l={size:`box-size-${t.size??"100"}`,direction:`box-direction-${t.direction??"row"}`,justify:void 0===t.justify?"":Array.isArray(t.justify)?t.justify?.join(" "):t.justify,align:void 0===t.align?"":Array.isArray(t.align)?t.align?.join(" "):t.align},r={className:a.classNames(["box",t.className??"",l.size,l.direction,l.justify,l.align]),style:t.css};return e.createElement("div",{...r},i)};exports.Editor=({iconPrefix:a="bi bi-",module:l="complete",...r})=>e.createElement(t,{className:"p-0",size:r.size??"100"},r.label&&e.createElement("label",{className:"form-label"},r.icon&&e.createElement("i",{className:a+r.icon+" me-1"}),r.label,r.required&&e.createElement("span",{className:"text-danger"},"*")),e.createElement(i.Editor,{className:"w-100 "+(r.className??""),headerTemplate:"basic"===l?e.createElement("span",{className:"ql-formats"},e.createElement("button",{className:"ql-bold"}),e.createElement("button",{className:"ql-italic"}),e.createElement("button",{className:"ql-underline"})):void 0,name:r.name,placeholder:r.placeholder??"Digite o texto...",readOnly:r.disabled??!1,required:r.required,style:r.css,value:r.value,onTextChange:e=>r.onChange(e.htmlValue)}));
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/box/box.tsx","../../src/editor/editor.tsx"],"sourcesContent":["import { BoxProps } from \"./types\";\r\nimport React, { HTMLAttributes } from \"react\";\r\nimport { classNames } from \"primereact/utils\";\r\n\r\n/**\r\n * Componente - `Box`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar seções ou caixas em uma página.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n *\r\n * Exemplo de uso:\r\n * ```tsx\r\n * <Box align=\"align-items-center\"\r\n * justify=\"justify-content-end\"\r\n * size=\"25\">\r\n * ...conteúdo HTML\r\n * </Box>\r\n * ```\r\n */\r\nexport const Box = ({ children, ...props }: BoxProps) => {\r\n const css = {\r\n size: `box-size-${(props.size ?? \"100\")}`,\r\n direction: `box-direction-${props.direction ?? \"row\"}`,\r\n justify: props.justify === undefined ? \"\" : Array.isArray(props.justify) ? props.justify?.join(\" \") : props.justify,\r\n align: props.align === undefined ? \"\" : Array.isArray(props.align) ? props.align?.join(\" \") : props.align\r\n };\r\n\r\n const attr: HTMLAttributes<\"div\"> & Omit<BoxProps, \"children\"> = {\r\n className: classNames([\r\n \"box\",\r\n props.className ?? \"\",\r\n css.size,\r\n css.direction,\r\n css.justify,\r\n css.align\r\n ]),\r\n style: props.css\r\n };\r\n\r\n return (\r\n <div {...attr as any}>{children}</div>\r\n );\r\n};","import React from \"react\";\r\nimport { Box } from \"../box\";\r\nimport { EditorProps } from \"./types\";\r\nimport { Editor as PrimeEditor } from \"primereact/editor\";\r\n\r\n/**\r\n * Componente - `Editor`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar um palco de edição de texto.\r\n */\r\nexport const Editor = ({ iconPrefix = \"bi bi-\", module = \"complete\", ...props }: EditorProps) => {\r\n\r\n //Realiza a configuração do módulo básico do editor\r\n const moduleBasic = () => {\r\n return (\r\n <span className=\"ql-formats\">\r\n <button className=\"ql-bold\"></button>\r\n <button className=\"ql-italic\"></button>\r\n <button className=\"ql-underline\"></button>\r\n </span>\r\n );\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=\"p-0\"\r\n size={props.size ?? \"100\"}>\r\n {props.label\r\n && <label className=\"form-label\">\r\n {props.icon && <i className={(iconPrefix + props.icon) + \" me-1\"}/>}\r\n {props.label}\r\n {props.required && <span className=\"text-danger\">*</span>}\r\n </label>}\r\n <PrimeEditor className={\"w-100 \" + (props.className ?? \"\")}\r\n headerTemplate={module === \"basic\" ? moduleBasic() : undefined}\r\n name={props.name}\r\n placeholder={props.placeholder ?? \"Digite o texto...\"}\r\n readOnly={props.disabled ?? false}\r\n required={props.required}\r\n style={props.css}\r\n value={props.value}\r\n onTextChange={(e: any) => props.onChange(e.htmlValue)}/>\r\n </Box>\r\n );\r\n};"],"names":["Box","children","props","css","size","direction","justify","undefined","Array","isArray","join","align","attr","className","classNames","style","React","createElement","iconPrefix","module","label","icon","required","PrimeEditor","Editor","headerTemplate","name","placeholder","readOnly","disabled","value","onTextChange","e","onChange","htmlValue"],"mappings":"iGAmBO,MAAMA,EAAM,EAAGC,cAAaC,MAC/B,MAAMC,EAAM,CACRC,KAAM,YAAaF,EAAME,MAAQ,QACjCC,UAAW,iBAAiBH,EAAMG,WAAa,QAC/CC,aAA2BC,IAAlBL,EAAMI,QAAwB,GAAKE,MAAMC,QAAQP,EAAMI,SAAWJ,EAAMI,SAASI,KAAK,KAAOR,EAAMI,QAC5GK,WAAuBJ,IAAhBL,EAAMS,MAAsB,GAAKH,MAAMC,QAAQP,EAAMS,OAAST,EAAMS,OAAOD,KAAK,KAAOR,EAAMS,OAGlGC,EAA2D,CAC7DC,UAAWC,EAAAA,WAAW,CAClB,MACAZ,EAAMW,WAAa,GACnBV,EAAIC,KACJD,EAAIE,UACJF,EAAIG,QACJH,EAAIQ,QAERI,MAAOb,EAAMC,KAGjB,OACIa,EAASC,cAAA,MAAA,IAAAL,GAAcX,EACzB,iBC/BgB,EAAGiB,aAAa,SAAUC,SAAS,cAAejB,KAmBhEc,EAAAC,cAACjB,EAAG,CAACa,UAAU,MACVT,KAAMF,EAAME,MAAQ,OACpBF,EAAMkB,OACAJ,EAAOC,cAAA,QAAA,CAAAJ,UAAU,cACfX,EAAMmB,MAAQL,EAAAC,cAAA,IAAA,CAAGJ,UAAYK,EAAahB,EAAMmB,KAAQ,UACxDnB,EAAMkB,MACNlB,EAAMoB,UAAYN,EAAAC,cAAA,OAAA,CAAMJ,UAAU,qBAE3CG,EAAAC,cAACM,EAAWC,OAAC,CAAAX,UAAW,UAAYX,EAAMW,WAAa,IAC1CY,eAA2B,UAAXN,EAvB7BH,EAAAC,cAAA,OAAA,CAAMJ,UAAU,cACZG,EAAQC,cAAA,SAAA,CAAAJ,UAAU,YAClBG,EAAQC,cAAA,SAAA,CAAAJ,UAAU,cAClBG,EAAAC,cAAA,SAAA,CAAQJ,UAAU,uBAoB4CN,EACrDmB,KAAMxB,EAAMwB,KACZC,YAAazB,EAAMyB,aAAe,oBAClCC,SAAU1B,EAAM2B,WAAY,EAC5BP,SAAUpB,EAAMoB,SAChBP,MAAOb,EAAMC,IACb2B,MAAO5B,EAAM4B,MACbC,aAAeC,GAAW9B,EAAM+B,SAASD,EAAEE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Define as tipagens `default` de todos os componentes do pacote
|
|
5
|
+
*/
|
|
6
|
+
interface ApiComponentProps {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Adiciona no atributo `class` do componente o valor atribuido nessa propriedade
|
|
10
|
+
*/
|
|
11
|
+
className?: string
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Define o tamanho da box do componente de acordo com o valores abaixo
|
|
15
|
+
*/
|
|
16
|
+
size?: "5" | "10" | "12-5" | "15" | "17-5" | "20" | "22-5" | "25" | "30" | "33" | "35" | "40" | "45" | "50" | "55" | "60" | "65" | "70" | "75" | "80" | "85" | "90" | "95" | "100"
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Define as propriedades css do component `style`
|
|
20
|
+
*/
|
|
21
|
+
css?: CSSProperties
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Define as tipagens ´default´ de tidos os componente de entrada de dados do pacote
|
|
26
|
+
*/
|
|
27
|
+
interface ApiFieldComponentProps {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Define o nome do campo
|
|
31
|
+
*/
|
|
32
|
+
name?: string
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Define o rótulo do campo
|
|
36
|
+
*/
|
|
37
|
+
label?: string
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Define o espaço reservador do campo
|
|
41
|
+
*/
|
|
42
|
+
placeholder?: string
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Define o icone do campo
|
|
46
|
+
*/
|
|
47
|
+
icon?: string
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Define o prefixo dos icones do pacote
|
|
51
|
+
*/
|
|
52
|
+
iconPrefix?: "bi bi-" | "pi pi-"
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Define se campo é obrigatório
|
|
56
|
+
*/
|
|
57
|
+
required?: boolean
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Desabilita a entrada de dados no campo
|
|
61
|
+
*/
|
|
62
|
+
disabled?: boolean
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface EditorProps extends ApiComponentProps, ApiFieldComponentProps {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Define o valor de entrada do campo
|
|
69
|
+
*/
|
|
70
|
+
value: any
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Atualiza state com valor digitado no campo
|
|
74
|
+
*/
|
|
75
|
+
onChange(value: any): void
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Define o tipo de editor de texto que será renderizado
|
|
79
|
+
*/
|
|
80
|
+
module?: "basic" | "complete"
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Componente - `Editor`
|
|
85
|
+
*
|
|
86
|
+
* Um componente versátil que pode ser utilizado para criar um palco de edição de texto.
|
|
87
|
+
*/
|
|
88
|
+
declare const Editor: ({ iconPrefix, module, ...props }: EditorProps) => React.JSX.Element;
|
|
89
|
+
|
|
90
|
+
type IEditorProps = EditorProps;
|
|
91
|
+
|
|
92
|
+
export { Editor, type IEditorProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"react";import{classNames as a}from"primereact/utils";import{Editor as t}from"primereact/editor";const i=({children:t,...i})=>{const l={size:`box-size-${i.size??"100"}`,direction:`box-direction-${i.direction??"row"}`,justify:void 0===i.justify?"":Array.isArray(i.justify)?i.justify?.join(" "):i.justify,align:void 0===i.align?"":Array.isArray(i.align)?i.align?.join(" "):i.align},r={className:a(["box",i.className??"",l.size,l.direction,l.justify,l.align]),style:i.css};return e.createElement("div",{...r},t)},l=({iconPrefix:a="bi bi-",module:l="complete",...r})=>e.createElement(i,{className:"p-0",size:r.size??"100"},r.label&&e.createElement("label",{className:"form-label"},r.icon&&e.createElement("i",{className:a+r.icon+" me-1"}),r.label,r.required&&e.createElement("span",{className:"text-danger"},"*")),e.createElement(t,{className:"w-100 "+(r.className??""),headerTemplate:"basic"===l?e.createElement("span",{className:"ql-formats"},e.createElement("button",{className:"ql-bold"}),e.createElement("button",{className:"ql-italic"}),e.createElement("button",{className:"ql-underline"})):void 0,name:r.name,placeholder:r.placeholder??"Digite o texto...",readOnly:r.disabled??!1,required:r.required,style:r.css,value:r.value,onTextChange:e=>r.onChange(e.htmlValue)}));export{l as Editor};
|
|
2
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/box/box.tsx","../../src/editor/editor.tsx"],"sourcesContent":["import { BoxProps } from \"./types\";\r\nimport React, { HTMLAttributes } from \"react\";\r\nimport { classNames } from \"primereact/utils\";\r\n\r\n/**\r\n * Componente - `Box`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar seções ou caixas em uma página.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n *\r\n * Exemplo de uso:\r\n * ```tsx\r\n * <Box align=\"align-items-center\"\r\n * justify=\"justify-content-end\"\r\n * size=\"25\">\r\n * ...conteúdo HTML\r\n * </Box>\r\n * ```\r\n */\r\nexport const Box = ({ children, ...props }: BoxProps) => {\r\n const css = {\r\n size: `box-size-${(props.size ?? \"100\")}`,\r\n direction: `box-direction-${props.direction ?? \"row\"}`,\r\n justify: props.justify === undefined ? \"\" : Array.isArray(props.justify) ? props.justify?.join(\" \") : props.justify,\r\n align: props.align === undefined ? \"\" : Array.isArray(props.align) ? props.align?.join(\" \") : props.align\r\n };\r\n\r\n const attr: HTMLAttributes<\"div\"> & Omit<BoxProps, \"children\"> = {\r\n className: classNames([\r\n \"box\",\r\n props.className ?? \"\",\r\n css.size,\r\n css.direction,\r\n css.justify,\r\n css.align\r\n ]),\r\n style: props.css\r\n };\r\n\r\n return (\r\n <div {...attr as any}>{children}</div>\r\n );\r\n};","import React from \"react\";\r\nimport { Box } from \"../box\";\r\nimport { EditorProps } from \"./types\";\r\nimport { Editor as PrimeEditor } from \"primereact/editor\";\r\n\r\n/**\r\n * Componente - `Editor`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar um palco de edição de texto.\r\n */\r\nexport const Editor = ({ iconPrefix = \"bi bi-\", module = \"complete\", ...props }: EditorProps) => {\r\n\r\n //Realiza a configuração do módulo básico do editor\r\n const moduleBasic = () => {\r\n return (\r\n <span className=\"ql-formats\">\r\n <button className=\"ql-bold\"></button>\r\n <button className=\"ql-italic\"></button>\r\n <button className=\"ql-underline\"></button>\r\n </span>\r\n );\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=\"p-0\"\r\n size={props.size ?? \"100\"}>\r\n {props.label\r\n && <label className=\"form-label\">\r\n {props.icon && <i className={(iconPrefix + props.icon) + \" me-1\"}/>}\r\n {props.label}\r\n {props.required && <span className=\"text-danger\">*</span>}\r\n </label>}\r\n <PrimeEditor className={\"w-100 \" + (props.className ?? \"\")}\r\n headerTemplate={module === \"basic\" ? moduleBasic() : undefined}\r\n name={props.name}\r\n placeholder={props.placeholder ?? \"Digite o texto...\"}\r\n readOnly={props.disabled ?? false}\r\n required={props.required}\r\n style={props.css}\r\n value={props.value}\r\n onTextChange={(e: any) => props.onChange(e.htmlValue)}/>\r\n </Box>\r\n );\r\n};"],"names":["Box","children","props","css","size","direction","justify","undefined","Array","isArray","join","align","attr","className","classNames","style","React","createElement","Editor","iconPrefix","module","label","icon","required","PrimeEditor","headerTemplate","name","placeholder","readOnly","disabled","value","onTextChange","e","onChange","htmlValue"],"mappings":"8GAmBO,MAAMA,EAAM,EAAGC,cAAaC,MAC/B,MAAMC,EAAM,CACRC,KAAM,YAAaF,EAAME,MAAQ,QACjCC,UAAW,iBAAiBH,EAAMG,WAAa,QAC/CC,aAA2BC,IAAlBL,EAAMI,QAAwB,GAAKE,MAAMC,QAAQP,EAAMI,SAAWJ,EAAMI,SAASI,KAAK,KAAOR,EAAMI,QAC5GK,WAAuBJ,IAAhBL,EAAMS,MAAsB,GAAKH,MAAMC,QAAQP,EAAMS,OAAST,EAAMS,OAAOD,KAAK,KAAOR,EAAMS,OAGlGC,EAA2D,CAC7DC,UAAWC,EAAW,CAClB,MACAZ,EAAMW,WAAa,GACnBV,EAAIC,KACJD,EAAIE,UACJF,EAAIG,QACJH,EAAIQ,QAERI,MAAOb,EAAMC,KAGjB,OACIa,EAASC,cAAA,MAAA,IAAAL,GAAcX,EACzB,EC/BOiB,EAAS,EAAGC,aAAa,SAAUC,SAAS,cAAelB,KAmBhEc,EAAAC,cAACjB,EAAG,CAACa,UAAU,MACVT,KAAMF,EAAME,MAAQ,OACpBF,EAAMmB,OACAL,EAAOC,cAAA,QAAA,CAAAJ,UAAU,cACfX,EAAMoB,MAAQN,EAAAC,cAAA,IAAA,CAAGJ,UAAYM,EAAajB,EAAMoB,KAAQ,UACxDpB,EAAMmB,MACNnB,EAAMqB,UAAYP,EAAAC,cAAA,OAAA,CAAMJ,UAAU,qBAE3CG,EAAAC,cAACO,EAAY,CAAAX,UAAW,UAAYX,EAAMW,WAAa,IAC1CY,eAA2B,UAAXL,EAvB7BJ,EAAAC,cAAA,OAAA,CAAMJ,UAAU,cACZG,EAAQC,cAAA,SAAA,CAAAJ,UAAU,YAClBG,EAAQC,cAAA,SAAA,CAAAJ,UAAU,cAClBG,EAAAC,cAAA,SAAA,CAAQJ,UAAU,uBAoB4CN,EACrDmB,KAAMxB,EAAMwB,KACZC,YAAazB,EAAMyB,aAAe,oBAClCC,SAAU1B,EAAM2B,WAAY,EAC5BN,SAAUrB,EAAMqB,SAChBR,MAAOb,EAAMC,IACb2B,MAAO5B,EAAM4B,MACbC,aAAeC,GAAW9B,EAAM+B,SAASD,EAAEE"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
"name": "@orangesix/react",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"author": "Luiz Fernando Bernardes de Paula",
|
|
6
|
+
"description": "Set of components and functions available to be used in a React project.",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/Nandovga/orangesix-react.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Nandovga/orangesix-react/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"react",
|
|
17
|
+
"ui-kit",
|
|
18
|
+
"ui library",
|
|
19
|
+
"primereact",
|
|
20
|
+
"component library"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"axios": "^1.7.2",
|
|
24
|
+
"bootstrap": "^5.3.3",
|
|
25
|
+
"bootstrap-icons": "^1.11.3",
|
|
26
|
+
"jquery": "^3.7.1",
|
|
27
|
+
"node-snackbar": "^0.1.16",
|
|
28
|
+
"primeicons": "^7.0.0",
|
|
29
|
+
"primereact": "^10.8.2",
|
|
30
|
+
"quill": "^2.0.2",
|
|
31
|
+
"react": "^18.3.1",
|
|
32
|
+
"react-dom": "^18.3.1",
|
|
33
|
+
"sweetalert2": "^11.12.3"
|
|
25
34
|
}
|
|
35
|
+
}
|