react-asc 21.1.1 → 21.2.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/components/Table/TableBody.d.ts +2 -0
- package/components/Table/TableCell.d.ts +5 -0
- package/components/Table/TableContext.d.ts +6 -0
- package/components/Table/TableHead.d.ts +2 -0
- package/components/Table/TableRow.d.ts +2 -0
- package/components/Table/index.d.ts +4 -0
- package/index.es.js +31 -2
- package/index.js +33 -0
- package/package.json +1 -1
package/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef, Fragment, Component, createRef, cloneElement } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useRef, Fragment, Component, createRef, cloneElement, createContext, useContext } from 'react';
|
|
2
2
|
import { createPortal, render, unmountComponentAtNode } from 'react-dom';
|
|
3
3
|
import { createPopper } from '@popperjs/core';
|
|
4
4
|
|
|
@@ -2304,6 +2304,35 @@ const Table = (props) => {
|
|
|
2304
2304
|
React.createElement("table", { className: getCssClasses() }, children)));
|
|
2305
2305
|
};
|
|
2306
2306
|
|
|
2307
|
+
const TableRow = (props) => {
|
|
2308
|
+
const { children } = props, rest = __rest(props, ["children"]);
|
|
2309
|
+
return (React.createElement("tr", Object.assign({}, rest), children));
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
const TableContext = createContext({
|
|
2313
|
+
variant: 'head'
|
|
2314
|
+
});
|
|
2315
|
+
const useTableContext = () => useContext(TableContext);
|
|
2316
|
+
|
|
2317
|
+
const TableHead = (props) => {
|
|
2318
|
+
const { children } = props, rest = __rest(props, ["children"]);
|
|
2319
|
+
return (React.createElement(TableContext.Provider, { value: { variant: 'head' } },
|
|
2320
|
+
React.createElement("thead", Object.assign({}, rest), children)));
|
|
2321
|
+
};
|
|
2322
|
+
|
|
2323
|
+
const TableBody = (props) => {
|
|
2324
|
+
const { children } = props, rest = __rest(props, ["children"]);
|
|
2325
|
+
return (React.createElement(TableContext.Provider, { value: { variant: 'body' } },
|
|
2326
|
+
React.createElement("tbody", Object.assign({}, rest), children)));
|
|
2327
|
+
};
|
|
2328
|
+
|
|
2329
|
+
const TableCell = (props) => {
|
|
2330
|
+
const { variant } = useTableContext();
|
|
2331
|
+
const { children, component } = props, rest = __rest(props, ["children", "component"]);
|
|
2332
|
+
return (React.createElement(ConditionalWrapper, { condition: true, wrapper: children => ((variant === 'head' || component === 'th') ? (React.createElement("th", Object.assign({}, rest), children)) :
|
|
2333
|
+
React.createElement("td", Object.assign({}, rest), children)) }, children));
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2307
2336
|
var css_248z$5 = ".TabIndicator-module_tabIndicator__jSJhH {\n bottom: 0;\n height: 2px;\n position: absolute;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n .TabIndicator-module_tabIndicator__jSJhH.TabIndicator-module_primary__Q5jEo {\n background-color: var(--primary); }\n .TabIndicator-module_tabIndicator__jSJhH.TabIndicator-module_accent__qbgIG {\n background-color: var(--accent); }\n";
|
|
2308
2337
|
var styles$5 = {"tabIndicator":"TabIndicator-module_tabIndicator__jSJhH","primary":"TabIndicator-module_primary__Q5jEo","accent":"TabIndicator-module_accent__qbgIG"};
|
|
2309
2338
|
styleInject(css_248z$5);
|
|
@@ -2620,4 +2649,4 @@ const TreeItem = (props) => {
|
|
|
2620
2649
|
children && _isExpanded ? React.createElement("ul", null, children) : null));
|
|
2621
2650
|
};
|
|
2622
2651
|
|
|
2623
|
-
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, COLOR, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Column, ConditionalWrapper, DATEMODE, DateSelect, DaySelect, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, MODALBUTTONTYPE, MODALTYPE, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Row, SIZE, STATUS, SecondSelect, Select, Sidebar, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TreeItem, TreeView, Typography, VARIANT, YearSelect, loadingIndicatorService, modalService, snackbarService, useConstructor, useCssClasses, useDebounce, useHover, useWindowSize };
|
|
2652
|
+
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, COLOR, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Column, ConditionalWrapper, DATEMODE, DateSelect, DaySelect, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, MODALBUTTONTYPE, MODALTYPE, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Row, SIZE, STATUS, SecondSelect, Select, Sidebar, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TreeItem, TreeView, Typography, VARIANT, YearSelect, loadingIndicatorService, modalService, snackbarService, useConstructor, useCssClasses, useDebounce, useHover, useWindowSize };
|
package/index.js
CHANGED
|
@@ -2312,6 +2312,35 @@ const Table = (props) => {
|
|
|
2312
2312
|
React__default["default"].createElement("table", { className: getCssClasses() }, children)));
|
|
2313
2313
|
};
|
|
2314
2314
|
|
|
2315
|
+
const TableRow = (props) => {
|
|
2316
|
+
const { children } = props, rest = __rest(props, ["children"]);
|
|
2317
|
+
return (React__default["default"].createElement("tr", Object.assign({}, rest), children));
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
const TableContext = React.createContext({
|
|
2321
|
+
variant: 'head'
|
|
2322
|
+
});
|
|
2323
|
+
const useTableContext = () => React.useContext(TableContext);
|
|
2324
|
+
|
|
2325
|
+
const TableHead = (props) => {
|
|
2326
|
+
const { children } = props, rest = __rest(props, ["children"]);
|
|
2327
|
+
return (React__default["default"].createElement(TableContext.Provider, { value: { variant: 'head' } },
|
|
2328
|
+
React__default["default"].createElement("thead", Object.assign({}, rest), children)));
|
|
2329
|
+
};
|
|
2330
|
+
|
|
2331
|
+
const TableBody = (props) => {
|
|
2332
|
+
const { children } = props, rest = __rest(props, ["children"]);
|
|
2333
|
+
return (React__default["default"].createElement(TableContext.Provider, { value: { variant: 'body' } },
|
|
2334
|
+
React__default["default"].createElement("tbody", Object.assign({}, rest), children)));
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2337
|
+
const TableCell = (props) => {
|
|
2338
|
+
const { variant } = useTableContext();
|
|
2339
|
+
const { children, component } = props, rest = __rest(props, ["children", "component"]);
|
|
2340
|
+
return (React__default["default"].createElement(ConditionalWrapper, { condition: true, wrapper: children => ((variant === 'head' || component === 'th') ? (React__default["default"].createElement("th", Object.assign({}, rest), children)) :
|
|
2341
|
+
React__default["default"].createElement("td", Object.assign({}, rest), children)) }, children));
|
|
2342
|
+
};
|
|
2343
|
+
|
|
2315
2344
|
var css_248z$5 = ".TabIndicator-module_tabIndicator__jSJhH {\n bottom: 0;\n height: 2px;\n position: absolute;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n .TabIndicator-module_tabIndicator__jSJhH.TabIndicator-module_primary__Q5jEo {\n background-color: var(--primary); }\n .TabIndicator-module_tabIndicator__jSJhH.TabIndicator-module_accent__qbgIG {\n background-color: var(--accent); }\n";
|
|
2316
2345
|
var styles$5 = {"tabIndicator":"TabIndicator-module_tabIndicator__jSJhH","primary":"TabIndicator-module_primary__Q5jEo","accent":"TabIndicator-module_accent__qbgIG"};
|
|
2317
2346
|
styleInject(css_248z$5);
|
|
@@ -2720,6 +2749,10 @@ exports.StepperActions = StepperActions;
|
|
|
2720
2749
|
exports.Tab = Tab;
|
|
2721
2750
|
exports.TabPanel = TabPanel;
|
|
2722
2751
|
exports.Table = Table;
|
|
2752
|
+
exports.TableBody = TableBody;
|
|
2753
|
+
exports.TableCell = TableCell;
|
|
2754
|
+
exports.TableHead = TableHead;
|
|
2755
|
+
exports.TableRow = TableRow;
|
|
2723
2756
|
exports.Tabs = Tabs;
|
|
2724
2757
|
exports.Textarea = Textarea;
|
|
2725
2758
|
exports.TimeSelect = TimeSelect;
|