@commercetools/nimbus 0.0.0-canary-20250922093037 → 0.0.0-canary-20250922155413
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/chunks/field-errors-CcQ1ssQj.es.js +225 -0
- package/dist/chunks/field-errors-CcQ1ssQj.es.js.map +1 -0
- package/dist/chunks/field-errors-Rzp3VbWz.cjs.js +2 -0
- package/dist/chunks/field-errors-Rzp3VbWz.cjs.js.map +1 -0
- package/dist/chunks/form-field-DHvafAwV.cjs.js +11 -0
- package/dist/chunks/form-field-DHvafAwV.cjs.js.map +1 -0
- package/dist/chunks/{form-field-DMs36b56.es.js → form-field-DIUXRuTp.es.js} +20 -19
- package/dist/chunks/form-field-DIUXRuTp.es.js.map +1 -0
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +164 -161
- package/dist/components/components.es.js.map +1 -1
- package/dist/components/field-errors.cjs +2 -0
- package/dist/components/field-errors.cjs.map +1 -0
- package/dist/components/field-errors.es.js +6 -0
- package/dist/components/field-errors.es.js.map +1 -0
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components.d.ts +114 -0
- package/dist/field-errors.d.ts +127 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +114 -0
- package/dist/index.es.js +185 -182
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunks/form-field-DMs36b56.es.js.map +0 -1
- package/dist/chunks/form-field-cwK6KNEG.cjs.js +0 -11
- package/dist/chunks/form-field-cwK6KNEG.cjs.js.map +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* # FieldErrors
|
|
6
|
+
*
|
|
7
|
+
* Renders error messages based on error object configuration.
|
|
8
|
+
* Provides backwards compatibility with UI-Kit FieldErrors while integrating
|
|
9
|
+
* with Nimbus design system patterns.
|
|
10
|
+
*
|
|
11
|
+
* Supports custom error renderers and localized built-in error messages
|
|
12
|
+
* for common validation scenarios like missing required fields.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FieldErrors: {
|
|
15
|
+
({ id, errors, isVisible, renderError, renderDefaultError, customMessages, ...props }: FieldErrorsProps): JSX.Element | null;
|
|
16
|
+
displayName: string;
|
|
17
|
+
errorTypes: {
|
|
18
|
+
readonly MISSING: "missing";
|
|
19
|
+
readonly INVALID: "invalid";
|
|
20
|
+
readonly EMPTY: "empty";
|
|
21
|
+
readonly MIN_LENGTH: "min";
|
|
22
|
+
readonly MAX_LENGTH: "max";
|
|
23
|
+
readonly FORMAT: "format";
|
|
24
|
+
readonly DUPLICATE: "duplicate";
|
|
25
|
+
readonly NEGATIVE: "negative";
|
|
26
|
+
readonly FRACTIONS: "fractions";
|
|
27
|
+
readonly BELOW_MIN: "belowMin";
|
|
28
|
+
readonly ABOVE_MAX: "aboveMax";
|
|
29
|
+
readonly OUT_OF_RANGE: "outOfRange";
|
|
30
|
+
readonly INVALID_FROM_SERVER: "invalidFromServer";
|
|
31
|
+
readonly NOT_FOUND: "notFound";
|
|
32
|
+
readonly BLOCKED: "blocked";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Props for FieldErrors component
|
|
38
|
+
*/
|
|
39
|
+
export declare interface FieldErrorsProps {
|
|
40
|
+
/**
|
|
41
|
+
* ID of the error field for accessibility
|
|
42
|
+
*/
|
|
43
|
+
id?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Error object - only truthy values will be rendered
|
|
46
|
+
* Compatible with UI-Kit FieldErrors format
|
|
47
|
+
*/
|
|
48
|
+
errors?: TFieldErrors;
|
|
49
|
+
/**
|
|
50
|
+
* Whether error messages should be visible
|
|
51
|
+
* @deprecated This prop will be automatically handled by the component
|
|
52
|
+
*/
|
|
53
|
+
isVisible?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Custom error renderer function
|
|
56
|
+
* Return null to fall back to renderDefaultError or built-in errors
|
|
57
|
+
*/
|
|
58
|
+
renderError?: TErrorRenderer;
|
|
59
|
+
/**
|
|
60
|
+
* Default error renderer function for errors not handled by renderError
|
|
61
|
+
* Return null to fall back to built-in error handling
|
|
62
|
+
*/
|
|
63
|
+
renderDefaultError?: TErrorRenderer;
|
|
64
|
+
/**
|
|
65
|
+
* Custom error messages to override built-in ones
|
|
66
|
+
*/
|
|
67
|
+
customMessages?: {
|
|
68
|
+
missing?: ReactNode;
|
|
69
|
+
invalid?: ReactNode;
|
|
70
|
+
empty?: ReactNode;
|
|
71
|
+
min?: ReactNode;
|
|
72
|
+
max?: ReactNode;
|
|
73
|
+
format?: ReactNode;
|
|
74
|
+
duplicate?: ReactNode;
|
|
75
|
+
negative?: ReactNode;
|
|
76
|
+
fractions?: ReactNode;
|
|
77
|
+
belowMin?: ReactNode;
|
|
78
|
+
aboveMax?: ReactNode;
|
|
79
|
+
outOfRange?: ReactNode;
|
|
80
|
+
invalidFromServer?: ReactNode;
|
|
81
|
+
notFound?: ReactNode;
|
|
82
|
+
blocked?: ReactNode;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Built-in error types that FieldErrors can handle automatically
|
|
88
|
+
*/
|
|
89
|
+
export declare const FieldErrorTypes: {
|
|
90
|
+
readonly MISSING: "missing";
|
|
91
|
+
readonly INVALID: "invalid";
|
|
92
|
+
readonly EMPTY: "empty";
|
|
93
|
+
readonly MIN_LENGTH: "min";
|
|
94
|
+
readonly MAX_LENGTH: "max";
|
|
95
|
+
readonly FORMAT: "format";
|
|
96
|
+
readonly DUPLICATE: "duplicate";
|
|
97
|
+
readonly NEGATIVE: "negative";
|
|
98
|
+
readonly FRACTIONS: "fractions";
|
|
99
|
+
readonly BELOW_MIN: "belowMin";
|
|
100
|
+
readonly ABOVE_MAX: "aboveMax";
|
|
101
|
+
readonly OUT_OF_RANGE: "outOfRange";
|
|
102
|
+
readonly INVALID_FROM_SERVER: "invalidFromServer";
|
|
103
|
+
readonly NOT_FOUND: "notFound";
|
|
104
|
+
readonly BLOCKED: "blocked";
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Function to render custom error messages
|
|
109
|
+
*/
|
|
110
|
+
export declare type TErrorRenderer = (key: string, error?: boolean) => ReactNode;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Error object type - compatible with UI-Kit FieldErrors
|
|
114
|
+
* Only entries with truthy values will be rendered as errors
|
|
115
|
+
*/
|
|
116
|
+
export declare type TFieldErrors = Record<string, boolean>;
|
|
117
|
+
|
|
118
|
+
export { }
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
declare module "slate" {
|
|
122
|
+
interface CustomTypes {
|
|
123
|
+
Editor: BaseEditor & ReactEditor & HistoryEditor;
|
|
124
|
+
Element: CustomElement;
|
|
125
|
+
Text: CustomText;
|
|
126
|
+
}
|
|
127
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const ae=require("./chunks/avatar-C2KIWewd.cjs.js"),ie=require("./chunks/box-CWni3A32.cjs.js"),ue=require("./chunks/button-Dbf1b0F4.cjs.js"),le=require("./chunks/code-q31e3vT2.cjs.js"),B=require("./chunks/combobox-C9pPDZQn.cjs.js"),ce=require("./chunks/dialog-CVa-E9-A.cjs.js"),se=require("./chunks/group-Buy-O6Mr.cjs.js"),de=require("./chunks/icon-button-0GLW7WtL.cjs.js"),fe=require("./chunks/icon-toggle-button-tJAqRjak.cjs.js"),pe=require("./chunks/image-CGOYoc2s.cjs.js"),me=require("./chunks/kbd-DFeaXiKY.cjs.js"),ge=require("./chunks/link-DWa1zIUJ.cjs.js"),L=require("./chunks/list-DJC9BmoC.cjs.js"),ye=require("./chunks/simple-grid-Cd2MJxSX.cjs.js"),ve=require("./chunks/text-CCW9kDT_.cjs.js"),G=require("./chunks/tooltip-g8-hEdZp.cjs.js"),be=require("./chunks/make-element-focusable-bPAMXt4D.cjs.js"),Y=require("./chunks/nimbus-provider--E4ETLbz.cjs.js"),Ce=require("./chunks/checkbox-Bv0NXUyX.cjs.js"),he=require("./chunks/stack-CIN13EDn.cjs.js"),Te=require("./chunks/visually-hidden-Bh-G5QHv.cjs.js"),Se=require("./chunks/text-input-DgYI0-uU.cjs.js"),ke=require("./chunks/number-input-C-suceSs.cjs.js"),Ie=require("./chunks/grid-Chuw1xje.cjs.js"),w=require("./chunks/select-DA6mGi-n.cjs.js"),Re=require("./chunks/separator-CoMx0Mmv.cjs.js"),I=require("./chunks/accordion-xYvGyXy-.cjs.js"),R=require("./chunks/alert-CWTCM8-i.cjs.js"),qe=require("./chunks/badge-CCrBksXu.cjs.js"),M=require("./chunks/card-DeWTV05B.cjs.js"),S=require("./chunks/form-field-cwK6KNEG.cjs.js"),_e=require("./chunks/icon-BHx0r3NL.cjs.js"),we=require("./chunks/inline-svg-DbvmiSw9.cjs.js"),De=require("./chunks/loading-spinner-CSKBo1bM.cjs.js"),Ee=require("./chunks/password-input-Br-DbsF2.cjs.js"),xe=require("./chunks/split-button-DS-OCnNN.cjs.js"),Ae=require("./chunks/time-input-DOacr-Lo.cjs.js"),Be=require("./chunks/multiline-text-input-XW9WrmJi.cjs.js"),Le=require("./chunks/money-input-DXpiO23i.cjs.js"),N=require("./chunks/radio-input-D7oHngVQ.cjs.js"),Me=require("./chunks/switch-uAVIHIFM.cjs.js"),Fe=require("./chunks/tag-group-BfVRqsqw.cjs.js"),Pe=require("./chunks/toggle-button-CoA46qg6.cjs.js"),j=require("./chunks/toggle-button-group-DX134q7m.cjs.js"),He=require("./chunks/date-input-DYC1t1e-.cjs.js"),Oe=require("./chunks/calendar-CrTvsDQH.cjs.js"),Ke=require("./chunks/date-picker-_7Gh_ROw.cjs.js"),Ge=require("./chunks/progress-bar-CGfPZTdv.cjs.js"),Ne=require("./chunks/range-calendar-CWkeoOzl.cjs.js"),je=require("./chunks/date-range-picker-D7pPpSEj.cjs.js"),Ue=require("./chunks/toolbar-CRak3D0J.cjs.js"),Z=require("./chunks/rich-text-input-CxWC-yrf.cjs.js"),y=require("./chunks/data-table-DIsDZ5JZ.cjs.js"),Ve=require("./chunks/pagination-BM1xkmu9.cjs.js"),ze=require("./chunks/index-DX8-EG6B.cjs.js"),d=require("react"),ht=require("@chakra-ui/react/flex"),Tt=require("@chakra-ui/react/heading"),St=require("@chakra-ui/react/table"),h=require("./chunks/menu-cYj3HcOe.cjs.js");require("react/jsx-runtime");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K.apply(null,arguments)}var ee=["shift","alt","meta","mod","ctrl"],We={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function A(e){return(e&&We[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function $e(e){return ee.includes(e)}function F(e,t){return t===void 0&&(t=","),e.split(t)}function P(e,t,r){t===void 0&&(t="+");var n=e.toLocaleLowerCase().split(t).map(function(i){return A(i)}),c={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},a=n.filter(function(i){return!ee.includes(i)});return K({},c,{keys:a,description:r,hotkey:e})}var T=new Set;function U(e){return Array.isArray(e)}function Xe(e,t){t===void 0&&(t=",");var r=U(e)?e:e.split(t);return r.every(function(n){return T.has(n.trim().toLowerCase())})}function Je(e){var t=Array.isArray(e)?e:[e];T.has("meta")&&T.forEach(function(r){return!$e(r)&&T.delete(r.toLowerCase())}),t.forEach(function(r){return T.add(r.toLowerCase())})}function Qe(e){var t=Array.isArray(e)?e:[e];e==="meta"?T.clear():t.forEach(function(r){return T.delete(r.toLowerCase())})}function Ye(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function Ze(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}function et(e){return te(e,["input","textarea","select"])}function te(e,t){t===void 0&&(t=!1);var r=e.target,n=e.composed,c=null;return tt(r)&&n?c=e.composedPath()[0]&&e.composedPath()[0].tagName:c=r&&r.tagName,U(t)?!!(c&&t&&t.some(function(a){var i;return a.toLowerCase()===((i=c)==null?void 0:i.toLowerCase())})):!!(c&&t&&t)}function tt(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function rt(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(r){return t.includes(r)})||e.includes("*"):!0}var ot=function(t,r,n){n===void 0&&(n=!1);var c=r.alt,a=r.meta,i=r.mod,f=r.shift,u=r.ctrl,s=r.keys,C=t.key,v=t.code,l=t.ctrlKey,o=t.metaKey,q=t.shiftKey,m=t.altKey,g=A(v),b=C.toLowerCase();if(!(s!=null&&s.includes(g))&&!(s!=null&&s.includes(b))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(g))return!1;if(!n){if(c===!m&&b!=="alt"||f===!q&&b!=="shift")return!1;if(i){if(!o&&!l)return!1}else if(a===!o&&b!=="meta"&&b!=="os"||u===!l&&b!=="ctrl"&&b!=="control")return!1}return s&&s.length===1&&(s.includes(b)||s.includes(g))?!0:s?Xe(s):!s},nt=d.createContext(void 0),at=function(){return d.useContext(nt)};function re(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(r,n){return r&&re(e[n],t[n])},!0):e===t}var it=d.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),ut=function(){return d.useContext(it)};function lt(e){var t=d.useRef(void 0);return re(t.current,e)||(t.current=e),t.current}var X=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},ct=typeof window<"u"?d.useLayoutEffect:d.useEffect;function st(e,t,r,n){var c=d.useState(null),a=c[0],i=c[1],f=d.useRef(!1),u=r instanceof Array?n instanceof Array?void 0:n:r,s=U(e)?e.join(u?.splitKey):e,C=r instanceof Array?r:n instanceof Array?n:void 0,v=d.useCallback(t,C??[]),l=d.useRef(v);C?l.current=v:l.current=t;var o=lt(u),q=ut(),m=q.enabledScopes,g=at();return ct(function(){if(!(o?.enabled===!1||!rt(m,o?.scopes))){var b=function(p,E){var W;if(E===void 0&&(E=!1),!(et(p)&&!te(p,o?.enableOnFormTags))){if(a!==null){var x=a.getRootNode();if((x instanceof Document||x instanceof ShadowRoot)&&x.activeElement!==a&&!a.contains(x.activeElement)){X(p);return}}(W=p.target)!=null&&W.isContentEditable&&!(o!=null&&o.enableOnContentEditable)||F(s,o?.splitKey).forEach(function(ne){var $,_=P(ne,o?.combinationKey);if(ot(p,_,o?.ignoreModifiers)||($=_.keys)!=null&&$.includes("*")){if(o!=null&&o.ignoreEventWhen!=null&&o.ignoreEventWhen(p)||E&&f.current)return;if(Ye(p,_,o?.preventDefault),!Ze(p,_,o?.enabled)){X(p);return}l.current(p,_),E||(f.current=!0)}})}},V=function(p){p.key!==void 0&&(Je(A(p.code)),(o?.keydown===void 0&&o?.keyup!==!0||o!=null&&o.keydown)&&b(p))},z=function(p){p.key!==void 0&&(Qe(A(p.code)),f.current=!1,o!=null&&o.keyup&&b(p,!0))},D=a||u?.document||document;return D.addEventListener("keyup",z,u?.eventListenerOptions),D.addEventListener("keydown",V,u?.eventListenerOptions),g&&F(s,o?.splitKey).forEach(function(k){return g.addHotkey(P(k,o?.combinationKey,o?.description))}),function(){D.removeEventListener("keyup",z,u?.eventListenerOptions),D.removeEventListener("keydown",V,u?.eventListenerOptions),g&&F(s,o?.splitKey).forEach(function(k){return g.removeHotkey(P(k,o?.combinationKey,o?.description))})}}},[a,s,o,m]),i}function dt(){var e=d.useRef(!1),t=d.useCallback(function(){return e.current},[]);return d.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}var ft=function(e){e===void 0&&(e={});var t=d.useState(e),r=t[0],n=t[1],c=d.useCallback(function(a){n(function(i){return Object.assign({},i,a instanceof Function?a(i):a)})},[]);return[r,c]},H,J;function pt(){return J||(J=1,H=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(c){e.addRange(c)}),t&&t.focus()}}),H}var O,Q;function mt(){if(Q)return O;Q=1;var e=pt(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(a){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,i)}function c(a,i){var f,u,s,C,v,l,o=!1;i||(i={}),f=i.debug||!1;try{s=e(),C=document.createRange(),v=document.getSelection(),l=document.createElement("span"),l.textContent=a,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(m){if(m.stopPropagation(),i.format)if(m.preventDefault(),typeof m.clipboardData>"u"){f&&console.warn("unable to use e.clipboardData"),f&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=t[i.format]||t.default;window.clipboardData.setData(g,a)}else m.clipboardData.clearData(),m.clipboardData.setData(i.format,a);i.onCopy&&(m.preventDefault(),i.onCopy(m.clipboardData))}),document.body.appendChild(l),C.selectNodeContents(l),v.addRange(C);var q=document.execCommand("copy");if(!q)throw new Error("copy command was unsuccessful");o=!0}catch(m){f&&console.error("unable to copy using execCommand: ",m),f&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",a),i.onCopy&&i.onCopy(window.clipboardData),o=!0}catch(g){f&&console.error("unable to copy using clipboardData: ",g),f&&console.error("falling back to prompt"),u=n("message"in i?i.message:r),window.prompt(u,a)}}finally{v&&(typeof v.removeRange=="function"?v.removeRange(C):v.removeAllRanges()),l&&document.body.removeChild(l),s()}return o}return O=c,O}var gt=mt();const yt=Z.getDefaultExportFromCjs(gt);var vt=function(){var e=dt(),t=ft({value:void 0,error:void 0,noUserInteraction:!0}),r=t[0],n=t[1],c=d.useCallback(function(a){if(e()){var i,f;try{if(typeof a!="string"&&typeof a!="number"){var u=new Error("Cannot copy typeof "+typeof a+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(u),n({value:a,error:u,noUserInteraction:!0});return}else if(a===""){var u=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(u),n({value:a,error:u,noUserInteraction:!0});return}f=a.toString(),i=yt(f),n({value:f,error:void 0,noUserInteraction:i})}catch(s){n({value:f,error:s,noUserInteraction:i})}}},[]);return[r,c]};function bt(){const[e,t]=d.useState(r());function r(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return d.useEffect(()=>{const n=document.documentElement,c=new MutationObserver(()=>{const a=r();t(a)});return c.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>c.disconnect()},[]),e}function oe(){const{resolvedTheme:e,setTheme:t}=Y.z();return{colorMode:e,setColorMode:t,toggleColorMode:()=>{t(e==="light"?"dark":"light")}}}function Ct(e,t){const{colorMode:r}=oe();return r==="light"?e:t}exports.Avatar=ae.Avatar;exports.Box=ie.Box;exports.Button=ue.Button;exports.Code=le.Code;exports.ComboBox=B.ComboBox;exports._ComboBoxOption=B.ComboBoxOption;exports._ComboBoxOptionGroup=B.ComboBoxOptionGroup;exports._ComboBoxRoot=B.ComboBoxRoot;exports.Dialog=ce.Dialog;exports.Group=se.Group;exports.IconButton=de.IconButton;exports.IconToggleButton=fe.IconToggleButton;exports.Image=pe.Image;exports.Kbd=me.Kbd;exports.Link=ge.Link;exports.List=L.List;exports._ListIndicator=L.ListIndicator;exports._ListItem=L.ListItem;exports._ListRoot=L.ListRoot;exports.SimpleGrid=ye.SimpleGrid;exports.Text=ve.Text;exports.Tooltip=G.Tooltip;exports._TooltipContent=G.TooltipContent;exports._TooltipRoot=G.TooltipRoot;exports.MakeElementFocusable=be.MakeElementFocusable;exports.NimbusProvider=Y.NimbusProvider;exports.Checkbox=Ce.Checkbox;exports.Stack=he.Stack;exports.VisuallyHidden=Te.VisuallyHidden;exports.TextInput=Se.TextInput;exports.NumberInput=ke.NumberInput;exports.Grid=Ie.Grid;exports.Select=w.Select;exports._SelectOption=w.SelectOption;exports._SelectOptionGroup=w.SelectOptionGroup;exports._SelectOptions=w.SelectOptions;exports._SelectRoot=w.SelectRoot;exports.Separator=Re.Separator;exports.Accordion=I.Accordion;exports._AccordionContent=I.AccordionContent;exports._AccordionHeader=I.AccordionHeader;exports._AccordionHeaderRightContent=I.AccordionHeaderRightContentSlot;exports._AccordionItem=I.AccordionItem;exports._AccordionRoot=I.AccordionRoot;exports.Alert=R.Alert;exports._AlertActions=R.AlertActions;exports._AlertDescription=R.AlertDescription;exports._AlertDismissButton=R.AlertDismissButton;exports._AlertRoot=R.AlertRoot;exports._AlertTitle=R.AlertTitle;exports.Badge=qe.Badge;exports.Card=M.Card;exports._CardContent=M.CardContent;exports._CardHeader=M.CardHeader;exports._CardRoot=M.CardRoot;exports.FormField=S.FormField;exports._FormFieldDescription=S.FormFieldDescription;exports._FormFieldError=S.FormFieldError;exports._FormFieldInfoBox=S.FormFieldInfoBox;exports._FormFieldInput=S.FormFieldInput;exports._FormFieldLabel=S.FormFieldLabel;exports._FormFieldRoot=S.FormFieldRoot;exports.Icon=_e.Icon;exports.InlineSvg=we.InlineSvg;exports.LoadingSpinner=De.LoadingSpinner;exports.PasswordInput=Ee.PasswordInput;exports.SplitButton=xe.SplitButton;exports.TimeInput=Ae.TimeInput;exports.MultilineTextInput=Be.MultilineTextInput;exports.MoneyInput=Le.MoneyInput;exports.RadioInput=N.RadioInput;exports._RadioInputOption=N.RadioInputOption;exports._RadioInputRoot=N.RadioInputRoot;exports.Switch=Me.Switch;exports.TagGroup=Fe.TagGroup;exports.ToggleButton=Pe.ToggleButton;exports.ToggleButtonGroup=j.ToggleButtonGroup;exports._ToggleButtonGroupButton=j.ToggleButtonGroupButton;exports._ToggleButtonGroupRoot=j.ToggleButtonGroupRoot;exports.DateInput=He.DateInput;exports.Calendar=Oe.Calendar;exports.DatePicker=Ke.DatePicker;exports.ProgressBar=Ge.ProgressBar;exports.RangeCalendar=Ne.RangeCalendar;exports.DateRangePicker=je.DateRangePicker;exports.Toolbar=Ue.Toolbar;exports.RichTextInput=Z.RichTextInput;exports.DataTable=y.DataTable;exports._DataTableBody=y.DataTableBody;exports._DataTableCell=y.DataTableCell;exports._DataTableColumn=y.DataTableColumn;exports._DataTableExpandButton=y.DataTableExpandButton;exports._DataTableFooter=y.DataTableFooter;exports._DataTableHeader=y.DataTableHeader;exports._DataTableNestedIcon=y.DataTableNestedIcon;exports._DataTableRoot=y.DataTableRoot;exports._DataTableRow=y.DataTableRow;exports._DataTableSelectionCell=y.DataTableSelectionCell;exports._DataTableTable=y.DataTableTable;exports.Pagination=Ve.Pagination;exports.system=ze.system;exports.Menu=h.Menu;exports._MenuContent=h.MenuContent;exports._MenuItem=h.MenuItem;exports._MenuRoot=h.MenuRoot;exports._MenuSection=h.MenuSection;exports._MenuSubmenu=h.MenuSubmenu;exports._MenuSubmenuTrigger=h.MenuSubmenuTrigger;exports._MenuTrigger=h.MenuTrigger;exports.useColorMode=oe;exports.useColorModeValue=Ct;exports.useColorScheme=bt;exports.useCopyToClipboard=vt;exports.useHotkeys=st;
|
|
1
|
+
"use strict";const ie=require("./chunks/avatar-C2KIWewd.cjs.js"),ue=require("./chunks/box-CWni3A32.cjs.js"),le=require("./chunks/button-Dbf1b0F4.cjs.js"),ce=require("./chunks/code-q31e3vT2.cjs.js"),B=require("./chunks/combobox-C9pPDZQn.cjs.js"),se=require("./chunks/dialog-CVa-E9-A.cjs.js"),Y=require("./chunks/field-errors-Rzp3VbWz.cjs.js"),de=require("./chunks/group-Buy-O6Mr.cjs.js"),fe=require("./chunks/icon-button-0GLW7WtL.cjs.js"),pe=require("./chunks/icon-toggle-button-tJAqRjak.cjs.js"),me=require("./chunks/image-CGOYoc2s.cjs.js"),ge=require("./chunks/kbd-DFeaXiKY.cjs.js"),ye=require("./chunks/link-DWa1zIUJ.cjs.js"),F=require("./chunks/list-DJC9BmoC.cjs.js"),ve=require("./chunks/simple-grid-Cd2MJxSX.cjs.js"),be=require("./chunks/text-CCW9kDT_.cjs.js"),G=require("./chunks/tooltip-g8-hEdZp.cjs.js"),Ce=require("./chunks/make-element-focusable-bPAMXt4D.cjs.js"),Z=require("./chunks/nimbus-provider--E4ETLbz.cjs.js"),he=require("./chunks/checkbox-Bv0NXUyX.cjs.js"),Te=require("./chunks/stack-CIN13EDn.cjs.js"),Se=require("./chunks/visually-hidden-Bh-G5QHv.cjs.js"),ke=require("./chunks/text-input-DgYI0-uU.cjs.js"),Ie=require("./chunks/number-input-C-suceSs.cjs.js"),Re=require("./chunks/grid-Chuw1xje.cjs.js"),E=require("./chunks/select-DA6mGi-n.cjs.js"),qe=require("./chunks/separator-CoMx0Mmv.cjs.js"),I=require("./chunks/accordion-xYvGyXy-.cjs.js"),R=require("./chunks/alert-CWTCM8-i.cjs.js"),_e=require("./chunks/badge-CCrBksXu.cjs.js"),L=require("./chunks/card-DeWTV05B.cjs.js"),S=require("./chunks/form-field-DHvafAwV.cjs.js"),Ee=require("./chunks/icon-BHx0r3NL.cjs.js"),we=require("./chunks/inline-svg-DbvmiSw9.cjs.js"),De=require("./chunks/loading-spinner-CSKBo1bM.cjs.js"),xe=require("./chunks/password-input-Br-DbsF2.cjs.js"),Ae=require("./chunks/split-button-DS-OCnNN.cjs.js"),Be=require("./chunks/time-input-DOacr-Lo.cjs.js"),Fe=require("./chunks/multiline-text-input-XW9WrmJi.cjs.js"),Le=require("./chunks/money-input-DXpiO23i.cjs.js"),N=require("./chunks/radio-input-D7oHngVQ.cjs.js"),Me=require("./chunks/switch-uAVIHIFM.cjs.js"),Pe=require("./chunks/tag-group-BfVRqsqw.cjs.js"),He=require("./chunks/toggle-button-CoA46qg6.cjs.js"),j=require("./chunks/toggle-button-group-DX134q7m.cjs.js"),Oe=require("./chunks/date-input-DYC1t1e-.cjs.js"),Ke=require("./chunks/calendar-CrTvsDQH.cjs.js"),Ge=require("./chunks/date-picker-_7Gh_ROw.cjs.js"),Ne=require("./chunks/progress-bar-CGfPZTdv.cjs.js"),je=require("./chunks/range-calendar-CWkeoOzl.cjs.js"),Ue=require("./chunks/date-range-picker-D7pPpSEj.cjs.js"),Ve=require("./chunks/toolbar-CRak3D0J.cjs.js"),ee=require("./chunks/rich-text-input-CxWC-yrf.cjs.js"),y=require("./chunks/data-table-DIsDZ5JZ.cjs.js"),ze=require("./chunks/pagination-BM1xkmu9.cjs.js"),We=require("./chunks/index-DX8-EG6B.cjs.js"),d=require("react"),Tt=require("@chakra-ui/react/flex"),St=require("@chakra-ui/react/heading"),kt=require("@chakra-ui/react/table"),h=require("./chunks/menu-cYj3HcOe.cjs.js");require("react/jsx-runtime");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K.apply(null,arguments)}var te=["shift","alt","meta","mod","ctrl"],$e={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function A(e){return(e&&$e[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Xe(e){return te.includes(e)}function M(e,t){return t===void 0&&(t=","),e.split(t)}function P(e,t,r){t===void 0&&(t="+");var n=e.toLocaleLowerCase().split(t).map(function(i){return A(i)}),c={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},a=n.filter(function(i){return!te.includes(i)});return K({},c,{keys:a,description:r,hotkey:e})}var T=new Set;function U(e){return Array.isArray(e)}function Je(e,t){t===void 0&&(t=",");var r=U(e)?e:e.split(t);return r.every(function(n){return T.has(n.trim().toLowerCase())})}function Qe(e){var t=Array.isArray(e)?e:[e];T.has("meta")&&T.forEach(function(r){return!Xe(r)&&T.delete(r.toLowerCase())}),t.forEach(function(r){return T.add(r.toLowerCase())})}function Ye(e){var t=Array.isArray(e)?e:[e];e==="meta"?T.clear():t.forEach(function(r){return T.delete(r.toLowerCase())})}function Ze(e,t,r){(typeof r=="function"&&r(e,t)||r===!0)&&e.preventDefault()}function et(e,t,r){return typeof r=="function"?r(e,t):r===!0||r===void 0}function tt(e){return re(e,["input","textarea","select"])}function re(e,t){t===void 0&&(t=!1);var r=e.target,n=e.composed,c=null;return rt(r)&&n?c=e.composedPath()[0]&&e.composedPath()[0].tagName:c=r&&r.tagName,U(t)?!!(c&&t&&t.some(function(a){var i;return a.toLowerCase()===((i=c)==null?void 0:i.toLowerCase())})):!!(c&&t&&t)}function rt(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function ot(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(r){return t.includes(r)})||e.includes("*"):!0}var nt=function(t,r,n){n===void 0&&(n=!1);var c=r.alt,a=r.meta,i=r.mod,f=r.shift,u=r.ctrl,s=r.keys,C=t.key,v=t.code,l=t.ctrlKey,o=t.metaKey,q=t.shiftKey,m=t.altKey,g=A(v),b=C.toLowerCase();if(!(s!=null&&s.includes(g))&&!(s!=null&&s.includes(b))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(g))return!1;if(!n){if(c===!m&&b!=="alt"||f===!q&&b!=="shift")return!1;if(i){if(!o&&!l)return!1}else if(a===!o&&b!=="meta"&&b!=="os"||u===!l&&b!=="ctrl"&&b!=="control")return!1}return s&&s.length===1&&(s.includes(b)||s.includes(g))?!0:s?Je(s):!s},at=d.createContext(void 0),it=function(){return d.useContext(at)};function oe(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(r,n){return r&&oe(e[n],t[n])},!0):e===t}var ut=d.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),lt=function(){return d.useContext(ut)};function ct(e){var t=d.useRef(void 0);return oe(t.current,e)||(t.current=e),t.current}var X=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},st=typeof window<"u"?d.useLayoutEffect:d.useEffect;function dt(e,t,r,n){var c=d.useState(null),a=c[0],i=c[1],f=d.useRef(!1),u=r instanceof Array?n instanceof Array?void 0:n:r,s=U(e)?e.join(u?.splitKey):e,C=r instanceof Array?r:n instanceof Array?n:void 0,v=d.useCallback(t,C??[]),l=d.useRef(v);C?l.current=v:l.current=t;var o=ct(u),q=lt(),m=q.enabledScopes,g=it();return st(function(){if(!(o?.enabled===!1||!ot(m,o?.scopes))){var b=function(p,D){var W;if(D===void 0&&(D=!1),!(tt(p)&&!re(p,o?.enableOnFormTags))){if(a!==null){var x=a.getRootNode();if((x instanceof Document||x instanceof ShadowRoot)&&x.activeElement!==a&&!a.contains(x.activeElement)){X(p);return}}(W=p.target)!=null&&W.isContentEditable&&!(o!=null&&o.enableOnContentEditable)||M(s,o?.splitKey).forEach(function(ae){var $,_=P(ae,o?.combinationKey);if(nt(p,_,o?.ignoreModifiers)||($=_.keys)!=null&&$.includes("*")){if(o!=null&&o.ignoreEventWhen!=null&&o.ignoreEventWhen(p)||D&&f.current)return;if(Ze(p,_,o?.preventDefault),!et(p,_,o?.enabled)){X(p);return}l.current(p,_),D||(f.current=!0)}})}},V=function(p){p.key!==void 0&&(Qe(A(p.code)),(o?.keydown===void 0&&o?.keyup!==!0||o!=null&&o.keydown)&&b(p))},z=function(p){p.key!==void 0&&(Ye(A(p.code)),f.current=!1,o!=null&&o.keyup&&b(p,!0))},w=a||u?.document||document;return w.addEventListener("keyup",z,u?.eventListenerOptions),w.addEventListener("keydown",V,u?.eventListenerOptions),g&&M(s,o?.splitKey).forEach(function(k){return g.addHotkey(P(k,o?.combinationKey,o?.description))}),function(){w.removeEventListener("keyup",z,u?.eventListenerOptions),w.removeEventListener("keydown",V,u?.eventListenerOptions),g&&M(s,o?.splitKey).forEach(function(k){return g.removeHotkey(P(k,o?.combinationKey,o?.description))})}}},[a,s,o,m]),i}function ft(){var e=d.useRef(!1),t=d.useCallback(function(){return e.current},[]);return d.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}var pt=function(e){e===void 0&&(e={});var t=d.useState(e),r=t[0],n=t[1],c=d.useCallback(function(a){n(function(i){return Object.assign({},i,a instanceof Function?a(i):a)})},[]);return[r,c]},H,J;function mt(){return J||(J=1,H=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(c){e.addRange(c)}),t&&t.focus()}}),H}var O,Q;function gt(){if(Q)return O;Q=1;var e=mt(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(a){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,i)}function c(a,i){var f,u,s,C,v,l,o=!1;i||(i={}),f=i.debug||!1;try{s=e(),C=document.createRange(),v=document.getSelection(),l=document.createElement("span"),l.textContent=a,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(m){if(m.stopPropagation(),i.format)if(m.preventDefault(),typeof m.clipboardData>"u"){f&&console.warn("unable to use e.clipboardData"),f&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=t[i.format]||t.default;window.clipboardData.setData(g,a)}else m.clipboardData.clearData(),m.clipboardData.setData(i.format,a);i.onCopy&&(m.preventDefault(),i.onCopy(m.clipboardData))}),document.body.appendChild(l),C.selectNodeContents(l),v.addRange(C);var q=document.execCommand("copy");if(!q)throw new Error("copy command was unsuccessful");o=!0}catch(m){f&&console.error("unable to copy using execCommand: ",m),f&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",a),i.onCopy&&i.onCopy(window.clipboardData),o=!0}catch(g){f&&console.error("unable to copy using clipboardData: ",g),f&&console.error("falling back to prompt"),u=n("message"in i?i.message:r),window.prompt(u,a)}}finally{v&&(typeof v.removeRange=="function"?v.removeRange(C):v.removeAllRanges()),l&&document.body.removeChild(l),s()}return o}return O=c,O}var yt=gt();const vt=ee.getDefaultExportFromCjs(yt);var bt=function(){var e=ft(),t=pt({value:void 0,error:void 0,noUserInteraction:!0}),r=t[0],n=t[1],c=d.useCallback(function(a){if(e()){var i,f;try{if(typeof a!="string"&&typeof a!="number"){var u=new Error("Cannot copy typeof "+typeof a+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(u),n({value:a,error:u,noUserInteraction:!0});return}else if(a===""){var u=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(u),n({value:a,error:u,noUserInteraction:!0});return}f=a.toString(),i=vt(f),n({value:f,error:void 0,noUserInteraction:i})}catch(s){n({value:f,error:s,noUserInteraction:i})}}},[]);return[r,c]};function Ct(){const[e,t]=d.useState(r());function r(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return d.useEffect(()=>{const n=document.documentElement,c=new MutationObserver(()=>{const a=r();t(a)});return c.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>c.disconnect()},[]),e}function ne(){const{resolvedTheme:e,setTheme:t}=Z.z();return{colorMode:e,setColorMode:t,toggleColorMode:()=>{t(e==="light"?"dark":"light")}}}function ht(e,t){const{colorMode:r}=ne();return r==="light"?e:t}exports.Avatar=ie.Avatar;exports.Box=ue.Box;exports.Button=le.Button;exports.Code=ce.Code;exports.ComboBox=B.ComboBox;exports._ComboBoxOption=B.ComboBoxOption;exports._ComboBoxOptionGroup=B.ComboBoxOptionGroup;exports._ComboBoxRoot=B.ComboBoxRoot;exports.Dialog=se.Dialog;exports.FieldErrorTypes=Y.FieldErrorTypes;exports.FieldErrors=Y.FieldErrors;exports.Group=de.Group;exports.IconButton=fe.IconButton;exports.IconToggleButton=pe.IconToggleButton;exports.Image=me.Image;exports.Kbd=ge.Kbd;exports.Link=ye.Link;exports.List=F.List;exports._ListIndicator=F.ListIndicator;exports._ListItem=F.ListItem;exports._ListRoot=F.ListRoot;exports.SimpleGrid=ve.SimpleGrid;exports.Text=be.Text;exports.Tooltip=G.Tooltip;exports._TooltipContent=G.TooltipContent;exports._TooltipRoot=G.TooltipRoot;exports.MakeElementFocusable=Ce.MakeElementFocusable;exports.NimbusProvider=Z.NimbusProvider;exports.Checkbox=he.Checkbox;exports.Stack=Te.Stack;exports.VisuallyHidden=Se.VisuallyHidden;exports.TextInput=ke.TextInput;exports.NumberInput=Ie.NumberInput;exports.Grid=Re.Grid;exports.Select=E.Select;exports._SelectOption=E.SelectOption;exports._SelectOptionGroup=E.SelectOptionGroup;exports._SelectOptions=E.SelectOptions;exports._SelectRoot=E.SelectRoot;exports.Separator=qe.Separator;exports.Accordion=I.Accordion;exports._AccordionContent=I.AccordionContent;exports._AccordionHeader=I.AccordionHeader;exports._AccordionHeaderRightContent=I.AccordionHeaderRightContentSlot;exports._AccordionItem=I.AccordionItem;exports._AccordionRoot=I.AccordionRoot;exports.Alert=R.Alert;exports._AlertActions=R.AlertActions;exports._AlertDescription=R.AlertDescription;exports._AlertDismissButton=R.AlertDismissButton;exports._AlertRoot=R.AlertRoot;exports._AlertTitle=R.AlertTitle;exports.Badge=_e.Badge;exports.Card=L.Card;exports._CardContent=L.CardContent;exports._CardHeader=L.CardHeader;exports._CardRoot=L.CardRoot;exports.FormField=S.FormField;exports._FormFieldDescription=S.FormFieldDescription;exports._FormFieldError=S.FormFieldError;exports._FormFieldInfoBox=S.FormFieldInfoBox;exports._FormFieldInput=S.FormFieldInput;exports._FormFieldLabel=S.FormFieldLabel;exports._FormFieldRoot=S.FormFieldRoot;exports.Icon=Ee.Icon;exports.InlineSvg=we.InlineSvg;exports.LoadingSpinner=De.LoadingSpinner;exports.PasswordInput=xe.PasswordInput;exports.SplitButton=Ae.SplitButton;exports.TimeInput=Be.TimeInput;exports.MultilineTextInput=Fe.MultilineTextInput;exports.MoneyInput=Le.MoneyInput;exports.RadioInput=N.RadioInput;exports._RadioInputOption=N.RadioInputOption;exports._RadioInputRoot=N.RadioInputRoot;exports.Switch=Me.Switch;exports.TagGroup=Pe.TagGroup;exports.ToggleButton=He.ToggleButton;exports.ToggleButtonGroup=j.ToggleButtonGroup;exports._ToggleButtonGroupButton=j.ToggleButtonGroupButton;exports._ToggleButtonGroupRoot=j.ToggleButtonGroupRoot;exports.DateInput=Oe.DateInput;exports.Calendar=Ke.Calendar;exports.DatePicker=Ge.DatePicker;exports.ProgressBar=Ne.ProgressBar;exports.RangeCalendar=je.RangeCalendar;exports.DateRangePicker=Ue.DateRangePicker;exports.Toolbar=Ve.Toolbar;exports.RichTextInput=ee.RichTextInput;exports.DataTable=y.DataTable;exports._DataTableBody=y.DataTableBody;exports._DataTableCell=y.DataTableCell;exports._DataTableColumn=y.DataTableColumn;exports._DataTableExpandButton=y.DataTableExpandButton;exports._DataTableFooter=y.DataTableFooter;exports._DataTableHeader=y.DataTableHeader;exports._DataTableNestedIcon=y.DataTableNestedIcon;exports._DataTableRoot=y.DataTableRoot;exports._DataTableRow=y.DataTableRow;exports._DataTableSelectionCell=y.DataTableSelectionCell;exports._DataTableTable=y.DataTableTable;exports.Pagination=ze.Pagination;exports.system=We.system;exports.Menu=h.Menu;exports._MenuContent=h.MenuContent;exports._MenuItem=h.MenuItem;exports._MenuRoot=h.MenuRoot;exports._MenuSection=h.MenuSection;exports._MenuSubmenu=h.MenuSubmenu;exports._MenuSubmenuTrigger=h.MenuSubmenuTrigger;exports._MenuTrigger=h.MenuTrigger;exports.useColorMode=ne;exports.useColorModeValue=ht;exports.useColorScheme=Ct;exports.useCopyToClipboard=bt;exports.useHotkeys=dt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../node_modules/.pnpm/react-hotkeys-hook@4.6.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useMountedState.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useSetState.js","../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useCopyToClipboard.js","../src/hooks/use-color-scheme/use-color-scheme.ts","../src/hooks/use-color-mode/use-color-mode.ts","../src/hooks/use-color-mode-value/use-color-mode-value.ts"],"sourcesContent":["import { useContext, createContext, useState, useCallback, useRef, useLayoutEffect, useEffect } from 'react';\nimport { jsx } from 'react/jsx-runtime';\n\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\n\nvar reservedModifierKeywords = ['shift', 'alt', 'meta', 'mod', 'ctrl'];\nvar mappedKeys = {\n esc: 'escape',\n \"return\": 'enter',\n '.': 'period',\n ',': 'comma',\n '-': 'slash',\n ' ': 'space',\n '`': 'backquote',\n '#': 'backslash',\n '+': 'bracketright',\n ShiftLeft: 'shift',\n ShiftRight: 'shift',\n AltLeft: 'alt',\n AltRight: 'alt',\n MetaLeft: 'meta',\n MetaRight: 'meta',\n OSLeft: 'meta',\n OSRight: 'meta',\n ControlLeft: 'ctrl',\n ControlRight: 'ctrl'\n};\nfunction mapKey(key) {\n return (key && mappedKeys[key] || key || '').trim().toLowerCase().replace(/key|digit|numpad|arrow/, '');\n}\nfunction isHotkeyModifier(key) {\n return reservedModifierKeywords.includes(key);\n}\nfunction parseKeysHookInput(keys, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n return keys.split(splitKey);\n}\nfunction parseHotkey(hotkey, combinationKey, description) {\n if (combinationKey === void 0) {\n combinationKey = '+';\n }\n var keys = hotkey.toLocaleLowerCase().split(combinationKey).map(function (k) {\n return mapKey(k);\n });\n var modifiers = {\n alt: keys.includes('alt'),\n ctrl: keys.includes('ctrl') || keys.includes('control'),\n shift: keys.includes('shift'),\n meta: keys.includes('meta'),\n mod: keys.includes('mod')\n };\n var singleCharKeys = keys.filter(function (k) {\n return !reservedModifierKeywords.includes(k);\n });\n return _extends({}, modifiers, {\n keys: singleCharKeys,\n description: description,\n hotkey: hotkey\n });\n}\n\n(function () {\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n document.addEventListener('keyup', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n }\n if (typeof window !== 'undefined') {\n window.addEventListener('blur', function () {\n currentlyPressedKeys.clear();\n });\n }\n})();\nvar currentlyPressedKeys = /*#__PURE__*/new Set();\n// https://github.com/microsoft/TypeScript/issues/17002\nfunction isReadonlyArray(value) {\n return Array.isArray(value);\n}\nfunction isHotkeyPressed(key, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n var hotkeyArray = isReadonlyArray(key) ? key : key.split(splitKey);\n return hotkeyArray.every(function (hotkey) {\n return currentlyPressedKeys.has(hotkey.trim().toLowerCase());\n });\n}\nfunction pushToCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (currentlyPressedKeys.has('meta')) {\n currentlyPressedKeys.forEach(function (key) {\n return !isHotkeyModifier(key) && currentlyPressedKeys[\"delete\"](key.toLowerCase());\n });\n }\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys.add(hotkey.toLowerCase());\n });\n}\nfunction removeFromCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (key === 'meta') {\n currentlyPressedKeys.clear();\n } else {\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys[\"delete\"](hotkey.toLowerCase());\n });\n }\n}\n\nfunction maybePreventDefault(e, hotkey, preventDefault) {\n if (typeof preventDefault === 'function' && preventDefault(e, hotkey) || preventDefault === true) {\n e.preventDefault();\n }\n}\nfunction isHotkeyEnabled(e, hotkey, enabled) {\n if (typeof enabled === 'function') {\n return enabled(e, hotkey);\n }\n return enabled === true || enabled === undefined;\n}\nfunction isKeyboardEventTriggeredByInput(ev) {\n return isHotkeyEnabledOnTag(ev, ['input', 'textarea', 'select']);\n}\nfunction isHotkeyEnabledOnTag(event, enabledOnTags) {\n if (enabledOnTags === void 0) {\n enabledOnTags = false;\n }\n var target = event.target,\n composed = event.composed;\n var targetTagName = null;\n if (isCustomElement(target) && composed) {\n targetTagName = event.composedPath()[0] && event.composedPath()[0].tagName;\n } else {\n targetTagName = target && target.tagName;\n }\n if (isReadonlyArray(enabledOnTags)) {\n return Boolean(targetTagName && enabledOnTags && enabledOnTags.some(function (tag) {\n var _targetTagName;\n return tag.toLowerCase() === ((_targetTagName = targetTagName) == null ? void 0 : _targetTagName.toLowerCase());\n }));\n }\n return Boolean(targetTagName && enabledOnTags && enabledOnTags);\n}\nfunction isCustomElement(element) {\n // We just do a basic check w/o any complex RegEx or validation against the list of legacy names containing a hyphen,\n // as none of them is likely to be an event target, and it won't hurt anyway if we miss.\n // see: https://html.spec.whatwg.org/multipage/custom-elements.html#prod-potentialcustomelementname\n return !!element.tagName && !element.tagName.startsWith(\"-\") && element.tagName.includes(\"-\");\n}\nfunction isScopeActive(activeScopes, scopes) {\n if (activeScopes.length === 0 && scopes) {\n console.warn('A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>');\n return true;\n }\n if (!scopes) {\n return true;\n }\n return activeScopes.some(function (scope) {\n return scopes.includes(scope);\n }) || activeScopes.includes('*');\n}\nvar isHotkeyMatchingKeyboardEvent = function isHotkeyMatchingKeyboardEvent(e, hotkey, ignoreModifiers) {\n if (ignoreModifiers === void 0) {\n ignoreModifiers = false;\n }\n var alt = hotkey.alt,\n meta = hotkey.meta,\n mod = hotkey.mod,\n shift = hotkey.shift,\n ctrl = hotkey.ctrl,\n keys = hotkey.keys;\n var pressedKeyUppercase = e.key,\n code = e.code,\n ctrlKey = e.ctrlKey,\n metaKey = e.metaKey,\n shiftKey = e.shiftKey,\n altKey = e.altKey;\n var keyCode = mapKey(code);\n var pressedKey = pressedKeyUppercase.toLowerCase();\n if (!(keys != null && keys.includes(keyCode)) && !(keys != null && keys.includes(pressedKey)) && !['ctrl', 'control', 'unknown', 'meta', 'alt', 'shift', 'os'].includes(keyCode)) {\n return false;\n }\n if (!ignoreModifiers) {\n // We check the pressed keys for compatibility with the keyup event. In keyup events the modifier flags are not set.\n if (alt === !altKey && pressedKey !== 'alt') {\n return false;\n }\n if (shift === !shiftKey && pressedKey !== 'shift') {\n return false;\n }\n // Mod is a special key name that is checking for meta on macOS and ctrl on other platforms\n if (mod) {\n if (!metaKey && !ctrlKey) {\n return false;\n }\n } else {\n if (meta === !metaKey && pressedKey !== 'meta' && pressedKey !== 'os') {\n return false;\n }\n if (ctrl === !ctrlKey && pressedKey !== 'ctrl' && pressedKey !== 'control') {\n return false;\n }\n }\n }\n // All modifiers are correct, now check the key\n // If the key is set, we check for the key\n if (keys && keys.length === 1 && (keys.includes(pressedKey) || keys.includes(keyCode))) {\n return true;\n } else if (keys) {\n // Check if all keys are present in pressedDownKeys set\n return isHotkeyPressed(keys);\n } else if (!keys) {\n // If the key is not set, we only listen for modifiers, that check went alright, so we return true\n return true;\n }\n // There is nothing that matches.\n return false;\n};\n\nvar BoundHotkeysProxyProvider = /*#__PURE__*/createContext(undefined);\nvar useBoundHotkeysProxy = function useBoundHotkeysProxy() {\n return useContext(BoundHotkeysProxyProvider);\n};\nfunction BoundHotkeysProxyProviderProvider(_ref) {\n var addHotkey = _ref.addHotkey,\n removeHotkey = _ref.removeHotkey,\n children = _ref.children;\n return /*#__PURE__*/jsx(BoundHotkeysProxyProvider.Provider, {\n value: {\n addHotkey: addHotkey,\n removeHotkey: removeHotkey\n },\n children: children\n });\n}\n\nfunction deepEqual(x, y) {\n //@ts-ignore\n return x && y && typeof x === 'object' && typeof y === 'object' ? Object.keys(x).length === Object.keys(y).length &&\n //@ts-ignore\n Object.keys(x).reduce(function (isEqual, key) {\n return isEqual && deepEqual(x[key], y[key]);\n }, true) : x === y;\n}\n\nvar HotkeysContext = /*#__PURE__*/createContext({\n hotkeys: [],\n enabledScopes: [],\n toggleScope: function toggleScope() {},\n enableScope: function enableScope() {},\n disableScope: function disableScope() {}\n});\nvar useHotkeysContext = function useHotkeysContext() {\n return useContext(HotkeysContext);\n};\nvar HotkeysProvider = function HotkeysProvider(_ref) {\n var _ref$initiallyActiveS = _ref.initiallyActiveScopes,\n initiallyActiveScopes = _ref$initiallyActiveS === void 0 ? ['*'] : _ref$initiallyActiveS,\n children = _ref.children;\n var _useState = useState((initiallyActiveScopes == null ? void 0 : initiallyActiveScopes.length) > 0 ? initiallyActiveScopes : ['*']),\n internalActiveScopes = _useState[0],\n setInternalActiveScopes = _useState[1];\n var _useState2 = useState([]),\n boundHotkeys = _useState2[0],\n setBoundHotkeys = _useState2[1];\n var enableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n });\n }, []);\n var disableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n });\n }, []);\n var toggleScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes(scope)) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n } else {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n }\n });\n }, []);\n var addBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return [].concat(prev, [hotkey]);\n });\n }, []);\n var removeBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return prev.filter(function (h) {\n return !deepEqual(h, hotkey);\n });\n });\n }, []);\n return /*#__PURE__*/jsx(HotkeysContext.Provider, {\n value: {\n enabledScopes: internalActiveScopes,\n hotkeys: boundHotkeys,\n enableScope: enableScope,\n disableScope: disableScope,\n toggleScope: toggleScope\n },\n children: /*#__PURE__*/jsx(BoundHotkeysProxyProviderProvider, {\n addHotkey: addBoundHotkey,\n removeHotkey: removeBoundHotkey,\n children: children\n })\n });\n};\n\nfunction useDeepEqualMemo(value) {\n var ref = useRef(undefined);\n if (!deepEqual(ref.current, value)) {\n ref.current = value;\n }\n return ref.current;\n}\n\nvar stopPropagation = function stopPropagation(e) {\n e.stopPropagation();\n e.preventDefault();\n e.stopImmediatePropagation();\n};\nvar useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nfunction useHotkeys(keys, callback, options, dependencies) {\n var _useState = useState(null),\n ref = _useState[0],\n setRef = _useState[1];\n var hasTriggeredRef = useRef(false);\n var _options = !(options instanceof Array) ? options : !(dependencies instanceof Array) ? dependencies : undefined;\n var _keys = isReadonlyArray(keys) ? keys.join(_options == null ? void 0 : _options.splitKey) : keys;\n var _deps = options instanceof Array ? options : dependencies instanceof Array ? dependencies : undefined;\n var memoisedCB = useCallback(callback, _deps != null ? _deps : []);\n var cbRef = useRef(memoisedCB);\n if (_deps) {\n cbRef.current = memoisedCB;\n } else {\n cbRef.current = callback;\n }\n var memoisedOptions = useDeepEqualMemo(_options);\n var _useHotkeysContext = useHotkeysContext(),\n enabledScopes = _useHotkeysContext.enabledScopes;\n var proxy = useBoundHotkeysProxy();\n useSafeLayoutEffect(function () {\n if ((memoisedOptions == null ? void 0 : memoisedOptions.enabled) === false || !isScopeActive(enabledScopes, memoisedOptions == null ? void 0 : memoisedOptions.scopes)) {\n return;\n }\n var listener = function listener(e, isKeyUp) {\n var _e$target;\n if (isKeyUp === void 0) {\n isKeyUp = false;\n }\n if (isKeyboardEventTriggeredByInput(e) && !isHotkeyEnabledOnTag(e, memoisedOptions == null ? void 0 : memoisedOptions.enableOnFormTags)) {\n return;\n }\n // TODO: SINCE THE EVENT IS NOW ATTACHED TO THE REF, THE ACTIVE ELEMENT CAN NEVER BE INSIDE THE REF. THE HOTKEY ONLY TRIGGERS IF THE\n // REF IS THE ACTIVE ELEMENT. THIS IS A PROBLEM SINCE FOCUSED SUB COMPONENTS WON'T TRIGGER THE HOTKEY.\n if (ref !== null) {\n var rootNode = ref.getRootNode();\n if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement !== ref && !ref.contains(rootNode.activeElement)) {\n stopPropagation(e);\n return;\n }\n }\n if ((_e$target = e.target) != null && _e$target.isContentEditable && !(memoisedOptions != null && memoisedOptions.enableOnContentEditable)) {\n return;\n }\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n var _hotkey$keys;\n var hotkey = parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey);\n if (isHotkeyMatchingKeyboardEvent(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.ignoreModifiers) || (_hotkey$keys = hotkey.keys) != null && _hotkey$keys.includes('*')) {\n if (memoisedOptions != null && memoisedOptions.ignoreEventWhen != null && memoisedOptions.ignoreEventWhen(e)) {\n return;\n }\n if (isKeyUp && hasTriggeredRef.current) {\n return;\n }\n maybePreventDefault(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.preventDefault);\n if (!isHotkeyEnabled(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.enabled)) {\n stopPropagation(e);\n return;\n }\n // Execute the user callback for that hotkey\n cbRef.current(e, hotkey);\n if (!isKeyUp) {\n hasTriggeredRef.current = true;\n }\n }\n });\n };\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys(mapKey(event.code));\n if ((memoisedOptions == null ? void 0 : memoisedOptions.keydown) === undefined && (memoisedOptions == null ? void 0 : memoisedOptions.keyup) !== true || memoisedOptions != null && memoisedOptions.keydown) {\n listener(event);\n }\n };\n var handleKeyUp = function handleKeyUp(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys(mapKey(event.code));\n hasTriggeredRef.current = false;\n if (memoisedOptions != null && memoisedOptions.keyup) {\n listener(event, true);\n }\n };\n var domNode = ref || (_options == null ? void 0 : _options.document) || document;\n // @ts-ignore\n domNode.addEventListener('keyup', handleKeyUp, _options == null ? void 0 : _options.eventListenerOptions);\n // @ts-ignore\n domNode.addEventListener('keydown', handleKeyDown, _options == null ? void 0 : _options.eventListenerOptions);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.addHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n return function () {\n // @ts-ignore\n domNode.removeEventListener('keyup', handleKeyUp, _options == null ? void 0 : _options.eventListenerOptions);\n // @ts-ignore\n domNode.removeEventListener('keydown', handleKeyDown, _options == null ? void 0 : _options.eventListenerOptions);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.removeHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n };\n }, [ref, _keys, memoisedOptions, enabledScopes]);\n return setRef;\n}\n\nfunction useRecordHotkeys() {\n var _useState = useState(new Set()),\n keys = _useState[0],\n setKeys = _useState[1];\n var _useState2 = useState(false),\n isRecording = _useState2[0],\n setIsRecording = _useState2[1];\n var handler = useCallback(function (event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n setKeys(function (prev) {\n var newKeys = new Set(prev);\n newKeys.add(mapKey(event.code));\n return newKeys;\n });\n }, []);\n var stop = useCallback(function () {\n if (typeof document !== 'undefined') {\n document.removeEventListener('keydown', handler);\n setIsRecording(false);\n }\n }, [handler]);\n var start = useCallback(function () {\n setKeys(new Set());\n if (typeof document !== 'undefined') {\n stop();\n document.addEventListener('keydown', handler);\n setIsRecording(true);\n }\n }, [handler, stop]);\n var resetKeys = useCallback(function () {\n setKeys(new Set());\n }, []);\n return [keys, {\n start: start,\n stop: stop,\n resetKeys: resetKeys,\n isRecording: isRecording\n }];\n}\n\nexport { HotkeysProvider, isHotkeyPressed, useHotkeys, useHotkeysContext, useRecordHotkeys };\n//# sourceMappingURL=react-hotkeys-hook.esm.js.map\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n var mountedRef = useRef(false);\n var get = useCallback(function () { return mountedRef.current; }, []);\n useEffect(function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []);\n return get;\n}\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n if (initialState === void 0) { initialState = {}; }\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var setState = useCallback(function (patch) {\n set(function (prevState) {\n return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n });\n }, []);\n return [state, setState];\n};\nexport default useSetState;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n var isMounted = useMountedState();\n var _a = useSetState({\n value: undefined,\n error: undefined,\n noUserInteraction: true,\n }), state = _a[0], setState = _a[1];\n var copyToClipboard = useCallback(function (value) {\n if (!isMounted()) {\n return;\n }\n var noUserInteraction;\n var normalizedValue;\n try {\n // only strings and numbers casted to strings can be copied to clipboard\n if (typeof value !== 'string' && typeof value !== 'number') {\n var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n // empty strings are also considered invalid\n else if (value === '') {\n var error = new Error(\"Cannot copy empty string to clipboard.\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n normalizedValue = value.toString();\n noUserInteraction = writeText(normalizedValue);\n setState({\n value: normalizedValue,\n error: undefined,\n noUserInteraction: noUserInteraction,\n });\n }\n catch (error) {\n setState({\n value: normalizedValue,\n error: error,\n noUserInteraction: noUserInteraction,\n });\n }\n }, []);\n return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useEffect, useState } from \"react\";\n\n/**\n * Hook that provides access to the current color scheme value.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook monitors the color-scheme CSS property on the document's HTML element\n * and returns the current value. It automatically updates when the color scheme changes,\n * either through direct style changes or theme updates stored in localStorage.\n *\n * The hook observes mutations to the HTML element's style attribute to detect\n * color scheme changes and re-renders the component when changes occur.\n *\n * @returns The current color scheme value as a string ('light', 'dark')\n */\nexport function useColorScheme() {\n const [colorScheme, setColorScheme] = useState(getCurrentColorScheme());\n\n // Helper function to get the current color-scheme from the <html> tag\n function getCurrentColorScheme() {\n return (\n document.documentElement.style.getPropertyValue(\"color-scheme\") ||\n localStorage.getItem(\"theme\") ||\n \"light\"\n );\n }\n\n useEffect(() => {\n const htmlElement = document.documentElement;\n\n const observer = new MutationObserver(() => {\n const newColorScheme = getCurrentColorScheme();\n setColorScheme(newColorScheme);\n });\n\n // Observe changes to the 'style' attribute of the <html> element\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return colorScheme;\n}\n","\"use client\";\nimport { useTheme } from \"next-themes\";\n\n/**\n * Hook for managing color mode (light/dark theme) state.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook provides access to the current color mode and functions to change it.\n * It integrates with the next-themes library to handle theme persistence and system preference detection.\n *\n * @returns An object containing:\n * - `colorMode`: The current resolved theme ('light' | 'dark' | 'system' | undefined)\n * - `setColorMode`: Function to set a specific color mode\n * - `toggleColorMode`: Function to toggle between light and dark modes\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { colorMode, toggleColorMode } = useColorMode();\n *\n * return (\n * <button onClick={toggleColorMode}>\n * Current mode: {colorMode}\n * </button>\n * );\n * }\n * ```\n */\n\nexport function useColorMode() {\n const { resolvedTheme, setTheme } = useTheme();\n const toggleColorMode = () => {\n setTheme(resolvedTheme === \"light\" ? \"dark\" : \"light\");\n };\n return {\n colorMode: resolvedTheme,\n setColorMode: setTheme,\n toggleColorMode,\n };\n}\n","import { useColorMode } from \"./../use-color-mode\";\n\n/**\n * Hook that returns a value based on the current color mode.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * @param light - The value to return when the color mode is light\n * @param dark - The value to return when the color mode is dark\n * @returns The appropriate value based on the current color mode\n */\nexport function useColorModeValue<T>(light: T, dark: T) {\n const { colorMode } = useColorMode();\n return colorMode === \"light\" ? light : dark;\n}\n"],"names":["_extends","n","e","t","r","reservedModifierKeywords","mappedKeys","mapKey","key","isHotkeyModifier","parseKeysHookInput","keys","splitKey","parseHotkey","hotkey","combinationKey","description","k","modifiers","singleCharKeys","currentlyPressedKeys","isReadonlyArray","value","isHotkeyPressed","hotkeyArray","pushToCurrentlyPressedKeys","removeFromCurrentlyPressedKeys","maybePreventDefault","preventDefault","isHotkeyEnabled","enabled","isKeyboardEventTriggeredByInput","ev","isHotkeyEnabledOnTag","event","enabledOnTags","target","composed","targetTagName","isCustomElement","tag","_targetTagName","element","isScopeActive","activeScopes","scopes","scope","isHotkeyMatchingKeyboardEvent","ignoreModifiers","alt","meta","mod","shift","ctrl","pressedKeyUppercase","code","ctrlKey","metaKey","shiftKey","altKey","keyCode","pressedKey","BoundHotkeysProxyProvider","createContext","useBoundHotkeysProxy","useContext","deepEqual","x","y","isEqual","HotkeysContext","useHotkeysContext","useDeepEqualMemo","ref","useRef","stopPropagation","useSafeLayoutEffect","useLayoutEffect","useEffect","useHotkeys","callback","options","dependencies","_useState","useState","setRef","hasTriggeredRef","_options","_keys","_deps","memoisedCB","useCallback","cbRef","memoisedOptions","_useHotkeysContext","enabledScopes","proxy","listener","isKeyUp","_e$target","rootNode","_hotkey$keys","handleKeyDown","handleKeyUp","domNode","useMountedState","mountedRef","get","useSetState","initialState","_a","state","set","setState","patch","prevState","toggleSelection","selection","active","ranges","i","range","deselectCurrent","require$$0","clipboardToIE11Formatting","defaultMessage","format","message","copyKey","copy","text","debug","reselectPrevious","mark","success","successful","err","copyToClipboard","useCopyToClipboard","isMounted","noUserInteraction","normalizedValue","error","writeText","useColorScheme","colorScheme","setColorScheme","getCurrentColorScheme","htmlElement","observer","newColorScheme","useColorMode","resolvedTheme","setTheme","useTheme","useColorModeValue","light","dark","colorMode"],"mappings":"82FAGA,SAASA,GAAW,CAClB,OAAOA,EAAW,OAAO,OAAS,OAAO,OAAO,KAAI,EAAK,SAAUC,EAAG,CACpE,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAI,UAAUD,CAAC,EACnB,QAASE,KAAKD,GAAI,CAAA,GAAI,eAAe,KAAKA,EAAGC,CAAC,IAAMH,EAAEG,CAAC,EAAID,EAAEC,CAAC,EAChE,CACA,OAAOH,CACT,EAAGD,EAAS,MAAM,KAAM,SAAS,CACnC,CAEA,IAAIK,GAA2B,CAAC,QAAS,MAAO,OAAQ,MAAO,MAAM,EACjEC,GAAa,CACf,IAAK,SACL,OAAU,QACV,IAAK,SACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,YACL,IAAK,YACL,IAAK,eACL,UAAW,QACX,WAAY,QACZ,QAAS,MACT,SAAU,MACV,SAAU,OACV,UAAW,OACX,OAAQ,OACR,QAAS,OACT,YAAa,OACb,aAAc,MAChB,EAC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iB,IAAM,CAC1C,MAAMC,EAAiBH,EAAA,EACvBD,EAAeI,CAAc,CAC/B,CAAC,EAGD,OAAAD,EAAS,QAAQD,EAAa,CAC5B,WAAY,GACZ,gBAAiB,CAAC,OAAO,CAAA,CAC1B,EAEM,IAAMC,EAAS,WAAA,CACxB,EAAG,CAAA,CAAE,EAEEJ,CACT,CChBO,SAASM,IAAe,CAC7B,KAAM,CAAE,cAAAC,EAAe,SAAAC,CAAA,EAAaC,IAAA,EAIpC,MAAO,CACL,UAAWF,EACX,aAAcC,EACd,gBANsB,IAAM,CAC5BA,EAASD,IAAkB,QAAU,OAAS,OAAO,CACvD,CAIE,CAEJ,CC7BO,SAASG,GAAqBC,EAAUC,EAAS,CACtD,KAAM,CAAE,UAAAC,CAAA,EAAcP,GAAA,EACtB,OAAOO,IAAc,QAAUF,EAAQC,CACzC","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../node_modules/.pnpm/react-hotkeys-hook@4.6.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useMountedState.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useSetState.js","../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useCopyToClipboard.js","../src/hooks/use-color-scheme/use-color-scheme.ts","../src/hooks/use-color-mode/use-color-mode.ts","../src/hooks/use-color-mode-value/use-color-mode-value.ts"],"sourcesContent":["import { useContext, createContext, useState, useCallback, useRef, useLayoutEffect, useEffect } from 'react';\nimport { jsx } from 'react/jsx-runtime';\n\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\n\nvar reservedModifierKeywords = ['shift', 'alt', 'meta', 'mod', 'ctrl'];\nvar mappedKeys = {\n esc: 'escape',\n \"return\": 'enter',\n '.': 'period',\n ',': 'comma',\n '-': 'slash',\n ' ': 'space',\n '`': 'backquote',\n '#': 'backslash',\n '+': 'bracketright',\n ShiftLeft: 'shift',\n ShiftRight: 'shift',\n AltLeft: 'alt',\n AltRight: 'alt',\n MetaLeft: 'meta',\n MetaRight: 'meta',\n OSLeft: 'meta',\n OSRight: 'meta',\n ControlLeft: 'ctrl',\n ControlRight: 'ctrl'\n};\nfunction mapKey(key) {\n return (key && mappedKeys[key] || key || '').trim().toLowerCase().replace(/key|digit|numpad|arrow/, '');\n}\nfunction isHotkeyModifier(key) {\n return reservedModifierKeywords.includes(key);\n}\nfunction parseKeysHookInput(keys, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n return keys.split(splitKey);\n}\nfunction parseHotkey(hotkey, combinationKey, description) {\n if (combinationKey === void 0) {\n combinationKey = '+';\n }\n var keys = hotkey.toLocaleLowerCase().split(combinationKey).map(function (k) {\n return mapKey(k);\n });\n var modifiers = {\n alt: keys.includes('alt'),\n ctrl: keys.includes('ctrl') || keys.includes('control'),\n shift: keys.includes('shift'),\n meta: keys.includes('meta'),\n mod: keys.includes('mod')\n };\n var singleCharKeys = keys.filter(function (k) {\n return !reservedModifierKeywords.includes(k);\n });\n return _extends({}, modifiers, {\n keys: singleCharKeys,\n description: description,\n hotkey: hotkey\n });\n}\n\n(function () {\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n document.addEventListener('keyup', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n }\n if (typeof window !== 'undefined') {\n window.addEventListener('blur', function () {\n currentlyPressedKeys.clear();\n });\n }\n})();\nvar currentlyPressedKeys = /*#__PURE__*/new Set();\n// https://github.com/microsoft/TypeScript/issues/17002\nfunction isReadonlyArray(value) {\n return Array.isArray(value);\n}\nfunction isHotkeyPressed(key, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n var hotkeyArray = isReadonlyArray(key) ? key : key.split(splitKey);\n return hotkeyArray.every(function (hotkey) {\n return currentlyPressedKeys.has(hotkey.trim().toLowerCase());\n });\n}\nfunction pushToCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (currentlyPressedKeys.has('meta')) {\n currentlyPressedKeys.forEach(function (key) {\n return !isHotkeyModifier(key) && currentlyPressedKeys[\"delete\"](key.toLowerCase());\n });\n }\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys.add(hotkey.toLowerCase());\n });\n}\nfunction removeFromCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (key === 'meta') {\n currentlyPressedKeys.clear();\n } else {\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys[\"delete\"](hotkey.toLowerCase());\n });\n }\n}\n\nfunction maybePreventDefault(e, hotkey, preventDefault) {\n if (typeof preventDefault === 'function' && preventDefault(e, hotkey) || preventDefault === true) {\n e.preventDefault();\n }\n}\nfunction isHotkeyEnabled(e, hotkey, enabled) {\n if (typeof enabled === 'function') {\n return enabled(e, hotkey);\n }\n return enabled === true || enabled === undefined;\n}\nfunction isKeyboardEventTriggeredByInput(ev) {\n return isHotkeyEnabledOnTag(ev, ['input', 'textarea', 'select']);\n}\nfunction isHotkeyEnabledOnTag(event, enabledOnTags) {\n if (enabledOnTags === void 0) {\n enabledOnTags = false;\n }\n var target = event.target,\n composed = event.composed;\n var targetTagName = null;\n if (isCustomElement(target) && composed) {\n targetTagName = event.composedPath()[0] && event.composedPath()[0].tagName;\n } else {\n targetTagName = target && target.tagName;\n }\n if (isReadonlyArray(enabledOnTags)) {\n return Boolean(targetTagName && enabledOnTags && enabledOnTags.some(function (tag) {\n var _targetTagName;\n return tag.toLowerCase() === ((_targetTagName = targetTagName) == null ? void 0 : _targetTagName.toLowerCase());\n }));\n }\n return Boolean(targetTagName && enabledOnTags && enabledOnTags);\n}\nfunction isCustomElement(element) {\n // We just do a basic check w/o any complex RegEx or validation against the list of legacy names containing a hyphen,\n // as none of them is likely to be an event target, and it won't hurt anyway if we miss.\n // see: https://html.spec.whatwg.org/multipage/custom-elements.html#prod-potentialcustomelementname\n return !!element.tagName && !element.tagName.startsWith(\"-\") && element.tagName.includes(\"-\");\n}\nfunction isScopeActive(activeScopes, scopes) {\n if (activeScopes.length === 0 && scopes) {\n console.warn('A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>');\n return true;\n }\n if (!scopes) {\n return true;\n }\n return activeScopes.some(function (scope) {\n return scopes.includes(scope);\n }) || activeScopes.includes('*');\n}\nvar isHotkeyMatchingKeyboardEvent = function isHotkeyMatchingKeyboardEvent(e, hotkey, ignoreModifiers) {\n if (ignoreModifiers === void 0) {\n ignoreModifiers = false;\n }\n var alt = hotkey.alt,\n meta = hotkey.meta,\n mod = hotkey.mod,\n shift = hotkey.shift,\n ctrl = hotkey.ctrl,\n keys = hotkey.keys;\n var pressedKeyUppercase = e.key,\n code = e.code,\n ctrlKey = e.ctrlKey,\n metaKey = e.metaKey,\n shiftKey = e.shiftKey,\n altKey = e.altKey;\n var keyCode = mapKey(code);\n var pressedKey = pressedKeyUppercase.toLowerCase();\n if (!(keys != null && keys.includes(keyCode)) && !(keys != null && keys.includes(pressedKey)) && !['ctrl', 'control', 'unknown', 'meta', 'alt', 'shift', 'os'].includes(keyCode)) {\n return false;\n }\n if (!ignoreModifiers) {\n // We check the pressed keys for compatibility with the keyup event. In keyup events the modifier flags are not set.\n if (alt === !altKey && pressedKey !== 'alt') {\n return false;\n }\n if (shift === !shiftKey && pressedKey !== 'shift') {\n return false;\n }\n // Mod is a special key name that is checking for meta on macOS and ctrl on other platforms\n if (mod) {\n if (!metaKey && !ctrlKey) {\n return false;\n }\n } else {\n if (meta === !metaKey && pressedKey !== 'meta' && pressedKey !== 'os') {\n return false;\n }\n if (ctrl === !ctrlKey && pressedKey !== 'ctrl' && pressedKey !== 'control') {\n return false;\n }\n }\n }\n // All modifiers are correct, now check the key\n // If the key is set, we check for the key\n if (keys && keys.length === 1 && (keys.includes(pressedKey) || keys.includes(keyCode))) {\n return true;\n } else if (keys) {\n // Check if all keys are present in pressedDownKeys set\n return isHotkeyPressed(keys);\n } else if (!keys) {\n // If the key is not set, we only listen for modifiers, that check went alright, so we return true\n return true;\n }\n // There is nothing that matches.\n return false;\n};\n\nvar BoundHotkeysProxyProvider = /*#__PURE__*/createContext(undefined);\nvar useBoundHotkeysProxy = function useBoundHotkeysProxy() {\n return useContext(BoundHotkeysProxyProvider);\n};\nfunction BoundHotkeysProxyProviderProvider(_ref) {\n var addHotkey = _ref.addHotkey,\n removeHotkey = _ref.removeHotkey,\n children = _ref.children;\n return /*#__PURE__*/jsx(BoundHotkeysProxyProvider.Provider, {\n value: {\n addHotkey: addHotkey,\n removeHotkey: removeHotkey\n },\n children: children\n });\n}\n\nfunction deepEqual(x, y) {\n //@ts-ignore\n return x && y && typeof x === 'object' && typeof y === 'object' ? Object.keys(x).length === Object.keys(y).length &&\n //@ts-ignore\n Object.keys(x).reduce(function (isEqual, key) {\n return isEqual && deepEqual(x[key], y[key]);\n }, true) : x === y;\n}\n\nvar HotkeysContext = /*#__PURE__*/createContext({\n hotkeys: [],\n enabledScopes: [],\n toggleScope: function toggleScope() {},\n enableScope: function enableScope() {},\n disableScope: function disableScope() {}\n});\nvar useHotkeysContext = function useHotkeysContext() {\n return useContext(HotkeysContext);\n};\nvar HotkeysProvider = function HotkeysProvider(_ref) {\n var _ref$initiallyActiveS = _ref.initiallyActiveScopes,\n initiallyActiveScopes = _ref$initiallyActiveS === void 0 ? ['*'] : _ref$initiallyActiveS,\n children = _ref.children;\n var _useState = useState((initiallyActiveScopes == null ? void 0 : initiallyActiveScopes.length) > 0 ? initiallyActiveScopes : ['*']),\n internalActiveScopes = _useState[0],\n setInternalActiveScopes = _useState[1];\n var _useState2 = useState([]),\n boundHotkeys = _useState2[0],\n setBoundHotkeys = _useState2[1];\n var enableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n });\n }, []);\n var disableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n });\n }, []);\n var toggleScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes(scope)) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n } else {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n }\n });\n }, []);\n var addBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return [].concat(prev, [hotkey]);\n });\n }, []);\n var removeBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return prev.filter(function (h) {\n return !deepEqual(h, hotkey);\n });\n });\n }, []);\n return /*#__PURE__*/jsx(HotkeysContext.Provider, {\n value: {\n enabledScopes: internalActiveScopes,\n hotkeys: boundHotkeys,\n enableScope: enableScope,\n disableScope: disableScope,\n toggleScope: toggleScope\n },\n children: /*#__PURE__*/jsx(BoundHotkeysProxyProviderProvider, {\n addHotkey: addBoundHotkey,\n removeHotkey: removeBoundHotkey,\n children: children\n })\n });\n};\n\nfunction useDeepEqualMemo(value) {\n var ref = useRef(undefined);\n if (!deepEqual(ref.current, value)) {\n ref.current = value;\n }\n return ref.current;\n}\n\nvar stopPropagation = function stopPropagation(e) {\n e.stopPropagation();\n e.preventDefault();\n e.stopImmediatePropagation();\n};\nvar useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nfunction useHotkeys(keys, callback, options, dependencies) {\n var _useState = useState(null),\n ref = _useState[0],\n setRef = _useState[1];\n var hasTriggeredRef = useRef(false);\n var _options = !(options instanceof Array) ? options : !(dependencies instanceof Array) ? dependencies : undefined;\n var _keys = isReadonlyArray(keys) ? keys.join(_options == null ? void 0 : _options.splitKey) : keys;\n var _deps = options instanceof Array ? options : dependencies instanceof Array ? dependencies : undefined;\n var memoisedCB = useCallback(callback, _deps != null ? _deps : []);\n var cbRef = useRef(memoisedCB);\n if (_deps) {\n cbRef.current = memoisedCB;\n } else {\n cbRef.current = callback;\n }\n var memoisedOptions = useDeepEqualMemo(_options);\n var _useHotkeysContext = useHotkeysContext(),\n enabledScopes = _useHotkeysContext.enabledScopes;\n var proxy = useBoundHotkeysProxy();\n useSafeLayoutEffect(function () {\n if ((memoisedOptions == null ? void 0 : memoisedOptions.enabled) === false || !isScopeActive(enabledScopes, memoisedOptions == null ? void 0 : memoisedOptions.scopes)) {\n return;\n }\n var listener = function listener(e, isKeyUp) {\n var _e$target;\n if (isKeyUp === void 0) {\n isKeyUp = false;\n }\n if (isKeyboardEventTriggeredByInput(e) && !isHotkeyEnabledOnTag(e, memoisedOptions == null ? void 0 : memoisedOptions.enableOnFormTags)) {\n return;\n }\n // TODO: SINCE THE EVENT IS NOW ATTACHED TO THE REF, THE ACTIVE ELEMENT CAN NEVER BE INSIDE THE REF. THE HOTKEY ONLY TRIGGERS IF THE\n // REF IS THE ACTIVE ELEMENT. THIS IS A PROBLEM SINCE FOCUSED SUB COMPONENTS WON'T TRIGGER THE HOTKEY.\n if (ref !== null) {\n var rootNode = ref.getRootNode();\n if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement !== ref && !ref.contains(rootNode.activeElement)) {\n stopPropagation(e);\n return;\n }\n }\n if ((_e$target = e.target) != null && _e$target.isContentEditable && !(memoisedOptions != null && memoisedOptions.enableOnContentEditable)) {\n return;\n }\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n var _hotkey$keys;\n var hotkey = parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey);\n if (isHotkeyMatchingKeyboardEvent(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.ignoreModifiers) || (_hotkey$keys = hotkey.keys) != null && _hotkey$keys.includes('*')) {\n if (memoisedOptions != null && memoisedOptions.ignoreEventWhen != null && memoisedOptions.ignoreEventWhen(e)) {\n return;\n }\n if (isKeyUp && hasTriggeredRef.current) {\n return;\n }\n maybePreventDefault(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.preventDefault);\n if (!isHotkeyEnabled(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.enabled)) {\n stopPropagation(e);\n return;\n }\n // Execute the user callback for that hotkey\n cbRef.current(e, hotkey);\n if (!isKeyUp) {\n hasTriggeredRef.current = true;\n }\n }\n });\n };\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys(mapKey(event.code));\n if ((memoisedOptions == null ? void 0 : memoisedOptions.keydown) === undefined && (memoisedOptions == null ? void 0 : memoisedOptions.keyup) !== true || memoisedOptions != null && memoisedOptions.keydown) {\n listener(event);\n }\n };\n var handleKeyUp = function handleKeyUp(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys(mapKey(event.code));\n hasTriggeredRef.current = false;\n if (memoisedOptions != null && memoisedOptions.keyup) {\n listener(event, true);\n }\n };\n var domNode = ref || (_options == null ? void 0 : _options.document) || document;\n // @ts-ignore\n domNode.addEventListener('keyup', handleKeyUp, _options == null ? void 0 : _options.eventListenerOptions);\n // @ts-ignore\n domNode.addEventListener('keydown', handleKeyDown, _options == null ? void 0 : _options.eventListenerOptions);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.addHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n return function () {\n // @ts-ignore\n domNode.removeEventListener('keyup', handleKeyUp, _options == null ? void 0 : _options.eventListenerOptions);\n // @ts-ignore\n domNode.removeEventListener('keydown', handleKeyDown, _options == null ? void 0 : _options.eventListenerOptions);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.removeHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n };\n }, [ref, _keys, memoisedOptions, enabledScopes]);\n return setRef;\n}\n\nfunction useRecordHotkeys() {\n var _useState = useState(new Set()),\n keys = _useState[0],\n setKeys = _useState[1];\n var _useState2 = useState(false),\n isRecording = _useState2[0],\n setIsRecording = _useState2[1];\n var handler = useCallback(function (event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n setKeys(function (prev) {\n var newKeys = new Set(prev);\n newKeys.add(mapKey(event.code));\n return newKeys;\n });\n }, []);\n var stop = useCallback(function () {\n if (typeof document !== 'undefined') {\n document.removeEventListener('keydown', handler);\n setIsRecording(false);\n }\n }, [handler]);\n var start = useCallback(function () {\n setKeys(new Set());\n if (typeof document !== 'undefined') {\n stop();\n document.addEventListener('keydown', handler);\n setIsRecording(true);\n }\n }, [handler, stop]);\n var resetKeys = useCallback(function () {\n setKeys(new Set());\n }, []);\n return [keys, {\n start: start,\n stop: stop,\n resetKeys: resetKeys,\n isRecording: isRecording\n }];\n}\n\nexport { HotkeysProvider, isHotkeyPressed, useHotkeys, useHotkeysContext, useRecordHotkeys };\n//# sourceMappingURL=react-hotkeys-hook.esm.js.map\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n var mountedRef = useRef(false);\n var get = useCallback(function () { return mountedRef.current; }, []);\n useEffect(function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []);\n return get;\n}\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n if (initialState === void 0) { initialState = {}; }\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var setState = useCallback(function (patch) {\n set(function (prevState) {\n return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n });\n }, []);\n return [state, setState];\n};\nexport default useSetState;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n var isMounted = useMountedState();\n var _a = useSetState({\n value: undefined,\n error: undefined,\n noUserInteraction: true,\n }), state = _a[0], setState = _a[1];\n var copyToClipboard = useCallback(function (value) {\n if (!isMounted()) {\n return;\n }\n var noUserInteraction;\n var normalizedValue;\n try {\n // only strings and numbers casted to strings can be copied to clipboard\n if (typeof value !== 'string' && typeof value !== 'number') {\n var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n // empty strings are also considered invalid\n else if (value === '') {\n var error = new Error(\"Cannot copy empty string to clipboard.\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n normalizedValue = value.toString();\n noUserInteraction = writeText(normalizedValue);\n setState({\n value: normalizedValue,\n error: undefined,\n noUserInteraction: noUserInteraction,\n });\n }\n catch (error) {\n setState({\n value: normalizedValue,\n error: error,\n noUserInteraction: noUserInteraction,\n });\n }\n }, []);\n return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useEffect, useState } from \"react\";\n\n/**\n * Hook that provides access to the current color scheme value.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook monitors the color-scheme CSS property on the document's HTML element\n * and returns the current value. It automatically updates when the color scheme changes,\n * either through direct style changes or theme updates stored in localStorage.\n *\n * The hook observes mutations to the HTML element's style attribute to detect\n * color scheme changes and re-renders the component when changes occur.\n *\n * @returns The current color scheme value as a string ('light', 'dark')\n */\nexport function useColorScheme() {\n const [colorScheme, setColorScheme] = useState(getCurrentColorScheme());\n\n // Helper function to get the current color-scheme from the <html> tag\n function getCurrentColorScheme() {\n return (\n document.documentElement.style.getPropertyValue(\"color-scheme\") ||\n localStorage.getItem(\"theme\") ||\n \"light\"\n );\n }\n\n useEffect(() => {\n const htmlElement = document.documentElement;\n\n const observer = new MutationObserver(() => {\n const newColorScheme = getCurrentColorScheme();\n setColorScheme(newColorScheme);\n });\n\n // Observe changes to the 'style' attribute of the <html> element\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return colorScheme;\n}\n","\"use client\";\nimport { useTheme } from \"next-themes\";\n\n/**\n * Hook for managing color mode (light/dark theme) state.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook provides access to the current color mode and functions to change it.\n * It integrates with the next-themes library to handle theme persistence and system preference detection.\n *\n * @returns An object containing:\n * - `colorMode`: The current resolved theme ('light' | 'dark' | 'system' | undefined)\n * - `setColorMode`: Function to set a specific color mode\n * - `toggleColorMode`: Function to toggle between light and dark modes\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { colorMode, toggleColorMode } = useColorMode();\n *\n * return (\n * <button onClick={toggleColorMode}>\n * Current mode: {colorMode}\n * </button>\n * );\n * }\n * ```\n */\n\nexport function useColorMode() {\n const { resolvedTheme, setTheme } = useTheme();\n const toggleColorMode = () => {\n setTheme(resolvedTheme === \"light\" ? \"dark\" : \"light\");\n };\n return {\n colorMode: resolvedTheme,\n setColorMode: setTheme,\n toggleColorMode,\n };\n}\n","import { useColorMode } from \"./../use-color-mode\";\n\n/**\n * Hook that returns a value based on the current color mode.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * @param light - The value to return when the color mode is light\n * @param dark - The value to return when the color mode is dark\n * @returns The appropriate value based on the current color mode\n */\nexport function useColorModeValue<T>(light: T, dark: T) {\n const { colorMode } = useColorMode();\n return colorMode === \"light\" ? light : dark;\n}\n"],"names":["_extends","n","e","t","r","reservedModifierKeywords","mappedKeys","mapKey","key","isHotkeyModifier","parseKeysHookInput","keys","splitKey","parseHotkey","hotkey","combinationKey","description","k","modifiers","singleCharKeys","currentlyPressedKeys","isReadonlyArray","value","isHotkeyPressed","hotkeyArray","pushToCurrentlyPressedKeys","removeFromCurrentlyPressedKeys","maybePreventDefault","preventDefault","isHotkeyEnabled","enabled","isKeyboardEventTriggeredByInput","ev","isHotkeyEnabledOnTag","event","enabledOnTags","target","composed","targetTagName","isCustomElement","tag","_targetTagName","element","isScopeActive","activeScopes","scopes","scope","isHotkeyMatchingKeyboardEvent","ignoreModifiers","alt","meta","mod","shift","ctrl","pressedKeyUppercase","code","ctrlKey","metaKey","shiftKey","altKey","keyCode","pressedKey","BoundHotkeysProxyProvider","createContext","useBoundHotkeysProxy","useContext","deepEqual","x","y","isEqual","HotkeysContext","useHotkeysContext","useDeepEqualMemo","ref","useRef","stopPropagation","useSafeLayoutEffect","useLayoutEffect","useEffect","useHotkeys","callback","options","dependencies","_useState","useState","setRef","hasTriggeredRef","_options","_keys","_deps","memoisedCB","useCallback","cbRef","memoisedOptions","_useHotkeysContext","enabledScopes","proxy","listener","isKeyUp","_e$target","rootNode","_hotkey$keys","handleKeyDown","handleKeyUp","domNode","useMountedState","mountedRef","get","useSetState","initialState","_a","state","set","setState","patch","prevState","toggleSelection","selection","active","ranges","i","range","deselectCurrent","require$$0","clipboardToIE11Formatting","defaultMessage","format","message","copyKey","copy","text","debug","reselectPrevious","mark","success","successful","err","copyToClipboard","useCopyToClipboard","isMounted","noUserInteraction","normalizedValue","error","writeText","useColorScheme","colorScheme","setColorScheme","getCurrentColorScheme","htmlElement","observer","newColorScheme","useColorMode","resolvedTheme","setTheme","useTheme","useColorModeValue","light","dark","colorMode"],"mappings":"k6FAGA,SAASA,GAAW,CAClB,OAAOA,EAAW,OAAO,OAAS,OAAO,OAAO,KAAI,EAAK,SAAUC,EAAG,CACpE,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAI,UAAUD,CAAC,EACnB,QAASE,KAAKD,GAAI,CAAA,GAAI,eAAe,KAAKA,EAAGC,CAAC,IAAMH,EAAEG,CAAC,EAAID,EAAEC,CAAC,EAChE,CACA,OAAOH,CACT,EAAGD,EAAS,MAAM,KAAM,SAAS,CACnC,CAEA,IAAIK,GAA2B,CAAC,QAAS,MAAO,OAAQ,MAAO,MAAM,EACjEC,GAAa,CACf,IAAK,SACL,OAAU,QACV,IAAK,SACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,YACL,IAAK,YACL,IAAK,eACL,UAAW,QACX,WAAY,QACZ,QAAS,MACT,SAAU,MACV,SAAU,OACV,UAAW,OACX,OAAQ,OACR,QAAS,OACT,YAAa,OACb,aAAc,MAChB,EACA,SAASC,EAAOC,EAAK,CACnB,OAAQA,GAAOF,GAAWE,CAAG,GAAKA,GAAO,IAAI,KAAI,EAAG,YAAW,EAAG,QAAQ,yBAA0B,EAAE,CACxG,CACA,SAASC,GAAiBD,EAAK,CAC7B,OAAOH,GAAyB,SAASG,CAAG,CAC9C,CACA,SAASE,EAAmBC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EJ,CACT,CChBO,SAASM,IAAe,CAC7B,KAAM,CAAE,cAAAC,EAAe,SAAAC,CAAA,EAAaC,IAAA,EAIpC,MAAO,CACL,UAAWF,EACX,aAAcC,EACd,gBANsB,IAAM,CAC5BA,EAASD,IAAkB,QAAU,OAAS,OAAO,CACvD,CAIE,CAEJ,CC7BO,SAASG,GAAqBC,EAAUC,EAAS,CACtD,KAAM,CAAE,UAAAC,CAAA,EAAcP,GAAA,EACtB,OAAOO,IAAc,QAAUF,EAAQC,CACzC","x_google_ignoreList":[0,1,2,3,4,5]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2482,6 +2482,109 @@ declare type ExcludedSwitchProps = "asChild" | "isIndeterminate" | "colorScheme"
|
|
|
2482
2482
|
*/
|
|
2483
2483
|
declare type ExcludePolymorphicFromProps<T> = Omit<T, "as" | "asChild">;
|
|
2484
2484
|
|
|
2485
|
+
/**
|
|
2486
|
+
* # FieldErrors
|
|
2487
|
+
*
|
|
2488
|
+
* Renders error messages based on error object configuration.
|
|
2489
|
+
* Provides backwards compatibility with UI-Kit FieldErrors while integrating
|
|
2490
|
+
* with Nimbus design system patterns.
|
|
2491
|
+
*
|
|
2492
|
+
* Supports custom error renderers and localized built-in error messages
|
|
2493
|
+
* for common validation scenarios like missing required fields.
|
|
2494
|
+
*/
|
|
2495
|
+
export declare const FieldErrors: {
|
|
2496
|
+
({ id, errors, isVisible, renderError, renderDefaultError, customMessages, ...props }: FieldErrorsProps): JSX.Element | null;
|
|
2497
|
+
displayName: string;
|
|
2498
|
+
errorTypes: {
|
|
2499
|
+
readonly MISSING: "missing";
|
|
2500
|
+
readonly INVALID: "invalid";
|
|
2501
|
+
readonly EMPTY: "empty";
|
|
2502
|
+
readonly MIN_LENGTH: "min";
|
|
2503
|
+
readonly MAX_LENGTH: "max";
|
|
2504
|
+
readonly FORMAT: "format";
|
|
2505
|
+
readonly DUPLICATE: "duplicate";
|
|
2506
|
+
readonly NEGATIVE: "negative";
|
|
2507
|
+
readonly FRACTIONS: "fractions";
|
|
2508
|
+
readonly BELOW_MIN: "belowMin";
|
|
2509
|
+
readonly ABOVE_MAX: "aboveMax";
|
|
2510
|
+
readonly OUT_OF_RANGE: "outOfRange";
|
|
2511
|
+
readonly INVALID_FROM_SERVER: "invalidFromServer";
|
|
2512
|
+
readonly NOT_FOUND: "notFound";
|
|
2513
|
+
readonly BLOCKED: "blocked";
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
|
|
2517
|
+
/**
|
|
2518
|
+
* Props for FieldErrors component
|
|
2519
|
+
*/
|
|
2520
|
+
export declare interface FieldErrorsProps {
|
|
2521
|
+
/**
|
|
2522
|
+
* ID of the error field for accessibility
|
|
2523
|
+
*/
|
|
2524
|
+
id?: string;
|
|
2525
|
+
/**
|
|
2526
|
+
* Error object - only truthy values will be rendered
|
|
2527
|
+
* Compatible with UI-Kit FieldErrors format
|
|
2528
|
+
*/
|
|
2529
|
+
errors?: TFieldErrors;
|
|
2530
|
+
/**
|
|
2531
|
+
* Whether error messages should be visible
|
|
2532
|
+
* @deprecated This prop will be automatically handled by the component
|
|
2533
|
+
*/
|
|
2534
|
+
isVisible?: boolean;
|
|
2535
|
+
/**
|
|
2536
|
+
* Custom error renderer function
|
|
2537
|
+
* Return null to fall back to renderDefaultError or built-in errors
|
|
2538
|
+
*/
|
|
2539
|
+
renderError?: TErrorRenderer;
|
|
2540
|
+
/**
|
|
2541
|
+
* Default error renderer function for errors not handled by renderError
|
|
2542
|
+
* Return null to fall back to built-in error handling
|
|
2543
|
+
*/
|
|
2544
|
+
renderDefaultError?: TErrorRenderer;
|
|
2545
|
+
/**
|
|
2546
|
+
* Custom error messages to override built-in ones
|
|
2547
|
+
*/
|
|
2548
|
+
customMessages?: {
|
|
2549
|
+
missing?: ReactNode;
|
|
2550
|
+
invalid?: ReactNode;
|
|
2551
|
+
empty?: ReactNode;
|
|
2552
|
+
min?: ReactNode;
|
|
2553
|
+
max?: ReactNode;
|
|
2554
|
+
format?: ReactNode;
|
|
2555
|
+
duplicate?: ReactNode;
|
|
2556
|
+
negative?: ReactNode;
|
|
2557
|
+
fractions?: ReactNode;
|
|
2558
|
+
belowMin?: ReactNode;
|
|
2559
|
+
aboveMax?: ReactNode;
|
|
2560
|
+
outOfRange?: ReactNode;
|
|
2561
|
+
invalidFromServer?: ReactNode;
|
|
2562
|
+
notFound?: ReactNode;
|
|
2563
|
+
blocked?: ReactNode;
|
|
2564
|
+
};
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* Built-in error types that FieldErrors can handle automatically
|
|
2569
|
+
*/
|
|
2570
|
+
export declare const FieldErrorTypes: {
|
|
2571
|
+
readonly MISSING: "missing";
|
|
2572
|
+
readonly INVALID: "invalid";
|
|
2573
|
+
readonly EMPTY: "empty";
|
|
2574
|
+
readonly MIN_LENGTH: "min";
|
|
2575
|
+
readonly MAX_LENGTH: "max";
|
|
2576
|
+
readonly FORMAT: "format";
|
|
2577
|
+
readonly DUPLICATE: "duplicate";
|
|
2578
|
+
readonly NEGATIVE: "negative";
|
|
2579
|
+
readonly FRACTIONS: "fractions";
|
|
2580
|
+
readonly BELOW_MIN: "belowMin";
|
|
2581
|
+
readonly ABOVE_MAX: "aboveMax";
|
|
2582
|
+
readonly OUT_OF_RANGE: "outOfRange";
|
|
2583
|
+
readonly INVALID_FROM_SERVER: "invalidFromServer";
|
|
2584
|
+
readonly NOT_FOUND: "notFound";
|
|
2585
|
+
readonly BLOCKED: "blocked";
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2485
2588
|
export { Flex }
|
|
2486
2589
|
|
|
2487
2590
|
declare const formatMoneyValueForDisplay: (moneyValue: TMoneyValue, locale: string) => TValue;
|
|
@@ -4561,6 +4664,11 @@ declare type TCustomEvent = {
|
|
|
4561
4664
|
};
|
|
4562
4665
|
};
|
|
4563
4666
|
|
|
4667
|
+
/**
|
|
4668
|
+
* Function to render custom error messages
|
|
4669
|
+
*/
|
|
4670
|
+
export declare type TErrorRenderer = (key: string, error?: boolean) => ReactNode;
|
|
4671
|
+
|
|
4564
4672
|
/**
|
|
4565
4673
|
* # Text
|
|
4566
4674
|
*
|
|
@@ -4667,6 +4775,12 @@ export declare interface TextProps extends Omit<TextProps_2, "slot"> {
|
|
|
4667
4775
|
slot?: string | null | undefined;
|
|
4668
4776
|
}
|
|
4669
4777
|
|
|
4778
|
+
/**
|
|
4779
|
+
* Error object type - compatible with UI-Kit FieldErrors
|
|
4780
|
+
* Only entries with truthy values will be rendered as errors
|
|
4781
|
+
*/
|
|
4782
|
+
export declare type TFieldErrors = Record<string, boolean>;
|
|
4783
|
+
|
|
4670
4784
|
/**
|
|
4671
4785
|
* TimeInput
|
|
4672
4786
|
* ============================================================
|