@kakadu/components 6.7.1 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/button-tooltip.js +1 -1
- package/build/components/button-tooltip.mjs +1 -1
- package/build/components/combobox.js +1 -1
- package/build/components/combobox.mjs +56 -56
- package/build/components/flags/afrikaans.d.ts +2 -0
- package/build/components/flags/albanian.d.ts +2 -0
- package/build/components/flags/amharic.d.ts +2 -0
- package/build/components/flags/arabic.d.ts +2 -0
- package/build/components/flags/armenian.d.ts +2 -0
- package/build/components/flags/azerbaijani.d.ts +2 -0
- package/build/components/flags/bengali.d.ts +2 -0
- package/build/components/flags/bosnian.d.ts +2 -0
- package/build/components/flags/bulgarian.d.ts +2 -0
- package/build/components/flags/catalan.d.ts +2 -0
- package/build/components/flags/chinese-simplified.d.ts +2 -0
- package/build/components/flags/chinese-traditional.d.ts +2 -0
- package/build/components/flags/croatian.d.ts +2 -0
- package/build/components/flags/czech.d.ts +2 -0
- package/build/components/flags/danish.d.ts +2 -0
- package/build/components/flags/dari.d.ts +1 -0
- package/build/components/flags/dutch.d.ts +2 -0
- package/build/components/flags/english.d.ts +2 -0
- package/build/components/flags/estonian.d.ts +2 -0
- package/build/components/flags/farsi-persian.d.ts +2 -0
- package/build/components/flags/filipino-tagalog.d.ts +2 -0
- package/build/components/flags/finnish.d.ts +2 -0
- package/build/components/flags/french-canada.d.ts +2 -0
- package/build/components/flags/french.d.ts +2 -0
- package/build/components/flags/georgian.d.ts +2 -0
- package/build/components/flags/german.d.ts +2 -0
- package/build/components/flags/greek.d.ts +2 -0
- package/build/components/flags/gujarati.d.ts +2 -0
- package/build/components/flags/haitian-creole.d.ts +2 -0
- package/build/components/flags/hausa.d.ts +2 -0
- package/build/components/flags/hebrew.d.ts +2 -0
- package/build/components/flags/hindi.d.ts +2 -0
- package/build/components/flags/hungarian.d.ts +2 -0
- package/build/components/flags/icelandic.d.ts +2 -0
- package/build/components/flags/index.d.ts +160 -0
- package/build/components/flags/indonesian.d.ts +2 -0
- package/build/components/flags/irish.d.ts +2 -0
- package/build/components/flags/italian.d.ts +2 -0
- package/build/components/flags/japanese.d.ts +2 -0
- package/build/components/flags/kannada.d.ts +2 -0
- package/build/components/flags/kazakh.d.ts +2 -0
- package/build/components/flags/korean.d.ts +2 -0
- package/build/components/flags/latvian.d.ts +2 -0
- package/build/components/flags/lithuanian.d.ts +2 -0
- package/build/components/flags/macedonian.d.ts +2 -0
- package/build/components/flags/malay.d.ts +2 -0
- package/build/components/flags/malayalam.d.ts +2 -0
- package/build/components/flags/maltese.d.ts +2 -0
- package/build/components/flags/marathi.d.ts +2 -0
- package/build/components/flags/mongolian.d.ts +2 -0
- package/build/components/flags/norwegian-nynorsk.d.ts +1 -0
- package/build/components/flags/norwegian.d.ts +2 -0
- package/build/components/flags/pashto.d.ts +2 -0
- package/build/components/flags/polish.d.ts +2 -0
- package/build/components/flags/portuguese-brazil.d.ts +2 -0
- package/build/components/flags/portuguese-portugal.d.ts +2 -0
- package/build/components/flags/punjabi.d.ts +1 -0
- package/build/components/flags/romanian.d.ts +2 -0
- package/build/components/flags/russian.d.ts +2 -0
- package/build/components/flags/serbian.d.ts +2 -0
- package/build/components/flags/sinhala.d.ts +2 -0
- package/build/components/flags/slovak.d.ts +2 -0
- package/build/components/flags/slovenian.d.ts +2 -0
- package/build/components/flags/somali.d.ts +2 -0
- package/build/components/flags/spanish-mexico.d.ts +2 -0
- package/build/components/flags/spanish.d.ts +2 -0
- package/build/components/flags/swahili.d.ts +2 -0
- package/build/components/flags/swedish.d.ts +2 -0
- package/build/components/flags/tamil.d.ts +2 -0
- package/build/components/flags/telugu.d.ts +2 -0
- package/build/components/flags/thai.d.ts +2 -0
- package/build/components/flags/turkish.d.ts +2 -0
- package/build/components/flags/ukrainian.d.ts +2 -0
- package/build/components/flags/urdu.d.ts +2 -0
- package/build/components/flags/uzbek.d.ts +2 -0
- package/build/components/flags/vietnamese.d.ts +2 -0
- package/build/components/flags/welsh.d.ts +2 -0
- package/build/components/flags.js +1 -0
- package/build/components/flags.mjs +2073 -0
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +5 -7
- package/build/components.css +1 -1
- package/build/index.d.ts +4 -0
- package/build/index.js +1 -1
- package/build/index.mjs +226 -221
- package/build/theme.js +1 -1
- package/build/theme.mjs +1 -1
- package/build/utilities/boolean-filter.d.ts +1 -0
- package/build/utilities/boolean-filter.js +1 -0
- package/build/utilities/boolean-filter.mjs +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core"),a=["top","bottom"];function c({id:s,label:u,position:o="top",className:t}){return e.jsxRuntimeExports.jsx("div",{id:s,role:"tooltip",className:n.cx("kakadu-components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core"),a=["top","bottom"];function c({id:s,label:u,position:o="top",className:t}){return e.jsxRuntimeExports.jsx("div",{id:s,role:"tooltip",className:n.cx("kakadu-components-3121583645",o==="top"&&"kakadu-components-430823771",o==="bottom"&&"kakadu-components-2189175034",t),children:e.jsxRuntimeExports.jsx("span",{className:n.cx("kakadu-components-3787062640",o==="top"&&"kakadu-components-2481216458",o==="bottom"&&"kakadu-components-637471806",t),children:u})})}exports.buttonTooltipPositions=a;exports.default=c;
|
|
@@ -7,7 +7,7 @@ function k({
|
|
|
7
7
|
position: o = "top",
|
|
8
8
|
className: t
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */ n.jsx("div", { id: m, role: "tooltip", className: a("kakadu-components-
|
|
10
|
+
return /* @__PURE__ */ n.jsx("div", { id: m, role: "tooltip", className: a("kakadu-components-3121583645", o === "top" && "kakadu-components-430823771", o === "bottom" && "kakadu-components-2189175034", t), children: /* @__PURE__ */ n.jsx("span", { className: a("kakadu-components-3787062640", o === "top" && "kakadu-components-2481216458", o === "bottom" && "kakadu-components-637471806", t), children: p }) });
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
13
|
c as buttonTooltipPositions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),_=require("@kuma-ui/core"),se=require("../hooks/use-synchronized-value.js"),ne=require("../icons/icon.js"),re=require("../icons/chevron-up.js"),oe=require("../utilities/search.js"),Y=require("../utilities/listeners.js"),ae=require("./input.js"),T=require("./text.js"),X=require("./flex.js"),ce=require("./skeleton.js"),ue=Y.default(s=>{window.addEventListener("mousemove",s,{capture:!0})},s=>{window.removeEventListener("mousemove",s,{capture:!0})}),ie=Y.default(s=>{window.addEventListener("keydown",s,{capture:!0})},s=>{window.removeEventListener("keydown",s,{capture:!0})});function F(){const{value:s,setValue:f}=se.default("isKeyboardNavigating");return e.useMemo(()=>({isKeyboardNavigating:s,setIsKeyboardNavigating:f}),[s,f])}function q(s){return"text"in s?s.text:s.label}const B="kakadu-components-1144794361",D="kakadu-components-2911184744";function le({ref:s,isSelected:f,id:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),_=require("@kuma-ui/core"),se=require("../hooks/use-synchronized-value.js"),ne=require("../icons/icon.js"),re=require("../icons/chevron-up.js"),oe=require("../utilities/search.js"),Y=require("../utilities/listeners.js"),ae=require("./input.js"),T=require("./text.js"),X=require("./flex.js"),ce=require("./skeleton.js"),ue=Y.default(s=>{window.addEventListener("mousemove",s,{capture:!0})},s=>{window.removeEventListener("mousemove",s,{capture:!0})}),ie=Y.default(s=>{window.addEventListener("keydown",s,{capture:!0})},s=>{window.removeEventListener("keydown",s,{capture:!0})});function F(){const{value:s,setValue:f}=se.default("isKeyboardNavigating");return e.useMemo(()=>({isKeyboardNavigating:s,setIsKeyboardNavigating:f}),[s,f])}function q(s){return"text"in s?s.text:s.label}const B="kakadu-components-1144794361",D="kakadu-components-2911184744";function le({ref:s,isSelected:f,id:V,value:o,label:k,onSelect:j,onHover:w}){const{isKeyboardNavigating:m}=F(),I=e.useCallback(()=>{j(o)},[j,o]),u=e.useCallback(r=>{m||r.movementX===0&&r.movementY===0||w(o)},[m,w,o]),b=e.useRef(null);e.useEffect(()=>{const r=b.current;f&&r&&m&&setTimeout(()=>{r.scrollIntoView({behavior:"smooth",block:"nearest"})},0)},[f,m]);const a=e.useCallback(r=>{b.current=r,s&&(s.current=r)},[s]);return d.jsxRuntimeExports.jsx("li",{ref:a,id:V,role:"option","aria-selected":f,tabIndex:-1,className:_.cx(B,"kakadu-components-4130497639",m?"kakadu-components-962373561":"kakadu-components-1109598791"),onClick:I,onMouseMove:u,children:d.jsxRuntimeExports.jsx(T.Span,{className:_.cx(D,typeof k=="string"&&"kakadu-components-154286052"),children:k})})}function de({isLoading:s,id:f,activeOptionId:V,selectedValue:o,options:k,onSelect:j,onHover:w}){const m=e.useRef(null);e.useEffect(()=>{const a=m.current;a&&a.scrollIntoView({behavior:"smooth",block:"nearest"})},[]);const I=e.useRef(null),{isKeyboardNavigating:u}=F(),b=e.useRef(u);return b.current=u,e.useLayoutEffect(()=>{const a=m.current;if(a&&k.length>0){if(b.current){const r=I.current;if(r){r.scrollIntoView({block:"nearest"});return}}a.scrollTo({top:0})}},[k]),d.jsxRuntimeExports.jsxs("ul",{ref:m,id:f,role:"listbox","aria-label":"Options",tabIndex:-1,className:"kakadu-components-3718330689",children:[k.length===0?s?null:d.jsxRuntimeExports.jsxs(X.default,{"aria-atomic":!0,as:"li",role:"status","aria-live":"polite",direction:"row",preset:"start",gap:.5,className:B,children:[d.jsxRuntimeExports.jsx(ne.default,{size:15,type:"exclamationTriangle"}),d.jsxRuntimeExports.jsx(T.Span,{className:D,children:"No results."})]}):k.map((a,r)=>d.jsxRuntimeExports.jsx(le,{...a,ref:a.value===o?I:void 0,id:a.value===o?V:void 0,isSelected:a.value===o,onSelect:j,onHover:w},q(a)+r)),s?d.jsxRuntimeExports.jsx(X.default,{as:"li",alignment:"center",className:B,children:d.jsxRuntimeExports.jsx(T.Span,{className:_.cx(D,"kakadu-components-2015848015"),children:d.jsxRuntimeExports.jsx(ce.SkeletonInstance,{width:"100%",height:"1.3em"})})}):null]})}function fe({isLoading:s,shouldFilterOptions:f=!0,label:V,options:o,error:k,warning:j,information:w,footnote:m,className:I,onChange:u,onSelect:b,...a}){const r=e.useRef(null),H=e.useId(),P=e.useId(),[R,K]=e.useState(!1),$=e.useCallback(()=>{K(!0)},[]),G=e.useCallback(t=>{var n;(n=r.current)!=null&&n.contains(t.relatedTarget)||K(!1)},[]),[h,i]=e.useState(!1);e.useEffect(()=>{i(R)},[R]);const[A,y]=e.useState(""),{value:p}=a,[v,O]=e.useState(p),[C,J]=e.useState(p),z=e.useRef(C),l=e.useCallback(t=>{J(t),z.current=t},[]);e.useEffect(()=>{O(p),l(p)},[p,l]),e.useEffect(()=>{if(p===void 0)return;const t=o.find(n=>n.value===p);t&&y(q(t))},[o,p]),e.useEffect(()=>{p===void 0&&y("")},[p]);const Q=e.useCallback(()=>{v&&(y(""),l(void 0))},[v,l]),W=e.useCallback((t,n)=>{y(t),u==null||u(t,n),i(!0),O(void 0)},[u]),Z=e.useCallback(t=>{var n;(n=r.current)!=null&&n.contains(t.target)&&i(!0)},[]),g=e.useCallback(t=>{const n=t==null?void 0:t.value;l(n),t?y(q(t)):(y(""),u==null||u("")),b==null||b(n)},[l,u,b]),ee=e.useCallback(t=>{const n=o.find(N=>N.value===t);g(n),O(t),i(!1)},[o,g]),te=e.useCallback(t=>{l(t)},[l]),M=e.useDeferredValue(A),x=e.useMemo(()=>!f||v?o:oe.default(M,o,q),[f,v,o,M]);e.useEffect(()=>{!v&&M.length>0&&x.length>0&&!x.some(t=>C===t.value)&&l(x[0].value)},[v,M,x,C,l]);const{setIsKeyboardNavigating:S}=F();return e.useEffect(()=>{if(R)return ue(t=>{t.movementX===0&&t.movementY===0||S(!1)})},[R,S]),e.useEffect(()=>{if(R)return ie(t=>{var U;let n;const N=x.length,L=x.findIndex(c=>c.value===z.current),E=()=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()};switch(t.key){case"Enter":{const c=x[L];c&&(E(),S(!0),i(!1),g(c),O(c.value));break}case"Escape":{if(h)E(),v?l(void 0):g(void 0),i(!1);else if(v)E(),i(!0),g(void 0);else{E(),K(!1);const c=document.activeElement;c instanceof HTMLElement&&((U=r.current)!=null&&U.contains(c))&&c.blur()}return}case"ArrowDown":{E(),h&&(n=L+1),i(!0);break}case"ArrowUp":{E(),h&&(n=L-1,n<0&&(n=N-1)),i(!0);break}case"Home":{i(!0),n=0;break}case"End":{i(!0),n=N-1;break}case"Backspace":{x.some(c=>c.value===v)&&(E(),g(void 0),i(!0));break}}if(n!==void 0&&(E(),S(!0),N>0)){const c=x[n%N];c&&l(c.value)}})},[R,x,S,i,g,O,h,v,l]),d.jsxRuntimeExports.jsx(ae.default,{...a,ref:r,role:"combobox",autoComplete:"off","aria-controls":H,"aria-expanded":h,"aria-activedescendant":h?P:void 0,label:V,value:A,error:k,warning:j,information:w,footnote:m,attachments:h?d.jsxRuntimeExports.jsx(de,{isLoading:s,id:H,activeOptionId:P,selectedValue:C,options:x,onSelect:ee,onHover:te}):null,className:_.cx(I,"kakadu-components-879486679"),onMouseDown:Z,onChange:W,onBeforeInput:Q,onFocus:$,onBlur:G,children:d.jsxRuntimeExports.jsx(re.default,{width:14,height:14,className:"kakadu-components-158931186"})})}exports.default=fe;exports.getComboboxOptionString=q;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as l } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as L, useId as Q, useState as S, useCallback as d, useEffect as h, useDeferredValue as ce, useMemo as Z, useLayoutEffect as ie } from "react";
|
|
3
3
|
import { cx as T } from "@kuma-ui/core";
|
|
4
4
|
import ue from "../hooks/use-synchronized-value.mjs";
|
|
5
5
|
import le from "../icons/icon.mjs";
|
|
@@ -44,19 +44,19 @@ const z = "kakadu-components-1144794361", U = "kakadu-components-2911184744";
|
|
|
44
44
|
function ke({
|
|
45
45
|
ref: t,
|
|
46
46
|
isSelected: m,
|
|
47
|
-
id:
|
|
47
|
+
id: K,
|
|
48
48
|
value: o,
|
|
49
49
|
label: x,
|
|
50
|
-
onSelect:
|
|
51
|
-
onHover:
|
|
50
|
+
onSelect: y,
|
|
51
|
+
onHover: N
|
|
52
52
|
}) {
|
|
53
53
|
const {
|
|
54
54
|
isKeyboardNavigating: f
|
|
55
|
-
} = X(),
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
f || r.movementX === 0 && r.movementY === 0 ||
|
|
59
|
-
}, [f,
|
|
55
|
+
} = X(), V = d(() => {
|
|
56
|
+
y(o);
|
|
57
|
+
}, [y, o]), c = d((r) => {
|
|
58
|
+
f || r.movementX === 0 && r.movementY === 0 || N(o);
|
|
59
|
+
}, [f, N, o]), p = L(null);
|
|
60
60
|
h(() => {
|
|
61
61
|
const r = p.current;
|
|
62
62
|
m && r && f && setTimeout(() => {
|
|
@@ -73,18 +73,18 @@ function ke({
|
|
|
73
73
|
},
|
|
74
74
|
[t]
|
|
75
75
|
);
|
|
76
|
-
return /* @__PURE__ */ l.jsx("li", { ref: s, id:
|
|
76
|
+
return /* @__PURE__ */ l.jsx("li", { ref: s, id: K, role: "option", "aria-selected": m, tabIndex: -1, className: T(z, "kakadu-components-4130497639", f ? "kakadu-components-962373561" : "kakadu-components-1109598791"), onClick: V, onMouseMove: c, children: /* @__PURE__ */ l.jsx(P, { className: T(U, typeof x == "string" && "kakadu-components-154286052"), children: x }) });
|
|
77
77
|
}
|
|
78
78
|
function xe({
|
|
79
79
|
isLoading: t,
|
|
80
80
|
id: m,
|
|
81
|
-
activeOptionId:
|
|
81
|
+
activeOptionId: K,
|
|
82
82
|
selectedValue: o,
|
|
83
83
|
options: x,
|
|
84
|
-
onSelect:
|
|
85
|
-
onHover:
|
|
84
|
+
onSelect: y,
|
|
85
|
+
onHover: N
|
|
86
86
|
}) {
|
|
87
|
-
const f =
|
|
87
|
+
const f = L(null);
|
|
88
88
|
h(() => {
|
|
89
89
|
const s = f.current;
|
|
90
90
|
s && s.scrollIntoView({
|
|
@@ -92,14 +92,14 @@ function xe({
|
|
|
92
92
|
block: "nearest"
|
|
93
93
|
});
|
|
94
94
|
}, []);
|
|
95
|
-
const
|
|
95
|
+
const V = L(null), {
|
|
96
96
|
isKeyboardNavigating: c
|
|
97
|
-
} = X(), p =
|
|
97
|
+
} = X(), p = L(c);
|
|
98
98
|
return p.current = c, ie(() => {
|
|
99
99
|
const s = f.current;
|
|
100
100
|
if (s && x.length > 0) {
|
|
101
101
|
if (p.current) {
|
|
102
|
-
const r =
|
|
102
|
+
const r = V.current;
|
|
103
103
|
if (r) {
|
|
104
104
|
r.scrollIntoView({
|
|
105
105
|
block: "nearest"
|
|
@@ -119,11 +119,11 @@ function xe({
|
|
|
119
119
|
ke,
|
|
120
120
|
{
|
|
121
121
|
...s,
|
|
122
|
-
ref: s.value === o ?
|
|
123
|
-
id: s.value === o ?
|
|
122
|
+
ref: s.value === o ? V : void 0,
|
|
123
|
+
id: s.value === o ? K : void 0,
|
|
124
124
|
isSelected: s.value === o,
|
|
125
|
-
onSelect:
|
|
126
|
-
onHover:
|
|
125
|
+
onSelect: y,
|
|
126
|
+
onHover: N
|
|
127
127
|
},
|
|
128
128
|
F(s) + r
|
|
129
129
|
)),
|
|
@@ -133,29 +133,29 @@ function xe({
|
|
|
133
133
|
function Me({
|
|
134
134
|
isLoading: t,
|
|
135
135
|
shouldFilterOptions: m = !0,
|
|
136
|
-
label:
|
|
136
|
+
label: K,
|
|
137
137
|
options: o,
|
|
138
138
|
error: x,
|
|
139
|
-
warning:
|
|
140
|
-
information:
|
|
139
|
+
warning: y,
|
|
140
|
+
information: N,
|
|
141
141
|
footnote: f,
|
|
142
|
-
className:
|
|
142
|
+
className: V,
|
|
143
143
|
onChange: c,
|
|
144
144
|
onSelect: p,
|
|
145
145
|
...s
|
|
146
146
|
}) {
|
|
147
|
-
const r =
|
|
147
|
+
const r = L(null), Y = Q(), q = Q(), [j, H] = S(!1), $ = d(() => {
|
|
148
148
|
H(!0);
|
|
149
149
|
}, []), ee = d((e) => {
|
|
150
150
|
var n;
|
|
151
151
|
(n = r.current) != null && n.contains(e.relatedTarget) || H(!1);
|
|
152
|
-
}, []), [
|
|
152
|
+
}, []), [w, i] = S(!1);
|
|
153
153
|
h(() => {
|
|
154
|
-
i(
|
|
155
|
-
}, [
|
|
156
|
-
const [C,
|
|
154
|
+
i(j);
|
|
155
|
+
}, [j]);
|
|
156
|
+
const [C, E] = S(""), {
|
|
157
157
|
value: b
|
|
158
|
-
} = s, [k, M] = S(b), [B, te] = S(b), G =
|
|
158
|
+
} = s, [k, M] = S(b), [B, te] = S(b), G = L(B), u = d((e) => {
|
|
159
159
|
te(e), G.current = e;
|
|
160
160
|
}, []);
|
|
161
161
|
h(() => {
|
|
@@ -164,24 +164,24 @@ function Me({
|
|
|
164
164
|
if (b === void 0)
|
|
165
165
|
return;
|
|
166
166
|
const e = o.find((n) => n.value === b);
|
|
167
|
-
e &&
|
|
167
|
+
e && E(F(e));
|
|
168
168
|
}, [o, b]), h(() => {
|
|
169
|
-
b === void 0 &&
|
|
169
|
+
b === void 0 && E("");
|
|
170
170
|
}, [b]);
|
|
171
171
|
const ne = d(() => {
|
|
172
|
-
k && (
|
|
172
|
+
k && (E(""), u(void 0));
|
|
173
173
|
}, [k, u]), re = d((e, n) => {
|
|
174
|
-
|
|
174
|
+
E(e), c == null || c(e, n), i(!0), M(void 0);
|
|
175
175
|
}, [c]), oe = d((e) => {
|
|
176
176
|
var n;
|
|
177
177
|
(n = r.current) != null && n.contains(e.target) && i(!0);
|
|
178
|
-
}, []),
|
|
178
|
+
}, []), I = d((e) => {
|
|
179
179
|
const n = e == null ? void 0 : e.value;
|
|
180
|
-
u(n), e ?
|
|
180
|
+
u(n), e ? E(F(e)) : (E(""), c == null || c("")), p == null || p(n);
|
|
181
181
|
}, [u, c, p]), se = d((e) => {
|
|
182
|
-
const n = o.find((
|
|
183
|
-
|
|
184
|
-
}, [o,
|
|
182
|
+
const n = o.find((O) => O.value === e);
|
|
183
|
+
I(n), M(e), i(!1);
|
|
184
|
+
}, [o, I]), ae = d((e) => {
|
|
185
185
|
u(e);
|
|
186
186
|
}, [u]), D = ce(C), v = Z(() => !m || k ? o : me(D, o, F), [m, k, o, D]);
|
|
187
187
|
h(() => {
|
|
@@ -191,42 +191,42 @@ function Me({
|
|
|
191
191
|
setIsKeyboardNavigating: R
|
|
192
192
|
} = X();
|
|
193
193
|
return h(() => {
|
|
194
|
-
if (
|
|
194
|
+
if (j)
|
|
195
195
|
return pe((e) => {
|
|
196
196
|
e.movementX === 0 && e.movementY === 0 || R(!1);
|
|
197
197
|
});
|
|
198
|
-
}, [
|
|
199
|
-
if (
|
|
198
|
+
}, [j, R]), h(() => {
|
|
199
|
+
if (j)
|
|
200
200
|
return be((e) => {
|
|
201
201
|
var J;
|
|
202
202
|
let n;
|
|
203
|
-
const
|
|
203
|
+
const O = v.length, A = v.findIndex((a) => a.value === G.current), g = () => {
|
|
204
204
|
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
205
205
|
};
|
|
206
206
|
switch (e.key) {
|
|
207
207
|
case "Enter": {
|
|
208
208
|
const a = v[A];
|
|
209
|
-
a && (
|
|
209
|
+
a && (g(), R(!0), i(!1), I(a), M(a.value));
|
|
210
210
|
break;
|
|
211
211
|
}
|
|
212
212
|
case "Escape": {
|
|
213
|
-
if (
|
|
214
|
-
|
|
213
|
+
if (w)
|
|
214
|
+
g(), k ? u(void 0) : I(void 0), i(!1);
|
|
215
215
|
else if (k)
|
|
216
|
-
|
|
216
|
+
g(), i(!0), I(void 0);
|
|
217
217
|
else {
|
|
218
|
-
|
|
218
|
+
g(), H(!1);
|
|
219
219
|
const a = document.activeElement;
|
|
220
220
|
a instanceof HTMLElement && ((J = r.current) != null && J.contains(a)) && a.blur();
|
|
221
221
|
}
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
224
|
case "ArrowDown": {
|
|
225
|
-
n = A + 1, i(!0);
|
|
225
|
+
g(), w && (n = A + 1), i(!0);
|
|
226
226
|
break;
|
|
227
227
|
}
|
|
228
228
|
case "ArrowUp": {
|
|
229
|
-
n = A - 1,
|
|
229
|
+
g(), w && (n = A - 1, n < 0 && (n = O - 1)), i(!0);
|
|
230
230
|
break;
|
|
231
231
|
}
|
|
232
232
|
case "Home": {
|
|
@@ -234,20 +234,20 @@ function Me({
|
|
|
234
234
|
break;
|
|
235
235
|
}
|
|
236
236
|
case "End": {
|
|
237
|
-
i(!0), n =
|
|
237
|
+
i(!0), n = O - 1;
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
240
240
|
case "Backspace": {
|
|
241
|
-
v.some((a) => a.value === k) && (
|
|
241
|
+
v.some((a) => a.value === k) && (g(), I(void 0), i(!0));
|
|
242
242
|
break;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
if (n !== void 0 && (
|
|
246
|
-
const a = v[n %
|
|
245
|
+
if (n !== void 0 && (g(), R(!0), O > 0)) {
|
|
246
|
+
const a = v[n % O];
|
|
247
247
|
a && u(a.value);
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
|
-
}, [
|
|
250
|
+
}, [j, v, R, i, I, M, w, k, u]), /* @__PURE__ */ l.jsx(fe, { ...s, ref: r, role: "combobox", autoComplete: "off", "aria-controls": Y, "aria-expanded": w, "aria-activedescendant": w ? q : void 0, label: K, value: C, error: x, warning: y, information: N, footnote: f, attachments: w ? /* @__PURE__ */ l.jsx(xe, { isLoading: t, id: Y, activeOptionId: q, selectedValue: B, options: v, onSelect: se, onHover: ae }) : null, className: T(V, "kakadu-components-879486679"), onMouseDown: oe, onChange: re, onBeforeInput: ne, onFocus: $, onBlur: ee, children: /* @__PURE__ */ l.jsx(de, { width: 14, height: 14, className: "kakadu-components-158931186" }) });
|
|
251
251
|
}
|
|
252
252
|
export {
|
|
253
253
|
Me as default,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './pashto';
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import AfrikaansSvg from './afrikaans';
|
|
3
|
+
import AmharicSvg from './amharic';
|
|
4
|
+
import ArabicSvg from './arabic';
|
|
5
|
+
import AzerbaijaniSvg from './azerbaijani';
|
|
6
|
+
import BulgarianSvg from './bulgarian';
|
|
7
|
+
import BengaliSvg from './bengali';
|
|
8
|
+
import PortugueseBrazilSvg from './portuguese-brazil';
|
|
9
|
+
import BosnianSvg from './bosnian';
|
|
10
|
+
import CatalanSvg from './catalan';
|
|
11
|
+
import CzechSvg from './czech';
|
|
12
|
+
import WelshSvg from './welsh';
|
|
13
|
+
import DanishSvg from './danish';
|
|
14
|
+
import GermanSvg from './german';
|
|
15
|
+
import GreekSvg from './greek';
|
|
16
|
+
import EnglishSvg from './english';
|
|
17
|
+
import SpanishSvg from './spanish';
|
|
18
|
+
import EstonianSvg from './estonian';
|
|
19
|
+
import FarsiPersianSvg from './farsi-persian';
|
|
20
|
+
import FinnishSvg from './finnish';
|
|
21
|
+
import FrenchSvg from './french';
|
|
22
|
+
import FrenchCanadaSvg from './french-canada';
|
|
23
|
+
import IrishSvg from './irish';
|
|
24
|
+
import GujaratiSvg from './gujarati';
|
|
25
|
+
import HausaSvg from './hausa';
|
|
26
|
+
import HebrewSvg from './hebrew';
|
|
27
|
+
import HindiSvg from './hindi';
|
|
28
|
+
import CroatianSvg from './croatian';
|
|
29
|
+
import HaitianCreoleSvg from './haitian-creole';
|
|
30
|
+
import HungarianSvg from './hungarian';
|
|
31
|
+
import ArmenianSvg from './armenian';
|
|
32
|
+
import IndonesianSvg from './indonesian';
|
|
33
|
+
import IcelandicSvg from './icelandic';
|
|
34
|
+
import ItalianSvg from './italian';
|
|
35
|
+
import JapaneseSvg from './japanese';
|
|
36
|
+
import GeorgianSvg from './georgian';
|
|
37
|
+
import KazakhSvg from './kazakh';
|
|
38
|
+
import KannadaSvg from './kannada';
|
|
39
|
+
import KoreanSvg from './korean';
|
|
40
|
+
import LithuanianSvg from './lithuanian';
|
|
41
|
+
import LatvianSvg from './latvian';
|
|
42
|
+
import MacedonianSvg from './macedonian';
|
|
43
|
+
import MalayalamSvg from './malayalam';
|
|
44
|
+
import MongolianSvg from './mongolian';
|
|
45
|
+
import MarathiSvg from './marathi';
|
|
46
|
+
import MalaySvg from './malay';
|
|
47
|
+
import MalteseSvg from './maltese';
|
|
48
|
+
import DutchSvg from './dutch';
|
|
49
|
+
import NorwegianSvg from './norwegian';
|
|
50
|
+
import PolishSvg from './polish';
|
|
51
|
+
import PashtoSvg from './pashto';
|
|
52
|
+
import PortuguesePortugalSvg from './portuguese-portugal';
|
|
53
|
+
import RomanianSvg from './romanian';
|
|
54
|
+
import RussianSvg from './russian';
|
|
55
|
+
import SinhalaSvg from './sinhala';
|
|
56
|
+
import SlovakSvg from './slovak';
|
|
57
|
+
import SlovenianSvg from './slovenian';
|
|
58
|
+
import SomaliSvg from './somali';
|
|
59
|
+
import AlbanianSvg from './albanian';
|
|
60
|
+
import SerbianSvg from './serbian';
|
|
61
|
+
import SwedishSvg from './swedish';
|
|
62
|
+
import SwahiliSvg from './swahili';
|
|
63
|
+
import TamilSvg from './tamil';
|
|
64
|
+
import TeluguSvg from './telugu';
|
|
65
|
+
import ThaiSvg from './thai';
|
|
66
|
+
import FilipinoTagalogSvg from './filipino-tagalog';
|
|
67
|
+
import TurkishSvg from './turkish';
|
|
68
|
+
import UkrainianSvg from './ukrainian';
|
|
69
|
+
import UrduSvg from './urdu';
|
|
70
|
+
import UzbekSvg from './uzbek';
|
|
71
|
+
import VietnameseSvg from './vietnamese';
|
|
72
|
+
import ChineseSimplifiedSvg from './chinese-simplified';
|
|
73
|
+
import SpanishMexicoSvg from './spanish-mexico';
|
|
74
|
+
import ChineseTraditionalSvg from './chinese-traditional';
|
|
75
|
+
declare const flags: {
|
|
76
|
+
af: typeof AfrikaansSvg;
|
|
77
|
+
am: typeof AmharicSvg;
|
|
78
|
+
ar: typeof ArabicSvg;
|
|
79
|
+
az: typeof AzerbaijaniSvg;
|
|
80
|
+
bg: typeof BulgarianSvg;
|
|
81
|
+
bn: typeof BengaliSvg;
|
|
82
|
+
pt: typeof PortugueseBrazilSvg;
|
|
83
|
+
bs: typeof BosnianSvg;
|
|
84
|
+
ca: typeof CatalanSvg;
|
|
85
|
+
cs: typeof CzechSvg;
|
|
86
|
+
cy: typeof WelshSvg;
|
|
87
|
+
da: typeof DanishSvg;
|
|
88
|
+
de: typeof GermanSvg;
|
|
89
|
+
el: typeof GreekSvg;
|
|
90
|
+
en: typeof EnglishSvg;
|
|
91
|
+
es: typeof SpanishSvg;
|
|
92
|
+
et: typeof EstonianSvg;
|
|
93
|
+
fa: typeof FarsiPersianSvg;
|
|
94
|
+
fi: typeof FinnishSvg;
|
|
95
|
+
fr: typeof FrenchSvg;
|
|
96
|
+
'fr-ca': typeof FrenchCanadaSvg;
|
|
97
|
+
ga: typeof IrishSvg;
|
|
98
|
+
gu: typeof GujaratiSvg;
|
|
99
|
+
ha: typeof HausaSvg;
|
|
100
|
+
he: typeof HebrewSvg;
|
|
101
|
+
hi: typeof HindiSvg;
|
|
102
|
+
hr: typeof CroatianSvg;
|
|
103
|
+
ht: typeof HaitianCreoleSvg;
|
|
104
|
+
hu: typeof HungarianSvg;
|
|
105
|
+
hy: typeof ArmenianSvg;
|
|
106
|
+
id: typeof IndonesianSvg;
|
|
107
|
+
is: typeof IcelandicSvg;
|
|
108
|
+
it: typeof ItalianSvg;
|
|
109
|
+
ja: typeof JapaneseSvg;
|
|
110
|
+
ka: typeof GeorgianSvg;
|
|
111
|
+
kk: typeof KazakhSvg;
|
|
112
|
+
kn: typeof KannadaSvg;
|
|
113
|
+
ko: typeof KoreanSvg;
|
|
114
|
+
lt: typeof LithuanianSvg;
|
|
115
|
+
lv: typeof LatvianSvg;
|
|
116
|
+
mk: typeof MacedonianSvg;
|
|
117
|
+
ml: typeof MalayalamSvg;
|
|
118
|
+
mn: typeof MongolianSvg;
|
|
119
|
+
mr: typeof MarathiSvg;
|
|
120
|
+
ms: typeof MalaySvg;
|
|
121
|
+
mt: typeof MalteseSvg;
|
|
122
|
+
nl: typeof DutchSvg;
|
|
123
|
+
no: typeof NorwegianSvg;
|
|
124
|
+
nn: typeof NorwegianSvg;
|
|
125
|
+
pa: typeof HindiSvg;
|
|
126
|
+
pl: typeof PolishSvg;
|
|
127
|
+
ps: typeof PashtoSvg;
|
|
128
|
+
'pt-pt': typeof PortuguesePortugalSvg;
|
|
129
|
+
ro: typeof RomanianSvg;
|
|
130
|
+
ru: typeof RussianSvg;
|
|
131
|
+
si: typeof SinhalaSvg;
|
|
132
|
+
sk: typeof SlovakSvg;
|
|
133
|
+
sl: typeof SlovenianSvg;
|
|
134
|
+
so: typeof SomaliSvg;
|
|
135
|
+
sq: typeof AlbanianSvg;
|
|
136
|
+
sr: typeof SerbianSvg;
|
|
137
|
+
sv: typeof SwedishSvg;
|
|
138
|
+
sw: typeof SwahiliSvg;
|
|
139
|
+
ta: typeof TamilSvg;
|
|
140
|
+
te: typeof TeluguSvg;
|
|
141
|
+
th: typeof ThaiSvg;
|
|
142
|
+
tl: typeof FilipinoTagalogSvg;
|
|
143
|
+
tr: typeof TurkishSvg;
|
|
144
|
+
uk: typeof UkrainianSvg;
|
|
145
|
+
ur: typeof UrduSvg;
|
|
146
|
+
uz: typeof UzbekSvg;
|
|
147
|
+
vi: typeof VietnameseSvg;
|
|
148
|
+
zh: typeof ChineseSimplifiedSvg;
|
|
149
|
+
'es-mx': typeof SpanishMexicoSvg;
|
|
150
|
+
'fa-af': typeof PashtoSvg;
|
|
151
|
+
'zh-tw': typeof ChineseTraditionalSvg;
|
|
152
|
+
};
|
|
153
|
+
export type FlagLocale = keyof typeof flags;
|
|
154
|
+
export declare const flagLocales: FlagLocale[];
|
|
155
|
+
export type FlagProperties = {
|
|
156
|
+
readonly locale: FlagLocale;
|
|
157
|
+
readonly size?: number;
|
|
158
|
+
} & ComponentPropsWithoutRef<'svg'>;
|
|
159
|
+
export default function Flag({ locale, size, style, className, ...properties }: FlagProperties): React.JSX.Element | null;
|
|
160
|
+
export {};
|