@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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index53.css');const n=require("react/jsx-runtime"),l=require("classix"),o="_loading_107mr_23",c="_spin_107mr_1",m="_small_107mr_40",r="_large_107mr_46",_="_ping_107mr_52",d="_sticky_107mr_78",s={loading:o,default:"_default_107mr_29",spin:c,small:m,large:r,ping:_,sticky:d},g={large:s.large,medium:s.medium,small:s.small},u=({variant:a="default",size:e="medium",sticky:i=!1,...t})=>n.jsx("div",{className:l.cx(s.loading,i&&s.sticky),"data-component":"loading",children:n.jsx("span",{className:l.cx(s.loading,s[a],g[e]),...t})});exports.Loading=u;
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 a } from "classix";
3
- import '../../assets/index53.css';const t = "_loading_107mr_23", _ = "_spin_107mr_1", e = "_small_107mr_40", r = "_large_107mr_46", c = "_ping_107mr_52", d = "_sticky_107mr_78", s = {
4
- loading: t,
5
- default: "_default_107mr_29",
6
- spin: _,
7
- small: e,
8
- large: r,
9
- ping: c,
10
- sticky: d
11
- }, g = {
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
- }, f = ({
16
- variant: n = "default",
17
- size: i = "medium",
18
- sticky: m = !1,
19
- ...o
20
- }) => /* @__PURE__ */ l("div", { className: a(s.loading, m && s.sticky), "data-component": "loading", children: /* @__PURE__ */ l("span", { className: a(s.loading, s[n], g[i]), ...o }) });
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
- f as Loading
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 g=require("react/jsx-runtime"),y=require("classix"),m="_layout_15smo_1",p="_constrained_15smo_10",w="_reading_15smo_15",f="_loading_15smo_43",t={layout:m,constrained:p,reading:w,"with-sidebar":"_with-sidebar_15smo_27","fill-viewport":"_fill-viewport_15smo_37",loading:f,"without-padding":"_without-padding_15smo_74"},h=({"aria-busy":n,children:s,className:l,contentLayout:a="default",contentMaxWidth:o,fillViewport:d=!1,loading:e=!1,padding:r="default",sidebar:i,style:u,..._})=>{const c={...u,"--page-content-max-width":o};return g.jsxs("main",{"aria-busy":n??(e||void 0),className:y(t.layout,!!i&&t["with-sidebar"],d&&t["fill-viewport"],o&&a==="default"&&t.constrained,a==="reading"&&t.reading,r==="none"&&t["without-padding"],e&&t.loading,l),style:c,..._,"data-component":"pagelayout",children:[i,s]})};exports.PageLayout=h;
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 c } from "react/jsx-runtime";
2
- import g from "classix";
3
- import '../../assets/index12.css';const p = "_layout_15smo_1", y = "_constrained_15smo_10", f = "_reading_15smo_15", w = "_loading_15smo_43", o = {
4
- layout: p,
5
- constrained: y,
6
- reading: f,
7
- "with-sidebar": "_with-sidebar_15smo_27",
8
- "fill-viewport": "_fill-viewport_15smo_37",
9
- loading: w,
10
- "without-padding": "_without-padding_15smo_74"
11
- }, v = ({
12
- "aria-busy": e,
13
- children: s,
14
- className: d,
15
- contentLayout: a = "default",
16
- contentMaxWidth: t,
17
- fillViewport: l = !1,
18
- loading: i = !1,
19
- padding: r = "default",
20
- sidebar: n,
21
- style: _,
22
- ...m
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": t
28
+ ...g,
29
+ "--page-content-max-width": o
27
30
  };
28
- return /* @__PURE__ */ c("main", { "aria-busy": e ?? (i || void 0), className: g(o.layout, !!n && o["with-sidebar"], l && o["fill-viewport"], t && a === "default" && o.constrained, a === "reading" && o.reading, r === "none" && o["without-padding"], i && o.loading, d), style: u, ...m, "data-component": "pagelayout", children: [
29
- n,
30
- s
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
- v as PageLayout
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 o=require("classix"),u=require("react"),_="_panel_puif6_1",r="_none_puif6_15",p="_page_puif6_19",f="_scrollable_puif6_27",i="_surface_puif6_32",e={panel:_,default:"_default_puif6_11",none:r,page:p,scrollable:f,surface:i},d=({as:a="div",className:l,padding:n="default",scroll:t="hidden",surface:c=!1,...s})=>u.createElement(a,{...s,className:o(e.panel,e[n],t==="auto"&&e.scrollable,c&&e.surface,l),"data-component":"panel"});exports.Panel=d;
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 t from "classix";
2
- import { createElement as p } from "react";
3
- import '../../assets/index11.css';const _ = "_panel_puif6_1", f = "_none_puif6_15", r = "_page_puif6_19", u = "_scrollable_puif6_27", i = "_surface_puif6_32", e = {
4
- panel: _,
5
- default: "_default_puif6_11",
6
- none: f,
7
- page: r,
8
- scrollable: u,
9
- surface: i
10
- }, b = ({
11
- as: a = "div",
12
- className: l,
13
- padding: n = "default",
14
- scroll: o = "hidden",
15
- surface: s = !1,
16
- ...c
17
- }) => p(a, {
18
- ...c,
19
- className: t(e.panel, e[n], o === "auto" && e.scrollable, s && e.surface, l),
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
- b as Panel
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, deleteLabel, saveLabel, uploadLabel, onCroppableChange, onDelete, onFileChange, onImageChange, onSave, onTransformChange, transform, standalone, }: CroppableProps) => JSX.Element;
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
- deleteLabel?: string;
198
- saveLabel?: string;
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
@@ -363,7 +363,7 @@
363
363
  },
364
364
  "com.solibo": {
365
365
  "packageName": "@solibo/solibo-ui",
366
- "packageVersion": "2.2.1"
366
+ "packageVersion": "2.2.4"
367
367
  }
368
368
  },
369
369
  "$name": "TEST Solibo UI Tokens (Copy)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "2.2.1",
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": "eslint .",
18
- "lint:fix": "eslint . --fix",
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",