@gobolt/genesis 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index5.cjs +1 -1
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.cjs +1 -0
- package/dist/_virtual/index6.js +7 -0
- package/dist/_virtual/index7.cjs +1 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.js +34 -21
- package/dist/components/Badge/styles.cjs +5 -7
- package/dist/components/Badge/styles.js +5 -7
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Select/Select.cjs +2 -2
- package/dist/components/Select/Select.js +25 -22
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.cjs +1 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.d.ts +16 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +119 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.cjs +1 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.d.ts +11 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +72 -0
- package/dist/components/Table/TableControls/TableControls.cjs +1 -0
- package/dist/components/Table/TableControls/TableControls.d.ts +11 -5
- package/dist/components/Table/TableControls/TableControls.js +36 -0
- package/dist/components/Table/TableWithControls/TableWithControls.cjs +1 -0
- package/dist/components/Table/TableWithControls/TableWithControls.d.ts +4 -4
- package/dist/components/Table/TableWithControls/TableWithControls.js +39 -0
- package/dist/components/Table/TableWithControls/index.d.ts +1 -0
- package/dist/components/Table/TableWithControls/useTableWithControls.cjs +1 -0
- package/dist/components/Table/TableWithControls/useTableWithControls.d.ts +28 -0
- package/dist/components/Table/TableWithControls/useTableWithControls.js +133 -0
- package/dist/components/Table/__mocks__/table-mocks.cjs +1 -0
- package/dist/components/Table/__mocks__/table-mocks.js +63 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/useTable.cjs +1 -0
- package/dist/components/Table/useTable.d.ts +23 -0
- package/dist/components/Table/useTable.js +66 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +48 -42
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.cjs +1 -1
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.js +1 -1
- package/dist/node_modules/debounce/index.cjs +1 -0
- package/dist/node_modules/debounce/index.js +44 -0
- package/dist/node_modules/react-icons/fi/index.cjs +1 -0
- package/dist/node_modules/react-icons/fi/index.js +8 -0
- package/dist/node_modules/react-icons/hi/index.cjs +1 -1
- package/dist/node_modules/react-icons/hi/index.js +22 -6
- package/dist/node_modules/react-icons/hi2/index.cjs +1 -0
- package/dist/node_modules/react-icons/hi2/index.js +8 -0
- package/dist/node_modules/react-icons/lu/index.cjs +1 -0
- package/dist/node_modules/react-icons/lu/index.js +8 -0
- package/dist/node_modules/react-icons/tb/index.cjs +1 -1
- package/dist/node_modules/react-icons/tb/index.js +6 -2
- package/dist/utils/icon-util.cjs +1 -1
- package/dist/utils/icon-util.js +44 -31
- package/package.json +3 -2
- package/dist/components/Table/TableControls/PrimaryTableControls.d.ts +0 -15
- package/dist/components/Table/TableControls/SecondaryTableControls.d.ts +0 -10
- package/dist/components/Table/__stories__/use-table-hook.d.ts +0 -9
- package/dist/components/Table/use-table-hook.d.ts +0 -23
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
import { GenIcon as
|
|
1
|
+
import { GenIcon as r } from "../lib/iconBase.js";
|
|
2
2
|
import "../lib/iconContext.js";
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function n(t) {
|
|
4
|
+
return r({ 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: [] }] })(t);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return
|
|
6
|
+
function o(t) {
|
|
7
|
+
return r({ attr: { fill: "none", viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }, child: [] }] })(t);
|
|
8
|
+
}
|
|
9
|
+
function a(t) {
|
|
10
|
+
return r({ 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: [] }] })(t);
|
|
11
|
+
}
|
|
12
|
+
function d(t) {
|
|
13
|
+
return r({ 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: [] }] })(t);
|
|
14
|
+
}
|
|
15
|
+
function l(t) {
|
|
16
|
+
return r({ 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: [] }] })(t);
|
|
17
|
+
}
|
|
18
|
+
function u(t) {
|
|
19
|
+
return r({ attr: { fill: "none", viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }, child: [] }] })(t);
|
|
8
20
|
}
|
|
9
21
|
export {
|
|
10
22
|
o as HiOutlineCheckCircle,
|
|
11
|
-
|
|
23
|
+
a as HiOutlineGlobe,
|
|
24
|
+
d as HiOutlineSortAscending,
|
|
25
|
+
l as HiOutlineSortDescending,
|
|
26
|
+
u as HiOutlineX,
|
|
27
|
+
n as HiSearch
|
|
12
28
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../lib/iconBase.cjs");require("../lib/iconContext.cjs");function e(a){return t.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:[]}]})(a)}exports.HiMiniAdjustmentsVertical=e;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon as t } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function v(a) {
|
|
4
|
+
return t({ 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: [] }] })(a);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
v as HiMiniAdjustmentsVertical
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../lib/iconBase.cjs");require("../lib/iconContext.cjs");function t(r){return e.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:[]}]})(r)}exports.LuTag=t;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon as t } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function i(r) {
|
|
4
|
+
return t({ 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: [] }] })(r);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
i as LuTag
|
|
8
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../lib/iconBase.cjs");require("../lib/iconContext.cjs");function a(l){return t.GenIcon({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z"},child:[]}]})(l)}function e(l){return t.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:[]}]})(l)}exports.TbFiles=e;exports.TbInfoCircleFilled=a;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { GenIcon as
|
|
1
|
+
import { GenIcon as t } from "../lib/iconBase.js";
|
|
2
2
|
import "../lib/iconContext.js";
|
|
3
3
|
function o(l) {
|
|
4
|
-
return
|
|
4
|
+
return t({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z" }, child: [] }] })(l);
|
|
5
|
+
}
|
|
6
|
+
function i(l) {
|
|
7
|
+
return t({ 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: [] }] })(l);
|
|
5
8
|
}
|
|
6
9
|
export {
|
|
10
|
+
i as TbFiles,
|
|
7
11
|
o as TbInfoCircleFilled
|
|
8
12
|
};
|
package/dist/utils/icon-util.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("../constants/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("../constants/index.cjs"),o=require("../node_modules/react-icons/fa6/index.cjs"),i=require("../node_modules/react-icons/hi/index.cjs"),c=require("../node_modules/react-icons/tb/index.cjs"),l=require("../node_modules/react-icons/lu/index.cjs"),a=require("../node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.cjs"),T=require("../node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.cjs"),S=require("../node_modules/@ant-design/icons/es/icons/ClockCircleOutlined.cjs"),f=require("../node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.cjs"),d=require("../node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.cjs"),x=require("../node_modules/@ant-design/icons/es/icons/MinusCircleFilled.cjs"),C=require("../node_modules/@ant-design/icons/es/icons/ClockCircleFilled.cjs"),g=require("../node_modules/@ant-design/icons/es/icons/CloseCircleFilled.cjs"),E=require("../node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.cjs"),t=16,A=n=>{switch(n.toLowerCase()){case"orders":return s.jsx(l.LuTag,{});case"warehouse":return s.jsx(i.HiOutlineGlobe,{});case"availability":return s.jsx(c.TbFiles,{});default:return null}},j=(n,e)=>{switch(n){case r.STATE.error:return e.colors.status.error.onsurface;case r.STATE.success:return e.colors.status.success.onsurface;case r.STATE.warning:return e.colors.status.warning.default;case r.STATE.removed:return e.colors.status.generic.default;case r.STATE.progress:return e.colors.timebox.evening.default;case r.STATE.info:default:return e.colors.status.info.onsurface}},q=(n,e,u=!0)=>{if(!n)return null;if(!u)switch(n){case r.STATE.warning:return s.jsx(d,{style:{color:e,fontSize:t}});case r.STATE.error:return s.jsx(f,{style:{color:e,fontSize:t}});case r.STATE.success:return s.jsx(i.HiOutlineCheckCircle,{style:{color:e,fontSize:t}});case r.STATE.progress:return s.jsx(S,{style:{color:e,fontSize:t}});case r.STATE.removed:return s.jsx(T,{style:{color:e,fontSize:t}});case r.STATE.info:default:return s.jsx(a,{style:{color:e,fontSize:t}})}switch(n){case r.STATE.warning:return s.jsx(E,{style:{color:e,fontSize:t}});case r.STATE.error:return s.jsx(g,{style:{color:e,fontSize:t}});case r.STATE.success:return s.jsx(o.FaCircleCheck,{style:{color:e,fontSize:t}});case r.STATE.progress:return s.jsx(C,{style:{color:e,fontSize:t}});case r.STATE.removed:return s.jsx(x,{style:{color:e,fontSize:t}});case r.STATE.info:default:return s.jsx(c.TbInfoCircleFilled,{style:{color:e,fontSize:t+8}})}};exports.getBadgeStateIcon=q;exports.getIcon=A;exports.getIconColor=j;
|
package/dist/utils/icon-util.js
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { STATE as r } from "../constants/index.js";
|
|
3
|
-
import { FaCircleCheck as
|
|
4
|
-
import { HiOutlineCheckCircle as
|
|
5
|
-
import { TbInfoCircleFilled as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
3
|
+
import { FaCircleCheck as i } from "../node_modules/react-icons/fa6/index.js";
|
|
4
|
+
import { HiOutlineCheckCircle as c, HiOutlineGlobe as f } from "../node_modules/react-icons/hi/index.js";
|
|
5
|
+
import { TbInfoCircleFilled as u, TbFiles as a } from "../node_modules/react-icons/tb/index.js";
|
|
6
|
+
import { LuTag as l } from "../node_modules/react-icons/lu/index.js";
|
|
7
|
+
import m from "../node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.js";
|
|
8
|
+
import p from "../node_modules/@ant-design/icons/es/icons/MinusCircleOutlined.js";
|
|
9
|
+
import S from "../node_modules/@ant-design/icons/es/icons/ClockCircleOutlined.js";
|
|
10
|
+
import g from "../node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js";
|
|
11
|
+
import d from "../node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js";
|
|
12
|
+
import y from "../node_modules/@ant-design/icons/es/icons/MinusCircleFilled.js";
|
|
12
13
|
import z from "../node_modules/@ant-design/icons/es/icons/ClockCircleFilled.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const s =
|
|
16
|
-
switch (
|
|
14
|
+
import I from "../node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js";
|
|
15
|
+
import w from "../node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js";
|
|
16
|
+
const s = 16, B = (o) => {
|
|
17
|
+
switch (o.toLowerCase()) {
|
|
18
|
+
case "orders":
|
|
19
|
+
return /* @__PURE__ */ t(l, {});
|
|
20
|
+
case "warehouse":
|
|
21
|
+
return /* @__PURE__ */ t(f, {});
|
|
22
|
+
case "availability":
|
|
23
|
+
return /* @__PURE__ */ t(a, {});
|
|
24
|
+
default:
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}, E = (o, e) => {
|
|
28
|
+
switch (o) {
|
|
17
29
|
case r.error:
|
|
18
30
|
return e.colors.status.error.onsurface;
|
|
19
31
|
case r.success:
|
|
@@ -28,49 +40,50 @@ const s = 14, B = (n, e) => {
|
|
|
28
40
|
default:
|
|
29
41
|
return e.colors.status.info.onsurface;
|
|
30
42
|
}
|
|
31
|
-
},
|
|
32
|
-
if (!n)
|
|
33
|
-
return null;
|
|
43
|
+
}, G = (o, e, n = !0) => {
|
|
34
44
|
if (!o)
|
|
35
|
-
|
|
45
|
+
return null;
|
|
46
|
+
if (!n)
|
|
47
|
+
switch (o) {
|
|
36
48
|
// isFilled is false
|
|
37
49
|
case r.warning:
|
|
38
50
|
return /* @__PURE__ */ t(
|
|
39
|
-
|
|
51
|
+
d,
|
|
40
52
|
{
|
|
41
53
|
style: { color: e, fontSize: s }
|
|
42
54
|
}
|
|
43
55
|
);
|
|
44
56
|
case r.error:
|
|
45
|
-
return /* @__PURE__ */ t(
|
|
57
|
+
return /* @__PURE__ */ t(g, { style: { color: e, fontSize: s } });
|
|
46
58
|
case r.success:
|
|
47
|
-
return /* @__PURE__ */ t(
|
|
59
|
+
return /* @__PURE__ */ t(c, { style: { color: e, fontSize: s } });
|
|
48
60
|
case r.progress:
|
|
49
|
-
return /* @__PURE__ */ t(
|
|
61
|
+
return /* @__PURE__ */ t(S, { style: { color: e, fontSize: s } });
|
|
50
62
|
case r.removed:
|
|
51
|
-
return /* @__PURE__ */ t(
|
|
63
|
+
return /* @__PURE__ */ t(p, { style: { color: e, fontSize: s } });
|
|
52
64
|
case r.info:
|
|
53
65
|
default:
|
|
54
|
-
return /* @__PURE__ */ t(
|
|
66
|
+
return /* @__PURE__ */ t(m, { style: { color: e, fontSize: s } });
|
|
55
67
|
}
|
|
56
|
-
switch (
|
|
68
|
+
switch (o) {
|
|
57
69
|
// isFilled is true
|
|
58
70
|
case r.warning:
|
|
59
|
-
return /* @__PURE__ */ t(
|
|
71
|
+
return /* @__PURE__ */ t(w, { style: { color: e, fontSize: s } });
|
|
60
72
|
case r.error:
|
|
61
|
-
return /* @__PURE__ */ t(
|
|
73
|
+
return /* @__PURE__ */ t(I, { style: { color: e, fontSize: s } });
|
|
62
74
|
case r.success:
|
|
63
|
-
return /* @__PURE__ */ t(
|
|
75
|
+
return /* @__PURE__ */ t(i, { style: { color: e, fontSize: s } });
|
|
64
76
|
case r.progress:
|
|
65
77
|
return /* @__PURE__ */ t(z, { style: { color: e, fontSize: s } });
|
|
66
78
|
case r.removed:
|
|
67
|
-
return /* @__PURE__ */ t(
|
|
79
|
+
return /* @__PURE__ */ t(y, { style: { color: e, fontSize: s } });
|
|
68
80
|
case r.info:
|
|
69
81
|
default:
|
|
70
|
-
return /* @__PURE__ */ t(
|
|
82
|
+
return /* @__PURE__ */ t(u, { style: { color: e, fontSize: s + 8 } });
|
|
71
83
|
}
|
|
72
84
|
};
|
|
73
85
|
export {
|
|
74
|
-
|
|
75
|
-
B as
|
|
86
|
+
G as getBadgeStateIcon,
|
|
87
|
+
B as getIcon,
|
|
88
|
+
E as getIconColor
|
|
76
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobolt/genesis",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "genesis design system",
|
|
5
5
|
"author": "gobolt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -149,13 +149,14 @@
|
|
|
149
149
|
"clsx": "^1.2.1",
|
|
150
150
|
"date-fns": "^3.6.0",
|
|
151
151
|
"dayjs": "^1.11.13",
|
|
152
|
+
"debounce": "^2.2.0",
|
|
152
153
|
"react-error-boundary": "^4.0.11",
|
|
153
154
|
"react-icons": "^5.5.0",
|
|
154
155
|
"react-native-web": "^0.19.13",
|
|
155
156
|
"react-router-dom": "^7.2.0",
|
|
156
157
|
"react-toastify": "^11.0.3",
|
|
157
158
|
"recharts": "^2.15.1",
|
|
158
|
-
"styled-components": "^6.
|
|
159
|
+
"styled-components": "^6.0.0",
|
|
159
160
|
"typescript": "^5.2.2"
|
|
160
161
|
},
|
|
161
162
|
"sideEffects": [
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
type SortOption = {
|
|
3
|
-
value: string;
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
type SortOptions = SortOption[] | null;
|
|
7
|
-
export interface PrimaryTableControlsProps {
|
|
8
|
-
sortOptions: SortOptions;
|
|
9
|
-
onPrimaryChange: (value: string) => void;
|
|
10
|
-
searchByPlaceholder?: string;
|
|
11
|
-
onFilterClick?: () => void;
|
|
12
|
-
onSettingsClick?: () => void;
|
|
13
|
-
}
|
|
14
|
-
declare const PrimaryTableControls: ({ sortOptions, onPrimaryChange, searchByPlaceholder, onFilterClick, onSettingsClick, }: PrimaryTableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export default PrimaryTableControls;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type Groups = {
|
|
2
|
-
[key: string]: string[];
|
|
3
|
-
};
|
|
4
|
-
export interface SecondaryTableControlsProps {
|
|
5
|
-
groups: Groups | null;
|
|
6
|
-
totalRecords: number | null;
|
|
7
|
-
onGroupItemClick: (title: string, item: string) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const SecondaryTableControls: ({ groups, totalRecords, onGroupItemClick, }: SecondaryTableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default SecondaryTableControls;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AppointmentWithSimpleAddress } from '../__mocks__/table-mocks';
|
|
2
|
-
import { ColumnsType } from 'antd/es/table';
|
|
3
|
-
import { SorterResult, TablePaginationType } from '../Table';
|
|
4
|
-
export declare const useTableHook: (hasSortedColumnsMock?: boolean) => {
|
|
5
|
-
onChange: (pagination: TablePaginationType, filters: Record<string, React.Key[]>, sorter: SorterResult<AppointmentWithSimpleAddress> | SorterResult<AppointmentWithSimpleAddress>[]) => void;
|
|
6
|
-
dataSource: AppointmentWithSimpleAddress[];
|
|
7
|
-
columns: ColumnsType<AppointmentWithSimpleAddress>;
|
|
8
|
-
error: Error | null;
|
|
9
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
|
2
|
-
import { SelectionType } from './Table';
|
|
3
|
-
type SorterResult<T> = {
|
|
4
|
-
column?: ColumnsType<T>[number];
|
|
5
|
-
order?: "ascend" | "descend" | null;
|
|
6
|
-
field?: keyof T | string;
|
|
7
|
-
};
|
|
8
|
-
export declare const useTableHook: <T extends Record<string, any>>(columns: ColumnsType<T>, selectionType?: SelectionType) => {
|
|
9
|
-
onChange: (pagination: TablePaginationConfig, filters: Record<string, React.Key[]>, sorter: SorterResult<T> | SorterResult<T>[]) => void;
|
|
10
|
-
rowSelection: {
|
|
11
|
-
type: SelectionType;
|
|
12
|
-
onChange: (selectedRowKeys: React.Key[], selectedRows: T[]) => void;
|
|
13
|
-
getCheckboxProps: (record: T) => {
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
name: any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
selectedRows: T[];
|
|
19
|
-
dataSource: T[];
|
|
20
|
-
columns: ColumnsType<T>;
|
|
21
|
-
error: Error | null;
|
|
22
|
-
};
|
|
23
|
-
export {};
|