@gobolt/genesis 0.3.14 → 0.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/IconButton.cjs +29 -0
- package/dist/components/Button/IconButton.js +30 -0
- package/dist/components/Button/icon-button-styles.cjs +76 -0
- package/dist/components/Button/icon-button-styles.js +77 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.cjs +162 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +163 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.cjs +80 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +81 -0
- package/dist/components/Table/TableControls/TableControls.cjs +38 -0
- package/dist/components/Table/TableControls/TableControls.js +39 -0
- package/dist/components/Table/TableWithControls/TableWithControls.cjs +41 -0
- package/dist/components/Table/TableWithControls/TableWithControls.js +42 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/index.cjs +2 -1
- package/dist/index.js +2 -1
- package/dist/node_modules/react-icons/fi/index.cjs +7 -0
- package/dist/node_modules/react-icons/fi/index.js +8 -0
- package/dist/node_modules/react-icons/hi/index.cjs +16 -0
- package/dist/node_modules/react-icons/hi/index.js +16 -0
- package/dist/node_modules/react-icons/hi2/index.cjs +7 -0
- package/dist/node_modules/react-icons/hi2/index.js +8 -0
- package/dist/node_modules/react-icons/lu/index.cjs +7 -0
- package/dist/node_modules/react-icons/lu/index.js +8 -0
- package/dist/node_modules/react-icons/tb/index.cjs +7 -0
- package/dist/node_modules/react-icons/tb/index.js +8 -0
- package/dist/utils/icon-util.cjs +19 -0
- package/dist/utils/icon-util.js +20 -1
- package/package.json +7 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
var iconButtonStyles = require("./icon-button-styles.cjs");
|
|
4
|
+
var index = require("../../constants/index.cjs");
|
|
5
|
+
const IconButton = ({
|
|
6
|
+
isSelected = false,
|
|
7
|
+
state = "active",
|
|
8
|
+
onClick,
|
|
9
|
+
icon,
|
|
10
|
+
size = "small",
|
|
11
|
+
...rest
|
|
12
|
+
}) => {
|
|
13
|
+
const buttonState = state === "active" || state === "disabled" ? state : "active";
|
|
14
|
+
const themeType = index.TYPE.icon;
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
iconButtonStyles.Button,
|
|
17
|
+
{
|
|
18
|
+
onClick,
|
|
19
|
+
$themeType: themeType,
|
|
20
|
+
$state: buttonState,
|
|
21
|
+
disabled: state === "disabled" || rest.disabled,
|
|
22
|
+
size,
|
|
23
|
+
$isSelected: isSelected,
|
|
24
|
+
...rest,
|
|
25
|
+
children: icon
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
module.exports = IconButton;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "./icon-button-styles.js";
|
|
3
|
+
import { TYPE } from "../../constants/index.js";
|
|
4
|
+
const IconButton = ({
|
|
5
|
+
isSelected = false,
|
|
6
|
+
state = "active",
|
|
7
|
+
onClick,
|
|
8
|
+
icon,
|
|
9
|
+
size = "small",
|
|
10
|
+
...rest
|
|
11
|
+
}) => {
|
|
12
|
+
const buttonState = state === "active" || state === "disabled" ? state : "active";
|
|
13
|
+
const themeType = TYPE.icon;
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Button,
|
|
16
|
+
{
|
|
17
|
+
onClick,
|
|
18
|
+
$themeType: themeType,
|
|
19
|
+
$state: buttonState,
|
|
20
|
+
disabled: state === "disabled" || rest.disabled,
|
|
21
|
+
size,
|
|
22
|
+
$isSelected: isSelected,
|
|
23
|
+
...rest,
|
|
24
|
+
children: icon
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
IconButton as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var styled = require("styled-components");
|
|
3
|
+
const getPadding = (size, sizing) => {
|
|
4
|
+
if (size === "small") {
|
|
5
|
+
return `${sizing.Size1}px ${sizing.Size1}px`;
|
|
6
|
+
}
|
|
7
|
+
return `${sizing.Size2}px ${sizing.Size2}px`;
|
|
8
|
+
};
|
|
9
|
+
const getVariant = ({ colors, sizing, borderRadius, components }, $themeType, $state, size, $isSelected) => {
|
|
10
|
+
return `
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
text-align: center;
|
|
15
|
+
color: ${colors[$themeType][$state].color};
|
|
16
|
+
font-size: ${sizing.Size4}px;
|
|
17
|
+
line-height: ${sizing.Size6}px;
|
|
18
|
+
letter-spacing: 0;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
border-width: 1px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
width: auto; !important;
|
|
23
|
+
height: auto; !important;
|
|
24
|
+
|
|
25
|
+
background-color:${$isSelected ? colors[$themeType].hover.backgroundColor : colors[$themeType][$state].backgroundColor};
|
|
26
|
+
padding: ${getPadding(size, sizing)};
|
|
27
|
+
|
|
28
|
+
box-shadow: ${$themeType === "utility" ? "0px 1px 2px 0px #00000026" : "none"};
|
|
29
|
+
|
|
30
|
+
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
31
|
+
gap: ${components.button.gap}px;
|
|
32
|
+
border-style: solid;
|
|
33
|
+
border-color: ${colors[$themeType][$state].borderColor};
|
|
34
|
+
|
|
35
|
+
transition: all 0.2s ease-in-out;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
color: ${colors[$themeType].hover.color};
|
|
39
|
+
background-color: ${colors[$themeType].hover.backgroundColor};
|
|
40
|
+
border-color: ${colors[$themeType].hover.borderColor};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:active {
|
|
44
|
+
color: ${colors[$themeType].pressed.color};
|
|
45
|
+
background-color: ${colors[$themeType].pressed.backgroundColor};
|
|
46
|
+
border-color: ${colors[$themeType].pressed.borderColor};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
outline: none;
|
|
51
|
+
color: ${colors[$themeType].focussed.color};
|
|
52
|
+
background-color: ${colors[$themeType].focussed.backgroundColor};
|
|
53
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 4px ${colors[$themeType].focussed.ringColor};
|
|
54
|
+
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
55
|
+
border-color: ${colors[$themeType].focussed.borderColor};
|
|
56
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:disabled {
|
|
60
|
+
color: ${colors[$themeType].disabled.color};
|
|
61
|
+
background-color: ${colors[$themeType].disabled.backgroundColor};
|
|
62
|
+
border-color: ${colors[$themeType].disabled.borderColor};
|
|
63
|
+
cursor: not-allowed;
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
};
|
|
67
|
+
const getGenesisButtonClass = (theme, $themeType, $state, size, $isSelected) => `
|
|
68
|
+
font-family: 'Inter', sans-serif;
|
|
69
|
+
${getVariant(theme, $themeType, $state, size, $isSelected)}
|
|
70
|
+
`;
|
|
71
|
+
const Button = styled.button`
|
|
72
|
+
${({ theme, $themeType, $state, size, $isSelected }) => {
|
|
73
|
+
return getGenesisButtonClass(theme, $themeType, $state, size, $isSelected);
|
|
74
|
+
}}
|
|
75
|
+
`;
|
|
76
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const getPadding = (size, sizing) => {
|
|
3
|
+
if (size === "small") {
|
|
4
|
+
return `${sizing.Size1}px ${sizing.Size1}px`;
|
|
5
|
+
}
|
|
6
|
+
return `${sizing.Size2}px ${sizing.Size2}px`;
|
|
7
|
+
};
|
|
8
|
+
const getVariant = ({ colors, sizing, borderRadius, components }, $themeType, $state, size, $isSelected) => {
|
|
9
|
+
return `
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
text-align: center;
|
|
14
|
+
color: ${colors[$themeType][$state].color};
|
|
15
|
+
font-size: ${sizing.Size4}px;
|
|
16
|
+
line-height: ${sizing.Size6}px;
|
|
17
|
+
letter-spacing: 0;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
border-width: 1px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
width: auto; !important;
|
|
22
|
+
height: auto; !important;
|
|
23
|
+
|
|
24
|
+
background-color:${$isSelected ? colors[$themeType].hover.backgroundColor : colors[$themeType][$state].backgroundColor};
|
|
25
|
+
padding: ${getPadding(size, sizing)};
|
|
26
|
+
|
|
27
|
+
box-shadow: ${$themeType === "utility" ? "0px 1px 2px 0px #00000026" : "none"};
|
|
28
|
+
|
|
29
|
+
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
30
|
+
gap: ${components.button.gap}px;
|
|
31
|
+
border-style: solid;
|
|
32
|
+
border-color: ${colors[$themeType][$state].borderColor};
|
|
33
|
+
|
|
34
|
+
transition: all 0.2s ease-in-out;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
color: ${colors[$themeType].hover.color};
|
|
38
|
+
background-color: ${colors[$themeType].hover.backgroundColor};
|
|
39
|
+
border-color: ${colors[$themeType].hover.borderColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:active {
|
|
43
|
+
color: ${colors[$themeType].pressed.color};
|
|
44
|
+
background-color: ${colors[$themeType].pressed.backgroundColor};
|
|
45
|
+
border-color: ${colors[$themeType].pressed.borderColor};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:focus-visible {
|
|
49
|
+
outline: none;
|
|
50
|
+
color: ${colors[$themeType].focussed.color};
|
|
51
|
+
background-color: ${colors[$themeType].focussed.backgroundColor};
|
|
52
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 4px ${colors[$themeType].focussed.ringColor};
|
|
53
|
+
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
54
|
+
border-color: ${colors[$themeType].focussed.borderColor};
|
|
55
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:disabled {
|
|
59
|
+
color: ${colors[$themeType].disabled.color};
|
|
60
|
+
background-color: ${colors[$themeType].disabled.backgroundColor};
|
|
61
|
+
border-color: ${colors[$themeType].disabled.borderColor};
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
};
|
|
66
|
+
const getGenesisButtonClass = (theme, $themeType, $state, size, $isSelected) => `
|
|
67
|
+
font-family: 'Inter', sans-serif;
|
|
68
|
+
${getVariant(theme, $themeType, $state, size, $isSelected)}
|
|
69
|
+
`;
|
|
70
|
+
const Button = styled.button`
|
|
71
|
+
${({ theme, $themeType, $state, size, $isSelected }) => {
|
|
72
|
+
return getGenesisButtonClass(theme, $themeType, $state, size, $isSelected);
|
|
73
|
+
}}
|
|
74
|
+
`;
|
|
75
|
+
export {
|
|
76
|
+
Button
|
|
77
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
var UtilityButton = require("../../Button/UtilityButton.cjs");
|
|
4
|
+
var IconButton = require("../../Button/IconButton.cjs");
|
|
5
|
+
var index$1 = require("../../../node_modules/react-icons/hi2/index.cjs");
|
|
6
|
+
var index = require("../../../node_modules/react-icons/hi/index.cjs");
|
|
7
|
+
var index$2 = require("../../../node_modules/react-icons/fi/index.cjs");
|
|
8
|
+
var Input = require("../../Input/Input.cjs");
|
|
9
|
+
var Typography = require("../../Typography/Typography.cjs");
|
|
10
|
+
var Select = require("../../Select/Select.cjs");
|
|
11
|
+
const PrimaryTableControlsRow = ({
|
|
12
|
+
sortOptions,
|
|
13
|
+
searchByPlaceholder = "",
|
|
14
|
+
searchField = "address",
|
|
15
|
+
isSortedAscending = true,
|
|
16
|
+
searchValue = "",
|
|
17
|
+
selectedSortOption = "",
|
|
18
|
+
onChange
|
|
19
|
+
}) => {
|
|
20
|
+
const onInputChange = (actionEvent) => {
|
|
21
|
+
onChange?.({
|
|
22
|
+
event: "inputChange",
|
|
23
|
+
payload: actionEvent.payload
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const onSortChange = (value) => {
|
|
27
|
+
const sortActionEvent = {
|
|
28
|
+
event: "primarySortChange",
|
|
29
|
+
payload: { value }
|
|
30
|
+
};
|
|
31
|
+
onChange?.(sortActionEvent);
|
|
32
|
+
};
|
|
33
|
+
const onFilterClick = () => {
|
|
34
|
+
const filterActionEvent = {
|
|
35
|
+
event: "filterClick",
|
|
36
|
+
payload: {}
|
|
37
|
+
};
|
|
38
|
+
onChange?.(filterActionEvent);
|
|
39
|
+
};
|
|
40
|
+
const onSettingsClick = () => {
|
|
41
|
+
const settingsActionEvent = {
|
|
42
|
+
event: "settingsClick",
|
|
43
|
+
payload: {}
|
|
44
|
+
};
|
|
45
|
+
onChange?.(settingsActionEvent);
|
|
46
|
+
};
|
|
47
|
+
const onOrderClick = () => {
|
|
48
|
+
const ascendingActionEvent = {
|
|
49
|
+
event: "orderClick",
|
|
50
|
+
payload: {
|
|
51
|
+
value: isSortedAscending ? "desc" : "asc"
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
onChange?.(ascendingActionEvent);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
style: {
|
|
60
|
+
display: "flex",
|
|
61
|
+
justifyContent: "space-between",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
width: "100%",
|
|
64
|
+
minWidth: 800,
|
|
65
|
+
marginBottom: 16
|
|
66
|
+
},
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex" }, children: [
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
70
|
+
Input,
|
|
71
|
+
{
|
|
72
|
+
size: "normal",
|
|
73
|
+
placeholder: searchByPlaceholder,
|
|
74
|
+
prefix: /* @__PURE__ */ jsxRuntime.jsx(index.HiSearch, {}),
|
|
75
|
+
style: {
|
|
76
|
+
padding: "5px 8px"
|
|
77
|
+
},
|
|
78
|
+
value: searchValue,
|
|
79
|
+
onChange: onInputChange
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
onFilterClick && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
UtilityButton,
|
|
84
|
+
{
|
|
85
|
+
isIconButton: true,
|
|
86
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index$1.HiMiniAdjustmentsVertical, { color: "#222222" }),
|
|
87
|
+
onClick: onFilterClick
|
|
88
|
+
}
|
|
89
|
+
) }),
|
|
90
|
+
onSettingsClick && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
UtilityButton,
|
|
92
|
+
{
|
|
93
|
+
isIconButton: true,
|
|
94
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(index$2.FiSettings, { color: "#222222" }),
|
|
95
|
+
onClick: onSettingsClick
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
style: {
|
|
103
|
+
display: "flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
width: 300,
|
|
106
|
+
justifyContent: "flex-end",
|
|
107
|
+
marginLeft: "auto"
|
|
108
|
+
},
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
111
|
+
Typography,
|
|
112
|
+
{
|
|
113
|
+
variant: "body1",
|
|
114
|
+
color: "#6C6C6C",
|
|
115
|
+
style: {
|
|
116
|
+
width: 70,
|
|
117
|
+
flexShrink: 0,
|
|
118
|
+
textAlign: "right",
|
|
119
|
+
paddingRight: 4,
|
|
120
|
+
marginRight: 8
|
|
121
|
+
},
|
|
122
|
+
children: "Sort by"
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
sortOptions && onSortChange ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
+
Select,
|
|
127
|
+
{
|
|
128
|
+
options: sortOptions,
|
|
129
|
+
defaultValue: sortOptions[0].value,
|
|
130
|
+
value: selectedSortOption,
|
|
131
|
+
variant: "simple",
|
|
132
|
+
onChange: onSortChange,
|
|
133
|
+
style: {
|
|
134
|
+
width: 180,
|
|
135
|
+
flexShrink: 0
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
) : null,
|
|
139
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
style: {
|
|
143
|
+
marginLeft: 8,
|
|
144
|
+
flexShrink: 0
|
|
145
|
+
},
|
|
146
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
147
|
+
IconButton,
|
|
148
|
+
{
|
|
149
|
+
icon: isSortedAscending ? /* @__PURE__ */ jsxRuntime.jsx(index.HiOutlineSortDescending, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(index.HiOutlineSortAscending, { size: 20 }),
|
|
150
|
+
onClick: onOrderClick
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
module.exports = PrimaryTableControlsRow;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import UtilityButton from "../../Button/UtilityButton.js";
|
|
3
|
+
import IconButton from "../../Button/IconButton.js";
|
|
4
|
+
import { HiMiniAdjustmentsVertical } from "../../../node_modules/react-icons/hi2/index.js";
|
|
5
|
+
import { HiSearch, HiOutlineSortDescending, HiOutlineSortAscending } from "../../../node_modules/react-icons/hi/index.js";
|
|
6
|
+
import { FiSettings } from "../../../node_modules/react-icons/fi/index.js";
|
|
7
|
+
import Input from "../../Input/Input.js";
|
|
8
|
+
import Typography from "../../Typography/Typography.js";
|
|
9
|
+
import Select from "../../Select/Select.js";
|
|
10
|
+
const PrimaryTableControlsRow = ({
|
|
11
|
+
sortOptions,
|
|
12
|
+
searchByPlaceholder = "",
|
|
13
|
+
searchField = "address",
|
|
14
|
+
isSortedAscending = true,
|
|
15
|
+
searchValue = "",
|
|
16
|
+
selectedSortOption = "",
|
|
17
|
+
onChange
|
|
18
|
+
}) => {
|
|
19
|
+
const onInputChange = (actionEvent) => {
|
|
20
|
+
onChange?.({
|
|
21
|
+
event: "inputChange",
|
|
22
|
+
payload: actionEvent.payload
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const onSortChange = (value) => {
|
|
26
|
+
const sortActionEvent = {
|
|
27
|
+
event: "primarySortChange",
|
|
28
|
+
payload: { value }
|
|
29
|
+
};
|
|
30
|
+
onChange?.(sortActionEvent);
|
|
31
|
+
};
|
|
32
|
+
const onFilterClick = () => {
|
|
33
|
+
const filterActionEvent = {
|
|
34
|
+
event: "filterClick",
|
|
35
|
+
payload: {}
|
|
36
|
+
};
|
|
37
|
+
onChange?.(filterActionEvent);
|
|
38
|
+
};
|
|
39
|
+
const onSettingsClick = () => {
|
|
40
|
+
const settingsActionEvent = {
|
|
41
|
+
event: "settingsClick",
|
|
42
|
+
payload: {}
|
|
43
|
+
};
|
|
44
|
+
onChange?.(settingsActionEvent);
|
|
45
|
+
};
|
|
46
|
+
const onOrderClick = () => {
|
|
47
|
+
const ascendingActionEvent = {
|
|
48
|
+
event: "orderClick",
|
|
49
|
+
payload: {
|
|
50
|
+
value: isSortedAscending ? "desc" : "asc"
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
onChange?.(ascendingActionEvent);
|
|
54
|
+
};
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
style: {
|
|
59
|
+
display: "flex",
|
|
60
|
+
justifyContent: "space-between",
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
width: "100%",
|
|
63
|
+
minWidth: 800,
|
|
64
|
+
marginBottom: 16
|
|
65
|
+
},
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex" }, children: [
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
Input,
|
|
70
|
+
{
|
|
71
|
+
size: "normal",
|
|
72
|
+
placeholder: searchByPlaceholder,
|
|
73
|
+
prefix: /* @__PURE__ */ jsx(HiSearch, {}),
|
|
74
|
+
style: {
|
|
75
|
+
padding: "5px 8px"
|
|
76
|
+
},
|
|
77
|
+
value: searchValue,
|
|
78
|
+
onChange: onInputChange
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
onFilterClick && /* @__PURE__ */ jsx("div", { style: { marginLeft: 16 }, children: /* @__PURE__ */ jsx(
|
|
82
|
+
UtilityButton,
|
|
83
|
+
{
|
|
84
|
+
isIconButton: true,
|
|
85
|
+
icon: /* @__PURE__ */ jsx(HiMiniAdjustmentsVertical, { color: "#222222" }),
|
|
86
|
+
onClick: onFilterClick
|
|
87
|
+
}
|
|
88
|
+
) }),
|
|
89
|
+
onSettingsClick && /* @__PURE__ */ jsx("div", { style: { marginLeft: 16 }, children: /* @__PURE__ */ jsx(
|
|
90
|
+
UtilityButton,
|
|
91
|
+
{
|
|
92
|
+
isIconButton: true,
|
|
93
|
+
icon: /* @__PURE__ */ jsx(FiSettings, { color: "#222222" }),
|
|
94
|
+
onClick: onSettingsClick
|
|
95
|
+
}
|
|
96
|
+
) })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ jsxs(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
style: {
|
|
102
|
+
display: "flex",
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
width: 300,
|
|
105
|
+
justifyContent: "flex-end",
|
|
106
|
+
marginLeft: "auto"
|
|
107
|
+
},
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ jsx(
|
|
110
|
+
Typography,
|
|
111
|
+
{
|
|
112
|
+
variant: "body1",
|
|
113
|
+
color: "#6C6C6C",
|
|
114
|
+
style: {
|
|
115
|
+
width: 70,
|
|
116
|
+
flexShrink: 0,
|
|
117
|
+
textAlign: "right",
|
|
118
|
+
paddingRight: 4,
|
|
119
|
+
marginRight: 8
|
|
120
|
+
},
|
|
121
|
+
children: "Sort by"
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
sortOptions && onSortChange ? /* @__PURE__ */ jsx(
|
|
125
|
+
Select,
|
|
126
|
+
{
|
|
127
|
+
options: sortOptions,
|
|
128
|
+
defaultValue: sortOptions[0].value,
|
|
129
|
+
value: selectedSortOption,
|
|
130
|
+
variant: "simple",
|
|
131
|
+
onChange: onSortChange,
|
|
132
|
+
style: {
|
|
133
|
+
width: 180,
|
|
134
|
+
flexShrink: 0
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
) : null,
|
|
138
|
+
/* @__PURE__ */ jsx(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
style: {
|
|
142
|
+
marginLeft: 8,
|
|
143
|
+
flexShrink: 0
|
|
144
|
+
},
|
|
145
|
+
children: /* @__PURE__ */ jsx(
|
|
146
|
+
IconButton,
|
|
147
|
+
{
|
|
148
|
+
icon: isSortedAscending ? /* @__PURE__ */ jsx(HiOutlineSortDescending, { size: 20 }) : /* @__PURE__ */ jsx(HiOutlineSortAscending, { size: 20 }),
|
|
149
|
+
onClick: onOrderClick
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
export {
|
|
162
|
+
PrimaryTableControlsRow as default
|
|
163
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
var iconUtil = require("../../../utils/icon-util.cjs");
|
|
4
|
+
var Typography = require("../../Typography/Typography.cjs");
|
|
5
|
+
var Tooltip = require("../../Tooltip/Tooltip.cjs");
|
|
6
|
+
var Badge = require("../../Badge/Badge.cjs");
|
|
7
|
+
const GroupItem = ({ title, items, onGroupItemClick }) => {
|
|
8
|
+
if (items.length === 0) return null;
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tooltip, { tip: title, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
style: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
justifyContent: "center",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
width: 24,
|
|
18
|
+
height: 24
|
|
19
|
+
},
|
|
20
|
+
children: iconUtil.getIcon(title)
|
|
21
|
+
}
|
|
22
|
+
) }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
|
+
Badge,
|
|
25
|
+
{
|
|
26
|
+
label: item,
|
|
27
|
+
hasClose: true,
|
|
28
|
+
state: "generic",
|
|
29
|
+
size: "small",
|
|
30
|
+
onClick: () => onGroupItemClick(title, item)
|
|
31
|
+
},
|
|
32
|
+
item.toString()
|
|
33
|
+
)) })
|
|
34
|
+
] });
|
|
35
|
+
};
|
|
36
|
+
const GroupsRow = ({ groups, onGroupItemClick }) => {
|
|
37
|
+
if (!groups) return null;
|
|
38
|
+
const groupArray = Object.entries(groups).map(([title, items]) => ({
|
|
39
|
+
title,
|
|
40
|
+
items
|
|
41
|
+
}));
|
|
42
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: groupArray.length > 0 ? groupArray.map((group) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
+
GroupItem,
|
|
44
|
+
{
|
|
45
|
+
title: group.title,
|
|
46
|
+
items: group.items,
|
|
47
|
+
onGroupItemClick
|
|
48
|
+
},
|
|
49
|
+
group.title
|
|
50
|
+
)) : null });
|
|
51
|
+
};
|
|
52
|
+
const SecondaryTableControlsRow = ({
|
|
53
|
+
groups,
|
|
54
|
+
totalRecords,
|
|
55
|
+
onChange
|
|
56
|
+
}) => {
|
|
57
|
+
const onGroupItemClick = (title, item) => {
|
|
58
|
+
const groupItemClickEvent = {
|
|
59
|
+
event: "groupItemClick",
|
|
60
|
+
payload: { title, item }
|
|
61
|
+
};
|
|
62
|
+
onChange?.(groupItemClickEvent);
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
style: {
|
|
68
|
+
display: "flex",
|
|
69
|
+
justifyContent: "space-between",
|
|
70
|
+
alignItems: "flex-end",
|
|
71
|
+
marginTop: 8
|
|
72
|
+
},
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsx(GroupsRow, { groups, onGroupItemClick }),
|
|
75
|
+
totalRecords > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
module.exports = SecondaryTableControlsRow;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { getIcon } from "../../../utils/icon-util.js";
|
|
3
|
+
import Typography from "../../Typography/Typography.js";
|
|
4
|
+
import Tooltip from "../../Tooltip/Tooltip.js";
|
|
5
|
+
import Badge from "../../Badge/Badge.js";
|
|
6
|
+
const GroupItem = ({ title, items, onGroupItemClick }) => {
|
|
7
|
+
if (items.length === 0) return null;
|
|
8
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Tooltip, { tip: title, children: /* @__PURE__ */ jsx(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
style: {
|
|
13
|
+
display: "flex",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
width: 24,
|
|
17
|
+
height: 24
|
|
18
|
+
},
|
|
19
|
+
children: getIcon(title)
|
|
20
|
+
}
|
|
21
|
+
) }),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsx(
|
|
23
|
+
Badge,
|
|
24
|
+
{
|
|
25
|
+
label: item,
|
|
26
|
+
hasClose: true,
|
|
27
|
+
state: "generic",
|
|
28
|
+
size: "small",
|
|
29
|
+
onClick: () => onGroupItemClick(title, item)
|
|
30
|
+
},
|
|
31
|
+
item.toString()
|
|
32
|
+
)) })
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
const GroupsRow = ({ groups, onGroupItemClick }) => {
|
|
36
|
+
if (!groups) return null;
|
|
37
|
+
const groupArray = Object.entries(groups).map(([title, items]) => ({
|
|
38
|
+
title,
|
|
39
|
+
items
|
|
40
|
+
}));
|
|
41
|
+
return /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: groupArray.length > 0 ? groupArray.map((group) => /* @__PURE__ */ jsx(
|
|
42
|
+
GroupItem,
|
|
43
|
+
{
|
|
44
|
+
title: group.title,
|
|
45
|
+
items: group.items,
|
|
46
|
+
onGroupItemClick
|
|
47
|
+
},
|
|
48
|
+
group.title
|
|
49
|
+
)) : null });
|
|
50
|
+
};
|
|
51
|
+
const SecondaryTableControlsRow = ({
|
|
52
|
+
groups,
|
|
53
|
+
totalRecords,
|
|
54
|
+
onChange
|
|
55
|
+
}) => {
|
|
56
|
+
const onGroupItemClick = (title, item) => {
|
|
57
|
+
const groupItemClickEvent = {
|
|
58
|
+
event: "groupItemClick",
|
|
59
|
+
payload: { title, item }
|
|
60
|
+
};
|
|
61
|
+
onChange?.(groupItemClickEvent);
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
style: {
|
|
67
|
+
display: "flex",
|
|
68
|
+
justifyContent: "space-between",
|
|
69
|
+
alignItems: "flex-end",
|
|
70
|
+
marginTop: 8
|
|
71
|
+
},
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(GroupsRow, { groups, onGroupItemClick }),
|
|
74
|
+
totalRecords > 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
SecondaryTableControlsRow as default
|
|
81
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
var PrimaryTableControlsRow = require("./PrimaryTableControlsRow.cjs");
|
|
4
|
+
var SecondaryTableControlsRow = require("./SecondaryTableControlsRow.cjs");
|
|
5
|
+
const TableControls = ({
|
|
6
|
+
primaryTableRowData,
|
|
7
|
+
secondaryTableRowData,
|
|
8
|
+
onChange
|
|
9
|
+
}) => {
|
|
10
|
+
const onPrimaryChange = (actionEvent) => {
|
|
11
|
+
onChange(actionEvent);
|
|
12
|
+
};
|
|
13
|
+
const onSecondaryChange = (actionEvent) => {
|
|
14
|
+
onChange(actionEvent);
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "TableControls", style: { margin: "16px 0px" }, children: [
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18
|
+
PrimaryTableControlsRow,
|
|
19
|
+
{
|
|
20
|
+
sortOptions: primaryTableRowData.sortOptions,
|
|
21
|
+
searchByPlaceholder: primaryTableRowData.searchByPlaceholder,
|
|
22
|
+
isSortedAscending: primaryTableRowData.isSortedAscending,
|
|
23
|
+
onChange: onPrimaryChange,
|
|
24
|
+
searchValue: primaryTableRowData.searchValue,
|
|
25
|
+
selectedSortOption: primaryTableRowData.selectedSortOption
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
secondaryTableRowData ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
+
SecondaryTableControlsRow,
|
|
30
|
+
{
|
|
31
|
+
groups: secondaryTableRowData.groups,
|
|
32
|
+
totalRecords: secondaryTableRowData.totalRecords,
|
|
33
|
+
onChange: onSecondaryChange
|
|
34
|
+
}
|
|
35
|
+
) : null
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
module.exports = TableControls;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import PrimaryTableControlsRow from "./PrimaryTableControlsRow.js";
|
|
3
|
+
import SecondaryTableControlsRow from "./SecondaryTableControlsRow.js";
|
|
4
|
+
const TableControls = ({
|
|
5
|
+
primaryTableRowData,
|
|
6
|
+
secondaryTableRowData,
|
|
7
|
+
onChange
|
|
8
|
+
}) => {
|
|
9
|
+
const onPrimaryChange = (actionEvent) => {
|
|
10
|
+
onChange(actionEvent);
|
|
11
|
+
};
|
|
12
|
+
const onSecondaryChange = (actionEvent) => {
|
|
13
|
+
onChange(actionEvent);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", { "data-testid": "TableControls", style: { margin: "16px 0px" }, children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
PrimaryTableControlsRow,
|
|
18
|
+
{
|
|
19
|
+
sortOptions: primaryTableRowData.sortOptions,
|
|
20
|
+
searchByPlaceholder: primaryTableRowData.searchByPlaceholder,
|
|
21
|
+
isSortedAscending: primaryTableRowData.isSortedAscending,
|
|
22
|
+
onChange: onPrimaryChange,
|
|
23
|
+
searchValue: primaryTableRowData.searchValue,
|
|
24
|
+
selectedSortOption: primaryTableRowData.selectedSortOption
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
secondaryTableRowData ? /* @__PURE__ */ jsx(
|
|
28
|
+
SecondaryTableControlsRow,
|
|
29
|
+
{
|
|
30
|
+
groups: secondaryTableRowData.groups,
|
|
31
|
+
totalRecords: secondaryTableRowData.totalRecords,
|
|
32
|
+
onChange: onSecondaryChange
|
|
33
|
+
}
|
|
34
|
+
) : null
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
TableControls as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
var Table = require("../Table.cjs");
|
|
4
|
+
var TableControls = require("../TableControls/TableControls.cjs");
|
|
5
|
+
const TableWithControls = ({
|
|
6
|
+
tableData,
|
|
7
|
+
tableControlsData,
|
|
8
|
+
onChange
|
|
9
|
+
}) => {
|
|
10
|
+
const { primaryTableRowData, secondaryTableRowData } = tableControlsData;
|
|
11
|
+
const { dataSource, columns, rowSelection } = tableData;
|
|
12
|
+
const onTableControlsChange = (event) => {
|
|
13
|
+
onChange(event);
|
|
14
|
+
};
|
|
15
|
+
const onTableChange = (pagination, filters, sorter) => {
|
|
16
|
+
onChange({
|
|
17
|
+
event: "tableChange",
|
|
18
|
+
payload: { pagination, filters, sorter }
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23
|
+
TableControls,
|
|
24
|
+
{
|
|
25
|
+
primaryTableRowData,
|
|
26
|
+
secondaryTableRowData,
|
|
27
|
+
onChange: onTableControlsChange
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
Table,
|
|
32
|
+
{
|
|
33
|
+
dataSource,
|
|
34
|
+
columns,
|
|
35
|
+
rowSelection,
|
|
36
|
+
onChange: onTableChange
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
};
|
|
41
|
+
module.exports = TableWithControls;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import Table from "../Table.js";
|
|
3
|
+
import TableControls from "../TableControls/TableControls.js";
|
|
4
|
+
const TableWithControls = ({
|
|
5
|
+
tableData,
|
|
6
|
+
tableControlsData,
|
|
7
|
+
onChange
|
|
8
|
+
}) => {
|
|
9
|
+
const { primaryTableRowData, secondaryTableRowData } = tableControlsData;
|
|
10
|
+
const { dataSource, columns, rowSelection } = tableData;
|
|
11
|
+
const onTableControlsChange = (event) => {
|
|
12
|
+
onChange(event);
|
|
13
|
+
};
|
|
14
|
+
const onTableChange = (pagination, filters, sorter) => {
|
|
15
|
+
onChange({
|
|
16
|
+
event: "tableChange",
|
|
17
|
+
payload: { pagination, filters, sorter }
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
TableControls,
|
|
23
|
+
{
|
|
24
|
+
primaryTableRowData,
|
|
25
|
+
secondaryTableRowData,
|
|
26
|
+
onChange: onTableControlsChange
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
Table,
|
|
31
|
+
{
|
|
32
|
+
dataSource,
|
|
33
|
+
columns,
|
|
34
|
+
rowSelection,
|
|
35
|
+
onChange: onTableChange
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
TableWithControls as default
|
|
42
|
+
};
|
|
@@ -57,8 +57,8 @@ export { default as Switch } from './Switch';
|
|
|
57
57
|
export type { SwitchProps } from './Switch';
|
|
58
58
|
export { default as Table } from './Table';
|
|
59
59
|
export type { TableProps } from './Table';
|
|
60
|
-
export { default as TableWithControls } from './Table';
|
|
61
|
-
export type { TableWithControlsProps } from './Table';
|
|
60
|
+
export { default as TableWithControls } from './Table/TableWithControls';
|
|
61
|
+
export type { TableWithControlsProps } from './Table/TableWithControls';
|
|
62
62
|
export { useTable } from './Table';
|
|
63
63
|
export { useTableWithControls } from './Table';
|
|
64
64
|
export type { UseTableConfig } from './Table';
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var Select = require("./components/Select/Select.cjs");
|
|
|
30
30
|
var Shapes = require("./components/Shapes/Shapes.cjs");
|
|
31
31
|
var Switch = require("./components/Switch/Switch.cjs");
|
|
32
32
|
var TablePagination = require("./components/Table/TablePagination.cjs");
|
|
33
|
+
var TableWithControls = require("./components/Table/TableWithControls/TableWithControls.cjs");
|
|
33
34
|
var Tabs = require("./components/Tabs/Tabs.cjs");
|
|
34
35
|
var Tile = require("./components/Tile/Tile.cjs");
|
|
35
36
|
var Toast = require("./components/Toast/Toast.cjs");
|
|
@@ -73,7 +74,7 @@ exports.Select = Select;
|
|
|
73
74
|
exports.Shapes = Shapes;
|
|
74
75
|
exports.Switch = Switch;
|
|
75
76
|
exports.Table = TablePagination;
|
|
76
|
-
exports.TableWithControls =
|
|
77
|
+
exports.TableWithControls = TableWithControls;
|
|
77
78
|
exports.Tabs = Tabs;
|
|
78
79
|
exports.Tile = Tile;
|
|
79
80
|
exports.Toast = Toast;
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,8 @@ import { default as default29 } from "./components/SegmentedControls/SegmentedCo
|
|
|
28
28
|
import { default as default30 } from "./components/Select/Select.js";
|
|
29
29
|
import { default as default31 } from "./components/Shapes/Shapes.js";
|
|
30
30
|
import { default as default32 } from "./components/Switch/Switch.js";
|
|
31
|
-
import { default as default33
|
|
31
|
+
import { default as default33 } from "./components/Table/TablePagination.js";
|
|
32
|
+
import { default as default34 } from "./components/Table/TableWithControls/TableWithControls.js";
|
|
32
33
|
import { default as default35 } from "./components/Tabs/Tabs.js";
|
|
33
34
|
import { default as default36 } from "./components/Tile/Tile.js";
|
|
34
35
|
import { default as default37 } from "./components/Toast/Toast.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var iconBase = require("../lib/iconBase.cjs");
|
|
3
|
+
require("../lib/iconContext.cjs");
|
|
4
|
+
function FiSettings(props) {
|
|
5
|
+
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "3" }, "child": [] }, { "tag": "path", "attr": { "d": "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" }, "child": [] }] })(props);
|
|
6
|
+
}
|
|
7
|
+
exports.FiSettings = FiSettings;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function FiSettings(props) {
|
|
4
|
+
return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "3" }, "child": [] }, { "tag": "path", "attr": { "d": "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" }, "child": [] }] })(props);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
FiSettings
|
|
8
|
+
};
|
|
@@ -10,6 +10,9 @@ function HiExclamationCircle(props) {
|
|
|
10
10
|
function HiMinusCircle(props) {
|
|
11
11
|
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M10 18a8 8 0 100-16 8 8 0 000 16zM7 9a1 1 0 000 2h6a1 1 0 100-2H7z", "clipRule": "evenodd" }, "child": [] }] })(props);
|
|
12
12
|
}
|
|
13
|
+
function HiSearch(props) {
|
|
14
|
+
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z", "clipRule": "evenodd" }, "child": [] }] })(props);
|
|
15
|
+
}
|
|
13
16
|
function HiXCircle(props) {
|
|
14
17
|
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", "clipRule": "evenodd" }, "child": [] }] })(props);
|
|
15
18
|
}
|
|
@@ -22,9 +25,18 @@ function HiOutlineClock(props) {
|
|
|
22
25
|
function HiOutlineExclamationCircle(props) {
|
|
23
26
|
return iconBase.GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
24
27
|
}
|
|
28
|
+
function HiOutlineGlobe(props) {
|
|
29
|
+
return iconBase.GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
30
|
+
}
|
|
25
31
|
function HiOutlineMinusCircle(props) {
|
|
26
32
|
return iconBase.GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
27
33
|
}
|
|
34
|
+
function HiOutlineSortAscending(props) {
|
|
35
|
+
return iconBase.GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12" }, "child": [] }] })(props);
|
|
36
|
+
}
|
|
37
|
+
function HiOutlineSortDescending(props) {
|
|
38
|
+
return iconBase.GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4" }, "child": [] }] })(props);
|
|
39
|
+
}
|
|
28
40
|
function HiOutlineXCircle(props) {
|
|
29
41
|
return iconBase.GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
30
42
|
}
|
|
@@ -37,7 +49,11 @@ exports.HiMinusCircle = HiMinusCircle;
|
|
|
37
49
|
exports.HiOutlineCheckCircle = HiOutlineCheckCircle;
|
|
38
50
|
exports.HiOutlineClock = HiOutlineClock;
|
|
39
51
|
exports.HiOutlineExclamationCircle = HiOutlineExclamationCircle;
|
|
52
|
+
exports.HiOutlineGlobe = HiOutlineGlobe;
|
|
40
53
|
exports.HiOutlineMinusCircle = HiOutlineMinusCircle;
|
|
54
|
+
exports.HiOutlineSortAscending = HiOutlineSortAscending;
|
|
55
|
+
exports.HiOutlineSortDescending = HiOutlineSortDescending;
|
|
41
56
|
exports.HiOutlineX = HiOutlineX;
|
|
42
57
|
exports.HiOutlineXCircle = HiOutlineXCircle;
|
|
58
|
+
exports.HiSearch = HiSearch;
|
|
43
59
|
exports.HiXCircle = HiXCircle;
|
|
@@ -9,6 +9,9 @@ function HiExclamationCircle(props) {
|
|
|
9
9
|
function HiMinusCircle(props) {
|
|
10
10
|
return GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M10 18a8 8 0 100-16 8 8 0 000 16zM7 9a1 1 0 000 2h6a1 1 0 100-2H7z", "clipRule": "evenodd" }, "child": [] }] })(props);
|
|
11
11
|
}
|
|
12
|
+
function HiSearch(props) {
|
|
13
|
+
return GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z", "clipRule": "evenodd" }, "child": [] }] })(props);
|
|
14
|
+
}
|
|
12
15
|
function HiXCircle(props) {
|
|
13
16
|
return GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "d": "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", "clipRule": "evenodd" }, "child": [] }] })(props);
|
|
14
17
|
}
|
|
@@ -21,9 +24,18 @@ function HiOutlineClock(props) {
|
|
|
21
24
|
function HiOutlineExclamationCircle(props) {
|
|
22
25
|
return GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
23
26
|
}
|
|
27
|
+
function HiOutlineGlobe(props) {
|
|
28
|
+
return GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
29
|
+
}
|
|
24
30
|
function HiOutlineMinusCircle(props) {
|
|
25
31
|
return GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
26
32
|
}
|
|
33
|
+
function HiOutlineSortAscending(props) {
|
|
34
|
+
return GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12" }, "child": [] }] })(props);
|
|
35
|
+
}
|
|
36
|
+
function HiOutlineSortDescending(props) {
|
|
37
|
+
return GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4" }, "child": [] }] })(props);
|
|
38
|
+
}
|
|
27
39
|
function HiOutlineXCircle(props) {
|
|
28
40
|
return GenIcon({ "attr": { "fill": "none", "viewBox": "0 0 24 24", "strokeWidth": "2", "stroke": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "strokeLinecap": "round", "strokeLinejoin": "round", "d": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" }, "child": [] }] })(props);
|
|
29
41
|
}
|
|
@@ -37,8 +49,12 @@ export {
|
|
|
37
49
|
HiOutlineCheckCircle,
|
|
38
50
|
HiOutlineClock,
|
|
39
51
|
HiOutlineExclamationCircle,
|
|
52
|
+
HiOutlineGlobe,
|
|
40
53
|
HiOutlineMinusCircle,
|
|
54
|
+
HiOutlineSortAscending,
|
|
55
|
+
HiOutlineSortDescending,
|
|
41
56
|
HiOutlineX,
|
|
42
57
|
HiOutlineXCircle,
|
|
58
|
+
HiSearch,
|
|
43
59
|
HiXCircle
|
|
44
60
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var iconBase = require("../lib/iconBase.cjs");
|
|
3
|
+
require("../lib/iconContext.cjs");
|
|
4
|
+
function HiMiniAdjustmentsVertical(props) {
|
|
5
|
+
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "d": "M17 2.75a.75.75 0 0 0-1.5 0v5.5a.75.75 0 0 0 1.5 0v-5.5ZM17 15.75a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 0 1.5 0v-1.5ZM3.75 15a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5a.75.75 0 0 1 .75-.75ZM4.5 2.75a.75.75 0 0 0-1.5 0v5.5a.75.75 0 0 0 1.5 0v-5.5ZM10 11a.75.75 0 0 1 .75.75v5.5a.75.75 0 0 1-1.5 0v-5.5A.75.75 0 0 1 10 11ZM10.75 2.75a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 0 1.5 0v-1.5ZM10 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM3.75 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM16.25 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z" }, "child": [] }] })(props);
|
|
6
|
+
}
|
|
7
|
+
exports.HiMiniAdjustmentsVertical = HiMiniAdjustmentsVertical;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function HiMiniAdjustmentsVertical(props) {
|
|
4
|
+
return GenIcon({ "attr": { "viewBox": "0 0 20 20", "fill": "currentColor", "aria-hidden": "true" }, "child": [{ "tag": "path", "attr": { "d": "M17 2.75a.75.75 0 0 0-1.5 0v5.5a.75.75 0 0 0 1.5 0v-5.5ZM17 15.75a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 0 1.5 0v-1.5ZM3.75 15a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5a.75.75 0 0 1 .75-.75ZM4.5 2.75a.75.75 0 0 0-1.5 0v5.5a.75.75 0 0 0 1.5 0v-5.5ZM10 11a.75.75 0 0 1 .75.75v5.5a.75.75 0 0 1-1.5 0v-5.5A.75.75 0 0 1 10 11ZM10.75 2.75a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 0 1.5 0v-1.5ZM10 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM3.75 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM16.25 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z" }, "child": [] }] })(props);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
HiMiniAdjustmentsVertical
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var iconBase = require("../lib/iconBase.cjs");
|
|
3
|
+
require("../lib/iconContext.cjs");
|
|
4
|
+
function LuTag(props) {
|
|
5
|
+
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, "child": [] }, { "tag": "circle", "attr": { "cx": "7.5", "cy": "7.5", "r": ".5", "fill": "currentColor" }, "child": [] }] })(props);
|
|
6
|
+
}
|
|
7
|
+
exports.LuTag = LuTag;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function LuTag(props) {
|
|
4
|
+
return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, "child": [] }, { "tag": "circle", "attr": { "cx": "7.5", "cy": "7.5", "r": ".5", "fill": "currentColor" }, "child": [] }] })(props);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
LuTag
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var iconBase = require("../lib/iconBase.cjs");
|
|
3
|
+
require("../lib/iconContext.cjs");
|
|
4
|
+
function TbFiles(props) {
|
|
5
|
+
return iconBase.GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M15 3v4a1 1 0 0 0 1 1h4" }, "child": [] }, { "tag": "path", "attr": { "d": "M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2z" }, "child": [] }, { "tag": "path", "attr": { "d": "M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2" }, "child": [] }] })(props);
|
|
6
|
+
}
|
|
7
|
+
exports.TbFiles = TbFiles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function TbFiles(props) {
|
|
4
|
+
return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M15 3v4a1 1 0 0 0 1 1h4" }, "child": [] }, { "tag": "path", "attr": { "d": "M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2z" }, "child": [] }, { "tag": "path", "attr": { "d": "M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2" }, "child": [] }] })(props);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
TbFiles
|
|
8
|
+
};
|
package/dist/utils/icon-util.cjs
CHANGED
|
@@ -4,7 +4,25 @@ var index$1 = require("../constants/index.cjs");
|
|
|
4
4
|
var index$3 = require("../node_modules/react-icons/fa6/index.cjs");
|
|
5
5
|
var index$2 = require("../node_modules/react-icons/hi/index.cjs");
|
|
6
6
|
var index = require("../node_modules/react-icons/pi/index.cjs");
|
|
7
|
+
var index$4 = require("../node_modules/react-icons/tb/index.cjs");
|
|
8
|
+
var index$5 = require("../node_modules/react-icons/lu/index.cjs");
|
|
7
9
|
const iconSize = 18;
|
|
10
|
+
const getIcon = (name) => {
|
|
11
|
+
switch (name.toLowerCase()) {
|
|
12
|
+
case "orders": {
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index$5.LuTag, {});
|
|
14
|
+
}
|
|
15
|
+
case "warehouse": {
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index$2.HiOutlineGlobe, {});
|
|
17
|
+
}
|
|
18
|
+
case "availability": {
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index$4.TbFiles, {});
|
|
20
|
+
}
|
|
21
|
+
default: {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
8
26
|
const getIconColor = (state, theme) => {
|
|
9
27
|
switch (state) {
|
|
10
28
|
case index$1.STATE.error: {
|
|
@@ -83,4 +101,5 @@ const getBadgeStateIcon = (state, color, isFilled = true, hasIcon = true, custom
|
|
|
83
101
|
}
|
|
84
102
|
};
|
|
85
103
|
exports.getBadgeStateIcon = getBadgeStateIcon;
|
|
104
|
+
exports.getIcon = getIcon;
|
|
86
105
|
exports.getIconColor = getIconColor;
|
package/dist/utils/icon-util.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { STATE } from "../constants/index.js";
|
|
3
3
|
import { FaCircleCheck } from "../node_modules/react-icons/fa6/index.js";
|
|
4
|
-
import { HiOutlineMinusCircle, HiOutlineClock, HiOutlineCheckCircle, HiOutlineXCircle, HiOutlineExclamationCircle, HiMinusCircle, HiClock, HiXCircle, HiExclamationCircle } from "../node_modules/react-icons/hi/index.js";
|
|
4
|
+
import { HiOutlineMinusCircle, HiOutlineClock, HiOutlineCheckCircle, HiOutlineXCircle, HiOutlineExclamationCircle, HiMinusCircle, HiClock, HiXCircle, HiExclamationCircle, HiOutlineGlobe } from "../node_modules/react-icons/hi/index.js";
|
|
5
5
|
import { PiInfo, PiInfoFill } from "../node_modules/react-icons/pi/index.js";
|
|
6
|
+
import { TbFiles } from "../node_modules/react-icons/tb/index.js";
|
|
7
|
+
import { LuTag } from "../node_modules/react-icons/lu/index.js";
|
|
6
8
|
const iconSize = 18;
|
|
9
|
+
const getIcon = (name) => {
|
|
10
|
+
switch (name.toLowerCase()) {
|
|
11
|
+
case "orders": {
|
|
12
|
+
return /* @__PURE__ */ jsx(LuTag, {});
|
|
13
|
+
}
|
|
14
|
+
case "warehouse": {
|
|
15
|
+
return /* @__PURE__ */ jsx(HiOutlineGlobe, {});
|
|
16
|
+
}
|
|
17
|
+
case "availability": {
|
|
18
|
+
return /* @__PURE__ */ jsx(TbFiles, {});
|
|
19
|
+
}
|
|
20
|
+
default: {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
7
25
|
const getIconColor = (state, theme) => {
|
|
8
26
|
switch (state) {
|
|
9
27
|
case STATE.error: {
|
|
@@ -83,5 +101,6 @@ const getBadgeStateIcon = (state, color, isFilled = true, hasIcon = true, custom
|
|
|
83
101
|
};
|
|
84
102
|
export {
|
|
85
103
|
getBadgeStateIcon,
|
|
104
|
+
getIcon,
|
|
86
105
|
getIconColor
|
|
87
106
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobolt/genesis",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "genesis design system",
|
|
5
5
|
"author": "gobolt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,6 +44,12 @@
|
|
|
44
44
|
"import": "./dist/utils/*.js",
|
|
45
45
|
"require": "./dist/utils/*.cjs",
|
|
46
46
|
"default": "./dist/utils/*.js"
|
|
47
|
+
},
|
|
48
|
+
"./interface/*": {
|
|
49
|
+
"types": "./dist/interface/*.d.ts",
|
|
50
|
+
"import": "./dist/interface/*.js",
|
|
51
|
+
"require": "./dist/interface/*.cjs",
|
|
52
|
+
"default": "./dist/interface/*.js"
|
|
47
53
|
}
|
|
48
54
|
},
|
|
49
55
|
"files": [
|