@cgi-learning-hub/ui 0.0.1-dev.1708959744 → 0.0.1-dev.1708974808

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.
Files changed (92) hide show
  1. package/dist/{Button-wMPAZpnO.cjs → Button-Tkz5NkF_.cjs} +1 -1
  2. package/dist/{Button-CmBnwwn3.js → Button-X7eWZQfX.js} +12 -12
  3. package/dist/ButtonBase-CKfcGhaU.js +892 -0
  4. package/dist/ButtonBase-Cg8cBMzO.cjs +75 -0
  5. package/dist/Input-CAb0EFzc.cjs +1 -0
  6. package/dist/{Input-Dk-cN0Fb.js → Input-CbYjsRHK.js} +10 -10
  7. package/dist/{InputBase-BbXy6VDy.js → InputBase-B13Nzzhk.js} +157 -138
  8. package/dist/InputBase-CKlCw9fj.cjs +4 -0
  9. package/dist/assets/index.css +1 -1
  10. package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
  11. package/dist/components/AnotherComponent/AnotherComponent.es.js +3 -3
  12. package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
  13. package/dist/components/BasicButtons/BasicButtons.es.js +10 -10
  14. package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -1
  15. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +28 -1
  16. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +333 -126
  17. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
  18. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
  19. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
  20. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
  21. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
  22. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
  23. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
  24. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
  25. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
  26. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
  27. package/dist/components/index.cjs.js +1 -1
  28. package/dist/components/index.d.ts +0 -4
  29. package/dist/components/index.es.js +12 -20
  30. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
  31. package/dist/components/inputs/SearchInput/SearchInput.es.js +247 -77
  32. package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -11
  33. package/dist/components/inputs/TextInput/TextInput.es.js +404 -367
  34. package/dist/{createSvgIcon-BivvPRyr.cjs → createSvgIcon-jvI3LIfI.cjs} +1 -1
  35. package/dist/{createSvgIcon-DLZM3vHe.js → createSvgIcon-qXNZi4k1.js} +14 -14
  36. package/dist/{extendSxProp-CVD6j4mA.js → extendSxProp-BRHiEwyk.js} +1 -1
  37. package/dist/{extendSxProp-D5gpnasP.cjs → extendSxProp-CvhhU9Vb.cjs} +1 -1
  38. package/dist/index.cjs.js +1 -1
  39. package/dist/index.es.js +10 -18
  40. package/dist/useForkRef-82uiK71d.cjs +1 -0
  41. package/dist/useForkRef-CLcOhrzI.js +44 -0
  42. package/dist/useTheme-BWRyHzdn.js +65 -0
  43. package/dist/useTheme-BpLcDNG1.cjs +1 -0
  44. package/dist/{useThemeProps-kb_vU-1P.js → useThemeProps-B6yTTpAe.js} +714 -741
  45. package/dist/{useThemeProps-C6ClLEqN.cjs → useThemeProps-CDriK9TK.cjs} +14 -14
  46. package/package.json +1 -2
  47. package/dist/ButtonBase-Bw43M3TO.js +0 -831
  48. package/dist/ButtonBase-XPViWbp_.cjs +0 -75
  49. package/dist/CircularProgress-BCdQaPFF.cjs +0 -28
  50. package/dist/CircularProgress-DRE9BLTL.js +0 -215
  51. package/dist/Input-DHic6dYE.cjs +0 -1
  52. package/dist/InputBase-WBNJQn8V.cjs +0 -4
  53. package/dist/Tab-C2Tmr8Sv.cjs +0 -1
  54. package/dist/Tab-CWxCqAvH.js +0 -237
  55. package/dist/TransitionGroupContext-C7wWJ6l7.js +0 -14
  56. package/dist/TransitionGroupContext-g4tmk10h.cjs +0 -1
  57. package/dist/Typography-B1bdo7yt.js +0 -177
  58. package/dist/Typography-CO64FVmw.cjs +0 -1
  59. package/dist/components/Dropzone/Dropzone.cjs.js +0 -5
  60. package/dist/components/Dropzone/Dropzone.d.ts +0 -9
  61. package/dist/components/Dropzone/Dropzone.es.js +0 -1209
  62. package/dist/components/Dropzone/index.cjs.js +0 -1
  63. package/dist/components/Dropzone/index.d.ts +0 -2
  64. package/dist/components/Dropzone/index.es.js +0 -4
  65. package/dist/components/lists/FileList/FileList.cjs.js +0 -1
  66. package/dist/components/lists/FileList/FileList.d.ts +0 -7
  67. package/dist/components/lists/FileList/FileList.es.js +0 -19
  68. package/dist/components/lists/FileList/FileListItem.cjs.js +0 -2
  69. package/dist/components/lists/FileList/FileListItem.d.ts +0 -13
  70. package/dist/components/lists/FileList/FileListItem.es.js +0 -216
  71. package/dist/components/lists/FileList/index.cjs.js +0 -1
  72. package/dist/components/lists/FileList/index.d.ts +0 -4
  73. package/dist/components/lists/FileList/index.es.js +0 -6
  74. package/dist/components/lists/index.cjs.js +0 -1
  75. package/dist/components/lists/index.d.ts +0 -1
  76. package/dist/components/lists/index.es.js +0 -6
  77. package/dist/createSvgIcon-9NfUaq9H.js +0 -143
  78. package/dist/createSvgIcon-B7HVs3ZC.cjs +0 -2
  79. package/dist/ownerWindow-BoRkeomM.js +0 -23
  80. package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
  81. package/dist/refType-CMQbzE37.js +0 -29
  82. package/dist/refType-dllUCpD8.cjs +0 -1
  83. package/dist/useControlled-BsLcOmhe.js +0 -48
  84. package/dist/useControlled-jN3fqFfv.cjs +0 -3
  85. package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
  86. package/dist/useForkRef-DwN_Iz9R.js +0 -17
  87. package/dist/useIsFocusVisible-BF0lT08B.cjs +0 -1
  88. package/dist/useIsFocusVisible-D8ksiuhS.js +0 -69
  89. package/dist/useTheme-BSwuVDD3.js +0 -9
  90. package/dist/useTheme-C-LTLVMt.cjs +0 -1
  91. package/dist/useTimeout-KN97abZR.js +0 -47
  92. package/dist/useTimeout-qjxkiZZn.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Dropzone.cjs.js");exports.Dropzone=e;
@@ -1,2 +0,0 @@
1
- export * from "./Dropzone";
2
- export { default as Dropzone } from "./Dropzone";
@@ -1,4 +0,0 @@
1
- import { default as r } from "./Dropzone.es.js";
2
- export {
3
- r as Dropzone
4
- };
@@ -1 +0,0 @@
1
- "use strict";const r=require("react/jsx-runtime");require("react");const o=require("./FileListItem.cjs.js"),c=require("../../../createSvgIcon-B7HVs3ZC.cjs"),n=({files:i=[],...s})=>r.jsx(c.Box,{sx:{display:"flex",flexDirection:"column",rowGap:"0.5rem"},children:i.map((t,e)=>r.jsx(o,{file:t,uploading:e%2===0,...s},e))});module.exports=n;
@@ -1,7 +0,0 @@
1
- import { type File } from "./FileListItem";
2
- export interface FileListProps<T extends File> {
3
- files: T[];
4
- onDelete?: (file: T) => void;
5
- }
6
- declare const FileList: <T extends File>({ files, ...otherProps }: FileListProps<T>) => import("react/jsx-runtime").JSX.Element;
7
- export default FileList;
@@ -1,19 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import "react";
3
- import e from "./FileListItem.es.js";
4
- import { B as l } from "../../../createSvgIcon-9NfUaq9H.js";
5
- const n = ({
6
- files: i = [],
7
- ...t
8
- }) => /* @__PURE__ */ r(l, { sx: { display: "flex", flexDirection: "column", rowGap: "0.5rem" }, children: i.map((m, o) => /* @__PURE__ */ r(
9
- e,
10
- {
11
- file: m,
12
- uploading: o % 2 === 0,
13
- ...t
14
- },
15
- o
16
- )) });
17
- export {
18
- n as default
19
- };
@@ -1,2 +0,0 @@
1
- "use strict";const a=require("react/jsx-runtime"),i=require("../../../createSvgIcon-B7HVs3ZC.cjs"),b=require("react"),v=require("../../../Typography-CO64FVmw.cjs"),e=require("../../../useThemeProps-C6ClLEqN.cjs"),_=require("../../../ButtonBase-XPViWbp_.cjs"),j=require("../../../refType-dllUCpD8.cjs"),I=require("../../../CircularProgress-BCdQaPFF.cjs");function C(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>o[t]})}}return r.default=o,Object.freeze(r)}const p=C(b);var d={},O=i.interopRequireDefaultExports;Object.defineProperty(d,"__esModule",{value:!0});var T=d.default=void 0,$=O(i.requireCreateSvgIcon()),B=a;T=d.default=(0,$.default)((0,B.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var u={},q=i.interopRequireDefaultExports;Object.defineProperty(u,"__esModule",{value:!0});var h=u.default=void 0,M=q(i.requireCreateSvgIcon()),k=a;h=u.default=(0,M.default)((0,k.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile");function S(o){return e.generateUtilityClass("MuiIconButton",o)}const E=e.generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),N=["edge","children","className","color","disabled","disableFocusRipple","size"],D=o=>{const{classes:r,disabled:t,color:s,edge:n,size:l}=o,c={root:["root",t&&"disabled",s!=="default"&&`color${e.capitalize(s)}`,n&&`edge${e.capitalize(n)}`,`size${e.capitalize(l)}`]};return e.composeClasses(c,S,r)},F=e.styled(_.ButtonBase,{name:"MuiIconButton",slot:"Root",overridesResolver:(o,r)=>{const{ownerState:t}=o;return[r.root,t.color!=="default"&&r[`color${e.capitalize(t.color)}`],t.edge&&r[`edge${e.capitalize(t.edge)}`],r[`size${e.capitalize(t.size)}`]]}})(({theme:o,ownerState:r})=>e._extends({textAlign:"center",flex:"0 0 auto",fontSize:o.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(o.vars||o).palette.action.active,transition:o.transitions.create("background-color",{duration:o.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:o.vars?`rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})`:e.alpha(o.palette.action.active,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},r.edge==="start"&&{marginLeft:r.size==="small"?-3:-12},r.edge==="end"&&{marginRight:r.size==="small"?-3:-12}),({theme:o,ownerState:r})=>{var t;const s=(t=(o.vars||o).palette)==null?void 0:t[r.color];return e._extends({},r.color==="inherit"&&{color:"inherit"},r.color!=="inherit"&&r.color!=="default"&&e._extends({color:s==null?void 0:s.main},!r.disableRipple&&{"&:hover":e._extends({},s&&{backgroundColor:o.vars?`rgba(${s.mainChannel} / ${o.vars.palette.action.hoverOpacity})`:e.alpha(s.main,o.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),r.size==="small"&&{padding:5,fontSize:o.typography.pxToRem(18)},r.size==="large"&&{padding:12,fontSize:o.typography.pxToRem(28)},{[`&.${E.disabled}`]:{backgroundColor:"transparent",color:(o.vars||o).palette.action.disabled}})}),m=p.forwardRef(function(r,t){const s=e.useThemeProps({props:r,name:"MuiIconButton"}),{edge:n=!1,children:l,className:c,color:x="default",disabled:f=!1,disableFocusRipple:y=!1,size:P="medium"}=s,z=e._objectWithoutPropertiesLoose(s,N),g=e._extends({},s,{edge:n,color:x,disabled:f,disableFocusRipple:y,size:P}),R=D(g);return a.jsx(F,e._extends({className:e.clsx(R.root,c),centerRipple:!0,focusRipple:!y,disabled:f,ref:t,ownerState:g},z,{children:l}))});process.env.NODE_ENV!=="production"&&(m.propTypes={children:j.chainPropTypes(e.PropTypes.node,o=>p.Children.toArray(o.children).some(t=>p.isValidElement(t)&&t.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
2
- `)):null),classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),e.PropTypes.string]),disabled:e.PropTypes.bool,disableFocusRipple:e.PropTypes.bool,disableRipple:e.PropTypes.bool,edge:e.PropTypes.oneOf(["end","start",!1]),size:e.PropTypes.oneOfType([e.PropTypes.oneOf(["small","medium","large"]),e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])});const L=m,U=({file:o,uploading:r,onDelete:t})=>{const s=`${o.size} octets`,n=()=>t==null?void 0:t(o);return a.jsxs(i.Box,{sx:{display:"flex",alignItems:"center",columnGap:"1rem"},children:[a.jsx(h,{color:"primary"}),a.jsxs("div",{className:"text-start w-full",children:[a.jsx(v.Typography,{children:o.name}),a.jsx(v.Typography,{fontSize:"0.875rem",color:"grey",children:s})]}),a.jsx(L,{onClick:n,disabled:r,children:r?a.jsx(I.CircularProgress,{size:24}):a.jsx(T,{})})]})},V=b.memo(U);module.exports=V;
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- export interface File {
3
- name: string;
4
- size: number;
5
- uploading?: boolean;
6
- }
7
- export interface FileListItemProps<T extends File> {
8
- file: T;
9
- uploading?: boolean;
10
- onDelete?: (file: T) => void;
11
- }
12
- declare const _default: React.MemoExoticComponent<(<T extends File>({ file, uploading, onDelete, }: FileListItemProps<T>) => import("react/jsx-runtime").JSX.Element)>;
13
- export default _default;
@@ -1,216 +0,0 @@
1
- import z, { jsx as s, jsxs as b } from "react/jsx-runtime";
2
- import { r as R, i as x, B as T } from "../../../createSvgIcon-9NfUaq9H.js";
3
- import * as p from "react";
4
- import M from "react";
5
- import { T as y } from "../../../Typography-B1bdo7yt.js";
6
- import { g as k, c as P, s as E, e as l, a as n, x as h, f as F, _ as L, h as N, P as r, j as q } from "../../../useThemeProps-kb_vU-1P.js";
7
- import { B as S } from "../../../ButtonBase-Bw43M3TO.js";
8
- import { c as U } from "../../../refType-CMQbzE37.js";
9
- import { C as V } from "../../../CircularProgress-DRE9BLTL.js";
10
- var u = {}, D = x;
11
- Object.defineProperty(u, "__esModule", {
12
- value: !0
13
- });
14
- var I = u.default = void 0, A = D(R()), H = z;
15
- I = u.default = (0, A.default)(/* @__PURE__ */ (0, H.jsx)("path", {
16
- d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"
17
- }), "Delete");
18
- var f = {}, W = x;
19
- Object.defineProperty(f, "__esModule", {
20
- value: !0
21
- });
22
- var C = f.default = void 0, G = W(R()), Y = z;
23
- C = f.default = (0, G.default)(/* @__PURE__ */ (0, Y.jsx)("path", {
24
- d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"
25
- }), "InsertDriveFile");
26
- function w(e) {
27
- return P("MuiIconButton", e);
28
- }
29
- const J = k("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), K = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], Q = (e) => {
30
- const {
31
- classes: o,
32
- disabled: t,
33
- color: a,
34
- edge: i,
35
- size: c
36
- } = e, d = {
37
- root: ["root", t && "disabled", a !== "default" && `color${l(a)}`, i && `edge${l(i)}`, `size${l(c)}`]
38
- };
39
- return q(d, w, o);
40
- }, X = E(S, {
41
- name: "MuiIconButton",
42
- slot: "Root",
43
- overridesResolver: (e, o) => {
44
- const {
45
- ownerState: t
46
- } = e;
47
- return [o.root, t.color !== "default" && o[`color${l(t.color)}`], t.edge && o[`edge${l(t.edge)}`], o[`size${l(t.size)}`]];
48
- }
49
- })(({
50
- theme: e,
51
- ownerState: o
52
- }) => n({
53
- textAlign: "center",
54
- flex: "0 0 auto",
55
- fontSize: e.typography.pxToRem(24),
56
- padding: 8,
57
- borderRadius: "50%",
58
- overflow: "visible",
59
- // Explicitly set the default value to solve a bug on IE11.
60
- color: (e.vars || e).palette.action.active,
61
- transition: e.transitions.create("background-color", {
62
- duration: e.transitions.duration.shortest
63
- })
64
- }, !o.disableRipple && {
65
- "&:hover": {
66
- backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : h(e.palette.action.active, e.palette.action.hoverOpacity),
67
- // Reset on touch devices, it doesn't add specificity
68
- "@media (hover: none)": {
69
- backgroundColor: "transparent"
70
- }
71
- }
72
- }, o.edge === "start" && {
73
- marginLeft: o.size === "small" ? -3 : -12
74
- }, o.edge === "end" && {
75
- marginRight: o.size === "small" ? -3 : -12
76
- }), ({
77
- theme: e,
78
- ownerState: o
79
- }) => {
80
- var t;
81
- const a = (t = (e.vars || e).palette) == null ? void 0 : t[o.color];
82
- return n({}, o.color === "inherit" && {
83
- color: "inherit"
84
- }, o.color !== "inherit" && o.color !== "default" && n({
85
- color: a == null ? void 0 : a.main
86
- }, !o.disableRipple && {
87
- "&:hover": n({}, a && {
88
- backgroundColor: e.vars ? `rgba(${a.mainChannel} / ${e.vars.palette.action.hoverOpacity})` : h(a.main, e.palette.action.hoverOpacity)
89
- }, {
90
- // Reset on touch devices, it doesn't add specificity
91
- "@media (hover: none)": {
92
- backgroundColor: "transparent"
93
- }
94
- })
95
- }), o.size === "small" && {
96
- padding: 5,
97
- fontSize: e.typography.pxToRem(18)
98
- }, o.size === "large" && {
99
- padding: 12,
100
- fontSize: e.typography.pxToRem(28)
101
- }, {
102
- [`&.${J.disabled}`]: {
103
- backgroundColor: "transparent",
104
- color: (e.vars || e).palette.action.disabled
105
- }
106
- });
107
- }), _ = /* @__PURE__ */ p.forwardRef(function(o, t) {
108
- const a = F({
109
- props: o,
110
- name: "MuiIconButton"
111
- }), {
112
- edge: i = !1,
113
- children: c,
114
- className: d,
115
- color: $ = "default",
116
- disabled: v = !1,
117
- disableFocusRipple: g = !1,
118
- size: B = "medium"
119
- } = a, O = L(a, K), m = n({}, a, {
120
- edge: i,
121
- color: $,
122
- disabled: v,
123
- disableFocusRipple: g,
124
- size: B
125
- }), j = Q(m);
126
- return /* @__PURE__ */ s(X, n({
127
- className: N(j.root, d),
128
- centerRipple: !0,
129
- focusRipple: !g,
130
- disabled: v,
131
- ref: t,
132
- ownerState: m
133
- }, O, {
134
- children: c
135
- }));
136
- });
137
- process.env.NODE_ENV !== "production" && (_.propTypes = {
138
- // ┌────────────────────────────── Warning ──────────────────────────────┐
139
- // │ These PropTypes are generated from the TypeScript type definitions. │
140
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
141
- // └─────────────────────────────────────────────────────────────────────┘
142
- /**
143
- * The icon to display.
144
- */
145
- children: U(r.node, (e) => p.Children.toArray(e.children).some((t) => /* @__PURE__ */ p.isValidElement(t) && t.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
146
- `)) : null),
147
- /**
148
- * Override or extend the styles applied to the component.
149
- */
150
- classes: r.object,
151
- /**
152
- * @ignore
153
- */
154
- className: r.string,
155
- /**
156
- * The color of the component.
157
- * It supports both default and custom theme colors, which can be added as shown in the
158
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
159
- * @default 'default'
160
- */
161
- color: r.oneOfType([r.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), r.string]),
162
- /**
163
- * If `true`, the component is disabled.
164
- * @default false
165
- */
166
- disabled: r.bool,
167
- /**
168
- * If `true`, the keyboard focus ripple is disabled.
169
- * @default false
170
- */
171
- disableFocusRipple: r.bool,
172
- /**
173
- * If `true`, the ripple effect is disabled.
174
- *
175
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
176
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
177
- * @default false
178
- */
179
- disableRipple: r.bool,
180
- /**
181
- * If given, uses a negative margin to counteract the padding on one
182
- * side (this is often helpful for aligning the left or right
183
- * side of the icon with content above or below, without ruining the border
184
- * size and shape).
185
- * @default false
186
- */
187
- edge: r.oneOf(["end", "start", !1]),
188
- /**
189
- * The size of the component.
190
- * `small` is equivalent to the dense button styling.
191
- * @default 'medium'
192
- */
193
- size: r.oneOfType([r.oneOf(["small", "medium", "large"]), r.string]),
194
- /**
195
- * The system prop that allows defining system overrides as well as additional CSS styles.
196
- */
197
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
198
- });
199
- const Z = _, ee = ({
200
- file: e,
201
- uploading: o,
202
- onDelete: t
203
- }) => {
204
- const a = `${e.size} octets`, i = () => t == null ? void 0 : t(e);
205
- return /* @__PURE__ */ b(T, { sx: { display: "flex", alignItems: "center", columnGap: "1rem" }, children: [
206
- /* @__PURE__ */ s(C, { color: "primary" }),
207
- /* @__PURE__ */ b("div", { className: "text-start w-full", children: [
208
- /* @__PURE__ */ s(y, { children: e.name }),
209
- /* @__PURE__ */ s(y, { fontSize: "0.875rem", color: "grey", children: a })
210
- ] }),
211
- /* @__PURE__ */ s(Z, { onClick: i, disabled: o, children: o ? /* @__PURE__ */ s(V, { size: 24 }) : /* @__PURE__ */ s(I, {}) })
212
- ] });
213
- }, ce = M.memo(ee);
214
- export {
215
- ce as default
216
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FileList.cjs.js"),t=require("./FileListItem.cjs.js");exports.FileList=e;exports.FileListItem=t;
@@ -1,4 +0,0 @@
1
- export * from "./FileList";
2
- export { default as FileList } from "./FileList";
3
- export * from "./FileListItem";
4
- export { default as FileListItem } from "./FileListItem";
@@ -1,6 +0,0 @@
1
- import { default as a } from "./FileList.es.js";
2
- import { default as i } from "./FileListItem.es.js";
3
- export {
4
- a as FileList,
5
- i as FileListItem
6
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FileList/FileList.cjs.js"),t=require("./FileList/FileListItem.cjs.js");exports.FileList=e;exports.FileListItem=t;
@@ -1 +0,0 @@
1
- export * from "./FileList";
@@ -1,6 +0,0 @@
1
- import { default as a } from "./FileList/FileList.es.js";
2
- import { default as i } from "./FileList/FileListItem.es.js";
3
- export {
4
- a as FileList,
5
- i as FileListItem
6
- };
@@ -1,143 +0,0 @@
1
- import { a as _, z as E, A as T, u as b, _ as C, h as P, g as S, B as I, T as $, C as v, P as r, e as O, D as B } from "./useThemeProps-kb_vU-1P.js";
2
- import * as D from "react";
3
- import { jsx as w } from "react/jsx-runtime";
4
- import { e as R } from "./extendSxProp-CVD6j4mA.js";
5
- import { c as M } from "./createSvgIcon-DLZM3vHe.js";
6
- import { c as q, i as F, u as j } from "./useControlled-BsLcOmhe.js";
7
- import { d as V, a as k, o as G } from "./ownerWindow-BoRkeomM.js";
8
- import { s as z, u as A, a as U } from "./useForkRef-DwN_Iz9R.js";
9
- import { u as W } from "./useId-BW-oWmul.js";
10
- import { a as H } from "./useTimeout-KN97abZR.js";
11
- import { u as L } from "./useIsFocusVisible-D8ksiuhS.js";
12
- function Y(e, t) {
13
- return process.env.NODE_ENV === "production" ? () => null : (o, u, s, n, i) => {
14
- const a = s || "<<anonymous>>", c = i || u;
15
- return typeof o[u] < "u" ? new Error(`The ${n} \`${c}\` of \`${a}\` is deprecated. ${t}`) : null;
16
- };
17
- }
18
- function J(e, t) {
19
- if (process.env.NODE_ENV === "production")
20
- return () => null;
21
- const o = t ? _({}, t.propTypes) : null;
22
- return (s) => (n, i, a, c, p, ...l) => {
23
- const f = p || i, m = o == null ? void 0 : o[f];
24
- if (m) {
25
- const d = m(n, i, a, c, p, ...l);
26
- if (d)
27
- return d;
28
- }
29
- return typeof n[i] < "u" && !n[s] ? new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${s}\` prop.`) : null;
30
- };
31
- }
32
- function K(e, t, o, u, s) {
33
- if (process.env.NODE_ENV === "production")
34
- return null;
35
- const n = s || t;
36
- return typeof e[t] < "u" ? new Error(`The prop \`${n}\` is not supported. Please remove it.`) : null;
37
- }
38
- const Q = ["className", "component"];
39
- function X(e = {}) {
40
- const {
41
- themeId: t,
42
- defaultTheme: o,
43
- defaultClassName: u = "MuiBox-root",
44
- generateClassName: s
45
- } = e, n = E("div", {
46
- shouldForwardProp: (a) => a !== "theme" && a !== "sx" && a !== "as"
47
- })(T);
48
- return /* @__PURE__ */ D.forwardRef(function(c, p) {
49
- const l = b(o), f = R(c), {
50
- className: m,
51
- component: d = "div"
52
- } = f, N = C(f, Q);
53
- return /* @__PURE__ */ w(n, _({
54
- as: d,
55
- ref: p,
56
- className: P(m, s ? s(u) : u),
57
- theme: t && l[t] || l
58
- }, N));
59
- });
60
- }
61
- const Z = S("MuiBox", ["root"]), ee = Z, te = I(), y = X({
62
- themeId: $,
63
- defaultTheme: te,
64
- defaultClassName: ee.root,
65
- generateClassName: v.generate
66
- });
67
- process.env.NODE_ENV !== "production" && (y.propTypes = {
68
- // ┌────────────────────────────── Warning ──────────────────────────────┐
69
- // │ These PropTypes are generated from the TypeScript type definitions. │
70
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
71
- // └─────────────────────────────────────────────────────────────────────┘
72
- /**
73
- * @ignore
74
- */
75
- children: r.node,
76
- /**
77
- * The component used for the root node.
78
- * Either a string to use a HTML element or a component.
79
- */
80
- component: r.elementType,
81
- /**
82
- * The system prop that allows defining system overrides as well as additional CSS styles.
83
- */
84
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
85
- });
86
- const he = y;
87
- var g = { exports: {} };
88
- (function(e) {
89
- function t(o) {
90
- return o && o.__esModule ? o : {
91
- default: o
92
- };
93
- }
94
- e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
95
- })(g);
96
- var xe = g.exports, h = {};
97
- const oe = {
98
- configure: (e) => {
99
- process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
100
- `)), v.configure(e);
101
- }
102
- }, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
103
- __proto__: null,
104
- capitalize: O,
105
- createChainedFunction: q,
106
- createSvgIcon: M,
107
- debounce: V,
108
- deprecatedPropType: Y,
109
- isMuiElement: F,
110
- ownerDocument: k,
111
- ownerWindow: G,
112
- requirePropFactory: J,
113
- setRef: z,
114
- unstable_ClassNameGenerator: oe,
115
- unstable_useEnhancedEffect: A,
116
- unstable_useId: W,
117
- unsupportedProp: K,
118
- useControlled: j,
119
- useEventCallback: H,
120
- useForkRef: U,
121
- useIsFocusVisible: L
122
- }, Symbol.toStringTag, { value: "Module" })), se = /* @__PURE__ */ B(re);
123
- var x;
124
- function _e() {
125
- return x || (x = 1, function(e) {
126
- "use client";
127
- Object.defineProperty(e, "__esModule", {
128
- value: !0
129
- }), Object.defineProperty(e, "default", {
130
- enumerable: !0,
131
- get: function() {
132
- return t.createSvgIcon;
133
- }
134
- });
135
- var t = se;
136
- }(h)), h;
137
- }
138
- export {
139
- he as B,
140
- xe as i,
141
- _e as r,
142
- K as u
143
- };
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("./useThemeProps-C6ClLEqN.cjs"),E=require("react"),N=require("react/jsx-runtime"),C=require("./extendSxProp-D5gpnasP.cjs"),q=require("./createSvgIcon-BivvPRyr.cjs"),y=require("./useControlled-jN3fqFfv.cjs"),h=require("./ownerWindow-Dk_4aaak.cjs"),x=require("./useForkRef-CGd3Nhyb.cjs"),S=require("./useId-Cw0TtD-8.cjs"),I=require("./useTimeout-qjxkiZZn.cjs"),O=require("./useIsFocusVisible-BF0lT08B.cjs");function $(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return o.default=t,Object.freeze(o)}const w=$(E);function R(t,o){return process.env.NODE_ENV==="production"?()=>null:(r,n,s,u,a)=>{const c=s||"<<anonymous>>",i=a||n;return typeof r[n]<"u"?new Error(`The ${u} \`${i}\` of \`${c}\` is deprecated. ${o}`):null}}function D(t,o){if(process.env.NODE_ENV==="production")return()=>null;const r=o?e._extends({},o.propTypes):null;return s=>(u,a,c,i,d,...l)=>{const p=d||a,f=r==null?void 0:r[p];if(f){const m=f(u,a,c,i,d,...l);if(m)return m}return typeof u[a]<"u"&&!u[s]?new Error(`The prop \`${p}\` of \`${t}\` can only be used together with the \`${s}\` prop.`):null}}function _(t,o,r,n,s){if(process.env.NODE_ENV==="production")return null;const u=s||o;return typeof t[o]<"u"?new Error(`The prop \`${u}\` is not supported. Please remove it.`):null}const F=["className","component"];function M(t={}){const{themeId:o,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:s}=t,u=e.styled$1("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(e.styleFunctionSx);return w.forwardRef(function(i,d){const l=e.useTheme(r),p=C.extendSxProp(i),{className:f,component:m="div"}=p,P=e._objectWithoutPropertiesLoose(p,F);return N.jsx(u,e._extends({as:m,ref:d,className:e.clsx(f,s?s(n):n),theme:o&&l[o]||l},P))})}const j=e.generateUtilityClasses("MuiBox",["root"]),B=j,k=e.createTheme$1(),g=M({themeId:e.THEME_ID,defaultTheme:k,defaultClassName:B.root,generateClassName:e.ClassNameGenerator.generate});process.env.NODE_ENV!=="production"&&(g.propTypes={children:e.PropTypes.node,component:e.PropTypes.elementType,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])});const V=g;var b={exports:{}};(function(t){function o(r){return r&&r.__esModule?r:{default:r}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(b);var G=b.exports,T={};const z={configure:t=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
2
- `)),e.ClassNameGenerator.configure(t)}},W=Object.freeze(Object.defineProperty({__proto__:null,capitalize:e.capitalize,createChainedFunction:y.createChainedFunction,createSvgIcon:q.createSvgIcon,debounce:h.debounce,deprecatedPropType:R,isMuiElement:y.isMuiElement,ownerDocument:h.ownerDocument,ownerWindow:h.ownerWindow,requirePropFactory:D,setRef:x.setRef,unstable_ClassNameGenerator:z,unstable_useEnhancedEffect:x.useEnhancedEffect,unstable_useId:S.useId,unsupportedProp:_,useControlled:y.useControlled,useEventCallback:I.useEventCallback,useForkRef:x.useForkRef,useIsFocusVisible:O.useIsFocusVisible},Symbol.toStringTag,{value:"Module"})),U=e.getAugmentedNamespace(W);var v;function A(){return v||(v=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.createSvgIcon}});var o=U}(T)),T}exports.Box=V;exports.interopRequireDefaultExports=G;exports.requireCreateSvgIcon=A;exports.unsupportedProp=_;
@@ -1,23 +0,0 @@
1
- function i(e, t = 166) {
2
- let o;
3
- function n(...u) {
4
- const c = () => {
5
- e.apply(this, u);
6
- };
7
- clearTimeout(o), o = setTimeout(c, t);
8
- }
9
- return n.clear = () => {
10
- clearTimeout(o);
11
- }, n;
12
- }
13
- function r(e) {
14
- return e && e.ownerDocument || document;
15
- }
16
- function a(e) {
17
- return r(e).defaultView || window;
18
- }
19
- export {
20
- r as a,
21
- i as d,
22
- a as o
23
- };
@@ -1 +0,0 @@
1
- "use strict";function i(e,o=166){let n;function t(...c){const r=()=>{e.apply(this,c)};clearTimeout(n),n=setTimeout(r,o)}return t.clear=()=>{clearTimeout(n)},t}function u(e){return e&&e.ownerDocument||document}function d(e){return u(e).defaultView||window}exports.debounce=i;exports.ownerDocument=u;exports.ownerWindow=d;
@@ -1,29 +0,0 @@
1
- import { P as o } from "./useThemeProps-kb_vU-1P.js";
2
- function a(n, e) {
3
- return process.env.NODE_ENV === "production" ? () => null : function(...t) {
4
- return n(...t) || e(...t);
5
- };
6
- }
7
- function f(n) {
8
- const {
9
- prototype: e = {}
10
- } = n;
11
- return !!e.isReactComponent;
12
- }
13
- function l(n, e, p, t, c) {
14
- const r = n[e], u = c || e;
15
- if (r == null || // When server-side rendering React doesn't warn either.
16
- // This is not an accurate check for SSR.
17
- // This is only in place for emotion compat.
18
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
19
- typeof window > "u")
20
- return null;
21
- let i;
22
- return typeof r == "function" && !f(r) && (i = "Did you accidentally provide a plain function component instead?"), i !== void 0 ? new Error(`Invalid ${t} \`${u}\` supplied to \`${p}\`. Expected an element type that can hold a ref. ${i} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
23
- }
24
- const y = a(o.elementType, l), s = o.oneOfType([o.func, o.object]), m = s;
25
- export {
26
- a as c,
27
- y as e,
28
- m as r
29
- };
@@ -1 +0,0 @@
1
- "use strict";const o=require("./useThemeProps-C6ClLEqN.cjs");function c(n,e){return process.env.NODE_ENV==="production"?()=>null:function(...t){return n(...t)||e(...t)}}function f(n){const{prototype:e={}}=n;return!!e.isReactComponent}function l(n,e,i,t,u){const p=n[e],s=u||e;if(p==null||typeof window>"u")return null;let r;return typeof p=="function"&&!f(p)&&(r="Did you accidentally provide a plain function component instead?"),r!==void 0?new Error(`Invalid ${t} \`${s}\` supplied to \`${i}\`. Expected an element type that can hold a ref. ${r} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const a=c(o.PropTypes.elementType,l),y=o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object]),d=y;exports.chainPropTypes=c;exports.elementTypeAcceptingRef=a;exports.refType=d;
@@ -1,48 +0,0 @@
1
- import * as u from "react";
2
- function d(...t) {
3
- return t.reduce((o, e) => e == null ? o : function(...i) {
4
- o.apply(this, i), e.apply(this, i);
5
- }, () => {
6
- });
7
- }
8
- function f(t, o) {
9
- var e, n;
10
- return /* @__PURE__ */ u.isValidElement(t) && o.indexOf(
11
- // For server components `muiName` is avaialble in element.type._payload.value.muiName
12
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
13
- // eslint-disable-next-line no-underscore-dangle
14
- (e = t.type.muiName) != null ? e : (n = t.type) == null || (n = n._payload) == null || (n = n.value) == null ? void 0 : n.muiName
15
- ) !== -1;
16
- }
17
- function h({
18
- controlled: t,
19
- default: o,
20
- name: e,
21
- state: n = "value"
22
- }) {
23
- const {
24
- current: i
25
- } = u.useRef(t !== void 0), [r, s] = u.useState(o), c = i ? t : r;
26
- if (process.env.NODE_ENV !== "production") {
27
- u.useEffect(() => {
28
- i !== (t !== void 0) && console.error([`MUI: A component is changing the ${i ? "" : "un"}controlled ${n} state of ${e} to be ${i ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${e} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
29
- `));
30
- }, [n, e, t]);
31
- const {
32
- current: l
33
- } = u.useRef(o);
34
- u.useEffect(() => {
35
- !i && l !== o && console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${e} after being initialized. To suppress this warning opt to use a controlled ${e}.`].join(`
36
- `));
37
- }, [JSON.stringify(o)]);
38
- }
39
- const a = u.useCallback((l) => {
40
- i || s(l);
41
- }, []);
42
- return [c, a];
43
- }
44
- export {
45
- d as c,
46
- f as i,
47
- h as u
48
- };
@@ -1,3 +0,0 @@
1
- "use strict";const f=require("react");function d(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const r=d(f);function p(...e){return e.reduce((o,t)=>t==null?o:function(...i){o.apply(this,i),t.apply(this,i)},()=>{})}function h(e,o){var t,n;return r.isValidElement(e)&&o.indexOf((t=e.type.muiName)!=null?t:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function m({controlled:e,default:o,name:t,state:n="value"}){const{current:i}=r.useRef(e!==void 0),[l,c]=r.useState(o),s=i?e:l;if(process.env.NODE_ENV!=="production"){r.useEffect(()=>{i!==(e!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${n} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${t} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
2
- `))},[n,t,e]);const{current:u}=r.useRef(o);r.useEffect(()=>{!i&&u!==o&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`].join(`
3
- `))},[JSON.stringify(o)])}const a=r.useCallback(u=>{i||c(u)},[]);return[s,a]}exports.createChainedFunction=p;exports.isMuiElement=h;exports.useControlled=m;
@@ -1 +0,0 @@
1
- "use strict";const o=require("react");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=r(o);function f(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const s=typeof window<"u"?c.useLayoutEffect:c.useEffect;function i(...e){return c.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{f(n,t)})},e)}exports.setRef=f;exports.useEnhancedEffect=s;exports.useForkRef=i;
@@ -1,17 +0,0 @@
1
- import * as t from "react";
2
- function f(e, n) {
3
- typeof e == "function" ? e(n) : e && (e.current = n);
4
- }
5
- const o = typeof window < "u" ? t.useLayoutEffect : t.useEffect;
6
- function c(...e) {
7
- return t.useMemo(() => e.every((n) => n == null) ? null : (n) => {
8
- e.forEach((u) => {
9
- f(u, n);
10
- });
11
- }, e);
12
- }
13
- export {
14
- c as a,
15
- f as s,
16
- o as u
17
- };
@@ -1 +0,0 @@
1
- "use strict";const o=require("react"),c=require("./useTimeout-qjxkiZZn.cjs");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=f(o);let i=!0,a=!1;const d=new c.Timeout,b={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function y(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&b[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function h(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function s(){i=!1}function m(){this.visibilityState==="hidden"&&a&&(i=!0)}function p(e){e.addEventListener("keydown",h,!0),e.addEventListener("mousedown",s,!0),e.addEventListener("pointerdown",s,!0),e.addEventListener("touchstart",s,!0),e.addEventListener("visibilitychange",m,!0)}function g(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return i||y(t)}function w(){const e=l.useCallback(u=>{u!=null&&p(u.ownerDocument)},[]),t=l.useRef(!1);function r(){return t.current?(a=!0,d.start(100,()=>{a=!1}),t.current=!1,!0):!1}function n(u){return g(u)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}exports.useIsFocusVisible=w;