@openameba/spindle-ui 2.10.0 → 3.0.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/CHANGELOG.md +27 -0
- package/Form/Checkbox/Checkbox.d.ts +8 -0
- package/Form/Checkbox/Checkbox.d.ts.map +1 -0
- package/Form/Checkbox/Checkbox.figma.d.ts.map +1 -0
- package/Form/{Checkbox.figma.js → Checkbox/Checkbox.figma.js} +3 -2
- package/Form/Checkbox/Checkbox.figma.js.map +1 -0
- package/Form/{Checkbox.figma.mjs → Checkbox/Checkbox.figma.mjs} +2 -1
- package/Form/Checkbox/Checkbox.js +79 -0
- package/Form/Checkbox/Checkbox.js.map +1 -0
- package/Form/Checkbox/Checkbox.mjs +16 -0
- package/Form/Checkbox.css +1 -1
- package/Form/Checkbox.d.ts +1 -6
- package/Form/Checkbox.d.ts.map +1 -1
- package/Form/Checkbox.js +4 -70
- package/Form/Checkbox.js.map +1 -1
- package/Form/Checkbox.mjs +3 -11
- package/Form/DropDown/DropDown.d.ts +9 -0
- package/Form/DropDown/DropDown.d.ts.map +1 -0
- package/Form/DropDown/DropDown.js +101 -0
- package/Form/DropDown/DropDown.js.map +1 -0
- package/Form/DropDown/DropDown.mjs +38 -0
- package/Form/DropDown.d.ts +1 -8
- package/Form/DropDown.d.ts.map +1 -1
- package/Form/DropDown.js +4 -97
- package/Form/DropDown.js.map +1 -1
- package/Form/DropDown.mjs +3 -38
- package/Form/InlineDropDown/InlineDropDown.d.ts +10 -0
- package/Form/InlineDropDown/InlineDropDown.d.ts.map +1 -0
- package/Form/InlineDropDown/InlineDropDown.js +93 -0
- package/Form/InlineDropDown/InlineDropDown.js.map +1 -0
- package/Form/InlineDropDown/InlineDropDown.mjs +30 -0
- package/Form/InlineDropDown.d.ts +1 -9
- package/Form/InlineDropDown.d.ts.map +1 -1
- package/Form/InlineDropDown.js +4 -89
- package/Form/InlineDropDown.js.map +1 -1
- package/Form/InlineDropDown.mjs +3 -30
- package/Form/InputLabel/InputLabel.d.ts +8 -0
- package/Form/InputLabel/InputLabel.d.ts.map +1 -0
- package/Form/InputLabel/InputLabel.js +36 -0
- package/Form/InputLabel/InputLabel.js.map +1 -0
- package/Form/InputLabel/InputLabel.mjs +5 -0
- package/Form/InputLabel.d.ts +1 -7
- package/Form/InputLabel.d.ts.map +1 -1
- package/Form/InputLabel.js +4 -32
- package/Form/InputLabel.js.map +1 -1
- package/Form/InputLabel.mjs +3 -5
- package/Form/InvalidMessage/InvalidMessage.d.ts +8 -0
- package/Form/InvalidMessage/InvalidMessage.d.ts.map +1 -0
- package/Form/InvalidMessage/InvalidMessage.js +40 -0
- package/Form/InvalidMessage/InvalidMessage.js.map +1 -0
- package/Form/InvalidMessage/InvalidMessage.mjs +9 -0
- package/Form/InvalidMessage.d.ts +1 -7
- package/Form/InvalidMessage.d.ts.map +1 -1
- package/Form/InvalidMessage.js +4 -36
- package/Form/InvalidMessage.js.map +1 -1
- package/Form/InvalidMessage.mjs +3 -9
- package/Form/Radio/Radio.d.ts +8 -0
- package/Form/Radio/Radio.d.ts.map +1 -0
- package/Form/Radio/Radio.figma.d.ts.map +1 -0
- package/Form/Radio/Radio.figma.js.map +1 -0
- package/Form/Radio/Radio.js +74 -0
- package/Form/Radio/Radio.js.map +1 -0
- package/Form/Radio/Radio.mjs +11 -0
- package/Form/Radio.d.ts +1 -7
- package/Form/Radio.d.ts.map +1 -1
- package/Form/Radio.js +4 -70
- package/Form/Radio.js.map +1 -1
- package/Form/Radio.mjs +3 -11
- package/Form/TextArea/TextArea.d.ts +9 -0
- package/Form/TextArea/TextArea.d.ts.map +1 -0
- package/Form/TextArea/TextArea.js +65 -0
- package/Form/TextArea/TextArea.js.map +1 -0
- package/Form/TextArea/TextArea.mjs +5 -0
- package/Form/TextArea.d.ts +1 -8
- package/Form/TextArea.d.ts.map +1 -1
- package/Form/TextArea.js +4 -61
- package/Form/TextArea.js.map +1 -1
- package/Form/TextArea.mjs +3 -5
- package/Form/TextField/TextField.d.ts +10 -0
- package/Form/TextField/TextField.d.ts.map +1 -0
- package/Form/TextField/TextField.js +69 -0
- package/Form/TextField/TextField.js.map +1 -0
- package/Form/TextField/TextField.mjs +9 -0
- package/Form/TextField.d.ts +1 -9
- package/Form/TextField.d.ts.map +1 -1
- package/Form/TextField.js +4 -65
- package/Form/TextField.js.map +1 -1
- package/Form/TextField.mjs +3 -9
- package/Form/ToggleSwitch/ToggleSwitch.d.ts +7 -0
- package/Form/ToggleSwitch/ToggleSwitch.d.ts.map +1 -0
- package/Form/ToggleSwitch/ToggleSwitch.figma.d.ts.map +1 -0
- package/Form/ToggleSwitch/ToggleSwitch.figma.js.map +1 -0
- package/Form/ToggleSwitch/ToggleSwitch.js +71 -0
- package/Form/ToggleSwitch/ToggleSwitch.js.map +1 -0
- package/Form/ToggleSwitch/ToggleSwitch.mjs +11 -0
- package/Form/ToggleSwitch.d.ts +1 -6
- package/Form/ToggleSwitch.d.ts.map +1 -1
- package/Form/ToggleSwitch.js +4 -67
- package/Form/ToggleSwitch.js.map +1 -1
- package/Form/ToggleSwitch.mjs +3 -11
- package/Form/index.css +1 -1
- package/Modal/AppealModal/AppealModal.d.ts +23 -0
- package/Modal/AppealModal/AppealModal.d.ts.map +1 -0
- package/Modal/AppealModal/AppealModal.js +156 -0
- package/Modal/AppealModal/AppealModal.js.map +1 -0
- package/Modal/AppealModal/AppealModal.mjs +87 -0
- package/Modal/AppealModal.d.ts +1 -22
- package/Modal/AppealModal.d.ts.map +1 -1
- package/Modal/AppealModal.js +4 -152
- package/Modal/AppealModal.js.map +1 -1
- package/Modal/AppealModal.mjs +3 -87
- package/Modal/SemiModal/SemiModal.d.ts +27 -0
- package/Modal/SemiModal/SemiModal.d.ts.map +1 -0
- package/Modal/SemiModal/SemiModal.js +145 -0
- package/Modal/SemiModal/SemiModal.js.map +1 -0
- package/Modal/SemiModal/SemiModal.mjs +76 -0
- package/Modal/SemiModal.d.ts +1 -26
- package/Modal/SemiModal.d.ts.map +1 -1
- package/Modal/SemiModal.js +4 -141
- package/Modal/SemiModal.js.map +1 -1
- package/Modal/SemiModal.mjs +3 -76
- package/Table/Table.css +1 -1
- package/Table/Table.d.ts +1 -1
- package/Table/Table.d.ts.map +1 -1
- package/Table/Table.js +4 -8
- package/Table/Table.js.map +1 -1
- package/Table/Table.mjs +4 -8
- package/index.css +2 -2
- package/package.json +4 -4
- package/Form/Checkbox.figma.d.ts.map +0 -1
- package/Form/Checkbox.figma.js.map +0 -1
- package/Form/Radio.figma.d.ts.map +0 -1
- package/Form/Radio.figma.js.map +0 -1
- package/Form/ToggleSwitch.figma.d.ts.map +0 -1
- package/Form/ToggleSwitch.figma.js.map +0 -1
- /package/Form/{Checkbox.figma.d.ts → Checkbox/Checkbox.figma.d.ts} +0 -0
- /package/Form/{Radio.figma.d.ts → Radio/Radio.figma.d.ts} +0 -0
- /package/Form/{Radio.figma.js → Radio/Radio.figma.js} +0 -0
- /package/Form/{Radio.figma.mjs → Radio/Radio.figma.mjs} +0 -0
- /package/Form/{ToggleSwitch.figma.d.ts → ToggleSwitch/ToggleSwitch.figma.d.ts} +0 -0
- /package/Form/{ToggleSwitch.figma.js → ToggleSwitch/ToggleSwitch.figma.js} +0 -0
- /package/Form/{ToggleSwitch.figma.mjs → ToggleSwitch/ToggleSwitch.figma.mjs} +0 -0
package/Modal/SemiModal.d.ts
CHANGED
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
type Size = 'large' | 'medium' | 'small';
|
|
3
|
-
type Type = 'sheet' | 'popup';
|
|
4
|
-
interface SemiModalProps extends Omit<React.DialogHTMLAttributes<HTMLElement>, 'className'> {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
type?: Type;
|
|
7
|
-
size?: Size;
|
|
8
|
-
onCancel?: (event: React.BaseSyntheticEvent) => void;
|
|
9
|
-
onClose?: (event: React.BaseSyntheticEvent) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const SemiModal: {
|
|
12
|
-
Frame: React.ForwardRefExoticComponent<SemiModalProps & React.RefAttributes<HTMLDialogElement>>;
|
|
13
|
-
Header: ({ children, ...rest }: React.ComponentProps<"header"> & {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
}) => React.JSX.Element;
|
|
16
|
-
HeaderTitle: ({ children, ...rest }: React.ComponentProps<"p">) => React.JSX.Element;
|
|
17
|
-
Contents: ({ children, ...rest }: React.ComponentProps<"div"> & {
|
|
18
|
-
children: ReactNode;
|
|
19
|
-
}) => React.JSX.Element;
|
|
20
|
-
Footer: ({ children, ...rest }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
21
|
-
StyleOnly: ({ className, children, size, type, ...rest }: React.ComponentProps<"div"> & {
|
|
22
|
-
size?: Size;
|
|
23
|
-
type?: Type;
|
|
24
|
-
}) => React.JSX.Element;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
1
|
+
export { SemiModal } from './SemiModal/SemiModal';
|
|
27
2
|
//# sourceMappingURL=SemiModal.d.ts.map
|
package/Modal/SemiModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemiModal.d.ts","sourceRoot":"","sources":["../../src/Modal/SemiModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SemiModal.d.ts","sourceRoot":"","sources":["../../src/Modal/SemiModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC"}
|
package/Modal/SemiModal.js
CHANGED
|
@@ -1,145 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
-
var t = {};
|
|
48
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
-
t[p] = s[p];
|
|
50
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
-
t[p[i]] = s[p[i]];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
};
|
|
57
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
58
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
59
|
-
};
|
|
60
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
3
|
exports.SemiModal = void 0;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
var BLOCK_NAME = 'spui-SemiModal';
|
|
67
|
-
var Frame = (0, react_1.forwardRef)(function SemiModal(_a, ref) {
|
|
68
|
-
var children = _a.children, open = _a.open, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.type, type = _c === void 0 ? 'popup' : _c, onClose = _a.onClose, rest = __rest(_a, ["children", "open", "size", "type", "onClose"]);
|
|
69
|
-
var dialogEl = (0, react_1.useRef)(null);
|
|
70
|
-
// 閉じるアイコンを押した時
|
|
71
|
-
var handleFormSubmit = function (event) {
|
|
72
|
-
event.preventDefault(); // To be closed with the open prop
|
|
73
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(event);
|
|
74
|
-
};
|
|
75
|
-
// backdropを押した時
|
|
76
|
-
var handleDialogClick = function (event) {
|
|
77
|
-
// Detect backdrop click
|
|
78
|
-
if (event.target === dialogEl.current) {
|
|
79
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(event);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
//EscKeyを押したとき
|
|
83
|
-
var handleDialogClose = function (event) {
|
|
84
|
-
// Detect escape key type
|
|
85
|
-
if (event.target === dialogEl.current) {
|
|
86
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(event);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
(0, react_1.useEffect)(function () {
|
|
90
|
-
var _a, _b, _c, _d;
|
|
91
|
-
if (!dialogEl.current) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
if (open) {
|
|
95
|
-
(_b = (_a = dialogEl.current) === null || _a === void 0 ? void 0 : _a.showModal) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
(_d = (_c = dialogEl.current) === null || _c === void 0 ? void 0 : _c.close) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
99
|
-
}
|
|
100
|
-
}, [open, dialogEl]);
|
|
101
|
-
return (react_1.default.createElement("dialog", __assign({ role: "dialog", className: BLOCK_NAME, ref: (0, use_callback_ref_1.useMergeRefs)([dialogEl, ref]), onClick: handleDialogClick, onClose: handleDialogClose, "data-type": type, "data-size": size }, rest),
|
|
102
|
-
react_1.default.createElement("form", { className: "".concat(BLOCK_NAME, "-frame"), method: "dialog", onSubmit: handleFormSubmit }, children)));
|
|
103
|
-
});
|
|
104
|
-
var Header = function (_a) {
|
|
105
|
-
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
106
|
-
return (react_1.default.createElement("header", __assign({ role: "heading", className: "".concat(BLOCK_NAME, "-header") }, rest),
|
|
107
|
-
children,
|
|
108
|
-
react_1.default.createElement("div", { className: "".concat(BLOCK_NAME, "-closeIconButton") },
|
|
109
|
-
react_1.default.createElement(IconButton_1.IconButton, { style: { width: '100%', height: '100%' }, "aria-label": "\u9589\u3058\u308B", variant: "neutral" },
|
|
110
|
-
react_1.default.createElement(CrossBold_1.default, { "aria-hidden": "true", className: "".concat(BLOCK_NAME, "-closeIcon") })))));
|
|
111
|
-
};
|
|
112
|
-
var HeaderTitle = function (_a) {
|
|
113
|
-
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
114
|
-
return (react_1.default.createElement("p", __assign({ className: "".concat(BLOCK_NAME, "-headerTitle") }, rest), children));
|
|
115
|
-
};
|
|
116
|
-
var Contents = function (_a) {
|
|
117
|
-
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
118
|
-
return (react_1.default.createElement("div", __assign({ className: "".concat(BLOCK_NAME, "-contents") }, rest), children));
|
|
119
|
-
};
|
|
120
|
-
var Footer = function (_a) {
|
|
121
|
-
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
122
|
-
return (react_1.default.createElement("div", __assign({ className: "".concat(BLOCK_NAME, "-footer") }, rest), children));
|
|
123
|
-
};
|
|
124
|
-
var StyleOnly = function (_a) {
|
|
125
|
-
var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.type, type = _c === void 0 ? 'popup' : _c, rest = __rest(_a, ["className", "children", "size", "type"]);
|
|
126
|
-
return (react_1.default.createElement("div", __assign({ className: [
|
|
127
|
-
BLOCK_NAME,
|
|
128
|
-
"".concat(BLOCK_NAME, "--styleOnly"),
|
|
129
|
-
"".concat(BLOCK_NAME, "--").concat(size),
|
|
130
|
-
className,
|
|
131
|
-
]
|
|
132
|
-
.filter(Boolean)
|
|
133
|
-
.join(' ')
|
|
134
|
-
.trim() }, rest, { "data-type": type, "data-size": size }),
|
|
135
|
-
react_1.default.createElement("div", { className: "".concat(BLOCK_NAME, "-frame") }, children)));
|
|
136
|
-
};
|
|
137
|
-
exports.SemiModal = {
|
|
138
|
-
Frame: Frame,
|
|
139
|
-
Header: Header,
|
|
140
|
-
HeaderTitle: HeaderTitle,
|
|
141
|
-
Contents: Contents,
|
|
142
|
-
Footer: Footer,
|
|
143
|
-
StyleOnly: StyleOnly,
|
|
144
|
-
};
|
|
4
|
+
// Re-export for backward compatibility after directory structure refactoring
|
|
5
|
+
// TODO: Remove this file in a future major version
|
|
6
|
+
var SemiModal_1 = require("./SemiModal/SemiModal");
|
|
7
|
+
Object.defineProperty(exports, "SemiModal", { enumerable: true, get: function () { return SemiModal_1.SemiModal; } });
|
|
145
8
|
//# sourceMappingURL=SemiModal.js.map
|
package/Modal/SemiModal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemiModal.js","sourceRoot":"","sources":["../../src/Modal/SemiModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SemiModal.js","sourceRoot":"","sources":["../../src/Modal/SemiModal.tsx"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,mDAAmD;AACnD,mDAAkD;AAAzC,sGAAA,SAAS,OAAA"}
|
package/Modal/SemiModal.mjs
CHANGED
|
@@ -1,76 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { IconButton } from "../IconButton/index.mjs";
|
|
5
|
-
const BLOCK_NAME = 'spui-SemiModal';
|
|
6
|
-
const Frame = forwardRef(function SemiModal({ children, open, size = 'medium', type = 'popup', onClose, ...rest }, ref) {
|
|
7
|
-
const dialogEl = useRef(null);
|
|
8
|
-
// 閉じるアイコンを押した時
|
|
9
|
-
const handleFormSubmit = (event) => {
|
|
10
|
-
event.preventDefault(); // To be closed with the open prop
|
|
11
|
-
onClose?.(event);
|
|
12
|
-
};
|
|
13
|
-
// backdropを押した時
|
|
14
|
-
const handleDialogClick = (event) => {
|
|
15
|
-
// Detect backdrop click
|
|
16
|
-
if (event.target === dialogEl.current) {
|
|
17
|
-
onClose?.(event);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
//EscKeyを押したとき
|
|
21
|
-
const handleDialogClose = (event) => {
|
|
22
|
-
// Detect escape key type
|
|
23
|
-
if (event.target === dialogEl.current) {
|
|
24
|
-
onClose?.(event);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (!dialogEl.current) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (open) {
|
|
32
|
-
dialogEl.current?.showModal?.();
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
dialogEl.current?.close?.();
|
|
36
|
-
}
|
|
37
|
-
}, [open, dialogEl]);
|
|
38
|
-
return (React.createElement("dialog", { role: "dialog", className: BLOCK_NAME, ref: useMergeRefs([dialogEl, ref]), onClick: handleDialogClick, onClose: handleDialogClose, "data-type": type, "data-size": size, ...rest },
|
|
39
|
-
React.createElement("form", { className: `${BLOCK_NAME}-frame`, method: "dialog", onSubmit: handleFormSubmit }, children)));
|
|
40
|
-
});
|
|
41
|
-
const Header = ({ children, ...rest }) => {
|
|
42
|
-
return (React.createElement("header", { role: "heading", className: `${BLOCK_NAME}-header`, ...rest },
|
|
43
|
-
children,
|
|
44
|
-
React.createElement("div", { className: `${BLOCK_NAME}-closeIconButton` },
|
|
45
|
-
React.createElement(IconButton, { style: { width: '100%', height: '100%' }, "aria-label": "\u9589\u3058\u308B", variant: "neutral" },
|
|
46
|
-
React.createElement(CrossBold, { "aria-hidden": "true", className: `${BLOCK_NAME}-closeIcon` })))));
|
|
47
|
-
};
|
|
48
|
-
const HeaderTitle = ({ children, ...rest }) => {
|
|
49
|
-
return (React.createElement("p", { className: `${BLOCK_NAME}-headerTitle`, ...rest }, children));
|
|
50
|
-
};
|
|
51
|
-
const Contents = ({ children, ...rest }) => {
|
|
52
|
-
return (React.createElement("div", { className: `${BLOCK_NAME}-contents`, ...rest }, children));
|
|
53
|
-
};
|
|
54
|
-
const Footer = ({ children, ...rest }) => {
|
|
55
|
-
return (React.createElement("div", { className: `${BLOCK_NAME}-footer`, ...rest }, children));
|
|
56
|
-
};
|
|
57
|
-
const StyleOnly = ({ className, children, size = 'medium', type = 'popup', ...rest }) => {
|
|
58
|
-
return (React.createElement("div", { className: [
|
|
59
|
-
BLOCK_NAME,
|
|
60
|
-
`${BLOCK_NAME}--styleOnly`,
|
|
61
|
-
`${BLOCK_NAME}--${size}`,
|
|
62
|
-
className,
|
|
63
|
-
]
|
|
64
|
-
.filter(Boolean)
|
|
65
|
-
.join(' ')
|
|
66
|
-
.trim(), ...rest, "data-type": type, "data-size": size },
|
|
67
|
-
React.createElement("div", { className: `${BLOCK_NAME}-frame` }, children)));
|
|
68
|
-
};
|
|
69
|
-
export const SemiModal = {
|
|
70
|
-
Frame,
|
|
71
|
-
Header,
|
|
72
|
-
HeaderTitle,
|
|
73
|
-
Contents,
|
|
74
|
-
Footer,
|
|
75
|
-
StyleOnly,
|
|
76
|
-
};
|
|
1
|
+
// Re-export for backward compatibility after directory structure refactoring
|
|
2
|
+
// TODO: Remove this file in a future major version
|
|
3
|
+
export { SemiModal } from "./SemiModal/SemiModal.mjs";
|
package/Table/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--Table-backgroundColor:var(--color-surface-primary);--Table-head-backgroundColor:var(--color-surface-tertiary);--Table-cell-backgroundColor:var(--color-surface-primary);--Table-row-striped-backgroundColor:var(--color-background);--Table-head-color:var(--color-text-high-emphasis);--Table-cell-color:var(--color-text-high-emphasis);--Table-footer-color:var(--color-text-high-emphasis);--Table-head-fontWeight:bold;--Table-cell-fontWeight:normal;--Table-footer-fontWeight:normal;--Table-head-fontSize:0.875em;--Table-cell-fontSize:0.875em;--Table-footer-fontSize:0.875em;--Table-head-lineHeight:1.4;--Table-cell-lineHeight:1.4;--Table-footer-lineHeight:1.4;--Table-outlineColor:var(--color-border-strong-emphasis);--Table-cell-borderColor:var(--color-border-low-emphasis);--Table-footer-separatorColor:var(--color-border-medium-emphasis);--Table-borderRadius:16px;--Table-head-padding:12px;--Table-cell-padding:12px;--Table-footer-padding:12px;--Table-caption-color:var(--color-text-low-emphasis);--Table-caption-fontSize:0.75em;--Table-caption-lineHeight:1.6;--Table-caption-fontWeight:normal}.spui-Table-frame{position:relative;width:100%}.spui-Table-frame--scrollable{overflow-x:auto;scroll-behavior:smooth}.spui-Table{background-color:var(--Table-backgroundColor);border-spacing:0;table-layout:auto;width:100%}.spui-Table--fixed{table-layout:fixed}.spui-Table--scrollable{min-width:-moz-max-content;min-width:max-content;width:100%}.spui-Table--horizontal .spui-Table-cell,.spui-Table--horizontal .spui-Table-head{border-bottom:1px solid var(--Table-cell-borderColor)}.spui-Table--horizontal .spui-Table-body .spui-Table-row:last-child .spui-Table-cell,.spui-Table--horizontal .spui-Table-body .spui-Table-row:last-child .spui-Table-head{border-bottom:none}.spui-Table--horizontal .spui-Table-footer .spui-Table-row:first-child .spui-Table-cell,.spui-Table--horizontal .spui-Table-footer .spui-Table-row:first-child .spui-Table-head{border-top:2px solid var(--Table-footer-separatorColor)}.spui-Table--horizontal .spui-Table-footer .spui-Table-row:last-child .spui-Table-cell,.spui-Table--horizontal .spui-Table-footer .spui-Table-row:last-child .spui-Table-head{border-bottom:none}.spui-Table--vertical .spui-Table-cell,.spui-Table--vertical .spui-Table-head{border-right:1px solid var(--Table-cell-borderColor)}.spui-Table--vertical .spui-Table-cell:last-child,.spui-Table--vertical .spui-Table-head:last-child{border-right:none}.spui-Table--outlined{border:1px solid var(--Table-outlineColor)}.spui-Table-footer .spui-Table-cell{background-color:var(--Table-cell-backgroundColor)}.spui-Table-footer .spui-Table-cell,.spui-Table-footer .spui-Table-head{color:var(--Table-footer-color);font-size:var(--Table-footer-fontSize);font-weight:var(--Table-footer-fontWeight);line-height:var(--Table-footer-lineHeight);padding:var(--Table-footer-padding)}.spui-Table--rounded{border-collapse:separate;border-spacing:0}.spui-Table--rounded,.spui-Table--rounded.spui-Table--outlined{border-radius:var(--Table-borderRadius)}.spui-Table--rounded .spui-Table-header .spui-Table-row:first-child .spui-Table-head:first-child{border-top-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-header .spui-Table-row:first-child .spui-Table-head:last-child{border-top-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-cell:first-child,.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-head:first-child{border-top-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-cell:last-child,.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-head:last-child{border-top-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:first-child,.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-head:first-child{border-bottom-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:last-child,.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-head:last-child{border-bottom-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:first-child,.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:last-child,.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-head:first-child,.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-head:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0}.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-cell:first-child,.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-head:first-child{border-bottom-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-cell:last-child,.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-head:last-child{border-bottom-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--striped .spui-Table-body .spui-Table-row:nth-child(2n) .spui-Table-cell{background-color:var(--Table-row-striped-backgroundColor)}.spui-Table-caption{caption-side:bottom;color:var(--Table-caption-color);font-size:var(--Table-caption-fontSize);font-weight:var(--Table-caption-fontWeight);line-height:var(--Table-caption-lineHeight);margin-top:12px;text-align:left}.spui-Table-head{background-color:var(--Table-head-backgroundColor);color:var(--Table-head-color);font-size:var(--Table-head-fontSize);font-weight:var(--Table-head-fontWeight);line-height:var(--Table-head-lineHeight);overflow-wrap:break-word;padding:var(--Table-head-padding);text-align:left;vertical-align:middle}.spui-Table-head--alignLeft{text-align:left}.spui-Table-head--alignCenter{text-align:center}.spui-Table-head--alignRight{text-align:right}.spui-Table-cell{background-color:var(--Table-cell-backgroundColor);color:var(--Table-cell-color);font-size:var(--Table-cell-fontSize);font-weight:var(--Table-cell-fontWeight);line-height:var(--Table-cell-lineHeight);overflow-wrap:break-word;padding:var(--Table-cell-padding);text-align:left;vertical-align:middle}.spui-Table-cell--alignLeft{text-align:left}.spui-Table-cell--alignCenter{text-align:center}.spui-Table-cell--alignRight{text-align:right}@media (prefers-reduced-motion:reduce){.spui-Table-frame--scrollable{scroll-behavior:auto}}
|
|
1
|
+
:root{--Table-backgroundColor:var(--color-surface-primary);--Table-head-backgroundColor:var(--color-surface-tertiary);--Table-cell-backgroundColor:var(--color-surface-primary);--Table-row-striped-backgroundColor:var(--color-background);--Table-head-color:var(--color-text-high-emphasis);--Table-cell-color:var(--color-text-high-emphasis);--Table-footer-color:var(--color-text-high-emphasis);--Table-head-fontWeight:bold;--Table-cell-fontWeight:normal;--Table-footer-fontWeight:normal;--Table-head-fontSize:0.875em;--Table-cell-fontSize:0.875em;--Table-footer-fontSize:0.875em;--Table-head-lineHeight:1.4;--Table-cell-lineHeight:1.4;--Table-footer-lineHeight:1.4;--Table-outlineColor:var(--color-border-strong-emphasis);--Table-cell-borderColor:var(--color-border-low-emphasis);--Table-footer-separatorColor:var(--color-border-medium-emphasis);--Table-borderRadius:16px;--Table-head-padding:12px;--Table-cell-padding:12px;--Table-footer-padding:12px;--Table-caption-color:var(--color-text-low-emphasis);--Table-caption-fontSize:0.75em;--Table-caption-lineHeight:1.6;--Table-caption-fontWeight:normal}.spui-Table-frame{position:relative;width:100%}.spui-Table-frame--scrollable{overflow-x:auto;scroll-behavior:smooth}.spui-Table{background-color:var(--Table-backgroundColor);border-spacing:0;table-layout:auto;width:100%}.spui-Table--fixed{table-layout:fixed}.spui-Table--scrollable{min-width:-moz-max-content;min-width:max-content;width:100%}.spui-Table--horizontal .spui-Table-cell,.spui-Table--horizontal .spui-Table-head{border-bottom:1px solid var(--Table-cell-borderColor)}.spui-Table--horizontal .spui-Table-body .spui-Table-row:last-child .spui-Table-cell,.spui-Table--horizontal .spui-Table-body .spui-Table-row:last-child .spui-Table-head{border-bottom:none}.spui-Table--horizontal .spui-Table-footer .spui-Table-row:first-child .spui-Table-cell,.spui-Table--horizontal .spui-Table-footer .spui-Table-row:first-child .spui-Table-head{border-top:2px solid var(--Table-footer-separatorColor)}.spui-Table--horizontal .spui-Table-footer .spui-Table-row:last-child .spui-Table-cell,.spui-Table--horizontal .spui-Table-footer .spui-Table-row:last-child .spui-Table-head{border-bottom:none}.spui-Table--vertical .spui-Table-cell,.spui-Table--vertical .spui-Table-head{border-right:1px solid var(--Table-cell-borderColor)}.spui-Table--vertical .spui-Table-cell:last-child,.spui-Table--vertical .spui-Table-head:last-child{border-right:none}.spui-Table--outlined{border:1px solid var(--Table-outlineColor)}.spui-Table-footer .spui-Table-cell{background-color:var(--Table-cell-backgroundColor)}.spui-Table-footer .spui-Table-cell,.spui-Table-footer .spui-Table-head{color:var(--Table-footer-color);font-size:var(--Table-footer-fontSize);font-weight:var(--Table-footer-fontWeight);line-height:var(--Table-footer-lineHeight);padding:var(--Table-footer-padding)}.spui-Table--rounded{border-collapse:separate;border-spacing:0}.spui-Table--rounded,.spui-Table--rounded.spui-Table--outlined{border-radius:var(--Table-borderRadius)}.spui-Table--rounded .spui-Table-header .spui-Table-row:first-child .spui-Table-head:first-child{border-top-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-header .spui-Table-row:first-child .spui-Table-head:last-child{border-top-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-cell:first-child,.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-head:first-child{border-top-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-cell:last-child,.spui-Table--rounded:not(:has(.spui-Table-header)) .spui-Table-body .spui-Table-row:first-child .spui-Table-head:last-child{border-top-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:first-child,.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-head:first-child{border-bottom-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:last-child,.spui-Table--rounded .spui-Table-body .spui-Table-row:last-child .spui-Table-head:last-child{border-bottom-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:first-child,.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-cell:last-child,.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-head:first-child,.spui-Table--rounded:has(.spui-Table-footer) .spui-Table-body .spui-Table-row:last-child .spui-Table-head:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0}.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-cell:first-child,.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-head:first-child{border-bottom-left-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-cell:last-child,.spui-Table--rounded .spui-Table-footer .spui-Table-row:last-child .spui-Table-head:last-child{border-bottom-right-radius:calc(var(--Table-borderRadius) - 1px)}.spui-Table--striped .spui-Table-body .spui-Table-row:nth-child(2n) .spui-Table-cell{background-color:var(--Table-row-striped-backgroundColor)}.spui-Table-caption{caption-side:bottom;color:var(--Table-caption-color);font-size:var(--Table-caption-fontSize);font-weight:var(--Table-caption-fontWeight);line-height:var(--Table-caption-lineHeight);margin-top:12px;text-align:left}.spui-Table-head{background-color:var(--Table-head-backgroundColor);box-sizing:border-box;color:var(--Table-head-color);font-size:var(--Table-head-fontSize);font-weight:var(--Table-head-fontWeight);line-height:var(--Table-head-lineHeight);overflow-wrap:break-word;padding:var(--Table-head-padding);text-align:left;vertical-align:middle}.spui-Table-head--alignLeft{text-align:left}.spui-Table-head--alignCenter{text-align:center}.spui-Table-head--alignRight{text-align:right}.spui-Table-cell{background-color:var(--Table-cell-backgroundColor);box-sizing:border-box;color:var(--Table-cell-color);font-size:var(--Table-cell-fontSize);font-weight:var(--Table-cell-fontWeight);line-height:var(--Table-cell-lineHeight);overflow-wrap:break-word;padding:var(--Table-cell-padding);text-align:left;vertical-align:middle}.spui-Table-cell--alignLeft{text-align:left}.spui-Table-cell--alignCenter{text-align:center}.spui-Table-cell--alignRight{text-align:right}@media (prefers-reduced-motion:reduce){.spui-Table-frame--scrollable{scroll-behavior:auto}}
|
package/Table/Table.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare const Table: {
|
|
|
42
42
|
layout?: Layout;
|
|
43
43
|
children?: ReactNode;
|
|
44
44
|
className?: string;
|
|
45
|
-
} & Omit<React.TableHTMLAttributes<HTMLTableElement>, "className" | "style"> & React.RefAttributes<
|
|
45
|
+
} & Omit<React.TableHTMLAttributes<HTMLTableElement>, "className" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
46
|
Caption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
47
47
|
Header: React.ForwardRefExoticComponent<TableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
48
48
|
Body: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
package/Table/Table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEpE,KAAK,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzD,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;AAE9C,KAAK,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAazC,UAAU,iBACR,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAC7C,OAAO,GAAG,WAAW,CACtB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,UAAU,gBACR,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAC7C,OAAO,GAAG,WAAW,CACtB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,UAAU,cACR,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAC7C,OAAO,GAAG,WAAW,CACtB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,UAAU,gBACR,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAC7C,OAAO,GAAG,WAAW,CACtB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,UAAU,aACR,SAAQ,IAAI,CACV,KAAK,CAAC,cAAc,C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AE,MAAM,CAAC;CACpB;AAwND,eAAO,MAAM,KAAK;;sBAxSF,KAAK,CAAC,UAAU,CAAC;kBACrB,OAAO;kBACP,OAAO;iBACR,MAAM;mBACJ,SAAS;oBACR,MAAM;;;;;;;;;CA4SnB,CAAC"}
|
package/Table/Table.js
CHANGED
|
@@ -105,23 +105,19 @@ var Frame = (0, react_1.forwardRef)(function TableFrame(_a, ref) {
|
|
|
105
105
|
striped && "".concat(BLOCK_NAME, "--striped"),
|
|
106
106
|
layout === 'fixed' && "".concat(BLOCK_NAME, "--fixed"),
|
|
107
107
|
layout === 'scrollable' && "".concat(BLOCK_NAME, "--scrollable"),
|
|
108
|
-
className,
|
|
109
108
|
], false).filter(Boolean)
|
|
110
109
|
.join(' ')
|
|
111
110
|
.trim();
|
|
112
|
-
var
|
|
111
|
+
var wrapperClasses = [
|
|
113
112
|
"".concat(BLOCK_NAME, "-frame"),
|
|
114
113
|
layout === 'scrollable' && "".concat(BLOCK_NAME, "-frame--scrollable"),
|
|
114
|
+
className,
|
|
115
115
|
]
|
|
116
116
|
.filter(Boolean)
|
|
117
117
|
.join(' ')
|
|
118
118
|
.trim();
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (layout === 'scrollable') {
|
|
122
|
-
return react_1.default.createElement("div", { className: scrollContainerClasses }, tableElement);
|
|
123
|
-
}
|
|
124
|
-
return tableElement;
|
|
119
|
+
return (react_1.default.createElement("div", { ref: ref, className: wrapperClasses },
|
|
120
|
+
react_1.default.createElement("table", __assign({ className: classes }, rest), children)));
|
|
125
121
|
});
|
|
126
122
|
// Table.Caption
|
|
127
123
|
var Caption = (0, react_1.forwardRef)(function TableCaption(_a, ref) {
|
package/Table/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../src/Table/Table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAG;IACnB,KAAK,OAAA;IACL,OAAO,SAAA;IACP,MAAM,QAAA;IACN,IAAI,MAAA;IACJ,MAAM,QAAA;IACN,GAAG,KAAA;IACH,IAAI,MAAA;IACJ,IAAI,MAAA;CACL,CAAC"}
|
package/Table/Table.mjs
CHANGED
|
@@ -37,24 +37,20 @@ const Frame = forwardRef(function TableFrame({ borderTypes = [], rounded = false
|
|
|
37
37
|
striped && `${BLOCK_NAME}--striped`,
|
|
38
38
|
layout === 'fixed' && `${BLOCK_NAME}--fixed`,
|
|
39
39
|
layout === 'scrollable' && `${BLOCK_NAME}--scrollable`,
|
|
40
|
-
className,
|
|
41
40
|
]
|
|
42
41
|
.filter(Boolean)
|
|
43
42
|
.join(' ')
|
|
44
43
|
.trim();
|
|
45
|
-
const
|
|
44
|
+
const wrapperClasses = [
|
|
46
45
|
`${BLOCK_NAME}-frame`,
|
|
47
46
|
layout === 'scrollable' && `${BLOCK_NAME}-frame--scrollable`,
|
|
47
|
+
className,
|
|
48
48
|
]
|
|
49
49
|
.filter(Boolean)
|
|
50
50
|
.join(' ')
|
|
51
51
|
.trim();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (layout === 'scrollable') {
|
|
55
|
-
return React.createElement("div", { className: scrollContainerClasses }, tableElement);
|
|
56
|
-
}
|
|
57
|
-
return tableElement;
|
|
52
|
+
return (React.createElement("div", { ref: ref, className: wrapperClasses },
|
|
53
|
+
React.createElement("table", { className: classes, ...rest }, children)));
|
|
58
54
|
});
|
|
59
55
|
// Table.Caption
|
|
60
56
|
const Caption = forwardRef(function TableCaption({ children, className, ...rest }, ref) {
|