@acusti/uikit-docs 0.4.4 → 0.4.6
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/.storybook/main.ts +19 -4
- package/CHANGELOG.md +60 -0
- package/dist/assets/CSSValueInput-B69U5DrZ.js +5 -0
- package/dist/assets/{CSSValueInput-BgAgo3f9.css → CSSValueInput-DKgB9IQs.css} +1 -1
- package/dist/assets/CSSValueInput.stories-vCftVQHX.js +113 -0
- package/dist/assets/Color-6BZIO3FS-BHsDhiaJ.js +1 -0
- package/dist/assets/DatePicker.stories-X2JO2cn6.js +585 -0
- package/dist/assets/DocsRenderer-LL677BLK-i2bqAbNY.js +2 -0
- package/dist/assets/Dropdown-QkqMQiyU.css +1 -0
- package/dist/assets/Dropdown-_IIsqrAA.js +101 -0
- package/dist/assets/Dropdown.stories-msGED41R.js +364 -0
- package/dist/assets/InputText-_BMv0r1n.css +1 -0
- package/dist/assets/InputText.stories-CG1EnzrQ.js +148 -0
- package/dist/assets/Introduction-orXeKug7.js +184 -0
- package/dist/assets/MonthCalendar.stories-CJT-JiqF.js +177 -0
- package/dist/assets/WithTooltip-65CFNBJE-DlgYg9W2.js +9 -0
- package/dist/assets/blocks-C4xgyV4X.js +46 -0
- package/dist/assets/chunk-242VQQM5-DEt_wvrI.js +1 -0
- package/dist/assets/chunk-YKABRMAI-BpCcWWoG.js +18 -0
- package/dist/assets/client-Bvdml6v2.js +9 -0
- package/dist/assets/clsx-Bdud1Ih_.js +1 -0
- package/dist/assets/compiler-runtime-BOsKKfMw.js +1 -0
- package/dist/assets/components-CuDS54ZU.js +92 -0
- package/dist/assets/dist-6e4YoSiG.js +1 -0
- package/dist/assets/dist-BreUZhw6.js +1 -0
- package/dist/assets/formatter-EIJCOSYU-4RP_9NAI.js +1 -0
- package/dist/assets/iframe-BsC6HWDY.js +1221 -0
- package/dist/assets/jsx-runtime-CZwoFFIL.js +1 -0
- package/dist/assets/lib-WXkUx4TK.js +1 -0
- package/dist/assets/preload-helper-Bhb7V-Yo.js +1 -0
- package/dist/assets/react-18-6aLPZbD-.js +1 -0
- package/dist/assets/react-DcwytXSz.js +1 -0
- package/dist/assets/react-dom-CFVoDXTy.js +1 -0
- package/dist/assets/syntaxhighlighter-ED5Y7EFY-BQSv6pbL.js +6 -0
- package/dist/assets/theming-DLDZLcJn.js +39 -0
- package/dist/assets/useIsOutOfBounds.stories-CI4DMSUD.js +105 -0
- package/dist/assets/{useKeyboardEvents-BH4Zd7d3.css → useKeyboardEvents-CKMYGqVT.css} +1 -1
- package/dist/assets/useKeyboardEvents.stories-CNX299tr.js +3 -0
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +1 -1
- package/dist/iframe.html +59 -40
- package/dist/index.html +8 -16
- package/dist/index.json +1 -1
- package/dist/project.json +1 -1
- package/dist/sb-addons/docs-1/manager-bundle.js +1 -149
- package/dist/sb-addons/storybook-2/manager-bundle.js +1 -1
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +548 -108
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -1
- package/dist/sb-manager/globals-runtime.js +73064 -67182
- package/dist/sb-manager/globals.js +6 -16
- package/dist/sb-manager/manager-stores.js +23 -0
- package/dist/sb-manager/runtime.js +17712 -10309
- package/dist/vite-inject-mocker-entry.js +2 -0
- package/package.json +11 -9
- package/stories/CSSValueInput.stories.tsx +1 -1
- package/stories/DatePicker.stories.tsx +182 -45
- package/stories/InputText.stories.tsx +36 -0
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/assets/CSSValueInput-BoZriUnh.js +0 -1
- package/dist/assets/CSSValueInput.stories-D1VcYZJ0.js +0 -113
- package/dist/assets/Color-AVL7NMMY-BeW0C7pE.js +0 -1
- package/dist/assets/DatePicker.stories-BSWV31FV.js +0 -244
- package/dist/assets/DocsRenderer-PQXLIZUC-D92GwNti.js +0 -2
- package/dist/assets/Dropdown-D5cyjefk.css +0 -1
- package/dist/assets/Dropdown-DUP_ybXe.js +0 -84
- package/dist/assets/Dropdown.stories-2Wtw1otE.js +0 -336
- package/dist/assets/InputText-Tkbh5amB.css +0 -1
- package/dist/assets/InputText.stories-BYt2Aj0_.js +0 -90
- package/dist/assets/Introduction-nSE2hjmb.js +0 -183
- package/dist/assets/MonthCalendar.stories-IJrL6wIl.js +0 -169
- package/dist/assets/blocks-Du178fXa.js +0 -658
- package/dist/assets/client-B2qWCcIR.js +0 -25
- package/dist/assets/clsx-hXifHU8N.js +0 -9
- package/dist/assets/iframe-ByGa_ItU.js +0 -1102
- package/dist/assets/index-BRXcJgsA.js +0 -1
- package/dist/assets/index-BVajFqaV.js +0 -1
- package/dist/assets/index-DwJ-mRZ2.js +0 -9
- package/dist/assets/jsx-runtime-D_zvdyIk.js +0 -9
- package/dist/assets/react-18-djOrgGe8.js +0 -1
- package/dist/assets/useIsOutOfBounds.stories-e48KZd_G.js +0 -105
- package/dist/assets/useKeyboardEvents.stories-CJbDuGfk.js +0 -3
- package/dist/sb-manager/globals-module-info.js +0 -797
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import{E as e,r as t}from"./iframe-BsC6HWDY.js";import{t as n}from"./jsx-runtime-CZwoFFIL.js";import{t as r}from"./compiler-runtime-BOsKKfMw.js";import{t as i}from"./clsx-Bdud1Ih_.js";import{n as a,t as o}from"./dist-BreUZhw6.js";var s=r(),c=e(t(),1),{useEffect:l,useState:u}=c,d=()=>{},f={disconnect:d,observe:d,unobserve:d},p=Object.freeze({bottom:void 0,left:void 0,right:void 0,top:void 0}),m=Object.freeze({boundingClientRect:p,maybeCleanupElement:d,maybeCleanupTimer:null,renderTimeSetters:new Set,retryCount:0,scheduleUpdate:d,updateBoundingClientRect:d,updaterFrameID:null}),h=60*1e3,g=new WeakMap,_=f;typeof ResizeObserver==`function`&&(_=new ResizeObserver((e,t)=>{for(let n of e){let e=n.target,r=g.get(e);if(!r){t.unobserve(e);return}r.scheduleUpdate()}}));var ee=e=>{let t=g.get(e);t&&(t.scheduleUpdate!=null&&t.scheduleUpdate!==d||(t.updateBoundingClientRect=()=>{t.updaterFrameID=null;let n=e.getBoundingClientRect();if(!n.height&&!n.width){t.retryCount<10&&(t.retryCount++,t.updaterFrameID=requestAnimationFrame(t.updateBoundingClientRect));return}if(t.retryCount&&=0,t.boundingClientRect.bottom===n.bottom&&t.boundingClientRect.left===n.left&&t.boundingClientRect.right===n.right&&t.boundingClientRect.top===n.top)return;t.boundingClientRect={bottom:n.bottom,left:n.left,right:n.right,top:n.top};let r=typeof Date.now==`function`?Date.now():0;for(let e of t.renderTimeSetters)e(r)},t.scheduleUpdate=()=>{t.updaterFrameID??=requestAnimationFrame(t.updateBoundingClientRect)},t.maybeCleanupElement=()=>{if(t.maybeCleanupTimer!=null&&(clearTimeout(t.maybeCleanupTimer),t.maybeCleanupTimer=null),t.renderTimeSetters.size&&e.closest(`html`)){t.maybeCleanupTimer=setTimeout(t.maybeCleanupElement,h);return}g.delete(e),_.unobserve(e)},t.maybeCleanupTimer=setTimeout(t.maybeCleanupElement,h)))},v=(e,t)=>{let n=g.get(e);n&&(n.renderTimeSetters.delete(t),n.maybeCleanupElement())},te=e=>{let t=(0,s.c)(9),[,n]=u(0),r=!1,i;t[0]===e?i=t[1]:(i=(e&&g.get(e))??null,t[0]=e,t[1]=i);let a=i;e&&!a&&(r=!0,t[2]===e?a=t[3]:(a={...m,renderTimeSetters:new Set},g.set(e,a),t[2]=e,t[3]=a),ee(e),_.observe(e)),a&&(a.renderTimeSetters.add(n),r&&a.updateBoundingClientRect());let o;t[4]!==e||t[5]!==n?(o=()=>e?()=>{v(e,n)}:d,t[4]=e,t[5]=n,t[6]=o):o=t[6];let c;return t[7]===e?c=t[8]:(c=[e],t[7]=e,t[8]=c),l(o,c),a?.boundingClientRect??p},y={config:new Map,keydown:[],keypress:[],keyup:[]},b=-50,ne=50,x=b*-1,S=()=>{};function C({eventType:e,handler:t,ignoreUsedKeyboardEvents:n=!0,priority:r}){if(!t)return S;let i=Math.min(ne+x,Math.max(0,(r??0)+x)),a=y[e];return a[i]??=new Set,a[i].add(t),y.config.set(t,{ignoreUsedKeyboardEvents:n,priority:i}),()=>{if(y.config.delete(t),a[i]!=null&&(a[i].delete(t),!a[i].size)){delete a[i];for(let e=i;e>-1&&a[e]==null&&a.length===e+1;e--)a.length=e}}}var re=new Set([`button`,`checkbox`,`color`,`file`,`hidden`,`image`,`radio`,`range`,`reset`,`submit`]),ie=new Set([` `,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`Enter`]),ae=e=>e.isContentEditable||e.tagName===`TEXTAREA`||e.tagName===`INPUT`,oe=e=>{let t=e.target;return t==null||!ae(t)?!1:t.tagName!==`INPUT`||!re.has(t.type)?!0:ie.has(e.key)};function w(e){if(!(!e?.defaultView||e.defaultView.__useKeyboardEventsAttached__))return e.defaultView.__useKeyboardEventsAttached__=!0,e.addEventListener(`keydown`,T),e.addEventListener(`keypress`,T),e.addEventListener(`keyup`,T),()=>{e.defaultView&&(e.defaultView.__useKeyboardEventsAttached__=!1),e.removeEventListener(`keydown`,T),e.removeEventListener(`keypress`,T),e.removeEventListener(`keyup`,T)}}function T(e){let t=y[e.type],n=t.length,r=oe(e);for(;n--;){let i=t[n];if(i!=null)for(let t of i){let n=y.config.get(t);if((!r||n?.ignoreUsedKeyboardEvents===!1)&&t(e)===!1)return}}}function se(e){let t=(0,s.c)(16),{ignoreUsedKeyboardEvents:n,onKeyDown:r,onKeyPress:i,onKeyUp:a,priority:o}=e,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=[],t[0]=l):l=t[0],(0,c.useEffect)(E,l);let u,d;t[1]!==n||t[2]!==r||t[3]!==o?(u=()=>C({eventType:`keydown`,handler:r,ignoreUsedKeyboardEvents:n,priority:o}),d=[n,r,o],t[1]=n,t[2]=r,t[3]=o,t[4]=u,t[5]=d):(u=t[4],d=t[5]),(0,c.useEffect)(u,d);let f,p;t[6]!==n||t[7]!==i||t[8]!==o?(f=()=>C({eventType:`keypress`,handler:i,ignoreUsedKeyboardEvents:n,priority:o}),p=[n,i,o],t[6]=n,t[7]=i,t[8]=o,t[9]=f,t[10]=p):(f=t[9],p=t[10]),(0,c.useEffect)(f,p);let m,h;t[11]!==n||t[12]!==a||t[13]!==o?(m=()=>C({eventType:`keyup`,handler:a,ignoreUsedKeyboardEvents:n,priority:o}),h=[n,a,o],t[11]=n,t[12]=a,t[13]=o,t[14]=m,t[15]=h):(m=t[14],h=t[15]),(0,c.useEffect)(m,h)}function E(){w(document),document.querySelectorAll(`iframe`).forEach(D)}function D(e){!ce(e)||!e.contentDocument||w(e.contentDocument)}function ce(e){try{return typeof e.contentWindow.location.href==`string`}catch{return!1}}var le=48,O=57,k=65,A=15,j=.99999,M=.999999,N=.81,P=(e,t,n)=>{if(n||(e=e.trim().toUpperCase(),t=t.trim().toUpperCase()),e===t)return 1;let r=e.length,i=t.length,a=Math.min(r,i);if(!a)return 0;let[o,s]=r>i?[e,t]:[t,e],c=o.indexOf(s);if(c>-1){let e=.15/(o.length-2)*c;return Math.max(M-e,N)}let l=Math.min(.4,3/a),u=0,d=0,f=0;for(let n=0;n<a;n++){let r=e.charCodeAt(n),i=t.charCodeAt(n),a=Math.abs(r-i);r>=le&&r<=O&&i>k&&(a=O+1-r),u+=Math.min(A,a),d+=A,a===0&&(u===f?(f+=-10*((n+1)*l),u=f):--u)}return u<=0?j:(u=(d-u)/d,Math.min(j,u))},ue=({excludeMismatches:e,items:t,text:n})=>{if(n=n.trim().toUpperCase(),!n||!t.length)return t;let[r]=t.reduce(([t,r],i)=>{let a=P(i.trim().toUpperCase(),n,!0);if(e&&a<N)return[t,r];let o=t.length;if(a>r[0])o=0;else if(a>r[r.length-1]){let e=r.findIndex(e=>e<a);e!==-1&&(o=e)}return t.splice(o,0,i),r.splice(o,0,a),[t,r]},[[],[]]);return r},de=e=>ue(e)[0];const F=`uktdropdown`,I=`.${F}`,fe=`${F}-body`,pe=`${F}-label`,me=`${F}-label-text`,he=`${F}-trigger`,ge=`.${fe}`,L=`.${pe}`,R=`.${me}`,z=`.${he}`,_e=`--uktdd-body-max-height`,ve=`--uktdd-body-max-width`,ye=`
|
|
2
|
+
:root {
|
|
3
|
+
--uktdd-font-family: ${o};
|
|
4
|
+
--uktdd-body-bg-color: #fff;
|
|
5
|
+
--uktdd-body-bg-color-hover: rgb(105,162,249);
|
|
6
|
+
--uktdd-body-color-hover: #fff;
|
|
7
|
+
--uktdd-body-buffer: 10px;
|
|
8
|
+
${_e}: calc(100vh - var(--uktdd-body-buffer));
|
|
9
|
+
${ve}: calc(100vw - var(--uktdd-body-buffer));
|
|
10
|
+
--uktdd-body-pad-bottom: 9px;
|
|
11
|
+
--uktdd-body-pad-left: 12px;
|
|
12
|
+
--uktdd-body-pad-right: 12px;
|
|
13
|
+
--uktdd-body-pad-top: 9px;
|
|
14
|
+
--uktdd-label-pad-right: 10px;
|
|
15
|
+
}
|
|
16
|
+
${I},
|
|
17
|
+
${z} {
|
|
18
|
+
font-family: var(--uktdd-font-family);
|
|
19
|
+
}
|
|
20
|
+
${I} {
|
|
21
|
+
width: max-content;
|
|
22
|
+
anchor-scope: --uktdd-anchor;
|
|
23
|
+
}
|
|
24
|
+
${I}.disabled {
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
${I} > * {
|
|
28
|
+
cursor: default;
|
|
29
|
+
}
|
|
30
|
+
${I} > :first-child {
|
|
31
|
+
anchor-name: --uktdd-anchor;
|
|
32
|
+
}
|
|
33
|
+
${L} {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
37
|
+
${R} {
|
|
38
|
+
padding-right: var(--uktdd-label-pad-right);
|
|
39
|
+
}
|
|
40
|
+
${ge} {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
position: absolute;
|
|
43
|
+
position-anchor: --uktdd-anchor;
|
|
44
|
+
top: anchor(bottom);
|
|
45
|
+
left: anchor(left);
|
|
46
|
+
bottom: auto;
|
|
47
|
+
right: auto;
|
|
48
|
+
position-try-fallbacks: --uktdd-top-left, --uktdd-bottom-right, --uktdd-top-right;
|
|
49
|
+
min-height: 50px;
|
|
50
|
+
max-height: var(${_e});
|
|
51
|
+
min-width: min(50px, 100%);
|
|
52
|
+
max-width: var(${ve});
|
|
53
|
+
overflow: auto;
|
|
54
|
+
z-index: 2;
|
|
55
|
+
padding: var(--uktdd-body-pad-top) var(--uktdd-body-pad-right) var(--uktdd-body-pad-bottom) var(--uktdd-body-pad-left);
|
|
56
|
+
background-color: var(--uktdd-body-bg-color);
|
|
57
|
+
box-shadow: 0 8px 18px rgba(0,0,0,0.25);
|
|
58
|
+
}
|
|
59
|
+
@position-try --uktdd-top-left {
|
|
60
|
+
bottom: anchor(top);
|
|
61
|
+
left: anchor(left);
|
|
62
|
+
top: auto;
|
|
63
|
+
right: auto;
|
|
64
|
+
}
|
|
65
|
+
@position-try --uktdd-bottom-right {
|
|
66
|
+
top: anchor(bottom);
|
|
67
|
+
right: anchor(right);
|
|
68
|
+
bottom: auto;
|
|
69
|
+
left: auto;
|
|
70
|
+
}
|
|
71
|
+
@position-try --uktdd-top-right {
|
|
72
|
+
bottom: anchor(top);
|
|
73
|
+
right: anchor(right);
|
|
74
|
+
top: auto;
|
|
75
|
+
left: auto;
|
|
76
|
+
}
|
|
77
|
+
${ge}.has-items {
|
|
78
|
+
user-select: none;
|
|
79
|
+
}
|
|
80
|
+
${ge} [data-ukt-active] {
|
|
81
|
+
background-color: var(--uktdd-body-bg-color-hover);
|
|
82
|
+
color: var(--uktdd-body-color-hover);
|
|
83
|
+
}
|
|
84
|
+
`,be=`[data-ukt-item], [data-ukt-value]`,xe=e=>{if(!e)return null;let t=e.querySelector(ge);if(!t)return null;let n=t.querySelectorAll(be);if(n.length)return n;for(n=t.children;n.length===1&&n[0].children!=null;)n=n[0].children;return n.length===1&&(n=t.children),n},Se=e=>e?e.querySelector(`[data-ukt-active]`):null;var B=e=>{e.forEach(e=>{e.hasAttribute(`data-ukt-active`)&&delete e.dataset.uktActive})};const Ce=({dropdownElement:e,element:t,event:n,index:r,indexAddend:i,isExactMatch:a,onActiveItem:o,text:s})=>{let c=xe(e);if(!c)return;let l=Array.from(c);if(!l.length)return;let u=l.length-1,d=l.findIndex(e=>e.hasAttribute(`data-ukt-active`)),f=d;if(typeof r==`number`&&(f=r<0?l.length+r:r),t)f=l.findIndex(e=>e===t);else if(typeof i==`number`)d===-1&&i===-1?f=u:f+=i,f=Math.max(0,Math.min(f,u));else if(typeof s==`string`){if(!s){B(l);return}let e=l.map(e=>e.innerText);if(a){let t=s.toLowerCase();f=e.findIndex(e=>e.toLowerCase().startsWith(t)),f===-1&&B(l)}else{let t=de({items:e,text:s});f=e.findIndex(e=>e===t)}}let p=c[f];if(p==null||f===d)return;B(l),p.setAttribute(`data-ukt-active`,``);let m=p.innerText,h=p.dataset.uktValue??m;o?.({element:p,event:n,label:m,value:h});let{parentElement:g}=p,_=null;for(;!_&&g&&g!==e;)g.scrollHeight>g.clientHeight+15?_=g:g=g.parentElement;if(_){let e=_.getBoundingClientRect(),t=p.getBoundingClientRect(),n=t.top<e.top,r=t.bottom>e.bottom;if(n||r){let{scrollTop:r}=_;n?r-=e.top-t.top:r+=t.bottom-e.bottom,_.scrollTop=r}}};var V=n(),we=`@acusti/dropdown requires either 1 child (the dropdown body) or 2 children: the dropdown trigger and the dropdown body.`,Te=`button, a[href], input[type="button"], input[type="submit"]`,Ee=`input:not([type=radio]):not([type=checkbox]):not([type=range]),textarea`;function H(e){let t=(0,s.c)(95),{allowCreate:n,allowEmpty:r,children:o,className:l,disabled:u,hasItems:d,isOpenOnMount:f,isSearchable:p,keepOpenOnSubmit:m,label:h,minHeightBody:g,minWidthBody:_,name:ee,onActiveItem:v,onClick:y,onClose:b,onMouseDown:ne,onMouseUp:x,onOpen:S,onSubmitItem:C,placeholder:re,style:ie,tabIndex:ae,value:w}=e,T=r===void 0?!0:r,E=d===void 0?!0:d,D=m===void 0?!E:m,ce=g===void 0?30:g,le=_===void 0?100:_,O=c.Children.count(o);if(O!==1&&O!==2){if(O===0)throw Error(we+` Received no children.`);console.error(`${we} Received ${O} children.`)}let k;O>1&&(k=o[0]);let[A,j]=(0,c.useState)(f??!1),[M,N]=(0,c.useState)(!f),[P,ue]=(0,c.useState)(null),[de,I]=(0,c.useState)(null),L=(0,c.useRef)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),B=(0,c.useRef)(`mouse`),H=(0,c.useRef)(null),U=(0,c.useRef)(``),Oe=(0,c.useRef)(null),ke=(0,c.useRef)(n),Ae=(0,c.useRef)(T),W=(0,c.useRef)(E),G=(0,c.useRef)(A),je=(0,c.useRef)(M),Me=(0,c.useRef)(D),Ne=(0,c.useRef)(b),Pe=(0,c.useRef)(S),Fe=(0,c.useRef)(C),Ie=(0,c.useRef)(w),Le,Re;t[0]!==n||t[1]!==T||t[2]!==E||t[3]!==A||t[4]!==M||t[5]!==D||t[6]!==b||t[7]!==S||t[8]!==C||t[9]!==w?(Le=()=>{ke.current=n,Ae.current=T,W.current=E,G.current=A,je.current=M,Me.current=D,Ne.current=b,Pe.current=S,Fe.current=C,Ie.current=w},Re=[n,T,E,A,M,D,b,S,C,w],t[0]=n,t[1]=T,t[2]=E,t[3]=A,t[4]=M,t[5]=D,t[6]=b,t[7]=S,t[8]=C,t[9]=w,t[10]=Le,t[11]=Re):(Le=t[10],Re=t[11]),(0,c.useEffect)(Le,Re);let ze=(0,c.useRef)(!1),Be,Ve;t[12]===A?(Be=t[13],Ve=t[14]):(Be=()=>{if(!ze.current){ze.current=!0,G.current&&Pe.current&&Pe.current();return}A&&Pe.current?Pe.current():!A&&Ne.current&&Ne.current()},Ve=[A],t[12]=A,t[13]=Be,t[14]=Ve),(0,c.useEffect)(Be,Ve);let He;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(He=()=>{j(!1),N(!1),Oe.current=null,R.current!=null&&(clearTimeout(R.current),R.current=null)},t[15]=He):He=t[15];let K=He,Ue;t[16]===P?Ue=t[17]:(Ue=e=>{if(G.current&&!Me.current&&(R.current=setTimeout(K,90)),!W.current)return;let t=Se(P);if(!t&&!ke.current&&(!Ae.current||L.current?.value))return;let n=t?.innerText??``;L.current&&(t?L.current.value=n:n=L.current.value,L.current===L.current.ownerDocument.activeElement&&L.current.blur());let r=t?.dataset.uktValue??n;if(!(Ie.current&&Ie.current===r)){if(t){let n=e.target;if(t.matches(Te))t!==n&&!t.contains(n)&&t.click();else{let e=t.querySelectorAll(Te);if(e.length===1){let t=e[0];t!==n&&!t.contains(n)&&t.click()}}}Fe.current?.({element:t,event:e,label:n,value:r})}},t[16]=P,t[17]=Ue);let q=Ue,We;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(We=e=>{let{clientX:t,clientY:n}=e;B.current=`mouse`;let r=Oe.current;r&&(Math.abs(r.clientX-t)<12&&Math.abs(r.clientY-n)<12||N(!1))},t[18]=We):We=t[18];let Ge=We,Ke;t[19]!==P||t[20]!==v?(Ke=e=>{if(!W.current||B.current!==`mouse`||!P)return;let t=xe(P);if(!t)return;let n=e.target,r=n.closest(be)??n;for(let n of t)if(n===r){Ce({dropdownElement:P,element:r,event:e,onActiveItem:v});return}},t[19]=P,t[20]=v,t[21]=Ke):Ke=t[21];let qe=Ke,Je;t[22]===P?Je=t[23]:(Je=e=>{if(!W.current)return;let t=Se(P);if(!t)return;let n=e.relatedTarget;t!==e.target||t.contains(n)||delete t.dataset.uktActive},t[22]=P,t[23]=Je);let Ye=Je,Xe;t[24]===ne?Xe=t[25]:(Xe=e=>{ne&&ne(e),!G.current&&(j(!0),N(!0),Oe.current={clientX:e.clientX,clientY:e.clientY},z.current=setTimeout(()=>{N(!1),z.current=null},1e3))},t[24]=ne,t[25]=Xe);let Ze=Xe,Qe;t[26]!==q||t[27]!==x?(Qe=e=>{if(x&&x(e),je.current||!G.current||R.current!=null)return;let t=e.target;if(!t.closest(ge)){!je.current&&L.current!==t.ownerDocument.activeElement&&K();return}W.current&&q(e)},t[26]=q,t[27]=x,t[28]=Qe):Qe=t[28];let $e=Qe,et;t[29]!==P||t[30]!==q||t[31]!==v?(et=e=>{let{altKey:t,ctrlKey:n,key:r,metaKey:i}=e,a=e.target;if(!P)return;let o=()=>{e.stopPropagation(),e.preventDefault(),B.current=`keyboard`},s=P.contains(a);if(!G.current){if(!s)return;(r===` `||r===`Enter`||W.current&&(r===`ArrowUp`||r===`ArrowDown`))&&(o(),j(!0));return}let c=oe(e);if(W.current&&!c){let t=!n&&!i&&/^[A-Za-z0-9]$/.test(r);if(!t&&U.current&&(t=r===` `||r===`Backspace`),t){o(),r===`Backspace`?U.current=U.current.slice(0,-1):U.current+=r,Ce({dropdownElement:P,event:e,isExactMatch:ke.current,onActiveItem:v,text:U.current}),H.current!=null&&clearTimeout(H.current),H.current=setTimeout(()=>{U.current=``,H.current=null},1500);return}}if(r===`Enter`||r===` `&&!L.current){o(),q(e);return}if(r===`Escape`||s&&r===` `&&!W.current){(W.current||!c)&&K();return}if(W.current){if(r===`ArrowUp`){o(),Ce(t||i?{dropdownElement:P,event:e,index:0,onActiveItem:v}:{dropdownElement:P,event:e,indexAddend:-1,onActiveItem:v});return}if(r===`ArrowDown`){o(),Ce(t||i?{dropdownElement:P,event:e,index:-1,onActiveItem:v}:{dropdownElement:P,event:e,indexAddend:1,onActiveItem:v});return}}},t[29]=P,t[30]=q,t[31]=v,t[32]=et):et=t[32];let tt=et,nt;t[33]===tt?nt=t[34]:(nt={ignoreUsedKeyboardEvents:!1,onKeyDown:tt},t[33]=tt,t[34]=nt),se(nt);let rt;t[35]!==f||t[36]!==v?(rt=e=>{if(ue(e),!e)return;let{ownerDocument:t}=e,n=L.current;!n&&e.firstElementChild&&(n=e.firstElementChild.matches(Ee)?e.firstElementChild:e.firstElementChild.querySelector(Ee),L.current=n);let r=t=>{let{target:n}=t,r=n;e.contains(r)||K()},i=t=>{let{target:n}=t;if(!G.current||R.current!=null)return;if(je.current){N(!1),z.current!=null&&(clearTimeout(z.current),z.current=null);return}let r=n;e.contains(r)||K()},a=t=>{let{target:n}=t;if(!G.current)return;let r=n;e.contains(r)||r.contains(e)||K()};document.addEventListener(`focusin`,a),document.addEventListener(`mousedown`,r),document.addEventListener(`mouseup`,i),t!==document&&(t.addEventListener(`focusin`,a),t.addEventListener(`mousedown`,r),t.addEventListener(`mouseup`,i)),f&&e.focus();let o=t=>{G.current||j(!0);let n=t.target,r=U.current.length>n.value.length;U.current=n.value,!(r&&n.value.length&&Se(e))&&Ce({dropdownElement:e,event:t,isExactMatch:ke.current,onActiveItem:v,text:U.current})};return n&&n.addEventListener(`input`,o),()=>{document.removeEventListener(`focusin`,a),document.removeEventListener(`mousedown`,r),document.removeEventListener(`mouseup`,i),t!==document&&(t.removeEventListener(`focusin`,a),t.removeEventListener(`mousedown`,r),t.removeEventListener(`mouseup`,i)),n&&n.removeEventListener(`input`,o)}},t[35]=f,t[36]=v,t[37]=rt):rt=t[37];let it=rt;if(!(0,c.isValidElement)(k))if(p){let e=w??``,n;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(n=()=>j(!0),t[38]=n):n=t[38];let r;t[39]!==u||t[40]!==ee||t[41]!==re||t[42]!==e||t[43]!==ae?(r=(0,V.jsx)(`input`,{autoComplete:`off`,className:he,defaultValue:e,disabled:u,name:ee,onFocus:n,placeholder:re,ref:L,tabIndex:ae,type:`text`}),t[39]=u,t[40]=ee,t[41]=re,t[42]=e,t[43]=ae,t[44]=r):r=t[44],k=r}else{let e;t[45]===k?e=t[46]:(e=(0,V.jsx)(`button`,{className:he,tabIndex:0,type:`button`,children:k}),t[45]=k,t[46]=e),k=e}if(h){let e;t[47]===h?e=t[48]:(e=(0,V.jsx)(`div`,{className:me,children:h}),t[47]=h,t[48]=e);let n;t[49]!==e||t[50]!==k?(n=(0,V.jsxs)(`label`,{className:pe,children:[e,k]}),t[49]=e,t[50]=k,t[51]=n):n=t[51],k=n}let J=te(P),Y=te(de),at;t[52]===de?at=t[53]:(at=De(de),t[52]=de,t[53]=at);let ot=te(at),X,Z;if(Y.top!=null&&J.top!=null&&ot.top!=null){let e=Y.bottom-ot.top,n=ot.bottom-Y.top,r;t[54]!==Y.top||t[55]!==J.top||t[56]!==n||t[57]!==e?(r=Math.round(Y.top>J.top?n:e),t[54]=Y.top,t[55]=J.top,t[56]=n,t[57]=e,t[58]=r):r=t[58],X=r;let i=Y.right-ot.left,a=ot.right-Y.left,o;t[59]!==Y.left||t[60]!==J.left||t[61]!==i||t[62]!==a?(o=Math.round(Y.left>J.left?a:i),t[59]=Y.left,t[60]=J.left,t[61]=i,t[62]=a,t[63]=o):o=t[63],Z=o}let Q;t[64]!==X||t[65]!==ce?(Q=X!=null&&X>ce?{[_e]:`calc(${X}px - var(--uktdd-body-buffer))`}:null,t[64]=X,t[65]=ce,t[66]=Q):Q=t[66];let $;t[67]!==Z||t[68]!==le?($=Z!=null&&Z>le?{[ve]:`calc(${Z}px - var(--uktdd-body-buffer))`}:null,t[67]=Z,t[68]=le,t[69]=$):$=t[69];let st;t[70]!==ie||t[71]!==Q||t[72]!==$?(st={...ie,...Q,...$},t[70]=ie,t[71]=Q,t[72]=$,t[73]=st):st=t[73];let ct=st,lt;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,V.jsx)(a,{href:`@acusti/dropdown/Dropdown`,children:ye}),t[74]=lt):lt=t[74];let ut;t[75]!==l||t[76]!==u||t[77]!==A||t[78]!==p?(ut=i(F,l,{disabled:u,"is-open":A,"is-searchable":p}),t[75]=l,t[76]=u,t[77]=A,t[78]=p,t[79]=ut):ut=t[79];let dt;t[80]!==o||t[81]!==O||t[82]!==A?(dt=A?(0,V.jsx)(`div`,{className:fe,ref:I,children:O>1?o[1]:o}):null,t[80]=o,t[81]=O,t[82]=A,t[83]=dt):dt=t[83];let ft;return t[84]!==Ze||t[85]!==Ye||t[86]!==qe||t[87]!==$e||t[88]!==it||t[89]!==y||t[90]!==ct||t[91]!==ut||t[92]!==dt||t[93]!==k?(ft=(0,V.jsxs)(c.Fragment,{children:[lt,(0,V.jsxs)(`div`,{className:ut,onClick:y,onMouseDown:Ze,onMouseMove:Ge,onMouseOut:Ye,onMouseOver:qe,onMouseUp:$e,ref:it,style:ct,children:[k,dt]})]}),t[84]=Ze,t[85]=Ye,t[86]=qe,t[87]=$e,t[88]=it,t[89]=y,t[90]=ct,t[91]=ut,t[92]=dt,t[93]=k,t[94]=ft):ft=t[94],ft}function De(e){for(;e?.parentElement;){if(e.parentElement.tagName===`BODY`||getComputedStyle(e.parentElement).overflowX!==`visible`)return e.parentElement;e=e.parentElement}return null}H.__docgenInfo={description:``,methods:[],displayName:`Dropdown`,props:{allowCreate:{required:!1,tsType:{name:`boolean`},description:`Boolean indicating if the user can submit a value not already in the
|
|
85
|
+
dropdown.`},allowEmpty:{required:!1,tsType:{name:`boolean`},description:`Boolean indicating if the user can submit an empty value (i.e. clear
|
|
86
|
+
the value). Defaults to true.`,defaultValue:{value:`true`,computed:!1}},children:{required:!0,tsType:{name:`union`,raw:`ChildrenTuple | JSX.Element`,elements:[{name:`union`,raw:`[ReactNode, ReactNode] | readonly [ReactNode, ReactNode]`,elements:[{name:`tuple`,raw:`[ReactNode, ReactNode]`,elements:[{name:`ReactNode`},{name:`ReactNode`}]},{name:`unknown`}]},{name:`JSX.Element`}]},description:`Can take a single React element or exactly two renderable children.`},className:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},group:{required:!1,tsType:{name:`string`},description:`Group identifier string links dropdowns together into a menu
|
|
87
|
+
(like macOS top menubar).`},hasItems:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`true`,computed:!1}},isOpenOnMount:{required:!1,tsType:{name:`boolean`},description:``},isSearchable:{required:!1,tsType:{name:`boolean`},description:``},keepOpenOnSubmit:{required:!1,tsType:{name:`boolean`},description:``,defaultValue:{value:`!hasItems`,computed:!1}},label:{required:!1,tsType:{name:`string`},description:``},minHeightBody:{required:!1,tsType:{name:`number`},description:``,defaultValue:{value:`30`,computed:!1}},minWidthBody:{required:!1,tsType:{name:`number`},description:``,defaultValue:{value:`100`,computed:!1}},name:{required:!1,tsType:{name:`string`},description:`Only usable in conjunction with {isSearchable: true}.
|
|
88
|
+
Used as search input’s name.`},onActiveItem:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(payload: Item) => void`,signature:{arguments:[{type:{name:`signature`,type:`object`,raw:`{
|
|
89
|
+
element: MaybeHTMLElement;
|
|
90
|
+
event: Event | SyntheticEvent<HTMLElement>;
|
|
91
|
+
label: string;
|
|
92
|
+
value: string;
|
|
93
|
+
}`,signature:{properties:[{key:`element`,value:{name:`union`,raw:`HTMLElement | null`,elements:[{name:`HTMLElement`},{name:`null`}],required:!0}},{key:`event`,value:{name:`union`,raw:`Event | SyntheticEvent<HTMLElement>`,elements:[{name:`Event`},{name:`SyntheticEvent`,elements:[{name:`HTMLElement`}],raw:`SyntheticEvent<HTMLElement>`}],required:!0}},{key:`label`,value:{name:`string`,required:!0}},{key:`value`,value:{name:`string`,required:!0}}]}},name:`payload`}],return:{name:`void`}}},description:``},onClick:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: ReactMouseEvent<HTMLElement>) => unknown`,signature:{arguments:[{type:{name:`ReactMouseEvent`,elements:[{name:`HTMLElement`}],raw:`ReactMouseEvent<HTMLElement>`},name:`event`}],return:{name:`unknown`}}},description:``},onClose:{required:!1,tsType:{name:`signature`,type:`function`,raw:`() => unknown`,signature:{arguments:[],return:{name:`unknown`}}},description:``},onMouseDown:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: ReactMouseEvent<HTMLElement>) => unknown`,signature:{arguments:[{type:{name:`ReactMouseEvent`,elements:[{name:`HTMLElement`}],raw:`ReactMouseEvent<HTMLElement>`},name:`event`}],return:{name:`unknown`}}},description:``},onMouseUp:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(event: ReactMouseEvent<HTMLElement>) => unknown`,signature:{arguments:[{type:{name:`ReactMouseEvent`,elements:[{name:`HTMLElement`}],raw:`ReactMouseEvent<HTMLElement>`},name:`event`}],return:{name:`unknown`}}},description:``},onOpen:{required:!1,tsType:{name:`signature`,type:`function`,raw:`() => unknown`,signature:{arguments:[],return:{name:`unknown`}}},description:``},onSubmitItem:{required:!1,tsType:{name:`signature`,type:`function`,raw:`(payload: Item) => void`,signature:{arguments:[{type:{name:`signature`,type:`object`,raw:`{
|
|
94
|
+
element: MaybeHTMLElement;
|
|
95
|
+
event: Event | SyntheticEvent<HTMLElement>;
|
|
96
|
+
label: string;
|
|
97
|
+
value: string;
|
|
98
|
+
}`,signature:{properties:[{key:`element`,value:{name:`union`,raw:`HTMLElement | null`,elements:[{name:`HTMLElement`},{name:`null`}],required:!0}},{key:`event`,value:{name:`union`,raw:`Event | SyntheticEvent<HTMLElement>`,elements:[{name:`Event`},{name:`SyntheticEvent`,elements:[{name:`HTMLElement`}],raw:`SyntheticEvent<HTMLElement>`}],required:!0}},{key:`label`,value:{name:`string`,required:!0}},{key:`value`,value:{name:`string`,required:!0}}]}},name:`payload`}],return:{name:`void`}}},description:``},placeholder:{required:!1,tsType:{name:`string`},description:`Only usable in conjunction with {isSearchable: true}.
|
|
99
|
+
Used as search input’s placeholder.`},style:{required:!1,tsType:{name:`CSSProperties`},description:``},tabIndex:{required:!1,tsType:{name:`number`},description:`Only usable in conjunction with {isSearchable: true}.
|
|
100
|
+
Used as search input’s tabIndex.`},value:{required:!1,tsType:{name:`string`},description:`Used as search input’s value if props.isSearchable === true
|
|
101
|
+
Used to determine if value has changed to avoid triggering onSubmitItem if not`}}};export{H as t};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import{E as e,r as t}from"./iframe-BsC6HWDY.js";import{t as n}from"./jsx-runtime-CZwoFFIL.js";import"./compiler-runtime-BOsKKfMw.js";import{t as r}from"./CSSValueInput-B69U5DrZ.js";/* empty css */import{t as i}from"./Dropdown-_IIsqrAA.js";var a=e(t()),o=n(),{fn:s}=__STORYBOOK_MODULE_TEST__,{Fragment:c}=a,l={args:{onClick:s(),onClose:s(),onMouseDown:s(),onMouseUp:s(),onOpen:s(),onSubmitItem:s()},component:i,parameters:{docs:{description:{component:"`Dropdown` is a React component that renders a menu-like UI with a trigger that the user clicks to disclose a dropdown positioned below the trigger. The body of the dropdown can include any DOM, and many dropdowns can be combined to form a multi-item menu, like the system menu in the top toolbar of macOS."}}},tags:[`autodocs`],title:`UIKit/Controls/Dropdown`};const u={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`0px`}),(0,o.jsx)(`li`,{children:`4px`}),(0,o.jsx)(`li`,{children:`9px`}),(0,o.jsx)(`li`,{children:`18px`}),(0,o.jsx)(`li`,{children:`36px`}),(0,o.jsx)(`li`,{children:`54px`}),(0,o.jsx)(`li`,{children:`72px`}),(0,o.jsx)(`li`,{children:`144px`}),(0,o.jsx)(`li`,{children:`167px`}),(0,o.jsx)(`li`,{children:`198px`})]}),className:`css-lengths no-trigger-text`}},d={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`Alabama`}),(0,o.jsx)(`li`,{children:`Alaska`}),(0,o.jsx)(`li`,{children:`Arizona`}),(0,o.jsx)(`li`,{children:`Arkansas`}),(0,o.jsx)(`li`,{children:`California`}),(0,o.jsx)(`li`,{children:`Colorado`}),(0,o.jsx)(`li`,{children:`Connecticut`}),(0,o.jsx)(`li`,{children:`Delaware`}),(0,o.jsx)(`li`,{children:`Florida`}),(0,o.jsx)(`li`,{children:`Georgia`}),(0,o.jsx)(`li`,{children:`Hawaii`}),(0,o.jsx)(`li`,{children:`Idaho`}),(0,o.jsx)(`li`,{children:`Illinois`}),(0,o.jsx)(`li`,{children:`Indiana`}),(0,o.jsx)(`li`,{children:`Iowa`}),(0,o.jsx)(`li`,{children:`Kansas`}),(0,o.jsx)(`li`,{children:`Kentucky`}),(0,o.jsx)(`li`,{children:`Louisiana`}),(0,o.jsx)(`li`,{children:`Maine`}),(0,o.jsx)(`li`,{children:`Maryland`}),(0,o.jsx)(`li`,{children:`Massachusetts`}),(0,o.jsx)(`li`,{children:`Michigan`}),(0,o.jsx)(`li`,{children:`Minnesota`}),(0,o.jsx)(`li`,{children:`Mississippi`}),(0,o.jsx)(`li`,{children:`Missouri`}),(0,o.jsx)(`li`,{children:`Montana`}),(0,o.jsx)(`li`,{children:`Nebraska`}),(0,o.jsx)(`li`,{children:`Nevada`}),(0,o.jsx)(`li`,{children:`New Hampshire`}),(0,o.jsx)(`li`,{children:`New Jersey`}),(0,o.jsx)(`li`,{children:`New Mexico`}),(0,o.jsx)(`li`,{children:`New York`}),(0,o.jsx)(`li`,{children:`North Carolina`}),(0,o.jsx)(`li`,{children:`North Dakota`}),(0,o.jsx)(`li`,{children:`Ohio`}),(0,o.jsx)(`li`,{children:`Oklahoma`}),(0,o.jsx)(`li`,{children:`Oregon`}),(0,o.jsx)(`li`,{children:`Pennsylvania`}),(0,o.jsx)(`li`,{children:`Rhode Island`}),(0,o.jsx)(`li`,{children:`South Carolina`}),(0,o.jsx)(`li`,{children:`South Dakota`}),(0,o.jsx)(`li`,{children:`Tennessee`}),(0,o.jsx)(`li`,{children:`Texas`}),(0,o.jsx)(`li`,{children:`Utah`}),(0,o.jsx)(`li`,{children:`Vermont`}),(0,o.jsx)(`li`,{children:`Virginia`}),(0,o.jsx)(`li`,{children:`Washington`}),(0,o.jsx)(`li`,{children:`West Virginia`}),(0,o.jsx)(`li`,{children:`Wisconsin`}),(0,o.jsx)(`li`,{children:`Wyoming`})]}),className:`states-dropdown`,isSearchable:!0,placeholder:`Choose a state…`}},f={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsxs)(`li`,{"data-ukt-value":`100`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`100`]}),(0,o.jsxs)(`li`,{"data-ukt-value":`200`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`200`]}),(0,o.jsxs)(`li`,{"data-ukt-value":`300`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`300`]}),(0,o.jsxs)(`li`,{"data-ukt-value":`400`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`400`]}),(0,o.jsxs)(`li`,{"data-ukt-value":`500`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`500`]}),(0,o.jsxs)(`li`,{"data-ukt-value":`600`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`600`]}),(0,o.jsxs)(`li`,{"data-ukt-value":`700`,children:[(0,o.jsx)(`span`,{className:`item-title`,children:`Font Weight - `}),`700`]})]}),className:`font-weight`,isSearchable:!0}},p={args:{children:[`View menu`,(0,o.jsxs)(c,{children:[(0,o.jsx)(`h4`,{className:`heading`,children:`View`}),(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{"data-ukt-item":!0,children:`Open`}),(0,o.jsx)(`li`,{"data-ukt-item":!0,children:`Preview`})]}),(0,o.jsx)(`h4`,{className:`heading`,children:`Edit`}),(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{"data-ukt-value":`save-item`,children:`Save`}),(0,o.jsx)(`li`,{"data-ukt-value":`edit-item`,children:`Edit`}),(0,o.jsx)(`li`,{"data-ukt-value":`delete-item`,children:`Delete`})]})]})],className:`open-on-mount-context-menu`,isOpenOnMount:!0}},m={args:{children:[`Open`,(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`p`,{children:`Try interacting with the controls here. The dropdown should only close when you click outside of the entire dropdown or if you hit the escape key when focus isn’t in the input controls.`}),(0,o.jsx)(r,{cssValueType:`length`,label:`Width`,onSubmitValue:()=>{},placeholder:`100vw`,unit:`vw`}),(0,o.jsx)(r,{cssValueType:`length`,label:`Rotation`,onSubmitValue:()=>{},placeholder:`0deg`,step:5,unit:`deg`})]})],className:`dropdown-without-items`,hasItems:!1}},h={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`0px`}),(0,o.jsx)(`li`,{children:`4px`}),(0,o.jsx)(`li`,{children:`9px`}),(0,o.jsx)(`li`,{children:`18px`}),(0,o.jsx)(`li`,{children:`36px`}),(0,o.jsx)(`li`,{children:`54px`}),(0,o.jsx)(`li`,{children:`72px`}),(0,o.jsx)(`li`,{children:`144px`}),(0,o.jsx)(`li`,{children:`167px`}),(0,o.jsx)(`li`,{children:`198px`})]}),className:`searchable-with-label`,isSearchable:!0,label:`Font size`}},g={args:{allowCreate:!0,children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`0px`}),(0,o.jsx)(`li`,{children:`4px`}),(0,o.jsx)(`li`,{children:`9px`}),(0,o.jsx)(`li`,{children:`18px`}),(0,o.jsx)(`li`,{children:`36px`}),(0,o.jsx)(`li`,{children:`54px`}),(0,o.jsx)(`li`,{children:`72px`}),(0,o.jsx)(`li`,{children:`144px`}),(0,o.jsx)(`li`,{children:`167px`}),(0,o.jsx)(`li`,{children:`198px`})]}),className:`searchable-and-allow-create`,isSearchable:!0,label:`Font size`}},_={args:{allowCreate:!0,children:[(0,o.jsx)(r,{name:`cssinputbackgroundsize`,onSubmitValue:()=>{},placeholder:`cover`,validator:/^(auto|contain|cover)$/}),(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`cover`}),(0,o.jsx)(`li`,{children:`contain`}),(0,o.jsx)(`li`,{children:`auto`}),(0,o.jsx)(`li`,{children:`50px`}),(0,o.jsx)(`li`,{children:`100px`}),(0,o.jsx)(`li`,{children:`200px`}),(0,o.jsx)(`li`,{children:`50%`})]})],className:`css-value-input-trigger`,hasItems:!0,label:`Background size`}},v={args:{children:[(0,o.jsx)(`textarea`,{}),(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ullamcorper fringilla quam, vel tincidunt nisl mattis vel.`}),(0,o.jsx)(`li`,{children:`Aenean posuere erat sed enim luctus, et accumsan nisl elementum. Nulla vel blandit urna, vel accumsan nulla. Nulla varius luctus ex, gravida ultrices orci sagittis eu.`}),(0,o.jsx)(`li`,{children:`Quisque vitae magna euismod ligula molestie maximus id et nunc. Nam et lacus euismod, porttitor massa vel, sollicitudin ex. Sed ut tellus suscipit, faucibus tortor nec, fermentum mi.`}),(0,o.jsx)(`li`,{children:`Nulla sagittis justo non accumsan sagittis. Cras a eros et dolor dapibus bibendum lobortis quis ante. Ut eget scelerisque massa.`}),(0,o.jsx)(`li`,{children:`Vestibulum quis dignissim nunc. Mauris fringilla at nulla non lacinia. Etiam tristique elit non nisl finibus, fringilla hendrerit ligula hendrerit. Fusce eget leo lacinia, eleifend diam non, suscipit purus.`})]})],className:`textarea-trigger`,hasItems:!0}},y={args:{children:[`Colors`,(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:(0,o.jsxs)(`label`,{children:[(0,o.jsx)(`input`,{type:`checkbox`}),` Red`]})}),(0,o.jsx)(`li`,{children:(0,o.jsxs)(`label`,{children:[(0,o.jsx)(`input`,{type:`checkbox`}),` Blue`]})}),(0,o.jsx)(`li`,{children:(0,o.jsxs)(`label`,{children:[(0,o.jsx)(`input`,{type:`checkbox`}),` Yellow`]})}),(0,o.jsx)(`li`,{children:(0,o.jsxs)(`label`,{children:[(0,o.jsx)(`input`,{type:`checkbox`}),` Cyan`]})}),(0,o.jsx)(`li`,{children:(0,o.jsxs)(`label`,{children:[(0,o.jsx)(`input`,{type:`checkbox`}),` Orchid`]})}),(0,o.jsx)(`li`,{children:(0,o.jsxs)(`label`,{children:[(0,o.jsx)(`input`,{type:`checkbox`}),` Slate`]})})]})],className:`checkboxes`,keepOpenOnSubmit:!0}};var b={children:[(0,o.jsx)(`button`,{"aria-label":`Open user menu`,className:`avatar-profile has-avatar`,popoverTarget:`avatar-menu-popover`,style:{backgroundImage:`url("https://picsum.photos/id/40/100/100")`},children:`AP`}),(0,o.jsxs)(`ul`,{className:`menu-list avatar-dropdown`,children:[(0,o.jsx)(`div`,{className:`avatar-edit has-avatar`,style:{backgroundImage:`url("https://picsum.photos/id/40/100/100")`},children:(0,o.jsx)(`div`,{className:`avatar-initials`,children:`AP`})}),(0,o.jsx)(`div`,{className:`profile-email-wrap`,children:(0,o.jsx)(`p`,{className:`profile-email`,children:`andrew@example.com`})}),(0,o.jsx)(`form`,{method:`post`,action:`/logout`,className:`sign-out-wrap`,children:(0,o.jsx)(`button`,{className:`btn-ghost`,type:`submit`,children:`Sign Out`})})]})],className:`avatar-menu`};const x={args:b,render(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`header`,{className:`mk-header`,children:[(0,o.jsxs)(`nav`,{className:`mk-nav a1`,children:[(0,o.jsx)(`a`,{className:`logo`,href:`/`}),(0,o.jsx)(`a`,{className:`btn-text logo-text`,href:`/`,children:`UIKit`})]}),(0,o.jsx)(`div`,{className:`mk-nav center`,children:(0,o.jsxs)(`h5`,{className:`mk subtitle`,children:[`Welcome! Join our`,` `,(0,o.jsx)(`a`,{className:`home-link`,rel:`noreferrer`,href:`https://discord.gg/dTpXZpQ9Rz`,target:`_blank`,children:`Discord.`})]})}),(0,o.jsxs)(`nav`,{className:`mk-nav a2`,children:[(0,o.jsx)(`a`,{className:`btn-text`,href:`/projects`,children:`Projects`}),(0,o.jsx)(i,{...b})]})]}),(0,o.jsx)(`h1`,{children:`Lorem ipsum`})]})}},S={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`0px`}),(0,o.jsx)(`li`,{children:`4px`}),(0,o.jsx)(`li`,{children:`9px`}),(0,o.jsx)(`li`,{children:`18px`}),(0,o.jsx)(`li`,{children:`36px`}),(0,o.jsx)(`li`,{children:`54px`}),(0,o.jsx)(`li`,{children:`72px`}),(0,o.jsx)(`li`,{children:`144px`}),(0,o.jsx)(`li`,{children:`167px`}),(0,o.jsx)(`li`,{children:`198px`})]}),className:`disabled-dropdown`,disabled:!0,isSearchable:!0,label:`Disabled`,name:`disabledexample`,value:`167px`}},C={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`the carbon in our apple pies`}),(0,o.jsx)(`li`,{children:`sea of tranquility tesseract`}),(0,o.jsx)(`li`,{children:`encyclopaedia galactica`}),(0,o.jsx)(`li`,{children:`billions upon billions`}),(0,o.jsx)(`li`,{children:`network of wormholes`}),(0,o.jsx)(`li`,{children:`tingling of the spine`}),(0,o.jsx)(`li`,{children:`corpus callosum`}),(0,o.jsx)(`li`,{children:`finite but unbounded`})]}),className:`overlapping-dropdown no-trigger-text`}},w={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`0px`}),(0,o.jsx)(`li`,{children:`4px`}),(0,o.jsx)(`li`,{children:`9px`}),(0,o.jsx)(`li`,{children:`18px`}),(0,o.jsx)(`li`,{children:`36px`}),(0,o.jsx)(`li`,{children:`54px`}),(0,o.jsx)(`li`,{children:`72px`}),(0,o.jsx)(`li`,{children:`144px`}),(0,o.jsx)(`li`,{children:`167px`}),(0,o.jsx)(`li`,{children:`198px`})]}),className:`out-of-bounds-example position-right`,isSearchable:!0,name:`outofboundsatright`,placeholder:`Fill available space`}},T={args:{children:(0,o.jsxs)(`ul`,{children:[(0,o.jsx)(`li`,{children:`Antarctica`}),(0,o.jsx)(`li`,{children:`Arctic Circle`}),(0,o.jsx)(`li`,{children:`North Pole`})]}),className:`out-of-bounds-example no-direction-change`,isSearchable:!0,name:`outofboundsatbottomnodirectionchange`,placeholder:`Show below even though it goes out of bounds`}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
children: <ul>
|
|
4
|
+
<li>0px</li>
|
|
5
|
+
<li>4px</li>
|
|
6
|
+
<li>9px</li>
|
|
7
|
+
<li>18px</li>
|
|
8
|
+
<li>36px</li>
|
|
9
|
+
<li>54px</li>
|
|
10
|
+
<li>72px</li>
|
|
11
|
+
<li>144px</li>
|
|
12
|
+
<li>167px</li>
|
|
13
|
+
<li>198px</li>
|
|
14
|
+
</ul>,
|
|
15
|
+
className: 'css-lengths no-trigger-text'
|
|
16
|
+
}
|
|
17
|
+
}`,...u.parameters?.docs?.source}}},d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
18
|
+
args: {
|
|
19
|
+
children: <ul>
|
|
20
|
+
<li>Alabama</li>
|
|
21
|
+
<li>Alaska</li>
|
|
22
|
+
<li>Arizona</li>
|
|
23
|
+
<li>Arkansas</li>
|
|
24
|
+
<li>California</li>
|
|
25
|
+
<li>Colorado</li>
|
|
26
|
+
<li>Connecticut</li>
|
|
27
|
+
<li>Delaware</li>
|
|
28
|
+
<li>Florida</li>
|
|
29
|
+
<li>Georgia</li>
|
|
30
|
+
<li>Hawaii</li>
|
|
31
|
+
<li>Idaho</li>
|
|
32
|
+
<li>Illinois</li>
|
|
33
|
+
<li>Indiana</li>
|
|
34
|
+
<li>Iowa</li>
|
|
35
|
+
<li>Kansas</li>
|
|
36
|
+
<li>Kentucky</li>
|
|
37
|
+
<li>Louisiana</li>
|
|
38
|
+
<li>Maine</li>
|
|
39
|
+
<li>Maryland</li>
|
|
40
|
+
<li>Massachusetts</li>
|
|
41
|
+
<li>Michigan</li>
|
|
42
|
+
<li>Minnesota</li>
|
|
43
|
+
<li>Mississippi</li>
|
|
44
|
+
<li>Missouri</li>
|
|
45
|
+
<li>Montana</li>
|
|
46
|
+
<li>Nebraska</li>
|
|
47
|
+
<li>Nevada</li>
|
|
48
|
+
<li>New Hampshire</li>
|
|
49
|
+
<li>New Jersey</li>
|
|
50
|
+
<li>New Mexico</li>
|
|
51
|
+
<li>New York</li>
|
|
52
|
+
<li>North Carolina</li>
|
|
53
|
+
<li>North Dakota</li>
|
|
54
|
+
<li>Ohio</li>
|
|
55
|
+
<li>Oklahoma</li>
|
|
56
|
+
<li>Oregon</li>
|
|
57
|
+
<li>Pennsylvania</li>
|
|
58
|
+
<li>Rhode Island</li>
|
|
59
|
+
<li>South Carolina</li>
|
|
60
|
+
<li>South Dakota</li>
|
|
61
|
+
<li>Tennessee</li>
|
|
62
|
+
<li>Texas</li>
|
|
63
|
+
<li>Utah</li>
|
|
64
|
+
<li>Vermont</li>
|
|
65
|
+
<li>Virginia</li>
|
|
66
|
+
<li>Washington</li>
|
|
67
|
+
<li>West Virginia</li>
|
|
68
|
+
<li>Wisconsin</li>
|
|
69
|
+
<li>Wyoming</li>
|
|
70
|
+
</ul>,
|
|
71
|
+
className: 'states-dropdown',
|
|
72
|
+
isSearchable: true,
|
|
73
|
+
placeholder: 'Choose a state…'
|
|
74
|
+
}
|
|
75
|
+
}`,...d.parameters?.docs?.source}}},f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
76
|
+
args: {
|
|
77
|
+
children: <ul>
|
|
78
|
+
<li data-ukt-value="100">
|
|
79
|
+
<span className="item-title">Font Weight - </span>
|
|
80
|
+
100
|
|
81
|
+
</li>
|
|
82
|
+
<li data-ukt-value="200">
|
|
83
|
+
<span className="item-title">Font Weight - </span>
|
|
84
|
+
200
|
|
85
|
+
</li>
|
|
86
|
+
<li data-ukt-value="300">
|
|
87
|
+
<span className="item-title">Font Weight - </span>
|
|
88
|
+
300
|
|
89
|
+
</li>
|
|
90
|
+
<li data-ukt-value="400">
|
|
91
|
+
<span className="item-title">Font Weight - </span>
|
|
92
|
+
400
|
|
93
|
+
</li>
|
|
94
|
+
<li data-ukt-value="500">
|
|
95
|
+
<span className="item-title">Font Weight - </span>
|
|
96
|
+
500
|
|
97
|
+
</li>
|
|
98
|
+
<li data-ukt-value="600">
|
|
99
|
+
<span className="item-title">Font Weight - </span>
|
|
100
|
+
600
|
|
101
|
+
</li>
|
|
102
|
+
<li data-ukt-value="700">
|
|
103
|
+
<span className="item-title">Font Weight - </span>
|
|
104
|
+
700
|
|
105
|
+
</li>
|
|
106
|
+
</ul>,
|
|
107
|
+
className: 'font-weight',
|
|
108
|
+
isSearchable: true
|
|
109
|
+
}
|
|
110
|
+
}`,...f.parameters?.docs?.source}}},p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
111
|
+
args: {
|
|
112
|
+
children: ['View menu', <Fragment>
|
|
113
|
+
<h4 className="heading">View</h4>
|
|
114
|
+
<ul>
|
|
115
|
+
<li data-ukt-item>Open</li>
|
|
116
|
+
<li data-ukt-item>Preview</li>
|
|
117
|
+
</ul>
|
|
118
|
+
<h4 className="heading">Edit</h4>
|
|
119
|
+
<ul>
|
|
120
|
+
<li data-ukt-value="save-item">Save</li>
|
|
121
|
+
<li data-ukt-value="edit-item">Edit</li>
|
|
122
|
+
<li data-ukt-value="delete-item">Delete</li>
|
|
123
|
+
</ul>
|
|
124
|
+
</Fragment>],
|
|
125
|
+
className: 'open-on-mount-context-menu',
|
|
126
|
+
isOpenOnMount: true
|
|
127
|
+
}
|
|
128
|
+
}`,...p.parameters?.docs?.source}}},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
129
|
+
args: {
|
|
130
|
+
children: ['Open', <div>
|
|
131
|
+
<p>
|
|
132
|
+
Try interacting with the controls here. The dropdown should only close
|
|
133
|
+
when you click outside of the entire dropdown or if you hit the escape
|
|
134
|
+
key when focus isn’t in the input controls.
|
|
135
|
+
</p>
|
|
136
|
+
<CSSValueInput cssValueType="length" label="Width" onSubmitValue={() => {}} placeholder="100vw" unit="vw" />
|
|
137
|
+
<CSSValueInput cssValueType="length" label="Rotation" onSubmitValue={() => {}} placeholder="0deg" step={5} unit="deg" />
|
|
138
|
+
</div>],
|
|
139
|
+
className: 'dropdown-without-items',
|
|
140
|
+
hasItems: false
|
|
141
|
+
}
|
|
142
|
+
}`,...m.parameters?.docs?.source}}},h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
143
|
+
args: {
|
|
144
|
+
children: <ul>
|
|
145
|
+
<li>0px</li>
|
|
146
|
+
<li>4px</li>
|
|
147
|
+
<li>9px</li>
|
|
148
|
+
<li>18px</li>
|
|
149
|
+
<li>36px</li>
|
|
150
|
+
<li>54px</li>
|
|
151
|
+
<li>72px</li>
|
|
152
|
+
<li>144px</li>
|
|
153
|
+
<li>167px</li>
|
|
154
|
+
<li>198px</li>
|
|
155
|
+
</ul>,
|
|
156
|
+
className: 'searchable-with-label',
|
|
157
|
+
isSearchable: true,
|
|
158
|
+
label: 'Font size'
|
|
159
|
+
}
|
|
160
|
+
}`,...h.parameters?.docs?.source}}},g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
161
|
+
args: {
|
|
162
|
+
allowCreate: true,
|
|
163
|
+
children: <ul>
|
|
164
|
+
<li>0px</li>
|
|
165
|
+
<li>4px</li>
|
|
166
|
+
<li>9px</li>
|
|
167
|
+
<li>18px</li>
|
|
168
|
+
<li>36px</li>
|
|
169
|
+
<li>54px</li>
|
|
170
|
+
<li>72px</li>
|
|
171
|
+
<li>144px</li>
|
|
172
|
+
<li>167px</li>
|
|
173
|
+
<li>198px</li>
|
|
174
|
+
</ul>,
|
|
175
|
+
className: 'searchable-and-allow-create',
|
|
176
|
+
isSearchable: true,
|
|
177
|
+
label: 'Font size'
|
|
178
|
+
}
|
|
179
|
+
}`,...g.parameters?.docs?.source}}},_.parameters={..._.parameters,docs:{..._.parameters?.docs,source:{originalSource:`{
|
|
180
|
+
args: {
|
|
181
|
+
allowCreate: true,
|
|
182
|
+
children: [<CSSValueInput name="cssinputbackgroundsize" onSubmitValue={() => {}} placeholder="cover" validator={/^(auto|contain|cover)$/} />, <ul>
|
|
183
|
+
<li>cover</li>
|
|
184
|
+
<li>contain</li>
|
|
185
|
+
<li>auto</li>
|
|
186
|
+
<li>50px</li>
|
|
187
|
+
<li>100px</li>
|
|
188
|
+
<li>200px</li>
|
|
189
|
+
<li>50%</li>
|
|
190
|
+
</ul>],
|
|
191
|
+
className: 'css-value-input-trigger',
|
|
192
|
+
hasItems: true,
|
|
193
|
+
label: 'Background size'
|
|
194
|
+
}
|
|
195
|
+
}`,..._.parameters?.docs?.source}}},v.parameters={...v.parameters,docs:{...v.parameters?.docs,source:{originalSource:`{
|
|
196
|
+
args: {
|
|
197
|
+
children: [<textarea></textarea>, <ul>
|
|
198
|
+
<li>
|
|
199
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque
|
|
200
|
+
ullamcorper fringilla quam, vel tincidunt nisl mattis vel.
|
|
201
|
+
</li>
|
|
202
|
+
<li>
|
|
203
|
+
Aenean posuere erat sed enim luctus, et accumsan nisl elementum. Nulla
|
|
204
|
+
vel blandit urna, vel accumsan nulla. Nulla varius luctus ex, gravida
|
|
205
|
+
ultrices orci sagittis eu.
|
|
206
|
+
</li>
|
|
207
|
+
<li>
|
|
208
|
+
Quisque vitae magna euismod ligula molestie maximus id et nunc. Nam et
|
|
209
|
+
lacus euismod, porttitor massa vel, sollicitudin ex. Sed ut tellus
|
|
210
|
+
suscipit, faucibus tortor nec, fermentum mi.
|
|
211
|
+
</li>
|
|
212
|
+
<li>
|
|
213
|
+
Nulla sagittis justo non accumsan sagittis. Cras a eros et dolor
|
|
214
|
+
dapibus bibendum lobortis quis ante. Ut eget scelerisque massa.
|
|
215
|
+
</li>
|
|
216
|
+
<li>
|
|
217
|
+
Vestibulum quis dignissim nunc. Mauris fringilla at nulla non lacinia.
|
|
218
|
+
Etiam tristique elit non nisl finibus, fringilla hendrerit ligula
|
|
219
|
+
hendrerit. Fusce eget leo lacinia, eleifend diam non, suscipit purus.
|
|
220
|
+
</li>
|
|
221
|
+
</ul>],
|
|
222
|
+
className: 'textarea-trigger',
|
|
223
|
+
hasItems: true
|
|
224
|
+
}
|
|
225
|
+
}`,...v.parameters?.docs?.source}}},y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
|
|
226
|
+
args: {
|
|
227
|
+
children: ['Colors', <ul>
|
|
228
|
+
<li>
|
|
229
|
+
<label>
|
|
230
|
+
<input type="checkbox" /> Red
|
|
231
|
+
</label>
|
|
232
|
+
</li>
|
|
233
|
+
<li>
|
|
234
|
+
<label>
|
|
235
|
+
<input type="checkbox" /> Blue
|
|
236
|
+
</label>
|
|
237
|
+
</li>
|
|
238
|
+
<li>
|
|
239
|
+
<label>
|
|
240
|
+
<input type="checkbox" /> Yellow
|
|
241
|
+
</label>
|
|
242
|
+
</li>
|
|
243
|
+
<li>
|
|
244
|
+
<label>
|
|
245
|
+
<input type="checkbox" /> Cyan
|
|
246
|
+
</label>
|
|
247
|
+
</li>
|
|
248
|
+
<li>
|
|
249
|
+
<label>
|
|
250
|
+
<input type="checkbox" /> Orchid
|
|
251
|
+
</label>
|
|
252
|
+
</li>
|
|
253
|
+
<li>
|
|
254
|
+
<label>
|
|
255
|
+
<input type="checkbox" /> Slate
|
|
256
|
+
</label>
|
|
257
|
+
</li>
|
|
258
|
+
</ul>],
|
|
259
|
+
className: 'checkboxes',
|
|
260
|
+
keepOpenOnSubmit: true
|
|
261
|
+
}
|
|
262
|
+
}`,...y.parameters?.docs?.source}}},x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
|
|
263
|
+
args: FIXED_HEADER_PROPS,
|
|
264
|
+
render() {
|
|
265
|
+
// const [dateStart, setDateStart] = useState(
|
|
266
|
+
// FIXED_HEADER_PROPS.dateStart,
|
|
267
|
+
// );
|
|
268
|
+
// const [dateEnd, setDateEnd] = useState(
|
|
269
|
+
// FIXED_HEADER_PROPS.dateEnd,
|
|
270
|
+
// );
|
|
271
|
+
|
|
272
|
+
return <>
|
|
273
|
+
<header className="mk-header">
|
|
274
|
+
<nav className="mk-nav a1">
|
|
275
|
+
<a className="logo" href="/"></a>
|
|
276
|
+
<a className="btn-text logo-text" href="/">
|
|
277
|
+
UIKit
|
|
278
|
+
</a>
|
|
279
|
+
</nav>
|
|
280
|
+
<div className="mk-nav center">
|
|
281
|
+
<h5 className="mk subtitle">
|
|
282
|
+
Welcome! Join our{' '}
|
|
283
|
+
<a className="home-link" rel="noreferrer" href="https://discord.gg/dTpXZpQ9Rz" target="_blank">
|
|
284
|
+
Discord.
|
|
285
|
+
</a>
|
|
286
|
+
</h5>
|
|
287
|
+
</div>
|
|
288
|
+
<nav className="mk-nav a2">
|
|
289
|
+
<a className="btn-text" href="/projects">
|
|
290
|
+
Projects
|
|
291
|
+
</a>
|
|
292
|
+
<Dropdown {...FIXED_HEADER_PROPS} />
|
|
293
|
+
</nav>
|
|
294
|
+
</header>
|
|
295
|
+
<h1>Lorem ipsum</h1>
|
|
296
|
+
</>;
|
|
297
|
+
}
|
|
298
|
+
}`,...x.parameters?.docs?.source}}},S.parameters={...S.parameters,docs:{...S.parameters?.docs,source:{originalSource:`{
|
|
299
|
+
args: {
|
|
300
|
+
children: <ul>
|
|
301
|
+
<li>0px</li>
|
|
302
|
+
<li>4px</li>
|
|
303
|
+
<li>9px</li>
|
|
304
|
+
<li>18px</li>
|
|
305
|
+
<li>36px</li>
|
|
306
|
+
<li>54px</li>
|
|
307
|
+
<li>72px</li>
|
|
308
|
+
<li>144px</li>
|
|
309
|
+
<li>167px</li>
|
|
310
|
+
<li>198px</li>
|
|
311
|
+
</ul>,
|
|
312
|
+
className: 'disabled-dropdown',
|
|
313
|
+
disabled: true,
|
|
314
|
+
isSearchable: true,
|
|
315
|
+
label: 'Disabled',
|
|
316
|
+
name: 'disabledexample',
|
|
317
|
+
value: '167px'
|
|
318
|
+
}
|
|
319
|
+
}`,...S.parameters?.docs?.source}}},C.parameters={...C.parameters,docs:{...C.parameters?.docs,source:{originalSource:`{
|
|
320
|
+
args: {
|
|
321
|
+
children: <ul>
|
|
322
|
+
<li>the carbon in our apple pies</li>
|
|
323
|
+
<li>sea of tranquility tesseract</li>
|
|
324
|
+
<li>encyclopaedia galactica</li>
|
|
325
|
+
<li>billions upon billions</li>
|
|
326
|
+
<li>network of wormholes</li>
|
|
327
|
+
<li>tingling of the spine</li>
|
|
328
|
+
<li>corpus callosum</li>
|
|
329
|
+
<li>finite but unbounded</li>
|
|
330
|
+
</ul>,
|
|
331
|
+
className: 'overlapping-dropdown no-trigger-text'
|
|
332
|
+
}
|
|
333
|
+
}`,...C.parameters?.docs?.source}}},w.parameters={...w.parameters,docs:{...w.parameters?.docs,source:{originalSource:`{
|
|
334
|
+
args: {
|
|
335
|
+
children: <ul>
|
|
336
|
+
<li>0px</li>
|
|
337
|
+
<li>4px</li>
|
|
338
|
+
<li>9px</li>
|
|
339
|
+
<li>18px</li>
|
|
340
|
+
<li>36px</li>
|
|
341
|
+
<li>54px</li>
|
|
342
|
+
<li>72px</li>
|
|
343
|
+
<li>144px</li>
|
|
344
|
+
<li>167px</li>
|
|
345
|
+
<li>198px</li>
|
|
346
|
+
</ul>,
|
|
347
|
+
className: 'out-of-bounds-example position-right',
|
|
348
|
+
isSearchable: true,
|
|
349
|
+
name: 'outofboundsatright',
|
|
350
|
+
placeholder: 'Fill available space'
|
|
351
|
+
}
|
|
352
|
+
}`,...w.parameters?.docs?.source}}},T.parameters={...T.parameters,docs:{...T.parameters?.docs,source:{originalSource:`{
|
|
353
|
+
args: {
|
|
354
|
+
children: <ul>
|
|
355
|
+
<li>Antarctica</li>
|
|
356
|
+
<li>Arctic Circle</li>
|
|
357
|
+
<li>North Pole</li>
|
|
358
|
+
</ul>,
|
|
359
|
+
className: 'out-of-bounds-example no-direction-change',
|
|
360
|
+
isSearchable: true,
|
|
361
|
+
name: 'outofboundsatbottomnodirectionchange',
|
|
362
|
+
placeholder: 'Show below even though it goes out of bounds'
|
|
363
|
+
}
|
|
364
|
+
}`,...T.parameters?.docs?.source}}};const E=[`CSSLengthsDropdown`,`StatesDropdown`,`FontWeightDropdown`,`ShowContextMenuOnMount`,`DropdownWithInteractiveContents`,`SearchableWithLabel`,`SearchableAndAllowCreate`,`CSSValueInputTrigger`,`TextareaTrigger`,`CheckboxesDropdown`,`FixedHeader`,`DisabledDropdown`,`OverlappingDropdown`,`OutOfBoundsAtRight`,`OutOfBoundsWithNoDirectionChange`];export{u as CSSLengthsDropdown,_ as CSSValueInputTrigger,y as CheckboxesDropdown,S as DisabledDropdown,m as DropdownWithInteractiveContents,x as FixedHeader,f as FontWeightDropdown,w as OutOfBoundsAtRight,T as OutOfBoundsWithNoDirectionChange,C as OverlappingDropdown,g as SearchableAndAllowCreate,h as SearchableWithLabel,p as ShowContextMenuOnMount,d as StatesDropdown,v as TextareaTrigger,E as __namedExportsOrder,l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.input-text{width:160px;padding:3px 6px;font-family:system-ui,sans-serif;font-size:13px;line-height:13px}.input-text-double-click-to-edit{border-color:#0000;max-width:300px}.input-text-double-click-to-edit:read-only{cursor:pointer}.multi-line-input-text{width:240px}.multi-line-input-css-transition{outline-offset:-1px;resize:none;background-color:#f8f8f8;border:1px solid #f2f2f2;border-radius:5px;outline:2px solid #0000;height:150px;padding:20px;font-size:14px;line-height:21px;transition:all .25s ease-in-out}[popover]{border:0;border-radius:5px;padding:25px 30px;box-shadow:0 3px 16px 1px #00000080}
|