wimui 0.29.10 → 0.31.0
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.ja.md +11 -10
- package/README.md +10 -7
- package/dist/components/_internal/IndicatorBase.cjs +1 -1
- package/dist/components/_internal/IndicatorBase.d.ts +1 -1
- package/dist/components/_internal/IndicatorBase.js +1 -1
- package/dist/components/_internal/StatusContent.cjs +1 -1
- package/dist/components/_internal/StatusContent.d.ts +9 -2
- package/dist/components/_internal/StatusContent.js +4 -2
- package/dist/components/_internal/status-content.module.cjs +1 -1
- package/dist/components/_internal/status-content.module.js +11 -9
- package/dist/components/data-display/Card/Card.cjs +1 -1
- package/dist/components/data-display/Card/Card.js +1 -1
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.d.ts +6 -0
- package/dist/components/data-display/Carousel/Carousel.js +92 -92
- package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +14 -13
- package/dist/components/data-display/Chip/Chip.cjs +1 -1
- package/dist/components/data-display/Chip/Chip.js +1 -1
- package/dist/components/data-display/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/data-display/EmptyState/EmptyState.d.ts +7 -1
- package/dist/components/data-display/EmptyState/EmptyState.js +4 -3
- package/dist/components/data-display/Marquee/Marquee.cjs +1 -1
- package/dist/components/data-display/Marquee/Marquee.d.ts +4 -1
- package/dist/components/data-display/Marquee/Marquee.js +4 -2
- package/dist/components/data-display/Marquee/marquee.module.cjs +1 -1
- package/dist/components/data-display/Marquee/marquee.module.js +1 -1
- package/dist/components/data-display/Stats/Stats.cjs +1 -1
- package/dist/components/data-display/Stats/Stats.d.ts +14 -3
- package/dist/components/data-display/Stats/Stats.js +13 -7
- package/dist/components/data-display/Stats/stats.module.cjs +1 -1
- package/dist/components/data-display/Stats/stats.module.js +4 -4
- package/dist/components/feedback/Skeleton/skeleton.module.cjs +1 -1
- package/dist/components/feedback/Skeleton/skeleton.module.js +3 -3
- package/dist/components/form/RichTextEditor/commands.d.ts +1 -1
- package/dist/components/layout/BentoGrid/BentoGrid.cjs +1 -1
- package/dist/components/layout/BentoGrid/BentoGrid.d.ts +12 -1
- package/dist/components/layout/BentoGrid/BentoGrid.js +3 -3
- package/dist/components/layout/BentoGrid/bento-grid.module.cjs +1 -1
- package/dist/components/layout/BentoGrid/bento-grid.module.js +6 -1
- package/dist/components/media/Audio/audio.module.cjs +1 -1
- package/dist/components/media/Audio/audio.module.js +2 -2
- package/dist/components/overlay/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/overlay/Dropdown/Dropdown.d.ts +14 -0
- package/dist/components/overlay/Dropdown/Dropdown.js +99 -93
- package/dist/llms-full.txt +31 -8
- package/dist/llms.txt +15 -4
- package/dist/styles.css +2 -2
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +60 -24
|
@@ -8,9 +8,15 @@ type EmptyStateProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
|
8
8
|
icon?: React.ReactNode;
|
|
9
9
|
/** Element shown as an action (e.g. a button). */
|
|
10
10
|
extra?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Horizontal alignment. Start-aligned reads as part of the card or table it sits
|
|
13
|
+
* in; use `"center"` only when the empty state is the only thing in its region.
|
|
14
|
+
* @default "start"
|
|
15
|
+
*/
|
|
16
|
+
align?: "start" | "center";
|
|
11
17
|
};
|
|
12
18
|
/**
|
|
13
19
|
* Placeholder component shown when there is no data or no search results.
|
|
14
20
|
*/
|
|
15
|
-
export declare const EmptyState: ({ title, description, icon, extra, className, ...props }: EmptyStateProps) => React.JSX.Element;
|
|
21
|
+
export declare const EmptyState: ({ title, description, icon, extra, align, className, ...props }: EmptyStateProps) => React.JSX.Element;
|
|
16
22
|
export {};
|
|
@@ -4,13 +4,14 @@ import "react";
|
|
|
4
4
|
import t from "classnames";
|
|
5
5
|
import { jsx as n } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/data-display/EmptyState/EmptyState.tsx
|
|
7
|
-
var r = ({ title: r, description: i, icon: a, extra: o,
|
|
7
|
+
var r = ({ title: r, description: i, icon: a, extra: o, align: s = "start", className: c, ...l }) => /* @__PURE__ */ n(e, {
|
|
8
8
|
title: r,
|
|
9
9
|
description: i,
|
|
10
10
|
icon: a,
|
|
11
11
|
actions: o,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
align: s,
|
|
13
|
+
className: t("wim-empty-state", c),
|
|
14
|
+
...l
|
|
14
15
|
});
|
|
15
16
|
//#endregion
|
|
16
17
|
export { r as EmptyState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./marquee.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({duration:e=20,reverse:a=!1,pauseOnHover:o=!0,vertical:s=!1,repeat:c=2,className:l,children:u,style:d,...f})=>{let p=(0,i.jsx)(`div`,{className:(0,r.default)(t.default.content,{[t.default.reverse]:a,[t.default.vertical]:s}),children:u});return(0,i.jsx)(`div`,{className:(0,r.default)(`wim-marquee`,t.default.root,l),style:{"--duration":`${e}s`,"--pause-on-hover":o?`paused`:`running`,...d},...f,children:Array.from({length:c}).map((e,t)=>(0,i.jsx)(n.default.Fragment,{children:p},t))})};exports.Marquee=a;
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./marquee.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({duration:e=20,reverse:a=!1,pauseOnHover:o=!0,vertical:s=!1,repeat:c=2,className:l,children:u,style:d,...f})=>{let p=e=>(0,i.jsx)(`div`,{className:(0,r.default)(t.default.content,{[t.default.reverse]:a,[t.default.vertical]:s}),"aria-hidden":e||void 0,inert:e||void 0,children:u});return(0,i.jsx)(`div`,{className:(0,r.default)(`wim-marquee`,t.default.root,l),style:{"--duration":`${e}s`,"--pause-on-hover":o?`paused`:`running`,...d},...f,children:Array.from({length:c}).map((e,t)=>(0,i.jsx)(n.default.Fragment,{children:p(t>0)},t))})};exports.Marquee=a;
|
|
@@ -4,7 +4,10 @@ export type MarqueeProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
|
4
4
|
duration?: number;
|
|
5
5
|
/** Whether to run the animation in reverse. */
|
|
6
6
|
reverse?: boolean;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Whether to pause the animation on hover. Keyboard focus inside the marquee
|
|
9
|
+
* always pauses it, regardless of this option (WCAG 2.2.2).
|
|
10
|
+
*/
|
|
8
11
|
pauseOnHover?: boolean;
|
|
9
12
|
/** Whether to scroll vertically. */
|
|
10
13
|
vertical?: boolean;
|
|
@@ -5,11 +5,13 @@ import n from "classnames";
|
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/data-display/Marquee/Marquee.tsx
|
|
7
7
|
var i = ({ duration: i = 20, reverse: a = !1, pauseOnHover: o = !0, vertical: s = !1, repeat: c = 2, className: l, children: u, style: d, ...f }) => {
|
|
8
|
-
let p = /* @__PURE__ */ r("div", {
|
|
8
|
+
let p = (t) => /* @__PURE__ */ r("div", {
|
|
9
9
|
className: n(e.content, {
|
|
10
10
|
[e.reverse]: a,
|
|
11
11
|
[e.vertical]: s
|
|
12
12
|
}),
|
|
13
|
+
"aria-hidden": t || void 0,
|
|
14
|
+
inert: t || void 0,
|
|
13
15
|
children: u
|
|
14
16
|
});
|
|
15
17
|
return /* @__PURE__ */ r("div", {
|
|
@@ -20,7 +22,7 @@ var i = ({ duration: i = 20, reverse: a = !1, pauseOnHover: o = !0, vertical: s
|
|
|
20
22
|
...d
|
|
21
23
|
},
|
|
22
24
|
...f,
|
|
23
|
-
children: Array.from({ length: c }).map((e, n) => /* @__PURE__ */ r(t.Fragment, { children: p }, n))
|
|
25
|
+
children: Array.from({ length: c }).map((e, n) => /* @__PURE__ */ r(t.Fragment, { children: p(n > 0) }, n))
|
|
24
26
|
});
|
|
25
27
|
};
|
|
26
28
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_10z6t_3`,t=`_content_10z6t_10`,n=`_scroll_10z6t_1`,r=`_reverse_10z6t_30`,i=`_vertical_10z6t_33`,a=`_scrollVertical_10z6t_1`,o={root:e,content:t,scroll:n,reverse:r,vertical:i,scrollVertical:a};exports.content=t,exports.default=o,exports.reverse=r,exports.root=e,exports.scroll=n,exports.scrollVertical=a,exports.vertical=i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Marquee/marquee.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_10z6t_3", t = "_content_10z6t_10", n = "_scroll_10z6t_1", r = "_reverse_10z6t_30", i = "_vertical_10z6t_33", a = "_scrollVertical_10z6t_1", o = {
|
|
4
4
|
root: e,
|
|
5
5
|
content: t,
|
|
6
6
|
scroll: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../icon/arrow-down.cjs"),n=require("../../../icon/arrow-right.cjs"),r=require("../../../icon/arrow-up.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../Card/Card.cjs"),o=require("./stats.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={up:r.default,down:t.default,neutral:n.default},d=({variant:e=`
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../icon/arrow-down.cjs"),n=require("../../../icon/arrow-right.cjs"),r=require("../../../icon/arrow-up.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../Card/Card.cjs"),o=require("./stats.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={up:r.default,down:t.default,neutral:n.default},d=({variant:e=`outline`,className:t,children:n,...r})=>(0,l.jsx)(a.Card,{variant:e,className:(0,c.default)(`wim-stats`,o.default.root,t),padding:`none`,...r,children:(0,l.jsx)(`div`,{className:o.default.inner,children:n})}),f=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.label,e),...n,children:t}),p=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.value,e),...n,children:t}),m=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.description,e),...n,children:t}),h={up:`success`,down:`danger`,neutral:`neutral`},g=({direction:e=`up`,intent:t=h[e],className:n,children:r,...a})=>(0,l.jsxs)(`div`,{className:(0,c.default)(o.default.trend,o.default[t],n),"data-direction":e,"data-intent":t,...a,children:[(0,l.jsx)(`span`,{"aria-hidden":`true`,children:(0,l.jsx)(i.Icon,{component:u[e],size:`sm`})}),(0,l.jsx)(`span`,{children:r})]});d.displayName=`Stats`,f.displayName=`Stats.Label`,p.displayName=`Stats.Value`,m.displayName=`Stats.Description`,g.displayName=`Stats.Trend`,d.Label=f,d.Value=p,d.Description=m,d.Trend=g,exports.Stats=d,exports.default=d,exports.StatsDescription=m,exports.StatsLabel=f,exports.StatsTrend=g,exports.StatsValue=p;
|
|
@@ -23,7 +23,7 @@ export declare const Stats: {
|
|
|
23
23
|
displayName: string;
|
|
24
24
|
};
|
|
25
25
|
Trend: {
|
|
26
|
-
({ direction, className, children, ...props }: StatsTrendProps): React.JSX.Element;
|
|
26
|
+
({ direction, intent, className, children, ...props }: StatsTrendProps): React.JSX.Element;
|
|
27
27
|
displayName: string;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
@@ -40,11 +40,22 @@ export declare const StatsDescription: {
|
|
|
40
40
|
displayName: string;
|
|
41
41
|
};
|
|
42
42
|
export type StatsTrendProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Trend direction, which controls the arrow icon. When `intent` is not given it
|
|
45
|
+
* also sets the color (`up` = success, `down` = danger, `neutral` = neutral).
|
|
46
|
+
* @default "up"
|
|
47
|
+
*/
|
|
44
48
|
direction?: "up" | "down" | "neutral";
|
|
49
|
+
/**
|
|
50
|
+
* Whether the change is good or bad, which controls the color independently of
|
|
51
|
+
* the arrow. Set it for metrics where a rise is bad news, such as costs or error
|
|
52
|
+
* rates: `direction="up" intent="danger"`. Defaults to the color implied by
|
|
53
|
+
* `direction`.
|
|
54
|
+
*/
|
|
55
|
+
intent?: "success" | "danger" | "neutral";
|
|
45
56
|
};
|
|
46
57
|
export declare const StatsTrend: {
|
|
47
|
-
({ direction, className, children, ...props }: StatsTrendProps): React.JSX.Element;
|
|
58
|
+
({ direction, intent, className, children, ...props }: StatsTrendProps): React.JSX.Element;
|
|
48
59
|
displayName: string;
|
|
49
60
|
};
|
|
50
61
|
export default Stats;
|
|
@@ -13,7 +13,7 @@ var l = {
|
|
|
13
13
|
up: n,
|
|
14
14
|
down: e,
|
|
15
15
|
neutral: t
|
|
16
|
-
}, u = ({ variant: e = "
|
|
16
|
+
}, u = ({ variant: e = "outline", className: t, children: n, ...r }) => /* @__PURE__ */ s(i, {
|
|
17
17
|
variant: e,
|
|
18
18
|
className: o("wim-stats", a.root, t),
|
|
19
19
|
padding: "none",
|
|
@@ -34,17 +34,23 @@ var l = {
|
|
|
34
34
|
className: o(a.description, e),
|
|
35
35
|
...n,
|
|
36
36
|
children: t
|
|
37
|
-
}), m =
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
}), m = {
|
|
38
|
+
up: "success",
|
|
39
|
+
down: "danger",
|
|
40
|
+
neutral: "neutral"
|
|
41
|
+
}, h = ({ direction: e = "up", intent: t = m[e], className: n, children: i, ...u }) => /* @__PURE__ */ c("div", {
|
|
42
|
+
className: o(a.trend, a[t], n),
|
|
43
|
+
"data-direction": e,
|
|
44
|
+
"data-intent": t,
|
|
45
|
+
...u,
|
|
40
46
|
children: [/* @__PURE__ */ s("span", {
|
|
41
47
|
"aria-hidden": "true",
|
|
42
48
|
children: /* @__PURE__ */ s(r, {
|
|
43
49
|
component: l[e],
|
|
44
50
|
size: "sm"
|
|
45
51
|
})
|
|
46
|
-
}), /* @__PURE__ */ s("span", { children:
|
|
52
|
+
}), /* @__PURE__ */ s("span", { children: i })]
|
|
47
53
|
});
|
|
48
|
-
u.displayName = "Stats", d.displayName = "Stats.Label", f.displayName = "Stats.Value", p.displayName = "Stats.Description",
|
|
54
|
+
u.displayName = "Stats", d.displayName = "Stats.Label", f.displayName = "Stats.Value", p.displayName = "Stats.Description", h.displayName = "Stats.Trend", u.Label = d, u.Value = f, u.Description = p, u.Trend = h;
|
|
49
55
|
//#endregion
|
|
50
|
-
export { u as Stats, u as default, p as StatsDescription, d as StatsLabel,
|
|
56
|
+
export { u as Stats, u as default, p as StatsDescription, d as StatsLabel, h as StatsTrend, f as StatsValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_l22hh_3`,t=`_inner_l22hh_6`,n=`_label_l22hh_12`,r=`_value_l22hh_18`,i=`_description_l22hh_24`,a=`_trend_l22hh_29`,o=`_success_l22hh_50`,s=`_danger_l22hh_54`,c=`_neutral_l22hh_58`,l={root:e,inner:t,label:n,value:r,description:i,trend:a,success:o,danger:s,neutral:c};exports.danger=s,exports.default=l,exports.description=i,exports.inner=t,exports.label=n,exports.neutral=c,exports.root=e,exports.success=o,exports.trend=a,exports.value=r;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Stats/stats.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_l22hh_3", t = "_inner_l22hh_6", n = "_label_l22hh_12", r = "_value_l22hh_18", i = "_description_l22hh_24", a = "_trend_l22hh_29", o = "_success_l22hh_50", s = "_danger_l22hh_54", c = "_neutral_l22hh_58", l = {
|
|
4
4
|
root: e,
|
|
5
5
|
inner: t,
|
|
6
6
|
label: n,
|
|
7
7
|
value: r,
|
|
8
8
|
description: i,
|
|
9
9
|
trend: a,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
success: o,
|
|
11
|
+
danger: s,
|
|
12
12
|
neutral: c
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { s as danger, l as default, i as description, t as inner, n as label, c as neutral, e as root, o as success, a as trend, r as value };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_qbn67_3`,t=`_text_qbn67_10`,n=`_rect_qbn67_25`,r=`_circle_qbn67_28`,i=`_pulse_qbn67_31`,a=`_wave_qbn67_34`,o={root:e,text:t,rect:n,circle:r,pulse:i,"skeleton-pulse":`_skeleton-pulse_qbn67_1`,wave:a,"skeleton-wave":`_skeleton-wave_qbn67_1`};exports.circle=r,exports.default=o,exports.pulse=i,exports.rect=n,exports.root=e,exports.text=t,exports.wave=a;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/feedback/Skeleton/skeleton.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_qbn67_3", t = "_text_qbn67_10", n = "_rect_qbn67_25", r = "_circle_qbn67_28", i = "_pulse_qbn67_31", a = "_wave_qbn67_34", o = {
|
|
4
4
|
root: e,
|
|
5
5
|
text: t,
|
|
6
6
|
rect: n,
|
|
7
7
|
circle: r,
|
|
8
8
|
pulse: i,
|
|
9
|
-
"skeleton-pulse": "_skeleton-
|
|
9
|
+
"skeleton-pulse": "_skeleton-pulse_qbn67_1",
|
|
10
10
|
wave: a,
|
|
11
|
-
"skeleton-wave": "_skeleton-
|
|
11
|
+
"skeleton-wave": "_skeleton-wave_qbn67_1"
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { r as circle, o as default, i as pulse, n as rect, e as root, t as text, a as wave };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* RichTextEditor のコマンド層(純 DOM、React 非依存)。
|
|
3
3
|
*
|
|
4
4
|
* 旧実装は非推奨の document.execCommand / queryCommandState に依存していた
|
|
5
|
-
* (
|
|
5
|
+
* (docs/history/improvements-ledger.md の T15)。ここでは Selection / Range API で同等のコマンドを
|
|
6
6
|
* 実装する。部分選択時の書式分割は Range.extractContents() の仕様
|
|
7
7
|
* (partial containment chain を複製してフラグメント側に書式ラッパーを残す)
|
|
8
8
|
* を利用する。
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./bento-grid.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({className:e,children:n,rowHeight:a,style:o,...s})=>(0,i.jsx)(`div`,{className:t.default.container,children:(0,i.jsx)(`div`,{className:(0,r.default)(`wim-bento-grid`,t.default.root,e),style:a?{...o,"--wim-bento-row-height":a}:o,...s,children:n})});a.displayName=`BentoGrid`;var o=({className:e,title:n,description:a,header:o,icon:s,...
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./bento-grid.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({className:e,children:n,rowHeight:a,style:o,...s})=>(0,i.jsx)(`div`,{className:t.default.container,children:(0,i.jsx)(`div`,{className:(0,r.default)(`wim-bento-grid`,t.default.root,e),style:a?{...o,"--wim-bento-row-height":a}:o,...s,children:n})});a.displayName=`BentoGrid`;var o=({className:e,title:n,description:a,header:o,icon:s,span:c=1,rowSpan:l=1,...u})=>(0,i.jsxs)(`div`,{className:(0,r.default)(t.default.item,t.default[`span-${c}`],t.default[`row-${l}`],e),...u,children:[o&&(0,i.jsx)(`div`,{className:t.default.itemHeader,children:o}),(0,i.jsxs)(`div`,{className:t.default.itemContent,children:[s&&(0,i.jsx)(`div`,{className:t.default.itemIcon,children:s}),(0,i.jsxs)(`div`,{className:t.default.itemText,children:[n&&(0,i.jsx)(`div`,{className:t.default.itemTitle,children:n}),a&&(0,i.jsx)(`div`,{className:t.default.itemDescription,children:a})]})]})]});o.displayName=`BentoGridItem`,exports.BentoGrid=a,exports.BentoGridItem=o;
|
|
@@ -14,9 +14,20 @@ export type BentoGridItemProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
|
14
14
|
description?: React.ReactNode;
|
|
15
15
|
header?: React.ReactNode;
|
|
16
16
|
icon?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* How many columns the tile occupies where the grid is 3 columns wide.
|
|
19
|
+
* Below that width the grid is a single column and every tile spans it.
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
span?: 1 | 2 | 3;
|
|
23
|
+
/**
|
|
24
|
+
* How many rows the tile occupies where the grid is 3 columns wide.
|
|
25
|
+
* @default 1
|
|
26
|
+
*/
|
|
27
|
+
rowSpan?: 1 | 2;
|
|
17
28
|
};
|
|
18
29
|
export declare const BentoGridItem: {
|
|
19
|
-
({ className, title, description, header, icon, ...props }: BentoGridItemProps): React.JSX.Element;
|
|
30
|
+
({ className, title, description, header, icon, span, rowSpan, ...props }: BentoGridItemProps): React.JSX.Element;
|
|
20
31
|
displayName: string;
|
|
21
32
|
};
|
|
22
33
|
export {};
|
|
@@ -17,9 +17,9 @@ var i = ({ className: r, children: i, rowHeight: a, style: o, ...s }) => /* @__P
|
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
i.displayName = "BentoGrid";
|
|
20
|
-
var a = ({ className: i, title: a, description: o, header: s, icon: c,
|
|
21
|
-
className: t(e.item, i),
|
|
22
|
-
...
|
|
20
|
+
var a = ({ className: i, title: a, description: o, header: s, icon: c, span: l = 1, rowSpan: u = 1, ...d }) => /* @__PURE__ */ r("div", {
|
|
21
|
+
className: t(e.item, e[`span-${l}`], e[`row-${u}`], i),
|
|
22
|
+
...d,
|
|
23
23
|
children: [s && /* @__PURE__ */ n("div", {
|
|
24
24
|
className: e.itemHeader,
|
|
25
25
|
children: s
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_container_1lu3a_4`,t=`_root_1lu3a_16`,n=`_item_1lu3a_52`,r=`_itemHeader_1lu3a_66`,i=`_itemContent_1lu3a_78`,a=`_itemIcon_1lu3a_83`,o=`_itemText_1lu3a_86`,s=`_itemTitle_1lu3a_90`,c=`_itemDescription_1lu3a_95`,l={container:e,root:t,"span-1":`_span-1_1lu3a_36`,"span-2":`_span-2_1lu3a_39`,"span-3":`_span-3_1lu3a_42`,"row-1":`_row-1_1lu3a_45`,"row-2":`_row-2_1lu3a_48`,item:n,itemHeader:r,itemContent:i,itemIcon:a,itemText:o,itemTitle:s,itemDescription:c};exports.container=e,exports.default=l,exports.item=n,exports.itemContent=i,exports.itemDescription=c,exports.itemHeader=r,exports.itemIcon=a,exports.itemText=o,exports.itemTitle=s,exports.root=t;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/layout/BentoGrid/bento-grid.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_container_1lu3a_4", t = "_root_1lu3a_16", n = "_item_1lu3a_52", r = "_itemHeader_1lu3a_66", i = "_itemContent_1lu3a_78", a = "_itemIcon_1lu3a_83", o = "_itemText_1lu3a_86", s = "_itemTitle_1lu3a_90", c = "_itemDescription_1lu3a_95", l = {
|
|
4
4
|
container: e,
|
|
5
5
|
root: t,
|
|
6
|
+
"span-1": "_span-1_1lu3a_36",
|
|
7
|
+
"span-2": "_span-2_1lu3a_39",
|
|
8
|
+
"span-3": "_span-3_1lu3a_42",
|
|
9
|
+
"row-1": "_row-1_1lu3a_45",
|
|
10
|
+
"row-2": "_row-2_1lu3a_48",
|
|
6
11
|
item: n,
|
|
7
12
|
itemHeader: r,
|
|
8
13
|
itemContent: i,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1y982_3`,t=`_inner_1y982_13`,n=`_radiusSm_1y982_23`,r=`_radiusMd_1y982_27`,i=`_radiusLg_1y982_31`,a=`_radiusFull_1y982_35`,o=`_shadow_1y982_39`,s=`_loading_1y982_43`,c=`_border_1y982_46`,l=`_fadeIn_1y982_49`,u=`_audio_1y982_49`,d=`_customControls_1y982_50`,f=`_metadata_1y982_51`,p=`_isLoaded_1y982_55`,m=`_caption_1y982_89`,h=`_custom_1y982_50`,g=`_visualizerCanvas_1y982_122`,_=`_cover_1y982_146`,v=`_info_1y982_153`,y=`_title_1y982_159`,b=`_artist_1y982_165`,x=`_badge_1y982_170`,S=`_controlsRow_1y982_193`,C=`_controlsGroup_1y982_200`,w=`_btn_1y982_204`,T=`_active_1y982_225`,E=`_btnText_1y982_229`,D=`_btnPlay_1y982_236`,O=`_time_1y982_250`,k=`_progressContainer_1y982_262`,A=`_progress_1y982_262`,j=`_progressFill_1y982_286`,M=`_volumeContainer_1y982_308`,N=`_volume_1y982_308`,P={root:e,inner:t,radiusSm:n,radiusMd:r,radiusLg:i,radiusFull:a,shadow:o,loading:s,border:c,fadeIn:l,audio:u,customControls:d,metadata:f,isLoaded:p,"skeleton-loading":`_skeleton-loading_1y982_1`,caption:m,custom:h,visualizerCanvas:g,cover:_,info:v,title:y,artist:b,badge:x,controlsRow:S,controlsGroup:C,btn:w,active:T,btnText:E,btnPlay:D,time:O,progressContainer:k,progress:A,progressFill:j,volumeContainer:M,volume:N};exports.active=T,exports.artist=b,exports.audio=u,exports.badge=x,exports.border=c,exports.btn=w,exports.btnPlay=D,exports.btnText=E,exports.caption=m,exports.controlsGroup=C,exports.controlsRow=S,exports.cover=_,exports.custom=h,exports.customControls=d,exports.default=P,exports.fadeIn=l,exports.info=v,exports.inner=t,exports.isLoaded=p,exports.loading=s,exports.metadata=f,exports.progress=A,exports.progressContainer=k,exports.progressFill=j,exports.radiusFull=a,exports.radiusLg=i,exports.radiusMd=r,exports.radiusSm=n,exports.root=e,exports.shadow=o,exports.time=O,exports.title=y,exports.visualizerCanvas=g,exports.volume=N,exports.volumeContainer=M;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/media/Audio/audio.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1y982_3", t = "_inner_1y982_13", n = "_radiusSm_1y982_23", r = "_radiusMd_1y982_27", i = "_radiusLg_1y982_31", a = "_radiusFull_1y982_35", o = "_shadow_1y982_39", s = "_loading_1y982_43", c = "_border_1y982_46", l = "_fadeIn_1y982_49", u = "_audio_1y982_49", d = "_customControls_1y982_50", f = "_metadata_1y982_51", p = "_isLoaded_1y982_55", m = "_caption_1y982_89", h = "_custom_1y982_50", g = "_visualizerCanvas_1y982_122", _ = "_cover_1y982_146", v = "_info_1y982_153", y = "_title_1y982_159", b = "_artist_1y982_165", x = "_badge_1y982_170", S = "_controlsRow_1y982_193", C = "_controlsGroup_1y982_200", w = "_btn_1y982_204", T = "_active_1y982_225", E = "_btnText_1y982_229", D = "_btnPlay_1y982_236", O = "_time_1y982_250", k = "_progressContainer_1y982_262", A = "_progress_1y982_262", j = "_progressFill_1y982_286", M = "_volumeContainer_1y982_308", N = "_volume_1y982_308", P = {
|
|
4
4
|
root: e,
|
|
5
5
|
inner: t,
|
|
6
6
|
radiusSm: n,
|
|
@@ -15,7 +15,7 @@ var e = "_root_1x6tc_3", t = "_inner_1x6tc_13", n = "_radiusSm_1x6tc_23", r = "_
|
|
|
15
15
|
customControls: d,
|
|
16
16
|
metadata: f,
|
|
17
17
|
isLoaded: p,
|
|
18
|
-
"skeleton-loading": "_skeleton-
|
|
18
|
+
"skeleton-loading": "_skeleton-loading_1y982_1",
|
|
19
19
|
caption: m,
|
|
20
20
|
custom: h,
|
|
21
21
|
visualizerCanvas: g,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../layout/Transition/Transition.cjs"),r=require("../../_internal/BaseListItem/BaseListItem.cjs"),i=require("../../_internal/mergeRefs.cjs"),a=require("./dropdown.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime"),l=require("@floating-ui/react");var u=o.default.createContext({isOpen:!1,toggle:()=>{},close:()=>{},menuId:``,triggerId:``,focusedIndex:-1,setFocusedIndex:()=>{},registerItem:()=>0,containerRef:{current:null},setReference:()=>{},setFloating:()=>{},floatingStyles:{},floatingRef:{current:null},setAlign:()=>{}}),d=(0,o.forwardRef)(({children:e,className:n,asChild:r=!1,...
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../layout/Transition/Transition.cjs"),r=require("../../_internal/BaseListItem/BaseListItem.cjs"),i=require("../../_internal/mergeRefs.cjs"),a=require("./dropdown.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime"),l=require("@floating-ui/react");var u=o.default.createContext({isOpen:!1,toggle:()=>{},close:()=>{},menuId:``,triggerId:``,focusedIndex:-1,setFocusedIndex:()=>{},registerItem:()=>0,containerRef:{current:null},setReference:()=>{},setFloating:()=>{},floatingStyles:{},floatingRef:{current:null},setAlign:()=>{}}),d=(0,o.forwardRef)(({children:e,className:n,asChild:r=!1,defaultOpen:d=!1,open:f,onOpenChange:p,...m},h)=>{let[g,_]=(0,o.useState)(d),v=f??g,y=(0,o.useCallback)(e=>{f===void 0&&_(e),p?.(e)},[f,p]),[b,x]=(0,o.useState)(-1),S=(0,o.useRef)(null),C=(0,o.useRef)(0),[w,T]=(0,o.useState)(`left`),{refs:E,floatingStyles:D}=(0,l.useFloating)({open:v,placement:w===`right`?`bottom-end`:`bottom-start`,whileElementsMounted:l.autoUpdate,middleware:[(0,l.offset)(4),(0,l.flip)(),(0,l.shift)({padding:8})]}),O=i.mergeRefs(S,h);(0,o.useEffect)(()=>{C.current=0});let k=()=>{let e=C.current;return C.current+=1,e},A=(0,o.useId)(),j=`wim-dropdown-menu-${A}`,M=`wim-dropdown-trigger-${A}`,N=()=>{let e=!v;y(e),x(e?0:-1)},P=(0,o.useCallback)(()=>{y(!1),x(-1)},[y]);(0,o.useEffect)(()=>{let e=e=>{let t=e.target,n=E.floating.current?.contains(t)??!1;S.current&&!S.current.contains(t)&&!n&&P()},t=e=>{e.key===`Escape`&&P()};return v&&(document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t)),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[v,E.floating,P]);let F=e=>{if(!v)return;let t=Array.from((E.floating.current??S.current)?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)||[]);switch(e.key){case`ArrowDown`:e.preventDefault(),x(e=>e<t.length-1?e+1:0);break;case`ArrowUp`:e.preventDefault(),x(e=>e>0?e-1:t.length-1);break;case`Home`:e.preventDefault(),x(0);break;case`End`:e.preventDefault(),x(t.length-1);break;case`Tab`:P();break}};(0,o.useEffect)(()=>{v&&b>=0&&Array.from((E.floating.current??S.current)?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)||[])[b]?.focus({preventScroll:!0})},[b,v,E.floating]);let I=r?t.Root:`div`;return(0,c.jsx)(u.Provider,{value:{isOpen:v,toggle:N,close:P,menuId:j,triggerId:M,focusedIndex:b,setFocusedIndex:x,registerItem:k,containerRef:S,setReference:E.setReference,setFloating:E.setFloating,floatingStyles:D,floatingRef:E.floating,setAlign:T},children:(0,c.jsx)(I,{...m,role:`none`,className:(0,s.default)(`wim-dropdown`,a.default.root,n),ref:O,onKeyDown:F,children:(0,c.jsx)(t.Slottable,{children:e})})})});d.displayName=`Dropdown`;var f=(0,o.forwardRef)(({children:e,className:n,asChild:r=!1,...l},d)=>{let{toggle:f,isOpen:p,menuId:m,triggerId:h,setReference:g}=o.default.useContext(u),_=r?t.Root:`div`,v=i.mergeRefs(g,d);return(0,c.jsx)(_,{...l,ref:v,id:h,className:(0,s.default)(a.default.trigger,n),onClick:f,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?m:void 0,role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f())},children:(0,c.jsx)(t.Slottable,{children:e})})});f.displayName=`Dropdown.Trigger`;var p=(0,o.forwardRef)(({children:e,className:t,align:r=`left`,show:d,style:f,...p},m)=>{let{isOpen:h,menuId:g,triggerId:_,setFloating:v,floatingStyles:y,setAlign:b}=o.default.useContext(u);(0,o.useEffect)(()=>{b(r)},[r,b]);let x=i.mergeRefs(v,m);return(0,c.jsx)(l.FloatingPortal,{children:(0,c.jsx)(n.Transition,{...p,ref:x,show:d===void 0?h:d,preset:`fade`,id:g,style:{...y,...f},className:(0,s.default)(a.default.menu,t),role:`menu`,"aria-labelledby":_,children:e})})});p.displayName=`Dropdown.Menu`;var m=(0,o.forwardRef)(({children:e,onClick:t,disabled:n=!1,className:i,...l},d)=>{let{close:f,focusedIndex:p,setFocusedIndex:m,registerItem:h}=o.default.useContext(u),[g]=(0,o.useState)(()=>h()),_=p===g,v=e=>{n||(e.stopPropagation(),t&&t(),f())};return(0,c.jsx)(r.BaseListItem,{...l,ref:d,className:(0,s.default)(a.default.item,i),onClick:v,onFocus:()=>m(g),disabled:n,role:`menuitem`,tabIndex:_?0:-1,onKeyDown:e=>{!n&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(e))},children:e})});m.displayName=`Dropdown.Item`;var h=(0,o.forwardRef)((e,t)=>(0,c.jsx)(d,{...e,ref:t}));h.displayName=`Dropdown`,h.Trigger=f,h.Menu=p,h.Item=m,exports.Dropdown=h,exports.default=h,exports.DropdownItem=m,exports.DropdownMenu=p,exports.DropdownTrigger=f;
|
|
@@ -10,6 +10,20 @@ export interface DropdownProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
10
10
|
* If true, the dropdown will be rendered as its child, merging its props onto that child.
|
|
11
11
|
*/
|
|
12
12
|
asChild?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the menu starts open. Use it for a screenshot, a test, or a menu that should
|
|
15
|
+
* already be showing. Ignored once `open` is provided.
|
|
16
|
+
*/
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Controls the open state from the outside. Pass it together with `onOpenChange`.
|
|
20
|
+
*/
|
|
21
|
+
open?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Called with the next open state, both when the trigger is used and when the menu is
|
|
24
|
+
* dismissed by an outside click or Escape.
|
|
25
|
+
*/
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
27
|
}
|
|
14
28
|
export interface DropdownTriggerProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
15
29
|
children: ReactNode;
|