@orangesix/react 1.0.7 → 1.0.10
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 +1 -1
- package/api/index.cjs.js.map +1 -1
- package/api/index.d.ts +140 -2
- package/api/index.esm.js +1 -1
- package/api/index.esm.js.map +1 -1
- package/api/theme.css +1 -1
- package/box/_box.scss +1 -1
- package/box/index.cjs.js +1 -1
- package/box/index.cjs.js.map +1 -1
- package/box/index.d.ts +6 -3
- package/box/index.esm.js +1 -1
- package/box/index.esm.js.map +1 -1
- package/editor/_editor.scss +98 -35
- package/editor/index.cjs.js +1 -1
- package/editor/index.cjs.js.map +1 -1
- package/editor/index.d.ts +25 -11
- package/editor/index.esm.js +1 -1
- package/editor/index.esm.js.map +1 -1
- package/inputfilter/_inputfilter.scss +64 -0
- package/inputfilter/index.cjs.js +2 -0
- package/inputfilter/index.cjs.js.map +1 -0
- package/inputfilter/index.d.ts +161 -0
- package/inputfilter/index.esm.js +2 -0
- package/inputfilter/index.esm.js.map +1 -0
- package/inputfilter/package.json +5 -0
- package/package.json +13 -4
- package/table/index.cjs.js +1 -1
- package/table/index.cjs.js.map +1 -1
- package/table/index.d.ts +56 -52
- package/table/index.esm.js +1 -1
- package/table/index.esm.js.map +1 -1
- package/tablepivot/_tablepivot.scss +101 -0
- package/tablepivot/index.cjs.js +2 -0
- package/tablepivot/index.cjs.js.map +1 -0
- package/tablepivot/index.d.ts +256 -0
- package/tablepivot/index.esm.js +2 -0
- package/tablepivot/index.esm.js.map +1 -0
- package/tablepivot/package.json +5 -0
- package/utils/index.cjs.js +1 -1
- package/utils/index.cjs.js.map +1 -1
- package/utils/index.d.ts +25 -1
- package/utils/index.esm.js +1 -1
- package/utils/index.esm.js.map +1 -1
package/api/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react");exports.InputLabel=({iconPrefix:a="bi bi-",...r})=>r.label&&e.createElement("p",{className:"form-label"},r.icon&&e.createElement("i",{className:a+r.icon+" me-1"}),r.label,r.required&&e.createElement("span",{className:"text-danger"},"*"));
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/api/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/api/input.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { ApiFieldComponentProps } from \"./types\";\r\n\r\n/**\r\n * API - `InputLabel`\r\n *\r\n * Um componente utilizado como label em todos os componente de campo do pacote.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n */\r\nexport const InputLabel = ({ iconPrefix = \"bi bi-\", ...props }: ApiFieldComponentProps) => {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return props.label\r\n && <p 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 </p>;\r\n};"],"names":["iconPrefix","props","label","React","createElement","className","icon","required"],"mappings":"uDAS0B,EAAGA,aAAa,YAAaC,KAM5CA,EAAMC,OACNC,EAAGC,cAAA,IAAA,CAAAC,UAAU,cACXJ,EAAMK,MAAQH,EAAAC,cAAA,IAAA,CAAGC,UAAWL,EAAaC,EAAMK,KAAO,UACtDL,EAAMC,MACND,EAAMM,UAAYJ,EAAAC,cAAA,OAAA,CAAMC,UAAU,eAAsB"}
|
package/api/index.d.ts
CHANGED
|
@@ -1,10 +1,91 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
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
|
+
|
|
3
79
|
/**
|
|
4
80
|
* Define as tipagens `default` de todos os componentes do pacote
|
|
5
81
|
*/
|
|
6
82
|
interface ApiComponentProps {
|
|
7
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Propriedade para identificar o id do elemento
|
|
86
|
+
*/
|
|
87
|
+
id?: string
|
|
88
|
+
|
|
8
89
|
/**
|
|
9
90
|
* Adiciona no atributo `class` do componente o valor atribuido nessa propriedade
|
|
10
91
|
*/
|
|
@@ -19,8 +100,65 @@ interface ApiComponentProps {
|
|
|
19
100
|
* Define as propriedades css do component `style`
|
|
20
101
|
*/
|
|
21
102
|
css?: CSSProperties
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Define as tipagens ´default´ de tidos os componente de entrada de dados do pacote
|
|
107
|
+
*/
|
|
108
|
+
interface ApiFieldComponentProps {
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Define o id do campo
|
|
112
|
+
*/
|
|
113
|
+
id?: string
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Define o nome do campo
|
|
117
|
+
*/
|
|
118
|
+
name?: string
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Define o rótulo do campo
|
|
122
|
+
*/
|
|
123
|
+
label?: string
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Define o espaço reservador do campo
|
|
127
|
+
*/
|
|
128
|
+
placeholder?: string
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Define o icone do campo
|
|
132
|
+
*/
|
|
133
|
+
icon?: string
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Define o prefixo dos icones do pacote
|
|
137
|
+
*/
|
|
138
|
+
iconPrefix?: "bi bi-" | "pi pi-"
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Define se campo é obrigatório
|
|
142
|
+
*/
|
|
143
|
+
required?: boolean
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Desabilita a entrada de dados no campo
|
|
147
|
+
*/
|
|
148
|
+
disabled?: boolean
|
|
22
149
|
}
|
|
23
150
|
|
|
151
|
+
/**
|
|
152
|
+
* API - `InputLabel`
|
|
153
|
+
*
|
|
154
|
+
* Um componente utilizado como label em todos os componente de campo do pacote.
|
|
155
|
+
* Permite personalizar o estilo e o conteúdo através de propriedades.
|
|
156
|
+
*/
|
|
157
|
+
declare const InputLabel: ({ iconPrefix, ...props }: ApiFieldComponentProps) => "" | React.JSX.Element | undefined;
|
|
158
|
+
|
|
159
|
+
type IAlignItemsProps = AlignItemsProps;
|
|
24
160
|
type IAPIComponentProps = ApiComponentProps;
|
|
161
|
+
type IJustifyContentProps = JustifyContentProps;
|
|
162
|
+
type IApiFieldComponentProps = ApiFieldComponentProps;
|
|
25
163
|
|
|
26
|
-
export type
|
|
164
|
+
export { type IAPIComponentProps, type IAlignItemsProps, type IApiFieldComponentProps, type IJustifyContentProps, InputLabel };
|
package/api/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import e from"react";const a=({iconPrefix:a="bi bi-",...l})=>l.label&&e.createElement("p",{className:"form-label"},l.icon&&e.createElement("i",{className:a+l.icon+" me-1"}),l.label,l.required&&e.createElement("span",{className:"text-danger"},"*"));export{a as InputLabel};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/api/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/api/input.tsx"],"sourcesContent":["import React from \"react\";\r\nimport { ApiFieldComponentProps } from \"./types\";\r\n\r\n/**\r\n * API - `InputLabel`\r\n *\r\n * Um componente utilizado como label em todos os componente de campo do pacote.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n */\r\nexport const InputLabel = ({ iconPrefix = \"bi bi-\", ...props }: ApiFieldComponentProps) => {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return props.label\r\n && <p 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 </p>;\r\n};"],"names":["InputLabel","iconPrefix","props","label","React","createElement","className","icon","required"],"mappings":"qBASO,MAAMA,EAAa,EAAGC,aAAa,YAAaC,KAM5CA,EAAMC,OACNC,EAAGC,cAAA,IAAA,CAAAC,UAAU,cACXJ,EAAMK,MAAQH,EAAAC,cAAA,IAAA,CAAGC,UAAWL,EAAaC,EAAMK,KAAO,UACtDL,EAAMC,MACND,EAAMM,UAAYJ,EAAAC,cAAA,OAAA,CAAMC,UAAU,eAAsB"}
|
package/api/theme.css
CHANGED
|
@@ -1 +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}
|
|
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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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:calc(.5rem / 2) 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-font-size: 1em;--editor-border-radius: 3px;--editor-background: transparent;--editor-border-color: var(--bs-gray-500, #adb5bd);--editor-menu-font-size: 1.2em;--editor-active-menu-color: var(--bs-primary, #0D6EFD)}.editor-container{position:relative;width:100%;display:flex;flex-wrap:wrap;border-radius:var(--editor-border-radius);border:1px solid var(--editor-border-color)}.editor-container .editor{width:100%;font-size:var(--editor-font-size);background:var(--editor-background)}.editor-container .editor-menu{overflow-x:auto;display:flex;width:100%;padding:2.5px;align-items:center;border-bottom:1px solid var(--editor-border-color)}.editor-container .editor-menu-group{display:flex;margin:auto 10px}.editor-container .editor-menu-item{margin:auto 5px;font-size:var(--editor-menu-font-size)}.editor-container .editor-menu-item.active{color:var(--editor-active-menu-color)}.editor-container .editor-menu::-webkit-scrollbar{height:2px;width:0;background:transparent}.editor-container .editor-menu::-webkit-scrollbar-thumb{border-radius:5px;background:var(--editor-border-color);border:none}.editor-container .editor-link{display:flex;min-width:300px;z-index:5000;align-items:center;top:45px;left:10px;border:1px solid #f1f1f1;border-radius:3px;padding:10px;background:#fff;position:absolute}.editor-container .editor-image{margin-top:3px;position:relative}.editor-container .editor-image input{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0}.editor-container .tiptap{flex:1;padding:10px}.editor-container .tiptap a{color:var(--bs-primary);text-decoration:underline solid var(--bs-primary)}.editor-container .tiptap code{background:#f0f0f0;border-bottom:3px;padding:2px 4px;font-size:85%}.editor-container .tiptap img{max-width:100%}.editor-container .tiptap.ProseMirror-focused{border-radius:var(--editor-border-radius, 3px);outline:none !important}:root{--table-pivot-toolbar-font-size: .9em;--table-pivot-border-radius: 5px;--table-pivot-border-color: var(--bs-gray-300, #e5e5e5);--table-pivot-background: var(--bs-white, #fff);--table-pivot-background-toolbar: transparent;--table-pivot-background-header: #f2f2f2;--table-pivot-background-filter: #e0e0e0;--table-pivot-modal-padding: 1rem;--table-pivot-modal-btn-font-size: .9em;--table-pivot-modal-btn-padding: .375rem .5rem}.pivot-table{position:relative;border:1px dashed var(--table-pivot-border-color);border-radius:var(--table-pivot-border-radius)}.pivot-table #wdr-toolbar-wrapper #wdr-toolbar{background:var(--table-pivot-background-toolbar) !important}.pivot-table #wdr-toolbar-wrapper #wdr-toolbar span{font-size:var(--table-pivot-toolbar-font-size) !important;font-family:var(--bs-body-font-family),serif !important}.pivot-table #wdr-pivot-view .wdr-grid-layout div.wdr-header{background:var(--table-pivot-background-header) !important}.pivot-table #wdr-pivot-view .wdr-grid-layout #wdr-cols-filter{background:var(--table-pivot-background-filter)}.pivot-table #wdr-pivot-view .wdr-ui div{font-family:var(--bs-body-font-family),serif !important}.pivot-table #wdr-pivot-view .wdr-ui div.wdr-cell{background:var(--table-pivot-background);border-color:var(--table-pivot-border-color)}.pivot-table #wdr-pivot-view div.wdr-ui-window{padding:var(--table-pivot-modal-padding)}.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-popup-subtitle,.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-popup-title{margin:0;padding:0}.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-popup-title{font-size:20px}.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-ui-btn{height:auto;margin:0 .25rem;padding:var(--table-pivot-modal-btn-padding);font-size:var(--table-pivot-modal-btn-font-size)}.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-selected span,.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-unchecked span,.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-checked span{font-family:var(--bs-body-font-family),serif !important}.pivot-table #wdr-pivot-view div.wdr-ui-window .wdr-ui-toggle-btn-dark{margin-bottom:15px !important}.pivot-table .wdr-ui{font-family:var(--bs-body-font-family),serif !important}.pivot-table .wdr-credits{display:none !important}:root{--input-filter-border-color: var(--gray-400, #ccc);--input-filter-border-radius: var(--input-border-radius, 5px)}.input-filter-container{border-radius:var(--input-filter-border-radius);border:1px dashed var(--input-filter-border-color)}.input-filter-content{width:100%;display:flex;align-items:flex-start;gap:.5rem}.input-filter-content .p-autocomplete-multiple{padding:0}.input-filter-content .p-autocomplete-multiple-container{width:100%;padding:.2rem .5rem}.input-filter-content .p-autocomplete-multiple-container .form-control{border:none;padding:.2rem}.input-filter-content .p-autocomplete-multiple-container .p-autocomplete-token{padding:.2rem .5rem;margin:0}.input-filter-content .p-autocomplete-multiple-container.p-focus{box-shadow:none;border-color:var(--input-filter-border-color)}.input-filter-select{width:40%;max-width:200px;min-width:130px}.input-filter-field{width:100% !important}.input-filter-field-date{flex:1}.input-filter-field-date.year{flex:2}.input-filter-autocomplete-panel .p-autocomplete-items{padding-left:0 !important}
|
package/box/_box.scss
CHANGED
|
@@ -63,7 +63,7 @@ $box-space-padding: .5rem !default;
|
|
|
63
63
|
@each $key, $value in $box-sizes {
|
|
64
64
|
&.box-size-#{$key} {
|
|
65
65
|
width: calc(var(--box-size-#{$key}, #{$value}) - #{$box-space-margin});
|
|
66
|
-
margin: #{$box-space-margin} calc(#{$box-space-margin} / 2);
|
|
66
|
+
margin: calc(#{$box-space-margin} / 2) calc(#{$box-space-margin} / 2);
|
|
67
67
|
padding: #{$box-space-padding};
|
|
68
68
|
|
|
69
69
|
@media (max-width: 576px) {
|
package/box/index.cjs.js
CHANGED
|
@@ -1,2 +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)};
|
|
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,id:s.id};return i.createElement("div",{...a},r)};
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/box/index.cjs.js.map
CHANGED
|
@@ -1 +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,
|
|
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 id: props.id\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","id","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,IACba,GAAId,EAAMc,IAGd,OACIC,EAASC,cAAA,MAAA,IAAAN,GAAcX,EACzB"}
|
package/box/index.d.ts
CHANGED
|
@@ -81,6 +81,11 @@ type JustifyContentProps =
|
|
|
81
81
|
*/
|
|
82
82
|
interface ApiComponentProps {
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Propriedade para identificar o id do elemento
|
|
86
|
+
*/
|
|
87
|
+
id?: string
|
|
88
|
+
|
|
84
89
|
/**
|
|
85
90
|
* Adiciona no atributo `class` do componente o valor atribuido nessa propriedade
|
|
86
91
|
*/
|
|
@@ -142,6 +147,4 @@ interface BoxProps extends ApiComponentProps {
|
|
|
142
147
|
*/
|
|
143
148
|
declare const Box: ({ children, ...props }: BoxProps) => React.JSX.Element;
|
|
144
149
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
export { Box, type IBoxProps };
|
|
150
|
+
export { Box };
|
package/box/index.esm.js
CHANGED
|
@@ -1,2 +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};
|
|
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,id:t.id};return i.createElement("div",{...o},s)};export{s as Box};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/box/index.esm.js.map
CHANGED
|
@@ -1 +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,
|
|
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 id: props.id\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","id","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,IACba,GAAId,EAAMc,IAGd,OACIC,EAASC,cAAA,MAAA,IAAAN,GAAcX,EACzB"}
|
package/editor/_editor.scss
CHANGED
|
@@ -1,53 +1,116 @@
|
|
|
1
|
-
$input-bg: #fff !default;
|
|
2
|
-
$input-color: #555 !default;
|
|
3
|
-
$input-border-color: #dee2e6 !default;
|
|
4
|
-
|
|
5
1
|
:root {
|
|
6
|
-
--editor-
|
|
7
|
-
--editor-
|
|
8
|
-
--editor-
|
|
9
|
-
--editor-
|
|
10
|
-
--editor-
|
|
11
|
-
|
|
2
|
+
--editor-font-size: 1em;
|
|
3
|
+
--editor-border-radius: 3px;
|
|
4
|
+
--editor-background: transparent;
|
|
5
|
+
--editor-border-color: var(--bs-gray-500, #adb5bd);
|
|
6
|
+
--editor-menu-font-size: 1.2em;
|
|
7
|
+
|
|
8
|
+
--editor-active-menu-color: var(--bs-primary, #0D6EFD);
|
|
12
9
|
}
|
|
13
10
|
|
|
14
|
-
.
|
|
11
|
+
.editor-container {
|
|
12
|
+
position: relative;
|
|
13
|
+
width: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
border-radius: var(--editor-border-radius);
|
|
17
|
+
border: 1px solid var(--editor-border-color);
|
|
15
18
|
|
|
16
|
-
.
|
|
17
|
-
|
|
19
|
+
.editor {
|
|
20
|
+
width: 100%;
|
|
21
|
+
font-size: var(--editor-font-size);
|
|
22
|
+
background: var(--editor-background);
|
|
18
23
|
}
|
|
19
24
|
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
.editor-menu {
|
|
26
|
+
overflow-x: auto;
|
|
27
|
+
display: flex;
|
|
28
|
+
width: 100%;
|
|
29
|
+
padding: 2.5px;
|
|
30
|
+
align-items: center;
|
|
31
|
+
border-bottom: 1px solid var(--editor-border-color);
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
33
|
+
&-group {
|
|
34
|
+
display: flex;
|
|
35
|
+
margin: auto 10px;
|
|
36
|
+
}
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
color: var(--editor-active) !important;
|
|
34
|
-
stroke: var(--editor-active) !important;
|
|
38
|
+
&-item {
|
|
39
|
+
margin: auto 5px;
|
|
40
|
+
font-size: var(--editor-menu-font-size);
|
|
35
41
|
}
|
|
36
42
|
|
|
37
|
-
.
|
|
38
|
-
|
|
43
|
+
&-item.active {
|
|
44
|
+
color: var(--editor-active-menu-color);
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
.
|
|
43
|
-
|
|
48
|
+
.editor-menu::-webkit-scrollbar {
|
|
49
|
+
height: 2px;
|
|
50
|
+
width: 0;
|
|
51
|
+
background: transparent;
|
|
44
52
|
}
|
|
45
53
|
|
|
46
|
-
.
|
|
47
|
-
|
|
54
|
+
.editor-menu::-webkit-scrollbar-thumb {
|
|
55
|
+
border-radius: 5px;
|
|
56
|
+
background: var(--editor-border-color);
|
|
57
|
+
border: none;
|
|
48
58
|
}
|
|
49
59
|
|
|
50
|
-
.
|
|
51
|
-
|
|
60
|
+
.editor-link {
|
|
61
|
+
display: flex;
|
|
62
|
+
min-width: 300px;
|
|
63
|
+
z-index: 5000;
|
|
64
|
+
align-items: center;
|
|
65
|
+
top: 45px;
|
|
66
|
+
left: 10px;
|
|
67
|
+
border: 1px solid #f1f1f1;
|
|
68
|
+
border-radius: 3px;
|
|
69
|
+
padding: 10px;
|
|
70
|
+
background: #fff;
|
|
71
|
+
position: absolute;
|
|
52
72
|
}
|
|
53
|
-
|
|
73
|
+
|
|
74
|
+
.editor-image {
|
|
75
|
+
margin-top: 3px;
|
|
76
|
+
position: relative;
|
|
77
|
+
|
|
78
|
+
input {
|
|
79
|
+
position: absolute;
|
|
80
|
+
top: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
right: 0;
|
|
83
|
+
bottom: 0;
|
|
84
|
+
opacity: 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Personalização do style do Tiptap
|
|
90
|
+
*/
|
|
91
|
+
.tiptap {
|
|
92
|
+
flex: 1;
|
|
93
|
+
padding: 10px;
|
|
94
|
+
|
|
95
|
+
a {
|
|
96
|
+
color: var(--bs-primary);
|
|
97
|
+
text-decoration: underline solid var(--bs-primary);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
code {
|
|
101
|
+
background: #f0f0f0;
|
|
102
|
+
border-bottom: 3px;
|
|
103
|
+
padding: 2px 4px;
|
|
104
|
+
font-size: 85%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
img {
|
|
108
|
+
max-width: 100%;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.tiptap.ProseMirror-focused {
|
|
113
|
+
border-radius: var(--editor-border-radius, 3px);
|
|
114
|
+
outline: none !important;
|
|
115
|
+
}
|
|
116
|
+
}
|
package/editor/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react"),
|
|
1
|
+
"use strict";var e=require("react"),t=require("primereact/utils"),i=require("@tiptap/extension-link"),a=require("@tiptap/extension-image"),r=require("@tiptap/starter-kit"),l=require("@tiptap/extension-color"),n=require("@tiptap/extension-underline"),c=require("@tiptap/extension-highlight"),s=require("@tiptap/extension-text-style"),o=require("@tiptap/react");const m=({children:i,...a})=>{const r={size:`box-size-${a.size??"100"}`,direction:`box-direction-${a.direction??"row"}`,justify:void 0===a.justify?"":Array.isArray(a.justify)?a.justify?.join(" "):a.justify,align:void 0===a.align?"":Array.isArray(a.align)?a.align?.join(" "):a.align},l={className:t.classNames(["box",a.className??"",r.size,r.direction,r.justify,r.align]),style:a.css,id:a.id};return e.createElement("div",{...l},i)},d=({editor:t,active:i})=>i&&e.createElement(e.Fragment,null,e.createElement("a",{className:"editor-menu-item"+(t.isActive("heading",{level:1})?" active":""),href:"#",style:{fontSize:".975em"},onClick:e=>{e.preventDefault(),t.chain().focus().toggleHeading({level:1}).run()}},e.createElement("i",{className:"bi bi-type-h1"})),e.createElement("a",{className:"editor-menu-item"+(t.isActive("heading",{level:2})?" active":""),href:"#",style:{fontSize:".975em"},onClick:e=>{e.preventDefault(),t.chain().focus().toggleHeading({level:2}).run()}},e.createElement("i",{className:"bi bi-type-h2"})),e.createElement("a",{className:"editor-menu-item"+(t.isActive("heading",{level:3})?" active":""),href:"#",style:{fontSize:".975em"},onClick:e=>{e.preventDefault(),t.chain().focus().toggleHeading({level:3}).run()}},e.createElement("i",{className:"bi bi-type-h3"}))),u=({editor:t,active:i})=>{const[a,r]=e.useState(!1),[l,n]=e.useState("");return e.useEffect((()=>{n("")}),[a]),i&&e.createElement(e.Fragment,null,e.createElement("a",{className:"editor-menu-item"+(t.isActive("link")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.isActive("link")?t.chain().focus().unsetLink().run():r(!a)}},e.createElement("i",{className:"bi bi-link"})),a&&e.createElement("div",{className:"editor-link"},e.createElement("input",{className:"form-control form-control-sm",placeholder:"https://example.com.br",style:{fontSize:".8em",flex:1},type:"text",value:l,onChange:e=>n(e.target.value)}),e.createElement("a",{className:"text-primary ms-2",href:"#",style:{fontSize:".8em"},onClick:e=>{e.preventDefault(),""===l?t.chain().focus().extendMarkRange("link").unsetLink().run():t.chain().focus().extendMarkRange("link").setLink({href:l}).run(),r(!1)}},e.createElement("i",{className:"bi bi-save me-1"}),"Save")))},v=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("bold")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.chain().focus().toggleBold().run()}},e.createElement("i",{className:"bi bi-type-bold"})),g=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("code")?" active":""),href:"#",style:{fontSize:".975em"},onClick:e=>{e.preventDefault(),t.chain().focus().toggleCode().run()}},e.createElement("i",{className:"bi bi-code-slash"})),f=({editor:t,active:i})=>i&&e.createElement("input",{style:{width:"22px",height:"20px",borderRadius:"5px",margin:"auto 2.5px",border:"2px solid var(--editor-border-color)"},type:"color",value:t.getAttributes("textStyle").color??"#000000",onChange:e=>t.chain().focus().setColor(e.target.value).run()}),p=({editor:t,active:i})=>{const[a,r]=e.useState(null),l=e=>{const i=(e.clipboardData||e.originalEvent.clipboardData).items;for(const e of i)if(0===e.type.indexOf("image")){const i=e.getAsFile(),a=new FileReader;a.onload=e=>{t.chain().focus().setImage({src:e?.target?.result}).run()},a.readAsDataURL(i)}};return e.useEffect((()=>(null!==t.view.dom.parentNode&&i&&t.view.dom.parentNode.addEventListener("paste",l),()=>{t.view.dom.parentNode?.removeEventListener("paste",l)})),[]),e.useEffect((()=>{if(void 0!==a?.name){const e=new FileReader;e.readAsDataURL(a),e.onload=()=>{t.chain().focus().setImage({src:e.result}).run()}}}),[a]),i&&e.createElement("div",{className:"editor-image"},e.createElement("input",{accept:"image/png, image/jpeg",name:"editor-image",type:"file",onChange:e=>r(e.target.files?.[0])}),e.createElement("a",{className:"editor-menu-item"+(t.isActive("link")?" active":""),href:"#",style:{fontSize:".975em"},onClick:e=>{e.preventDefault()}},e.createElement("i",{className:"bi bi-image"})))},h=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("italic")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.chain().focus().toggleItalic().run()}},e.createElement("i",{className:"bi bi-type-italic"})),E=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("strike")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.chain().focus().toggleStrike().run()}},e.createElement("i",{className:"bi bi-type-strikethrough"})),b=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("orderedList")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.chain().focus().toggleOrderedList().run()}},e.createElement("i",{className:"bi bi-list-ol"})),N=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("underline")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.chain().focus().toggleUnderline().run()}},e.createElement("i",{className:"bi bi-type-underline"})),k=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("highlight")?" active":""),href:"#",style:{fontSize:".975em"},onClick:e=>{e.preventDefault(),t.chain().focus().toggleHighlight().run()}},e.createElement("i",{className:"bi bi-highlighter"})),y=({editor:t,active:i})=>i&&e.createElement("a",{className:"editor-menu-item"+(t.isActive("bulletList")?" active":""),href:"#",onClick:e=>{e.preventDefault(),t.chain().focus().toggleBulletList().run()}},e.createElement("i",{className:"bi bi-list-task"})),x=({editor:t,options:i})=>e.createElement("div",{className:"editor-menu"},e.createElement("div",{className:"editor-menu-group"},e.createElement(d,{active:i.text,editor:t}),e.createElement(v,{active:i.bold,editor:t}),e.createElement(h,{active:i.italic,editor:t}),e.createElement(f,{active:i.color,editor:t}),e.createElement(E,{active:i.strike,editor:t}),e.createElement(N,{active:i.underline,editor:t}),e.createElement(g,{active:i.code,editor:t}),e.createElement(k,{active:i.highlight,editor:t})),e.createElement("div",{className:"editor-menu-group"},e.createElement(y,{active:i.bulletlist,editor:t}),e.createElement(b,{active:i.orderlist,editor:t}),e.createElement(u,{active:i.link,editor:t}),e.createElement(p,{active:i.image,editor:t}))),A=({iconPrefix:t="bi bi-",...i})=>i.label&&e.createElement("p",{className:"form-label"},i.icon&&e.createElement("i",{className:t+i.icon+" me-1"}),i.label,i.required&&e.createElement("span",{className:"text-danger"},"*")),C={text:!0,bold:!0,italic:!0,color:!0,strike:!1,underline:!1,code:!1,highlight:!1,bulletlist:!1,orderlist:!1,link:!1,image:!1},D={text:!0,bold:!0,italic:!0,color:!0,strike:!0,underline:!0,code:!0,highlight:!0,bulletlist:!0,orderlist:!0,link:!0,image:!0};exports.Editor=({options:t="basic",iconPrefix:d="bi bi-",...u})=>{const[v,g]=e.useState(!1),f=o.useEditor({extensions:[r,n,c,l.Color,s,i.configure({validate:e=>/^https?:\/\//.test(e),HTMLAttributes:{rel:""}}),a.configure({allowBase64:!0})],editable:!u.disabled,content:u.value??"",onFocus:()=>g(!0),onBlur:()=>g(!1),onUpdate:({editor:e})=>{u.onChange(e.getHTML())}});return f?(e.useEffect((()=>{f&&!v&&f?.commands.setContent(u.value)}),[u.value]),e.createElement(m,{className:u.className,css:u.css,size:u.size??"100"},e.createElement(A,{...u}),e.createElement("div",{className:"editor-container"},!u.disabled&&e.createElement(x,{editor:f,options:"basic"===t?C:"full"===t?D:t}),e.createElement(o.EditorContent,{className:"editor",disabled:u.disabled,editor:f,id:u.id,name:u.name,style:{minHeight:(u.height??100)+"px"}})),e.createElement("div",{"data-name":u.name,id:"j_feedback"}))):(console.error("Não foi possível realizar o carregamento do editor de texto."),null)};
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/editor/index.cjs.js.map
CHANGED
|
@@ -1 +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"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/box/box.tsx","../../src/editor/core/text.tsx","../../src/editor/core/link.tsx","../../src/editor/core/bold.tsx","../../src/editor/core/code.tsx","../../src/editor/core/color.tsx","../../src/editor/core/image.tsx","../../src/editor/core/italic.tsx","../../src/editor/core/strike.tsx","../../src/editor/core/orderlist.tsx","../../src/editor/core/underline.tsx","../../src/editor/core/highlight.tsx","../../src/editor/core/bulletlist.tsx","../../src/editor/core/index.tsx","../../src/api/input.tsx","../../src/editor/const.ts","../../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 id: props.id\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 { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Text`\r\n * Extensão para formatar o texto com tamanho específico\r\n */\r\nexport const Text = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n\r\n return active && (\r\n <>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"heading\", { level: 1 }) ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleHeading({ level: 1 }).run();\r\n }}><i className=\"bi bi-type-h1\"/></a>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"heading\", { level: 2 }) ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleHeading({ level: 2 }).run();\r\n }}><i className=\"bi bi-type-h2\"/></a>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"heading\", { level: 3 }) ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleHeading({ level: 3 }).run();\r\n }}><i className=\"bi bi-type-h3\"/></a>\r\n </>\r\n );\r\n};","import { EditorCoreProps } from \"../types\";\r\nimport React, { useEffect, useState } from \"react\";\r\n\r\n/**\r\n * Core - `Link`\r\n * Extensão para formatar adicionar link no documento\r\n */\r\nexport const Link = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n const [open, setOpen] = useState<boolean>(false);\r\n const [link, setLink] = useState<string>(\"\");\r\n\r\n useEffect(() => {\r\n setLink(\"\");\r\n }, [open]);\r\n\r\n function handleLink() {\r\n if (link === \"\") {\r\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\r\n } else {\r\n editor.chain().focus().extendMarkRange(\"link\").setLink({ href: link }).run();\r\n }\r\n setOpen(false);\r\n }\r\n\r\n return active && (\r\n <>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"link\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n if (!editor.isActive(\"link\")) {\r\n setOpen(!open);\r\n } else {\r\n editor.chain().focus().unsetLink().run();\r\n }\r\n }}><i className=\"bi bi-link\"/></a>\r\n {open && <div className=\"editor-link\">\r\n <input className=\"form-control form-control-sm\"\r\n placeholder=\"https://example.com.br\"\r\n style={{ fontSize: \".8em\", flex: 1 }}\r\n type=\"text\"\r\n value={link}\r\n onChange={event => setLink(event.target.value)}/>\r\n <a className=\"text-primary ms-2\"\r\n href=\"#\"\r\n style={{ fontSize: \".8em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n handleLink();\r\n }}><i className=\"bi bi-save me-1\"/>Save</a>\r\n </div>}\r\n </>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Bold`\r\n * Extensão para renderizar texto em negrito\r\n */\r\nexport const Bold = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"bold\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleBold().run();\r\n }}><i className=\"bi bi-type-bold\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Code`\r\n * Extensão para renderizar texto em formato de código\r\n */\r\nexport const Code = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"code\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleCode().run();\r\n }}><i className=\"bi bi-code-slash\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Color`\r\n * Extensão para formatar o texto com cor especifica\r\n */\r\nexport const Color = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <input\r\n style={{\r\n width: \"22px\",\r\n height: \"20px\",\r\n borderRadius: \"5px\",\r\n margin: \"auto 2.5px\",\r\n border: \"2px solid var(--editor-border-color)\",\r\n }}\r\n type=\"color\"\r\n value={editor.getAttributes(\"textStyle\").color ?? \"#000000\"}\r\n onChange={event => editor.chain().focus().setColor(event.target.value).run()}/>\r\n );\r\n};","import { EditorCoreProps } from \"../types\";\r\nimport React, { useEffect, useState } from \"react\";\r\n\r\n/**\r\n * Core - `Image`\r\n * Extensão para adicionar imagem no documento\r\n */\r\nexport const Image = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n const [file, setFile] = useState<any>(null);\r\n\r\n const handlePaste = (event: any) => {\r\n const items = (event.clipboardData || event.originalEvent.clipboardData).items;\r\n for (const item of items) {\r\n if (item.type.indexOf(\"image\") === 0) {\r\n const file = item.getAsFile();\r\n const reader = new FileReader();\r\n reader.onload = (event) => {\r\n editor.chain().focus().setImage({ src: event?.target?.result as string }).run();\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (editor.view.dom.parentNode !== null && active) {\r\n editor.view.dom.parentNode.addEventListener(\"paste\", handlePaste);\r\n }\r\n return () => {\r\n editor.view.dom.parentNode?.removeEventListener(\"paste\", handlePaste);\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (file?.name !== undefined) {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => {\r\n editor.chain().focus().setImage({ src: reader.result as string }).run();\r\n };\r\n }\r\n }, [file]);\r\n\r\n return active && (\r\n <div className=\"editor-image\">\r\n <input accept=\"image/png, image/jpeg\"\r\n name=\"editor-image\"\r\n type=\"file\"\r\n onChange={event => setFile(event.target.files?.[0])}/>\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"link\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n }}><i className=\"bi bi-image\"/></a>\r\n </div>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Italic`\r\n * Extensão para renderizar texto em itálico\r\n */\r\nexport const Italic = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"italic\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleItalic().run();\r\n }}><i className=\"bi bi-type-italic\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Strike`\r\n * Extensão para renderizar texto em strike text\r\n */\r\nexport const Strike = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"strike\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleStrike().run();\r\n }}><i className=\"bi bi-type-strikethrough\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Orderlist`\r\n * Extensão para renderizar texto em lista ordenada\r\n */\r\nexport const Orderlist = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"orderedList\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleOrderedList().run();\r\n }}><i className=\"bi bi-list-ol\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Underline`\r\n * Extensão para renderizar texto em underline text\r\n */\r\nexport const Underline = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"underline\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleUnderline().run();\r\n }}><i className=\"bi bi-type-underline\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Highlight`\r\n * Extensão para marcar texto no formato de marca texto\r\n */\r\nexport const Highlight = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"highlight\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n style={{ fontSize: \".975em\" }}\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleHighlight().run();\r\n }}><i className=\"bi bi-highlighter\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { EditorCoreProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Bulletlist`\r\n * Extensão para renderizar texto em lista\r\n */\r\nexport const Bulletlist = ({ editor, active }: EditorCoreProps & { active: boolean }) => {\r\n return active && (\r\n <a className={\"editor-menu-item\" + (editor.isActive(\"bulletList\") ? \" active\" : \"\")}\r\n href=\"#\"\r\n onClick={event => {\r\n event.preventDefault();\r\n editor.chain().focus().toggleBulletList().run();\r\n }}><i className=\"bi bi-list-task\"/></a>\r\n );\r\n};","import React from \"react\";\r\nimport { Text } from \"./text\";\r\nimport { Link } from \"./link\";\r\nimport { Bold } from \"./bold\";\r\nimport { Code } from \"./code\";\r\nimport { Color } from \"./color\";\r\nimport { Image } from \"./image\";\r\nimport { Italic } from \"./italic\";\r\nimport { Strike } from \"./strike\";\r\nimport { Orderlist } from \"./orderlist\";\r\nimport { Underline } from \"./underline\";\r\nimport { Highlight } from \"./highlight\";\r\nimport { Bulletlist } from \"./bulletlist\";\r\nimport { EditorCoreProps, EditorOptionsProps } from \"../types\";\r\n\r\n/**\r\n * Core - `Menu`\r\n * Componente que renderiza todas as opções de menu do componente\r\n */\r\nexport const EditorMenu = ({ editor, options }: EditorCoreProps & { options: EditorOptionsProps }) => {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return (\r\n <div className=\"editor-menu\">\r\n <div className=\"editor-menu-group\">\r\n <Text active={options.text}\r\n editor={editor}/>\r\n <Bold active={options.bold}\r\n editor={editor}/>\r\n <Italic active={options.italic}\r\n editor={editor}/>\r\n <Color active={options.color}\r\n editor={editor}/>\r\n <Strike active={options.strike}\r\n editor={editor}/>\r\n <Underline active={options.underline}\r\n editor={editor}/>\r\n <Code active={options.code}\r\n editor={editor}/>\r\n <Highlight active={options.highlight}\r\n editor={editor}/>\r\n </div>\r\n <div className=\"editor-menu-group\">\r\n <Bulletlist active={options.bulletlist}\r\n editor={editor}/>\r\n <Orderlist active={options.orderlist}\r\n editor={editor}/>\r\n <Link active={options.link}\r\n editor={editor}/>\r\n <Image active={options.image}\r\n editor={editor}/>\r\n </div>\r\n </div>\r\n );\r\n};","import React from \"react\";\r\nimport { ApiFieldComponentProps } from \"./types\";\r\n\r\n/**\r\n * API - `InputLabel`\r\n *\r\n * Um componente utilizado como label em todos os componente de campo do pacote.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n */\r\nexport const InputLabel = ({ iconPrefix = \"bi bi-\", ...props }: ApiFieldComponentProps) => {\r\n /*\r\n |------------------------------------------\r\n | render() - Renderização do componente\r\n |------------------------------------------\r\n */\r\n return props.label\r\n && <p 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 </p>;\r\n};","import { EditorOptionsProps } from \"./types\";\r\n\r\nexport const editorBasic: EditorOptionsProps = {\r\n text: true,\r\n bold: true,\r\n italic: true,\r\n color: true,\r\n strike: false,\r\n underline: false,\r\n code: false,\r\n highlight: false,\r\n bulletlist: false,\r\n orderlist: false,\r\n link: false,\r\n image: false\r\n};\r\n\r\nexport const editorFull: EditorOptionsProps = {\r\n text: true,\r\n bold: true,\r\n italic: true,\r\n color: true,\r\n strike: true,\r\n underline: true,\r\n code: true,\r\n highlight: true,\r\n bulletlist: true,\r\n orderlist: true,\r\n link: true,\r\n image: true\r\n};","import { Box } from \"../box\";\r\nimport { EditorMenu } from \"./core\";\r\nimport { InputLabel } from \"../api\";\r\nimport { EditorProps } from \"./types\";\r\nimport Link from \"@tiptap/extension-link\";\r\nimport Image from \"@tiptap/extension-image\";\r\nimport StarterKit from \"@tiptap/starter-kit\";\r\nimport { Color } from \"@tiptap/extension-color\";\r\nimport { editorBasic, editorFull } from \"./const\";\r\nimport React, { useEffect, useState } from \"react\";\r\nimport Underline from \"@tiptap/extension-underline\";\r\nimport Highlight from \"@tiptap/extension-highlight\";\r\nimport TextStyle from \"@tiptap/extension-text-style\";\r\nimport { EditorContent as EditorTipTap, useEditor } from \"@tiptap/react\";\r\n\r\n/**\r\n * Componente - `Editor`\r\n *\r\n * Um componente versátil que pode ser utilizado para criar container de edição de texto.\r\n * Permite personalizar o estilo e o conteúdo através de propriedades.\r\n */\r\nexport const Editor = ({ options = \"basic\", iconPrefix = \"bi bi-\", ...props }: EditorProps) => {\r\n const [edition, setEdition] = useState(false);\r\n const editor = useEditor({\r\n extensions: [\r\n StarterKit,\r\n Underline,\r\n Highlight,\r\n Color,\r\n TextStyle,\r\n Link.configure({\r\n validate: (href) => /^https?:\\/\\//.test(href),\r\n HTMLAttributes: {\r\n rel: \"\"\r\n }\r\n }),\r\n Image.configure({\r\n allowBase64: true\r\n })\r\n ],\r\n editable: !props.disabled,\r\n content: props.value ?? \"\",\r\n onFocus: () => setEdition(true),\r\n onBlur: () => setEdition(false),\r\n onUpdate: ({ editor }) => {\r\n props.onChange(editor.getHTML());\r\n }\r\n });\r\n\r\n if (!editor) {\r\n console.error(\"Não foi possível realizar o carregamento do editor de texto.\");\r\n return null;\r\n }\r\n\r\n useEffect(() => {\r\n if (editor && !edition) {\r\n editor?.commands.setContent(props.value);\r\n }\r\n }, [props.value]);\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 <div className=\"editor-container\">\r\n {!props.disabled\r\n && <EditorMenu editor={editor}\r\n options={options === \"basic\" ? editorBasic : options === \"full\" ? editorFull : options}/>}\r\n <EditorTipTap className=\"editor\"\r\n disabled={props.disabled}\r\n editor={editor}\r\n id={props.id}\r\n name={props.name}\r\n style={{ minHeight: (props.height ?? 100) + \"px\" }}/>\r\n </div>\r\n <div data-name={props.name}\r\n id=\"j_feedback\"/>\r\n </Box>\r\n );\r\n};\r\n\r\nexport default Editor;"],"names":["Box","children","props","css","size","direction","justify","undefined","Array","isArray","join","align","attr","className","classNames","style","id","React","createElement","Text","editor","active","Fragment","isActive","level","href","fontSize","onClick","event","preventDefault","chain","focus","toggleHeading","run","Link","open","setOpen","useState","link","setLink","useEffect","unsetLink","placeholder","flex","type","value","onChange","target","extendMarkRange","Bold","toggleBold","Code","toggleCode","Color","width","height","borderRadius","margin","border","getAttributes","color","setColor","Image","file","setFile","handlePaste","items","clipboardData","originalEvent","item","indexOf","getAsFile","reader","FileReader","onload","setImage","src","result","readAsDataURL","view","dom","parentNode","addEventListener","removeEventListener","name","accept","files","Italic","toggleItalic","Strike","toggleStrike","Orderlist","toggleOrderedList","Underline","toggleUnderline","Highlight","toggleHighlight","Bulletlist","toggleBulletList","EditorMenu","options","text","bold","italic","strike","underline","code","highlight","bulletlist","orderlist","image","InputLabel","iconPrefix","label","icon","required","editorBasic","editorFull","edition","setEdition","useEditor","extensions","StarterKit","TextStyle","configure","validate","test","HTMLAttributes","rel","allowBase64","editable","disabled","content","onFocus","onBlur","onUpdate","getHTML","commands","setContent","EditorTipTap","minHeight","console","error"],"mappings":"wWAmBO,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,E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