@okam/stack-ui 2.0.0 → 2.0.3
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/CHANGELOG.md +35 -0
- package/components/fields/ComboBox/interface.d.ts +6 -0
- package/components/fields/ListBox/interface.d.ts +1 -1
- package/index12.js +1 -1
- package/index12.mjs +6 -6
- package/index122.js +1 -1
- package/index122.mjs +2 -2
- package/index127.js +1 -1
- package/index127.mjs +10 -10
- package/index131.js +1 -1
- package/index131.mjs +1 -1
- package/index151.js +3 -2
- package/index151.mjs +5 -4
- package/index17.js +1 -1
- package/index17.mjs +14 -14
- package/index170.js +1 -1
- package/index170.mjs +10 -6
- package/index171.js +1 -2
- package/index171.mjs +6 -47
- package/index172.js +2 -1
- package/index172.mjs +47 -10
- package/index18.js +1 -1
- package/index18.mjs +7 -7
- package/index26.js +1 -1
- package/index26.mjs +15 -15
- package/index27.js +1 -1
- package/index27.mjs +15 -15
- package/index32.js +1 -1
- package/index32.mjs +105 -85
- package/index35.js +1 -1
- package/index35.mjs +14 -14
- package/index38.js +1 -1
- package/index38.mjs +114 -106
- package/index40.js +1 -1
- package/index40.mjs +11 -11
- package/index56.js +1 -1
- package/index56.mjs +33 -32
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## 2.0.3 (2026-03-11)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- resolve high-severity dependabot alerts ([#429](https://github.com/OKAMca/stack/pull/429))
|
|
6
|
+
- **stack-ui:** error message and validation fixes ([6e4d9f21](https://github.com/OKAMca/stack/commit/6e4d9f21))
|
|
7
|
+
- **stack-ui:** validation fix ([fc54df32](https://github.com/OKAMca/stack/commit/fc54df32))
|
|
8
|
+
- **stack-ui:** selection change fixes ([89bf4c0e](https://github.com/OKAMca/stack/commit/89bf4c0e))
|
|
9
|
+
- **stack-ui:** controlled state fix ([431d9b63](https://github.com/OKAMca/stack/commit/431d9b63))
|
|
10
|
+
- **stack-ui:** remove state from typing ([e3bbfc49](https://github.com/OKAMca/stack/commit/e3bbfc49))
|
|
11
|
+
- **stack-ui:** listbox clear all fix ([0fb6428a](https://github.com/OKAMca/stack/commit/0fb6428a))
|
|
12
|
+
- **stack-ui:** revert select change ([f884b2fa](https://github.com/OKAMca/stack/commit/f884b2fa))
|
|
13
|
+
- **stack-ui:** revert debounce delay, modal fixes ([b8422eb4](https://github.com/OKAMca/stack/commit/b8422eb4))
|
|
14
|
+
- **stack-ui:** add cursor-pointer ([cfce38fb](https://github.com/OKAMca/stack/commit/cfce38fb))
|
|
15
|
+
- **stack-ui:** combobox migration fixes ([69a02a6c](https://github.com/OKAMca/stack/commit/69a02a6c))
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- Marie-Maxime Tanguay @marie-maxime
|
|
20
|
+
- Max Hilland
|
|
21
|
+
|
|
22
|
+
## 2.0.2 (2026-02-27)
|
|
23
|
+
|
|
24
|
+
This was a version bump only for stack-ui to align it with other projects, there were no code changes.
|
|
25
|
+
|
|
26
|
+
## 2.0.1 (2026-02-27)
|
|
27
|
+
|
|
28
|
+
### 🩹 Fixes
|
|
29
|
+
|
|
30
|
+
- remove async from option render ([#418](https://github.com/OKAMca/stack/pull/418))
|
|
31
|
+
|
|
32
|
+
### ❤️ Thank You
|
|
33
|
+
|
|
34
|
+
- Marie-Maxime Tanguay @marie-maxime
|
|
35
|
+
|
|
1
36
|
# 2.0.0 (2026-02-05)
|
|
2
37
|
|
|
3
38
|
This was a version bump only for stack-ui to align it with other projects, there were no code changes.
|
|
@@ -22,7 +22,13 @@ export interface TComboBoxProps<I extends object = object, T extends TToken = TT
|
|
|
22
22
|
* @default 200
|
|
23
23
|
*/
|
|
24
24
|
debounceDelay?: number;
|
|
25
|
+
/**
|
|
26
|
+
* @description When true, the popover does not prevent scrolling and does not trap focus.
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
isNonModal?: boolean;
|
|
25
30
|
}
|
|
26
31
|
export interface TComboBoxButtonProps<T extends TToken = TToken> extends TButtonProps<T> {
|
|
27
32
|
state: ComboBoxState<object & TDefaultNodeComponent<object, TToken>>;
|
|
33
|
+
preventFocusOnPress?: boolean;
|
|
28
34
|
}
|
|
@@ -28,5 +28,5 @@ export interface TReactHookFormListBoxProps<I extends object = object, T extends
|
|
|
28
28
|
name: string;
|
|
29
29
|
selectionMode?: Exclude<AriaListBoxProps<I>['selectionMode'], 'none'>;
|
|
30
30
|
}
|
|
31
|
-
export interface TControlledReactHookFormListBoxProps<I extends object = object, T extends TToken = TToken> extends TReactHookFormListBoxProps<I, T>, Omit<TControlledListBoxFormProps<I, T>, 'children' | 'onBlur' | 'selectionMode'> {
|
|
31
|
+
export interface TControlledReactHookFormListBoxProps<I extends object = object, T extends TToken = TToken> extends TReactHookFormListBoxProps<I, T>, Omit<TControlledListBoxFormProps<I, T>, 'children' | 'onBlur' | 'selectionMode' | 'state'> {
|
|
32
32
|
}
|
package/index12.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react-aria"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react-aria"),s=require("./index82.js");function u(o){const{controller:t,activeIndex:r,slides:n}=s.useCarousel(),{params:e}=t??{};return{a11y:typeof e?.a11y=="object"?e.a11y:e?.a11y===!0?{enabled:!0}:void 0,announcerProps:a.mergeProps(o,{"aria-live":"polite",children:n?.[r]?.title??n?.[r]?.ariaLabel})}}exports.useCarouselA11yAnnouncer=u;
|
package/index12.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { mergeProps as
|
|
2
|
+
import { mergeProps as n } from "react-aria";
|
|
3
3
|
import { useCarousel as i } from "./index82.mjs";
|
|
4
|
-
function u(
|
|
5
|
-
const { controller:
|
|
4
|
+
function u(a) {
|
|
5
|
+
const { controller: t, activeIndex: r, slides: o } = i(), { params: e } = t ?? {};
|
|
6
6
|
return {
|
|
7
|
-
a11y:
|
|
8
|
-
announcerProps:
|
|
7
|
+
a11y: typeof e?.a11y == "object" ? e.a11y : e?.a11y === !0 ? { enabled: !0 } : void 0,
|
|
8
|
+
announcerProps: n(a, {
|
|
9
9
|
"aria-live": "polite",
|
|
10
|
-
children:
|
|
10
|
+
children: o?.[r]?.title ?? o?.[r]?.ariaLabel
|
|
11
11
|
})
|
|
12
12
|
};
|
|
13
13
|
}
|
package/index122.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";const r=require("react/jsx-runtime"),j=require("react-aria"),s=require("./index7.js"),$=require("./
|
|
2
|
+
"use strict";const r=require("react/jsx-runtime"),j=require("react-aria"),s=require("./index7.js"),$=require("./index171.js"),b=require("./index172.js"),B={narrow:{value:"narrow"},abbreviated:{value:"short",transform:e=>e.map(o=>o.slice(0,2))},short:{value:"short"},long:{value:"long"}};function v({themeName:e="calendar",customTheme:o,tokens:a,state:l,weekdayStyle:i="abbreviated",...c}){const{value:u,transform:y}=B[i],d=j.useCalendarGrid({...c,weekdayStyle:u},l),{gridProps:x,headerProps:h,weeksInMonth:m}=d,w=y?.(d.weekDays)??d.weekDays;return r.jsxs(s.Box,{as:"table",...x,themeName:`${e}.calendarTable`,tokens:a,children:[r.jsx(s.Box,{as:"thead",themeName:`${e}.calendarHeaderContainer`,...h,tokens:a,children:r.jsx(s.Box,{as:"tr",themeName:`${e}.calendarHeaderRow`,tokens:a,children:w.map(n=>r.jsx(s.Box,{as:"th",themeName:`${e}.calendarDayLabel`,tokens:a,children:n},`day-${n}`))})}),r.jsx(s.Box,{as:"tbody",themeName:`${e}.calendarBody`,tokens:a,children:[...Array.from({length:m}).keys()].map(n=>r.jsx(s.Box,{as:"tr",themeName:`${e}.calendarWeekRow`,tokens:a,children:l.getDatesInWeek(n).map((t,p)=>{if(t==null)return r.jsx(s.Box,{themeName:`${e}.calendarCellContainer`,tokens:{isEmpty:!0,...a},as:"td"},p);const g=$.getIsDateOutsideRange(t,l);return r.jsx(b,{themeName:e,tokens:{isOutsideRange:g,isEmpty:!1,...a},state:l,date:t},t?.day)})},`week-${n}`))})]})}module.exports=v;
|
package/index122.mjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { useCalendarGrid as g } from "react-aria";
|
|
4
4
|
import { Box as l } from "./index7.mjs";
|
|
5
|
-
import { getIsDateOutsideRange as v } from "./
|
|
6
|
-
import C from "./
|
|
5
|
+
import { getIsDateOutsideRange as v } from "./index171.mjs";
|
|
6
|
+
import C from "./index172.mjs";
|
|
7
7
|
const k = {
|
|
8
8
|
narrow: {
|
|
9
9
|
value: "narrow"
|
package/index127.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),c=require("react"),i=require("./index8.js");function t({ref:s,...o}){const{state:d,handlePress:e,...r}=o,n=c.useCallback(a=>{e?.(a)},[e]);return u.jsx(i.ButtonWithForwardRef,{...r,ref:s,handlePress:n})}t.displayName="ComboBoxButton";module.exports=t;
|
package/index127.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as m } from "react";
|
|
3
|
-
import { ButtonWithForwardRef as
|
|
4
|
-
function
|
|
5
|
-
const { state:
|
|
6
|
-
(
|
|
7
|
-
o
|
|
3
|
+
import { ButtonWithForwardRef as l } from "./index8.mjs";
|
|
4
|
+
function u({ ref: t, ...r }) {
|
|
5
|
+
const { state: d, handlePress: o, ...e } = r, s = m(
|
|
6
|
+
(a) => {
|
|
7
|
+
o?.(a);
|
|
8
8
|
},
|
|
9
|
-
[
|
|
9
|
+
[o]
|
|
10
10
|
);
|
|
11
|
-
return /* @__PURE__ */ l
|
|
11
|
+
return /* @__PURE__ */ n(l, { ...e, ref: t, handlePress: s });
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
u.displayName = "ComboBoxButton";
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
u as default
|
|
16
16
|
};
|
package/index131.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("react"),h=require("react-aria"),$=require("./index88.js"),u=require("./index7.js"),f=require("./index74.js"),B=require("./
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("react"),h=require("react-aria"),$=require("./index88.js"),u=require("./index7.js"),f=require("./index74.js"),B=require("./index170.js");function l({item:o,state:i,themeName:n="li"}){const r=p.useRef(null),{optionProps:e,isFocusVisible:c}=h.useOption({key:o.key},i,r),a=$(n);return t.jsx(f.TypographyWithForwardRef,{as:"li",...e,tokens:{className:`${a} ${c?"has-focus-ring":""}`},ref:r,children:o.rendered})}function x(o){const{children:i,listBoxRef:n,themeName:r,...e}=o;return t.jsx(h.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:!0,children:t.jsx(u.BoxWithForwardRef,{...e,ref:n,as:"ul",themeName:`${r}.ul`,children:i})})}function k(o){const i=p.useRef(null),{listBoxRef:n=i,state:r,themeName:e="option",optionsWithHeaders:c}=o,{listBoxProps:a}=h.useListBox(o,r,n),d=Array.from(r.collection),y=B.getListboxSections(d,c??[]);return c?.some(s=>s.key?.includes("header-"))?t.jsx(x,{...a,listBoxRef:n,themeName:e,children:y.map(s=>{const j=s.header!=null?`section-${s.header.key}`:`section-${s.items[0]?.key??"empty"}`;return t.jsx(u.Box,{as:"li",themeName:`${e}.group`,children:t.jsxs(u.Box,{as:"section",themeName:`${e}.section`,children:[s.header!=null&&t.jsx(f.Typography,{as:"header",themeName:`${e}.headerText`,children:s.header.rendered},s.header.key),t.jsx(u.Box,{as:"ul",themeName:`${e}.list`,children:s.items.map(m=>t.jsx(l,{themeName:`${e}.li`,item:m,state:r},String(m.key)))})]})},j)})}):t.jsx(x,{...a,listBoxRef:n,themeName:e,children:d.map(s=>t.jsx(l,{themeName:`${e}.li`,item:s,state:r},s.key))})}exports.ListBox=k;exports.Option=l;
|
package/index131.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { useListBox as $, FocusScope as N, useOption as k } from "react-aria";
|
|
|
5
5
|
import B from "./index88.mjs";
|
|
6
6
|
import { Box as c, BoxWithForwardRef as g } from "./index7.mjs";
|
|
7
7
|
import { Typography as F, TypographyWithForwardRef as R } from "./index74.mjs";
|
|
8
|
-
import { getListboxSections as L } from "./
|
|
8
|
+
import { getListboxSections as L } from "./index170.mjs";
|
|
9
9
|
function u({ item: s, state: i, themeName: n = "li" }) {
|
|
10
10
|
const t = p(null), { optionProps: e, isFocusVisible: a } = k({ key: s.key }, i, t), m = B(n);
|
|
11
11
|
return /* @__PURE__ */ r(
|
package/index151.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
"use strict";const o=require("tailwind-variants"),i=require("./index146.js"),n=require("./index155.js"),t=require("./index168.js"),
|
|
1
|
+
"use strict";const o=require("tailwind-variants"),i=require("./index146.js"),n=require("./index155.js"),t=require("./index168.js"),r=o.tv({base:[i.base,`
|
|
2
2
|
px-4
|
|
3
3
|
py-2
|
|
4
|
+
cursor-pointer
|
|
4
5
|
text-white
|
|
5
6
|
bg-color-1-500
|
|
6
|
-
`],variants:{isOpen:{true:"pointer-events-none",false:"hover:bg-color-1-400 active:bg-color-1-400"}}}),
|
|
7
|
+
`],variants:{isOpen:{true:"pointer-events-none",false:"hover:bg-color-1-400 active:bg-color-1-400"}}}),l={wrapper:()=>"flex flex-col gap-4 relative",label:e=>t({...e,className:"text-gray-3"}),container:()=>"flex flex-col gap-4",inputWrapper:()=>"relative flex items-center outline outline-2 outline-gray-300 focus-within:outline focus-within:outline-black focus-within:outline-2 [&>input]:flex-1 [&>input]:min-w-0 [&>input]:pr-10 [&>input]:border-0 [&>input]:outline-0 [&>input]:bg-transparent [&>input]:text-ellipsis [&>input]:whitespace-nowrap [&>input]:overflow-hidden",button:r,popover:{popover:()=>"w-[var(--comboBox-popover-container-width)] max-h-[300px] overflow-y-auto overflow-x-hidden text-white !bg-color-1-500 rounded-md p-2"},listContainer:e=>t({...e,className:"outline outline-2 outline-white outline-offset-2 p-2 my-4 rounded-md w-full flex flex-col gap-6 max-h-[300px] overflow-y-auto overflow-x-hidden"}),ul:e=>t({...e,className:"w-full flex flex-col gap-6"}),li:()=>"transition w-full hover:text-gray-300 focus-ring-white",group:()=>"flex flex-col gap-4",section:()=>"flex flex-col gap-4",list:{...n},headerText:()=>"text-gray-300",noResults:()=>"p-4 text-center",noResultsText:e=>t({...e,className:"text-gray-400"}),errorMessage:e=>t({...e,size:"footnotes",isError:!0})};module.exports=l;
|
package/index151.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { tv as t } from "tailwind-variants";
|
|
2
2
|
import l from "./index146.mjs";
|
|
3
|
-
import
|
|
3
|
+
import r from "./index155.mjs";
|
|
4
4
|
import o from "./index168.mjs";
|
|
5
|
-
const
|
|
5
|
+
const i = t({
|
|
6
6
|
base: [
|
|
7
7
|
l.base,
|
|
8
8
|
`
|
|
9
9
|
px-4
|
|
10
10
|
py-2
|
|
11
|
+
cursor-pointer
|
|
11
12
|
text-white
|
|
12
13
|
bg-color-1-500
|
|
13
14
|
`
|
|
@@ -23,7 +24,7 @@ const r = t({
|
|
|
23
24
|
label: (e) => o({ ...e, className: "text-gray-3" }),
|
|
24
25
|
container: () => "flex flex-col gap-4",
|
|
25
26
|
inputWrapper: () => "relative flex items-center outline outline-2 outline-gray-300 focus-within:outline focus-within:outline-black focus-within:outline-2 [&>input]:flex-1 [&>input]:min-w-0 [&>input]:pr-10 [&>input]:border-0 [&>input]:outline-0 [&>input]:bg-transparent [&>input]:text-ellipsis [&>input]:whitespace-nowrap [&>input]:overflow-hidden",
|
|
26
|
-
button:
|
|
27
|
+
button: i,
|
|
27
28
|
popover: {
|
|
28
29
|
popover: () => "w-[var(--comboBox-popover-container-width)] max-h-[300px] overflow-y-auto overflow-x-hidden text-white !bg-color-1-500 rounded-md p-2"
|
|
29
30
|
},
|
|
@@ -39,7 +40,7 @@ const r = t({
|
|
|
39
40
|
group: () => "flex flex-col gap-4",
|
|
40
41
|
section: () => "flex flex-col gap-4",
|
|
41
42
|
list: {
|
|
42
|
-
...
|
|
43
|
+
...r
|
|
43
44
|
},
|
|
44
45
|
headerText: () => "text-gray-300",
|
|
45
46
|
noResults: () => "p-4 text-center",
|
package/index17.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react-aria"),f=require("./index82.js");function h(i){const{isDisabled:l,handlePress:d,...u}=i,{controller:r,nextNavigationRef:c,id:p,activeIndex:a}=f.useCarousel(),{params:s,slides:o}=r??{},{slidesPerView:e,loop:g}=s??{},b=typeof s?.a11y=="object"?s.a11y:void 0,x=Math.round(typeof e=="number"?(a+1)/e:a),P=Math.round(o!=null&&typeof e=="number"?o.length/e:o?.length??1),v=x<P,t=l||!g&&!v,{pressProps:y}=n.usePress({onPress:N=>{r?.slideNext(),d?.(N)},isDisabled:t});return{isDisabled:t,navigationProps:n.mergeProps(y,{"aria-disabled":t,"aria-controls":p,"aria-label":b?.nextSlideMessage},u),ref:c}}exports.useCarouselNextNavigation=h;
|
package/index17.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { usePress as h, mergeProps as
|
|
3
|
-
import { useCarousel as
|
|
2
|
+
import { usePress as h, mergeProps as v } from "react-aria";
|
|
3
|
+
import { useCarousel as y } from "./index82.mjs";
|
|
4
4
|
function M(a) {
|
|
5
|
-
const { isDisabled: i, handlePress: l, ...d } = a, { controller:
|
|
6
|
-
typeof e == "number" ? (
|
|
7
|
-
),
|
|
8
|
-
|
|
9
|
-
),
|
|
10
|
-
onPress: (
|
|
11
|
-
|
|
5
|
+
const { isDisabled: i, handlePress: l, ...d } = a, { controller: r, nextNavigationRef: c, id: p, activeIndex: n } = y(), { params: s, slides: o } = r ?? {}, { slidesPerView: e, loop: u } = s ?? {}, g = typeof s?.a11y == "object" ? s.a11y : void 0, b = Math.round(
|
|
6
|
+
typeof e == "number" ? (n + 1) / e : n
|
|
7
|
+
), f = Math.round(
|
|
8
|
+
o != null && typeof e == "number" ? o.length / e : o?.length ?? 1
|
|
9
|
+
), m = b < f, t = i || !u && !m, { pressProps: x } = h({
|
|
10
|
+
onPress: (P) => {
|
|
11
|
+
r?.slideNext(), l?.(P);
|
|
12
12
|
},
|
|
13
|
-
isDisabled:
|
|
13
|
+
isDisabled: t
|
|
14
14
|
});
|
|
15
15
|
return {
|
|
16
|
-
isDisabled:
|
|
17
|
-
navigationProps:
|
|
18
|
-
|
|
16
|
+
isDisabled: t,
|
|
17
|
+
navigationProps: v(
|
|
18
|
+
x,
|
|
19
19
|
{
|
|
20
|
-
"aria-disabled":
|
|
20
|
+
"aria-disabled": t,
|
|
21
21
|
"aria-controls": p,
|
|
22
22
|
"aria-label": g?.nextSlideMessage
|
|
23
23
|
},
|
package/index170.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(o,r){const i=[];let e=null;const s=[];for(const t of r){const u=t.key==="header"||t.key?.toString().includes("header-"),n=o.find(l=>typeof l.rendered!="string"?!1:l.rendered===t.value);u?(e!=null&&i.push(e),e={header:{key:t.key,rendered:t.value},items:[]}):e!=null?n!=null&&e.items.push(n):n!=null&&s.push(n)}return e!=null&&i.push(e),[...s.length>0?[{items:s}]:[],...i]}exports.getListboxSections=c;
|
package/index170.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
function r
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
1
|
+
function d(r, o) {
|
|
2
|
+
const l = [];
|
|
3
|
+
let e = null;
|
|
4
|
+
const s = [];
|
|
5
|
+
for (const n of o) {
|
|
6
|
+
const u = n.key === "header" || n.key?.toString().includes("header-"), t = r.find((i) => typeof i.rendered != "string" ? !1 : i.rendered === n.value);
|
|
7
|
+
u ? (e != null && l.push(e), e = { header: { key: n.key, rendered: n.value }, items: [] }) : e != null ? t != null && e.items.push(t) : t != null && s.push(t);
|
|
8
|
+
}
|
|
9
|
+
return e != null && l.push(e), [...s.length > 0 ? [{ items: s }] : [], ...l];
|
|
6
10
|
}
|
|
7
11
|
export {
|
|
8
|
-
|
|
12
|
+
d as getListboxSections
|
|
9
13
|
};
|
package/index171.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use
|
|
2
|
-
"use strict";const o=require("react/jsx-runtime"),i=require("@internationalized/date"),B=require("react"),n=require("react-aria"),c=require("./index7.js");function F(r){const{themeName:a="calendar",tokens:R,state:d,date:e}=r,u=B.useRef(null),{isUnavailable:k,cellProps:y,buttonProps:b,isSelected:t,isOutsideVisibleRange:h,isDisabled:C,formattedDate:S,isInvalid:q}=n.useCalendarCell(r,d,u),s=d?.highlightedRange,m=s?.start,f=s?.end,g=s!=null&&m!=null?i.isSameDay(e,m):t,x=s!=null&&f!=null?i.isSameDay(e,f):t,{locale:j}=n.useLocale(),D=i.getDayOfWeek(e,j),N=t&&(g||D===0||e.day===1),P=t&&(x||D===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:$,isFocusVisible:p}=n.useFocusRing(),l={isInvalid:q,isDisabled:C,isUnavailable:k,isSelected:t,isFocusVisible:p,isOutsideVisibleRange:h,...R};return o.jsx(c.Box,{as:"td",...y,"aria-disabled":!1,themeName:`${a}.cellContainer`,tokens:l,children:o.jsx(c.BoxWithForwardRef,{...n.mergeProps(b,$),ref:u,"aria-hidden":h,themeName:`${a}.cell`,tokens:{...l,isRoundedLeft:N,isRoundedRight:P},children:o.jsx(c.Box,{themeName:`${a}.cellDate`,tokens:{...l,isSelectionStart:g,isSelectionEnd:x},children:S})})})}module.exports=F;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(e,u){if(e==null)return!1;const{minValue:t,maxValue:n}=u;return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}exports.getIsDateOutsideRange=l;
|
package/index171.mjs
CHANGED
|
@@ -1,50 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { Box as p, BoxWithForwardRef as V } from "./index7.mjs";
|
|
7
|
-
function U(l) {
|
|
8
|
-
const { themeName: s = "calendar", tokens: D, state: i, date: e } = l, r = $(null), {
|
|
9
|
-
isUnavailable: R,
|
|
10
|
-
cellProps: k,
|
|
11
|
-
buttonProps: b,
|
|
12
|
-
isSelected: t,
|
|
13
|
-
isOutsideVisibleRange: c,
|
|
14
|
-
isDisabled: y,
|
|
15
|
-
formattedDate: C,
|
|
16
|
-
isInvalid: S
|
|
17
|
-
} = v(l, i, r), n = i?.highlightedRange, d = n?.start, m = n?.end, u = n != null && d != null ? g(e, d) : t, f = n != null && m != null ? g(e, m) : t, { locale: x } = B(), h = W(e, x), N = t && (u || h === 0 || e.day === 1), P = t && (f || h === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: F, isFocusVisible: O } = I(), a = {
|
|
18
|
-
isInvalid: S,
|
|
19
|
-
isDisabled: y,
|
|
20
|
-
isUnavailable: R,
|
|
21
|
-
isSelected: t,
|
|
22
|
-
isFocusVisible: O,
|
|
23
|
-
isOutsideVisibleRange: c,
|
|
24
|
-
...D
|
|
25
|
-
};
|
|
26
|
-
return /* @__PURE__ */ o(
|
|
27
|
-
p,
|
|
28
|
-
{
|
|
29
|
-
as: "td",
|
|
30
|
-
...k,
|
|
31
|
-
"aria-disabled": !1,
|
|
32
|
-
themeName: `${s}.cellContainer`,
|
|
33
|
-
tokens: a,
|
|
34
|
-
children: /* @__PURE__ */ o(
|
|
35
|
-
V,
|
|
36
|
-
{
|
|
37
|
-
...L(b, F),
|
|
38
|
-
ref: r,
|
|
39
|
-
"aria-hidden": c,
|
|
40
|
-
themeName: `${s}.cell`,
|
|
41
|
-
tokens: { ...a, isRoundedLeft: N, isRoundedRight: P },
|
|
42
|
-
children: /* @__PURE__ */ o(p, { themeName: `${s}.cellDate`, tokens: { ...a, isSelectionStart: u, isSelectionEnd: f }, children: C })
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
);
|
|
1
|
+
function r(e, u) {
|
|
2
|
+
if (e == null)
|
|
3
|
+
return !1;
|
|
4
|
+
const { minValue: n, maxValue: l } = u;
|
|
5
|
+
return n != null && e.compare(n) < 0 || l != null && e.compare(l) > 0;
|
|
47
6
|
}
|
|
48
7
|
export {
|
|
49
|
-
|
|
8
|
+
r as getIsDateOutsideRange
|
|
50
9
|
};
|
package/index172.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";const o=require("react/jsx-runtime"),i=require("@internationalized/date"),B=require("react"),n=require("react-aria"),c=require("./index7.js");function F(r){const{themeName:a="calendar",tokens:R,state:d,date:e}=r,u=B.useRef(null),{isUnavailable:k,cellProps:y,buttonProps:b,isSelected:t,isOutsideVisibleRange:h,isDisabled:C,formattedDate:S,isInvalid:q}=n.useCalendarCell(r,d,u),s=d?.highlightedRange,m=s?.start,f=s?.end,g=s!=null&&m!=null?i.isSameDay(e,m):t,x=s!=null&&f!=null?i.isSameDay(e,f):t,{locale:j}=n.useLocale(),D=i.getDayOfWeek(e,j),N=t&&(g||D===0||e.day===1),P=t&&(x||D===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:$,isFocusVisible:p}=n.useFocusRing(),l={isInvalid:q,isDisabled:C,isUnavailable:k,isSelected:t,isFocusVisible:p,isOutsideVisibleRange:h,...R};return o.jsx(c.Box,{as:"td",...y,"aria-disabled":!1,themeName:`${a}.cellContainer`,tokens:l,children:o.jsx(c.BoxWithForwardRef,{...n.mergeProps(b,$),ref:u,"aria-hidden":h,themeName:`${a}.cell`,tokens:{...l,isRoundedLeft:N,isRoundedRight:P},children:o.jsx(c.Box,{themeName:`${a}.cellDate`,tokens:{...l,isSelectionStart:g,isSelectionEnd:x},children:S})})})}module.exports=F;
|
package/index172.mjs
CHANGED
|
@@ -1,13 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { isSameDay as g, getDayOfWeek as W } from "@internationalized/date";
|
|
4
|
+
import { useRef as $ } from "react";
|
|
5
|
+
import { useCalendarCell as v, useLocale as B, useFocusRing as I, mergeProps as L } from "react-aria";
|
|
6
|
+
import { Box as p, BoxWithForwardRef as V } from "./index7.mjs";
|
|
7
|
+
function U(l) {
|
|
8
|
+
const { themeName: s = "calendar", tokens: D, state: i, date: e } = l, r = $(null), {
|
|
9
|
+
isUnavailable: R,
|
|
10
|
+
cellProps: k,
|
|
11
|
+
buttonProps: b,
|
|
12
|
+
isSelected: t,
|
|
13
|
+
isOutsideVisibleRange: c,
|
|
14
|
+
isDisabled: y,
|
|
15
|
+
formattedDate: C,
|
|
16
|
+
isInvalid: S
|
|
17
|
+
} = v(l, i, r), n = i?.highlightedRange, d = n?.start, m = n?.end, u = n != null && d != null ? g(e, d) : t, f = n != null && m != null ? g(e, m) : t, { locale: x } = B(), h = W(e, x), N = t && (u || h === 0 || e.day === 1), P = t && (f || h === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: F, isFocusVisible: O } = I(), a = {
|
|
18
|
+
isInvalid: S,
|
|
19
|
+
isDisabled: y,
|
|
20
|
+
isUnavailable: R,
|
|
21
|
+
isSelected: t,
|
|
22
|
+
isFocusVisible: O,
|
|
23
|
+
isOutsideVisibleRange: c,
|
|
24
|
+
...D
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ o(
|
|
27
|
+
p,
|
|
28
|
+
{
|
|
29
|
+
as: "td",
|
|
30
|
+
...k,
|
|
31
|
+
"aria-disabled": !1,
|
|
32
|
+
themeName: `${s}.cellContainer`,
|
|
33
|
+
tokens: a,
|
|
34
|
+
children: /* @__PURE__ */ o(
|
|
35
|
+
V,
|
|
36
|
+
{
|
|
37
|
+
...L(b, F),
|
|
38
|
+
ref: r,
|
|
39
|
+
"aria-hidden": c,
|
|
40
|
+
themeName: `${s}.cell`,
|
|
41
|
+
tokens: { ...a, isRoundedLeft: N, isRoundedRight: P },
|
|
42
|
+
children: /* @__PURE__ */ o(p, { themeName: `${s}.cellDate`, tokens: { ...a, isSelectionStart: u, isSelectionEnd: f }, children: C })
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
);
|
|
10
47
|
}
|
|
11
48
|
export {
|
|
12
|
-
|
|
49
|
+
U as default
|
|
13
50
|
};
|
package/index18.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react-aria"),b=require("./index82.js");function y(r){const{isDisabled:o,handlePress:i,...t}=r,{controller:e,prevNavigationRef:n,id:l,activeIndex:c}=b.useCarousel(),{params:d}=e??{},u=typeof e?.params?.a11y=="object"?e.params.a11y:void 0,{loop:v}=d??{},p=c>0,s=o||!v&&!p,{pressProps:P}=a.usePress({onPress:g=>{e?.slidePrev(),i?.(g)},isDisabled:s});return{isDisabled:s,navigationProps:a.mergeProps(P,{"aria-disabled":s,"aria-controls":l,"aria-label":u?.prevSlideMessage},t),ref:n}}exports.useCarouselPrevNavigation=y;
|
package/index18.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { usePress as u, mergeProps as
|
|
3
|
-
import { useCarousel as
|
|
4
|
-
function
|
|
5
|
-
const { isDisabled: o, handlePress:
|
|
2
|
+
import { usePress as u, mergeProps as b } from "react-aria";
|
|
3
|
+
import { useCarousel as f } from "./index82.mjs";
|
|
4
|
+
function D(a) {
|
|
5
|
+
const { isDisabled: o, handlePress: r, ...i } = a, { controller: s, prevNavigationRef: t, id: n, activeIndex: l } = f(), { params: p } = s ?? {}, c = typeof s?.params?.a11y == "object" ? s.params.a11y : void 0, { loop: d } = p ?? {}, v = l > 0, e = o || !d && !v, { pressProps: P } = u({
|
|
6
6
|
onPress: (m) => {
|
|
7
|
-
s?.slidePrev(),
|
|
7
|
+
s?.slidePrev(), r?.(m);
|
|
8
8
|
},
|
|
9
9
|
isDisabled: e
|
|
10
10
|
});
|
|
11
11
|
return {
|
|
12
12
|
isDisabled: e,
|
|
13
|
-
navigationProps:
|
|
13
|
+
navigationProps: b(
|
|
14
14
|
P,
|
|
15
15
|
{
|
|
16
16
|
"aria-disabled": e,
|
|
@@ -23,5 +23,5 @@ function N(r) {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
D as useCarouselPrevNavigation
|
|
27
27
|
};
|
package/index26.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("radashi"),o=require("react"),y=require("react-aria");function v(e,s){if(s.current==null||e==null)return[];const{slideClass:l="swiper-slide"}=e.params;return s.current?.className.split(" ").filter(i=>i.indexOf("swiper-slide")===0||i.indexOf(l)===0)}function w(e){const{title:s,id:l,ariaLabel:n,"aria-label":i,children:g,swiperSlideIndex:P,swiper:t,...d}=e,u=typeof t?.params?.a11y=="object"?t.params.a11y:void 0,{itemRoleDescriptionMessage:p="slide",slideRole:b="group"}=u??{},f=!m.isEmpty(s),a=o.useRef(null),c=o.useMemo(()=>{const r=v(t,a);return{isActive:r?.includes("swiper-slide-active"),isVisible:r?.includes("swiper-slide-visible"),isPrev:r?.includes("swiper-slide-prev"),isNext:r?.includes("swiper-slide-next")}},[a.current]);return{ref:a,slideProps:y.mergeProps(d,{...f?{"aria-labelledby":l}:{"aria-label":n??i},"aria-roledescription":p??void 0,role:b,inert:`!${c.isVisible}`}),titleProps:{},...c}}exports.useCarouselSlide=w;
|
package/index26.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { isEmpty as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { mergeProps as
|
|
5
|
-
function
|
|
2
|
+
import { isEmpty as b } from "radashi";
|
|
3
|
+
import { useRef as f, useMemo as w } from "react";
|
|
4
|
+
import { mergeProps as v } from "react-aria";
|
|
5
|
+
function y(e, s) {
|
|
6
6
|
if (s.current == null || e == null)
|
|
7
7
|
return [];
|
|
8
8
|
const { slideClass: l = "swiper-slide" } = e.params;
|
|
9
9
|
return s.current?.className.split(" ").filter((i) => i.indexOf("swiper-slide") === 0 || i.indexOf(l) === 0);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function R(e) {
|
|
12
12
|
const {
|
|
13
13
|
title: s,
|
|
14
14
|
id: l,
|
|
@@ -16,23 +16,23 @@ function L(e) {
|
|
|
16
16
|
"aria-label": i,
|
|
17
17
|
children: x,
|
|
18
18
|
swiperSlideIndex: g,
|
|
19
|
-
swiper:
|
|
19
|
+
swiper: t,
|
|
20
20
|
...c
|
|
21
|
-
} = e, { itemRoleDescriptionMessage:
|
|
22
|
-
const r =
|
|
21
|
+
} = e, d = typeof t?.params?.a11y == "object" ? t.params.a11y : void 0, { itemRoleDescriptionMessage: p = "slide", slideRole: u = "group" } = d ?? {}, m = !b(s), a = f(null), o = w(() => {
|
|
22
|
+
const r = y(t, a);
|
|
23
23
|
return {
|
|
24
24
|
isActive: r?.includes("swiper-slide-active"),
|
|
25
25
|
isVisible: r?.includes("swiper-slide-visible"),
|
|
26
26
|
isPrev: r?.includes("swiper-slide-prev"),
|
|
27
27
|
isNext: r?.includes("swiper-slide-next")
|
|
28
28
|
};
|
|
29
|
-
}, [
|
|
29
|
+
}, [a.current]);
|
|
30
30
|
return {
|
|
31
|
-
ref:
|
|
32
|
-
slideProps:
|
|
33
|
-
...
|
|
34
|
-
"aria-roledescription":
|
|
35
|
-
role:
|
|
31
|
+
ref: a,
|
|
32
|
+
slideProps: v(c, {
|
|
33
|
+
...m ? { "aria-labelledby": l } : { "aria-label": n ?? i },
|
|
34
|
+
"aria-roledescription": p ?? void 0,
|
|
35
|
+
role: u,
|
|
36
36
|
inert: `!${o.isVisible}`
|
|
37
37
|
}),
|
|
38
38
|
titleProps: {},
|
|
@@ -40,5 +40,5 @@ function L(e) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
R as useCarouselSlide
|
|
44
44
|
};
|
package/index27.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@react-aria/utils"),v=require("react-aria"),P=require("swiper/modules"),S=require("./index82.js");function M(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const x=M(P),O=["A11y","Controller"],j="Pagination";function C(e){const{children:n,...r}=e,{controller:t,setController:a,modules:s,slides:l,id:c,nextNavigationRef:u,prevNavigationRef:p,swiperProps:d,swiperRef:f,setActiveIndex:g}=S.useCarousel(),i=typeof t?.params?.a11y=="object"?t.params.a11y:void 0,b=[...s?.filter(o=>o!==j)??[],...O].map(o=>x[o]),{containerRoleDescriptionMessage:w="carousel"}=i??{},y={navigation:{nextEl:u.current,prevEl:p.current,enabled:s?.includes("Navigation")},id:c,watchSlidesProgress:!0,role:"group",onSwiper:a,onSlideChange:o=>{g(o.activeIndex)},modules:b,keyboard:{enabled:!0,onlyInViewport:!1},a11y:{enabled:!0,...i},"aria-roledescription":w??void 0,tabIndex:0};return{swiperProps:v.mergeProps(d,y,m.filterDOMProps(r)),slides:l,ref:f}}exports.useCarouselSwiper=C;
|
package/index27.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { filterDOMProps as
|
|
3
|
-
import { mergeProps as
|
|
4
|
-
import * as
|
|
5
|
-
import { useCarousel as
|
|
6
|
-
const b = ["A11y", "Controller"],
|
|
7
|
-
function h(
|
|
8
|
-
const { children: C, ...
|
|
9
|
-
controller:
|
|
10
|
-
setController:
|
|
2
|
+
import { filterDOMProps as w } from "@react-aria/utils";
|
|
3
|
+
import { mergeProps as y } from "react-aria";
|
|
4
|
+
import * as P from "swiper/modules";
|
|
5
|
+
import { useCarousel as x } from "./index82.mjs";
|
|
6
|
+
const b = ["A11y", "Controller"], M = "Pagination";
|
|
7
|
+
function h(s) {
|
|
8
|
+
const { children: C, ...i } = s, {
|
|
9
|
+
controller: o,
|
|
10
|
+
setController: n,
|
|
11
11
|
modules: r,
|
|
12
12
|
slides: a,
|
|
13
13
|
id: l,
|
|
@@ -16,9 +16,9 @@ function h(t) {
|
|
|
16
16
|
swiperProps: c,
|
|
17
17
|
swiperRef: u,
|
|
18
18
|
setActiveIndex: m
|
|
19
|
-
} =
|
|
20
|
-
(e) =>
|
|
21
|
-
), { containerRoleDescriptionMessage: g = "carousel" } =
|
|
19
|
+
} = x(), t = typeof o?.params?.a11y == "object" ? o.params.a11y : void 0, f = [...r?.filter((e) => e !== M) ?? [], ...b].map(
|
|
20
|
+
(e) => P[e]
|
|
21
|
+
), { containerRoleDescriptionMessage: g = "carousel" } = t ?? {}, v = {
|
|
22
22
|
navigation: {
|
|
23
23
|
nextEl: p.current,
|
|
24
24
|
prevEl: d.current,
|
|
@@ -27,7 +27,7 @@ function h(t) {
|
|
|
27
27
|
id: l,
|
|
28
28
|
watchSlidesProgress: !0,
|
|
29
29
|
role: "group",
|
|
30
|
-
onSwiper:
|
|
30
|
+
onSwiper: n,
|
|
31
31
|
onSlideChange: (e) => {
|
|
32
32
|
m(e.activeIndex);
|
|
33
33
|
},
|
|
@@ -38,13 +38,13 @@ function h(t) {
|
|
|
38
38
|
},
|
|
39
39
|
a11y: {
|
|
40
40
|
enabled: !0,
|
|
41
|
-
...
|
|
41
|
+
...t
|
|
42
42
|
},
|
|
43
43
|
"aria-roledescription": g ?? void 0,
|
|
44
44
|
tabIndex: 0
|
|
45
45
|
};
|
|
46
46
|
return {
|
|
47
|
-
swiperProps:
|
|
47
|
+
swiperProps: y(c, v, w(i)),
|
|
48
48
|
slides: a,
|
|
49
49
|
ref: u
|
|
50
50
|
};
|