pallote-react 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +262 -5
- package/package.json +4 -5
- package/pallote-react-0.6.0.tgz +0 -0
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import React__default, { useState, useEffect, useRef, createContext, useContext } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
|
-
import { X, CalendarBlank, Clock, CaretUpDown, ArrowSquareOut } from '@phosphor-icons/react';
|
|
6
|
+
import { X, CalendarBlank, Clock, CaretUpDown, ArrowSquareOut, CaretDoubleLeft, CaretLeft, CaretRight, CaretDoubleRight } from '@phosphor-icons/react';
|
|
7
7
|
import SyntaxHighlighter from 'react-syntax-highlighter';
|
|
8
8
|
|
|
9
9
|
const Color = ({
|
|
@@ -2830,8 +2830,6 @@ const NavBar = ({
|
|
|
2830
2830
|
}, props), /*#__PURE__*/React__default.createElement("div", {
|
|
2831
2831
|
className: "navbar_main"
|
|
2832
2832
|
}, /*#__PURE__*/React__default.createElement(HomeLinkComponent, {
|
|
2833
|
-
to: "/",
|
|
2834
|
-
exact: true,
|
|
2835
2833
|
className: "navbar_logo"
|
|
2836
2834
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
2837
2835
|
src: "https://pallote.com/logos/pallote-logo.svg",
|
|
@@ -3275,6 +3273,265 @@ Switch.propTypes = {
|
|
|
3275
3273
|
className: PropTypes.node
|
|
3276
3274
|
};
|
|
3277
3275
|
|
|
3276
|
+
const TabsContext = /*#__PURE__*/createContext();
|
|
3277
|
+
const Tabs = ({
|
|
3278
|
+
direction,
|
|
3279
|
+
dense,
|
|
3280
|
+
hasBorder,
|
|
3281
|
+
className,
|
|
3282
|
+
children
|
|
3283
|
+
}) => {
|
|
3284
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
3285
|
+
return /*#__PURE__*/React__default.createElement(TabsContext.Provider, {
|
|
3286
|
+
value: {
|
|
3287
|
+
activeIndex,
|
|
3288
|
+
setActiveIndex
|
|
3289
|
+
}
|
|
3290
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3291
|
+
className: classnames(['tabs', {
|
|
3292
|
+
[`tabs-${direction}`]: direction,
|
|
3293
|
+
'tabs-dense': dense,
|
|
3294
|
+
'tabs-hasBorder': hasBorder
|
|
3295
|
+
}, className])
|
|
3296
|
+
}, children));
|
|
3297
|
+
};
|
|
3298
|
+
Tabs.propTypes = {
|
|
3299
|
+
direction: PropTypes.oneOf(['portrait', 'landscape']),
|
|
3300
|
+
dense: PropTypes.bool,
|
|
3301
|
+
hasBorder: PropTypes.bool,
|
|
3302
|
+
className: PropTypes.node,
|
|
3303
|
+
children: PropTypes.node.isRequired
|
|
3304
|
+
};
|
|
3305
|
+
|
|
3306
|
+
const Tab = ({
|
|
3307
|
+
index,
|
|
3308
|
+
label,
|
|
3309
|
+
className
|
|
3310
|
+
}) => {
|
|
3311
|
+
const {
|
|
3312
|
+
activeIndex,
|
|
3313
|
+
setActiveIndex
|
|
3314
|
+
} = useContext(TabsContext);
|
|
3315
|
+
const isSelected = activeIndex === index;
|
|
3316
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
3317
|
+
className: classnames(['tab', {
|
|
3318
|
+
'tab-active': isSelected
|
|
3319
|
+
}, className]),
|
|
3320
|
+
role: "tab",
|
|
3321
|
+
"aria-selected": isSelected,
|
|
3322
|
+
"aria-controls": `tabpanel-${index}`,
|
|
3323
|
+
id: `tab-${index}`,
|
|
3324
|
+
tabIndex: isSelected ? 0 : -1,
|
|
3325
|
+
onClick: () => setActiveIndex(index)
|
|
3326
|
+
}, label);
|
|
3327
|
+
};
|
|
3328
|
+
Tab.propTypes = {
|
|
3329
|
+
label: PropTypes.string,
|
|
3330
|
+
className: PropTypes.node.isRequired
|
|
3331
|
+
};
|
|
3332
|
+
|
|
3333
|
+
const TableFooter = ({
|
|
3334
|
+
className,
|
|
3335
|
+
...props
|
|
3336
|
+
}) => {
|
|
3337
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
3338
|
+
className: classnames(['table_footer', className])
|
|
3339
|
+
}, props), /*#__PURE__*/React__default.createElement(Select, {
|
|
3340
|
+
dense: true,
|
|
3341
|
+
id: "rows",
|
|
3342
|
+
className: "table_rowSelect"
|
|
3343
|
+
}, /*#__PURE__*/React__default.createElement("option", {
|
|
3344
|
+
value: "1"
|
|
3345
|
+
}, "10"), /*#__PURE__*/React__default.createElement("option", {
|
|
3346
|
+
value: "2"
|
|
3347
|
+
}, "25"), /*#__PURE__*/React__default.createElement("option", {
|
|
3348
|
+
value: "2"
|
|
3349
|
+
}, "50"), /*#__PURE__*/React__default.createElement("option", {
|
|
3350
|
+
value: "2"
|
|
3351
|
+
}, "100"), /*#__PURE__*/React__default.createElement("option", {
|
|
3352
|
+
value: "2"
|
|
3353
|
+
}, "All")), /*#__PURE__*/React__default.createElement(Buttons, {
|
|
3354
|
+
className: "table_pagination"
|
|
3355
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
3356
|
+
kind: "icon",
|
|
3357
|
+
variant: "transparent",
|
|
3358
|
+
size: "sm"
|
|
3359
|
+
}, /*#__PURE__*/React__default.createElement(CaretDoubleLeft, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
3360
|
+
kind: "icon",
|
|
3361
|
+
variant: "transparent",
|
|
3362
|
+
size: "sm"
|
|
3363
|
+
}, /*#__PURE__*/React__default.createElement(CaretLeft, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
3364
|
+
kind: "icon",
|
|
3365
|
+
size: "sm"
|
|
3366
|
+
}, "1"), /*#__PURE__*/React__default.createElement(Button, {
|
|
3367
|
+
kind: "icon",
|
|
3368
|
+
variant: "transparent",
|
|
3369
|
+
size: "sm"
|
|
3370
|
+
}, "2"), /*#__PURE__*/React__default.createElement(Button, {
|
|
3371
|
+
kind: "icon",
|
|
3372
|
+
variant: "transparent",
|
|
3373
|
+
size: "sm"
|
|
3374
|
+
}, "3"), /*#__PURE__*/React__default.createElement(Button, {
|
|
3375
|
+
kind: "icon",
|
|
3376
|
+
variant: "transparent",
|
|
3377
|
+
size: "sm"
|
|
3378
|
+
}, "\u2026"), /*#__PURE__*/React__default.createElement(Button, {
|
|
3379
|
+
kind: "icon",
|
|
3380
|
+
variant: "transparent",
|
|
3381
|
+
size: "sm"
|
|
3382
|
+
}, "8"), /*#__PURE__*/React__default.createElement(Button, {
|
|
3383
|
+
kind: "icon",
|
|
3384
|
+
variant: "transparent",
|
|
3385
|
+
size: "sm"
|
|
3386
|
+
}, /*#__PURE__*/React__default.createElement(CaretRight, null)), /*#__PURE__*/React__default.createElement(Button, {
|
|
3387
|
+
kind: "icon",
|
|
3388
|
+
variant: "transparent",
|
|
3389
|
+
size: "sm"
|
|
3390
|
+
}, /*#__PURE__*/React__default.createElement(CaretDoubleRight, null))));
|
|
3391
|
+
};
|
|
3392
|
+
TableFooter.propTypes = {
|
|
3393
|
+
className: PropTypes.node
|
|
3394
|
+
};
|
|
3395
|
+
|
|
3396
|
+
const DenseContext = /*#__PURE__*/createContext(false);
|
|
3397
|
+
const Table = ({
|
|
3398
|
+
striped,
|
|
3399
|
+
hasHover,
|
|
3400
|
+
dense,
|
|
3401
|
+
border,
|
|
3402
|
+
withFooter,
|
|
3403
|
+
className,
|
|
3404
|
+
children,
|
|
3405
|
+
...props
|
|
3406
|
+
}) => {
|
|
3407
|
+
return /*#__PURE__*/React__default.createElement(DenseContext.Provider, {
|
|
3408
|
+
value: dense
|
|
3409
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3410
|
+
className: classnames(['table', {
|
|
3411
|
+
'table-striped': striped,
|
|
3412
|
+
'table-hasHover': hasHover,
|
|
3413
|
+
'table-dense': dense,
|
|
3414
|
+
'table-border': border
|
|
3415
|
+
}, className])
|
|
3416
|
+
}, /*#__PURE__*/React__default.createElement("table", _extends({
|
|
3417
|
+
cellPadding: 0,
|
|
3418
|
+
cellSpacing: 0,
|
|
3419
|
+
className: classnames('table_content')
|
|
3420
|
+
}, props), children), withFooter ? /*#__PURE__*/React__default.createElement(TableFooter, {
|
|
3421
|
+
dense: dense ? dense : null
|
|
3422
|
+
}) : null));
|
|
3423
|
+
};
|
|
3424
|
+
Table.propTypes = {
|
|
3425
|
+
striped: PropTypes.bool,
|
|
3426
|
+
hasHover: PropTypes.bool,
|
|
3427
|
+
dense: PropTypes.bool,
|
|
3428
|
+
border: PropTypes.bool,
|
|
3429
|
+
withFooter: PropTypes.bool,
|
|
3430
|
+
className: PropTypes.node,
|
|
3431
|
+
children: PropTypes.node.isRequired
|
|
3432
|
+
};
|
|
3433
|
+
|
|
3434
|
+
const TableBody = ({
|
|
3435
|
+
className,
|
|
3436
|
+
children,
|
|
3437
|
+
...props
|
|
3438
|
+
}) => {
|
|
3439
|
+
return /*#__PURE__*/React__default.createElement("tbody", _extends({
|
|
3440
|
+
className: classnames(['table_body', className])
|
|
3441
|
+
}, props), children);
|
|
3442
|
+
};
|
|
3443
|
+
TableBody.propTypes = {
|
|
3444
|
+
className: PropTypes.node,
|
|
3445
|
+
children: PropTypes.node.isRequired
|
|
3446
|
+
};
|
|
3447
|
+
|
|
3448
|
+
const TableCellComponentContext = /*#__PURE__*/createContext('td');
|
|
3449
|
+
const TableHead = ({
|
|
3450
|
+
className,
|
|
3451
|
+
children,
|
|
3452
|
+
...props
|
|
3453
|
+
}) => {
|
|
3454
|
+
return /*#__PURE__*/React__default.createElement(TableCellComponentContext.Provider, {
|
|
3455
|
+
value: "th"
|
|
3456
|
+
}, /*#__PURE__*/React__default.createElement("thead", _extends({
|
|
3457
|
+
className: classnames(['table_head', className])
|
|
3458
|
+
}, props), children));
|
|
3459
|
+
};
|
|
3460
|
+
TableHead.propTypes = {
|
|
3461
|
+
className: PropTypes.node,
|
|
3462
|
+
children: PropTypes.node.isRequired
|
|
3463
|
+
};
|
|
3464
|
+
|
|
3465
|
+
const TableCell = ({
|
|
3466
|
+
kind = 'default',
|
|
3467
|
+
className,
|
|
3468
|
+
children,
|
|
3469
|
+
...props
|
|
3470
|
+
}) => {
|
|
3471
|
+
const useTableCellComponent = () => useContext(TableCellComponentContext);
|
|
3472
|
+
const Component = useTableCellComponent();
|
|
3473
|
+
return /*#__PURE__*/React__default.createElement(Component, _extends({
|
|
3474
|
+
className: classnames(['table_cell', {
|
|
3475
|
+
[`table_cell-${kind}`]: kind
|
|
3476
|
+
}, className])
|
|
3477
|
+
}, props), children);
|
|
3478
|
+
};
|
|
3479
|
+
TableCell.propTypes = {
|
|
3480
|
+
kind: PropTypes.oneOf(['default', 'number', 'action']),
|
|
3481
|
+
className: PropTypes.node,
|
|
3482
|
+
children: PropTypes.node.isRequired
|
|
3483
|
+
};
|
|
3484
|
+
|
|
3485
|
+
const TableRow = ({
|
|
3486
|
+
className,
|
|
3487
|
+
children,
|
|
3488
|
+
...props
|
|
3489
|
+
}) => {
|
|
3490
|
+
return /*#__PURE__*/React__default.createElement("tr", _extends({
|
|
3491
|
+
className: classnames(['table_row', className])
|
|
3492
|
+
}, props), children);
|
|
3493
|
+
};
|
|
3494
|
+
TableRow.propTypes = {
|
|
3495
|
+
className: PropTypes.node,
|
|
3496
|
+
children: PropTypes.node.isRequired
|
|
3497
|
+
};
|
|
3498
|
+
|
|
3499
|
+
const TabsControl = ({
|
|
3500
|
+
className,
|
|
3501
|
+
children
|
|
3502
|
+
}) => {
|
|
3503
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3504
|
+
role: "tablist",
|
|
3505
|
+
className: classnames(['tabs_controls', className])
|
|
3506
|
+
}, children);
|
|
3507
|
+
};
|
|
3508
|
+
TabsControl.propTypes = {
|
|
3509
|
+
className: PropTypes.node,
|
|
3510
|
+
children: PropTypes.node.isRequired
|
|
3511
|
+
};
|
|
3512
|
+
|
|
3513
|
+
const TabsPanel = ({
|
|
3514
|
+
index,
|
|
3515
|
+
className,
|
|
3516
|
+
children
|
|
3517
|
+
}) => {
|
|
3518
|
+
const {
|
|
3519
|
+
activeIndex
|
|
3520
|
+
} = useContext(TabsContext);
|
|
3521
|
+
const isActive = activeIndex === index;
|
|
3522
|
+
return isActive ? /*#__PURE__*/React__default.createElement("div", {
|
|
3523
|
+
className: classnames(['tabs_panel', className]),
|
|
3524
|
+
role: "tabpanel",
|
|
3525
|
+
id: `tabpanel-${index}`,
|
|
3526
|
+
"aria-labelledby": `tab-${index}`,
|
|
3527
|
+
hidden: !isActive
|
|
3528
|
+
}, children) : null;
|
|
3529
|
+
};
|
|
3530
|
+
TabsPanel.propTypes = {
|
|
3531
|
+
className: PropTypes.node,
|
|
3532
|
+
children: PropTypes.node.isRequired
|
|
3533
|
+
};
|
|
3534
|
+
|
|
3278
3535
|
const Tag = ({
|
|
3279
3536
|
color = 'primary',
|
|
3280
3537
|
dense,
|
|
@@ -3353,4 +3610,4 @@ Textarea.propTypes = {
|
|
|
3353
3610
|
className: PropTypes.node
|
|
3354
3611
|
};
|
|
3355
3612
|
|
|
3356
|
-
export { Alert, Breadcrumbs, Button, Buttons, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Checkboxes, Color, Display, Divider, Grid, Input, InputLabel, Link$1 as Link, List, ListItem, Nav, NavBar, NavItem, Radio, RadioButtons, Section, SectionContent, SectionHeader, Select, Snippet, Status, Switch, Tag, Text, Textarea };
|
|
3613
|
+
export { Alert, Breadcrumbs, Button, Buttons, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Checkboxes, Color, Display, Divider, Grid, Input, InputLabel, Link$1 as Link, List, ListItem, Nav, NavBar, NavItem, Radio, RadioButtons, Section, SectionContent, SectionHeader, Select, Snippet, Status, Switch, Tab, Table, TableBody, TableCell, TableFooter, TableHead, TableRow, Tabs, TabsControl, TabsPanel, Tag, Text, Textarea };
|
package/package.json
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pallote-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"styles": "dist/index.css",
|
|
7
7
|
"files": [
|
|
8
8
|
"README.md",
|
|
9
9
|
"index.js",
|
|
10
|
-
"package.json"
|
|
11
|
-
"pallote-react-0.6.0.tgz"
|
|
10
|
+
"package.json"
|
|
12
11
|
],
|
|
13
12
|
"keywords": [],
|
|
14
13
|
"author": "",
|
|
15
14
|
"license": "ISC",
|
|
16
15
|
"peerDependencies": {
|
|
17
|
-
"react": "^
|
|
18
|
-
"react-dom": "^
|
|
16
|
+
"react": "^19.0.0",
|
|
17
|
+
"react-dom": "^19.0.0"
|
|
19
18
|
},
|
|
20
19
|
"dependencies": {
|
|
21
20
|
"@babel/preset-react": "^7.26.3",
|
package/pallote-react-0.6.0.tgz
DELETED
|
Binary file
|