@solibo/solibo-ui 2.2.2 → 2.2.5
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/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +251 -238
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +192 -153
- 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 +34 -9
- package/dist/tokens.json +1 -1
- package/package.json +8 -5
|
@@ -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 = {
|
|
@@ -238,7 +243,7 @@ export declare const Divider: ({ className, ...props }: DividerProps) => JSX.Ele
|
|
|
238
243
|
|
|
239
244
|
export declare type DividerProps = React.ComponentPropsWithoutRef<'hr'>;
|
|
240
245
|
|
|
241
|
-
export declare const Dropdown: ({ children: selectElement, className, combobox, createOption, emptyLabel, label, renderOption, searchPlaceholder, selectedItems, variant, ...props }: DropdownProps) => JSX.Element;
|
|
246
|
+
export declare const Dropdown: ({ children: selectElement, className, combobox, createOption, emptyLabel, errorLabel, onRetry, retryLabel, label, filterOptions, hasNextPage, loading, loadMoreLabel, onLoadMore, onOpenChange, onSearchChange, searchValue, renderOption, searchPlaceholder, selectedItems, variant, ...props }: DropdownProps) => JSX.Element;
|
|
242
247
|
|
|
243
248
|
export declare type DropdownCreateOption = {
|
|
244
249
|
isValid: (value: string) => boolean;
|
|
@@ -262,7 +267,19 @@ declare type DropdownProps = Omit<default_2.ComponentPropsWithoutRef<'div'>, 'ch
|
|
|
262
267
|
combobox?: boolean;
|
|
263
268
|
createOption?: DropdownCreateOption;
|
|
264
269
|
emptyLabel?: string;
|
|
270
|
+
errorLabel?: string;
|
|
271
|
+
onRetry?: () => void;
|
|
272
|
+
retryLabel?: string;
|
|
265
273
|
label?: string;
|
|
274
|
+
/** Disable local matching when the supplied options are already server-filtered. */
|
|
275
|
+
filterOptions?: boolean;
|
|
276
|
+
hasNextPage?: boolean;
|
|
277
|
+
loading?: boolean;
|
|
278
|
+
loadMoreLabel?: string;
|
|
279
|
+
onLoadMore?: () => void;
|
|
280
|
+
onOpenChange?: (open: boolean) => void;
|
|
281
|
+
onSearchChange?: (value: string) => void;
|
|
282
|
+
searchValue?: string;
|
|
266
283
|
renderOption?: (option: DropdownRenderOption) => default_2.ReactNode;
|
|
267
284
|
searchPlaceholder?: string;
|
|
268
285
|
selectedItems?: default_2.ReactNode;
|
|
@@ -859,18 +876,23 @@ declare type ObjectProps = Omit<ComponentPropsWithoutRef<'object'>, 'data' | 'ty
|
|
|
859
876
|
url: string;
|
|
860
877
|
};
|
|
861
878
|
|
|
862
|
-
export declare const PageLayout: ({ "aria-busy": ariaBusy, children, className, contentLayout, contentMaxWidth, fillViewport, loading, padding, sidebar, style, ...props }: PageLayoutProps) => JSX.Element;
|
|
879
|
+
export declare const PageLayout: ({ "aria-busy": ariaBusy, children, className, contentLayout, contentMaxWidth, fillViewport, loading, loadingLabel, padding, sidebar, style, ...props }: PageLayoutProps) => JSX.Element;
|
|
863
880
|
|
|
864
881
|
export declare type PageLayoutProps = React.ComponentPropsWithoutRef<'main'> & {
|
|
865
882
|
contentMaxWidth?: string;
|
|
866
883
|
contentLayout?: 'default' | 'reading';
|
|
867
884
|
fillViewport?: boolean;
|
|
885
|
+
/** Replace page content with a centered indicator while keeping the sidebar visible. */
|
|
868
886
|
loading?: boolean;
|
|
887
|
+
/** Accessible, localizable name for the loading indicator. */
|
|
888
|
+
loadingLabel?: string;
|
|
869
889
|
padding?: 'default' | 'none';
|
|
870
890
|
sidebar?: React.ReactNode;
|
|
871
891
|
};
|
|
872
892
|
|
|
873
|
-
export declare const Panel: ({ as, className, padding, scroll, surface, ...props }: PanelProps) => DetailedReactHTMLElement< {
|
|
893
|
+
export declare const Panel: ({ "aria-busy": ariaBusy, as, children, className, loading, loadingLabel, padding, scroll, surface, ...props }: PanelProps) => DetailedReactHTMLElement< {
|
|
894
|
+
'aria-busy': (boolean | "true" | "false") | undefined;
|
|
895
|
+
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
896
|
className: string;
|
|
875
897
|
ref?: Ref<HTMLElement> | undefined;
|
|
876
898
|
key?: Key | null | undefined;
|
|
@@ -933,7 +955,6 @@ part?: string | undefined;
|
|
|
933
955
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
934
956
|
"aria-braillelabel"?: string | undefined;
|
|
935
957
|
"aria-brailleroledescription"?: string | undefined;
|
|
936
|
-
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
937
958
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
938
959
|
"aria-colcount"?: number | undefined;
|
|
939
960
|
"aria-colindex"?: number | undefined;
|
|
@@ -981,7 +1002,6 @@ part?: string | undefined;
|
|
|
981
1002
|
"aria-valuemin"?: number | undefined;
|
|
982
1003
|
"aria-valuenow"?: number | undefined;
|
|
983
1004
|
"aria-valuetext"?: string | undefined;
|
|
984
|
-
children?: ReactNode | undefined;
|
|
985
1005
|
dangerouslySetInnerHTML?: {
|
|
986
1006
|
__html: string | TrustedHTML;
|
|
987
1007
|
} | undefined;
|
|
@@ -1157,6 +1177,10 @@ onTransitionStartCapture?: TransitionEventHandler<HTMLElement> | undefined;
|
|
|
1157
1177
|
|
|
1158
1178
|
export declare type PanelProps = React.ComponentPropsWithRef<'article'> & {
|
|
1159
1179
|
as?: 'article' | 'div' | 'section';
|
|
1180
|
+
/** Replace the panel contents with a centered loading indicator. */
|
|
1181
|
+
loading?: boolean;
|
|
1182
|
+
/** Accessible, localizable name for the loading indicator. */
|
|
1183
|
+
loadingLabel?: string;
|
|
1160
1184
|
padding?: 'default' | 'none' | 'page';
|
|
1161
1185
|
scroll?: 'auto' | 'hidden';
|
|
1162
1186
|
surface?: boolean;
|
|
@@ -1275,6 +1299,7 @@ declare const sizes_2: {
|
|
|
1275
1299
|
};
|
|
1276
1300
|
|
|
1277
1301
|
declare const sizes_3: {
|
|
1302
|
+
fullscreen: string;
|
|
1278
1303
|
large: string;
|
|
1279
1304
|
medium: string;
|
|
1280
1305
|
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.5",
|
|
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",
|