smarthr-ui 62.0.1 → 62.1.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/esm/components/Dialog/RemoteDialogTrigger.js +3 -2
- package/esm/components/Dialog/RemoteDialogTrigger.js.map +1 -1
- package/esm/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js +2 -1
- package/esm/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
- package/esm/components/Picker/DatetimeLocalPicker.d.ts +7 -0
- package/esm/components/Picker/DatetimeLocalPicker.js +14 -0
- package/esm/components/Picker/DatetimeLocalPicker.js.map +1 -0
- package/esm/components/Picker/index.d.ts +1 -0
- package/esm/components/Picker/index.js +1 -0
- package/esm/components/Picker/index.js.map +1 -1
- package/esm/components/Table/BulkActionRow.js +4 -10
- package/esm/components/Table/BulkActionRow.js.map +1 -1
- package/esm/components/Table/EmptyTableBody.js +5 -1
- package/esm/components/Table/EmptyTableBody.js.map +1 -1
- package/esm/components/Table/Table.d.ts +35 -7
- package/esm/components/Table/Table.js +13 -12
- package/esm/components/Table/Table.js.map +1 -1
- package/esm/components/Table/Td.d.ts +30 -2
- package/esm/components/Table/Td.js +21 -4
- package/esm/components/Table/Td.js.map +1 -1
- package/esm/components/Table/TdCheckbox.d.ts +393 -7
- package/esm/components/Table/TdCheckbox.js +12 -17
- package/esm/components/Table/TdCheckbox.js.map +1 -1
- package/esm/components/Table/Th.d.ts +37 -2
- package/esm/components/Table/Th.js +17 -4
- package/esm/components/Table/Th.js.map +1 -1
- package/esm/components/Table/ThCheckbox.d.ts +378 -7
- package/esm/components/Table/ThCheckbox.js +13 -18
- package/esm/components/Table/ThCheckbox.js.map +1 -1
- package/esm/components/Table/WakuWakuButton.d.ts +1 -1
- package/esm/components/Table/WakuWakuButton.js.map +1 -1
- package/lib/components/Dialog/RemoteDialogTrigger.js +3 -2
- package/lib/components/Dialog/RemoteDialogTrigger.js.map +1 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js +2 -1
- package/lib/components/Dropdown/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
- package/lib/components/Picker/DatetimeLocalPicker.d.ts +7 -0
- package/lib/components/Picker/DatetimeLocalPicker.js +40 -0
- package/lib/components/Picker/DatetimeLocalPicker.js.map +1 -0
- package/lib/components/Picker/index.d.ts +1 -0
- package/lib/components/Picker/index.js +3 -1
- package/lib/components/Picker/index.js.map +1 -1
- package/lib/components/Table/BulkActionRow.js +6 -32
- package/lib/components/Table/BulkActionRow.js.map +1 -1
- package/lib/components/Table/EmptyTableBody.js +5 -1
- package/lib/components/Table/EmptyTableBody.js.map +1 -1
- package/lib/components/Table/Table.d.ts +35 -7
- package/lib/components/Table/Table.js +13 -12
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Td.d.ts +30 -2
- package/lib/components/Table/Td.js +21 -4
- package/lib/components/Table/Td.js.map +1 -1
- package/lib/components/Table/TdCheckbox.d.ts +393 -7
- package/lib/components/Table/TdCheckbox.js +11 -16
- package/lib/components/Table/TdCheckbox.js.map +1 -1
- package/lib/components/Table/Th.d.ts +37 -2
- package/lib/components/Table/Th.js +17 -4
- package/lib/components/Table/Th.js.map +1 -1
- package/lib/components/Table/ThCheckbox.d.ts +378 -7
- package/lib/components/Table/ThCheckbox.js +13 -18
- package/lib/components/Table/ThCheckbox.js.map +1 -1
- package/lib/components/Table/WakuWakuButton.d.ts +1 -1
- package/lib/components/Table/WakuWakuButton.js.map +1 -1
- package/package.json +1 -1
- package/smarthr-ui.css +41 -15
|
@@ -5,7 +5,7 @@ const onClickRemoteDialogTrigger = (e) => {
|
|
|
5
5
|
detail: { id: e.currentTarget.getAttribute('aria-controls') },
|
|
6
6
|
}));
|
|
7
7
|
};
|
|
8
|
-
export const RemoteDialogTrigger = ({ targetId, children, onClick, variant }) => {
|
|
8
|
+
export const RemoteDialogTrigger = ({ targetId, children, onClick, variant, ...rest }) => {
|
|
9
9
|
const actualOnClick = useCallback((e) => {
|
|
10
10
|
if (onClick) {
|
|
11
11
|
return onClick(() => {
|
|
@@ -19,7 +19,8 @@ export const RemoteDialogTrigger = ({ targetId, children, onClick, variant }) =>
|
|
|
19
19
|
'aria-haspopup': 'true',
|
|
20
20
|
'aria-controls': targetId,
|
|
21
21
|
variant,
|
|
22
|
-
|
|
22
|
+
...rest,
|
|
23
|
+
}), [children, actualOnClick, targetId, variant, rest]);
|
|
23
24
|
return actualTrigger;
|
|
24
25
|
};
|
|
25
26
|
//# sourceMappingURL=RemoteDialogTrigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteDialogTrigger.js","sourceRoot":"","sources":["../../../src/components/Dialog/RemoteDialogTrigger.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAI/E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,0BAA0B,GAAG,CAAC,CAAgC,EAAE,EAAE;IACtE,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,aAAa,EAAE;QAC7B,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,eAAe,CAAW,EAAE;KACxE,CAAC,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAM5B,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"RemoteDialogTrigger.js","sourceRoot":"","sources":["../../../src/components/Dialog/RemoteDialogTrigger.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgB,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAI/E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,0BAA0B,GAAG,CAAC,CAAgC,EAAE,EAAE;IACtE,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,aAAa,EAAE;QAC7B,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,eAAe,CAAW,EAAE;KACxE,CAAC,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAM5B,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACxD,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,CAAgC,EAAE,EAAE;QACnC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,OAAO,CAAC,GAAG,EAAE;gBAClB,0BAA0B,CAAC,CAAC,CAAC,CAAA;YAC/B,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,0BAA0B,CAAC,CAAC,CAAC,CAAA;IAC/B,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAA;IACD,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CACH,YAAY,CAAC,QAAwB,EAAE;QACrC,OAAO,EAAE,aAAa;QACtB,eAAe,EAAE,MAAM;QACvB,eAAe,EAAE,QAAQ;QACzB,OAAO;QACP,GAAG,IAAI;KACR,CAAC,EACJ,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CACnD,CAAA;IAED,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA"}
|
|
@@ -3,6 +3,7 @@ import innerText from 'react-innertext';
|
|
|
3
3
|
import { tv } from 'tailwind-variants';
|
|
4
4
|
import { Dropdown, DropdownContent, DropdownTrigger } from '..';
|
|
5
5
|
import { AnchorButton, Button } from '../../Button';
|
|
6
|
+
import { RemoteDialogTrigger } from '../../Dialog';
|
|
6
7
|
import { FaCaretDownIcon, FaEllipsisIcon } from '../../Icon';
|
|
7
8
|
import useKeyboardNavigation from './useKeyboardNavigation';
|
|
8
9
|
export const dropdownMenuButton = tv({
|
|
@@ -46,7 +47,7 @@ export const renderButtonList = (children) => React.Children.map(children, (item
|
|
|
46
47
|
if (item.type === React.Fragment) {
|
|
47
48
|
return renderButtonList(item.props.children);
|
|
48
49
|
}
|
|
49
|
-
if (!(item.type === Button || item.type === AnchorButton)) {
|
|
50
|
+
if (!(item.type === Button || item.type === AnchorButton || item.type === RemoteDialogTrigger)) {
|
|
50
51
|
return item;
|
|
51
52
|
}
|
|
52
53
|
const actualElement = React.cloneElement(item, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuButton.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownMenuButton/DropdownMenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,OAAO,GACR,MAAM,OAAO,CAAA;AACd,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,EAA4B,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"DropdownMenuButton.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownMenuButton/DropdownMenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,OAAO,GACR,MAAM,OAAO,CAAA;AACd,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,EAA4B,MAAM,cAAc,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,eAAe,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I;QACV,SAAS,EAAE,oBAAoB,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;KACrE,CAAC,CAAA;IAEF,OAAO,gCAAK,aAAa,CAAM,CAAA;AACjC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** フォームにエラーがあるかどうか */
|
|
4
|
+
error?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const DatetimeLocalPicker: React.ForwardRefExoticComponent<Props & Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "error"> & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
2
|
+
import { pickerStyle } from './style';
|
|
3
|
+
export const DatetimeLocalPicker = forwardRef(({ disabled, error, readOnly, className, ...rest }, ref) => {
|
|
4
|
+
const { wrapperStyle, innerStyle } = useMemo(() => {
|
|
5
|
+
const { wrapper, inner } = pickerStyle('DatetimeLocalPicker');
|
|
6
|
+
return {
|
|
7
|
+
wrapperStyle: wrapper({ className, disabled, readOnly }),
|
|
8
|
+
innerStyle: inner(),
|
|
9
|
+
};
|
|
10
|
+
}, [disabled, readOnly, className]);
|
|
11
|
+
return (React.createElement("span", { className: wrapperStyle },
|
|
12
|
+
React.createElement("input", { ...rest, "data-smarthr-ui-input": "true", ref: ref, type: "datetime-local", disabled: disabled, readOnly: readOnly, "aria-invalid": error || undefined, className: innerStyle })));
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=DatetimeLocalPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatetimeLocalPicker.js","sourceRoot":"","sources":["../../../src/components/Picker/DatetimeLocalPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAQrC,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAC3C,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IACzD,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;QAChD,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAA;QAC7D,OAAO;YACL,YAAY,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACxD,UAAU,EAAE,KAAK,EAAE;SACpB,CAAA;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;IAEnC,OAAO,CACL,8BAAM,SAAS,EAAE,YAAY;QAE3B,kCACM,IAAI,2BACc,MAAM,EAC5B,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,gBAAgB,EACrB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,kBACJ,KAAK,IAAI,SAAS,EAChC,SAAS,EAAE,UAAU,GACrB,CACG,CACR,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { tv } from 'tailwind-variants';
|
|
3
3
|
import { useTableHeadCellCount } from './useTableHeadCellCount';
|
|
4
4
|
const bulkActionRow = tv({
|
|
@@ -12,14 +12,8 @@ const bulkActionRow = tv({
|
|
|
12
12
|
});
|
|
13
13
|
export const BulkActionRow = ({ children, className, ...props }) => {
|
|
14
14
|
const { countHeadCellRef, count } = useTableHeadCellCount();
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
wrapperStyle: wrapper({ className }),
|
|
19
|
-
cellStyle: cell(),
|
|
20
|
-
};
|
|
21
|
-
}, [className]);
|
|
22
|
-
return (React.createElement("tr", { ...props, ref: countHeadCellRef, className: wrapperStyle },
|
|
23
|
-
React.createElement("td", { colSpan: count, className: cellStyle }, children)));
|
|
15
|
+
const { wrapper, cell } = bulkActionRow();
|
|
16
|
+
return (React.createElement("tr", { ...props, ref: countHeadCellRef, className: wrapper({ className }) },
|
|
17
|
+
React.createElement("td", { colSpan: count, className: cell() }, children)));
|
|
24
18
|
};
|
|
25
19
|
//# sourceMappingURL=BulkActionRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkActionRow.js","sourceRoot":"","sources":["../../../src/components/Table/BulkActionRow.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BulkActionRow.js","sourceRoot":"","sources":["../../../src/components/Table/BulkActionRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAA;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D,MAAM,aAAa,GAAG,EAAE,CAAC;IACvB,KAAK,EAAE;QACL,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE;YACJ,gDAAgD;YAChD,sCAAsC;SACvC;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAuD,CAAC,EAChF,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,qBAAqB,EAAuB,CAAA;IAEhF,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,CAAA;IAEzC,OAAO,CACL,+BAAQ,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;QACrE,4BAAI,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAClC,QAAQ,CACN,CACF,CACN,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -55,8 +55,12 @@ const emptyTableBodyCell = tv({
|
|
|
55
55
|
X3L: 'shr-px-4',
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
paddingBlock: 4,
|
|
60
|
+
paddingInline: 4,
|
|
61
|
+
},
|
|
58
62
|
});
|
|
59
|
-
export const EmptyTableBody = ({ children, padding
|
|
63
|
+
export const EmptyTableBody = ({ children, padding, ...props }) => {
|
|
60
64
|
const { countHeadCellRef, count } = useTableHeadCellCount();
|
|
61
65
|
const tdStyles = useMemo(() => {
|
|
62
66
|
const paddingBlock = padding instanceof Object ? padding.vertical : padding;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyTableBody.js","sourceRoot":"","sources":["../../../src/components/Table/EmptyTableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4C,OAAO,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEt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ACf,EAAE,EAAE,UAAU;YACd,GAAG,EAAE,YAAY;YACjB,GAAG,EAAE,UAAU;SACY;KAC9B;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAmC,CAAC,
|
|
1
|
+
{"version":3,"file":"EmptyTableBody.js","sourceRoot":"","sources":["../../../src/components/Table/EmptyTableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4C,OAAO,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAY/D,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAC5B,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,CAAC,EAAE,UAAU;YACb,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,YAAY;YACjB,IAAI,EAAE,aAAa;YACnB,CAAC,EAAE,UAAU;YACb,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,YAAY;YACjB,CAAC,EAAE,UAAU;YACb,GAAG,EAAE,YAAY;YACjB,CAAC,EAAE,UAAU;YACb,GAAG,EAAE,YAAY;YACjB,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,UAAU;YACb,GAAG,EAAE,aAAa;YAClB,GAAG,EAAE,YAAY;YACjB,EAAE,EAAE,UAAU;YACd,CAAC,EAAE,YAAY;YACf,CAAC,EAAE,UAAU;YACb,CAAC,EAAE,YAAY;YACf,EAAE,EAAE,UAAU;YACd,GAAG,EAAE,YAAY;YACjB,GAAG,EAAE,UAAU;SACY;QAC7B,aAAa,EAAE;YACb,CAAC,EAAE,UAAU;YACb,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,YAAY;YACjB,IAAI,EAAE,aAAa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M,QAAE,QAAQ,CAAU,CACxB,CACF,CACC,CACT,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -3,60 +3,88 @@ import { VariantProps } from 'tailwind-variants';
|
|
|
3
3
|
type Props = PropsWithChildren<VariantProps<typeof table>>;
|
|
4
4
|
type ElementProps = Omit<ComponentProps<'table'>, keyof Props>;
|
|
5
5
|
declare const table: import("tailwind-variants").TVReturnType<{
|
|
6
|
+
borderType: {
|
|
7
|
+
horizontal: string;
|
|
8
|
+
both: string;
|
|
9
|
+
};
|
|
6
10
|
layout: {
|
|
7
11
|
auto: string;
|
|
8
12
|
fixed: string;
|
|
9
13
|
};
|
|
10
14
|
fixedHead: {
|
|
11
|
-
true: string
|
|
15
|
+
true: string;
|
|
12
16
|
};
|
|
13
17
|
}, undefined, string[], import("tailwind-variants/dist/config").TVConfig<{
|
|
18
|
+
borderType: {
|
|
19
|
+
horizontal: string;
|
|
20
|
+
both: string;
|
|
21
|
+
};
|
|
14
22
|
layout: {
|
|
15
23
|
auto: string;
|
|
16
24
|
fixed: string;
|
|
17
25
|
};
|
|
18
26
|
fixedHead: {
|
|
19
|
-
true: string
|
|
27
|
+
true: string;
|
|
20
28
|
};
|
|
21
29
|
}, {
|
|
30
|
+
borderType: {
|
|
31
|
+
horizontal: string;
|
|
32
|
+
both: string;
|
|
33
|
+
};
|
|
22
34
|
layout: {
|
|
23
35
|
auto: string;
|
|
24
36
|
fixed: string;
|
|
25
37
|
};
|
|
26
38
|
fixedHead: {
|
|
27
|
-
true: string
|
|
39
|
+
true: string;
|
|
28
40
|
};
|
|
29
41
|
}>, {
|
|
42
|
+
borderType: {
|
|
43
|
+
horizontal: string;
|
|
44
|
+
both: string;
|
|
45
|
+
};
|
|
30
46
|
layout: {
|
|
31
47
|
auto: string;
|
|
32
48
|
fixed: string;
|
|
33
49
|
};
|
|
34
50
|
fixedHead: {
|
|
35
|
-
true: string
|
|
51
|
+
true: string;
|
|
36
52
|
};
|
|
37
53
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
54
|
+
borderType: {
|
|
55
|
+
horizontal: string;
|
|
56
|
+
both: string;
|
|
57
|
+
};
|
|
38
58
|
layout: {
|
|
39
59
|
auto: string;
|
|
40
60
|
fixed: string;
|
|
41
61
|
};
|
|
42
62
|
fixedHead: {
|
|
43
|
-
true: string
|
|
63
|
+
true: string;
|
|
44
64
|
};
|
|
45
65
|
}, undefined, string[], import("tailwind-variants/dist/config").TVConfig<{
|
|
66
|
+
borderType: {
|
|
67
|
+
horizontal: string;
|
|
68
|
+
both: string;
|
|
69
|
+
};
|
|
46
70
|
layout: {
|
|
47
71
|
auto: string;
|
|
48
72
|
fixed: string;
|
|
49
73
|
};
|
|
50
74
|
fixedHead: {
|
|
51
|
-
true: string
|
|
75
|
+
true: string;
|
|
52
76
|
};
|
|
53
77
|
}, {
|
|
78
|
+
borderType: {
|
|
79
|
+
horizontal: string;
|
|
80
|
+
both: string;
|
|
81
|
+
};
|
|
54
82
|
layout: {
|
|
55
83
|
auto: string;
|
|
56
84
|
fixed: string;
|
|
57
85
|
};
|
|
58
86
|
fixedHead: {
|
|
59
|
-
true: string
|
|
87
|
+
true: string;
|
|
60
88
|
};
|
|
61
89
|
}>, unknown, unknown, undefined>>;
|
|
62
90
|
export declare const Table: FC<Props & ElementProps>;
|
|
@@ -3,32 +3,33 @@ import { tv } from 'tailwind-variants';
|
|
|
3
3
|
const table = tv({
|
|
4
4
|
base: [
|
|
5
5
|
'smarthr-ui-Table',
|
|
6
|
-
'shr-w-full',
|
|
7
|
-
/* Headがfixed=trueの場合、separate以外だとHeadとBodyの間に隙間が生まれるため、明示的に指定しています */
|
|
8
|
-
'shr-broder-separate',
|
|
9
|
-
'shr-border-spacing-0',
|
|
10
|
-
'shr-bg-column',
|
|
6
|
+
'shr-border-collapse shr-w-full',
|
|
11
7
|
'[&_tbody]:shr-bg-white',
|
|
12
8
|
'[&_th]:contrast-more:shr-border-shorthand [&_th]:shr-bg-head [&_th]:contrast-more:shr-border-high-contrast',
|
|
13
9
|
'[&_td]:contrast-more:shr-border-shorthand [&_td]:contrast-more:shr-border-high-contrast',
|
|
14
10
|
'contrast-more:shr-border-shorthand contrast-more:shr-border-high-contrast',
|
|
15
11
|
],
|
|
16
12
|
variants: {
|
|
13
|
+
borderType: {
|
|
14
|
+
horizontal: 'shr-table-border-horizontal',
|
|
15
|
+
both: 'shr-table-border-vertical shr-table-border-horizontal',
|
|
16
|
+
},
|
|
17
17
|
layout: {
|
|
18
18
|
auto: '',
|
|
19
19
|
fixed: 'shr-table-fixed',
|
|
20
20
|
},
|
|
21
21
|
fixedHead: {
|
|
22
|
-
true: [
|
|
23
|
-
'[&_thead]:shr-sticky [&_thead]:shr-start-0 [&_thead]:shr-top-0',
|
|
24
|
-
/* zIndexの値はセマンティックトークンとして管理しているため、明示的に値を指定しないと重なり順が崩れるため設定しています */
|
|
25
|
-
'[&_thead]:shr-z-fixed-menu',
|
|
26
|
-
],
|
|
22
|
+
true: '[&_thead]:shr-sticky [&_thead]:shr-start-0 [&_thead]:shr-top-0 [&_thead]:shr-z-1',
|
|
27
23
|
},
|
|
28
24
|
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
borderType: 'horizontal',
|
|
27
|
+
layout: 'auto',
|
|
28
|
+
fixedHead: false,
|
|
29
|
+
},
|
|
29
30
|
});
|
|
30
|
-
export const Table = ({ fixedHead
|
|
31
|
-
const styles = useMemo(() => table({ fixedHead, layout, className }), [className, fixedHead, layout]);
|
|
31
|
+
export const Table = ({ borderType, fixedHead, layout, className, ...props }) => {
|
|
32
|
+
const styles = useMemo(() => table({ borderType, fixedHead, layout, className }), [borderType, className, fixedHead, layout]);
|
|
32
33
|
return React.createElement("table", { ...props, className: styles });
|
|
33
34
|
};
|
|
34
35
|
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,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AAC,CAAA"}
|
|
@@ -15,17 +15,25 @@ declare const td: import("tailwind-variants").TVReturnType<{
|
|
|
15
15
|
left: string;
|
|
16
16
|
right: string;
|
|
17
17
|
};
|
|
18
|
+
vAlign: {
|
|
19
|
+
middle: string;
|
|
20
|
+
baseline: string;
|
|
21
|
+
};
|
|
18
22
|
nullable: {
|
|
19
23
|
true: string;
|
|
20
24
|
};
|
|
21
25
|
fixed: {
|
|
22
26
|
true: string[];
|
|
23
27
|
};
|
|
24
|
-
}, undefined, string[], import("tailwind-variants/dist/config").TVConfig<{
|
|
28
|
+
}, undefined, (string | string[])[], import("tailwind-variants/dist/config").TVConfig<{
|
|
25
29
|
align: {
|
|
26
30
|
left: string;
|
|
27
31
|
right: string;
|
|
28
32
|
};
|
|
33
|
+
vAlign: {
|
|
34
|
+
middle: string;
|
|
35
|
+
baseline: string;
|
|
36
|
+
};
|
|
29
37
|
nullable: {
|
|
30
38
|
true: string;
|
|
31
39
|
};
|
|
@@ -37,6 +45,10 @@ declare const td: import("tailwind-variants").TVReturnType<{
|
|
|
37
45
|
left: string;
|
|
38
46
|
right: string;
|
|
39
47
|
};
|
|
48
|
+
vAlign: {
|
|
49
|
+
middle: string;
|
|
50
|
+
baseline: string;
|
|
51
|
+
};
|
|
40
52
|
nullable: {
|
|
41
53
|
true: string;
|
|
42
54
|
};
|
|
@@ -48,6 +60,10 @@ declare const td: import("tailwind-variants").TVReturnType<{
|
|
|
48
60
|
left: string;
|
|
49
61
|
right: string;
|
|
50
62
|
};
|
|
63
|
+
vAlign: {
|
|
64
|
+
middle: string;
|
|
65
|
+
baseline: string;
|
|
66
|
+
};
|
|
51
67
|
nullable: {
|
|
52
68
|
true: string;
|
|
53
69
|
};
|
|
@@ -59,17 +75,25 @@ declare const td: import("tailwind-variants").TVReturnType<{
|
|
|
59
75
|
left: string;
|
|
60
76
|
right: string;
|
|
61
77
|
};
|
|
78
|
+
vAlign: {
|
|
79
|
+
middle: string;
|
|
80
|
+
baseline: string;
|
|
81
|
+
};
|
|
62
82
|
nullable: {
|
|
63
83
|
true: string;
|
|
64
84
|
};
|
|
65
85
|
fixed: {
|
|
66
86
|
true: string[];
|
|
67
87
|
};
|
|
68
|
-
}, undefined, string[], import("tailwind-variants/dist/config").TVConfig<{
|
|
88
|
+
}, undefined, (string | string[])[], import("tailwind-variants/dist/config").TVConfig<{
|
|
69
89
|
align: {
|
|
70
90
|
left: string;
|
|
71
91
|
right: string;
|
|
72
92
|
};
|
|
93
|
+
vAlign: {
|
|
94
|
+
middle: string;
|
|
95
|
+
baseline: string;
|
|
96
|
+
};
|
|
73
97
|
nullable: {
|
|
74
98
|
true: string;
|
|
75
99
|
};
|
|
@@ -81,6 +105,10 @@ declare const td: import("tailwind-variants").TVReturnType<{
|
|
|
81
105
|
left: string;
|
|
82
106
|
right: string;
|
|
83
107
|
};
|
|
108
|
+
vAlign: {
|
|
109
|
+
middle: string;
|
|
110
|
+
baseline: string;
|
|
111
|
+
};
|
|
84
112
|
nullable: {
|
|
85
113
|
true: string;
|
|
86
114
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { tv } from 'tailwind-variants';
|
|
3
3
|
import { reelShadowStyle } from './useReelShadow';
|
|
4
|
-
export const Td = ({ align
|
|
4
|
+
export const Td = ({ align, vAlign, nullable, fixed = false, contentWidth, className, style, ...props }) => {
|
|
5
5
|
const styleProps = useMemo(() => {
|
|
6
|
-
const tdStyles = td({ align, nullable, fixed, className });
|
|
6
|
+
const tdStyles = td({ align, vAlign, nullable, fixed, className });
|
|
7
7
|
const reelShadowStyles = fixed ? reelShadowStyle({ direction: 'right' }) : '';
|
|
8
8
|
return {
|
|
9
9
|
className: `${tdStyles} ${reelShadowStyles}`.trim(),
|
|
@@ -12,19 +12,31 @@ export const Td = ({ align = 'left', nullable = false, fixed = false, contentWid
|
|
|
12
12
|
...getWidthStyle(contentWidth),
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
|
-
}, [align, className, contentWidth, fixed, nullable, style]);
|
|
15
|
+
}, [align, className, contentWidth, fixed, nullable, style, vAlign]);
|
|
16
16
|
return React.createElement("td", { ...props, ...styleProps });
|
|
17
17
|
};
|
|
18
18
|
const td = tv({
|
|
19
19
|
base: [
|
|
20
20
|
'smarthr-ui-Td',
|
|
21
|
-
'shr-border-
|
|
21
|
+
'shr-border-solid shr-border-0 shr-px-1 shr-py-0.5 shr-align-middle shr-text-base shr-leading-normal shr-text-black shr-h-[calc(1em_*_theme(lineHeight.normal))]',
|
|
22
|
+
[
|
|
23
|
+
'[.shr-table-border-horizontal_&]:shr-border-t',
|
|
24
|
+
'[.shr-table-border-horizontal_&]:shr-border-t-default',
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
'[.shr-table-border-vertical_&+&]:shr-border-l',
|
|
28
|
+
'[.shr-table-border-vertical_&+&]:shr-border-l-default',
|
|
29
|
+
],
|
|
22
30
|
],
|
|
23
31
|
variants: {
|
|
24
32
|
align: {
|
|
25
33
|
left: '',
|
|
26
34
|
right: 'shr-text-right',
|
|
27
35
|
},
|
|
36
|
+
vAlign: {
|
|
37
|
+
middle: '',
|
|
38
|
+
baseline: 'shr-align-baseline',
|
|
39
|
+
},
|
|
28
40
|
nullable: {
|
|
29
41
|
true: "empty:after:shr-content-['-----']",
|
|
30
42
|
},
|
|
@@ -35,6 +47,11 @@ const td = tv({
|
|
|
35
47
|
],
|
|
36
48
|
},
|
|
37
49
|
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
align: 'left',
|
|
52
|
+
vAlign: 'middle',
|
|
53
|
+
nullable: false,
|
|
54
|
+
},
|
|
38
55
|
});
|
|
39
56
|
const convertContentWidth = (contentWidth) => {
|
|
40
57
|
if (typeof contentWidth === 'number') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Td.js","sourceRoot":"","sources":["../../../src/components/Table/Td.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmD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