pallote-react 0.14.3 → 0.14.5
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/index.js +561 -3
- package/package.json +1 -3
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useRef, createContext, useContext } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import {
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
import { X, CalendarBlank, Clock, CaretUpDown, ArrowSquareOut, CaretDoubleLeft, CaretLeft, CaretRight, CaretDoubleRight } from '@phosphor-icons/react';
|
|
5
6
|
import SyntaxHighlighter from 'react-syntax-highlighter';
|
|
6
7
|
|
|
7
8
|
const Color = ({
|
|
@@ -43,6 +44,11 @@ Color.propTypes = {
|
|
|
43
44
|
children: PropTypes.node
|
|
44
45
|
};
|
|
45
46
|
|
|
47
|
+
var Color$1 = /*#__PURE__*/Object.freeze({
|
|
48
|
+
__proto__: null,
|
|
49
|
+
Color: Color
|
|
50
|
+
});
|
|
51
|
+
|
|
46
52
|
const viewportSizes = {
|
|
47
53
|
'mobile-sm': 375,
|
|
48
54
|
'mobile': 576,
|
|
@@ -83,6 +89,11 @@ Display.propTypes = {
|
|
|
83
89
|
children: PropTypes.node
|
|
84
90
|
};
|
|
85
91
|
|
|
92
|
+
var Display$1 = /*#__PURE__*/Object.freeze({
|
|
93
|
+
__proto__: null,
|
|
94
|
+
Display: Display
|
|
95
|
+
});
|
|
96
|
+
|
|
86
97
|
function _extends() {
|
|
87
98
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
88
99
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -146,6 +157,11 @@ Grid.propTypes = {
|
|
|
146
157
|
children: PropTypes.node
|
|
147
158
|
};
|
|
148
159
|
|
|
160
|
+
var Grid$1 = /*#__PURE__*/Object.freeze({
|
|
161
|
+
__proto__: null,
|
|
162
|
+
Grid: Grid
|
|
163
|
+
});
|
|
164
|
+
|
|
149
165
|
const Text = ({
|
|
150
166
|
variant,
|
|
151
167
|
align,
|
|
@@ -191,6 +207,86 @@ Text.propTypes = {
|
|
|
191
207
|
children: PropTypes.node
|
|
192
208
|
};
|
|
193
209
|
|
|
210
|
+
var Text$1 = /*#__PURE__*/Object.freeze({
|
|
211
|
+
__proto__: null,
|
|
212
|
+
Text: Text
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const Alert = ({
|
|
216
|
+
color = 'success',
|
|
217
|
+
variant = 'toast',
|
|
218
|
+
title,
|
|
219
|
+
subtitle,
|
|
220
|
+
dense,
|
|
221
|
+
noIcon,
|
|
222
|
+
show,
|
|
223
|
+
onClose,
|
|
224
|
+
className,
|
|
225
|
+
...props
|
|
226
|
+
}) => {
|
|
227
|
+
const [shouldRender, setRender] = useState(show);
|
|
228
|
+
const [container] = useState(() => {
|
|
229
|
+
let el = document.getElementById('alerts');
|
|
230
|
+
if (!el) {
|
|
231
|
+
el = document.createElement('div');
|
|
232
|
+
el.id = 'alerts';
|
|
233
|
+
document.body.appendChild(el);
|
|
234
|
+
}
|
|
235
|
+
return el;
|
|
236
|
+
});
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (show) setRender(true);
|
|
239
|
+
}, [show]);
|
|
240
|
+
const onAnimationEnd = () => {
|
|
241
|
+
if (!show) setRender(false);
|
|
242
|
+
};
|
|
243
|
+
let alert = /*#__PURE__*/React.createElement("div", _extends({
|
|
244
|
+
className: classnames(['alert', {
|
|
245
|
+
[`alert-${color}`]: color,
|
|
246
|
+
[`alert-${variant}`]: variant,
|
|
247
|
+
'alert-slideIn': show,
|
|
248
|
+
'alert-slideOut': !show,
|
|
249
|
+
'alert-dense': dense,
|
|
250
|
+
'alert-noIcon': noIcon
|
|
251
|
+
}, className]),
|
|
252
|
+
onAnimationEnd: onAnimationEnd
|
|
253
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
254
|
+
className: classnames('alert_content')
|
|
255
|
+
}, title ? /*#__PURE__*/React.createElement(Text, {
|
|
256
|
+
className: classnames('alert_title'),
|
|
257
|
+
variant: dense ? 'caption' : 'body',
|
|
258
|
+
weight: "bold"
|
|
259
|
+
}, title) : null, subtitle ? /*#__PURE__*/React.createElement(Text, {
|
|
260
|
+
variant: dense ? 'overline' : 'caption',
|
|
261
|
+
className: classnames('alert_subtitle')
|
|
262
|
+
}, subtitle) : null), onClose ? /*#__PURE__*/React.createElement(X, {
|
|
263
|
+
className: classnames('alert_close'),
|
|
264
|
+
onClick: onClose,
|
|
265
|
+
size: dense ? 14 : 16
|
|
266
|
+
}) : null);
|
|
267
|
+
if (variant === 'notice') {
|
|
268
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, alert);
|
|
269
|
+
} else {
|
|
270
|
+
return /*#__PURE__*/createPortal(shouldRender && alert, container);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
Alert.propTypes = {
|
|
274
|
+
color: PropTypes.oneOf(['success', 'info', 'warning', 'error']),
|
|
275
|
+
variant: PropTypes.oneOf(['bar', 'toast', 'notice']),
|
|
276
|
+
title: PropTypes.string.isRequired,
|
|
277
|
+
subtitle: PropTypes.string,
|
|
278
|
+
dense: PropTypes.bool,
|
|
279
|
+
noIcon: PropTypes.bool,
|
|
280
|
+
show: PropTypes.bool,
|
|
281
|
+
onClose: PropTypes.func,
|
|
282
|
+
className: PropTypes.node
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
var Alert$1 = /*#__PURE__*/Object.freeze({
|
|
286
|
+
__proto__: null,
|
|
287
|
+
Alert: Alert
|
|
288
|
+
});
|
|
289
|
+
|
|
194
290
|
const Breadcrumbs = ({
|
|
195
291
|
items,
|
|
196
292
|
separator = "slash",
|
|
@@ -214,6 +310,11 @@ Breadcrumbs.propTypes = {
|
|
|
214
310
|
className: PropTypes.node
|
|
215
311
|
};
|
|
216
312
|
|
|
313
|
+
var Breadcrumbs$1 = /*#__PURE__*/Object.freeze({
|
|
314
|
+
__proto__: null,
|
|
315
|
+
Breadcrumbs: Breadcrumbs
|
|
316
|
+
});
|
|
317
|
+
|
|
217
318
|
const Button = /*#__PURE__*/React.forwardRef(({
|
|
218
319
|
component = 'button',
|
|
219
320
|
kind,
|
|
@@ -263,6 +364,11 @@ Button.propTypes = {
|
|
|
263
364
|
children: PropTypes.node.isRequired
|
|
264
365
|
};
|
|
265
366
|
|
|
367
|
+
var Button$1 = /*#__PURE__*/Object.freeze({
|
|
368
|
+
__proto__: null,
|
|
369
|
+
Button: Button
|
|
370
|
+
});
|
|
371
|
+
|
|
266
372
|
const Buttons = ({
|
|
267
373
|
direction = 'landscape',
|
|
268
374
|
fullWidth,
|
|
@@ -287,6 +393,11 @@ Buttons.propTypes = {
|
|
|
287
393
|
children: PropTypes.node.isRequired
|
|
288
394
|
};
|
|
289
395
|
|
|
396
|
+
var Buttons$1 = /*#__PURE__*/Object.freeze({
|
|
397
|
+
__proto__: null,
|
|
398
|
+
Buttons: Buttons
|
|
399
|
+
});
|
|
400
|
+
|
|
290
401
|
const Card = ({
|
|
291
402
|
size = 'md',
|
|
292
403
|
fill = 'paper',
|
|
@@ -321,6 +432,11 @@ Card.propTypes = {
|
|
|
321
432
|
children: PropTypes.node.isRequired
|
|
322
433
|
};
|
|
323
434
|
|
|
435
|
+
var Card$1 = /*#__PURE__*/Object.freeze({
|
|
436
|
+
__proto__: null,
|
|
437
|
+
Card: Card
|
|
438
|
+
});
|
|
439
|
+
|
|
324
440
|
const CardActions = ({
|
|
325
441
|
direction,
|
|
326
442
|
className,
|
|
@@ -339,6 +455,11 @@ CardActions.propTypes = {
|
|
|
339
455
|
children: PropTypes.node.isRequired
|
|
340
456
|
};
|
|
341
457
|
|
|
458
|
+
var CardActions$1 = /*#__PURE__*/Object.freeze({
|
|
459
|
+
__proto__: null,
|
|
460
|
+
CardActions: CardActions
|
|
461
|
+
});
|
|
462
|
+
|
|
342
463
|
const CardContent = ({
|
|
343
464
|
fullWidth,
|
|
344
465
|
className,
|
|
@@ -357,6 +478,11 @@ CardContent.propTypes = {
|
|
|
357
478
|
children: PropTypes.node.isRequired
|
|
358
479
|
};
|
|
359
480
|
|
|
481
|
+
var CardContent$1 = /*#__PURE__*/Object.freeze({
|
|
482
|
+
__proto__: null,
|
|
483
|
+
CardContent: CardContent
|
|
484
|
+
});
|
|
485
|
+
|
|
360
486
|
const CardHeader = ({
|
|
361
487
|
label,
|
|
362
488
|
title,
|
|
@@ -386,6 +512,11 @@ CardHeader.propTypes = {
|
|
|
386
512
|
children: PropTypes.node
|
|
387
513
|
};
|
|
388
514
|
|
|
515
|
+
var CardHeader$1 = /*#__PURE__*/Object.freeze({
|
|
516
|
+
__proto__: null,
|
|
517
|
+
CardHeader: CardHeader
|
|
518
|
+
});
|
|
519
|
+
|
|
389
520
|
const CardMedia = ({
|
|
390
521
|
width,
|
|
391
522
|
height,
|
|
@@ -415,6 +546,11 @@ CardMedia.propTypes = {
|
|
|
415
546
|
className: PropTypes.node
|
|
416
547
|
};
|
|
417
548
|
|
|
549
|
+
var CardMedia$1 = /*#__PURE__*/Object.freeze({
|
|
550
|
+
__proto__: null,
|
|
551
|
+
CardMedia: CardMedia
|
|
552
|
+
});
|
|
553
|
+
|
|
418
554
|
const Checkbox = ({
|
|
419
555
|
id,
|
|
420
556
|
value,
|
|
@@ -454,6 +590,11 @@ Checkbox.propTypes = {
|
|
|
454
590
|
className: PropTypes.node
|
|
455
591
|
};
|
|
456
592
|
|
|
593
|
+
var Checkbox$1 = /*#__PURE__*/Object.freeze({
|
|
594
|
+
__proto__: null,
|
|
595
|
+
Checkbox: Checkbox
|
|
596
|
+
});
|
|
597
|
+
|
|
457
598
|
const InputLabel = ({
|
|
458
599
|
isLegend = false,
|
|
459
600
|
htmlFor,
|
|
@@ -486,6 +627,11 @@ InputLabel.propTypes = {
|
|
|
486
627
|
error: PropTypes.string
|
|
487
628
|
};
|
|
488
629
|
|
|
630
|
+
var InputLabel$1 = /*#__PURE__*/Object.freeze({
|
|
631
|
+
__proto__: null,
|
|
632
|
+
InputLabel: InputLabel
|
|
633
|
+
});
|
|
634
|
+
|
|
489
635
|
const Checkboxes = ({
|
|
490
636
|
onChange,
|
|
491
637
|
id,
|
|
@@ -534,6 +680,11 @@ Checkboxes.propTypes = {
|
|
|
534
680
|
className: PropTypes.node
|
|
535
681
|
};
|
|
536
682
|
|
|
683
|
+
var Checkboxes$1 = /*#__PURE__*/Object.freeze({
|
|
684
|
+
__proto__: null,
|
|
685
|
+
Checkboxes: Checkboxes
|
|
686
|
+
});
|
|
687
|
+
|
|
537
688
|
const Divider = ({
|
|
538
689
|
direction = 'landscape',
|
|
539
690
|
padding = 'md',
|
|
@@ -553,6 +704,11 @@ Divider.propTypes = {
|
|
|
553
704
|
className: PropTypes.node
|
|
554
705
|
};
|
|
555
706
|
|
|
707
|
+
var Divider$1 = /*#__PURE__*/Object.freeze({
|
|
708
|
+
__proto__: null,
|
|
709
|
+
Divider: Divider
|
|
710
|
+
});
|
|
711
|
+
|
|
556
712
|
const Input = ({
|
|
557
713
|
onChange,
|
|
558
714
|
type = 'text',
|
|
@@ -618,6 +774,11 @@ Input.propTypes = {
|
|
|
618
774
|
className: PropTypes.node
|
|
619
775
|
};
|
|
620
776
|
|
|
777
|
+
var Input$1 = /*#__PURE__*/Object.freeze({
|
|
778
|
+
__proto__: null,
|
|
779
|
+
Input: Input
|
|
780
|
+
});
|
|
781
|
+
|
|
621
782
|
const Link = ({
|
|
622
783
|
component = 'a',
|
|
623
784
|
icon,
|
|
@@ -651,6 +812,11 @@ Link.propTypes = {
|
|
|
651
812
|
children: PropTypes.node.isRequired
|
|
652
813
|
};
|
|
653
814
|
|
|
815
|
+
var Link$1 = /*#__PURE__*/Object.freeze({
|
|
816
|
+
__proto__: null,
|
|
817
|
+
Link: Link
|
|
818
|
+
});
|
|
819
|
+
|
|
654
820
|
const List = ({
|
|
655
821
|
dense,
|
|
656
822
|
className,
|
|
@@ -669,6 +835,11 @@ List.propTypes = {
|
|
|
669
835
|
children: PropTypes.node.isRequired
|
|
670
836
|
};
|
|
671
837
|
|
|
838
|
+
var List$1 = /*#__PURE__*/Object.freeze({
|
|
839
|
+
__proto__: null,
|
|
840
|
+
List: List
|
|
841
|
+
});
|
|
842
|
+
|
|
672
843
|
const ListItem = ({
|
|
673
844
|
icon,
|
|
674
845
|
bold,
|
|
@@ -691,6 +862,11 @@ ListItem.propTypes = {
|
|
|
691
862
|
children: PropTypes.node.isRequired
|
|
692
863
|
};
|
|
693
864
|
|
|
865
|
+
var ListItem$1 = /*#__PURE__*/Object.freeze({
|
|
866
|
+
__proto__: null,
|
|
867
|
+
ListItem: ListItem
|
|
868
|
+
});
|
|
869
|
+
|
|
694
870
|
const Nav = ({
|
|
695
871
|
direction,
|
|
696
872
|
dense,
|
|
@@ -714,6 +890,11 @@ Nav.propTypes = {
|
|
|
714
890
|
children: PropTypes.node.isRequired
|
|
715
891
|
};
|
|
716
892
|
|
|
893
|
+
var Nav$1 = /*#__PURE__*/Object.freeze({
|
|
894
|
+
__proto__: null,
|
|
895
|
+
Nav: Nav
|
|
896
|
+
});
|
|
897
|
+
|
|
717
898
|
const SectionHeader = ({
|
|
718
899
|
label,
|
|
719
900
|
title,
|
|
@@ -747,6 +928,11 @@ SectionHeader.propTypes = {
|
|
|
747
928
|
className: PropTypes.node
|
|
748
929
|
};
|
|
749
930
|
|
|
931
|
+
var SectionHeader$1 = /*#__PURE__*/Object.freeze({
|
|
932
|
+
__proto__: null,
|
|
933
|
+
SectionHeader: SectionHeader
|
|
934
|
+
});
|
|
935
|
+
|
|
750
936
|
const Section = ({
|
|
751
937
|
align = 'left',
|
|
752
938
|
color = 'default',
|
|
@@ -783,6 +969,11 @@ Section.propTypes = {
|
|
|
783
969
|
children: PropTypes.node.isRequired
|
|
784
970
|
};
|
|
785
971
|
|
|
972
|
+
var Section$1 = /*#__PURE__*/Object.freeze({
|
|
973
|
+
__proto__: null,
|
|
974
|
+
Section: Section
|
|
975
|
+
});
|
|
976
|
+
|
|
786
977
|
const NavBar = ({
|
|
787
978
|
logo,
|
|
788
979
|
align,
|
|
@@ -826,6 +1017,11 @@ NavBar.propTypes = {
|
|
|
826
1017
|
children: PropTypes.node.isRequired
|
|
827
1018
|
};
|
|
828
1019
|
|
|
1020
|
+
var NavBar$1 = /*#__PURE__*/Object.freeze({
|
|
1021
|
+
__proto__: null,
|
|
1022
|
+
NavBar: NavBar
|
|
1023
|
+
});
|
|
1024
|
+
|
|
829
1025
|
const NavItem = ({
|
|
830
1026
|
component,
|
|
831
1027
|
label,
|
|
@@ -875,6 +1071,11 @@ NavItem.propTypes = {
|
|
|
875
1071
|
className: PropTypes.node
|
|
876
1072
|
};
|
|
877
1073
|
|
|
1074
|
+
var NavItem$1 = /*#__PURE__*/Object.freeze({
|
|
1075
|
+
__proto__: null,
|
|
1076
|
+
NavItem: NavItem
|
|
1077
|
+
});
|
|
1078
|
+
|
|
878
1079
|
const Radio = ({
|
|
879
1080
|
id,
|
|
880
1081
|
name,
|
|
@@ -916,6 +1117,11 @@ Radio.propTypes = {
|
|
|
916
1117
|
className: PropTypes.node
|
|
917
1118
|
};
|
|
918
1119
|
|
|
1120
|
+
var Radio$1 = /*#__PURE__*/Object.freeze({
|
|
1121
|
+
__proto__: null,
|
|
1122
|
+
Radio: Radio
|
|
1123
|
+
});
|
|
1124
|
+
|
|
919
1125
|
const RadioButtons = ({
|
|
920
1126
|
onChange,
|
|
921
1127
|
id,
|
|
@@ -964,6 +1170,11 @@ RadioButtons.propTypes = {
|
|
|
964
1170
|
className: PropTypes.node
|
|
965
1171
|
};
|
|
966
1172
|
|
|
1173
|
+
var RadioButtons$1 = /*#__PURE__*/Object.freeze({
|
|
1174
|
+
__proto__: null,
|
|
1175
|
+
RadioButtons: RadioButtons
|
|
1176
|
+
});
|
|
1177
|
+
|
|
967
1178
|
const SectionContent = ({
|
|
968
1179
|
align = 'left',
|
|
969
1180
|
className,
|
|
@@ -982,6 +1193,11 @@ SectionContent.propTypes = {
|
|
|
982
1193
|
children: PropTypes.node.isRequired
|
|
983
1194
|
};
|
|
984
1195
|
|
|
1196
|
+
var SectionContent$1 = /*#__PURE__*/Object.freeze({
|
|
1197
|
+
__proto__: null,
|
|
1198
|
+
SectionContent: SectionContent
|
|
1199
|
+
});
|
|
1200
|
+
|
|
985
1201
|
const Select = ({
|
|
986
1202
|
onChange,
|
|
987
1203
|
id,
|
|
@@ -1041,6 +1257,11 @@ Select.propTypes = {
|
|
|
1041
1257
|
className: PropTypes.node
|
|
1042
1258
|
};
|
|
1043
1259
|
|
|
1260
|
+
var Select$1 = /*#__PURE__*/Object.freeze({
|
|
1261
|
+
__proto__: null,
|
|
1262
|
+
Select: Select
|
|
1263
|
+
});
|
|
1264
|
+
|
|
1044
1265
|
var nnfxDark = {
|
|
1045
1266
|
"hljs": {
|
|
1046
1267
|
"display": "block",
|
|
@@ -1184,6 +1405,11 @@ Snippet.propTypes = {
|
|
|
1184
1405
|
className: PropTypes.node
|
|
1185
1406
|
};
|
|
1186
1407
|
|
|
1408
|
+
var Snippet$1 = /*#__PURE__*/Object.freeze({
|
|
1409
|
+
__proto__: null,
|
|
1410
|
+
Snippet: Snippet
|
|
1411
|
+
});
|
|
1412
|
+
|
|
1187
1413
|
const Status = ({
|
|
1188
1414
|
color = 'inactive',
|
|
1189
1415
|
dense,
|
|
@@ -1205,6 +1431,11 @@ Status.propTypes = {
|
|
|
1205
1431
|
children: PropTypes.node.isRequired
|
|
1206
1432
|
};
|
|
1207
1433
|
|
|
1434
|
+
var Status$1 = /*#__PURE__*/Object.freeze({
|
|
1435
|
+
__proto__: null,
|
|
1436
|
+
Status: Status
|
|
1437
|
+
});
|
|
1438
|
+
|
|
1208
1439
|
const Switch = ({
|
|
1209
1440
|
id,
|
|
1210
1441
|
startLabel,
|
|
@@ -1244,6 +1475,323 @@ Switch.propTypes = {
|
|
|
1244
1475
|
className: PropTypes.node
|
|
1245
1476
|
};
|
|
1246
1477
|
|
|
1478
|
+
var Switch$1 = /*#__PURE__*/Object.freeze({
|
|
1479
|
+
__proto__: null,
|
|
1480
|
+
Switch: Switch
|
|
1481
|
+
});
|
|
1482
|
+
|
|
1483
|
+
const TabsContext = /*#__PURE__*/createContext();
|
|
1484
|
+
const Tabs = ({
|
|
1485
|
+
direction,
|
|
1486
|
+
dense,
|
|
1487
|
+
hasBorder,
|
|
1488
|
+
className,
|
|
1489
|
+
children
|
|
1490
|
+
}) => {
|
|
1491
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
1492
|
+
return /*#__PURE__*/React.createElement(TabsContext.Provider, {
|
|
1493
|
+
value: {
|
|
1494
|
+
activeIndex,
|
|
1495
|
+
setActiveIndex
|
|
1496
|
+
}
|
|
1497
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1498
|
+
className: classnames(['tabs', {
|
|
1499
|
+
[`tabs-${direction}`]: direction,
|
|
1500
|
+
'tabs-dense': dense,
|
|
1501
|
+
'tabs-hasBorder': hasBorder
|
|
1502
|
+
}, className])
|
|
1503
|
+
}, children));
|
|
1504
|
+
};
|
|
1505
|
+
Tabs.propTypes = {
|
|
1506
|
+
direction: PropTypes.oneOf(['portrait', 'landscape']),
|
|
1507
|
+
dense: PropTypes.bool,
|
|
1508
|
+
hasBorder: PropTypes.bool,
|
|
1509
|
+
className: PropTypes.node,
|
|
1510
|
+
children: PropTypes.node.isRequired
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
var Tabs$1 = /*#__PURE__*/Object.freeze({
|
|
1514
|
+
__proto__: null,
|
|
1515
|
+
Tabs: Tabs,
|
|
1516
|
+
TabsContext: TabsContext
|
|
1517
|
+
});
|
|
1518
|
+
|
|
1519
|
+
const Tab = ({
|
|
1520
|
+
index,
|
|
1521
|
+
label,
|
|
1522
|
+
className
|
|
1523
|
+
}) => {
|
|
1524
|
+
const {
|
|
1525
|
+
activeIndex,
|
|
1526
|
+
setActiveIndex
|
|
1527
|
+
} = useContext(TabsContext);
|
|
1528
|
+
const isSelected = activeIndex === index;
|
|
1529
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
1530
|
+
className: classnames(['tab', {
|
|
1531
|
+
'tab-active': isSelected
|
|
1532
|
+
}, className]),
|
|
1533
|
+
role: "tab",
|
|
1534
|
+
"aria-selected": isSelected,
|
|
1535
|
+
"aria-controls": `tabpanel-${index}`,
|
|
1536
|
+
id: `tab-${index}`,
|
|
1537
|
+
tabIndex: isSelected ? 0 : -1,
|
|
1538
|
+
onClick: () => setActiveIndex(index)
|
|
1539
|
+
}, label);
|
|
1540
|
+
};
|
|
1541
|
+
Tab.propTypes = {
|
|
1542
|
+
label: PropTypes.string,
|
|
1543
|
+
className: PropTypes.node.isRequired
|
|
1544
|
+
};
|
|
1545
|
+
|
|
1546
|
+
var Tab$1 = /*#__PURE__*/Object.freeze({
|
|
1547
|
+
__proto__: null,
|
|
1548
|
+
Tab: Tab
|
|
1549
|
+
});
|
|
1550
|
+
|
|
1551
|
+
const TableFooter = ({
|
|
1552
|
+
className,
|
|
1553
|
+
...props
|
|
1554
|
+
}) => {
|
|
1555
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
1556
|
+
className: classnames(['table_footer', className])
|
|
1557
|
+
}, props), /*#__PURE__*/React.createElement(Select, {
|
|
1558
|
+
dense: true,
|
|
1559
|
+
id: "rows",
|
|
1560
|
+
className: "table_rowSelect"
|
|
1561
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
1562
|
+
value: "1"
|
|
1563
|
+
}, "10"), /*#__PURE__*/React.createElement("option", {
|
|
1564
|
+
value: "2"
|
|
1565
|
+
}, "25"), /*#__PURE__*/React.createElement("option", {
|
|
1566
|
+
value: "2"
|
|
1567
|
+
}, "50"), /*#__PURE__*/React.createElement("option", {
|
|
1568
|
+
value: "2"
|
|
1569
|
+
}, "100"), /*#__PURE__*/React.createElement("option", {
|
|
1570
|
+
value: "2"
|
|
1571
|
+
}, "All")), /*#__PURE__*/React.createElement(Buttons, {
|
|
1572
|
+
className: "table_pagination"
|
|
1573
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
1574
|
+
kind: "icon",
|
|
1575
|
+
variant: "transparent",
|
|
1576
|
+
size: "sm"
|
|
1577
|
+
}, /*#__PURE__*/React.createElement(CaretDoubleLeft, null)), /*#__PURE__*/React.createElement(Button, {
|
|
1578
|
+
kind: "icon",
|
|
1579
|
+
variant: "transparent",
|
|
1580
|
+
size: "sm"
|
|
1581
|
+
}, /*#__PURE__*/React.createElement(CaretLeft, null)), /*#__PURE__*/React.createElement(Button, {
|
|
1582
|
+
kind: "icon",
|
|
1583
|
+
size: "sm"
|
|
1584
|
+
}, "1"), /*#__PURE__*/React.createElement(Button, {
|
|
1585
|
+
kind: "icon",
|
|
1586
|
+
variant: "transparent",
|
|
1587
|
+
size: "sm"
|
|
1588
|
+
}, "2"), /*#__PURE__*/React.createElement(Button, {
|
|
1589
|
+
kind: "icon",
|
|
1590
|
+
variant: "transparent",
|
|
1591
|
+
size: "sm"
|
|
1592
|
+
}, "3"), /*#__PURE__*/React.createElement(Button, {
|
|
1593
|
+
kind: "icon",
|
|
1594
|
+
variant: "transparent",
|
|
1595
|
+
size: "sm"
|
|
1596
|
+
}, "\u2026"), /*#__PURE__*/React.createElement(Button, {
|
|
1597
|
+
kind: "icon",
|
|
1598
|
+
variant: "transparent",
|
|
1599
|
+
size: "sm"
|
|
1600
|
+
}, "8"), /*#__PURE__*/React.createElement(Button, {
|
|
1601
|
+
kind: "icon",
|
|
1602
|
+
variant: "transparent",
|
|
1603
|
+
size: "sm"
|
|
1604
|
+
}, /*#__PURE__*/React.createElement(CaretRight, null)), /*#__PURE__*/React.createElement(Button, {
|
|
1605
|
+
kind: "icon",
|
|
1606
|
+
variant: "transparent",
|
|
1607
|
+
size: "sm"
|
|
1608
|
+
}, /*#__PURE__*/React.createElement(CaretDoubleRight, null))));
|
|
1609
|
+
};
|
|
1610
|
+
TableFooter.propTypes = {
|
|
1611
|
+
className: PropTypes.node
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
var TableFooter$1 = /*#__PURE__*/Object.freeze({
|
|
1615
|
+
__proto__: null,
|
|
1616
|
+
TableFooter: TableFooter
|
|
1617
|
+
});
|
|
1618
|
+
|
|
1619
|
+
const DenseContext = /*#__PURE__*/createContext(false);
|
|
1620
|
+
const Table = ({
|
|
1621
|
+
striped,
|
|
1622
|
+
hasHover,
|
|
1623
|
+
dense,
|
|
1624
|
+
border,
|
|
1625
|
+
withFooter,
|
|
1626
|
+
className,
|
|
1627
|
+
children,
|
|
1628
|
+
...props
|
|
1629
|
+
}) => {
|
|
1630
|
+
return /*#__PURE__*/React.createElement(DenseContext.Provider, {
|
|
1631
|
+
value: dense
|
|
1632
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1633
|
+
className: classnames(['table', {
|
|
1634
|
+
'table-striped': striped,
|
|
1635
|
+
'table-hasHover': hasHover,
|
|
1636
|
+
'table-dense': dense,
|
|
1637
|
+
'table-border': border
|
|
1638
|
+
}, className])
|
|
1639
|
+
}, /*#__PURE__*/React.createElement("table", _extends({
|
|
1640
|
+
cellPadding: 0,
|
|
1641
|
+
cellSpacing: 0,
|
|
1642
|
+
className: classnames('table_content')
|
|
1643
|
+
}, props), children), withFooter ? /*#__PURE__*/React.createElement(TableFooter, {
|
|
1644
|
+
dense: dense ? dense : null
|
|
1645
|
+
}) : null));
|
|
1646
|
+
};
|
|
1647
|
+
Table.propTypes = {
|
|
1648
|
+
striped: PropTypes.bool,
|
|
1649
|
+
hasHover: PropTypes.bool,
|
|
1650
|
+
dense: PropTypes.bool,
|
|
1651
|
+
border: PropTypes.bool,
|
|
1652
|
+
withFooter: PropTypes.bool,
|
|
1653
|
+
className: PropTypes.node,
|
|
1654
|
+
children: PropTypes.node.isRequired
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1657
|
+
var Table$1 = /*#__PURE__*/Object.freeze({
|
|
1658
|
+
__proto__: null,
|
|
1659
|
+
DenseContext: DenseContext,
|
|
1660
|
+
Table: Table
|
|
1661
|
+
});
|
|
1662
|
+
|
|
1663
|
+
const TableBody = ({
|
|
1664
|
+
className,
|
|
1665
|
+
children,
|
|
1666
|
+
...props
|
|
1667
|
+
}) => {
|
|
1668
|
+
return /*#__PURE__*/React.createElement("tbody", _extends({
|
|
1669
|
+
className: classnames(['table_body', className])
|
|
1670
|
+
}, props), children);
|
|
1671
|
+
};
|
|
1672
|
+
TableBody.propTypes = {
|
|
1673
|
+
className: PropTypes.node,
|
|
1674
|
+
children: PropTypes.node.isRequired
|
|
1675
|
+
};
|
|
1676
|
+
|
|
1677
|
+
var TableBody$1 = /*#__PURE__*/Object.freeze({
|
|
1678
|
+
__proto__: null,
|
|
1679
|
+
TableBody: TableBody
|
|
1680
|
+
});
|
|
1681
|
+
|
|
1682
|
+
const TableCellComponentContext = /*#__PURE__*/createContext('td');
|
|
1683
|
+
const TableHead = ({
|
|
1684
|
+
className,
|
|
1685
|
+
children,
|
|
1686
|
+
...props
|
|
1687
|
+
}) => {
|
|
1688
|
+
return /*#__PURE__*/React.createElement(TableCellComponentContext.Provider, {
|
|
1689
|
+
value: "th"
|
|
1690
|
+
}, /*#__PURE__*/React.createElement("thead", _extends({
|
|
1691
|
+
className: classnames(['table_head', className])
|
|
1692
|
+
}, props), children));
|
|
1693
|
+
};
|
|
1694
|
+
TableHead.propTypes = {
|
|
1695
|
+
className: PropTypes.node,
|
|
1696
|
+
children: PropTypes.node.isRequired
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
var TableHead$1 = /*#__PURE__*/Object.freeze({
|
|
1700
|
+
__proto__: null,
|
|
1701
|
+
TableCellComponentContext: TableCellComponentContext,
|
|
1702
|
+
TableHead: TableHead
|
|
1703
|
+
});
|
|
1704
|
+
|
|
1705
|
+
const TableCell = ({
|
|
1706
|
+
kind = 'default',
|
|
1707
|
+
className,
|
|
1708
|
+
children,
|
|
1709
|
+
...props
|
|
1710
|
+
}) => {
|
|
1711
|
+
const useTableCellComponent = () => useContext(TableCellComponentContext);
|
|
1712
|
+
const Component = useTableCellComponent();
|
|
1713
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
1714
|
+
className: classnames(['table_cell', {
|
|
1715
|
+
[`table_cell-${kind}`]: kind
|
|
1716
|
+
}, className])
|
|
1717
|
+
}, props), children);
|
|
1718
|
+
};
|
|
1719
|
+
TableCell.propTypes = {
|
|
1720
|
+
kind: PropTypes.oneOf(['default', 'number', 'action']),
|
|
1721
|
+
className: PropTypes.node,
|
|
1722
|
+
children: PropTypes.node.isRequired
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1725
|
+
var TableCell$1 = /*#__PURE__*/Object.freeze({
|
|
1726
|
+
__proto__: null,
|
|
1727
|
+
TableCell: TableCell
|
|
1728
|
+
});
|
|
1729
|
+
|
|
1730
|
+
const TableRow = ({
|
|
1731
|
+
className,
|
|
1732
|
+
children,
|
|
1733
|
+
...props
|
|
1734
|
+
}) => {
|
|
1735
|
+
return /*#__PURE__*/React.createElement("tr", _extends({
|
|
1736
|
+
className: classnames(['table_row', className])
|
|
1737
|
+
}, props), children);
|
|
1738
|
+
};
|
|
1739
|
+
TableRow.propTypes = {
|
|
1740
|
+
className: PropTypes.node,
|
|
1741
|
+
children: PropTypes.node.isRequired
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1744
|
+
var TableRow$1 = /*#__PURE__*/Object.freeze({
|
|
1745
|
+
__proto__: null,
|
|
1746
|
+
TableRow: TableRow
|
|
1747
|
+
});
|
|
1748
|
+
|
|
1749
|
+
const TabsControl = ({
|
|
1750
|
+
className,
|
|
1751
|
+
children
|
|
1752
|
+
}) => {
|
|
1753
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1754
|
+
role: "tablist",
|
|
1755
|
+
className: classnames(['tabs_controls', className])
|
|
1756
|
+
}, children);
|
|
1757
|
+
};
|
|
1758
|
+
TabsControl.propTypes = {
|
|
1759
|
+
className: PropTypes.node,
|
|
1760
|
+
children: PropTypes.node.isRequired
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
var TabsControl$1 = /*#__PURE__*/Object.freeze({
|
|
1764
|
+
__proto__: null,
|
|
1765
|
+
TabsControl: TabsControl
|
|
1766
|
+
});
|
|
1767
|
+
|
|
1768
|
+
const TabsPanel = ({
|
|
1769
|
+
index,
|
|
1770
|
+
className,
|
|
1771
|
+
children
|
|
1772
|
+
}) => {
|
|
1773
|
+
const {
|
|
1774
|
+
activeIndex
|
|
1775
|
+
} = useContext(TabsContext);
|
|
1776
|
+
const isActive = activeIndex === index;
|
|
1777
|
+
return isActive ? /*#__PURE__*/React.createElement("div", {
|
|
1778
|
+
className: classnames(['tabs_panel', className]),
|
|
1779
|
+
role: "tabpanel",
|
|
1780
|
+
id: `tabpanel-${index}`,
|
|
1781
|
+
"aria-labelledby": `tab-${index}`,
|
|
1782
|
+
hidden: !isActive
|
|
1783
|
+
}, children) : null;
|
|
1784
|
+
};
|
|
1785
|
+
TabsPanel.propTypes = {
|
|
1786
|
+
className: PropTypes.node,
|
|
1787
|
+
children: PropTypes.node.isRequired
|
|
1788
|
+
};
|
|
1789
|
+
|
|
1790
|
+
var TabsPanel$1 = /*#__PURE__*/Object.freeze({
|
|
1791
|
+
__proto__: null,
|
|
1792
|
+
TabsPanel: TabsPanel
|
|
1793
|
+
});
|
|
1794
|
+
|
|
1247
1795
|
const Tag = ({
|
|
1248
1796
|
color = 'primary',
|
|
1249
1797
|
dense,
|
|
@@ -1265,6 +1813,11 @@ Tag.propTypes = {
|
|
|
1265
1813
|
children: PropTypes.node.isRequired
|
|
1266
1814
|
};
|
|
1267
1815
|
|
|
1816
|
+
var Tag$1 = /*#__PURE__*/Object.freeze({
|
|
1817
|
+
__proto__: null,
|
|
1818
|
+
Tag: Tag
|
|
1819
|
+
});
|
|
1820
|
+
|
|
1268
1821
|
const Textarea = ({
|
|
1269
1822
|
onChange,
|
|
1270
1823
|
id,
|
|
@@ -1322,4 +1875,9 @@ Textarea.propTypes = {
|
|
|
1322
1875
|
className: PropTypes.node
|
|
1323
1876
|
};
|
|
1324
1877
|
|
|
1325
|
-
|
|
1878
|
+
var Textarea$1 = /*#__PURE__*/Object.freeze({
|
|
1879
|
+
__proto__: null,
|
|
1880
|
+
Textarea: Textarea
|
|
1881
|
+
});
|
|
1882
|
+
|
|
1883
|
+
export { Alert$1 as Alert, Breadcrumbs$1 as Breadcrumbs, Button$1 as Button, Buttons$1 as Buttons, Card$1 as Card, CardActions$1 as CardActions, CardContent$1 as CardContent, CardHeader$1 as CardHeader, CardMedia$1 as CardMedia, Checkbox$1 as Checkbox, Checkboxes$1 as Checkboxes, Color$1 as Color, Display$1 as Display, Divider$1 as Divider, Grid$1 as Grid, Input$1 as Input, InputLabel$1 as InputLabel, Link$1 as Link, List$1 as List, ListItem$1 as ListItem, Nav$1 as Nav, NavBar$1 as NavBar, NavItem$1 as NavItem, Radio$1 as Radio, RadioButtons$1 as RadioButtons, Section$1 as Section, SectionContent$1 as SectionContent, SectionHeader$1 as SectionHeader, Select$1 as Select, Snippet$1 as Snippet, Status$1 as Status, Switch$1 as Switch, Tab$1 as Tab, Table$1 as Table, TableBody$1 as TableBody, TableCell$1 as TableCell, TableFooter$1 as TableFooter, TableHead$1 as TableHead, TableRow$1 as TableRow, Tabs$1 as Tabs, TabsControl$1 as TabsControl, TabsPanel$1 as TabsPanel, Tag$1 as Tag, Text$1 as Text, Textarea$1 as Textarea };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pallote-react",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"styles": "dist/index.css",
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
"react-router-dom": "^7.3.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@babel/preset-react": "^7.26.3",
|
|
23
22
|
"@phosphor-icons/react": "^2.1.7",
|
|
24
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
25
23
|
"classnames": "^2.5.1",
|
|
26
24
|
"react-syntax-highlighter": "^15.6.1",
|
|
27
25
|
"sass": "^1.71.1",
|