wimui 0.56.0 → 0.56.2
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/components/feedback/LoadingOverlay/LoadingOverlay.cjs +1 -1
- package/dist/components/feedback/LoadingOverlay/LoadingOverlay.d.ts +2 -1
- package/dist/components/feedback/LoadingOverlay/LoadingOverlay.js +34 -27
- package/dist/components/form/ImageCropper/ImageCropper.cjs +1 -1
- package/dist/components/form/ImageCropper/ImageCropper.js +8 -6
- package/dist/components/form/ImageCropper/image-cropper.module.cjs +1 -1
- package/dist/components/form/ImageCropper/image-cropper.module.js +1 -1
- package/dist/llms-full.txt +3 -2
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../Loader/Loader.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),i=require("../Loader/Loader.cjs"),a=require("../Spinner/Spinner.cjs"),o=require("./loadingoverlay.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=({visible:e=!1,loaderType:s=`spinner`,loaderSize:u=`lg`,loaderColor:d=`primary`,backdropVariant:f=`dark`,blur:p=`sm`,message:m,fixed:h=!1,zIndex:g,children:_,className:v,style:y,...b})=>{let{t:x}=t.useWimTranslation(n.commonNs);if(!e)return null;let S=()=>_||(s===`spinner`?(0,l.jsx)(a.Spinner,{size:u,color:d}):(0,l.jsx)(i.Loader,{variant:s,size:u,color:d}));return(0,l.jsxs)(`div`,{className:(0,c.default)(`wim-loading-overlay`,o.default.root,h&&o.default.fixed,v),style:{...y,...g!==void 0&&{zIndex:g}},role:`status`,"data-testid":`loading-overlay`,"aria-live":`polite`,...b,children:[(0,l.jsx)(`div`,{className:(0,c.default)(o.default.backdrop,o.default[f],o.default[`blur-${p}`])}),(0,l.jsxs)(`div`,{className:o.default.content,children:[S(),m&&(0,l.jsx)(`div`,{className:o.default.message,children:m}),!m&&!_&&(0,l.jsx)(r.VisuallyHidden,{children:x(`a11y.loading`)})]})]})};exports.LoadingOverlay=u,exports.default=u;
|
|
@@ -37,7 +37,8 @@ export type LoadingOverlayProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
|
37
37
|
*/
|
|
38
38
|
blur?: "none" | "sm" | "md" | "lg";
|
|
39
39
|
/**
|
|
40
|
-
* Loading message displayed below the indicator.
|
|
40
|
+
* Loading message displayed below the indicator. Without a message (and without children),
|
|
41
|
+
* a built-in "Loading" text is read to assistive technology in its place.
|
|
41
42
|
*/
|
|
42
43
|
message?: string;
|
|
43
44
|
/**
|
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import n from "
|
|
2
|
+
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
+
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
|
+
import { VisuallyHidden as n } from "../../layout/VisuallyHidden/VisuallyHidden.js";
|
|
5
|
+
import { Loader as r } from "../Loader/Loader.js";
|
|
6
|
+
import { Spinner as i } from "../Spinner/Spinner.js";
|
|
7
|
+
import a from "./loadingoverlay.module.js";
|
|
5
8
|
import "react";
|
|
6
|
-
import
|
|
7
|
-
import { jsx as
|
|
9
|
+
import o from "classnames";
|
|
10
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
11
|
//#region src/components/feedback/LoadingOverlay/LoadingOverlay.tsx
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var l = ({ visible: l = !1, loaderType: u = "spinner", loaderSize: d = "lg", loaderColor: f = "primary", backdropVariant: p = "dark", blur: m = "sm", message: h, fixed: g = !1, zIndex: _, children: v, className: y, style: b, ...x }) => {
|
|
13
|
+
let { t: S } = e(t);
|
|
14
|
+
if (!l) return null;
|
|
15
|
+
let C = () => v || (u === "spinner" ? /* @__PURE__ */ s(i, {
|
|
16
|
+
size: d,
|
|
17
|
+
color: f
|
|
18
|
+
}) : /* @__PURE__ */ s(r, {
|
|
19
|
+
variant: u,
|
|
20
|
+
size: d,
|
|
21
|
+
color: f
|
|
18
22
|
}));
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
className:
|
|
23
|
+
return /* @__PURE__ */ c("div", {
|
|
24
|
+
className: o("wim-loading-overlay", a.root, g && a.fixed, y),
|
|
21
25
|
style: {
|
|
22
|
-
...
|
|
23
|
-
...
|
|
26
|
+
...b,
|
|
27
|
+
..._ !== void 0 && { zIndex: _ }
|
|
24
28
|
},
|
|
25
29
|
role: "status",
|
|
26
30
|
"data-testid": "loading-overlay",
|
|
27
31
|
"aria-live": "polite",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
...x,
|
|
33
|
+
children: [/* @__PURE__ */ s("div", { className: o(a.backdrop, a[p], a[`blur-${m}`]) }), /* @__PURE__ */ c("div", {
|
|
34
|
+
className: a.content,
|
|
35
|
+
children: [
|
|
36
|
+
C(),
|
|
37
|
+
h && /* @__PURE__ */ s("div", {
|
|
38
|
+
className: a.message,
|
|
39
|
+
children: h
|
|
40
|
+
}),
|
|
41
|
+
!h && !v && /* @__PURE__ */ s(n, { children: S("a11y.loading") })
|
|
42
|
+
]
|
|
36
43
|
})]
|
|
37
44
|
});
|
|
38
45
|
};
|
|
39
46
|
//#endregion
|
|
40
|
-
export {
|
|
47
|
+
export { l as LoadingOverlay, l as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),i=require("../Button/Button.cjs"),a=require("../../../i18n/generated/form.cjs"),o=require("../Slider/Slider.cjs"),s=require("../IconButton/IconButton.cjs"),c=require("../../overlay/Dialog/Dialog.cjs"),l=require("./cropImage.cjs"),u=require("./image-cropper.module.cjs");let d=require("react");d=e.__toESM(d,1);let f=require("classnames");f=e.__toESM(f,1);let p=require("react/jsx-runtime");var m=10,h=50,g=d.default.forwardRef(({src:e,aspectRatio:g=1,circular:_=!1,onCrop:v,showRotation:y=!0,showZoom:b=!0,showApplyButton:x=!0,applyLabel:S,onApply:C,onCropError:w,maxOutputSize:T,outputType:E=`image/png`,outputQuality:D=.92,crossOrigin:O,className:k,...A},j)=>{let{t:M}=t.useWimTranslation([a.formNs,n.commonNs]),[N,P]=(0,d.useState)(1),[F,I]=(0,d.useState)(0),[L,R]=(0,d.useState)({x:0,y:0}),[z,B]=(0,d.useState)(!1),[V,H]=(0,d.useState)({x:0,y:0}),[U,W]=(0,d.useState)(!1),G=(0,d.useRef)(null),K=(0,d.useRef)(null),q=(0,d.useRef)(null),J=(0,d.useId)();(0,d.useEffect)(()=>{R({x:0,y:0}),P(1),I(0)},[e]);let Y=e=>{B(!0),H({x:e.clientX-L.x,y:e.clientY-L.y})},X=(0,d.useCallback)(e=>{z&&R({x:e.clientX-V.x,y:e.clientY-V.y})},[z,V]),Z=(0,d.useCallback)(()=>{B(!1)},[]);(0,d.useEffect)(()=>(z
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),i=require("../Button/Button.cjs"),a=require("../../../i18n/generated/form.cjs"),o=require("../Slider/Slider.cjs"),s=require("../IconButton/IconButton.cjs"),c=require("../../overlay/Dialog/Dialog.cjs"),l=require("./cropImage.cjs"),u=require("./image-cropper.module.cjs");let d=require("react");d=e.__toESM(d,1);let f=require("classnames");f=e.__toESM(f,1);let p=require("react/jsx-runtime");var m=10,h=50,g=d.default.forwardRef(({src:e,aspectRatio:g=1,circular:_=!1,onCrop:v,showRotation:y=!0,showZoom:b=!0,showApplyButton:x=!0,applyLabel:S,onApply:C,onCropError:w,maxOutputSize:T,outputType:E=`image/png`,outputQuality:D=.92,crossOrigin:O,className:k,...A},j)=>{let{t:M}=t.useWimTranslation([a.formNs,n.commonNs]),[N,P]=(0,d.useState)(1),[F,I]=(0,d.useState)(0),[L,R]=(0,d.useState)({x:0,y:0}),[z,B]=(0,d.useState)(!1),[V,H]=(0,d.useState)({x:0,y:0}),[U,W]=(0,d.useState)(!1),G=(0,d.useRef)(null),K=(0,d.useRef)(null),q=(0,d.useRef)(null),J=(0,d.useId)();(0,d.useEffect)(()=>{R({x:0,y:0}),P(1),I(0)},[e]);let Y=e=>{(e.pointerType!==`mouse`||e.button===0)&&(B(!0),H({x:e.clientX-L.x,y:e.clientY-L.y}))},X=(0,d.useCallback)(e=>{z&&R({x:e.clientX-V.x,y:e.clientY-V.y})},[z,V]),Z=(0,d.useCallback)(()=>{B(!1)},[]);(0,d.useEffect)(()=>{if(z)return window.addEventListener(`pointermove`,X),window.addEventListener(`pointerup`,Z),window.addEventListener(`pointercancel`,Z),()=>{window.removeEventListener(`pointermove`,X),window.removeEventListener(`pointerup`,Z),window.removeEventListener(`pointercancel`,Z)}},[z,X,Z]);let Q=e=>{let t=e.shiftKey?h:m,n={ArrowLeft:[-t,0],ArrowRight:[t,0],ArrowUp:[0,-t],ArrowDown:[0,t]}[e.key];n?(e.preventDefault(),R(e=>({x:e.x+n[0],y:e.y+n[1]}))):e.key===`Home`&&(e.preventDefault(),R({x:0,y:0}))},$=()=>{I(e=>(e+90)%360)},ee=()=>{W(!0)},te=()=>{let e=G.current,t=q.current;if(W(!1),!e||!t)return;let n={x:L.x,y:L.y,zoom:N,rotation:F,frameWidth:t.clientWidth,frameHeight:t.clientHeight,layoutWidth:e.offsetWidth,layoutHeight:e.offsetHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,maxOutputSize:T};try{let{dataUrl:t,detail:r}=l.cropImage(e,n,E,D);v?.(t,r),C?.(t,r)}catch(e){w?.(e instanceof Error?e:Error(String(e)),l.resolveCropDetail(n).detail)}};return e?(0,p.jsxs)(`div`,{ref:j,className:(0,f.default)(`wim-image-cropper`,u.default.root,k),...A,children:[(0,p.jsxs)(`div`,{ref:K,className:u.default.viewer,onPointerDown:Y,onKeyDown:Q,role:`application`,tabIndex:0,"aria-label":M(`image_cropper.position_label`),"aria-describedby":J,children:[(0,p.jsx)(r.VisuallyHidden,{id:J,children:M(`image_cropper.position_hint`)}),(0,p.jsx)(`div`,{className:u.default.imageContainer,children:(0,p.jsx)(`img`,{ref:G,src:e,alt:M(`a11y.crop_target`),crossOrigin:O,className:u.default.image,style:{transform:`translate(${L.x}px, ${L.y}px) rotate(${F}deg) scale(${N})`},draggable:!1})}),(0,p.jsx)(`div`,{className:u.default.overlay,children:(0,p.jsx)(`div`,{ref:q,className:(0,f.default)(u.default.cropArea,{[u.default.circular]:_}),style:{aspectRatio:g}})})]}),(0,p.jsxs)(`div`,{className:u.default.controls,children:[b&&(0,p.jsx)(`div`,{className:u.default.zoomControl,children:(0,p.jsx)(o.Slider,{min:1,max:3,step:.1,value:N,onChange:e=>P(e),label:M(`image_cropper.zoom`),styles:{root:u.default.zoomSlider}})}),y&&(0,p.jsx)(`div`,{className:u.default.rotationControl,children:(0,p.jsx)(s.IconButton,{iconName:`RefreshIcon`,onClick:$,"aria-label":M(`image_cropper.rotate`),variant:`outline`,size:`sm`})}),x&&(0,p.jsx)(`div`,{className:u.default.applyControl,children:(0,p.jsx)(i.Button,{onClick:ee,size:`sm`,variant:`solid`,children:S||M(`image_cropper.apply`)})})]}),(0,p.jsx)(c.Dialog,{open:U,onOpenChange:W,children:(0,p.jsxs)(c.DialogContent,{children:[(0,p.jsx)(c.DialogHeader,{children:(0,p.jsx)(c.DialogTitle,{children:M(`image_cropper.confirm_title`)})}),(0,p.jsx)(c.DialogDescription,{children:M(`image_cropper.confirm_message`)}),(0,p.jsxs)(c.DialogFooter,{children:[(0,p.jsx)(c.DialogClose,{asChild:!0,children:(0,p.jsx)(i.Button,{variant:`ghost`,children:M(`image_cropper.cancel`)})}),(0,p.jsx)(i.Button,{onClick:te,variant:`solid`,children:M(`image_cropper.confirm`)})]})]})})]}):(0,p.jsx)(`div`,{ref:j,className:(0,f.default)(`wim-image-cropper`,u.default.root,u.default.empty,k),...A,children:(0,p.jsx)(`div`,{className:u.default.emptyContent,children:M(`image_cropper.no_image`)})})});g.displayName=`ImageCropper`,exports.ImageCropper=g;
|
|
@@ -28,10 +28,10 @@ var w = 10, T = 50, E = h.forwardRef(({ src: h, aspectRatio: E = 1, circular: ne
|
|
|
28
28
|
}), z(1), V(0);
|
|
29
29
|
}, [h]);
|
|
30
30
|
let le = (e) => {
|
|
31
|
-
G(!0), q({
|
|
31
|
+
(e.pointerType !== "mouse" || e.button === 0) && (G(!0), q({
|
|
32
32
|
x: e.clientX - H.x,
|
|
33
33
|
y: e.clientY - H.y
|
|
34
|
-
});
|
|
34
|
+
}));
|
|
35
35
|
}, Q = g((e) => {
|
|
36
36
|
W && U({
|
|
37
37
|
x: e.clientX - K.x,
|
|
@@ -40,9 +40,11 @@ var w = 10, T = 50, E = h.forwardRef(({ src: h, aspectRatio: E = 1, circular: ne
|
|
|
40
40
|
}, [W, K]), $ = g(() => {
|
|
41
41
|
G(!1);
|
|
42
42
|
}, []);
|
|
43
|
-
_(() =>
|
|
44
|
-
window.
|
|
45
|
-
|
|
43
|
+
_(() => {
|
|
44
|
+
if (W) return window.addEventListener("pointermove", Q), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", $), () => {
|
|
45
|
+
window.removeEventListener("pointermove", Q), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $);
|
|
46
|
+
};
|
|
47
|
+
}, [
|
|
46
48
|
W,
|
|
47
49
|
Q,
|
|
48
50
|
$
|
|
@@ -96,7 +98,7 @@ var w = 10, T = 50, E = h.forwardRef(({ src: h, aspectRatio: E = 1, circular: ne
|
|
|
96
98
|
/* @__PURE__ */ C("div", {
|
|
97
99
|
ref: ce,
|
|
98
100
|
className: m.viewer,
|
|
99
|
-
|
|
101
|
+
onPointerDown: le,
|
|
100
102
|
onKeyDown: ue,
|
|
101
103
|
role: "application",
|
|
102
104
|
tabIndex: 0,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1xzzx_3`,t=`_viewer_1xzzx_13`,n=`_imageContainer_1xzzx_33`,r=`_image_1xzzx_33`,i=`_overlay_1xzzx_45`,a=`_cropArea_1xzzx_54`,o=`_circular_1xzzx_60`,s=`_controls_1xzzx_63`,c=`_zoomControl_1xzzx_71`,l=`_zoomSlider_1xzzx_74`,u=`_rotationControl_1xzzx_77`,d=`_applyControl_1xzzx_80`,f=`_empty_1xzzx_84`,p=`_emptyContent_1xzzx_93`,m={root:e,viewer:t,imageContainer:n,image:r,overlay:i,cropArea:a,circular:o,controls:s,zoomControl:c,zoomSlider:l,rotationControl:u,applyControl:d,empty:f,emptyContent:p};exports.applyControl=d,exports.circular=o,exports.controls=s,exports.cropArea=a,exports.default=m,exports.empty=f,exports.emptyContent=p,exports.image=r,exports.imageContainer=n,exports.overlay=i,exports.root=e,exports.rotationControl=u,exports.viewer=t,exports.zoomControl=c,exports.zoomSlider=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/form/ImageCropper/image-cropper.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1xzzx_3", t = "_viewer_1xzzx_13", n = "_imageContainer_1xzzx_33", r = "_image_1xzzx_33", i = "_overlay_1xzzx_45", a = "_cropArea_1xzzx_54", o = "_circular_1xzzx_60", s = "_controls_1xzzx_63", c = "_zoomControl_1xzzx_71", l = "_zoomSlider_1xzzx_74", u = "_rotationControl_1xzzx_77", d = "_applyControl_1xzzx_80", f = "_empty_1xzzx_84", p = "_emptyContent_1xzzx_93", m = {
|
|
4
4
|
root: e,
|
|
5
5
|
viewer: t,
|
|
6
6
|
imageContainer: n,
|
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.56.
|
|
7
|
+
**wimui** v0.56.2 — a React 19 component library: 228 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -1949,7 +1949,8 @@ When a function is passed, it is called as (error, errorInfo, reset) => ReactNod
|
|
|
1949
1949
|
@default "dark"
|
|
1950
1950
|
- `blur: "none" | "sm" | "md" | "lg"` = "sm" — Strength of the backdrop blur effect.
|
|
1951
1951
|
@default "sm"
|
|
1952
|
-
- `message: string` — Loading message displayed below the indicator.
|
|
1952
|
+
- `message: string` — Loading message displayed below the indicator. Without a message (and without children),
|
|
1953
|
+
a built-in "Loading" text is read to assistive technology in its place.
|
|
1953
1954
|
- `fixed: boolean` = false — Whether to use position: fixed (covers the whole screen).
|
|
1954
1955
|
|
|
1955
1956
|
When `false` (the default) the overlay is `position: absolute`, so it covers
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.56.
|
|
7
|
+
**wimui** v0.56.2 — a React 19 component library: 228 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|