ekm-ui 0.3.2 → 0.3.7

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 (163) hide show
  1. package/.turbo/turbo-build.log +131 -100
  2. package/CHANGELOG.md +18 -0
  3. package/dist/accordion.mjs +3 -3
  4. package/dist/alert-banner.mjs +3 -3
  5. package/dist/alert.mjs +1 -1
  6. package/dist/avatar.mjs +4 -4
  7. package/dist/badge.mjs +2 -2
  8. package/dist/breadcrumb.mjs +3 -3
  9. package/dist/button-group-item.mjs +1 -1
  10. package/dist/button.d.ts +8 -7
  11. package/dist/button.mjs +2 -2
  12. package/dist/card-payment-block.css +1 -1
  13. package/dist/card-payment-block.css.map +1 -1
  14. package/dist/card-payment-block.mjs +33 -28
  15. package/dist/card.d.ts +7 -0
  16. package/dist/card.mjs +9 -0
  17. package/dist/card.mjs.map +1 -0
  18. package/dist/checkbox.mjs +3 -3
  19. package/dist/chunk-23SJGKDR.mjs +5 -0
  20. package/dist/{chunk-YQAMEBON.mjs → chunk-2PQACPVE.mjs} +2 -2
  21. package/dist/chunk-2PQACPVE.mjs.map +1 -0
  22. package/dist/{chunk-B2KVPYRJ.mjs → chunk-3P7HSGCA.mjs} +2 -2
  23. package/dist/{chunk-VASBTVLS.mjs → chunk-44HZW5A3.mjs} +3 -3
  24. package/dist/chunk-4AISL4YA.mjs +12 -0
  25. package/dist/chunk-4AISL4YA.mjs.map +1 -0
  26. package/dist/chunk-4LPT34XA.mjs +10 -0
  27. package/dist/chunk-4LPT34XA.mjs.map +1 -0
  28. package/dist/chunk-56NFESMI.mjs +9 -0
  29. package/dist/chunk-56NFESMI.mjs.map +1 -0
  30. package/dist/chunk-A6OC3NNV.mjs +11 -0
  31. package/dist/chunk-A6OC3NNV.mjs.map +1 -0
  32. package/dist/{chunk-EIUBW4B6.mjs → chunk-AP4P6HQV.mjs} +3 -3
  33. package/dist/chunk-ASCPOK5F.mjs +9 -0
  34. package/dist/chunk-ASCPOK5F.mjs.map +1 -0
  35. package/dist/{chunk-ER4YVWM3.mjs → chunk-AUAMGVT2.mjs} +3 -3
  36. package/dist/{chunk-UVKFEZEW.mjs → chunk-BQNNFYYF.mjs} +3 -3
  37. package/dist/{chunk-HAQTLD4G.mjs → chunk-EHJJX6ZZ.mjs} +2 -2
  38. package/dist/{chunk-H33QAJXR.mjs → chunk-GBY2NNWZ.mjs} +2 -2
  39. package/dist/chunk-GM5CLV6U.mjs +11 -0
  40. package/dist/chunk-GM5CLV6U.mjs.map +1 -0
  41. package/dist/{chunk-UGSJ7PI7.mjs → chunk-INRX3FEM.mjs} +2 -2
  42. package/dist/{chunk-NS6AVKX7.mjs → chunk-JACXLYPD.mjs} +3 -3
  43. package/dist/{chunk-S7V4MUJ2.mjs → chunk-K4NDQ5NZ.mjs} +3 -3
  44. package/dist/{chunk-ZHHTK7UM.mjs → chunk-LNK7V5RH.mjs} +3 -3
  45. package/dist/{chunk-3ZCDEN7B.mjs → chunk-PPMW7YAZ.mjs} +2 -2
  46. package/dist/{chunk-NI4IFVX3.mjs → chunk-PT55MK36.mjs} +3 -3
  47. package/dist/{chunk-EWY53DIV.mjs → chunk-PU3MCP6Q.mjs} +4 -4
  48. package/dist/{chunk-QTAUYFKM.mjs → chunk-PUJZGK7Y.mjs} +2 -2
  49. package/dist/{chunk-X6GXSTW7.mjs → chunk-Q3JOXDQV.mjs} +3 -3
  50. package/dist/{chunk-OZBN2ZC6.mjs → chunk-QZTQAE2E.mjs} +4 -4
  51. package/dist/{chunk-BISZCSUR.mjs → chunk-TWLN46WO.mjs} +3 -3
  52. package/dist/chunk-V7IF2WCZ.mjs +18 -0
  53. package/dist/chunk-V7IF2WCZ.mjs.map +1 -0
  54. package/dist/chunk-VNNJFI3Y.mjs +10 -0
  55. package/dist/chunk-VNNJFI3Y.mjs.map +1 -0
  56. package/dist/{chunk-EQANFKDN.mjs → chunk-VWGASXHS.mjs} +3 -3
  57. package/dist/{chunk-ZPLTGYYM.mjs → chunk-Y5K3JRRK.mjs} +2 -2
  58. package/dist/color-picker.mjs +1 -1
  59. package/dist/dashboard-notification.mjs +1 -1
  60. package/dist/drag-and-drop.d.ts +7 -1
  61. package/dist/drag-and-drop.mjs +3 -3
  62. package/dist/draggable-stacked-list-item.mjs +2 -2
  63. package/dist/drawer.mjs +1 -1
  64. package/dist/dropdown.mjs +3 -3
  65. package/dist/ekm-logo.mjs +1 -1
  66. package/dist/file-picker/file-listing.d.ts +31 -0
  67. package/dist/file-picker/file-listing.mjs +5 -0
  68. package/dist/file-picker/file-listing.mjs.map +1 -0
  69. package/dist/file-picker/file-picker.d.ts +31 -0
  70. package/dist/file-picker/file-picker.mjs +11 -0
  71. package/dist/file-picker/file-picker.mjs.map +1 -0
  72. package/dist/fixed-alert.mjs +1 -1
  73. package/dist/footer-heart-icon.mjs +1 -1
  74. package/dist/form-row.mjs +1 -1
  75. package/dist/image-thumbnail.mjs +1 -1
  76. package/dist/index.css +1 -1
  77. package/dist/index.css.map +1 -1
  78. package/dist/index.d.ts +5 -2
  79. package/dist/index.mjs +33 -28
  80. package/dist/input-addon.mjs +1 -1
  81. package/dist/input-copy.mjs +1 -1
  82. package/dist/label.mjs +3 -3
  83. package/dist/layout/layout.css +1 -1
  84. package/dist/layout/layout.css.map +1 -1
  85. package/dist/layout/layout.mjs +33 -28
  86. package/dist/loading-button.mjs +2 -2
  87. package/dist/love-footer.mjs +1 -1
  88. package/dist/mini-feature-block.mjs +1 -1
  89. package/dist/modal.mjs +3 -3
  90. package/dist/navbar/navbar.mjs +1 -1
  91. package/dist/no-results-block.mjs +1 -1
  92. package/dist/page-header.d.ts +1 -1
  93. package/dist/page-header.mjs +2 -2
  94. package/dist/pagination/pagination.mjs +1 -1
  95. package/dist/radio.d.ts +5 -0
  96. package/dist/radio.mjs +5 -0
  97. package/dist/radio.mjs.map +1 -0
  98. package/dist/rich-text-editor/index.mjs +2 -2
  99. package/dist/search/search.d.ts +1 -49
  100. package/dist/search/search.mjs +3 -3
  101. package/dist/select.mjs +3 -3
  102. package/dist/sidebar/sidebar.mjs +2 -2
  103. package/dist/sort/sort.mjs +3 -3
  104. package/dist/stacked-list-item.css +1 -1
  105. package/dist/stacked-list-item.css.map +1 -1
  106. package/dist/stacked-list-item.mjs +33 -28
  107. package/dist/table-header/table-header.mjs +3 -3
  108. package/dist/text-row.mjs +1 -1
  109. package/dist/textarea.mjs +3 -3
  110. package/dist/textinput.d.ts +5 -0
  111. package/dist/textinput.mjs +5 -0
  112. package/dist/textinput.mjs.map +1 -0
  113. package/dist/toast/index.mjs +1 -1
  114. package/dist/toggleswitch.d.ts +5 -0
  115. package/dist/toggleswitch.mjs +10 -0
  116. package/dist/toggleswitch.mjs.map +1 -0
  117. package/dist/tooltip/tooltip.d.ts +8 -0
  118. package/dist/tooltip/tooltip.mjs +4 -0
  119. package/dist/tooltip/tooltip.mjs.map +1 -0
  120. package/dist/video-dashboard-notification.mjs +1 -1
  121. package/dist/video-modal.mjs +1 -1
  122. package/package.json +1 -1
  123. package/src/button.tsx +141 -34
  124. package/src/card.tsx +18 -0
  125. package/src/drag-and-drop.tsx +27 -14
  126. package/src/file-picker/file-listing.tsx +132 -0
  127. package/src/file-picker/file-picker.tsx +458 -0
  128. package/src/index.tsx +4 -0
  129. package/src/page-header.tsx +2 -1
  130. package/src/radio.tsx +26 -0
  131. package/src/search/search.tsx +21 -14
  132. package/src/textinput.tsx +122 -0
  133. package/src/toggleswitch.tsx +38 -0
  134. package/src/tooltip/tooltip.tsx +65 -0
  135. package/dist/chunk-2IZBG5JT.mjs +0 -12
  136. package/dist/chunk-2IZBG5JT.mjs.map +0 -1
  137. package/dist/chunk-HDNA6QBW.mjs +0 -10
  138. package/dist/chunk-HDNA6QBW.mjs.map +0 -1
  139. package/dist/chunk-LN7UO7PK.mjs +0 -10
  140. package/dist/chunk-LN7UO7PK.mjs.map +0 -1
  141. package/dist/chunk-RUPJ2ZHA.mjs +0 -5
  142. package/dist/chunk-YQAMEBON.mjs.map +0 -1
  143. /package/dist/{chunk-RUPJ2ZHA.mjs.map → chunk-23SJGKDR.mjs.map} +0 -0
  144. /package/dist/{chunk-B2KVPYRJ.mjs.map → chunk-3P7HSGCA.mjs.map} +0 -0
  145. /package/dist/{chunk-VASBTVLS.mjs.map → chunk-44HZW5A3.mjs.map} +0 -0
  146. /package/dist/{chunk-EIUBW4B6.mjs.map → chunk-AP4P6HQV.mjs.map} +0 -0
  147. /package/dist/{chunk-ER4YVWM3.mjs.map → chunk-AUAMGVT2.mjs.map} +0 -0
  148. /package/dist/{chunk-UVKFEZEW.mjs.map → chunk-BQNNFYYF.mjs.map} +0 -0
  149. /package/dist/{chunk-HAQTLD4G.mjs.map → chunk-EHJJX6ZZ.mjs.map} +0 -0
  150. /package/dist/{chunk-H33QAJXR.mjs.map → chunk-GBY2NNWZ.mjs.map} +0 -0
  151. /package/dist/{chunk-UGSJ7PI7.mjs.map → chunk-INRX3FEM.mjs.map} +0 -0
  152. /package/dist/{chunk-NS6AVKX7.mjs.map → chunk-JACXLYPD.mjs.map} +0 -0
  153. /package/dist/{chunk-S7V4MUJ2.mjs.map → chunk-K4NDQ5NZ.mjs.map} +0 -0
  154. /package/dist/{chunk-ZHHTK7UM.mjs.map → chunk-LNK7V5RH.mjs.map} +0 -0
  155. /package/dist/{chunk-3ZCDEN7B.mjs.map → chunk-PPMW7YAZ.mjs.map} +0 -0
  156. /package/dist/{chunk-NI4IFVX3.mjs.map → chunk-PT55MK36.mjs.map} +0 -0
  157. /package/dist/{chunk-EWY53DIV.mjs.map → chunk-PU3MCP6Q.mjs.map} +0 -0
  158. /package/dist/{chunk-QTAUYFKM.mjs.map → chunk-PUJZGK7Y.mjs.map} +0 -0
  159. /package/dist/{chunk-X6GXSTW7.mjs.map → chunk-Q3JOXDQV.mjs.map} +0 -0
  160. /package/dist/{chunk-OZBN2ZC6.mjs.map → chunk-QZTQAE2E.mjs.map} +0 -0
  161. /package/dist/{chunk-BISZCSUR.mjs.map → chunk-TWLN46WO.mjs.map} +0 -0
  162. /package/dist/{chunk-EQANFKDN.mjs.map → chunk-VWGASXHS.mjs.map} +0 -0
  163. /package/dist/{chunk-ZPLTGYYM.mjs.map → chunk-Y5K3JRRK.mjs.map} +0 -0
@@ -1,48 +1,53 @@
1
- export { a as StackedListItem } from './chunk-OZBN2ZC6.mjs';
2
- import './chunk-3ZCDEN7B.mjs';
3
- import './chunk-HDNA6QBW.mjs';
4
- import './chunk-HAQTLD4G.mjs';
5
- import './chunk-X6GXSTW7.mjs';
6
- import './chunk-ZHHTK7UM.mjs';
1
+ export { a as StackedListItem } from './chunk-QZTQAE2E.mjs';
2
+ import './chunk-EHJJX6ZZ.mjs';
3
+ import './chunk-Q3JOXDQV.mjs';
4
+ import './chunk-LNK7V5RH.mjs';
7
5
  import './chunk-QWPN2UNV.mjs';
8
- import './chunk-RMX72FR3.mjs';
9
- import './chunk-NI4IFVX3.mjs';
10
- import './chunk-25FJ277C.mjs';
6
+ import './chunk-ASCPOK5F.mjs';
11
7
  import './chunk-FAFXVD4P.mjs';
8
+ import './chunk-V7IF2WCZ.mjs';
9
+ import './chunk-A6OC3NNV.mjs';
12
10
  import './chunk-256SAVHD.mjs';
13
11
  import './chunk-VPLCWU7T.mjs';
14
- import './chunk-EIUBW4B6.mjs';
15
- import './chunk-B2KVPYRJ.mjs';
12
+ import './chunk-PPMW7YAZ.mjs';
13
+ import './chunk-4LPT34XA.mjs';
14
+ import './chunk-VNNJFI3Y.mjs';
15
+ import './chunk-VWGASXHS.mjs';
16
+ import './chunk-RMX72FR3.mjs';
17
+ import './chunk-PT55MK36.mjs';
18
+ import './chunk-GM5CLV6U.mjs';
19
+ import './chunk-25FJ277C.mjs';
20
+ import './chunk-BIU2AAPZ.mjs';
21
+ import './chunk-AP4P6HQV.mjs';
22
+ import './chunk-3P7HSGCA.mjs';
16
23
  import './chunk-OT256LE6.mjs';
17
24
  import './chunk-FJQEJBBY.mjs';
18
- import './chunk-UVKFEZEW.mjs';
25
+ import './chunk-BQNNFYYF.mjs';
19
26
  import './chunk-EWNPNF2B.mjs';
20
- import './chunk-YQAMEBON.mjs';
21
- import './chunk-EQANFKDN.mjs';
27
+ import './chunk-2PQACPVE.mjs';
28
+ import './chunk-AUAMGVT2.mjs';
22
29
  import './chunk-ZT7KDTGF.mjs';
23
30
  import './chunk-WU66HPYP.mjs';
24
31
  import './chunk-FRIXS4BL.mjs';
25
32
  import './chunk-LWDFKEBO.mjs';
26
33
  import './chunk-PJMH47GY.mjs';
27
34
  import './chunk-KAQJAKQH.mjs';
28
- import './chunk-BIU2AAPZ.mjs';
29
- import './chunk-VASBTVLS.mjs';
35
+ import './chunk-44HZW5A3.mjs';
30
36
  import './chunk-YTTLKTRL.mjs';
31
37
  import './chunk-T2OVPC6F.mjs';
32
- import './chunk-2IZBG5JT.mjs';
33
- import './chunk-ZPLTGYYM.mjs';
38
+ import './chunk-4AISL4YA.mjs';
39
+ import './chunk-Y5K3JRRK.mjs';
34
40
  import './chunk-QRNTMHBL.mjs';
35
- import './chunk-ER4YVWM3.mjs';
36
- import './chunk-NS6AVKX7.mjs';
37
- import './chunk-BISZCSUR.mjs';
41
+ import './chunk-JACXLYPD.mjs';
42
+ import './chunk-TWLN46WO.mjs';
38
43
  import './chunk-O3QYDTAF.mjs';
39
- import './chunk-EWY53DIV.mjs';
40
- import './chunk-H33QAJXR.mjs';
41
- import './chunk-UGSJ7PI7.mjs';
42
- import './chunk-S7V4MUJ2.mjs';
43
- import './chunk-QTAUYFKM.mjs';
44
+ import './chunk-PU3MCP6Q.mjs';
45
+ import './chunk-GBY2NNWZ.mjs';
46
+ import './chunk-INRX3FEM.mjs';
47
+ import './chunk-K4NDQ5NZ.mjs';
48
+ import './chunk-PUJZGK7Y.mjs';
44
49
  import './chunk-SAXGEQRG.mjs';
45
- import './chunk-LN7UO7PK.mjs';
46
- import './chunk-RUPJ2ZHA.mjs';
50
+ import './chunk-56NFESMI.mjs';
51
+ import './chunk-23SJGKDR.mjs';
47
52
  //# sourceMappingURL=out.js.map
48
53
  //# sourceMappingURL=stacked-list-item.mjs.map
@@ -1,5 +1,5 @@
1
- export { a as TableHeader } from '../chunk-ZHHTK7UM.mjs';
2
- import '../chunk-QTAUYFKM.mjs';
3
- import '../chunk-RUPJ2ZHA.mjs';
1
+ export { a as TableHeader } from '../chunk-LNK7V5RH.mjs';
2
+ import '../chunk-PUJZGK7Y.mjs';
3
+ import '../chunk-23SJGKDR.mjs';
4
4
  //# sourceMappingURL=out.js.map
5
5
  //# sourceMappingURL=table-header.mjs.map
package/dist/text-row.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  export { a as TextRow } from './chunk-RMX72FR3.mjs';
2
- import './chunk-RUPJ2ZHA.mjs';
2
+ import './chunk-23SJGKDR.mjs';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=text-row.mjs.map
package/dist/textarea.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { a as TextArea } from './chunk-NI4IFVX3.mjs';
2
- import './chunk-QTAUYFKM.mjs';
3
- import './chunk-RUPJ2ZHA.mjs';
1
+ export { a as TextArea } from './chunk-PT55MK36.mjs';
2
+ import './chunk-PUJZGK7Y.mjs';
3
+ import './chunk-23SJGKDR.mjs';
4
4
  //# sourceMappingURL=out.js.map
5
5
  //# sourceMappingURL=textarea.mjs.map
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare const TextInput: react.ForwardRefExoticComponent<react.RefAttributes<unknown>>;
4
+
5
+ export { TextInput };
@@ -0,0 +1,5 @@
1
+ export { a as TextInput } from './chunk-GM5CLV6U.mjs';
2
+ import './chunk-PUJZGK7Y.mjs';
3
+ import './chunk-23SJGKDR.mjs';
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=textinput.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
1
  export { a as ToastContext, b as ToastProvider, c as useToast } from '../chunk-QWPN2UNV.mjs';
2
- import '../chunk-RUPJ2ZHA.mjs';
2
+ import '../chunk-23SJGKDR.mjs';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare const ToggleSwitch: react.ForwardRefExoticComponent<react.RefAttributes<unknown>>;
4
+
5
+ export { ToggleSwitch, ToggleSwitch as default };
@@ -0,0 +1,10 @@
1
+ import { a } from './chunk-PUJZGK7Y.mjs';
2
+ import { e, a as a$1 } from './chunk-23SJGKDR.mjs';
3
+ import { forwardRef } from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var r=e(a());var l=forwardRef(function(e,o){return jsxs("label",{className:`relative mb-5 inline-flex items-center ${e.disabled&&"cursor-not-allowed opacity-50"}`,children:[jsx("input",a$1({id:e.id,ref:o,type:"checkbox",className:"peer sr-only",onChange:e.onChange},e)),jsx("div",{className:"peer h-6 w-11 rounded-full bg-gray-200 after:absolute after:start-[2px] after:top-0.5 after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white rtl:peer-checked:after:-translate-x-full dark:border-gray-600 dark:bg-gray-700"}),e.label&&jsx("span",{class:"ms-3 text-sm font-medium text-gray-900 dark:text-gray-300",children:e.label})]})}),b=l;l.propTypes={id:r.default.string.isRequired,checked:r.default.bool,disabled:r.default.bool,onChange:r.default.func,label:r.default.string};
7
+
8
+ export { l as ToggleSwitch, b as default };
9
+ //# sourceMappingURL=out.js.map
10
+ //# sourceMappingURL=toggleswitch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/toggleswitch.tsx"],"names":["import_prop_types","forwardRef","jsx","jsxs","ToggleSwitch","props","ref","__spreadValues","toggleswitch_default","PropTypes"],"mappings":"yFAEA,IAAAA,EAAsB,OADtB,OAAS,cAAAC,MAAkB,QAKvB,OAKE,OAAAC,EALF,QAAAC,MAAA,oBAFG,IAAMC,EAAeH,EAAW,SAAsBI,EAAOC,EAAK,CACvE,OACEH,EAAC,SACC,UAAW,0CACTE,EAAM,UAAY,kCAGpB,UAAAH,EAAC,QAAAK,EAAA,CACC,GAAIF,EAAM,GACV,IAAKC,EACL,KAAK,WACL,UAAW,eACX,SAAUD,EAAM,UACZA,EACN,EACAH,EAAC,OAAI,UAAU,qYAAqY,EACnZG,EAAM,OACLH,EAAC,QAAK,MAAM,4DACT,SAAAG,EAAM,MACT,GAEJ,CAEJ,CAAC,EAEMG,EAAQJ,EAEfA,EAAa,UAAY,CACvB,GAAI,EAAAK,QAAU,OAAO,WACrB,QAAS,EAAAA,QAAU,KACnB,SAAU,EAAAA,QAAU,KACpB,SAAU,EAAAA,QAAU,KACpB,MAAO,EAAAA,QAAU,MACnB","sourcesContent":["//@ts-nocheck\nimport { forwardRef } from \"react\";\nimport PropTypes from \"prop-types\";\n\nexport const ToggleSwitch = forwardRef(function ToggleSwitch(props, ref) {\n return (\n <label\n className={`relative mb-5 inline-flex items-center ${\n props.disabled && \"cursor-not-allowed opacity-50\"\n }`}\n >\n <input\n id={props.id}\n ref={ref}\n type=\"checkbox\"\n className={`peer sr-only`}\n onChange={props.onChange}\n {...props}\n />\n <div className=\"peer h-6 w-11 rounded-full bg-gray-200 after:absolute after:start-[2px] after:top-0.5 after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-blue-600 peer-checked:after:translate-x-full peer-checked:after:border-white rtl:peer-checked:after:-translate-x-full dark:border-gray-600 dark:bg-gray-700\" />\n {props.label && (\n <span class=\"ms-3 text-sm font-medium text-gray-900 dark:text-gray-300\">\n {props.label}\n </span>\n )}\n </label>\n );\n});\n\nexport default ToggleSwitch;\n\nToggleSwitch.propTypes = {\n id: PropTypes.string.isRequired,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n label: PropTypes.string,\n};\n"]}
@@ -0,0 +1,8 @@
1
+ declare function ToolTip({ children, content, tooltopPos, width }: {
2
+ children: any;
3
+ content: any;
4
+ tooltopPos: any;
5
+ width: any;
6
+ }): JSX.Element;
7
+
8
+ export { ToolTip };
@@ -0,0 +1,4 @@
1
+ export { a as ToolTip } from '../chunk-ASCPOK5F.mjs';
2
+ import '../chunk-23SJGKDR.mjs';
3
+ //# sourceMappingURL=out.js.map
4
+ //# sourceMappingURL=tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
1
  export { a as VideoDashboardNotification } from './chunk-25FJ277C.mjs';
2
- import './chunk-RUPJ2ZHA.mjs';
2
+ import './chunk-23SJGKDR.mjs';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=video-dashboard-notification.mjs.map
@@ -1,4 +1,4 @@
1
1
  export { a as VideoModal } from './chunk-FAFXVD4P.mjs';
2
- import './chunk-RUPJ2ZHA.mjs';
2
+ import './chunk-23SJGKDR.mjs';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=video-modal.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ekm-ui",
3
- "version": "0.3.2",
3
+ "version": "0.3.7",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],
package/src/button.tsx CHANGED
@@ -1,38 +1,145 @@
1
- import { Button as FlowbiteButton } from "flowbite-react";
2
- import React, { forwardRef } from "react";
1
+ //@ts-nocheck
2
+ import { variantProps } from "classname-variants/react";
3
3
 
4
- type Props = {
5
- isLoading?: boolean;
6
- } & React.ComponentPropsWithRef<typeof FlowbiteButton>;
4
+ const buttonProps = variantProps({
5
+ base: "group flex items-stretch items-center justify-center p-0.5 text-center font-medium relative focus:z-10 focus:outline-none rounded-lg",
6
+ variants: {
7
+ color: {
8
+ default:
9
+ "focus:outline-none text-white bg-cyan-700 border border-transparent enabled:hover:bg-cyan-800 focus:ring-cyan-300 dark:bg-cyan-600 dark:enabled:hover:bg-cyan-700 dark:focus:ring-cyan-800 rounded-lg focus:ring-2",
10
+ dark: "enabled:hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:enabled:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700",
11
+ failure:
12
+ "enabled:hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:enabled:hover:bg-red-700 dark:focus:ring-red-900",
13
+ gray: "text-gray-900 bg-white border border-gray-200 enabled:hover:bg-gray-100 enabled:hover:text-cyan-700 :ring-cyan-700 focus:text-cyan-700 dark:bg-transparent dark:text-gray-400 dark:border-gray-600 dark:enabled:hover:text-white dark:enabled:hover:bg-gray-700 focus:ring-2",
14
+ info: "enabled:hover:bg-cyan-800 focus:ring-4 focus:ring-cyan-300 dark:bg-cyan-600 dark:enabled:hover:bg-cyan-700 dark:focus:ring-cyan-800",
15
+ light:
16
+ "text-gray-900 bg-white border border-gray-300 enabled:hover:bg-gray-100 focus:ring-4 focus:ring-cyan-300 dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:enabled:hover:bg-gray-700 dark:enabled:hover:border-gray-700 dark:focus:ring-gray-700",
17
+ success:
18
+ "enabled:hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:enabled:hover:bg-green-700 dark:focus:ring-green-800",
19
+ warning:
20
+ "enabled:hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900",
21
+ },
22
+ disabled: {
23
+ true: "cursor-not-allowed opacity-50",
24
+ false: "",
25
+ },
26
+ outline: {
27
+ true: "border bg-transparent",
28
+ false: "",
29
+ },
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ variants: {
34
+ color: "dark",
35
+ outline: true,
36
+ },
37
+ className: "text-gray-800 border-gray-800 hover:text-white",
38
+ },
39
+ {
40
+ variants: {
41
+ color: "dark",
42
+ outline: false,
43
+ },
44
+ className: "border-0 text-white bg-gray-800",
45
+ },
46
+ {
47
+ variants: {
48
+ color: "failure",
49
+ outline: true,
50
+ },
51
+ className: "text-red-700 border-red-700 hover:text-white",
52
+ },
53
+ {
54
+ variants: {
55
+ color: "failure",
56
+ outline: false,
57
+ },
58
+ className: "border-0 text-white bg-red-700",
59
+ },
60
+ {
61
+ variants: {
62
+ color: "info",
63
+ outline: true,
64
+ },
65
+ className: "text-cyan-700 border-cyan-700 hover:text-white",
66
+ },
67
+ {
68
+ variants: {
69
+ color: "info",
70
+ outline: false,
71
+ },
72
+ className: "text-white bg-cyan-700",
73
+ },
74
+ {
75
+ variants: {
76
+ color: "success",
77
+ outline: true,
78
+ },
79
+ className: "text-green-700 border-green-700 hover:text-white",
80
+ },
81
+ {
82
+ variants: {
83
+ color: "success",
84
+ outline: false,
85
+ },
86
+ className: "text-white bg-green-700",
87
+ },
88
+ {
89
+ variants: {
90
+ color: "warning",
91
+ outline: true,
92
+ },
93
+ className: "text-yellow-400 border-yellow-400 hover:text-white",
94
+ },
95
+ {
96
+ variants: {
97
+ color: "warning",
98
+ outline: false,
99
+ },
100
+ className: "text-white bg-yellow-400",
101
+ },
102
+ {
103
+ variants: {
104
+ color: "gray",
105
+ outline: true,
106
+ },
107
+ className:
108
+ "text-gray-900 bg-white hover:text-white border border-gray-200",
109
+ },
110
+ {
111
+ variants: {
112
+ color: "gray",
113
+ outline: false,
114
+ },
115
+ className: "text-gray-900 bg-white border border-gray-200",
116
+ },
117
+ ],
118
+ });
119
+
120
+ const sizes = Object.freeze({
121
+ xs: "text-xs px-2 py-1",
122
+ sm: "text-sm px-3 py-1.5",
123
+ md: "text-sm px-4 py-2",
124
+ lg: "text-base px-5 py-2.5",
125
+ xl: "text-base px-6 py-3",
126
+ });
7
127
 
8
- export const Button = forwardRef<any, Props>(function Button(
9
- { children, ...props },
10
- ref
11
- ) {
12
- return props.isLoading ? (
13
- <FlowbiteButton ref={ref} {...props} disabled>
14
- <svg
15
- aria-hidden="true"
16
- role="status"
17
- className="mr-3 inline h-4 w-4 animate-spin text-white"
18
- viewBox="0 0 100 101"
19
- fill="none"
20
- xmlns="http://www.w3.org/2000/svg"
128
+ export function Button({
129
+ color = "default",
130
+ disabled,
131
+ outline,
132
+ size = "md",
133
+ children,
134
+ ...props
135
+ }) {
136
+ return (
137
+ <button {...buttonProps({ color, disabled, outline })} {...props}>
138
+ <span
139
+ className={`flex items-center rounded-md transition-all duration-200 ${sizes[size]}`}
21
140
  >
22
- <path
23
- d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
24
- fill="#E5E7EB"
25
- />
26
- <path
27
- d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
28
- fill="currentColor"
29
- />
30
- </svg>
31
- {children}
32
- </FlowbiteButton>
33
- ) : (
34
- <FlowbiteButton ref={ref} {...props}>
35
- {children}
36
- </FlowbiteButton>
141
+ {children}
142
+ </span>
143
+ </button>
37
144
  );
38
- });
145
+ }
package/src/card.tsx ADDED
@@ -0,0 +1,18 @@
1
+ //@ts-nocheck
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export function Card({ className, children, ...props }) {
5
+ return (
6
+ <div
7
+ className={twMerge(
8
+ "flex flex-col rounded-lg border border-gray-200 bg-white px-5 py-4 shadow-sm dark:border-gray-700 dark:bg-gray-800",
9
+ className && className
10
+ )}
11
+ {...props}
12
+ >
13
+ <div className="flex h-full flex-col justify-center gap-4">
14
+ {children}
15
+ </div>
16
+ </div>
17
+ );
18
+ }
@@ -16,13 +16,13 @@ const DragStateClasses = Object.freeze({
16
16
  [DragStates.NONE]:
17
17
  'border-gray-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600',
18
18
  [DragStates.OVER]:
19
- 'border-blue-300 bg-blue-50 dark:hover:bg-blue-800 dark:bg-blue-700 hover:bg-blue-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600',
19
+ 'border-blue-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600',
20
20
  [DragStates.UPLOADING]:
21
- 'border-blue-300 bg-blue-50 dark:hover:bg-blue-800 dark:bg-blue-700 hover:bg-blue-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600',
21
+ 'border-blue-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-blue-600 dark:hover:border-blue-500 dark:hover:bg-blue-600',
22
22
  [DragStates.ERROR]:
23
- 'border-red-300 bg-red-50 dark:hover:bg-red-800 dark:bg-red-700 hover:bg-red-100 dark:border-red-600 dark:hover:border-red-500 dark:hover:bg-red-600',
23
+ 'border-red-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-red-600 dark:hover:border-red-500 dark:hover:bg-red-600',
24
24
  [DragStates.SUCCESS]:
25
- 'border-green-300 bg-green-50 dark:hover:bg-green-800 dark:bg-green-700 hover:bg-green-100 dark:border-green-600 dark:hover:border-green-500 dark:hover:bg-green-600',
25
+ 'border-green-300 bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-green-600 dark:hover:border-green-500 dark:hover:bg-green-600',
26
26
  })
27
27
 
28
28
  const defaultFileTypes = ['png', 'webp', 'jpg', 'gif', 'jpeg']
@@ -35,16 +35,17 @@ function isValidFormat(filename, filetypes) {
35
35
  return ftypes.includes(ext)
36
36
  }
37
37
 
38
- export function DragAndDrop({ subtitle = 'PNG, WEBP, JPG, JPEG or GIF', filetypes, uploaded, callback }) {
38
+ export function DragAndDrop({ subtitle = 'PNG, WEBP, JPG, JPEG or GIF', filetypes, uploaded, exitCallback, callback, errorCallback }) {
39
39
  const [dragState, setDragState] = useState(DragStates.NONE)
40
40
 
41
41
  useEffect(() => {
42
42
  let exists = Object.values(DragStates).includes(uploaded)
43
+
43
44
  if (exists) {
44
45
  setDragState(uploaded)
45
46
  setTimeout(() => {
46
- setDragState(DragStates.NONE)
47
- callback()
47
+ // setDragState(DragStates.NONE)
48
+ if (uploaded === DragStates.ERROR && errorCallback) errorCallback()
48
49
  }, 2000)
49
50
  }
50
51
  }, [uploaded])
@@ -54,15 +55,23 @@ export function DragAndDrop({ subtitle = 'PNG, WEBP, JPG, JPEG or GIF', filetype
54
55
  setDragState(DragStates.OVER)
55
56
  }
56
57
 
57
- const handleDagExit = (e) => {
58
+ const handleDragExit = (e) => {
58
59
  e.preventDefault()
60
+ if (exitCallback) exitCallback()
59
61
  setDragState(DragStates.NONE)
60
62
  }
61
63
 
62
64
  const handleDrop = (e) => {
63
65
  e.preventDefault()
64
- isValidFormat(e.dataTransfer.files[0].name, filetypes) ? setDragState(DragStates.UPLOADING) : setDragState(DragStates.ERROR)
65
- callback(e.dataTransfer.files[0])
66
+ if (isValidFormat(e.dataTransfer.files[0].name, filetypes)) {
67
+ setDragState(DragStates.UPLOADING)
68
+ callback(e.dataTransfer.files[0])
69
+ } else {
70
+ setDragState(DragStates.ERROR)
71
+ setTimeout(() => {
72
+ errorCallback()
73
+ }, 2000)
74
+ }
66
75
  }
67
76
 
68
77
  const handleFileSelection = (e) => {
@@ -92,7 +101,7 @@ export function DragAndDrop({ subtitle = 'PNG, WEBP, JPG, JPEG or GIF', filetype
92
101
  <div className="flex flex-col items-center justify-center pt-5 pb-6">
93
102
  <svg
94
103
  aria-hidden="true"
95
- className="inline w-10 h-10 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600"
104
+ className="inline w-10 h-10 mr-2 text-gray-200 animate-spin dark:text-gray-600"
96
105
  viewBox="0 0 100 101"
97
106
  fill="none"
98
107
  xmlns="http://www.w3.org/2000/svg"
@@ -141,7 +150,6 @@ export function DragAndDrop({ subtitle = 'PNG, WEBP, JPG, JPEG or GIF', filetype
141
150
  case DragStates.SUCCESS:
142
151
  return renderSuccessState()
143
152
  default:
144
- console.log('renderNormalState')
145
153
  return renderNormalState()
146
154
  }
147
155
  }
@@ -151,7 +159,7 @@ export function DragAndDrop({ subtitle = 'PNG, WEBP, JPG, JPEG or GIF', filetype
151
159
  onDragEnter={(e) => e.preventDefault()}
152
160
  onDragOver={handleDragOver}
153
161
  onDrop={handleDrop}
154
- onDragLeave={handleDagExit}
162
+ onDragLeave={handleDragExit}
155
163
  className="flex items-center justify-center w-full h-full"
156
164
  >
157
165
  <label
@@ -171,7 +179,12 @@ DragAndDrop.propTypes = {
171
179
  /** displays subtitle on dropzone */
172
180
  subtitle: PropTypes.string,
173
181
  /** send the outcome of the upload process back to the drag and drop component */
174
- uploaded: PropTypes.oneOf(['none', 'success', 'error']).isRequired,
182
+ uploaded: PropTypes.oneOf(['none', 'success', 'error']).isRequired,
183
+
184
+ /** Returns when mouse exists the drop-zone. This provides an actionable trigger seperate to the callback */
185
+ exitCallback: PropTypes.func,
186
+ /** Returns when a file fails the internal validation check. This provides an actionable trigger seperate to both the exitcallback and callback */
187
+ errorCallback: PropTypes.func.isRequired,
175
188
  /** Returns the image file */
176
189
  callback: PropTypes.func.isRequired,
177
190
  }
@@ -0,0 +1,132 @@
1
+ // @ts-nocheck
2
+ import { useEffect, useRef } from 'react'
3
+ import { Radio } from 'flowbite-react'
4
+ import PropTypes from 'prop-types'
5
+
6
+ // FOR USE WITH THE FILE PICKER COMPONENT - ONLY
7
+
8
+ export default function Listing({ border, files, isMore, selected, page, pages, callback }) {
9
+ const scrollRef = useRef()
10
+
11
+ useEffect(() => {
12
+ const element = document.querySelector('#img-file-list')
13
+ if (element && !element.hasAttribute('scroll')) scrollRef.current.addEventListener('scroll', handleScroll)
14
+ if (scrollRef.current != null) scrollRef.current.scrollTop = 0
15
+ return () => {
16
+ const element = document.querySelector('#img-file-list')
17
+ if (element && element.hasAttribute('scroll')) scrollRef.current.removeEventListener('scroll', handleScroll)
18
+ }
19
+ }, [])
20
+
21
+ const handleScroll = () => {
22
+ if (!isMore) return
23
+ const offset = scrollRef.current.scrollHeight - scrollRef.current.offsetHeight
24
+ const scroll = Math.floor(scrollRef.current.scrollTop)
25
+ // the '-2 & +2' is used as a buffer, otherwise '==' positioning of the scroll becomes too accurate.
26
+ if (scroll == offset || scroll + 2 == offset || scroll - 2 == offset) {
27
+ callback({ type: 'FETCH_DATA', payload: true })
28
+ }
29
+ }
30
+
31
+ const handleImageSelection = (fileName) => {
32
+ callback({ type: 'SELECTION', payload: selected === fileName ? '' : fileName })
33
+ }
34
+
35
+ return (
36
+ <div id="img-file-list" ref={scrollRef} className={`${border} border rounded-md overflow-y-auto`}>
37
+ {(files || []).map((f) => {
38
+ return <FileRow key={`file-row-${f.Name}`} file={f} selected={selected === f.Name} callback={handleImageSelection} />
39
+ })}
40
+ {isMore && page < pages && <InfiniteLoader />}
41
+ </div>
42
+ )
43
+ }
44
+
45
+ function FileRow({ file, selected = false, callback }) {
46
+ return (
47
+ <div
48
+ className={`flex items-center pt-4 pb-4 mt-1 mb-1 ${selected && 'bg-blue-50'} justify-between border-b border-gray-100 cursor-pointer`}
49
+ onClick={() => {
50
+ callback(file)
51
+ }}
52
+ >
53
+ <div className="flex items-center ml-3">
54
+ <div className="flex-shrink-0">
55
+ <Radio name={file.Name} checked={selected} readOnly />
56
+ </div>
57
+ <div className="ml-4">
58
+ <img className="h-10 w-10 rounded-md" src={`https://files.ekmcdn.com/${file.Uri}`} alt="" />
59
+ </div>
60
+ <div className="ml-4">
61
+ <div className=" font-medium text-gray-900">{file.Name}</div>
62
+ {file.Size && <div className="text-xs text-gray-500">{file.Size}</div>}
63
+ </div>
64
+ </div>
65
+ <div className="ml-4 flex-shrink-0">
66
+ <span className="text-sm mr-3 text-gray-500">{writeDate(file.LastWriteTime)}</span>
67
+ </div>
68
+ </div>
69
+ )
70
+ }
71
+
72
+ Listing.propTypes = {
73
+ /** Border style to use*/
74
+ border: PropTypes.string,
75
+ /** Array of files to list */
76
+ files: PropTypes.array,
77
+ /** Boolean to indicate if there are more files to load */
78
+ isMore: PropTypes.bool,
79
+ /** Name of the selected file */
80
+ selected: PropTypes.string,
81
+ /** Current page */
82
+ page: PropTypes.number,
83
+ /** Total number of pages */
84
+ pages: PropTypes.number,
85
+ /** Callback function to handle events */
86
+ callback: PropTypes.func,
87
+ }
88
+
89
+ FileRow.propTypes = {
90
+ /** File object to display */
91
+ file: PropTypes.object,
92
+ /** Boolean to indicate if the file is selected */
93
+ selected: PropTypes.bool,
94
+ /** Callback function to handle events */
95
+ callback: PropTypes.func,
96
+ }
97
+
98
+ function InfiniteLoader() {
99
+ return (
100
+ <div className="flex justify-center pt-4 pb-4 mt-1 mb-1">
101
+ <div role="status">
102
+ <svg
103
+ aria-hidden="true"
104
+ className="inline-block w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300"
105
+ viewBox="0 0 100 101"
106
+ fill="none"
107
+ xmlns="http://www.w3.org/2000/svg"
108
+ >
109
+ <path
110
+ d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
111
+ fill="currentColor"
112
+ />
113
+ <path
114
+ d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
115
+ fill="currentFill"
116
+ />
117
+ </svg>
118
+ </div>
119
+ </div>
120
+ )
121
+ }
122
+
123
+ function writeDate(date) {
124
+ try {
125
+ const d = new Date(date)
126
+ const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
127
+ return d.getDate() + ' ' + months[d.getMonth()] + ' ' + d.getFullYear()
128
+ } catch (err) {
129
+ return 'Unknown'
130
+ }
131
+ }
132
+