onekijs-ui 0.19.1 → 0.19.3
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/dist/components/card/typings.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -29
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +32 -30
- package/dist/index.module.js.map +1 -1
- package/dist/styles/border.d.ts +1 -1
- package/dist/styles/typography.d.ts +2 -2
- package/package.json +4 -4
|
@@ -5,14 +5,14 @@ export type CardProps = {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
collapsable?: boolean;
|
|
7
7
|
animate?: number;
|
|
8
|
-
title: string;
|
|
8
|
+
title: string | ReactNode;
|
|
9
9
|
TitleComponent?: FC<CardTitleProps>;
|
|
10
10
|
icon?: ReactNode;
|
|
11
11
|
open?: boolean;
|
|
12
12
|
onToggle?: () => void;
|
|
13
13
|
};
|
|
14
14
|
export type CardTitleProps = {
|
|
15
|
-
title: string;
|
|
15
|
+
title: string | ReactNode;
|
|
16
16
|
icon?: ReactNode;
|
|
17
17
|
onToggle: () => void;
|
|
18
18
|
open: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,7 @@ export { default as TableFilterOperatorComponent } from './components/table/comp
|
|
|
135
135
|
export { default as TableInputFilterComponent } from './components/table/components/filters/TableInputFilterComponent';
|
|
136
136
|
export { default as TableNumberFilterComponent } from './components/table/components/filters/TableNumberFilterComponent';
|
|
137
137
|
export { default as TableTextFilterComponent } from './components/table/components/filters/TableTextFilterComponent';
|
|
138
|
+
export { default as TableBodyRowComponent } from './components/table/components/TableBodyRowComponent';
|
|
138
139
|
export { default as useCheckboxColumn } from './components/table/hooks/useCheckboxColumn';
|
|
139
140
|
export { default as useColumns } from './components/table/hooks/useColumns';
|
|
140
141
|
export { default as useEnumColumn } from './components/table/hooks/useEnumColumn';
|
|
@@ -144,6 +145,7 @@ export { default as useLinkColumn } from './components/table/hooks/useLinkColumn
|
|
|
144
145
|
export { default as useNumberColumn } from './components/table/hooks/useNumberColumn';
|
|
145
146
|
export { default as useSelectColumn } from './components/table/hooks/useSelectColumn';
|
|
146
147
|
export { default as useTableController } from './components/table/hooks/useTableController';
|
|
148
|
+
export { default as useTableService } from './components/table/hooks/useTableService';
|
|
147
149
|
export { default as useTextColumn } from './components/table/hooks/useTextColumn';
|
|
148
150
|
export { default as useTextareaColumn } from './components/table/hooks/useTextareaColumn';
|
|
149
151
|
export { ArrayTableProps, Cell, CheckboxColumn, CheckboxColumnOptions, ControllerTableProps, EnumColumnOptions, FormTableContext, FormTableProps, InputColumn, InputColumnOptions, LinkColumnOptions, SelectCell, SelectColumn, SelectColumnOptions, TableBodyCellProps, TableBodyProps, TableBodyRowProps, TableColumn, TableColumnComputedWidth, TableColumnOptions, TableColumnSpec, TableColumnWidth, TableColumnsState, TableConfig, TableController, TableExpandedProps, TableFilterOperator, TableFilterOperatorProps, TableFooterCellProps, TableFooterProps, TableHeaderCellProps, TableHeaderProps, TableItem, TableItemAdaptee, TableItemAdapter, TableItems, TableNotFoundProps, TableProps, TableRowHandler, TableSortProps, TableState, TextareaColumn, TextareaColumnOptions, UseTableOptions, UseTableController, } from './components/table/typings';
|
package/dist/index.js
CHANGED
|
@@ -1527,7 +1527,7 @@ SubmitButton.displayName = 'SubmitButton';
|
|
|
1527
1527
|
const CardTitle = ({ collapsable = true, open, title, onToggle }) => {
|
|
1528
1528
|
return (React.createElement("div", { className: "o-card-title-container", onClick: onToggle },
|
|
1529
1529
|
collapsable && React.createElement(TogglerIcon, { open: open }),
|
|
1530
|
-
React.createElement("
|
|
1530
|
+
React.createElement("div", { className: "o-card-title" }, title)));
|
|
1531
1531
|
};
|
|
1532
1532
|
|
|
1533
1533
|
const CardComponent = ({ TitleComponent = CardTitle, open = true, className, title, animate = 150, icon, collapsable = true, children, onToggle, }) => {
|
|
@@ -1568,6 +1568,34 @@ const CardComponent = ({ TitleComponent = CardTitle, open = true, className, tit
|
|
|
1568
1568
|
React.createElement("div", { className: "o-card-content" }, children)))));
|
|
1569
1569
|
};
|
|
1570
1570
|
|
|
1571
|
+
// initial; 1; auto; none;
|
|
1572
|
+
const flexValues = {
|
|
1573
|
+
initial: '0 1 auto',
|
|
1574
|
+
1: '1 1 0%',
|
|
1575
|
+
auto: '1 1 auto',
|
|
1576
|
+
none: 'none',
|
|
1577
|
+
};
|
|
1578
|
+
const flexFormatter = enumFormatter(flexValues);
|
|
1579
|
+
const flex = cssProperty('flex', flexFormatter);
|
|
1580
|
+
// row; row-reverse; column; column-reverse
|
|
1581
|
+
const flexBasis = cssProperty('flex-basic');
|
|
1582
|
+
// row; row-reverse; column; column-reverse
|
|
1583
|
+
const flexDirection = cssProperty('flex-direction');
|
|
1584
|
+
// true; false
|
|
1585
|
+
const flexGrow = cssProperty('flex-grow');
|
|
1586
|
+
// true; false
|
|
1587
|
+
const flexShrink = cssProperty('flex-shrink');
|
|
1588
|
+
// nowrap; wrap; wrap-reverse;
|
|
1589
|
+
const flexWrap = cssProperty('flex-wrap');
|
|
1590
|
+
// first; last; none; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12
|
|
1591
|
+
const orderValues = {
|
|
1592
|
+
first: '-9999',
|
|
1593
|
+
last: '9999',
|
|
1594
|
+
none: '0',
|
|
1595
|
+
};
|
|
1596
|
+
const orderFormatter = enumFormatter(orderValues);
|
|
1597
|
+
const order = cssProperty('order', orderFormatter);
|
|
1598
|
+
|
|
1571
1599
|
const cardStyle = ({ theme, collapsable = true, animate = 150, bordered = true, open, }) => {
|
|
1572
1600
|
const t = theme.card;
|
|
1573
1601
|
return styled.css `
|
|
@@ -1598,6 +1626,7 @@ const cardStyle = ({ theme, collapsable = true, animate = 150, bordered = true,
|
|
|
1598
1626
|
${paddingY(t.paddingY)}
|
|
1599
1627
|
${letterSpacing(t.letterSpacing)}
|
|
1600
1628
|
.o-card-title {
|
|
1629
|
+
${flexGrow(1)}
|
|
1601
1630
|
${marginLeft('sm')}
|
|
1602
1631
|
}
|
|
1603
1632
|
${userSelect('none')}
|
|
@@ -1743,34 +1772,6 @@ const Checkbox = styled(CheckboxComponent) `
|
|
|
1743
1772
|
${checkboxStyle}
|
|
1744
1773
|
`;
|
|
1745
1774
|
|
|
1746
|
-
// initial; 1; auto; none;
|
|
1747
|
-
const flexValues = {
|
|
1748
|
-
initial: '0 1 auto',
|
|
1749
|
-
1: '1 1 0%',
|
|
1750
|
-
auto: '1 1 auto',
|
|
1751
|
-
none: 'none',
|
|
1752
|
-
};
|
|
1753
|
-
const flexFormatter = enumFormatter(flexValues);
|
|
1754
|
-
const flex = cssProperty('flex', flexFormatter);
|
|
1755
|
-
// row; row-reverse; column; column-reverse
|
|
1756
|
-
const flexBasis = cssProperty('flex-basic');
|
|
1757
|
-
// row; row-reverse; column; column-reverse
|
|
1758
|
-
const flexDirection = cssProperty('flex-direction');
|
|
1759
|
-
// true; false
|
|
1760
|
-
const flexGrow = cssProperty('flex-grow');
|
|
1761
|
-
// true; false
|
|
1762
|
-
const flexShrink = cssProperty('flex-shrink');
|
|
1763
|
-
// nowrap; wrap; wrap-reverse;
|
|
1764
|
-
const flexWrap = cssProperty('flex-wrap');
|
|
1765
|
-
// first; last; none; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12
|
|
1766
|
-
const orderValues = {
|
|
1767
|
-
first: '-9999',
|
|
1768
|
-
last: '9999',
|
|
1769
|
-
none: '0',
|
|
1770
|
-
};
|
|
1771
|
-
const orderFormatter = enumFormatter(orderValues);
|
|
1772
|
-
const order = cssProperty('order', orderFormatter);
|
|
1773
|
-
|
|
1774
1775
|
const getColWidths = (gap, theme) => {
|
|
1775
1776
|
const getContent = (size, variant) => {
|
|
1776
1777
|
const content = `{ flex: 0 0 calc((100% / 12) * ${size} - ${gap}); max-width: calc((100% / 12) * ${size} - ${gap}); }`;
|
|
@@ -5759,6 +5760,7 @@ const propertiesStyle = ({ theme }) => {
|
|
|
5759
5760
|
return styled.css `
|
|
5760
5761
|
.o-property {
|
|
5761
5762
|
${paddingY(t.paddingY)}
|
|
5763
|
+
${flexWrap('nowrap')}
|
|
5762
5764
|
}
|
|
5763
5765
|
.o-property-name {
|
|
5764
5766
|
${fontWeight(t.fontWeight)}
|
|
@@ -11903,6 +11905,7 @@ exports.SuccessIcon = SuccessIcon;
|
|
|
11903
11905
|
exports.Tab = Tab;
|
|
11904
11906
|
exports.TabTitle = TabTitle;
|
|
11905
11907
|
exports.Table = Table;
|
|
11908
|
+
exports.TableBodyRowComponent = TableBodyRowComponent;
|
|
11906
11909
|
exports.TableFilterOperatorComponent = TableFilterOperatorComponent;
|
|
11907
11910
|
exports.TableInputFilterComponent = TableInputFilterComponent;
|
|
11908
11911
|
exports.TableNumberFilterComponent = TableNumberFilterComponent;
|
|
@@ -12238,6 +12241,7 @@ exports.useSelectController = useSelectController;
|
|
|
12238
12241
|
exports.useSelectService = useSelectService;
|
|
12239
12242
|
exports.useTab = useTab;
|
|
12240
12243
|
exports.useTableController = useTableController;
|
|
12244
|
+
exports.useTableService = useTableService;
|
|
12241
12245
|
exports.useTabsController = useTabsController;
|
|
12242
12246
|
exports.useTabsService = useTabsService;
|
|
12243
12247
|
exports.useTabsState = useTabsState;
|