@sito/dashboard 0.0.66 → 0.0.67
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/README.md +3 -2
- package/dist/{Chip-JDQqzO9I.js → Chip-C5ogKbFn.js} +4 -4
- package/dist/{Chip-a2z-338_.cjs → Chip-D17UJHW6.cjs} +1 -1
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +1 -1
- package/dist/{FileInput-5tMOO7mb.cjs → FileInput-Ch-GCxrS.cjs} +1 -1
- package/dist/{FileInput-B--eBQVa.js → FileInput-DCR_Pyqe.js} +1 -1
- package/dist/{Filters-BivtNVS3.js → Filters-DL5jd8ps.js} +30 -16
- package/dist/{Filters-C5XEbF3V.cjs → Filters-Dyee8QYH.cjs} +1 -1
- package/dist/Form.cjs +1 -1
- package/dist/Form.js +2 -2
- package/dist/SvgIcons.cjs +1 -1
- package/dist/SvgIcons.js +7 -6
- package/dist/Table-BtZGG0d7.js +1056 -0
- package/dist/Table-DjIhOMXQ.cjs +1 -0
- package/dist/Table.cjs +1 -1
- package/dist/Table.css +1 -1
- package/dist/Table.js +1 -1
- package/dist/{TextInput-BLfTozZ9.js → TextInput-BqW5YX-3.js} +1 -1
- package/dist/{TextInput-Bn8zsDnU.cjs → TextInput-CY1fh4mf.cjs} +1 -1
- package/dist/components/Actions/Action.d.ts +18 -0
- package/dist/components/Actions/Actions.d.ts +14 -0
- package/dist/components/Actions/Actions.stories.d.ts +20 -0
- package/dist/components/Actions/Actions.test.d.ts +1 -0
- package/dist/components/Actions/ActionsDropdown.d.ts +10 -0
- package/dist/components/Actions/ActionsDropdown.stories.d.ts +17 -0
- package/dist/components/Actions/ActionsDropdown.test.d.ts +1 -0
- package/dist/components/Actions/index.d.ts +4 -0
- package/dist/components/Actions/types.d.ts +17 -0
- package/dist/components/Form/TextInput/TextInput.stories.d.ts +1 -0
- package/dist/components/SvgIcons/Ellipsis.d.ts +7 -0
- package/dist/components/SvgIcons/index.d.ts +1 -0
- package/dist/components/Table/Table.stories.d.ts +1 -0
- package/dist/components/Table/types.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +69 -65
- package/dist/setupTests.d.ts +0 -0
- package/package.json +5 -2
- package/dist/Table-CH9HYQ2I.js +0 -946
- package/dist/Table-CWss4TW5.cjs +0 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## Highlights
|
|
6
6
|
|
|
7
7
|
- `Table` component with sorting, filtering, pagination, row selection, bulk actions, and expandable rows.
|
|
8
|
-
- Reusable UI pieces: `Badge`, `Button`, `Chip`, `Dropdown`, `IconButton`, `Loading`, `Tooltip`, and `
|
|
8
|
+
- Reusable UI pieces: `Badge`, `Button`, `Chip`, `Dropdown`, `IconButton`, `Loading`, `Tooltip`, `SvgIcons`, `Actions`, and `ActionsDropdown`.
|
|
9
9
|
- Form controls: `TextInput`, `SelectInput`, `AutocompleteInput`, `CheckInput`, and `FileInput`.
|
|
10
10
|
- Built-in providers for translations and table state (`TranslationProvider`, `TableOptionsProvider`).
|
|
11
11
|
|
|
@@ -77,6 +77,7 @@ export function UsersTable() {
|
|
|
77
77
|
tooltip: `View ${row.name}`,
|
|
78
78
|
icon: <span>View</span>,
|
|
79
79
|
onClick: () => console.log("View", row),
|
|
80
|
+
sticky: true, // always visible; omit to place in the ellipsis dropdown
|
|
80
81
|
},
|
|
81
82
|
]}
|
|
82
83
|
/>
|
|
@@ -113,7 +114,7 @@ export function UsersTable() {
|
|
|
113
114
|
|
|
114
115
|
Main package exports include:
|
|
115
116
|
|
|
116
|
-
- Components: `Badge`, `Button`, `Chip`, `Dropdown`, `Form`, `IconButton`, `Loading`, `SvgIcons`, `Table`, `Tooltip`.
|
|
117
|
+
- Components: `Action`, `Actions`, `ActionsDropdown`, `Badge`, `Button`, `Chip`, `Dropdown`, `Form`, `IconButton`, `Loading`, `SvgIcons`, `Table`, `Tooltip`.
|
|
117
118
|
- Providers: `FiltersProvider`, `TableOptionsProvider`, `TranslationProvider` and related hooks/types.
|
|
118
119
|
- Utilities and models: `FilterTypes`, `SortOrder`, `BaseDto`, and query/filter helpers from `lib`.
|
|
119
120
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./Chip.css";
|
|
2
2
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { C as p } from "./Close-rKC9AcNX.js";
|
|
4
|
+
import { I as d } from "./IconButton-BpsTEj0z.js";
|
|
5
5
|
function N(a) {
|
|
6
6
|
const {
|
|
7
7
|
text: s,
|
|
@@ -21,9 +21,9 @@ function N(a) {
|
|
|
21
21
|
/* @__PURE__ */ t("span", { className: `chip-main-text ${m}`, children: s }),
|
|
22
22
|
i,
|
|
23
23
|
e ? /* @__PURE__ */ t(
|
|
24
|
-
|
|
24
|
+
d,
|
|
25
25
|
{
|
|
26
|
-
icon: n ?? /* @__PURE__ */ t(
|
|
26
|
+
icon: n ?? /* @__PURE__ */ t(p, {}),
|
|
27
27
|
className: `chip-delete-button ${l}`,
|
|
28
28
|
onClick: e
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=require("./Chip.css");const e=require("react/jsx-runtime"),u=require("./
|
|
1
|
+
var x=require("./Chip.css");const e=require("react/jsx-runtime"),u=require("./Close-O9P7wJGf.cjs"),m=require("./IconButton-CVnmT2E9.cjs");function h(t){const{text:n,onDelete:s,children:i,icon:c,variant:a="default",iconClassName:l="",className:o="",textClassName:r=""}=t;return e.jsxs("div",{className:`chip-main ${a} ${s?"deletable":""} ${o}`,children:[e.jsx("span",{className:`chip-main-text ${r}`,children:n}),i,s?e.jsx(m.IconButton,{icon:c??e.jsx(u.Close,{}),className:`chip-delete-button ${l}`,onClick:s}):null]})}exports.Chip=h;
|
package/dist/Chip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Chip-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Chip-D17UJHW6.cjs");exports.Chip=e.Chip;
|
package/dist/Chip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var D=require("./FileInput.css");const e=require("react/jsx-runtime"),n=require("react"),C=require("./Tooltip-BSKAgRkc.cjs"),T=require("./File-_Hjw2d3F.cjs"),w=require("./Chip-
|
|
1
|
+
var D=require("./FileInput.css");const e=require("react/jsx-runtime"),n=require("react"),C=require("./Tooltip-BSKAgRkc.cjs"),T=require("./File-_Hjw2d3F.cjs"),w=require("./Chip-D17UJHW6.cjs"),y=require("./IconButton-CVnmT2E9.cjs"),R=require("./Close-O9P7wJGf.cjs");function j(s,i=25){if(s.length<=i)return s;const a=s.lastIndexOf(".");if(a===-1)return s.slice(0,i-3)+"...";const h=s.slice(0,a),r=s.slice(a),p=i-r.length-3;return h.slice(0,p)+"..."+r}const B=n.forwardRef(function(s,i){const{children:a,label:h,containerClassName:r="",inputClassName:p="",labelClassName:N="",helperText:m="",helperTextClassName:g="",iconClassName:b="",multiple:q=!1,onChange:x,onClear:o,...d}=s,[t,f]=n.useState([]),k=n.useCallback(l=>{if(l.target.files){const c=Array.from(l.target.files);f(u=>[...u,...c])}x?.(l)},[x]),v=n.useCallback(l=>{f(c=>{const u=c.filter((A,$)=>$!==l);return u.length===0&&o?.(),u})},[o]),F=n.useCallback(()=>{f([]),o?.()},[o]),I=n.useCallback(l=>{l.currentTarget.value=""},[]);return e.jsxs("div",{className:`file-input-container ${r}`,children:[t.length===0&&e.jsxs("label",{htmlFor:d.name,className:`${N}`,children:[h,e.jsx("input",{type:"file",ref:i,multiple:q,onClick:I,onChange:k,className:`file-input ${p}`,...d}),d.required?" *":""]}),t.length>1&&e.jsx("ul",{className:"file-preview-list",children:t.map((l,c)=>e.jsx("li",{children:e.jsx(C.Tooltip,{content:l.name,children:e.jsx(w.Chip,{text:j(l.name,25),onDelete:()=>v(c)})})},`${l.name}-${l.lastModified}`))}),t.length===1&&e.jsxs("div",{className:"file-preview",children:[e.jsx(T.File,{className:`file-icon ${b}`}),e.jsx(C.Tooltip,{content:t[0]?.name??"",children:e.jsx("span",{className:"file-preview-name",children:j(t[0]?.name??"",25)})}),e.jsx(y.IconButton,{icon:e.jsx(R.Close,{}),onClick:F,type:"button"})]}),a,!!m&&e.jsx("p",{className:`file-input-helper-text ${g}`,children:m})]})});exports.FileInput=B;
|
|
@@ -3,7 +3,7 @@ import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as j, useState as R, useCallback as m } from "react";
|
|
4
4
|
import { T as g } from "./Tooltip-B4E-FRwY.js";
|
|
5
5
|
import { F as q } from "./File-BuJndWMv.js";
|
|
6
|
-
import { C as A } from "./Chip-
|
|
6
|
+
import { C as A } from "./Chip-C5ogKbFn.js";
|
|
7
7
|
import { I as B } from "./IconButton-BpsTEj0z.js";
|
|
8
8
|
import { C as D } from "./Close-rKC9AcNX.js";
|
|
9
9
|
function x(t, s = 25) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
function
|
|
3
|
-
const { className:
|
|
2
|
+
function l(r) {
|
|
3
|
+
const { className: n = "" } = r;
|
|
4
4
|
return /* @__PURE__ */ s(
|
|
5
5
|
"svg",
|
|
6
6
|
{
|
|
7
|
-
className:
|
|
7
|
+
className: n,
|
|
8
8
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9
9
|
viewBox: "0 0 512 512",
|
|
10
10
|
fill: "currentColor",
|
|
@@ -12,12 +12,12 @@ function t(r) {
|
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const { className:
|
|
15
|
+
function c(r) {
|
|
16
|
+
const { className: n = "" } = r;
|
|
17
17
|
return /* @__PURE__ */ s(
|
|
18
18
|
"svg",
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
20
|
+
className: n,
|
|
21
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
22
|
viewBox: "0 0 320 512",
|
|
23
23
|
fill: "currentColor",
|
|
@@ -26,11 +26,11 @@ function l(r) {
|
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
function o(r) {
|
|
29
|
-
const { className:
|
|
29
|
+
const { className: n = "" } = r;
|
|
30
30
|
return /* @__PURE__ */ s(
|
|
31
31
|
"svg",
|
|
32
32
|
{
|
|
33
|
-
className:
|
|
33
|
+
className: n,
|
|
34
34
|
xmlns: "http://www.w3.org/2000/svg",
|
|
35
35
|
viewBox: "0 0 320 512",
|
|
36
36
|
fill: "currentColor",
|
|
@@ -39,11 +39,11 @@ function o(r) {
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
function e(r) {
|
|
42
|
-
const { className:
|
|
42
|
+
const { className: n = "" } = r;
|
|
43
43
|
return /* @__PURE__ */ s(
|
|
44
44
|
"svg",
|
|
45
45
|
{
|
|
46
|
-
className:
|
|
46
|
+
className: n,
|
|
47
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48
48
|
viewBox: "0 0 512 512",
|
|
49
49
|
fill: "currentColor",
|
|
@@ -51,14 +51,28 @@ function e(r) {
|
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
const { className:
|
|
56
|
-
return /* @__PURE__ */ s(
|
|
54
|
+
function a(r) {
|
|
55
|
+
const { className: n = "" } = r;
|
|
56
|
+
return /* @__PURE__ */ s(
|
|
57
|
+
"svg",
|
|
58
|
+
{
|
|
59
|
+
className: n,
|
|
60
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
61
|
+
viewBox: "0 0 640 640",
|
|
62
|
+
fill: "currentColor",
|
|
63
|
+
children: /* @__PURE__ */ s("path", { d: "M320 208C289.1 208 264 182.9 264 152C264 121.1 289.1 96 320 96C350.9 96 376 121.1 376 152C376 182.9 350.9 208 320 208zM320 432C350.9 432 376 457.1 376 488C376 518.9 350.9 544 320 544C289.1 544 264 518.9 264 488C264 457.1 289.1 432 320 432zM376 320C376 350.9 350.9 376 320 376C289.1 376 264 350.9 264 320C264 289.1 289.1 264 320 264C350.9 264 376 289.1 376 320z" })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
const i = (r) => {
|
|
68
|
+
const { className: n = "" } = r;
|
|
69
|
+
return /* @__PURE__ */ s("svg", { className: n, viewBox: "0 0 16 16", children: /* @__PURE__ */ s("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
|
|
57
70
|
};
|
|
58
71
|
export {
|
|
59
|
-
|
|
60
|
-
a as
|
|
61
|
-
|
|
72
|
+
l as C,
|
|
73
|
+
a as E,
|
|
74
|
+
i as F,
|
|
75
|
+
c as a,
|
|
62
76
|
o as b,
|
|
63
77
|
e as c
|
|
64
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime");function t(n){const{className:r=""}=n;return s.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:s.jsx("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})}function
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime");function t(n){const{className:r=""}=n;return s.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:s.jsx("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})}function l(n){const{className:r=""}=n;return s.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",fill:"currentColor",children:s.jsx("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})})}function e(n){const{className:r=""}=n;return s.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",fill:"currentColor",children:s.jsx("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})})}function o(n){const{className:r=""}=n;return s.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:s.jsx("path",{d:"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"})})}function c(n){const{className:r=""}=n;return s.jsx("svg",{className:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",fill:"currentColor",children:s.jsx("path",{d:"M320 208C289.1 208 264 182.9 264 152C264 121.1 289.1 96 320 96C350.9 96 376 121.1 376 152C376 182.9 350.9 208 320 208zM320 432C350.9 432 376 457.1 376 488C376 518.9 350.9 544 320 544C289.1 544 264 518.9 264 488C264 457.1 289.1 432 320 432zM376 320C376 350.9 350.9 376 320 376C289.1 376 264 350.9 264 320C264 289.1 289.1 264 320 264C350.9 264 376 289.1 376 320z"})})}const i=n=>{const{className:r=""}=n;return s.jsx("svg",{className:r,viewBox:"0 0 16 16",children:s.jsx("path",{d:"M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z"})})};exports.ChevronDown=t;exports.ChevronLeft=l;exports.ChevronRight=e;exports.ChevronUp=o;exports.Ellipsis=c;exports.Filters=i;
|
package/dist/Form.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TextInput-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TextInput-CY1fh4mf.cjs"),t=require("./FileInput-Ch-GCxrS.cjs");exports.AutocompleteInput=e.AutocompleteInput;exports.CheckInput=e.CheckInput;exports.SelectInput=e.SelectInput;exports.State=e.State;exports.TextInput=e.TextInput;exports.helperTextStateClassName=e.helperTextStateClassName;exports.inputStateClassName=e.inputStateClassName;exports.labelStateClassName=e.labelStateClassName;exports.FileInput=t.FileInput;
|
package/dist/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, C as s, S as l, a as p, T as u, h as m, i as n, l as o } from "./TextInput-
|
|
2
|
-
import { F as r } from "./FileInput-
|
|
1
|
+
import { A as e, C as s, S as l, a as p, T as u, h as m, i as n, l as o } from "./TextInput-BqW5YX-3.js";
|
|
2
|
+
import { F as r } from "./FileInput-DCR_Pyqe.js";
|
|
3
3
|
export {
|
|
4
4
|
e as AutocompleteInput,
|
|
5
5
|
s as CheckInput,
|
package/dist/SvgIcons.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Filters-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Filters-Dyee8QYH.cjs"),r=require("./Close-O9P7wJGf.cjs"),o=require("./File-_Hjw2d3F.cjs");exports.ChevronDown=e.ChevronDown;exports.ChevronLeft=e.ChevronLeft;exports.ChevronRight=e.ChevronRight;exports.ChevronUp=e.ChevronUp;exports.Ellipsis=e.Ellipsis;exports.Filters=e.Filters;exports.Close=r.Close;exports.File=o.File;
|
package/dist/SvgIcons.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { C as
|
|
1
|
+
import { C as e, a as r, b as a, c as C, E as t, F as h } from "./Filters-DL5jd8ps.js";
|
|
2
|
+
import { C as l } from "./Close-rKC9AcNX.js";
|
|
3
3
|
import { F as p } from "./File-BuJndWMv.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
e as ChevronDown,
|
|
6
|
+
r as ChevronLeft,
|
|
7
7
|
a as ChevronRight,
|
|
8
8
|
C as ChevronUp,
|
|
9
|
-
|
|
9
|
+
l as Close,
|
|
10
|
+
t as Ellipsis,
|
|
10
11
|
p as File,
|
|
11
|
-
|
|
12
|
+
h as Filters
|
|
12
13
|
};
|