@lotte-innovate/ui-component-test 0.2.70 → 0.2.72
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +225 -226
- package/dist/globals.css +4 -4
- package/dist/lib/color/constants.js +1 -1
- package/dist/lib/color/constants.mjs +1 -1
- package/dist/lib/color/constants.mjs.map +1 -1
- package/dist/lib/components/Avatar/index.js +1 -0
- package/dist/lib/components/Avatar/index.mjs +1 -1
- package/dist/lib/components/Badge/index.js +3 -3
- package/dist/lib/components/Badge/index.mjs +1 -1
- package/dist/lib/components/Box/index.js +2 -2
- package/dist/lib/components/Box/index.mjs +1 -1
- package/dist/lib/components/Box/index.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.js +2 -2
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.js +3 -3
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
- package/dist/lib/components/Breadcrumb/BreadcrumbRoot.js +2 -2
- package/dist/lib/components/Breadcrumb/BreadcrumbRoot.mjs +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +1 -1
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -1
- package/dist/lib/components/Container/index.js +2 -2
- package/dist/lib/components/Container/index.mjs +1 -1
- package/dist/lib/components/Container/index.mjs.map +1 -1
- package/dist/lib/components/Datepicker/index.d.ts +2 -1
- package/dist/lib/components/Datepicker/index.js +2 -2
- package/dist/lib/components/Datepicker/index.mjs +1 -1
- package/dist/lib/components/Dialog/DialogRoot.d.ts +4 -3
- package/dist/lib/components/Dialog/index.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +3 -3
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
- package/dist/lib/components/Editor/index.d.ts +0 -1
- package/dist/lib/components/Editor/index.js +11 -2
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/components/Flex/index.js +2 -2
- package/dist/lib/components/Flex/index.mjs +1 -1
- package/dist/lib/components/Flex/index.mjs.map +1 -1
- package/dist/lib/components/Gnb/GnbInfo.js +2 -2
- package/dist/lib/components/Gnb/GnbInfo.mjs +1 -1
- package/dist/lib/components/Gnb/GnbLogo.js +1 -1
- package/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
- package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
- package/dist/lib/components/Gnb/GnbMenuItem.js +1 -1
- package/dist/lib/components/Gnb/GnbMenuItem.mjs +1 -1
- package/dist/lib/components/Grid/NumberingPagination.js +64 -22
- package/dist/lib/components/Grid/NumberingPagination.mjs +1 -1
- package/dist/lib/components/Grid/NumberingPagination.mjs.map +1 -1
- package/dist/lib/components/Grid/index.d.ts +1 -0
- package/dist/lib/components/Grid/index.js +56 -38
- package/dist/lib/components/Grid/index.mjs +1 -1
- package/dist/lib/components/Grid/useGrid.js +30 -14
- package/dist/lib/components/Grid/useGrid.mjs +1 -1
- package/dist/lib/components/IconButton/index.js +10 -10
- package/dist/lib/components/IconButton/index.mjs +1 -1
- package/dist/lib/components/Modal/ModalRoot.d.ts +2 -2
- package/dist/lib/components/Radio/index.js +2 -2
- package/dist/lib/components/Radio/index.mjs +1 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +3 -1
- package/dist/lib/components/RadioCards/index.d.ts +1 -1
- package/dist/lib/components/SearchBar/index.js +2 -2
- package/dist/lib/components/SearchBar/index.mjs +1 -1
- package/dist/lib/components/Select/index.d.ts +4 -4
- package/dist/lib/components/Select/index.js +2 -2
- package/dist/lib/components/Select/index.mjs +1 -1
- package/dist/lib/components/Separator/index.d.ts +1 -1
- package/dist/lib/components/SideBar/index.d.ts +27 -0
- package/dist/lib/components/SideBar/index.js +20 -5
- package/dist/lib/components/SideBar/index.mjs +1 -1
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/index.js +17 -10
- package/dist/lib/components/Table/index.mjs +1 -1
- package/dist/lib/components/Tabs/DynamicTabs.d.ts +4 -2
- package/dist/lib/components/Tabs/DynamicTabs.js +21 -16
- package/dist/lib/components/Tabs/DynamicTabs.mjs +1 -1
- package/dist/lib/components/TextField/index.js +2 -0
- package/dist/lib/components/TextField/index.mjs +1 -1
- package/dist/lib/components/Tree/index.d.ts +1 -2
- package/dist/lib/components/Tree/index.js +3 -2
- package/dist/lib/components/Tree/index.mjs +1 -1
- package/dist/lib/components/Tree/index.mjs.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/useLoadTinyMCE.d.ts +1 -37
- package/dist/lib/utils/useLoadTinyMCE.js +151 -36
- package/dist/lib/utils/useLoadTinyMCE.mjs +2 -0
- package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -0
- package/dist/lib/utils/useWindowSize.d.ts +1 -0
- package/dist/lib/utils/useWindowSize.js +17 -18
- package/dist/lib/utils/useWindowSize.mjs +2 -0
- package/dist/lib/utils/useWindowSize.mjs.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +150 -150
- package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs +0 -2
- package/dist/lib/node_modules/react-complex-tree/lib/style-modern.mjs.map +0 -1
- package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs +0 -2
- package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs.map +0 -1
@@ -1,59 +1,77 @@
|
|
1
1
|
'use client';
|
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
|
+
};
|
2
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
3
14
|
import { flexRender } from '@tanstack/react-table';
|
4
15
|
// import './index.css';
|
5
16
|
import Table from '../Table';
|
6
17
|
import { ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';
|
7
18
|
import { cn } from '../../../lib/utils/utils';
|
8
|
-
import { bgColorStyle } from '../../../lib/constants';
|
19
|
+
import { bgColorStyle, radiusVariants } from '../../../lib/constants';
|
9
20
|
import { cva } from 'class-variance-authority';
|
10
21
|
import NumberingPagination from './NumberingPagination';
|
11
22
|
export var GridVariants = cva("", {
|
12
23
|
variants: {
|
13
24
|
color: bgColorStyle(),
|
25
|
+
radius: __assign({}, radiusVariants['large']),
|
14
26
|
},
|
15
27
|
defaultVariants: {
|
16
|
-
|
28
|
+
radius: 'medium',
|
17
29
|
},
|
18
30
|
});
|
19
31
|
function Grid(_a) {
|
20
|
-
var _b, _c, _d;
|
32
|
+
var _b, _c, _d, _e;
|
21
33
|
var table = _a.table;
|
22
|
-
return (
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
:
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
34
|
+
return (_jsxs("div", { style: { direction: table.options.columnResizeDirection }, children: [_jsxs(Table.Root, { size: (_b = table.options) === null || _b === void 0 ? void 0 : _b.size, appearance: (_c = table.options) === null || _c === void 0 ? void 0 : _c.appearance, radius: table.options.radius, className: cn("rounded-b-none", (_d = table.options) === null || _d === void 0 ? void 0 : _d.tableRootClassName), children: [_jsx(Table.Header, { children: table
|
35
|
+
.getHeaderGroups()
|
36
|
+
.map(function (headerGroup) {
|
37
|
+
return (_jsx(Table.Row, { children: headerGroup.headers.map(function (header, index) {
|
38
|
+
var _a;
|
39
|
+
return (_jsxs(Table.ColumnHeaderCell, { colSpan: header.colSpan,
|
40
|
+
style: {
|
41
|
+
width: header.getSize(),
|
42
|
+
borderLeftWidth: index === 0 ? '' : '1px',
|
43
|
+
}, children: [header.isPlaceholder ? null : (_jsxs("div", { className: header.column.getCanSort()
|
44
|
+
? 'flex cursor-pointer select-none items-center justify-between'
|
45
|
+
: 'h-full w-full flex-1', onClick: header.column.getToggleSortingHandler(), title: header.column.getCanSort()
|
46
|
+
? header.column.getNextSortingOrder() === 'asc'
|
47
|
+
? 'Sort ascending'
|
48
|
+
: header.column.getNextSortingOrder() === 'desc'
|
49
|
+
? 'Sort descending'
|
50
|
+
: 'Clear sort'
|
51
|
+
: undefined, children: [flexRender(header.column.columnDef.header, header.getContext()), header.column.getIsSorted() == 'asc' ? (_jsx(ChevronUpIcon, {})) : header.column.getIsSorted() == 'desc' ? (_jsx(ChevronDownIcon, {})) : null] })), _jsx("div", { onDoubleClick: function () { return header.column.resetSize(); },
|
52
|
+
onMouseDown: header.getResizeHandler(),
|
53
|
+
onTouchStart: header.getResizeHandler(),
|
54
|
+
className: cn('absolute top-0 h-full w-[3px] bg-slateA-3 cursor-col-resize select-none touch-none right-0 opacity-0 hover:opacity-100', table.options.columnResizeDirection, header.column.getIsResizing()
|
55
|
+
? GridVariants({
|
56
|
+
color: table.options.color,
|
57
|
+
})
|
58
|
+
: ''),
|
59
|
+
style: {
|
60
|
+
transform: header.column.getIsResizing()
|
61
|
+
? "translateX(".concat((table.options.columnResizeDirection === 'rtl' ? -1 : 1) *
|
62
|
+
((_a = table.getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0), "px)")
|
63
|
+
: '',
|
64
|
+
} })] }, header.id));
|
65
|
+
}) }, headerGroup.id));
|
66
|
+
}) }), _jsx(Table.Body, { className: "border-b", children: table
|
67
|
+
.getRowModel()
|
68
|
+
.rows.map(function (row) { return (_jsx(Table.Row, { onClick: function () { return table.options.onRowClick && table.options.onRowClick(row); }, onDoubleClick: function () {
|
69
|
+
return table.options.onRowDoubleClick && table.options.onRowDoubleClick(row);
|
70
|
+
}, className: "hover:bg-gray-100 ".concat(row.getIsSelected() ? 'bg-gray-200' : ''), children: row.getVisibleCells().map(function (cell, index) {
|
71
|
+
return (_jsx(Table.Cell, __assign({ style: {
|
56
72
|
width: cell.column.getSize(),
|
57
|
-
|
73
|
+
borderLeftWidth: index === 0 ? '' : '1px',
|
74
|
+
} }, cell.column.columnDef.meta, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }), cell.id));
|
75
|
+
}) }, row.id)); }) })] }), _jsx("div", { className: cn('border-[1px] border-t-0 py-[6px]', GridVariants({ radius: table.options.radius }), 'rounded-t-none'), children: ((_e = table.options) === null || _e === void 0 ? void 0 : _e.enableRowPagination) && _jsx(NumberingPagination, { table: table }) })] }));
|
58
76
|
}
|
59
77
|
export default Grid;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{
|
2
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{flexRender as n}from"@tanstack/react-table";import t from"../Table/index.mjs";import{ChevronUpIcon as r,ChevronDownIcon as i}from"@radix-ui/react-icons";import{cn as l}from"../../utils/utils.mjs";import{bgColorStyle as a,radiusVariants as c}from"../../constants.mjs";import{cva as s}from"class-variance-authority";import u from"./NumberingPagination.mjs";var d=function(){return d=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var r in o=arguments[n])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},d.apply(this,arguments)},m=s("",{variants:{color:a(),radius:d({},c.large)},defaultVariants:{radius:"medium"}});function p(a){var c,s,p,g,f=a.table;return e("div",{style:{direction:f.options.columnResizeDirection},children:[e(t.Root,{size:null===(c=f.options)||void 0===c?void 0:c.size,appearance:null===(s=f.options)||void 0===s?void 0:s.appearance,radius:f.options.radius,className:l("rounded-b-none",null===(p=f.options)||void 0===p?void 0:p.tableRootClassName),children:[o(t.Header,{children:f.getHeaderGroups().map((function(a){return o(t.Row,{children:a.headers.map((function(a,c){var s;return e(t.ColumnHeaderCell,{colSpan:a.colSpan,style:{width:a.getSize(),borderLeftWidth:0===c?"":"1px"},children:[a.isPlaceholder?null:e("div",{className:a.column.getCanSort()?"flex cursor-pointer select-none items-center justify-between":"h-full w-full flex-1",onClick:a.column.getToggleSortingHandler(),title:a.column.getCanSort()?"asc"===a.column.getNextSortingOrder()?"Sort ascending":"desc"===a.column.getNextSortingOrder()?"Sort descending":"Clear sort":void 0,children:[n(a.column.columnDef.header,a.getContext()),"asc"==a.column.getIsSorted()?o(r,{}):"desc"==a.column.getIsSorted()?o(i,{}):null]}),o("div",{onDoubleClick:function(){return a.column.resetSize()},onMouseDown:a.getResizeHandler(),onTouchStart:a.getResizeHandler(),className:l("absolute top-0 h-full w-[3px] bg-slateA-3 cursor-col-resize select-none touch-none right-0 opacity-0 hover:opacity-100",f.options.columnResizeDirection,a.column.getIsResizing()?m({color:f.options.color}):""),style:{transform:a.column.getIsResizing()?"translateX(".concat(("rtl"===f.options.columnResizeDirection?-1:1)*(null!==(s=f.getState().columnSizingInfo.deltaOffset)&&void 0!==s?s:0),"px)"):""}})]},a.id)}))},a.id)}))}),o(t.Body,{className:"border-b",children:f.getRowModel().rows.map((function(e){return o(t.Row,{onClick:function(){return f.options.onRowClick&&f.options.onRowClick(e)},onDoubleClick:function(){return f.options.onRowDoubleClick&&f.options.onRowDoubleClick(e)},className:"hover:bg-gray-100 ".concat(e.getIsSelected()?"bg-gray-200":""),children:e.getVisibleCells().map((function(e,r){return o(t.Cell,d({style:{width:e.column.getSize(),borderLeftWidth:0===r?"":"1px"}},e.column.columnDef.meta,{children:n(e.column.columnDef.cell,e.getContext())}),e.id)}))},e.id)}))})]}),o("div",{className:l("border-[1px] border-t-0 py-[6px]",m({radius:f.options.radius}),"rounded-t-none"),children:(null===(g=f.options)||void 0===g?void 0:g.enableRowPagination)&&o(u,{table:f})})]})}export{m as GridVariants,p as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
21
21
|
}
|
22
22
|
return t;
|
23
23
|
};
|
24
|
-
import { jsx as _jsx,
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
25
25
|
import { createColumnHelper, getCoreRowModel, getExpandedRowModel, getPaginationRowModel, getSortedRowModel, useReactTable, } from '@tanstack/react-table';
|
26
26
|
import React, { useRef } from 'react';
|
27
27
|
import IconButton from '../IconButton';
|
@@ -29,22 +29,22 @@ import { ChevronDownIcon, ChevronRightIcon } from '@radix-ui/react-icons';
|
|
29
29
|
import Checkbox from '../Checkbox';
|
30
30
|
import { useTheme } from '../../../lib/theme';
|
31
31
|
function IndeterminateCheckbox(_a) {
|
32
|
-
var indeterminate = _a.indeterminate, checked = _a.checked, disabled = _a.disabled, onChange = _a.onChange;
|
32
|
+
var indeterminate = _a.indeterminate, checked = _a.checked, disabled = _a.disabled, onChange = _a.onChange, size = _a.size;
|
33
33
|
var ref = useRef();
|
34
34
|
React.useEffect(function () {
|
35
35
|
if (typeof indeterminate === 'boolean') {
|
36
36
|
ref.current.indeterminate = checked && indeterminate;
|
37
37
|
}
|
38
38
|
}, [ref, indeterminate]);
|
39
|
-
return (_jsx(Checkbox, { ref: ref, id: "checkbox", checked: checked, disabled: disabled, onCheckedChange: function (v) { return onChange && onChange({ target: { value: v } }); }, indeterminate: indeterminate }));
|
39
|
+
return (_jsx(Checkbox, { ref: ref, id: "checkbox", checked: checked, disabled: disabled, size: size, onCheckedChange: function (v) { return onChange && onChange({ target: { value: v } }); }, indeterminate: indeterminate, className: "mr-0" }));
|
40
40
|
}
|
41
41
|
export var useGrid = function (_a) {
|
42
|
-
var _b, _c;
|
42
|
+
var _b, _c, _d;
|
43
43
|
var props = __rest(_a, []);
|
44
44
|
var theme = useTheme().theme;
|
45
|
-
var
|
46
|
-
var
|
47
|
-
var
|
45
|
+
var _e = React.useState([]), sorting = _e[0], setSorting = _e[1];
|
46
|
+
var _f = React.useState({}), expanded = _f[0], setExpanded = _f[1];
|
47
|
+
var _g = React.useState({}), defaultRowSelection = _g[0], setDefaultRowSelection = _g[1];
|
48
48
|
var columnHelper = createColumnHelper();
|
49
49
|
var columnsData = (_b = props === null || props === void 0 ? void 0 : props.columns) === null || _b === void 0 ? void 0 : _b.map(function (el) {
|
50
50
|
return columnHelper.accessor(el.id, __assign({}, el));
|
@@ -53,28 +53,44 @@ export var useGrid = function (_a) {
|
|
53
53
|
var firstcell_1 = columnsData[0].cell;
|
54
54
|
columnsData[0] = __assign(__assign({}, columnsData[0]), { cell: function (props) {
|
55
55
|
var _a;
|
56
|
-
return (_jsxs("div", { className: "flex", style: { paddingLeft: "".concat(props.row.depth * 10, "px") }, children: [props.row.getCanExpand() ? (_jsx(IconButton, {
|
56
|
+
return (_jsxs("div", { className: "flex cursor-pointer items-center", style: { paddingLeft: "".concat(props.row.depth * 10, "px") }, onClick: props.row.getToggleExpandedHandler(), children: [props.row.getCanExpand() ? (_jsx(IconButton, { appearance: "ghost", size: "small", className: "mr-1 h-3 w-3", color: (_a = props.color) !== null && _a !== void 0 ? _a : theme.themeColor, children: props.row.getIsExpanded() ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) })) : (_jsx("div", { className: "mr-2" })), _jsx("div", { children: firstcell_1 ? firstcell_1(props) : props.getValue() })] }));
|
57
57
|
} });
|
58
58
|
}
|
59
|
+
if (props.enableIndexing && !props.enableExpanding) {
|
60
|
+
columnsData === null || columnsData === void 0 ? void 0 : columnsData.unshift({
|
61
|
+
id: 'index',
|
62
|
+
size: 50,
|
63
|
+
header: 'NO',
|
64
|
+
cell: function (_a) {
|
65
|
+
var row = _a.row;
|
66
|
+
return _jsx("div", { children: row.index + 1 });
|
67
|
+
},
|
68
|
+
});
|
69
|
+
}
|
59
70
|
if (props.enableRowSelection) {
|
60
71
|
columnsData === null || columnsData === void 0 ? void 0 : columnsData.unshift({
|
61
72
|
id: 'select',
|
62
|
-
size:
|
73
|
+
size: 20,
|
63
74
|
header: function (_a) {
|
64
75
|
var table = _a.table;
|
65
|
-
return (_jsx("div", { className: "
|
76
|
+
return (_jsx("div", { className: "flex h-full w-full items-center justify-center px-1", children: _jsx(IndeterminateCheckbox, { checked: table.getIsAllRowsSelected() || table.getIsSomeRowsSelected(),
|
66
77
|
indeterminate: table.getIsSomeRowsSelected(),
|
67
|
-
onChange: table.getToggleAllRowsSelectedHandler()
|
78
|
+
onChange: table.getToggleAllRowsSelectedHandler(),
|
79
|
+
size: (props === null || props === void 0 ? void 0 : props.size) == 'x-small' ? 'small' : props === null || props === void 0 ? void 0 : props.size }) }));
|
68
80
|
},
|
69
81
|
cell: function (_a) {
|
70
82
|
var row = _a.row;
|
71
|
-
return (_jsx("div", { className: "
|
83
|
+
return (_jsx("div", { className: "flex h-full w-full items-center justify-center px-1", children: _jsx(IndeterminateCheckbox, { checked: row.getIsSelected() || row.getIsSomeSelected() || row.getIsAllSubRowsSelected(),
|
72
84
|
indeterminate: row.getIsSomeSelected() && !row.getIsAllSubRowsSelected(),
|
73
|
-
onChange: row.getToggleSelectedHandler()
|
85
|
+
onChange: row.getToggleSelectedHandler(),
|
86
|
+
size: (props === null || props === void 0 ? void 0 : props.size) == 'x-small' ? 'small' : props === null || props === void 0 ? void 0 : props.size }) }));
|
74
87
|
},
|
75
88
|
});
|
76
89
|
}
|
77
|
-
var reactTableProps = __assign(__assign({ state: { sorting: sorting, rowSelection: rowSelection, expanded: expanded } }, props), { data: props.data, columns: columnsData, color: (
|
90
|
+
var reactTableProps = __assign(__assign({ state: { sorting: sorting, rowSelection: (_c = props.rowSelection) !== null && _c !== void 0 ? _c : defaultRowSelection, expanded: expanded } }, props), { data: props.data, columns: columnsData, color: (_d = props.color) !== null && _d !== void 0 ? _d : theme.themeColor, paginateExpandedRows: true, enableExpanding: !!props.enableExpanding, getSubRows: function (row) { return row.subRows; }, onExpandedChange: setExpanded, onSortingChange: setSorting, onRowSelectionChange: function (e) {
|
91
|
+
setDefaultRowSelection(e);
|
92
|
+
props.onChangeRowSelection && props.onChangeRowSelection(e);
|
93
|
+
}, getSortedRowModel: getSortedRowModel(), getCoreRowModel: getCoreRowModel(), getExpandedRowModel: getExpandedRowModel(), manualPagination: false });
|
78
94
|
if (props.enableRowPagination) {
|
79
95
|
reactTableProps['getPaginationRowModel'] = getPaginationRowModel();
|
80
96
|
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as
|
2
|
+
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{createColumnHelper as t,getSortedRowModel as o,getCoreRowModel as l,getExpandedRowModel as r,getPaginationRowModel as a,useReactTable as i}from"@tanstack/react-table";import c,{useRef as d}from"react";import{IconButton as s}from"../IconButton/index.mjs";import{ChevronDownIcon as u,ChevronRightIcon as m}from"@radix-ui/react-icons";import{Checkbox as g}from"../Checkbox/index.mjs";import{useTheme as f}from"../../theme/ThemeProvider.mjs";var p=function(){return p=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var l in n=arguments[t])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},p.apply(this,arguments)},h=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(t[o[l]]=e[o[l]])}return t};function v(e){var t=e.indeterminate,o=e.checked,l=e.disabled,r=e.onChange,a=e.size,i=d();return c.useEffect((function(){"boolean"==typeof t&&(i.current.indeterminate=o&&t)}),[i,t]),n(g,{ref:i,id:"checkbox",checked:o,disabled:l,size:a,onCheckedChange:function(e){return r&&r({target:{value:e}})},indeterminate:t,className:"mr-0"})}var w=function(d){var g,w,x,S=h(d,[]),b=f().theme,R=c.useState([]),y=R[0],C=R[1],O=c.useState({}),j=O[0],E=O[1],I=c.useState({}),z=I[0],k=I[1],P=t(),N=null===(g=null==S?void 0:S.columns)||void 0===g?void 0:g.map((function(e){return P.accessor(e.id,p({},e))}));if(S.enableExpanding){var A=N[0].cell;N[0]=p(p({},N[0]),{cell:function(t){var o;return e("div",{className:"flex cursor-pointer items-center",style:{paddingLeft:"".concat(10*t.row.depth,"px")},onClick:t.row.getToggleExpandedHandler(),children:[t.row.getCanExpand()?n(s,{appearance:"ghost",size:"small",className:"mr-1 h-3 w-3",color:null!==(o=t.color)&&void 0!==o?o:b.themeColor,children:t.row.getIsExpanded()?n(u,{}):n(m,{})}):n("div",{className:"mr-2"}),n("div",{children:A?A(t):t.getValue()})]})}})}S.enableIndexing&&!S.enableExpanding&&(null==N||N.unshift({id:"index",size:50,header:"NO",cell:function(e){var t=e.row;return n("div",{children:t.index+1})}})),S.enableRowSelection&&(null==N||N.unshift({id:"select",size:20,header:function(e){var t=e.table;return n("div",{className:"flex h-full w-full items-center justify-center px-1",children:n(v,{checked:t.getIsAllRowsSelected()||t.getIsSomeRowsSelected(),indeterminate:t.getIsSomeRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler(),size:"x-small"==(null==S?void 0:S.size)?"small":null==S?void 0:S.size})})},cell:function(e){var t=e.row;return n("div",{className:"flex h-full w-full items-center justify-center px-1",children:n(v,{checked:t.getIsSelected()||t.getIsSomeSelected()||t.getIsAllSubRowsSelected(),indeterminate:t.getIsSomeSelected()&&!t.getIsAllSubRowsSelected(),onChange:t.getToggleSelectedHandler(),size:"x-small"==(null==S?void 0:S.size)?"small":null==S?void 0:S.size})})}}));var M=p(p({state:{sorting:y,rowSelection:null!==(w=S.rowSelection)&&void 0!==w?w:z,expanded:j}},S),{data:S.data,columns:N,color:null!==(x=S.color)&&void 0!==x?x:b.themeColor,paginateExpandedRows:!0,enableExpanding:!!S.enableExpanding,getSubRows:function(e){return e.subRows},onExpandedChange:E,onSortingChange:C,onRowSelectionChange:function(e){k(e),S.onChangeRowSelection&&S.onChangeRowSelection(e)},getSortedRowModel:o(),getCoreRowModel:l(),getExpandedRowModel:r(),manualPagination:!1});return S.enableRowPagination&&(M.getPaginationRowModel=a()),i(M)};export{w as useGrid};
|
3
3
|
//# sourceMappingURL=useGrid.mjs.map
|
@@ -33,11 +33,11 @@ var iconButtonVariants = cva("grid place-content-center transition-colors focus:
|
|
33
33
|
radius: __assign({}, radiusVariants['base']),
|
34
34
|
scaling: __assign({}, scalingVariants),
|
35
35
|
size: {
|
36
|
-
'x-small': 'p-
|
37
|
-
small: 'p-
|
38
|
-
medium: 'p-
|
39
|
-
large: 'p-[
|
40
|
-
'x-large': 'p-[
|
36
|
+
'x-small': 'p-[3px] w-5 h-5',
|
37
|
+
small: 'p-1 w-6 h-6',
|
38
|
+
medium: 'p-[7px] w-8 h-8',
|
39
|
+
large: 'p-[9px] w-10 h-10',
|
40
|
+
'x-large': 'p-[11px] w-12 h-12',
|
41
41
|
},
|
42
42
|
color: primaryColorStyle(),
|
43
43
|
},
|
@@ -49,11 +49,11 @@ var iconButtonVariants = cva("grid place-content-center transition-colors focus:
|
|
49
49
|
},
|
50
50
|
});
|
51
51
|
var iconSize = {
|
52
|
-
'x-small':
|
53
|
-
small:
|
54
|
-
medium:
|
55
|
-
large:
|
56
|
-
'x-large':
|
52
|
+
'x-small': 14,
|
53
|
+
small: 16,
|
54
|
+
medium: 18,
|
55
|
+
large: 22,
|
56
|
+
'x-large': 26,
|
57
57
|
};
|
58
58
|
export var IconButton = forwardRef(function (_a, ref) {
|
59
59
|
var children = _a.children, className = _a.className, radius = _a.radius, _b = _a.size, size = _b === void 0 ? 'medium' : _b, scaling = _a.scaling, color = _a.color, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["children", "className", "radius", "size", "scaling", "color", "appearance"]);
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import r,{forwardRef as t,Children as o}from"react";import{cva as a}from"class-variance-authority";import{radiusVariants as l,scalingVariants as n,primaryColorStyle as i,appearanceStyle as s}from"../../constants.mjs";import{cn as c}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as p}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},u.apply(this,arguments)},d=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},f=a("grid place-content-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8",{variants:{radius:u({},l.base),scaling:u({},n),size:{"x-small":"p-
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import r,{forwardRef as t,Children as o}from"react";import{cva as a}from"class-variance-authority";import{radiusVariants as l,scalingVariants as n,primaryColorStyle as i,appearanceStyle as s}from"../../constants.mjs";import{cn as c}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as p}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},u.apply(this,arguments)},d=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},f=a("grid place-content-center transition-colors focus:outline-none hover:cursor-pointer\n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8",{variants:{radius:u({},l.base),scaling:u({},n),size:{"x-small":"p-[3px] w-5 h-5",small:"p-1 w-6 h-6",medium:"p-[7px] w-8 h-8",large:"p-[9px] w-10 h-10","x-large":"p-[11px] w-12 h-12"},color:i()},defaultVariants:{radius:"medium",scaling:"100%",size:"medium",color:p}}),h={"x-small":14,small:16,medium:18,large:22,"x-large":26},g=t((function(t,a){var l=t.children,n=t.className,i=t.radius,p=t.size,g=void 0===p?"medium":p,b=t.scaling,y=t.color,v=t.appearance,x=void 0===v?"solid":v,O=d(t,["children","className","radius","size","scaling","color","appearance"]),j=m().theme,w=h[g],z=h[g],P={radius:null!=i?i:j.themeRadius,scaling:null!=b?b:j.themeScaling,color:null!=y?y:j.themeColor,size:g},N=c(f(P),s(x,P.color,!0),n);return e("button",u({ref:a,className:N},O,{children:o.map(l,(function(e){return r.cloneElement(e,{width:w,height:z})}))}))}));g.displayName="IconButton";export{g as IconButton,g as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -2,9 +2,9 @@ import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
4
|
import { modalContentVariants } from './ModalContent';
|
5
|
-
import { IRadius, IScaling, ISize } from '../../../lib/types';
|
5
|
+
import { IColor, IRadius, IScaling, ISize } from '../../../lib/types';
|
6
6
|
export interface ModalRootProps extends VariantProps<typeof modalContentVariants> {
|
7
|
-
color?:
|
7
|
+
color?: IColor;
|
8
8
|
size?: Exclude<ISize, 'x-small'>;
|
9
9
|
scaling?: IScaling;
|
10
10
|
radius?: IRadius;
|
@@ -24,8 +24,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
25
25
|
import { forwardRef } from 'react';
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
|
-
import { Theme, Radio as RadioTheme
|
28
|
-
import { Text } from '../../../lib
|
27
|
+
import { Theme, Radio as RadioTheme } from '@radix-ui/themes';
|
28
|
+
import { Text, Flex } from '../../../lib';
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
30
30
|
import { useTheme } from '../../../lib/theme';
|
31
31
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as
|
2
|
+
import{jsx as o,jsxs as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{cva as r}from"class-variance-authority";import{Theme as i,Radio as m}from"@radix-ui/themes";import"../Accordion/index.mjs";import"../AlertDialog/AlertDialogRoot.mjs";import"../AlertDialog/AlertDialogTrigger.mjs";import"../AlertDialog/AlertDialogContent.mjs";import"../AlertDialog/AlertDialogTitle.mjs";import"../AlertDialog/AlertDialogDescription.mjs";import"../AlertDialog/AlertDialogCancel.mjs";import"../AlertDialog/AlertDialogAction.mjs";import"../AspectRatio/index.mjs";import"../Avatar/index.mjs";import"../Badge/index.mjs";import"../Box/index.mjs";import"../Breadcrumb/BreadcrumbRoot.mjs";import"../Breadcrumb/BreadcrumbItem.mjs";import"../Breadcrumb/BreadcrumbLink.mjs";import"../Breadcrumb/BreadcrumbList.mjs";import"../Breadcrumb/BreadcrumbPage.mjs";import"../Breadcrumb/BreadcrumbSeparator.mjs";import"../Breadcrumb/BreadcrumbEllipsis.mjs";import"../Button/index.mjs";import"../Calendar/index.mjs";import"../Callout/CalloutRoot.mjs";import"../Callout/CalloutText.mjs";import"../Callout/CalloutIcon.mjs";import"../Card/index.mjs";import"../Checkbox/index.mjs";import"../CheckboxCard/index.mjs";import"../CheckboxGroup/CheckboxGroupRoot.mjs";import"../CheckboxGroup/CheckboxGroupItem.mjs";import"../ContextMenu/ContextMenuRoot.mjs";import"../ContextMenu/ContextMenuContent.mjs";import"../ContextMenu/ContextMenuCheckboxItem.mjs";import"../ContextMenu/ContextMenuGroup.mjs";import"../ContextMenu/ContextMenuItem.mjs";import"../ContextMenu/ContextMenuItemIndicator.mjs";import"../ContextMenu/ContextMenuLabel.mjs";import"../ContextMenu/ContextMenuTrigger.mjs";import"../ContextMenu/ContextMenuRadioGroup.mjs";import"../ContextMenu/ContextMenuRadioItem.mjs";import"../ContextMenu/ContextMenuSeparator.mjs";import"../ContextMenu/ContextMenuSubTrigger.mjs";import"../ContextMenu/ContextMenuSubContent.mjs";import"../Collapsible/index.mjs";import"../Container/index.mjs";import"../DataList/DataListRoot.mjs";import"../DataList/DataListItem.mjs";import"../DataList/DataListLabel.mjs";import"../DataList/DataListValue.mjs";import"../Datepicker/index.mjs";import"../Dialog/DialogRoot.mjs";import"../Dialog/DialogTrigger.mjs";import"../Dialog/DialogContent.mjs";import"../Dialog/DialogTitle.mjs";import"../Dialog/DialogDescription.mjs";import"../Dialog/DialogSlot.mjs";import"../Dialog/DialogCancel.mjs";import"../Dialog/DialogAction.mjs";import"../DropdownMenu/DropdownMenuRoot.mjs";import"../DropdownMenu/DropdownMenuTrigger.mjs";import"../DropdownMenu/DropdownMenuContent.mjs";import"../DropdownMenu/DropdownMenuLable.mjs";import"../DropdownMenu/DropdownMenuItem.mjs";import"../DropdownMenu/DropdownMenuSeparator.mjs";import"../DropdownMenu/DropdownMenuCheckboxItem.mjs";import"../DropdownMenu/DropdonMenuRadioGroup.mjs";import"../DropdownMenu/DropdownMenuRadioItem.mjs";import"../DropdownMenu/DropdownMenuSub.mjs";import"../DropdownMenu/DropdownMenuSubTrigger.mjs";import"../DropdownMenu/DropdonMenuSubContent.mjs";import"../DropdownMenu/DropdownMenuItemIndicator.mjs";import"../Editor/index.mjs";import{Flex as n}from"../Flex/index.mjs";import"../Tabs/DynamicTabs.mjs";import"../Footer/index.mjs";import"../Gnb/GnbRoot.mjs";import"../Gnb/GnbLogo.mjs";import"../Gnb/GnbMenu.mjs";import"../Gnb/GnbMenuItem.mjs";import"../Gnb/GnbInfo.mjs";import"../GridLayout/index.mjs";import"../HoverCard/HoverCardRoot.mjs";import"../HoverCard/HoverCardTrigger.mjs";import"../HoverCard/HoverCardContent.mjs";import"../IconButton/index.mjs";import"../Inset/index.mjs";import"../Label/index.mjs";import"../Menubar/MenubarRoot.mjs";import"../Menubar/MenubarMenu.mjs";import"../Menubar/MenubarTrigger.mjs";import"../Menubar/MenubarContent.mjs";import"../Menubar/MenubarItem.mjs";import"../Menubar/MenubarSeparator.mjs";import"../Menubar/MenubarSub.mjs";import"../Menubar/MenubarSubTrigger.mjs";import"../Menubar/MenubarSubContent.mjs";import"../Menubar/MenubarCheckboxItem.mjs";import"../Menubar/MenubarItemIndicator.mjs";import"../Menubar/MenubarRadioGroup.mjs";import"../Menubar/MenubarRadioItem.mjs";import"../Modal/ModalRoot.mjs";import"../Modal/ModalTrigger.mjs";import"../Modal/ModalContent.mjs";import"../Modal/ModalTitle.mjs";import"../Modal/ModalDescription.mjs";import"../Modal/ModalFooter.mjs";import"../Modal/ModalCancel.mjs";import"../Modal/ModalAction.mjs";import"../NavigationMenu/NavigationMenuRoot.mjs";import"../NavigationMenu/NavigationMenuList.mjs";import"../NavigationMenu/NavigationMenuItem.mjs";import"../NavigationMenu/NavigationMenuTrigger.mjs";import"../NavigationMenu/NavigationMenuContent.mjs";import"../NavigationMenu/NavigationMenuViewport.mjs";import"../NavigationMenu/NavigationMenuIndicator.mjs";import"../NavigationMenu/NavigationMenuLink.mjs";import"../Popover/PopoverRoot.mjs";import"../Popover/PopoverTrigger.mjs";import"../Popover/PopoverContent.mjs";import"../Popover/PopoverClose.mjs";import"../Progress/index.mjs";import"../RadioCards/RadioCardsRoot.mjs";import"../RadioCards/RadioCardsItem.mjs";import"../RadioGroup/RadioGroupRoot.mjs";import"../RadioGroup/RadioGroupItem.mjs";import"../ScrollArea/index.mjs";import"../SearchBar/index.mjs";import"../SegmentedControl/SegmentedControlRoot.mjs";import"../SegmentedControl/SegmentedControlItem.mjs";import"../Select/index.mjs";import"../Separator/index.mjs";import"../SideBar/index.mjs";import"../Skeleton/index.mjs";import"../Slider/index.mjs";import"../Spinner/index.mjs";import"../Table/index.mjs";import"../TabNav/index.mjs";import"../Tabs/index.mjs";import"../TextArea/index.mjs";import"../TextField/index.mjs";import"../Timeline/TimelineRoot.mjs";import"../Timeline/TimelineItem.mjs";import"../Timeline/TimelineConnector.mjs";import"../Timeline/TimelineHeader.mjs";import"../Timeline/TimelineTime.mjs";import"../Timeline/TimelineIcon.mjs";import"../Timeline/TimelineTitle.mjs";import"../Timeline/TimelineContent.mjs";import"../Timeline/TimelineDescription.mjs";import"../Toast/ToastRoot.mjs";import"../Toast/ToastTitle.mjs";import"../Toast/ToastDescription.mjs";import"../Toast/ToastActionButton.mjs";import"../Toggle/index.mjs";import"../Toggle/ToggleWithText.mjs";import"../ToggleGroup/ToggleGroupRoot.mjs";import"../ToggleGroup/ToggleGroupItem.mjs";import"../ToggleSwitch/index.mjs";import"../Tooltip/index.mjs";import"../BarChart/index.mjs";import"../BubbleChart/index.mjs";import"../RadarChart/index.mjs";import"../LineChart/index.mjs";import"../PieChart/index.mjs";import"../DoughnutChart/index.mjs";import"../Grid/index.mjs";import"../Grid/useGrid.mjs";import"../Tree/index.mjs";import"../../Typography/Header/index.mjs";import a from"../../Typography/Text/index.mjs";import{useTheme as p}from"../../theme/ThemeProvider.mjs";import{cn as s}from"../../utils/utils.mjs";import{MAIN_COLOR as l}from"../../color/constants.mjs";var j=function(){return j=Object.assign||function(o){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);return o},j.apply(this,arguments)},u=function(o,t){var e={};for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(o);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(o,r[i])&&(e[r[i]]=o[r[i]])}return e},d=r("font-normal",{variants:{size:{small:"text-[12px] gap-2",medium:"text-[14px] gap-2",large:"text-[16px] gap-3"}},defaultVariants:{size:"medium"}}),g=e((function(e,r){var g,M=e.value,x=e.scaling,c=e.color,b=e.size,C=void 0===b?"medium":b,D=e.appearance,T=void 0===D?"surface":D,v=e.children,h=e.className,R=u(e,["value","scaling","color","size","appearance","children","className"]),I=p().theme,w="2";"small"===C&&(w="1"),"large"===C&&(w="3");var G={scaling:null!=x?x:I.themeScaling,color:null!==(g=null!=c?c:I.themeColor)&&void 0!==g?g:l};return o(i,{accentColor:G.color,scaling:G.scaling,children:o(n,{asChild:!0,className:s(d({size:C}),h),children:t(a,{as:"label",size:w,color:"black",children:[o(m,j({ref:r,value:M,variant:T,size:w},R)),v]})})})}));g.displayName="Radio";export{g as Radio,g as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -2,12 +2,14 @@ import React from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import { RadioCards as RadioCardsTheme } from '@radix-ui/themes';
|
4
4
|
import { radioCardsItemVariants } from './RadioCardsItem';
|
5
|
+
import { IColor } from '../../../lib/types';
|
5
6
|
export interface RadioCardsProps extends VariantProps<typeof radioCardsVariants>, VariantProps<typeof radioCardsItemVariants> {
|
6
7
|
appearance?: 'classic' | 'surface';
|
8
|
+
color?: IColor;
|
7
9
|
}
|
8
10
|
declare const radioCardsVariants: (props?: ({
|
9
11
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
10
12
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
11
13
|
export declare const RadioCardsContext: React.Context<RadioCardsProps>;
|
12
|
-
export declare const RadioCardsRoot: React.ForwardRefExoticComponent<Omit<Omit<RadioCardsTheme.RootProps & React.RefAttributes<HTMLDivElement>, "ref">, "size"> & RadioCardsProps & React.RefAttributes<HTMLDivElement>>;
|
14
|
+
export declare const RadioCardsRoot: React.ForwardRefExoticComponent<Omit<Omit<RadioCardsTheme.RootProps & React.RefAttributes<HTMLDivElement>, "ref">, "color" | "size"> & RadioCardsProps & React.RefAttributes<HTMLDivElement>>;
|
13
15
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
declare const RadioCards: {
|
3
|
-
Root: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes/dist/cjs/components/radio-cards").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "size"> & import("./RadioCardsRoot").RadioCardsProps & import("react").RefAttributes<HTMLDivElement>>;
|
3
|
+
Root: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes/dist/cjs/components/radio-cards").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "color" | "size"> & import("./RadioCardsRoot").RadioCardsProps & import("react").RefAttributes<HTMLDivElement>>;
|
4
4
|
Item: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/radio-cards").ItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./RadioCardsItem").RadioCardsItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
5
5
|
};
|
6
6
|
export default RadioCards;
|
@@ -73,10 +73,10 @@ export var SearchBar = forwardRef(function (_a, ref) {
|
|
73
73
|
setInitSetting(true);
|
74
74
|
}
|
75
75
|
}, [children]);
|
76
|
-
return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [
|
76
|
+
return (_jsxs("div", { ref: ref, children: [children && (_jsxs("div", { className: "flex h-0 w-full gap-3 pr-2 opacity-0", children: [_jsx("div", { className: "flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2", ref: containerRef, children: children }), _jsxs("div", { className: "flex gap-2", children: [ReloadButton ? (ReloadButton) : (_jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })), SubmitButton ? (SubmitButton) : (_jsx(IconButton, { size: size, children: _jsx(MagnifyingGlassIcon, {}) })), _jsx(IconButton, { size: size, children: _jsx(ReloadIcon, {}) })] })] })), _jsxs(Collapsible.Root, __assign({ className: cn('grid w-full', SearchBarVariants({ scaling: contextValue.scaling }), className), onOpenChange: setOpen }, props, { children: [_jsxs("div", { className: "flex w-full justify-between", children: [_jsx("div", { className: "flex gap-3", children: children &&
|
77
77
|
React.Children.map(children, function (child, index) {
|
78
78
|
return firstLineIndices.includes(index) ? child : null;
|
79
|
-
}) }), _jsxs("div", { className: "flex gap-2", children: [
|
79
|
+
}) }), _jsxs("div", { className: "flex gap-2", children: [ReloadButton ? (ReloadButton) : (_jsx(IconButton, { onClick: onClickReload, size: size, color: contextValue.color, children: _jsx(ReloadIcon, {}) })), SubmitButton ? (SubmitButton) : (_jsx(IconButton, { onClick: onClickSubmit, size: size, color: contextValue.color, children: _jsx(MagnifyingGlassIcon, {}) })), secondLineIndices.length > 0 && (_jsx(Collapsible.Trigger, { open: open, size: size, color: contextValue.color }))] })] }), _jsx(Collapsible.Content, { className: "flex gap-3 pt-2", children: children &&
|
80
80
|
React.Children.map(children, function (child, index) {
|
81
81
|
return secondLineIndices.includes(index) ? child : null;
|
82
82
|
}) })] }))] }));
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import l,{forwardRef as n,useRef as i,useState as o,useEffect as t}from"react";import{cva as c}from"class-variance-authority";import{scalingVariants as a}from"../../constants.mjs";import{cn as s}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import u from"../Collapsible/index.mjs";import{IconButton as d}from"../IconButton/index.mjs";import{ReloadIcon as f,MagnifyingGlassIcon as p}from"@radix-ui/react-icons";var h=function(){return h=Object.assign||function(e){for(var r,l=1,n=arguments.length;l<n;l++)for(var i in r=arguments[l])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},h.apply(this,arguments)},g=function(e,r){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(l[n[i]]=e[n[i]])}return l},v=c("",{variants:{scaling:h({},a)},defaultVariants:{scaling:"100%"}}),y=n((function(n,c){var a=n.className,y=n.children,b=n.scaling,x=n.size,C=n.color,j=n.onClickSubmit,O=n.onClickReload,N=n.SubmitButton,w=n.ReloadButton,z=g(n,["className","children","scaling","size","color","onClickSubmit","onClickReload","SubmitButton","ReloadButton"]),B=i(null),S=m().theme,R={scaling:null!=b?b:S.themeScaling,color:null!=C?C:S.themeColor,size:x},k=o([]),P=k[0],A=k[1],E=o([]),I=E[0],T=E[1],V=o(!1),q=V[0],D=V[1],F=o(!1);F[0];var G=F[1];return t((function(){if(y){G(!1);var e=B.current,r=Array.from(e.children),l=r[0].getBoundingClientRect().top,n=[],i=[];r.forEach((function(e,r){e.getBoundingClientRect().top===l?n.push(r):i.push(r)})),A(n),T(i),G(!0)}}),[y]),e("div",{ref:c,children:[y&&e("div",{className:"flex h-0 w-full gap-3 pr-2 opacity-0",children:[r("div",{className:"flex flex-wrap gap-3 overflow-hidden bg-redA-3 px-2",ref:B,children:y}),e("div",{className:"flex gap-2",children:[w||r(d,{size:x,children:r(f,{})}),N||r(d,{size:x,children:r(p,{})}),r(d,{size:x,children:r(f,{})})]})]}),e(u.Root,h({className:s("grid w-full",v({scaling:R.scaling}),a),onOpenChange:D},z,{children:[e("div",{className:"flex w-full justify-between",children:[r("div",{className:"flex gap-3",children:y&&l.Children.map(y,(function(e,r){return P.includes(r)?e:null}))}),e("div",{className:"flex gap-2",children:[w||r(d,{onClick:O,size:x,color:R.color,children:r(f,{})}),N||r(d,{onClick:j,size:x,color:R.color,children:r(p,{})}),I.length>0&&r(u.Trigger,{open:q,size:x,color:R.color})]})]}),r(u.Content,{className:"flex gap-3 pt-2",children:y&&l.Children.map(y,(function(e,r){return I.includes(r)?e:null}))})]}))]})}));y.displayName="SearchBar";export{y as SearchBar,v as SearchBarVariants,y as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Select as SelectTheme } from '@radix-ui/themes';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
-
import { IRadius, IScaling } from '../../../lib/types';
|
4
|
+
import { IColor, IRadius, IScaling } from '../../../lib/types';
|
5
5
|
export interface SelectProps extends VariantProps<typeof selectVariants> {
|
6
6
|
label?: string;
|
7
7
|
defaultValue?: string;
|
8
8
|
selected?: string;
|
9
9
|
disabled?: boolean;
|
10
|
-
color?:
|
10
|
+
color?: IColor;
|
11
11
|
scaling?: IScaling;
|
12
12
|
appearance?: 'classic' | 'surface' | 'soft' | 'ghost';
|
13
13
|
size?: 'small' | 'medium' | 'large';
|
@@ -17,7 +17,7 @@ declare const selectVariants: (props?: ({
|
|
17
17
|
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
18
18
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
19
19
|
export declare const useSelectContext: () => SelectProps;
|
20
|
-
export declare const Root: React.ForwardRefExoticComponent<SelectTheme.RootProps & SelectProps & React.RefAttributes<never>>;
|
20
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<SelectTheme.RootProps, "color" | "size"> & SelectProps & React.RefAttributes<never>>;
|
21
21
|
export declare const Trigger: React.ForwardRefExoticComponent<Omit<SelectTheme.TriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & SelectProps & React.RefAttributes<HTMLButtonElement>>;
|
22
22
|
export declare const Content: React.ForwardRefExoticComponent<Omit<SelectTheme.ContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
|
23
23
|
export declare const Item: React.ForwardRefExoticComponent<Omit<SelectTheme.ItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -25,7 +25,7 @@ export declare const Group: React.ForwardRefExoticComponent<Omit<SelectTheme.Gro
|
|
25
25
|
export declare const Label: React.ForwardRefExoticComponent<Omit<SelectTheme.LabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
|
26
26
|
export declare const Separator: React.ForwardRefExoticComponent<Omit<SelectTheme.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
|
27
27
|
declare const Select: {
|
28
|
-
Root: React.ForwardRefExoticComponent<SelectTheme.RootProps & SelectProps & React.RefAttributes<never>>;
|
28
|
+
Root: React.ForwardRefExoticComponent<Omit<SelectTheme.RootProps, "color" | "size"> & SelectProps & React.RefAttributes<never>>;
|
29
29
|
Trigger: React.ForwardRefExoticComponent<Omit<SelectTheme.TriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & SelectProps & React.RefAttributes<HTMLButtonElement>>;
|
30
30
|
Content: React.ForwardRefExoticComponent<Omit<SelectTheme.ContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
|
31
31
|
Item: React.ForwardRefExoticComponent<Omit<SelectTheme.ItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & SelectProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -75,8 +75,8 @@ export var Trigger = React.forwardRef(function (_a, forwardedRef) {
|
|
75
75
|
Trigger.displayName = 'Select.Trigger';
|
76
76
|
export var Content = React.forwardRef(function (_a, forwardedRef) {
|
77
77
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
78
|
-
var
|
79
|
-
return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef,
|
78
|
+
var radius = useSelectContext().radius;
|
79
|
+
return (_jsx(SelectTheme.Content, __assign({ ref: forwardedRef, position: "popper", className: cn(selectVariants({ radius: radius == 'full' ? 'large' : radius }), 'z-10', className) }, props, { children: children })));
|
80
80
|
});
|
81
81
|
Content.displayName = 'Select.Content';
|
82
82
|
export var Item = React.forwardRef(function (_a, forwardedRef) {
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import r,{createContext as a,useContext as l}from"react";import{Theme as i,Select as n}from"@radix-ui/themes";import{cva as c}from"class-variance-authority";import{cn as s}from"../../utils/utils.mjs";import{radiusVariants as t,selectAppearanceStyle as o}from"../../constants.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as d}from"../../color/constants.mjs";var u=function(){return u=Object.assign||function(e){for(var r,a=1,l=arguments.length;a<l;a++)for(var i in r=arguments[a])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},u.apply(this,arguments)},f=function(e,r){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(l=Object.getOwnPropertySymbols(e);i<l.length;i++)r.indexOf(l[i])<0&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(a[l[i]]=e[l[i]])}return a},p=c("",{variants:{radius:u({},t.base)},defaultVariants:{radius:"medium"}}),h=a({size:"medium",scaling:"100%",color:d,radius:"medium",appearance:"classic"}),v=function(){return l(h)},N=r.forwardRef((function(r,a){var l,c=r.scaling,s=r.size,t=r.color,o=r.radius,p=r.appearance,v=r.children,N=f(r,["scaling","size","color","radius","appearance","children"]),g=m().theme,y="2";"small"===s&&(y="1"),"large"===s&&(y="3");var S={scaling:null!=c?c:g.themeScaling,color:null!==(l=null!=t?t:g.themeColor)&&void 0!==l?l:d,radius:null!=o?o:g.themeRadius,size:s,sizeTheme:y,appearance:p};return e(h.Provider,{value:S,children:e(i,{scaling:S.scaling,accentColor:S.color,hasBackground:!1,children:e("div",{ref:a,children:e(n.Root,u({size:y},N,{children:v}))})})})}));N.displayName="Select.Root";var g=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]),t=v(),m=t.radius,d=void 0===m?"medium":m,h=t.color,N=t.appearance,g=void 0===N?"classic":N;return e(n.Trigger,u({ref:a,variant:g,radius:d,className:s(p({radius:d}),o(g,h),i)},c,{children:l}))}));g.displayName="Select.Trigger";var y=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]),t=v().radius;return e(n.Content,u({ref:a,position:"popper",className:s(p({radius:"full"==t?"large":t}),"z-10",i)},c,{children:l}))}));y.displayName="Select.Content";var S=r.forwardRef((function(r,a){var l=r.value,i=r.children,c=r.className,t=f(r,["value","children","className"]),o=v().radius;return e(n.Item,u({ref:a,value:l},t,{className:s(p({radius:o}),c),children:i}))}));S.displayName="Select.Item";var b=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]);return e(n.Group,u({ref:a},c,{className:i,children:l}))}));b.displayName="Select.Group";var O=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]);return e(n.Label,u({ref:a},c,{className:i,children:l}))}));O.displayName="Select.Label";var j=r.forwardRef((function(r,a){var l=r.children,i=r.className,c=f(r,["children","className"]);return e(n.Separator,u({ref:a},c,{className:i,children:l}))}));j.displayName="Select.Separator";var w={Root:N,Trigger:g,Content:y,Item:S,Group:b,Label:O,Separator:j};export{y as Content,b as Group,S as Item,O as Label,N as Root,j as Separator,g as Trigger,w as default,v as useSelectContext};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -7,5 +7,5 @@ declare const separatorVariants: (props?: ({
|
|
7
7
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
8
8
|
color?: string | null | undefined;
|
9
9
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
10
|
-
export declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SeparatorProps & React.RefAttributes<HTMLSpanElement>, "ref">, "size"> & SeparatorProps & React.RefAttributes<HTMLSpanElement>>;
|
10
|
+
export declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/themes").SeparatorProps & React.RefAttributes<HTMLSpanElement>, "ref">, "color" | "size"> & SeparatorProps & React.RefAttributes<HTMLSpanElement>>;
|
11
11
|
export default Separator;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
3
3
|
import * as ReactProSidebar from 'react-pro-sidebar';
|
4
|
+
import { IRadius } from '../../../lib/types';
|
4
5
|
export interface SidebarProps extends VariantProps<typeof sidebarVariants> {
|
5
6
|
size?: 'small' | 'medium' | 'large' | 'fill-large';
|
7
|
+
radius?: IRadius;
|
6
8
|
}
|
7
9
|
declare const sidebarVariants: (props?: ({
|
8
10
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
@@ -17,5 +19,30 @@ declare const Sidebar: {
|
|
17
19
|
Menu: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.MenuProps & React.RefAttributes<HTMLMenuElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLMenuElement>>;
|
18
20
|
Item: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.MenuItemProps & React.RefAttributes<HTMLLIElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLLIElement>>;
|
19
21
|
SubMenu: React.ForwardRefExoticComponent<Omit<Omit<ReactProSidebar.SubMenuProps & React.RefAttributes<HTMLLIElement>, "ref">, "size"> & SidebarProps & React.RefAttributes<HTMLLIElement>>;
|
22
|
+
menuClasses: {
|
23
|
+
root: string;
|
24
|
+
menuItemRoot: string;
|
25
|
+
subMenuRoot: string;
|
26
|
+
button: string;
|
27
|
+
prefix: string;
|
28
|
+
suffix: string;
|
29
|
+
label: string;
|
30
|
+
icon: string;
|
31
|
+
subMenuContent: string;
|
32
|
+
SubMenuExpandIcon: string;
|
33
|
+
disabled: string;
|
34
|
+
active: string;
|
35
|
+
open: string;
|
36
|
+
};
|
37
|
+
sidebarClasses: {
|
38
|
+
root: string;
|
39
|
+
container: string;
|
40
|
+
image: string;
|
41
|
+
backdrop: string;
|
42
|
+
collapsed: string;
|
43
|
+
toggled: string;
|
44
|
+
rtl: string;
|
45
|
+
broken: string;
|
46
|
+
};
|
20
47
|
};
|
21
48
|
export default Sidebar;
|