nitro-web 0.0.8 → 0.0.9

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 (42) hide show
  1. package/_example/client/imgs/logo/logo-white.svg +4 -11
  2. package/_example/client/imgs/logo/logo.svg +4 -11
  3. package/_example/components/partials/layouts.tsx +5 -1
  4. package/_example/package.json +4 -3
  5. package/_example/server/config.js +1 -0
  6. package/client/imgs/no-image.svg +13 -0
  7. package/components/partials/element/avatar.jsx +2 -1
  8. package/components/partials/element/sidebar.jsx +31 -27
  9. package/components/partials/form/drop.jsx +2 -1
  10. package/components/partials/form/select.jsx +2 -31
  11. package/components/partials/layout/layout1.jsx +9 -3
  12. package/package.json +6 -16
  13. package/readme.md +3 -3
  14. package/types/components/partials/element/avatar.d.ts.map +1 -1
  15. package/types/components/partials/element/sidebar.d.ts +3 -1
  16. package/types/components/partials/element/sidebar.d.ts.map +1 -1
  17. package/types/components/partials/form/drop.d.ts.map +1 -1
  18. package/types/components/partials/layout/layout1.d.ts +11 -2
  19. package/types/components/partials/layout/layout1.d.ts.map +1 -1
  20. package/types/util.d.ts.map +1 -1
  21. package/util.js +3 -5
  22. package/webpack.config.js +1 -1
  23. package/_example/client/dist/assets/bundle.main.618efe6c61f19b4b02ff.css +0 -2295
  24. package/_example/client/dist/assets/bundle.main.823056518dd8e9935b28.js +0 -1
  25. package/_example/client/dist/assets/bundle.vendor.0330197eefd7ccc95d3b.js +0 -2
  26. package/_example/client/dist/assets/bundle.vendor.0330197eefd7ccc95d3b.js.LICENSE.txt +0 -100
  27. package/_example/client/dist/assets/images/avatar..jpg +0 -0
  28. package/_example/client/dist/assets/images/inter-v13-latin-300..woff2 +0 -0
  29. package/_example/client/dist/assets/images/inter-v13-latin-500..woff2 +0 -0
  30. package/_example/client/dist/assets/images/inter-v13-latin-600..woff2 +0 -0
  31. package/_example/client/dist/assets/images/inter-v13-latin-700..woff2 +0 -0
  32. package/_example/client/dist/assets/images/inter-v13-latin-800..woff2 +0 -0
  33. package/_example/client/dist/assets/images/inter-v13-latin-900..woff2 +0 -0
  34. package/_example/client/dist/assets/images/inter-v13-latin-regular..woff2 +0 -0
  35. package/_example/client/dist/assets/imgs/android-chrome-512x512.png +0 -0
  36. package/_example/client/dist/assets/imgs/favicon.png +0 -0
  37. package/_example/client/dist/assets/imgs/logo/logo-white.svg +0 -20
  38. package/_example/client/dist/assets/imgs/logo/logo.svg +0 -20
  39. package/_example/client/dist/assets/imgs/no-image.jpg +0 -0
  40. package/_example/client/dist/favicon.png +0 -0
  41. package/_example/client/dist/index.html +0 -1
  42. package/_example/client/imgs/no-image.jpg +0 -0
@@ -1,19 +1,12 @@
1
1
  <svg width="114" height="58" viewBox="0 0 114 58" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0_300_6)">
3
- <mask id="path-1-inside-1_300_6" fill="white">
4
- <path d="M39.789 22.4961L35.9427 45.7683C35.9427 45.7683 38.0085 45.2727 39.6553 45.5784C41.3022 45.8841 43.2495 46.9759 43.2495 46.9759L47.0957 23.7037C47.0957 23.7037 46.4802 20.7554 43.8303 20.3175C41.1803 19.8795 39.789 22.4961 39.789 22.4961Z"/>
5
- </mask>
6
- <path d="M35.9427 45.7683L28.0498 44.4638L26.0835 56.3609L37.8092 53.5475L35.9427 45.7683ZM39.789 22.4961L32.7255 18.7402L32.1099 19.8979L31.8961 21.1916L39.789 22.4961ZM47.0957 23.7037L54.9886 25.0082L55.2325 23.5328L54.9269 22.0688L47.0957 23.7037ZM43.2495 46.9759L39.3369 53.9539L49.283 59.5307L51.1424 48.2804L43.2495 46.9759ZM39.6553 45.5784L38.1952 53.444L39.6553 45.5784ZM43.8357 47.0728L47.6819 23.8006L31.8961 21.1916L28.0498 44.4638L43.8357 47.0728ZM39.2028 22.3992L35.3565 45.6714L51.1424 48.2804L54.9886 25.0082L39.2028 22.3992ZM39.789 22.4961C46.8525 26.252 46.8509 26.255 46.8494 26.2579C46.8489 26.2589 46.8473 26.2618 46.8462 26.2638C46.8442 26.2677 46.8421 26.2715 46.84 26.2754C46.8359 26.283 46.8319 26.2906 46.8278 26.2981C46.8198 26.313 46.8119 26.3275 46.8041 26.3415C46.7887 26.3697 46.7738 26.3963 46.7595 26.4214C46.731 26.4716 46.7043 26.5167 46.6794 26.5575C46.6303 26.6377 46.584 26.7076 46.5381 26.7712C46.4588 26.8814 46.3265 27.0492 46.11 27.2403C45.6556 27.6414 44.3327 28.509 42.5258 28.2104L45.1348 12.4245C40.6779 11.688 37.3344 13.6449 35.5219 15.2448C34.6263 16.0353 33.9805 16.8299 33.5575 17.417C33.3398 17.7191 33.164 17.99 33.0285 18.2116C32.9604 18.3231 32.9013 18.4239 32.8511 18.5122C32.8259 18.5564 32.8029 18.5977 32.782 18.6357C32.7716 18.6547 32.7616 18.6729 32.7522 18.6904C32.7475 18.6991 32.7429 18.7076 32.7385 18.7159C32.7362 18.72 32.734 18.7241 32.7319 18.7282C32.7308 18.7302 32.7292 18.7332 32.7287 18.7342C32.7271 18.7372 32.7255 18.7402 39.789 22.4961ZM42.5258 28.2104C40.7805 27.922 39.8783 26.751 39.6352 26.3541C39.509 26.1482 39.4443 25.9849 39.407 25.8784C39.3852 25.8158 39.3633 25.7454 39.3409 25.6622C39.3294 25.6199 39.3174 25.5726 39.3047 25.5194C39.2984 25.4928 39.2919 25.4645 39.2852 25.4344C39.2819 25.4194 39.2785 25.4039 39.275 25.3879C39.2733 25.38 39.2716 25.3719 39.2698 25.3636C39.2689 25.3595 39.2681 25.3554 39.2672 25.3512C39.2668 25.3491 39.2661 25.3459 39.2659 25.3449C39.2652 25.3417 39.2645 25.3386 47.0957 23.7037C54.9269 22.0688 54.9262 22.0657 54.9255 22.0624C54.9253 22.0614 54.9246 22.0581 54.9242 22.056C54.9233 22.0516 54.9223 22.0472 54.9214 22.0427C54.9195 22.0338 54.9175 22.0246 54.9155 22.0152C54.9114 21.9964 54.9071 21.9767 54.9025 21.956C54.8933 21.9148 54.8831 21.8699 54.8716 21.8216C54.8486 21.725 54.8208 21.6139 54.7873 21.4901C54.7208 21.244 54.6302 20.9398 54.5092 20.594C54.2737 19.921 53.8896 18.9933 53.2783 17.9955C52.0649 16.0151 49.53 13.151 45.1348 12.4245L42.5258 28.2104ZM43.2495 46.9759C47.162 39.998 47.1612 39.9975 47.1603 39.997C47.16 39.9969 47.1592 39.9964 47.1586 39.9961C47.1575 39.9954 47.1563 39.9948 47.155 39.9941C47.1526 39.9927 47.15 39.9913 47.1473 39.9897C47.1419 39.9867 47.1359 39.9834 47.1295 39.9798C47.1166 39.9727 47.1017 39.9644 47.0848 39.9551C47.051 39.9365 47.0093 39.9137 46.9601 39.8872C46.8621 39.8343 46.7333 39.766 46.5787 39.6865C46.2727 39.5291 45.8487 39.3191 45.3482 39.0943C44.4629 38.6966 42.8784 38.04 41.1154 37.7128L38.1952 53.444C38.0791 53.4225 38.2917 53.4647 38.7917 53.6893C38.9839 53.7756 39.1497 53.8578 39.2602 53.9146C39.3139 53.9422 39.3501 53.9616 39.365 53.9696C39.3723 53.9736 39.374 53.9745 39.3696 53.9721C39.3674 53.9709 39.3636 53.9688 39.3581 53.9658C39.3554 53.9642 39.3523 53.9625 39.3488 53.9605C39.347 53.9596 39.3451 53.9585 39.3432 53.9574C39.3422 53.9568 39.3412 53.9563 39.3401 53.9557C39.3396 53.9554 39.3388 53.9549 39.3385 53.9548C39.3377 53.9543 39.3369 53.9539 43.2495 46.9759ZM41.1154 37.7128C39.1243 37.3432 37.2645 37.4928 36.2389 37.6144C35.6573 37.6834 35.1605 37.7674 34.7978 37.8363C34.6143 37.8712 34.4592 37.9033 34.3382 37.9296C34.2775 37.9428 34.2249 37.9545 34.1812 37.9646C34.1593 37.9696 34.1395 37.9741 34.122 37.9783C34.1133 37.9803 34.1051 37.9822 34.0974 37.9841C34.0936 37.985 34.09 37.9858 34.0864 37.9867C34.0847 37.9871 34.0829 37.9875 34.0812 37.9879C34.0804 37.9881 34.0791 37.9884 34.0787 37.9885C34.0775 37.9888 34.0762 37.9891 35.9427 45.7683C37.8092 53.5475 37.808 53.5478 37.8068 53.5481C37.8064 53.5482 37.8052 53.5485 37.8044 53.5487C37.8029 53.5491 37.8013 53.5494 37.7998 53.5498C37.7968 53.5505 37.7938 53.5512 37.791 53.5519C37.7854 53.5532 37.7802 53.5545 37.7754 53.5556C37.7658 53.5578 37.7579 53.5597 37.7515 53.5611C37.7388 53.564 37.7322 53.5655 37.7313 53.5657C37.7297 53.566 37.7488 53.5618 37.7847 53.555C37.8608 53.5406 37.9833 53.5197 38.124 53.503C38.543 53.4533 38.5395 53.5079 38.1952 53.444L41.1154 37.7128Z" fill="white" mask="url(#path-1-inside-1_300_6)"/>
7
- <mask id="path-3-inside-2_300_6" fill="white">
8
- <path d="M36.0158 49.2033C36.787 48.2776 41.4549 49.2795 42.0723 50.229C42.3736 50.6923 42.9228 53.0882 41.3535 54.4736C39.7841 55.859 37.7126 57.1567 37.7126 57.1567C37.7126 57.1567 36.3013 55.2692 35.2969 53.4479C34.2926 51.6266 35.6465 49.6467 36.0158 49.2033Z"/>
9
- </mask>
10
- <path d="M36.0158 49.2033C36.787 48.2776 41.4549 49.2795 42.0723 50.229C42.3736 50.6923 42.9228 53.0882 41.3535 54.4736C39.7841 55.859 37.7126 57.1567 37.7126 57.1567C37.7126 57.1567 36.3013 55.2692 35.2969 53.4479C34.2926 51.6266 35.6465 49.6467 36.0158 49.2033Z" fill="white"/>
11
- <path d="M42.0723 50.229L35.3654 54.5899L35.3654 54.5899L42.0723 50.229ZM36.0158 49.2033L42.1625 54.3237L36.0158 49.2033ZM35.2969 53.4479L42.3024 49.5847L42.3024 49.5847L35.2969 53.4479ZM37.7126 57.1567L31.3056 61.9473L35.7168 67.8471L41.9596 63.9363L37.7126 57.1567ZM41.3535 54.4736L36.059 48.4763L36.059 48.4763L41.3535 54.4736ZM48.7792 45.8682C47.753 44.2898 46.4416 43.4214 45.8757 43.0712C45.1636 42.6307 44.4704 42.3187 43.9259 42.1026C42.826 41.6659 41.6548 41.3539 40.5879 41.1522C39.5476 40.9555 38.239 40.7936 36.8925 40.8455C36.2284 40.8711 35.2735 40.9577 34.2237 41.2651C33.2893 41.5388 31.4064 42.2375 29.8691 44.083L42.1625 54.3237C40.818 55.9377 39.2496 56.4653 38.7205 56.6202C38.076 56.809 37.6172 56.8294 37.5088 56.8336C37.2737 56.8427 37.3152 56.8169 37.6156 56.8737C37.8892 56.9254 38.0489 56.9841 38.022 56.9735C38.014 56.9703 37.7928 56.8851 37.4572 56.6775C37.2678 56.5603 36.2373 55.9309 35.3654 54.5899L48.7792 45.8682ZM29.8691 44.083C29.233 44.8466 28.2062 46.3138 27.551 48.2813C26.8738 50.3149 26.3388 53.77 28.2915 57.311L42.3024 49.5847C43.2507 51.3044 42.8905 52.8589 42.7314 53.3365C42.6445 53.5975 42.5518 53.7691 42.4957 53.8642C42.4459 53.9486 42.3528 54.0952 42.1625 54.3237L29.8691 44.083ZM28.2915 57.311C28.9693 58.5401 29.7327 59.7039 30.2778 60.5011C30.5602 60.9141 30.8065 61.2613 30.9857 61.51C31.0757 61.6348 31.1497 61.7362 31.2041 61.8102C31.2313 61.8472 31.2536 61.8774 31.2707 61.9004C31.2792 61.9119 31.2864 61.9216 31.2922 61.9295C31.2952 61.9334 31.2977 61.9368 31.3 61.9398C31.3011 61.9413 31.3021 61.9427 31.303 61.9439C31.3035 61.9445 31.3039 61.9451 31.3044 61.9457C31.3046 61.946 31.3049 61.9464 31.305 61.9465C31.3053 61.9469 31.3056 61.9473 37.7126 57.1567C44.1197 52.3661 44.1199 52.3665 44.1202 52.3669C44.1203 52.367 44.1206 52.3674 44.1207 52.3676C44.1211 52.368 44.1214 52.3685 44.1217 52.3688C44.1223 52.3696 44.1228 52.3703 44.1232 52.3709C44.1241 52.3721 44.1246 52.3728 44.1248 52.3731C44.1253 52.3736 44.1244 52.3725 44.1224 52.3697C44.1183 52.3642 44.1093 52.3521 44.096 52.334C44.0692 52.2976 44.0251 52.2373 43.9671 52.1567C43.8503 51.9946 43.681 51.756 43.485 51.4695C43.0734 50.8676 42.629 50.177 42.3024 49.5847L28.2915 57.311ZM37.7126 57.1567C41.9596 63.9363 41.9601 63.936 41.9606 63.9357C41.9608 63.9356 41.9612 63.9353 41.9616 63.9351C41.9623 63.9347 41.963 63.9342 41.9637 63.9337C41.9652 63.9328 41.9668 63.9318 41.9686 63.9307C41.9721 63.9285 41.9761 63.926 41.9807 63.9231C41.9897 63.9174 42.0008 63.9104 42.0139 63.9021C42.04 63.8856 42.074 63.864 42.1152 63.8376C42.1976 63.785 42.3093 63.7129 42.4451 63.624C42.7154 63.4469 43.0879 63.1982 43.5185 62.8982C44.3426 62.3239 45.534 61.4544 46.648 60.4709L36.059 48.4763C35.6036 48.8782 34.9746 49.3503 34.3706 49.7712C34.0871 49.9688 33.8437 50.1312 33.6765 50.2407C33.5936 50.295 33.5312 50.3352 33.4941 50.3589C33.4757 50.3707 33.4636 50.3783 33.4586 50.3815C33.4561 50.3831 33.4554 50.3835 33.4565 50.3828C33.4571 50.3825 33.4581 50.3818 33.4596 50.3809C33.4604 50.3804 33.4613 50.3799 33.4623 50.3792C33.4627 50.3789 33.4633 50.3786 33.4638 50.3782C33.4641 50.3781 33.4645 50.3778 33.4647 50.3777C33.4651 50.3774 33.4656 50.3771 37.7126 57.1567ZM46.648 60.4709C49.6503 57.8205 50.3558 54.4026 50.4118 52.2097C50.4406 51.0798 50.3137 50.0396 50.1166 49.1542C49.9741 48.5142 49.6307 47.1777 48.7792 45.8682L35.3654 54.5899C34.9345 53.9272 34.7318 53.3813 34.6708 53.213C34.5805 52.9638 34.5292 52.767 34.499 52.6315C34.4405 52.369 34.4093 52.1012 34.417 51.8013C34.4306 51.2685 34.626 49.7413 36.059 48.4763L46.648 60.4709Z" fill="white" mask="url(#path-3-inside-2_300_6)"/>
2
+ <g clip-path="url(#clip0_302_10)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M35.9427 45.7683L39.789 22.4961C39.789 22.4961 41.1803 19.8795 43.8303 20.3175C46.4802 20.7554 47.0957 23.7037 47.0957 23.7037L43.2494 46.9759C43.2494 46.9759 41.3022 45.8841 39.6553 45.5784C38.0085 45.2727 35.9427 45.7683 35.9427 45.7683Z" fill="white"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M37.7126 57.1569C37.7126 57.1569 37.8203 57.0894 38.0052 56.9688C38.0058 56.9684 38.0064 56.968 38.007 56.9676C38.1156 56.8968 38.2506 56.8078 38.4058 56.7035C38.3633 56.7134 38.322 56.7227 38.2819 56.7312C39.5571 55.7777 40.5537 55.0325 41.3327 54.4502M37.3836 56.6316C36.8046 55.7074 36.3112 54.9198 35.8906 54.2485C35.7012 53.9461 35.5265 53.6672 35.3654 53.4102C35.2658 53.2512 35.1714 53.1005 35.082 52.9577C34.5264 51.2855 35.6794 49.6071 36.0158 49.2034C36.112 49.0878 36.2689 49.0023 36.471 48.943C37.7052 48.5807 40.6257 49.1939 41.7179 49.9071C41.8803 50.0132 42.0023 50.1214 42.0723 50.2291C42.3419 50.6436 42.81 52.6054 41.7813 54.0062C41.7076 54.1065 41.6263 54.2039 41.5367 54.2976C41.4704 54.3472 41.4024 54.398 41.3327 54.4502M37.3836 56.6316C37.3563 56.6143 37.3241 56.5935 37.2876 56.5691ZM37.2876 56.5691C37.3582 56.6689 37.422 56.758 37.4773 56.8348C37.4816 56.8407 37.4858 56.8465 37.4899 56.8522C37.6297 57.0461 37.7126 57.1569 37.7126 57.1569" fill="white"/>
12
5
  <path d="M35.5401 12.373L29.8654 46.5548H23.6232L12.3572 25.0409H12.0902L8.50174 46.5548H1.27482L6.94954 12.373H13.2919L24.5078 33.8701H24.7915L28.3466 12.373H35.5401Z" fill="white"/>
13
6
  <path d="M66.2659 20.9184L65.3813 26.2593H49.926L50.8273 20.9184H66.2659ZM55.3337 14.7764H62.4438L58.4715 38.6769C58.3602 39.3334 58.3769 39.8453 58.5215 40.2124C58.6662 40.5685 58.9054 40.8189 59.2392 40.9635C59.5842 41.1082 59.9959 41.1805 60.4743 41.1805C60.8081 41.1805 61.1475 41.1527 61.4924 41.097C61.8374 41.0303 62.0988 40.9802 62.2769 40.9468L62.5439 46.2377C62.1433 46.3601 61.6037 46.4936 60.9249 46.6382C60.2573 46.7829 59.4673 46.8719 58.5549 46.9053C56.8191 46.972 55.3504 46.7439 54.1487 46.221C52.947 45.6869 52.0846 44.8691 51.5617 43.7675C51.0387 42.6659 50.9274 41.2806 51.2279 39.6116L55.3337 14.7764ZM66.6247 46.5548L70.8974 20.9184H77.7905L77.0395 25.3914H77.3065C78.0409 23.8003 79.0256 22.5986 80.2607 21.7863C81.5069 20.9629 82.8477 20.5512 84.2831 20.5512C84.6391 20.5512 85.0119 20.5735 85.4013 20.618C85.8019 20.6514 86.158 20.707 86.4695 20.7849L85.4013 27.1105C85.0898 26.9993 84.6447 26.9102 84.0661 26.8435C83.4986 26.7656 82.959 26.7267 82.4471 26.7267C81.4123 26.7267 80.4499 26.9548 79.5597 27.411C78.6696 27.856 77.9185 28.4791 77.3065 29.2803C76.7057 30.0814 76.3107 31.0049 76.1215 32.0509L73.7348 46.5548H66.6247ZM96.2793 47.0555C93.6644 47.0555 91.5003 46.4991 89.7867 45.3865C88.0732 44.2626 86.8659 42.7049 86.1649 40.7132C85.475 38.7103 85.3471 36.3792 85.781 33.7199C86.2039 31.094 87.0829 28.7963 88.4181 26.8268C89.7533 24.8573 91.4502 23.3274 93.5087 22.237C95.5671 21.1354 97.8871 20.5846 100.469 20.5846C103.072 20.5846 105.231 21.1465 106.944 22.2703C108.658 23.383 109.865 24.9408 110.566 26.9436C111.267 28.9465 111.401 31.2776 110.967 33.9369C110.533 36.5517 109.643 38.8438 108.296 40.8133C106.95 42.7828 105.253 44.3183 103.206 45.4198C101.158 46.5103 98.8496 47.0555 96.2793 47.0555ZM96.9803 41.5477C98.182 41.5477 99.2446 41.2083 100.168 40.5296C101.103 39.8397 101.876 38.905 102.488 37.7256C103.111 36.535 103.545 35.1887 103.79 33.6865C104.035 32.2066 104.051 30.8937 103.84 29.7476C103.629 28.5904 103.184 27.678 102.505 27.0104C101.837 26.3428 100.919 26.009 99.7509 26.009C98.5492 26.009 97.481 26.3539 96.5463 27.0438C95.6117 27.7225 94.8383 28.6572 94.2264 29.8477C93.6144 31.0383 93.186 32.3902 92.9412 33.9035C92.7075 35.3723 92.6908 36.6852 92.8911 37.8424C93.0914 38.9885 93.5309 39.8953 94.2097 40.5629C94.8884 41.2194 95.8119 41.5477 96.9803 41.5477Z" fill="white"/>
14
7
  </g>
15
8
  <defs>
16
- <clipPath id="clip0_300_6">
9
+ <clipPath id="clip0_302_10">
17
10
  <rect width="113" height="57.4452" fill="white" transform="translate(0.221069 0.554779)"/>
18
11
  </clipPath>
19
12
  </defs>
@@ -1,19 +1,12 @@
1
1
  <svg width="114" height="58" viewBox="0 0 114 58" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0_300_6)">
3
- <mask id="path-1-inside-1_300_6" fill="white">
4
- <path d="M39.789 22.4961L35.9427 45.7683C35.9427 45.7683 38.0085 45.2727 39.6553 45.5784C41.3022 45.8841 43.2495 46.9759 43.2495 46.9759L47.0957 23.7037C47.0957 23.7037 46.4802 20.7554 43.8303 20.3175C41.1803 19.8795 39.789 22.4961 39.789 22.4961Z"/>
5
- </mask>
6
- <path d="M35.9427 45.7683L28.0498 44.4638L26.0835 56.3609L37.8092 53.5475L35.9427 45.7683ZM39.789 22.4961L32.7255 18.7402L32.1099 19.8979L31.8961 21.1916L39.789 22.4961ZM47.0957 23.7037L54.9886 25.0082L55.2325 23.5328L54.9269 22.0688L47.0957 23.7037ZM43.2495 46.9759L39.3369 53.9539L49.283 59.5307L51.1424 48.2804L43.2495 46.9759ZM39.6553 45.5784L38.1952 53.444L39.6553 45.5784ZM43.8357 47.0728L47.6819 23.8006L31.8961 21.1916L28.0498 44.4638L43.8357 47.0728ZM39.2028 22.3992L35.3565 45.6714L51.1424 48.2804L54.9886 25.0082L39.2028 22.3992ZM39.789 22.4961C46.8525 26.252 46.8509 26.255 46.8494 26.2579C46.8489 26.2589 46.8473 26.2618 46.8462 26.2638C46.8442 26.2677 46.8421 26.2715 46.84 26.2754C46.8359 26.283 46.8319 26.2906 46.8278 26.2981C46.8198 26.313 46.8119 26.3275 46.8041 26.3415C46.7887 26.3697 46.7738 26.3963 46.7595 26.4214C46.731 26.4716 46.7043 26.5167 46.6794 26.5575C46.6303 26.6377 46.584 26.7076 46.5381 26.7712C46.4588 26.8814 46.3265 27.0492 46.11 27.2403C45.6556 27.6414 44.3327 28.509 42.5258 28.2104L45.1348 12.4245C40.6779 11.688 37.3344 13.6449 35.5219 15.2448C34.6263 16.0353 33.9805 16.8299 33.5575 17.417C33.3398 17.7191 33.164 17.99 33.0285 18.2116C32.9604 18.3231 32.9013 18.4239 32.8511 18.5122C32.8259 18.5564 32.8029 18.5977 32.782 18.6357C32.7716 18.6547 32.7616 18.6729 32.7522 18.6904C32.7475 18.6991 32.7429 18.7076 32.7385 18.7159C32.7362 18.72 32.734 18.7241 32.7319 18.7282C32.7308 18.7302 32.7292 18.7332 32.7287 18.7342C32.7271 18.7372 32.7255 18.7402 39.789 22.4961ZM42.5258 28.2104C40.7805 27.922 39.8783 26.751 39.6352 26.3541C39.509 26.1482 39.4443 25.9849 39.407 25.8784C39.3852 25.8158 39.3633 25.7454 39.3409 25.6622C39.3294 25.6199 39.3174 25.5726 39.3047 25.5194C39.2984 25.4928 39.2919 25.4645 39.2852 25.4344C39.2819 25.4194 39.2785 25.4039 39.275 25.3879C39.2733 25.38 39.2716 25.3719 39.2698 25.3636C39.2689 25.3595 39.2681 25.3554 39.2672 25.3512C39.2668 25.3491 39.2661 25.3459 39.2659 25.3449C39.2652 25.3417 39.2645 25.3386 47.0957 23.7037C54.9269 22.0688 54.9262 22.0657 54.9255 22.0624C54.9253 22.0614 54.9246 22.0581 54.9242 22.056C54.9233 22.0516 54.9223 22.0472 54.9214 22.0427C54.9195 22.0338 54.9175 22.0246 54.9155 22.0152C54.9114 21.9964 54.9071 21.9767 54.9025 21.956C54.8933 21.9148 54.8831 21.8699 54.8716 21.8216C54.8486 21.725 54.8208 21.6139 54.7873 21.4901C54.7208 21.244 54.6302 20.9398 54.5092 20.594C54.2737 19.921 53.8896 18.9933 53.2783 17.9955C52.0649 16.0151 49.53 13.151 45.1348 12.4245L42.5258 28.2104ZM43.2495 46.9759C47.162 39.998 47.1612 39.9975 47.1603 39.997C47.16 39.9969 47.1592 39.9964 47.1586 39.9961C47.1575 39.9954 47.1563 39.9948 47.155 39.9941C47.1526 39.9927 47.15 39.9913 47.1473 39.9897C47.1419 39.9867 47.1359 39.9834 47.1295 39.9798C47.1166 39.9727 47.1017 39.9644 47.0848 39.9551C47.051 39.9365 47.0093 39.9137 46.9601 39.8872C46.8621 39.8343 46.7333 39.766 46.5787 39.6865C46.2727 39.5291 45.8487 39.3191 45.3482 39.0943C44.4629 38.6966 42.8784 38.04 41.1154 37.7128L38.1952 53.444C38.0791 53.4225 38.2917 53.4647 38.7917 53.6893C38.9839 53.7756 39.1497 53.8578 39.2602 53.9146C39.3139 53.9422 39.3501 53.9616 39.365 53.9696C39.3723 53.9736 39.374 53.9745 39.3696 53.9721C39.3674 53.9709 39.3636 53.9688 39.3581 53.9658C39.3554 53.9642 39.3523 53.9625 39.3488 53.9605C39.347 53.9596 39.3451 53.9585 39.3432 53.9574C39.3422 53.9568 39.3412 53.9563 39.3401 53.9557C39.3396 53.9554 39.3388 53.9549 39.3385 53.9548C39.3377 53.9543 39.3369 53.9539 43.2495 46.9759ZM41.1154 37.7128C39.1243 37.3432 37.2645 37.4928 36.2389 37.6144C35.6573 37.6834 35.1605 37.7674 34.7978 37.8363C34.6143 37.8712 34.4592 37.9033 34.3382 37.9296C34.2775 37.9428 34.2249 37.9545 34.1812 37.9646C34.1593 37.9696 34.1395 37.9741 34.122 37.9783C34.1133 37.9803 34.1051 37.9822 34.0974 37.9841C34.0936 37.985 34.09 37.9858 34.0864 37.9867C34.0847 37.9871 34.0829 37.9875 34.0812 37.9879C34.0804 37.9881 34.0791 37.9884 34.0787 37.9885C34.0775 37.9888 34.0762 37.9891 35.9427 45.7683C37.8092 53.5475 37.808 53.5478 37.8068 53.5481C37.8064 53.5482 37.8052 53.5485 37.8044 53.5487C37.8029 53.5491 37.8013 53.5494 37.7998 53.5498C37.7968 53.5505 37.7938 53.5512 37.791 53.5519C37.7854 53.5532 37.7802 53.5545 37.7754 53.5556C37.7658 53.5578 37.7579 53.5597 37.7515 53.5611C37.7388 53.564 37.7322 53.5655 37.7313 53.5657C37.7297 53.566 37.7488 53.5618 37.7847 53.555C37.8608 53.5406 37.9833 53.5197 38.124 53.503C38.543 53.4533 38.5395 53.5079 38.1952 53.444L41.1154 37.7128Z" fill="black" mask="url(#path-1-inside-1_300_6)"/>
7
- <mask id="path-3-inside-2_300_6" fill="white">
8
- <path d="M36.0158 49.2033C36.787 48.2776 41.4549 49.2795 42.0723 50.229C42.3736 50.6923 42.9228 53.0882 41.3535 54.4736C39.7841 55.859 37.7126 57.1567 37.7126 57.1567C37.7126 57.1567 36.3013 55.2692 35.2969 53.4479C34.2926 51.6266 35.6465 49.6467 36.0158 49.2033Z"/>
9
- </mask>
10
- <path d="M36.0158 49.2033C36.787 48.2776 41.4549 49.2795 42.0723 50.229C42.3736 50.6923 42.9228 53.0882 41.3535 54.4736C39.7841 55.859 37.7126 57.1567 37.7126 57.1567C37.7126 57.1567 36.3013 55.2692 35.2969 53.4479C34.2926 51.6266 35.6465 49.6467 36.0158 49.2033Z" fill="black"/>
11
- <path d="M42.0723 50.229L35.3654 54.5899L35.3654 54.5899L42.0723 50.229ZM36.0158 49.2033L42.1625 54.3237L36.0158 49.2033ZM35.2969 53.4479L42.3024 49.5847L42.3024 49.5847L35.2969 53.4479ZM37.7126 57.1567L31.3056 61.9473L35.7168 67.8471L41.9596 63.9363L37.7126 57.1567ZM41.3535 54.4736L36.059 48.4763L36.059 48.4763L41.3535 54.4736ZM48.7792 45.8682C47.753 44.2898 46.4416 43.4214 45.8757 43.0712C45.1636 42.6307 44.4704 42.3187 43.9259 42.1026C42.826 41.6659 41.6548 41.3539 40.5879 41.1522C39.5476 40.9555 38.239 40.7936 36.8925 40.8455C36.2284 40.8711 35.2735 40.9577 34.2237 41.2651C33.2893 41.5388 31.4064 42.2375 29.8691 44.083L42.1625 54.3237C40.818 55.9377 39.2496 56.4653 38.7205 56.6202C38.076 56.809 37.6172 56.8294 37.5088 56.8336C37.2737 56.8427 37.3152 56.8169 37.6156 56.8737C37.8892 56.9254 38.0489 56.9841 38.022 56.9735C38.014 56.9703 37.7928 56.8851 37.4572 56.6775C37.2678 56.5603 36.2373 55.9309 35.3654 54.5899L48.7792 45.8682ZM29.8691 44.083C29.233 44.8466 28.2062 46.3138 27.551 48.2813C26.8738 50.3149 26.3388 53.77 28.2915 57.311L42.3024 49.5847C43.2507 51.3044 42.8905 52.8589 42.7314 53.3365C42.6445 53.5975 42.5518 53.7691 42.4957 53.8642C42.4459 53.9486 42.3528 54.0952 42.1625 54.3237L29.8691 44.083ZM28.2915 57.311C28.9693 58.5401 29.7327 59.7039 30.2778 60.5011C30.5602 60.9141 30.8065 61.2613 30.9857 61.51C31.0757 61.6348 31.1497 61.7362 31.2041 61.8102C31.2313 61.8472 31.2536 61.8774 31.2707 61.9004C31.2792 61.9119 31.2864 61.9216 31.2922 61.9295C31.2952 61.9334 31.2977 61.9368 31.3 61.9398C31.3011 61.9413 31.3021 61.9427 31.303 61.9439C31.3035 61.9445 31.3039 61.9451 31.3044 61.9457C31.3046 61.946 31.3049 61.9464 31.305 61.9465C31.3053 61.9469 31.3056 61.9473 37.7126 57.1567C44.1197 52.3661 44.1199 52.3665 44.1202 52.3669C44.1203 52.367 44.1206 52.3674 44.1207 52.3676C44.1211 52.368 44.1214 52.3685 44.1217 52.3688C44.1223 52.3696 44.1228 52.3703 44.1232 52.3709C44.1241 52.3721 44.1246 52.3728 44.1248 52.3731C44.1253 52.3736 44.1244 52.3725 44.1224 52.3697C44.1183 52.3642 44.1093 52.3521 44.096 52.334C44.0692 52.2976 44.0251 52.2373 43.9671 52.1567C43.8503 51.9946 43.681 51.756 43.485 51.4695C43.0734 50.8676 42.629 50.177 42.3024 49.5847L28.2915 57.311ZM37.7126 57.1567C41.9596 63.9363 41.9601 63.936 41.9606 63.9357C41.9608 63.9356 41.9612 63.9353 41.9616 63.9351C41.9623 63.9347 41.963 63.9342 41.9637 63.9337C41.9652 63.9328 41.9668 63.9318 41.9686 63.9307C41.9721 63.9285 41.9761 63.926 41.9807 63.9231C41.9897 63.9174 42.0008 63.9104 42.0139 63.9021C42.04 63.8856 42.074 63.864 42.1152 63.8376C42.1976 63.785 42.3093 63.7129 42.4451 63.624C42.7154 63.4469 43.0879 63.1982 43.5185 62.8982C44.3426 62.3239 45.534 61.4544 46.648 60.4709L36.059 48.4763C35.6036 48.8782 34.9746 49.3503 34.3706 49.7712C34.0871 49.9688 33.8437 50.1312 33.6765 50.2407C33.5936 50.295 33.5312 50.3352 33.4941 50.3589C33.4757 50.3707 33.4636 50.3783 33.4586 50.3815C33.4561 50.3831 33.4554 50.3835 33.4565 50.3828C33.4571 50.3825 33.4581 50.3818 33.4596 50.3809C33.4604 50.3804 33.4613 50.3799 33.4623 50.3792C33.4627 50.3789 33.4633 50.3786 33.4638 50.3782C33.4641 50.3781 33.4645 50.3778 33.4647 50.3777C33.4651 50.3774 33.4656 50.3771 37.7126 57.1567ZM46.648 60.4709C49.6503 57.8205 50.3558 54.4026 50.4118 52.2097C50.4406 51.0798 50.3137 50.0396 50.1166 49.1542C49.9741 48.5142 49.6307 47.1777 48.7792 45.8682L35.3654 54.5899C34.9345 53.9272 34.7318 53.3813 34.6708 53.213C34.5805 52.9638 34.5292 52.767 34.499 52.6315C34.4405 52.369 34.4093 52.1012 34.417 51.8013C34.4306 51.2685 34.626 49.7413 36.059 48.4763L46.648 60.4709Z" fill="black" mask="url(#path-3-inside-2_300_6)"/>
2
+ <g clip-path="url(#clip0_302_10)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M35.9427 45.7683L39.789 22.4961C39.789 22.4961 41.1803 19.8795 43.8303 20.3175C46.4802 20.7554 47.0957 23.7037 47.0957 23.7037L43.2494 46.9759C43.2494 46.9759 41.3022 45.8841 39.6553 45.5784C38.0085 45.2727 35.9427 45.7683 35.9427 45.7683Z" fill="black"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M37.7126 57.1569C37.7126 57.1569 37.8203 57.0894 38.0052 56.9688C38.0058 56.9684 38.0064 56.968 38.007 56.9676C38.1156 56.8968 38.2506 56.8078 38.4058 56.7035C38.3633 56.7134 38.322 56.7227 38.2819 56.7312C39.5571 55.7777 40.5537 55.0325 41.3327 54.4502M37.3836 56.6316C36.8046 55.7074 36.3112 54.9198 35.8906 54.2485C35.7012 53.9461 35.5265 53.6672 35.3654 53.4102C35.2658 53.2512 35.1714 53.1005 35.082 52.9577C34.5264 51.2855 35.6794 49.6071 36.0158 49.2034C36.112 49.0878 36.2689 49.0023 36.471 48.943C37.7052 48.5807 40.6257 49.1939 41.7179 49.9071C41.8803 50.0132 42.0023 50.1214 42.0723 50.2291C42.3419 50.6436 42.81 52.6054 41.7813 54.0062C41.7076 54.1065 41.6263 54.2039 41.5367 54.2976C41.4704 54.3472 41.4024 54.398 41.3327 54.4502M37.3836 56.6316C37.3563 56.6143 37.3241 56.5935 37.2876 56.5691ZM37.2876 56.5691C37.3582 56.6689 37.422 56.758 37.4773 56.8348C37.4816 56.8407 37.4858 56.8465 37.4899 56.8522C37.6297 57.0461 37.7126 57.1569 37.7126 57.1569" fill="black"/>
12
5
  <path d="M35.5401 12.373L29.8654 46.5548H23.6232L12.3572 25.0409H12.0902L8.50174 46.5548H1.27482L6.94954 12.373H13.2919L24.5078 33.8701H24.7915L28.3466 12.373H35.5401Z" fill="black"/>
13
6
  <path d="M66.2659 20.9184L65.3813 26.2593H49.926L50.8273 20.9184H66.2659ZM55.3337 14.7764H62.4438L58.4715 38.6769C58.3602 39.3334 58.3769 39.8453 58.5215 40.2124C58.6662 40.5685 58.9054 40.8189 59.2392 40.9635C59.5842 41.1082 59.9959 41.1805 60.4743 41.1805C60.8081 41.1805 61.1475 41.1527 61.4924 41.097C61.8374 41.0303 62.0988 40.9802 62.2769 40.9468L62.5439 46.2377C62.1433 46.3601 61.6037 46.4936 60.9249 46.6382C60.2573 46.7829 59.4673 46.8719 58.5549 46.9053C56.8191 46.972 55.3504 46.7439 54.1487 46.221C52.947 45.6869 52.0846 44.8691 51.5617 43.7675C51.0387 42.6659 50.9274 41.2806 51.2279 39.6116L55.3337 14.7764ZM66.6247 46.5548L70.8974 20.9184H77.7905L77.0395 25.3914H77.3065C78.0409 23.8003 79.0256 22.5986 80.2607 21.7863C81.5069 20.9629 82.8477 20.5512 84.2831 20.5512C84.6391 20.5512 85.0119 20.5735 85.4013 20.618C85.8019 20.6514 86.158 20.707 86.4695 20.7849L85.4013 27.1105C85.0898 26.9993 84.6447 26.9102 84.0661 26.8435C83.4986 26.7656 82.959 26.7267 82.4471 26.7267C81.4123 26.7267 80.4499 26.9548 79.5597 27.411C78.6696 27.856 77.9185 28.4791 77.3065 29.2803C76.7057 30.0814 76.3107 31.0049 76.1215 32.0509L73.7348 46.5548H66.6247ZM96.2793 47.0555C93.6644 47.0555 91.5003 46.4991 89.7867 45.3865C88.0732 44.2626 86.8659 42.7049 86.1649 40.7132C85.475 38.7103 85.3471 36.3792 85.781 33.7199C86.2039 31.094 87.0829 28.7963 88.4181 26.8268C89.7533 24.8573 91.4502 23.3274 93.5087 22.237C95.5671 21.1354 97.8871 20.5846 100.469 20.5846C103.072 20.5846 105.231 21.1465 106.944 22.2703C108.658 23.383 109.865 24.9408 110.566 26.9436C111.267 28.9465 111.401 31.2776 110.967 33.9369C110.533 36.5517 109.643 38.8438 108.296 40.8133C106.95 42.7828 105.253 44.3183 103.206 45.4198C101.158 46.5103 98.8496 47.0555 96.2793 47.0555ZM96.9803 41.5477C98.182 41.5477 99.2446 41.2083 100.168 40.5296C101.103 39.8397 101.876 38.905 102.488 37.7256C103.111 36.535 103.545 35.1887 103.79 33.6865C104.035 32.2066 104.051 30.8937 103.84 29.7476C103.629 28.5904 103.184 27.678 102.505 27.0104C101.837 26.3428 100.919 26.009 99.7509 26.009C98.5492 26.009 97.481 26.3539 96.5463 27.0438C95.6117 27.7225 94.8383 28.6572 94.2264 29.8477C93.6144 31.0383 93.186 32.3902 92.9412 33.9035C92.7075 35.3723 92.6908 36.6852 92.8911 37.8424C93.0914 38.9885 93.5309 39.8953 94.2097 40.5629C94.8884 41.2194 95.8119 41.5477 96.9803 41.5477Z" fill="black"/>
14
7
  </g>
15
8
  <defs>
16
- <clipPath id="clip0_300_6">
9
+ <clipPath id="clip0_302_10">
17
10
  <rect width="113" height="57.4452" fill="white" transform="translate(0.221069 0.554779)"/>
18
11
  </clipPath>
19
12
  </defs>
@@ -1,5 +1,9 @@
1
1
  import { Layout1 as L1, Layout2 as L2 } from 'nitro-web'
2
2
  import Logo from '../../client/imgs/logo/logo.svg'
3
3
 
4
- export const Layout1 = () => { return <L1 Logo={Logo} /> }
4
+ const links = [
5
+ { name: 'Nitro on Github', to: 'https://github.com/boycce/nitro-web', initial: 'G' },
6
+ ]
7
+
8
+ export const Layout1 = () => { return <L1 Logo={Logo} links={links} /> }
5
9
  export const Layout2 = () => { return <L2 Logo={Logo} /> }
@@ -26,7 +26,9 @@
26
26
  "nitro-web": "file:..",
27
27
  "react": "^18.3.1",
28
28
  "react-dom": "^18.3.1",
29
- "stripe": "^9.16.0"
29
+ "stripe": "^9.16.0",
30
+ "tailwindcss": "^3.4.17",
31
+ "twin.macro": "^3.4.1"
30
32
  },
31
33
  "devDependencies": {
32
34
  "@babel/core": "^7.8.0",
@@ -46,6 +48,7 @@
46
48
  "@typescript-eslint/eslint-plugin": "^8.18.1",
47
49
  "@typescript-eslint/parser": "^8.18.1",
48
50
  "autoprefixer": "^9.8.8",
51
+ "babel-eslint": "^10.0.3",
49
52
  "babel-loader": "^8.0.6",
50
53
  "babel-plugin-macros": "^3.1.0",
51
54
  "babel-plugin-react-html-attrs": "^2.1.0",
@@ -74,8 +77,6 @@
74
77
  "standard-version": "^9.3.2",
75
78
  "string-replace-loader": "^3.1.0",
76
79
  "tailwind-merge": "^2.6.0",
77
- "tailwindcss": "^3.4.17",
78
- "twin.macro": "^3.4.1",
79
80
  "typescript": "^5.5.2",
80
81
  "webpack": "^5.92.1",
81
82
  "webpack-cli": "^5.1.4",
@@ -123,5 +123,6 @@ export default {
123
123
 
124
124
  pwd: pwd,
125
125
  homepage: _require(pwd + 'package.json').homepage,
126
+ repository: _require(pwd + 'package.json').repository,
126
127
  version: _require(pwd + 'package.json').version,
127
128
  }
@@ -0,0 +1,13 @@
1
+ <svg width="1000" height="1000" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_302_7)">
3
+ <rect width="1000" height="1000" fill="#CDDBE8"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M696.674 362.471H304.601V640.286H696.674V362.471ZM260.601 318.471V684.286H740.674V318.471H260.601Z" fill="white"/>
5
+ <path d="M347.495 523.942V597.873H653.781V523.942L601.933 470.174L543.364 531.623L438.708 429.848L347.495 523.942Z" fill="white"/>
6
+ <circle cx="552.085" cy="436.089" r="29.2844" fill="white"/>
7
+ </g>
8
+ <defs>
9
+ <clipPath id="clip0_302_7">
10
+ <rect width="1000" height="1000" fill="white"/>
11
+ </clipPath>
12
+ </defs>
13
+ </svg>
@@ -1,5 +1,6 @@
1
1
  import { s3Image } from '../../../util.js'
2
2
  import { Initials } from './initials.jsx'
3
+ import noImage from '../../../client/imgs/no-image.svg'
3
4
  import avatarImg from '../../../client/imgs/avatar.jpg'
4
5
 
5
6
  export function Avatar({ awsUrl, isRound, user, showPlaceholderImage, className }) {
@@ -22,7 +23,7 @@ export function Avatar({ awsUrl, isRound, user, showPlaceholderImage, className
22
23
 
23
24
  return (
24
25
  user.avatar
25
- ? <img class={classes} src={s3Image(awsUrl, user.avatar, 'small')} />
26
+ ? <img class={classes} src={s3Image(awsUrl, user.avatar, 'small') || noImage} />
26
27
  : showPlaceholderImage ? <img class={classes} src={avatarImg} width="30px" />
27
28
  : <Initials class={classes} icon={{ initials: getInitials(user), hex: getHex(user) }} isRound={isRound} isMedium={true} />
28
29
  )
@@ -16,7 +16,7 @@ function classNames(...classes) {
16
16
  return classes.filter(Boolean).join(' ')
17
17
  }
18
18
 
19
- export function Sidebar({ Logo }) {
19
+ export function Sidebar({ Logo, menu, links }) {
20
20
  const [sidebarOpen, setSidebarOpen] = useState(false)
21
21
  return (
22
22
  <>
@@ -39,14 +39,14 @@ export function Sidebar({ Logo }) {
39
39
  </button>
40
40
  </div>
41
41
  </TransitionChild>
42
- <SidebarContents Logo={Logo} />
42
+ <SidebarContents Logo={Logo} menu={menu} links={links} />
43
43
  </DialogPanel>
44
44
  </div>
45
45
  </Dialog>
46
46
 
47
47
  {/* Static sidebar for desktop */}
48
48
  <div className={`hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col ${sidebarWidth}`}>
49
- <SidebarContents Logo={Logo} />
49
+ <SidebarContents Logo={Logo} menu={menu} links={links} />
50
50
  </div>
51
51
 
52
52
  {/* mobile sidebar closed */}
@@ -65,7 +65,7 @@ export function Sidebar({ Logo }) {
65
65
  )
66
66
  }
67
67
 
68
- function SidebarContents ({ Logo }) {
68
+ function SidebarContents ({ Logo, menu, links }) {
69
69
  const location = useLocation()
70
70
  const [{ user }] = sharedStore.useTracked()
71
71
 
@@ -75,45 +75,49 @@ function SidebarContents ({ Logo }) {
75
75
  else return ''
76
76
  }
77
77
 
78
- const navigation = [
79
- { name: 'Dashboard', href: '/', icon: HomeIcon },
80
- { name: 'Pricing (example)', href: '/pricing', icon: UsersIcon },
81
- { name: 'Styleguide', href: '/styleguide', icon: PaintBrushIcon },
82
- { name: 'Signout', href: '/signout', icon: ArrowLeftCircleIcon },
78
+ const _menu = menu || [
79
+ { name: 'Dashboard', to: '/', Icon: HomeIcon },
80
+ { name: 'Styleguide', to: '/styleguide', Icon: PaintBrushIcon },
81
+ { name: 'Pricing (example)', to: '/pricing', Icon: UsersIcon },
82
+ { name: 'Signout', to: '/signout', Icon: ArrowLeftCircleIcon },
83
83
  ]
84
84
 
85
- const teams = [
86
- { id: 1, name: 'Team 1', href: '#', initial: 'T' },
87
- { id: 2, name: 'Team 2', href: '#', initial: 'H' },
85
+ const _links = links || [
86
+ { name: 'Team 1', to: '#', initial: 'T' },
87
+ { name: 'Team 2', to: '#', initial: 'H' },
88
88
  ]
89
89
 
90
90
  // Sidebar component, swap this element with another sidebar if you like
91
91
  return (
92
92
  <div className="flex grow flex-col gap-y-8 overflow-y-auto bg-white py-5 px-10 lg:border-r lg:border-gray-200">
93
93
  <div className="flex h-16 shrink-0 items-center">
94
- <Logo alt="Nitro" width="70" />
94
+ <Link to="/">
95
+ <Logo alt="Nitro" width="70" height={undefined} />
96
+ </Link>
95
97
  </div>
96
98
  <nav className="flex flex-1 flex-col">
97
99
  <ul role="list" className="flex flex-1 flex-col gap-y-7">
98
100
  <li>
99
101
  <ul role="list" className="-mx-2 space-y-1">
100
- {navigation.map((item) => (
102
+ {_menu.map((item) => (
101
103
  <li key={item.name}>
102
104
  <Link
103
- to={item.href}
105
+ to={item.to}
104
106
  className={classNames(
105
- isActive(item.href)
107
+ isActive(item.to)
106
108
  ? 'bg-gray-50 text-indigo-600'
107
109
  : 'text-gray-700 hover:bg-gray-50 hover:text-indigo-600',
108
110
  'group flex gap-x-3 items-center rounded-md p-2 text-sm/6 font-semibold'
109
111
  )}
110
112
  >
111
- <item.icon
112
- className={classNames(
113
- isActive(item.href) ? 'text-indigo-600' : 'text-gray-400 group-hover:text-indigo-600',
114
- 'size-5 shrink-0'
115
- )}
116
- />
113
+ { item.Icon &&
114
+ <item.Icon
115
+ className={classNames(
116
+ isActive(item.to) ? 'text-indigo-600' : 'text-gray-400 group-hover:text-indigo-600',
117
+ 'size-5 shrink-0'
118
+ )}
119
+ />
120
+ }
117
121
  {item.name}
118
122
  </Link>
119
123
  </li>
@@ -121,14 +125,14 @@ function SidebarContents ({ Logo }) {
121
125
  </ul>
122
126
  </li>
123
127
  <li>
124
- <div className="text-xs/6 font-semibold text-gray-400">Your teams</div>
128
+ <div className="text-xs/6 font-semibold text-gray-400">Other Links</div>
125
129
  <ul role="list" className="-mx-2 mt-2 space-y-1">
126
- {teams.map((team) => (
130
+ {_links.map((team) => (
127
131
  <li key={team.name}>
128
132
  <Link
129
- to={team.href}
133
+ to={team.to}
130
134
  className={classNames(
131
- isActive(team.href)
135
+ isActive(team.to)
132
136
  ? 'bg-gray-50 text-indigo-600'
133
137
  : 'text-gray-700 hover:bg-gray-50 hover:text-indigo-600',
134
138
  'group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold'
@@ -136,7 +140,7 @@ function SidebarContents ({ Logo }) {
136
140
  >
137
141
  <span
138
142
  className={classNames(
139
- isActive(team.href)
143
+ isActive(team.to)
140
144
  ? 'border-indigo-600 text-indigo-600'
141
145
  : 'border-gray-200 text-gray-400 group-hover:border-indigo-600 group-hover:text-indigo-600',
142
146
  'flex size-6 shrink-0 items-center justify-center rounded-lg border bg-white text-[0.625rem] font-medium'
@@ -1,5 +1,6 @@
1
1
  import { isRegex, deepFind, s3Image } from '../../../util.js'
2
2
  import { DropHandler } from './drop-handler.jsx'
3
+ import noImage from '../../../client/imgs/no-image.svg'
3
4
 
4
5
  export function Drop({ awsUrl, className, id, name, onChange, multiple, state, ...props }) {
5
6
  /**
@@ -108,7 +109,7 @@ export function Drop({ awsUrl, className, id, name, onChange, multiple, state, .
108
109
  {
109
110
  urls.map((url, i) => (
110
111
  <div key={i} class="flex align-items-center gap-1">
111
- <img src={url} width="100%" />
112
+ <img src={url || noImage} width="100%" />
112
113
  </div>
113
114
  ))
114
115
  }
@@ -285,7 +285,8 @@ const MultiValueRemove = (props) => {
285
285
 
286
286
  function Flag({ flag }) {
287
287
  if (!flag) return null
288
- const publicPath = PUBLIC_PATH // eslint-disable-line
288
+ // todo: public needs to come from webpack
289
+ const publicPath = '/'
289
290
  return (
290
291
  <span class="flag" style={{ backgroundImage: `url(${publicPath}assets/imgs/flags/${flag}.svg)` }} />
291
292
  )
@@ -323,36 +324,6 @@ const style = () => css`
323
324
  } */
324
325
 
325
326
  /*
326
- todo: not yet accounted for (maybe remove)
327
-
328
- .bb:not(:last-child) {
329
- // option border
330
- position: relative;
331
- margin-bottom: 6px;
332
- &:after {
333
- content: "";
334
- position: absolute;
335
- bottom: -4px;
336
- left: 0;
337
- height: 2px;
338
- width: 100%;
339
- background-color: $border-color;
340
- }
341
- }
342
- .bt:not(:first-child) {
343
- // option border
344
- position: relative;
345
- margin-top: 6px;
346
- &:after {
347
- content: "";
348
- position: absolute;
349
- top: -4px;
350
- left: 0;
351
- height: 2px;
352
- width: 100%;
353
- background-color: $border-color;
354
- }
355
- }
356
327
  .flag {
357
328
  // https://github.com/lipis/flag-icons
358
329
  flex-shrink: 0;
@@ -3,8 +3,14 @@ import { Outlet } from 'react-router-dom'
3
3
  import { Message } from '../element/message.jsx'
4
4
  import { Sidebar } from '../element/sidebar.jsx'
5
5
 
6
- // Dashboard, app screens (only the <Outlet/> receives `params` and `location`)
7
- export function Layout1({ Logo }) {
6
+ /**
7
+ * Dashboard, app screens (only the <Outlet/> receives `params` and `location`)
8
+ * @param {object} props
9
+ * @param {JSX.Element} props.Logo
10
+ * @param {array} [props.menu] - [{name, to, Icon}]
11
+ * @param {array} [props.links] - [{name, to, initial}]
12
+ */
13
+ export function Layout1({ Logo, menu, links }) {
8
14
  const [store] = sharedStore.useTracked()
9
15
 
10
16
  return (
@@ -12,7 +18,7 @@ export function Layout1({ Logo }) {
12
18
  <Message />
13
19
  <div class="flex-1">
14
20
  <div class="wrapper lg:flex min-h-[100%] w-[100%] bg-[#FDFDFD] shadow-[0_0_40px_0_rgb(237_237_237)]">
15
- <Sidebar Logo={Logo} />
21
+ <Sidebar Logo={Logo} menu={menu} links={links} />
16
22
  <div class="py-10 px-14 flex-1" key={store?.company?._id}>
17
23
  <Outlet />
18
24
  </div>
package/package.json CHANGED
@@ -2,7 +2,8 @@
2
2
  "name": "nitro-web",
3
3
  "description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
4
4
  "repository": "github:boycce/nitro-web",
5
- "version": "0.0.8",
5
+ "homepage": "https://boycce.github.io/nitro-web/",
6
+ "version": "0.0.9",
6
7
  "main": "./client/index.js",
7
8
  "types": "./types/client/index.d.ts",
8
9
  "type": "module",
@@ -87,26 +88,18 @@
87
88
  "monastery": "^3.5.2",
88
89
  "react": "^18.3.1",
89
90
  "react-dom": "^18.3.1",
90
- "stripe": "^9.16.0"
91
+ "stripe": "^9.16.0",
92
+ "tailwindcss": "^3.4.17",
93
+ "twin.macro": "^3.4.1"
91
94
  },
92
95
  "devDependencies": {
93
96
  "@emotion/eslint-plugin": "^11.11.0",
94
- "@emotion/react": "^11.11.4",
95
- "@emotion/styled": "^11.11.4",
96
- "@types/react": "^19.0.2",
97
- "@types/react-dom": "^19.0.2",
98
- "@typescript-eslint/eslint-plugin": "^8.18.1",
99
- "@typescript-eslint/parser": "^8.18.1",
100
97
  "babel-eslint": "^10.0.3",
101
98
  "eslint": "^8.57.1",
102
99
  "eslint-plugin-import": "^2.26.0",
103
100
  "eslint-plugin-react": "^7.19.0",
104
101
  "eslint-plugin-react-hooks": "^4.0.0",
105
- "eslint-webpack-plugin": "^2.7.0",
106
- "standard-version": "^9.3.2",
107
- "tailwindcss": "^3.4.17",
108
- "twin.macro": "^3.4.1",
109
- "typescript": "^5.7.3"
102
+ "standard-version": "^9.3.2"
110
103
  },
111
104
  "engines": {
112
105
  "node": "^18"
@@ -127,9 +120,6 @@
127
120
  }
128
121
  ]
129
122
  },
130
- "jest": {
131
- "transform": {}
132
- },
133
123
  "author": "",
134
124
  "license": "ISC"
135
125
  }
package/readme.md CHANGED
@@ -11,7 +11,7 @@ npm i nitro-web
11
11
  ### Install
12
12
 
13
13
  1. Copy ./_example into your project
14
- 2. In package.json, replace `"nitro-web": "file:.."` with `"nitro-web": "^0.0.8"`
14
+ 2. In package.json, replace `"nitro-web": "file:.."` with `"nitro-web": "~0.0.9"`
15
15
  3. In package.json, replace `"../.eslintrc.json"` with `"./node_modules/nitro-web/.eslintrc.json"`
16
16
  4. Run `npm i`
17
17
 
@@ -66,5 +66,5 @@ npm run start
66
66
 
67
67
  ### Package notes
68
68
 
69
- - Added twin.macro is required as a dev dependency to ./. Note that this may cause errors when npm linking nitro-web, since dev deps are not installed.
70
- - Added tailwindcss^3 as a dev dependency to ./ to stop tailwind^4.0.0 from being installed
69
+ - Added twin.macro is required as a peer dependency to ./.
70
+ - Added tailwindcss^3 as a peer dependency to ./ to stop tailwind^4.0.0 from being installed
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/avatar.jsx"],"names":[],"mappings":"AAIA;;;;;;4CAwBC"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/avatar.jsx"],"names":[],"mappings":"AAKA;;;;;;4CAwBC"}
@@ -1,4 +1,6 @@
1
- export function Sidebar({ Logo }: {
1
+ export function Sidebar({ Logo, menu, links }: {
2
2
  Logo: any;
3
+ menu: any;
4
+ links: any;
3
5
  }): import("react/jsx-runtime").JSX.Element;
4
6
  //# sourceMappingURL=sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/sidebar.jsx"],"names":[],"mappings":"AAkBA;;4CA+CC"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/sidebar.jsx"],"names":[],"mappings":"AAkBA;;;;4CA+CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/drop.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;4CAyHC"}
1
+ {"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/drop.jsx"],"names":[],"mappings":"AAIA;;;;;;;;;4CAyHC"}
@@ -1,4 +1,13 @@
1
- export function Layout1({ Logo }: {
2
- Logo: any;
1
+ /**
2
+ * Dashboard, app screens (only the <Outlet/> receives `params` and `location`)
3
+ * @param {object} props
4
+ * @param {JSX.Element} props.Logo
5
+ * @param {array} [props.menu] - [{name, to, Icon}]
6
+ * @param {array} [props.links] - [{name, to, initial}]
7
+ */
8
+ export function Layout1({ Logo, menu, links }: {
9
+ Logo: JSX.Element;
10
+ menu?: any[];
11
+ links?: any[];
3
12
  }): import("react/jsx-runtime").JSX.Element;
4
13
  //# sourceMappingURL=layout1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout1.d.ts","sourceRoot":"","sources":["../../../../components/partials/layout/layout1.jsx"],"names":[],"mappings":"AAMA;;4CAgBC"}
1
+ {"version":3,"file":"layout1.d.ts","sourceRoot":"","sources":["../../../../components/partials/layout/layout1.jsx"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,+CAJG;IAA2B,IAAI,EAAvB,GAAG,CAAC,OAAO;IACG,IAAI;IACJ,KAAK;CAC7B,2CAiBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../util.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BC;AAED,6DAaC;AAED,4DAQC;AAED,iFAaC;AAED,0EAIC;AAED,gDAEC;AAED,0CAEC;AAED,qFAQC;AAED,uDAIC;AAED,iEAoBC;AAED;;;;EAgIC;AAED,wCASC;AAED,mDAYC;AAED,+DAyBC;AAED,iEAeC;AAED,kFA2BC;AAED,gEAIC;AAED,6CASC;AAED,qEAsEC;AAED,8CAGC;AAED,kDAQC;AAED;;;;IAOC;AAED;;;IAOC;AAED,mFAUC;AAED;;;;;;;EAUC;AAED,sDAYC;AAED,gFAoBC;AAED,uEAEC;AAED,kDAsBC;AAED,+DAaC;AAED,0DAEC;AAED,+CAEC;AAED,kDAEC;AAED,6CAIC;AAED,kEAOC;AAED,mDAEC;AAED,6CAiBC;AAED,iDAEC;AAED,iDAGC;AAED,gDAEC;AAED,iDAEC;AAED,0CAEC;AAED,yEAWC;AAED,mFAwCC;AAED;;;;;;;;;;;;;;;;;;;;;;;;EA0CC;AAED,uEAmBC;AAED,oDAKC;AAED,iDAOC;AAED,8EAqDC;AAED,kEAQC;AAED,8CAeC;AAED,+DAiCC;AAED,8CAcC;AAED,yFAiDC;AAED,oDAYC;AAED,4EAoBC;AAED,kDAUC;AAED,mFAiDC;AAED,oEAaC;AAED,8EAIC;AAED,0DAQC;AAED,uDAMC;AAED,mFAwBC;AAED;;;;EAyBC;AAED,8CAIC;AAED,uCAGC;AAED,0CAGC;AAvpCD,6BAAoC"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../util.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BC;AAED,6DAaC;AAED,4DAQC;AAED,iFAaC;AAED,0EAIC;AAED,gDAEC;AAED,0CAEC;AAED,qFAQC;AAED,uDAIC;AAED,iEAoBC;AAED;;;;EAgIC;AAED,wCASC;AAED,mDAYC;AAED,+DAyBC;AAED,iEAeC;AAED,kFA2BC;AAED,gEAIC;AAED,6CASC;AAED,qEAsEC;AAED,8CAGC;AAED,kDAQC;AAED;;;;IAOC;AAED;;;IAOC;AAED,mFAUC;AAED;;;;;;;EAUC;AAED,sDAYC;AAED,gFAmBC;AAED,uEAEC;AAED,kDAsBC;AAED,+DAaC;AAED,0DAEC;AAED,+CAEC;AAED,kDAEC;AAED,6CAIC;AAED,kEAOC;AAED,mDAEC;AAED,6CAiBC;AAED,iDAEC;AAED,iDAGC;AAED,gDAEC;AAED,iDAEC;AAED,0CAEC;AAED,yEAWC;AAED,mFAwCC;AAED;;;;;;;;;;;;;;;;;;;;;;;;EA0CC;AAED,uEAmBC;AAED,oDAKC;AAED,iDAOC;AAED,8EAqDC;AAED,kEAQC;AAED,8CAeC;AAED,+DAiCC;AAED,8CAcC;AAED,yFAiDC;AAED,oDAYC;AAED,4EAmBC;AAED,kDAUC;AAED,mFAiDC;AAED,oEAaC;AAED,8EAIC;AAED,0DAQC;AAED,uDAMC;AAED,mFAwBC;AAED;;;;EAyBC;AAED,8CAIC;AAED,uCAGC;AAED,0CAGC;AArpCD,6BAAoC"}
package/util.js CHANGED
@@ -525,12 +525,11 @@ export function getPublicPath(env, homepage, publicPath) {
525
525
  */
526
526
  if (publicPath) {
527
527
  const publicPathObj = new URL(publicPath, 'https://domain.com')
528
- if (env === 'development') return publicPathObj.pathname
529
- else return publicPathObj.pathname
528
+ return publicPathObj.pathname
530
529
 
531
530
  } else if (homepage) {
532
531
  const homepageObj = new URL(homepage, 'https://domain.com')
533
- if (env === 'development') return homepageObj.pathname
532
+ if (env === 'development') return '/'
534
533
  else return homepageObj.pathname
535
534
 
536
535
  } else {
@@ -996,10 +995,9 @@ export function s3Image (awsUrl, image, size='full', i) {
996
995
  */
997
996
  let lambdaDelay = 7000
998
997
  let usingMilliseconds = true
999
- let publicPath = PUBLIC_PATH // eslint-disable-line
1000
998
 
1001
999
  if (!isObject(image)) image = (image && image[i]) ? image[i] : null
1002
- if (!image) return `${publicPath}assets/imgs/no-image.jpg`
1000
+ if (!image) return ''
1003
1001
  // Alway use preview if available
1004
1002
  if (image.base64) return image.base64
1005
1003
  // Wait a moment before the different sizes are generated by lambda
package/webpack.config.js CHANGED
@@ -205,6 +205,7 @@ export const getConfig = (config) => {
205
205
  },
206
206
  },
207
207
  },
208
+ // 'removeDimensions', (dont need this, just use width/height={undefined} if required)
208
209
  // {
209
210
  // name: 'addClassesToSVGElement',
210
211
  // params: {
@@ -279,7 +280,6 @@ export const getConfig = (config) => {
279
280
  isDemo: process.env.isDemo,
280
281
  version: config.version,
281
282
  }),
282
- PUBLIC_PATH: publicPath,
283
283
  }),
284
284
  new ESLintPlugin({
285
285
  extensions: ['js', 'mjs', 'jsx'],