@solibo/solibo-ui 2.2.1 → 2.2.4
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/assets/index.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +11 -11
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +251 -238
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +19 -17
- package/dist/components/page-layout/index.cjs +1 -1
- package/dist/components/page-layout/index.js +31 -28
- package/dist/components/panel/index.cjs +1 -1
- package/dist/components/panel/index.js +29 -20
- package/dist/index.d.ts +21 -8
- package/dist/tokens.json +1 -1
- package/package.json +8 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index53.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index53.css');const l=require("react/jsx-runtime"),e=require("classix"),t="_loading_1jrs1_23",r="_spin_1jrs1_1",o="_small_1jrs1_40",_="_large_1jrs1_46",d="_ping_1jrs1_52",g="_fullscreen_1jrs1_78",u="_sticky_1jrs1_86",s={loading:t,default:"_default_1jrs1_29",spin:r,small:o,large:_,ping:d,fullscreen:g,sticky:u},m={fullscreen:s.fullscreen,large:s.large,medium:s.medium,small:s.small},j=({variant:n="default",size:a="medium",sticky:c=!1,...i})=>l.jsx("div",{className:e.cx(s.loading,c&&s.sticky),"data-component":"loading",children:l.jsx("span",{className:e.cx(s.loading,s[n],m[a]),...i})});exports.Loading=j;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { cx as
|
|
3
|
-
import '../../assets/index53.css';const
|
|
4
|
-
loading:
|
|
5
|
-
default: "
|
|
6
|
-
spin:
|
|
7
|
-
small:
|
|
8
|
-
large:
|
|
9
|
-
ping:
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { cx as n } from "classix";
|
|
3
|
+
import '../../assets/index53.css';const c = "_loading_1jrs1_23", o = "_spin_1jrs1_1", t = "_small_1jrs1_40", _ = "_large_1jrs1_46", m = "_ping_1jrs1_52", d = "_fullscreen_1jrs1_78", g = "_sticky_1jrs1_86", s = {
|
|
4
|
+
loading: c,
|
|
5
|
+
default: "_default_1jrs1_29",
|
|
6
|
+
spin: o,
|
|
7
|
+
small: t,
|
|
8
|
+
large: _,
|
|
9
|
+
ping: m,
|
|
10
|
+
fullscreen: d,
|
|
11
|
+
sticky: g
|
|
12
|
+
}, u = {
|
|
13
|
+
fullscreen: s.fullscreen,
|
|
12
14
|
large: s.large,
|
|
13
15
|
medium: s.medium,
|
|
14
16
|
small: s.small
|
|
15
|
-
},
|
|
16
|
-
variant:
|
|
17
|
-
size:
|
|
18
|
-
sticky:
|
|
19
|
-
...
|
|
20
|
-
}) => /* @__PURE__ */ l("div", { className:
|
|
17
|
+
}, j = ({
|
|
18
|
+
variant: e = "default",
|
|
19
|
+
size: a = "medium",
|
|
20
|
+
sticky: r = !1,
|
|
21
|
+
...i
|
|
22
|
+
}) => /* @__PURE__ */ l("div", { className: n(s.loading, r && s.sticky), "data-component": "loading", children: /* @__PURE__ */ l("span", { className: n(s.loading, s[e], u[a]), ...i }) });
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
j as Loading
|
|
23
25
|
};
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const e=require("react/jsx-runtime"),y=require("classix"),p=require("../loading/index.cjs"),w="_layout_1nh7z_1",f="_constrained_1nh7z_7",z="_reading_1nh7z_12",m="_loading_1nh7z_40",n={layout:w,constrained:f,reading:z,"with-sidebar":"_with-sidebar_1nh7z_24","fill-viewport":"_fill-viewport_1nh7z_34",loading:m,"loading-content":"_loading-content_1nh7z_48","without-padding":"_without-padding_1nh7z_87"},b=({"aria-busy":l,children:s,className:d,contentLayout:t="default",contentMaxWidth:i,fillViewport:r=!1,loading:a=!1,loadingLabel:_="Loading",padding:c="default",sidebar:o,style:u,...g})=>{const h={...u,"--page-content-max-width":i};return e.jsxs("main",{"aria-busy":l??(a||void 0),className:y(n.layout,!!o&&n["with-sidebar"],r&&n["fill-viewport"],i&&t==="default"&&n.constrained,t==="reading"&&n.reading,c==="none"&&n["without-padding"],a&&n.loading,d),style:h,...g,"data-component":"pagelayout",children:[o,a?e.jsx("div",{className:n["loading-content"],role:"status","aria-label":_,children:e.jsx(p.Loading,{size:"large"})}):s]})};exports.PageLayout=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import f from "classix";
|
|
3
|
+
import { Loading as m } from "../loading/index.js";
|
|
4
|
+
import '../../assets/index12.css';const y = "_layout_1nh7z_1", w = "_constrained_1nh7z_7", z = "_reading_1nh7z_12", b = "_loading_1nh7z_40", a = {
|
|
5
|
+
layout: y,
|
|
6
|
+
constrained: w,
|
|
7
|
+
reading: z,
|
|
8
|
+
"with-sidebar": "_with-sidebar_1nh7z_24",
|
|
9
|
+
"fill-viewport": "_fill-viewport_1nh7z_34",
|
|
10
|
+
loading: b,
|
|
11
|
+
"loading-content": "_loading-content_1nh7z_48",
|
|
12
|
+
"without-padding": "_without-padding_1nh7z_87"
|
|
13
|
+
}, L = ({
|
|
14
|
+
"aria-busy": l,
|
|
15
|
+
children: d,
|
|
16
|
+
className: r,
|
|
17
|
+
contentLayout: t = "default",
|
|
18
|
+
contentMaxWidth: o,
|
|
19
|
+
fillViewport: s = !1,
|
|
20
|
+
loading: n = !1,
|
|
21
|
+
loadingLabel: _ = "Loading",
|
|
22
|
+
padding: c = "default",
|
|
23
|
+
sidebar: i,
|
|
24
|
+
style: g,
|
|
25
|
+
...h
|
|
23
26
|
}) => {
|
|
24
27
|
const u = {
|
|
25
|
-
...
|
|
26
|
-
"--page-content-max-width":
|
|
28
|
+
...g,
|
|
29
|
+
"--page-content-max-width": o
|
|
27
30
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
return /* @__PURE__ */ p("main", { "aria-busy": l ?? (n || void 0), className: f(a.layout, !!i && a["with-sidebar"], s && a["fill-viewport"], o && t === "default" && a.constrained, t === "reading" && a.reading, c === "none" && a["without-padding"], n && a.loading, r), style: u, ...h, "data-component": "pagelayout", children: [
|
|
32
|
+
i,
|
|
33
|
+
n ? /* @__PURE__ */ e("div", { className: a["loading-content"], role: "status", "aria-label": _, children: /* @__PURE__ */ e(m, { size: "large" }) }) : d
|
|
31
34
|
] });
|
|
32
35
|
};
|
|
33
36
|
export {
|
|
34
|
-
|
|
37
|
+
L as PageLayout
|
|
35
38
|
};
|
|
36
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const n=require("react/jsx-runtime"),d=require("classix"),p=require("react"),f=require("../loading/index.cjs"),g="_panel_1c69h_1",h="_none_1c69h_15",b="_page_1c69h_19",m="_scrollable_1c69h_27",x="_surface_1c69h_32",y="_loading_1c69h_36",e={panel:g,default:"_default_1c69h_11",none:h,page:b,scrollable:m,surface:x,loading:y},j=({"aria-busy":l,as:c="div",children:s,className:o,loading:a=!1,loadingLabel:t="Loading",padding:r="default",scroll:_="hidden",surface:i=!1,...u})=>p.createElement(c,{...u,"aria-busy":a||l,children:a?n.jsx("div",{role:"status","aria-label":t,children:n.jsx(f.Loading,{})}):s,className:d(e.panel,e[r],_==="auto"&&e.scrollable,i&&e.surface,a&&e.loading,o),"data-component":"panel"});exports.Panel=j;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import p from "classix";
|
|
3
|
+
import { createElement as f } from "react";
|
|
4
|
+
import { Loading as m } from "../loading/index.js";
|
|
5
|
+
import '../../assets/index11.css';const u = "_panel_1c69h_1", h = "_none_1c69h_15", b = "_page_1c69h_19", g = "_scrollable_1c69h_27", x = "_surface_1c69h_32", y = "_loading_1c69h_36", a = {
|
|
6
|
+
panel: u,
|
|
7
|
+
default: "_default_1c69h_11",
|
|
8
|
+
none: h,
|
|
9
|
+
page: b,
|
|
10
|
+
scrollable: g,
|
|
11
|
+
surface: x,
|
|
12
|
+
loading: y
|
|
13
|
+
}, N = ({
|
|
14
|
+
"aria-busy": o,
|
|
15
|
+
as: n = "div",
|
|
16
|
+
children: c,
|
|
17
|
+
className: s,
|
|
18
|
+
loading: e = !1,
|
|
19
|
+
loadingLabel: r = "Loading",
|
|
20
|
+
padding: t = "default",
|
|
21
|
+
scroll: _ = "hidden",
|
|
22
|
+
surface: i = !1,
|
|
23
|
+
...d
|
|
24
|
+
}) => f(n, {
|
|
25
|
+
...d,
|
|
26
|
+
"aria-busy": e || o,
|
|
27
|
+
children: e ? /* @__PURE__ */ l("div", { role: "status", "aria-label": r, children: /* @__PURE__ */ l(m, {}) }) : c,
|
|
28
|
+
className: p(a.panel, a[t], _ === "auto" && a.scrollable, i && a.surface, e && a.loading, s),
|
|
20
29
|
"data-component": "panel"
|
|
21
30
|
});
|
|
22
31
|
export {
|
|
23
|
-
|
|
32
|
+
N as Panel
|
|
24
33
|
};
|
|
25
34
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -13,12 +13,15 @@ import { FocusEventHandler } from 'react';
|
|
|
13
13
|
import { ImgHTMLAttributes } from 'react';
|
|
14
14
|
import { InputEventHandler } from 'react';
|
|
15
15
|
import { JSX } from 'react/jsx-runtime';
|
|
16
|
+
import { JSXElementConstructor } from 'react';
|
|
16
17
|
import { Key } from 'react';
|
|
17
18
|
import { KeyboardEventHandler } from 'react';
|
|
18
19
|
import { MouseEventHandler } from 'react';
|
|
19
20
|
import { PointerEventHandler } from 'react';
|
|
21
|
+
import { ReactElement } from 'react';
|
|
20
22
|
import { ReactEventHandler } from 'react';
|
|
21
23
|
import { ReactNode } from 'react';
|
|
24
|
+
import { ReactPortal } from 'react';
|
|
22
25
|
import { Ref } from 'react';
|
|
23
26
|
import { SubmitEventHandler } from 'react';
|
|
24
27
|
import { ToggleEventHandler } from 'react';
|
|
@@ -186,25 +189,27 @@ export declare type ControlsProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
186
189
|
variant?: keyof typeof variants_5;
|
|
187
190
|
};
|
|
188
191
|
|
|
189
|
-
export declare const Croppable: ({ cancelLabel, children, fill, height, image,
|
|
192
|
+
export declare const Croppable: ({ cancelLabel, children, deleteLabel, fill, height, image, isDeleting, isSaving, onCroppableChange, onDelete, onFileChange, onImageChange, onSave, onTransformChange, saveLabel, standalone, transform, uploadLabel, }: CroppableProps) => JSX.Element;
|
|
190
193
|
|
|
191
194
|
declare type CroppableProps = {
|
|
192
195
|
cancelLabel?: string;
|
|
193
196
|
children?: default_2.ReactNode;
|
|
197
|
+
deleteLabel?: string;
|
|
194
198
|
fill?: 'width' | 'height' | 'none';
|
|
195
199
|
height?: number;
|
|
196
200
|
image?: string | null;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
uploadLabel: string;
|
|
201
|
+
isDeleting?: boolean;
|
|
202
|
+
isSaving?: boolean;
|
|
200
203
|
onCroppableChange?: (rect: DOMRect) => void;
|
|
201
204
|
onDelete?: () => void;
|
|
202
205
|
onFileChange?: (file: File | null) => void;
|
|
203
206
|
onImageChange?: (file: File | null) => void;
|
|
204
207
|
onSave?: () => void;
|
|
205
208
|
onTransformChange?: (transform: CroppableTransform) => void;
|
|
209
|
+
saveLabel?: string;
|
|
206
210
|
standalone?: boolean;
|
|
207
211
|
transform?: CroppableTransform;
|
|
212
|
+
uploadLabel: string;
|
|
208
213
|
};
|
|
209
214
|
|
|
210
215
|
declare type CroppableTransform = {
|
|
@@ -859,18 +864,23 @@ declare type ObjectProps = Omit<ComponentPropsWithoutRef<'object'>, 'data' | 'ty
|
|
|
859
864
|
url: string;
|
|
860
865
|
};
|
|
861
866
|
|
|
862
|
-
export declare const PageLayout: ({ "aria-busy": ariaBusy, children, className, contentLayout, contentMaxWidth, fillViewport, loading, padding, sidebar, style, ...props }: PageLayoutProps) => JSX.Element;
|
|
867
|
+
export declare const PageLayout: ({ "aria-busy": ariaBusy, children, className, contentLayout, contentMaxWidth, fillViewport, loading, loadingLabel, padding, sidebar, style, ...props }: PageLayoutProps) => JSX.Element;
|
|
863
868
|
|
|
864
869
|
export declare type PageLayoutProps = React.ComponentPropsWithoutRef<'main'> & {
|
|
865
870
|
contentMaxWidth?: string;
|
|
866
871
|
contentLayout?: 'default' | 'reading';
|
|
867
872
|
fillViewport?: boolean;
|
|
873
|
+
/** Replace page content with a centered indicator while keeping the sidebar visible. */
|
|
868
874
|
loading?: boolean;
|
|
875
|
+
/** Accessible, localizable name for the loading indicator. */
|
|
876
|
+
loadingLabel?: string;
|
|
869
877
|
padding?: 'default' | 'none';
|
|
870
878
|
sidebar?: React.ReactNode;
|
|
871
879
|
};
|
|
872
880
|
|
|
873
|
-
export declare const Panel: ({ as, className, padding, scroll, surface, ...props }: PanelProps) => DetailedReactHTMLElement< {
|
|
881
|
+
export declare const Panel: ({ "aria-busy": ariaBusy, as, children, className, loading, loadingLabel, padding, scroll, surface, ...props }: PanelProps) => DetailedReactHTMLElement< {
|
|
882
|
+
'aria-busy': (boolean | "true" | "false") | undefined;
|
|
883
|
+
children: string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null | undefined;
|
|
874
884
|
className: string;
|
|
875
885
|
ref?: Ref<HTMLElement> | undefined;
|
|
876
886
|
key?: Key | null | undefined;
|
|
@@ -933,7 +943,6 @@ part?: string | undefined;
|
|
|
933
943
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
934
944
|
"aria-braillelabel"?: string | undefined;
|
|
935
945
|
"aria-brailleroledescription"?: string | undefined;
|
|
936
|
-
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
937
946
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
938
947
|
"aria-colcount"?: number | undefined;
|
|
939
948
|
"aria-colindex"?: number | undefined;
|
|
@@ -981,7 +990,6 @@ part?: string | undefined;
|
|
|
981
990
|
"aria-valuemin"?: number | undefined;
|
|
982
991
|
"aria-valuenow"?: number | undefined;
|
|
983
992
|
"aria-valuetext"?: string | undefined;
|
|
984
|
-
children?: ReactNode | undefined;
|
|
985
993
|
dangerouslySetInnerHTML?: {
|
|
986
994
|
__html: string | TrustedHTML;
|
|
987
995
|
} | undefined;
|
|
@@ -1157,6 +1165,10 @@ onTransitionStartCapture?: TransitionEventHandler<HTMLElement> | undefined;
|
|
|
1157
1165
|
|
|
1158
1166
|
export declare type PanelProps = React.ComponentPropsWithRef<'article'> & {
|
|
1159
1167
|
as?: 'article' | 'div' | 'section';
|
|
1168
|
+
/** Replace the panel contents with a centered loading indicator. */
|
|
1169
|
+
loading?: boolean;
|
|
1170
|
+
/** Accessible, localizable name for the loading indicator. */
|
|
1171
|
+
loadingLabel?: string;
|
|
1160
1172
|
padding?: 'default' | 'none' | 'page';
|
|
1161
1173
|
scroll?: 'auto' | 'hidden';
|
|
1162
1174
|
surface?: boolean;
|
|
@@ -1275,6 +1287,7 @@ declare const sizes_2: {
|
|
|
1275
1287
|
};
|
|
1276
1288
|
|
|
1277
1289
|
declare const sizes_3: {
|
|
1290
|
+
fullscreen: string;
|
|
1278
1291
|
large: string;
|
|
1279
1292
|
medium: string;
|
|
1280
1293
|
small: string;
|
package/dist/tokens.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solibo/solibo-ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"./dist/index.js",
|
|
@@ -10,22 +10,25 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "pnpm run tokens:build && vite build --config vite.config.ts --watch",
|
|
12
12
|
"build": "pnpm run tokens:build && tsc -b && vite build --config vite.config.ts && pnpm run tokens:dist",
|
|
13
|
+
"check": "pnpm lint && pnpm stories:audit && pnpm test:ci && pnpm test:scripts && pnpm build && pnpm storybook:build",
|
|
13
14
|
"coverage": "vitest run --config vite.config.ts --coverage",
|
|
14
15
|
"format": "prettier --check .",
|
|
15
16
|
"format:fix": "prettier --write .",
|
|
16
17
|
"icons:build": "node scripts/icons.mjs",
|
|
17
|
-
"lint": "
|
|
18
|
-
"lint:
|
|
18
|
+
"lint": "pnpm lint:js && pnpm stylelint",
|
|
19
|
+
"lint:js": "eslint .",
|
|
20
|
+
"lint:fix": "eslint . --fix && pnpm stylelint:fix",
|
|
19
21
|
"open": "node scripts/open-storybook.mjs",
|
|
20
22
|
"prepare": "git config core.hooksPath .githooks || true",
|
|
21
23
|
"prepublishOnly": "vitest run --config vite.config.ts && pnpm run build",
|
|
22
24
|
"storybook": "storybook dev -p 6006",
|
|
23
25
|
"storybook:build": "storybook build",
|
|
24
26
|
"stories:audit": "tsc --project tsconfig.stories.json",
|
|
25
|
-
"stylelint": "stylelint **/*.css",
|
|
26
|
-
"stylelint:fix": "stylelint **/*.css --fix",
|
|
27
|
+
"stylelint": "stylelint \"**/*.css\"",
|
|
28
|
+
"stylelint:fix": "stylelint \"**/*.css\" --fix",
|
|
27
29
|
"test": "vitest --config vite.config.ts --ui --coverage.enabled=true",
|
|
28
30
|
"test:ci": "vitest run --config vite.config.ts",
|
|
31
|
+
"test:scripts": "node --test scripts/*.tests.mjs",
|
|
29
32
|
"tokens:audit": "node scripts/design-tokens.mjs audit",
|
|
30
33
|
"tokens:build": "node scripts/design-tokens.mjs build",
|
|
31
34
|
"tokens:dist": "node scripts/design-tokens.mjs dist",
|