@4alldigital/foundation-ui--gamma 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/foundation-ui.css +1 -1
  2. package/dist/index.esm.js +210 -7
  3. package/dist/index.js +211 -6
  4. package/dist/types/fui/components/Button/Button.types.d.ts +2 -2
  5. package/dist/types/fui/components/Checkbox/Checkbox.d.ts +5 -0
  6. package/dist/types/fui/components/Checkbox/Checkbox.stories.d.ts +6 -0
  7. package/dist/types/fui/components/Checkbox/Checkbox.test.d.ts +1 -0
  8. package/dist/types/fui/components/Checkbox/Checkbox.types.d.ts +12 -0
  9. package/dist/types/fui/components/Checkbox/index.d.ts +1 -0
  10. package/dist/types/fui/components/Copy/Copy.types.d.ts +1 -1
  11. package/dist/types/fui/components/FileUpload/FileUpload.d.ts +5 -0
  12. package/dist/types/fui/components/FileUpload/FileUpload.stories.d.ts +6 -0
  13. package/dist/types/fui/components/FileUpload/FileUpload.test.d.ts +1 -0
  14. package/dist/types/fui/components/FileUpload/FileUpload.types.d.ts +7 -0
  15. package/dist/types/fui/components/FileUpload/index.d.ts +1 -0
  16. package/dist/types/fui/components/Form/Form.d.ts +1 -1
  17. package/dist/types/fui/components/Form/Form.types.d.ts +7 -1
  18. package/dist/types/fui/components/FormField/FormField.d.ts +1 -1
  19. package/dist/types/fui/components/FormField/FormField.types.d.ts +9 -0
  20. package/dist/types/fui/components/FormSelect/FormSelect.d.ts +5 -1
  21. package/dist/types/fui/components/FormSelect/FormSelect.types.d.ts +6 -4
  22. package/dist/types/fui/components/Icon/Icon.d.ts +1 -1
  23. package/dist/types/fui/components/Icon/Icon.types.d.ts +2 -1
  24. package/dist/types/fui/components/Label/Label.d.ts +8 -0
  25. package/dist/types/fui/components/Label/Label.stories.d.ts +6 -0
  26. package/dist/types/fui/components/Label/Label.test.d.ts +1 -0
  27. package/dist/types/fui/components/Label/Label.types.d.ts +4 -0
  28. package/dist/types/fui/components/Label/index.d.ts +1 -0
  29. package/dist/types/fui/components/Loader/Loader.d.ts +1 -1
  30. package/dist/types/fui/components/Loader/Loader.types.d.ts +1 -0
  31. package/dist/types/fui/components/Radio/Radio.d.ts +5 -0
  32. package/dist/types/fui/components/Radio/Radio.stories.d.ts +6 -0
  33. package/dist/types/fui/components/Radio/Radio.test.d.ts +1 -0
  34. package/dist/types/fui/components/Radio/Radio.types.d.ts +13 -0
  35. package/dist/types/fui/components/Radio/index.d.ts +1 -0
  36. package/dist/types/fui/components/Switch/Switch.d.ts +5 -0
  37. package/dist/types/fui/components/Switch/Switch.stories.d.ts +6 -0
  38. package/dist/types/fui/components/Switch/Switch.test.d.ts +1 -0
  39. package/dist/types/fui/components/Switch/Switch.types.d.ts +7 -0
  40. package/dist/types/fui/components/Switch/index.d.ts +1 -0
  41. package/dist/types/fui/components/TextInput/TextInput.types.d.ts +6 -2
  42. package/dist/types/fui/components/index.d.ts +2 -0
  43. package/dist/types/fui/hooks/useTheme.d.ts +1 -0
  44. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- [multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000;outline-offset:2px}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=checkbox]:indeterminate,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}body{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(16 35 59/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));font-family:ProximaNova-Regular,serif}:is(.dark body){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(16 35 59/var(--tw-bg-opacity));color:rgb(238 238 238/var(--tw-text-opacity))}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:480px){.container{max-width:480px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:976px){.container{max-width:976px}}@media (min-width:1440px){.container{max-width:1440px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.left-2{left:.5rem}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.-ml-1{margin-left:-.25rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-40{margin-bottom:10rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mr-3{margin-right:.75rem}.mt-6{margin-top:1.5rem}.box-border{box-sizing:border-box}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.list-item{display:list-item}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-auto{height:auto}.w-10{width:2.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.max-w-5xl{max-width:64rem}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.auto-cols-auto{grid-auto-columns:auto}.auto-rows-min{grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.gap-x-4{column-gap:1rem}.gap-y-0{row-gap:0}.gap-y-16{row-gap:4rem}.gap-y-2{row-gap:.5rem}.gap-y-24{row-gap:6rem}.gap-y-4{row-gap:1rem}.gap-y-40{row-gap:10rem}.gap-y-8{row-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-solid{border-style:solid}.border-dark-body-text{--tw-border-opacity:1;border-color:rgb(238 238 238/var(--tw-border-opacity))}.border-primary{--tw-border-opacity:1;border-color:rgb(0 47 108/var(--tw-border-opacity))}.border-primary-darker{--tw-border-opacity:1;border-color:rgb(0 42 97/var(--tw-border-opacity))}.border-secondary{--tw-border-opacity:1;border-color:rgb(252 183 0/var(--tw-border-opacity))}.border-secondary-darker{--tw-border-opacity:1;border-color:rgb(227 165 0/var(--tw-border-opacity))}.border-tertiary{--tw-border-opacity:1;border-color:rgb(42 61 130/var(--tw-border-opacity))}.border-tertiary-darker{--tw-border-opacity:1;border-color:rgb(38 55 117/var(--tw-border-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(0 47 108/var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(252 183 0/var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity:1;background-color:rgb(42 61 130/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-0{padding:0}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-16{padding-bottom:4rem;padding-top:4rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-24{padding-bottom:6rem;padding-top:6rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-40{padding-bottom:10rem;padding-top:10rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pt-6{padding-top:1.5rem}.font-heading{font-family:ProximaNova-Bold,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.leading-5{line-height:1.25rem}.text-black{color:rgb(0 0 0/var(--tw-text-opacity))}.text-black,.text-white{--tw-text-opacity:1}.text-white{color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.\!outline{outline-style:solid!important}.outline{outline-style:solid}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.hover\:border-primary-darker:hover{--tw-border-opacity:1;border-color:rgb(0 42 97/var(--tw-border-opacity))}.hover\:border-secondary-darker:hover{--tw-border-opacity:1;border-color:rgb(227 165 0/var(--tw-border-opacity))}.hover\:border-tertiary-darker:hover{--tw-border-opacity:1;border-color:rgb(38 55 117/var(--tw-border-opacity))}.hover\:bg-primary-darker:hover{--tw-bg-opacity:1;background-color:rgb(0 42 97/var(--tw-bg-opacity))}.hover\:bg-secondary-darker:hover{--tw-bg-opacity:1;background-color:rgb(227 165 0/var(--tw-bg-opacity))}.hover\:bg-tertiary-darker:hover{--tw-bg-opacity:1;background-color:rgb(38 55 117/var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[invalid\=true\]\:bg-error[data-invalid=true]{--tw-bg-opacity:1;background-color:rgb(248 114 114/var(--tw-bg-opacity))}.data-\[valid\]\:bg-success[data-valid]{--tw-bg-opacity:1;background-color:rgb(54 211 153/var(--tw-bg-opacity))}.radix-disabled\:opacity-50[data-disabled]{opacity:.5}:is(.dark .dark\:border-dark-body-text){--tw-border-opacity:1;border-color:rgb(238 238 238/var(--tw-border-opacity))}
1
+ body{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(0 30 90/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));font-family:ProximaNova-Regular,serif}:is(.dark body){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(0 30 90/var(--tw-bg-opacity));color:rgb(238 238 238/var(--tw-text-opacity))}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:480px){.container{max-width:480px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:976px){.container{max-width:976px}}@media (min-width:1440px){.container{max-width:1440px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-y-0{bottom:0;top:0}.left-0{left:0}.left-auto{left:auto}.right-0{right:0}.start-3{inset-inline-start:.75rem}.top-0{top:0}.z-10{z-index:10}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.-ml-1{margin-left:-.25rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-40{margin-bottom:10rem}.mb-8{margin-bottom:2rem}.mr-3{margin-right:.75rem}.mt-6{margin-top:1.5rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.list-item{display:list-item}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-auto{height:auto}.h-full{height:100%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0}.max-w-5xl{max-width:64rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;appearance:none}.auto-cols-auto{grid-auto-columns:auto}.auto-rows-min{grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.gap-x-4{column-gap:1rem}.gap-y-0{row-gap:0}.gap-y-16{row-gap:4rem}.gap-y-2{row-gap:.5rem}.gap-y-24{row-gap:6rem}.gap-y-4{row-gap:1rem}.gap-y-40{row-gap:10rem}.gap-y-8{row-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-dark-body-text{--tw-border-opacity:1;border-color:rgb(238 238 238/var(--tw-border-opacity))}.border-primary{--tw-border-opacity:1;border-color:rgb(0 30 90/var(--tw-border-opacity))}.border-primary-darker{--tw-border-opacity:1;border-color:rgb(0 27 81/var(--tw-border-opacity))}.border-secondary{--tw-border-opacity:1;border-color:rgb(252 183 0/var(--tw-border-opacity))}.border-secondary-darker{--tw-border-opacity:1;border-color:rgb(227 165 0/var(--tw-border-opacity))}.border-tertiary{--tw-border-opacity:1;border-color:rgb(163 176 202/var(--tw-border-opacity))}.border-tertiary-darker{--tw-border-opacity:1;border-color:rgb(140 156 189/var(--tw-border-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(0 30 90/var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(252 183 0/var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity:1;background-color:rgb(163 176 202/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.bg-none{background-image:none}.bg-clip-padding{background-clip:padding-box}.p-0{padding:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-11{padding-left:2.75rem;padding-right:2.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-16{padding-bottom:4rem;padding-top:4rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-24{padding-bottom:6rem;padding-top:6rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-40{padding-bottom:10rem;padding-top:10rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pl-12{padding-left:3rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.ps-3{padding-inline-start:.75rem}.pt-6{padding-top:1.5rem}.font-heading{font-family:ProximaNova-Bold,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.text-black{color:rgb(0 0 0/var(--tw-text-opacity))}.text-black,.text-white{--tw-text-opacity:1}.text-white{color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\!outline{outline-style:solid!important}.outline{outline-style:solid}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}@layer component{.form{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:#0000001a;border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);display:flex;flex-direction:column}:is(.dark .form){background-color:#0003}.form-item{--tw-border-opacity:1;-webkit-appearance:none;appearance:none;background-color:#ffffff1a;border-color:rgb(84 104 144/var(--tw-border-opacity));border-style:solid;border-width:1px;box-sizing:border-box;outline:2px solid #0000;outline-offset:2px}:is(.dark .form-item){--tw-border-opacity:1;background-color:#0000001a;border-color:rgb(51 75 123/var(--tw-border-opacity))}.form-item{color:rgb(84 104 144/var(--tw-text-opacity))}.form-item,.form-item:focus{--tw-text-opacity:1}.form-item:focus{color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .form-item){--tw-text-opacity:1;color:rgb(84 104 144/var(--tw-text-opacity))}:is(.dark .form-item:focus){--tw-text-opacity:1;color:rgb(238 238 238/var(--tw-text-opacity))}.form-item:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-opacity:1!important;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}:is(.dark .form-item:focus){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;--tw-ring-opacity:1!important;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.form-item:invalid{--tw-border-opacity:1;border-color:rgb(248 114 114/var(--tw-border-opacity));border-width:2px}:is(.dark .form-item:invalid){--tw-border-opacity:1;border-color:rgb(248 114 114/var(--tw-border-opacity))}.form-item:disabled{--tw-bg-opacity:1;background-color:rgb(0 30 90/var(--tw-bg-opacity))}:is(.dark .form-item:disabled){--tw-bg-opacity:1;background-color:rgb(0 30 90/var(--tw-bg-opacity))}.label{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .label){--tw-text-opacity:1;color:rgb(138 152 179/var(--tw-text-opacity))}.text-input{border-radius:.25rem;padding:.75rem;width:100%}.text-input:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}:is(.dark .text-input:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}.checkbox{border-radius:.25rem}.checkbox:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}:is(.dark .checkbox:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}.radio{border-radius:9999px}.radio:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}:is(.dark .radio:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}.form-icon{--tw-text-opacity:1;color:rgb(138 152 179/var(--tw-text-opacity))}:is(.dark .form-icon){--tw-text-opacity:1;color:rgb(138 152 179/var(--tw-text-opacity))}.switch{border-radius:9999px}.peer:checked~.switch{--tw-bg-opacity:1;background-color:rgb(84 104 144/var(--tw-bg-opacity))}.peer:focus~.switch{--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}:is(.dark .switch){--tw-border-opacity:1;border-color:rgb(0 30 90/var(--tw-border-opacity))}:is(.dark .peer:checked~.switch){--tw-bg-opacity:1;background-color:rgb(51 75 123/var(--tw-bg-opacity))}.file-upload::-webkit-file-upload-button{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(84 104 144/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity))}.file-upload::file-selector-button{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(84 104 144/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .file-upload)::-webkit-file-upload-button{--tw-bg-opacity:1;background-color:rgb(51 75 123/var(--tw-bg-opacity))}:is(.dark .file-upload)::file-selector-button{--tw-bg-opacity:1;background-color:rgb(51 75 123/var(--tw-bg-opacity))}}.file\:mr-3::-webkit-file-upload-button{margin-right:.75rem}.file\:mr-3::file-selector-button{margin-right:.75rem}.file\:cursor-pointer::-webkit-file-upload-button{cursor:pointer}.file\:cursor-pointer::file-selector-button{cursor:pointer}.file\:overflow-hidden::-webkit-file-upload-button{overflow:hidden}.file\:overflow-hidden::file-selector-button{overflow:hidden}.file\:rounded-none::-webkit-file-upload-button{border-radius:0}.file\:rounded-none::file-selector-button{border-radius:0}.file\:border-0::-webkit-file-upload-button{border-width:0}.file\:border-0::file-selector-button{border-width:0}.file\:border-solid::-webkit-file-upload-button{border-style:solid}.file\:border-solid::file-selector-button{border-style:solid}.file\:border-inherit::-webkit-file-upload-button{border-color:inherit}.file\:border-inherit::file-selector-button{border-color:inherit}.file\:p-3::-webkit-file-upload-button{padding:.75rem}.file\:p-3::file-selector-button{padding:.75rem}.file\:transition::-webkit-file-upload-button{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.file\:transition::file-selector-button{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.file\:duration-150::-webkit-file-upload-button{transition-duration:.15s}.file\:duration-150::file-selector-button{transition-duration:.15s}.file\:ease-in-out::-webkit-file-upload-button{transition-timing-function:cubic-bezier(.4,0,.2,1)}.file\:ease-in-out::file-selector-button{transition-timing-function:cubic-bezier(.4,0,.2,1)}.file\:\[border-inline-end-width\:1px\]::-webkit-file-upload-button{border-inline-end-width:1px}.file\:\[border-inline-end-width\:1px\]::file-selector-button{border-inline-end-width:1px}.file\:\[margin-inline-end\:0\.75rem\]::-webkit-file-upload-button{margin-inline-end:.75rem}.file\:\[margin-inline-end\:0\.75rem\]::file-selector-button{margin-inline-end:.75rem}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-\[1px\]:after{content:var(--tw-content);inset-inline-start:1px}.after\:top-\[1px\]:after{content:var(--tw-content);top:1px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{border-radius:9999px;content:var(--tw-content)}.after\:border:after{border-width:1px;content:var(--tw-content)}.after\:bg-white:after{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));content:var(--tw-content)}.after\:transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.hover\:border-primary-darker:hover{--tw-border-opacity:1;border-color:rgb(0 27 81/var(--tw-border-opacity))}.hover\:border-secondary-darker:hover{--tw-border-opacity:1;border-color:rgb(227 165 0/var(--tw-border-opacity))}.hover\:border-tertiary-darker:hover{--tw-border-opacity:1;border-color:rgb(140 156 189/var(--tw-border-opacity))}.hover\:bg-primary-darker:hover{--tw-bg-opacity:1;background-color:rgb(0 27 81/var(--tw-bg-opacity))}.hover\:bg-secondary-darker:hover{--tw-bg-opacity:1;background-color:rgb(227 165 0/var(--tw-bg-opacity))}.hover\:bg-tertiary-darker:hover{--tw-bg-opacity:1;background-color:rgb(140 156 189/var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:opacity-100{opacity:1}.peer:checked~.peer-checked\:after\:translate-x-full:after{--tw-translate-x:100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity));content:var(--tw-content)}.peer:focus~.peer-focus\:ring-info{--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}.data-\[invalid\=true\]\:bg-error[data-invalid=true]{--tw-bg-opacity:1;background-color:rgb(248 114 114/var(--tw-bg-opacity))}.data-\[valid\]\:bg-success[data-valid]{--tw-bg-opacity:1;background-color:rgb(54 211 153/var(--tw-bg-opacity))}:is(.dark .dark\:border-dark-body-text){--tw-border-opacity:1;border-color:rgb(238 238 238/var(--tw-border-opacity))}:is(.dark .peer:focus~.dark\:peer-focus\:ring-info){--tw-ring-opacity:1;--tw-ring-color:rgb(58 191 248/var(--tw-ring-opacity))}.peer:checked~.rtl\:peer-checked\:after\:-translate-x-full:where([dir=rtl],[dir=rtl] *):after{--tw-translate-x:-100%;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
2
2
  @font-face{font-display:swap;font-family:ProximaNova-Regular;font-style:normal;font-weight:400;src:url(https://cdn.tools.4alldigital.io/fonts/ProximaNovaReg.woff2) format("woff2"),url(https://cdn.tools.4alldigital.io/fonts/ProximaNovaReg.woff) format("woff")}@font-face{font-display:swap;font-family:ProximaNova-Bold;font-style:normal;font-weight:700;src:url(https://cdn.tools.4alldigital.io/fonts/ProximaNovaBold.woff2) format("woff2"),url(https://cdn.tools.4alldigital.io/fonts/ProximaNovaBold.woff) format("woff")}
package/dist/index.esm.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import cx from 'classnames';
3
3
  import { Icon as Icon$1 } from '@iconify/react';
4
+ import { useForm, Controller } from 'react-hook-form';
5
+ import React from 'react';
4
6
 
5
7
  var Blockquote = function (_a) {
6
8
  var text = _a.text, citation = _a.citation, className = _a.className, citationAttribute = _a.citationAttribute, _b = _a.showIcon, showIcon = _b === void 0 ? true : _b;
@@ -56,7 +58,7 @@ var Button = function (_a) {
56
58
  icon: 'w-6 h-6',
57
59
  },
58
60
  };
59
- var classes = cx('font-bold flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded', { 'text-white border-primary hover:bg-primary-darker hover:border-primary-darker': variant === 'primary' }, { 'text-white border-secondary hover:bg-secondary-darker hover:border-secondary-darker': variant === 'secondary' }, { 'text-black border-tertiary hover:bg-tertiary-darker hover:border-tertiary-darker': variant === 'tertiary' }, { 'bg-primary': variant === 'primary' && !outline }, { 'bg-secondary': variant === 'secondary' && !outline }, { 'bg-tertiary': variant === 'tertiary' && !outline }, { 'bg-transparent': outline }, { shadow: raised }, { uppercase: uppercase }, { 'auto-cols-auto grid-cols-2 gap-2': icon || external }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, "".concat(sizes[size].y, " ").concat(sizes[size].x, " ").concat(sizes[size].text), className);
61
+ var classes = cx('font-bold flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded cursor-pointer focus:outline-none', { 'text-white border-primary hover:bg-primary-darker hover:border-primary-darker': variant === 'primary' }, { 'text-white border-secondary hover:bg-secondary-darker hover:border-secondary-darker': variant === 'secondary' }, { 'text-black border-tertiary hover:bg-tertiary-darker hover:border-tertiary-darker': variant === 'tertiary' }, { 'bg-primary': variant === 'primary' && !outline }, { 'bg-secondary': variant === 'secondary' && !outline }, { 'bg-tertiary': variant === 'tertiary' && !outline }, { 'bg-transparent': outline }, { shadow: raised }, { uppercase: uppercase }, { 'auto-cols-auto grid-cols-2 gap-2': icon || external }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, "".concat(sizes[size].y, " ").concat(sizes[size].x, " ").concat(sizes[size].text), className);
60
62
  var iconClasses = cx(sizes[size].icon);
61
63
  return (jsx("button", { id: id, "data-testid": testID || id || 'Button', onClick: onClick, className: classes, type: type, disabled: disabled, "aria-label": ariaLabel, role: "button", children: jsxs(Fragment, { children: [children, icon && !external && (jsx("span", { className: "flex items-center", children: jsx(Icon$1, { icon: icon, className: iconClasses }) })), external && (jsx("span", { className: "flex items-center", children: jsx(Icon$1, { icon: "carbon:launch", className: iconClasses }) }))] }) }));
62
64
  };
@@ -162,11 +164,12 @@ Heading.displayName = 'Heading';
162
164
  * List of supported icons can be found at https://icon-sets.iconify.design.
163
165
  */
164
166
  var Icon = function (_a) {
165
- var name = _a.name, _b = _a.size, size = _b === void 0 ? 24 : _b, color = _a.color, id = _a.id, testID = _a.testID;
167
+ var name = _a.name, _b = _a.size, size = _b === void 0 ? 24 : _b, color = _a.color, id = _a.id, className = _a.className, testID = _a.testID;
168
+ console.log('Icon name', name, color);
166
169
  if (color) {
167
- return jsx(Icon$1, { "data-testid": testID || id || "Icon", icon: name, width: size, height: size, color: color });
170
+ return (jsx(Icon$1, { "data-testid": testID || id || 'Icon', icon: name, width: size, height: size, color: color, className: className, fill: color || 'currentColor' }));
168
171
  }
169
- return jsx(Icon$1, { "data-testid": testID || id || "Icon", icon: name, width: size, height: size, className: cx('fill-current') });
172
+ return (jsx(Icon$1, { "data-testid": testID || id || 'Icon', icon: name, width: size, height: size }));
170
173
  };
171
174
  Icon.displayName = 'Icon';
172
175
 
@@ -246,9 +249,9 @@ var Notice = function (_a) {
246
249
  Notice.displayName = 'Notice';
247
250
 
248
251
  var Loader = function (_a) {
249
- var _b = _a.size, size = _b === void 0 ? 8 : _b;
252
+ var color = _a.color, _b = _a.size, size = _b === void 0 ? 8 : _b, _c = _a.thickness, thickness = _c === void 0 ? 4 : _c;
250
253
  var sizeClass = size ? "w-".concat(size, " h-").concat(size) : 'w-8 h-8';
251
- return (jsx("div", { "data-testid": "Loader", children: jsxs("div", { role: "status", children: [jsxs("svg", { className: "animate-spin -ml-1 mr-3 ".concat(sizeClass, " text-white"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsx("span", { className: "sr-only", children: "Loading..." })] }) }));
254
+ return (jsx("div", { "data-testid": "Loader", children: jsxs("div", { role: "status", children: [jsxs("svg", { className: "animate-spin -ml-1 mr-3 ".concat(sizeClass, " text-white"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: color || 'currentColor', strokeWidth: thickness }), jsx("path", { className: "opacity-75", fill: color || 'currentColor', d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsx("span", { className: "sr-only", children: "Loading..." })] }) }));
252
255
  };
253
256
  Loader.displayName = 'Loader';
254
257
 
@@ -295,4 +298,204 @@ var ContentRowsLayout = function (_a) {
295
298
  };
296
299
  ContentRowsLayout.displayName = 'ContentRowsLayout';
297
300
 
298
- export { Blockquote, Button, Container, ContentPageLayout, ContentRowsLayout, Copy, Heading, Hr, Icon, Image, Link, List, ListItem, Loader, Notice };
301
+ var Form = function (_a) {
302
+ var children = _a.children, className = _a.className, submit = _a.submit, onSubmit = _a.onSubmit, hideSubmit = _a.hideSubmit, ariaSubmitLabel = _a.ariaSubmitLabel, submitID = _a.submitID, initialValues = _a.initialValues, _b = _a.submitVariant, submitVariant = _b === void 0 ? BTN_VARIANTS.PRIMARY : _b;
303
+ var _c = useForm({
304
+ defaultValues: initialValues,
305
+ }), handleSubmit = _c.handleSubmit, formState = _c.formState;
306
+ var submitClasses = cx({ 'sr-only': hideSubmit });
307
+ console.log('FORM formState', formState);
308
+ return (jsx("div", { "data-testid": "Form", className: "w-full max-w-s @form @containers", children: jsxs("form", { onSubmit: handleSubmit(onSubmit), className: cx('form px-8 pt-6 pb-8 mb-4 w-2xs', className), children: [children, jsx("div", { className: 'flex items-center justify-end py-2', children: jsx(Button, { id: submitID || submit, className: submitClasses, ariaLabel: ariaSubmitLabel || submit || 'Submit', type: BTN_TYPES.SUBMIT, variant: submitVariant, children: submit }) })] }) }));
309
+ };
310
+ Form.displayName = 'Form';
311
+
312
+ /******************************************************************************
313
+ Copyright (c) Microsoft Corporation.
314
+
315
+ Permission to use, copy, modify, and/or distribute this software for any
316
+ purpose with or without fee is hereby granted.
317
+
318
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
319
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
320
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
321
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
322
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
323
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
324
+ PERFORMANCE OF THIS SOFTWARE.
325
+ ***************************************************************************** */
326
+ /* global Reflect, Promise, SuppressedError, Symbol */
327
+
328
+
329
+ var __assign = function() {
330
+ __assign = Object.assign || function __assign(t) {
331
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
332
+ s = arguments[i];
333
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
334
+ }
335
+ return t;
336
+ };
337
+ return __assign.apply(this, arguments);
338
+ };
339
+
340
+ function __rest(s, e) {
341
+ var t = {};
342
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
343
+ t[p] = s[p];
344
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
345
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
346
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
347
+ t[p[i]] = s[p[i]];
348
+ }
349
+ return t;
350
+ }
351
+
352
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
353
+ var e = new Error(message);
354
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
355
+ };
356
+
357
+ var FieldTypes;
358
+ (function (FieldTypes) {
359
+ FieldTypes["TEXT"] = "text";
360
+ FieldTypes["TEXTAREA"] = "textarea";
361
+ FieldTypes["SELECT"] = "select";
362
+ FieldTypes["CHECKBOX"] = "checkbox";
363
+ FieldTypes["RADIO"] = "radio";
364
+ FieldTypes["SWITCH"] = "switch";
365
+ FieldTypes["DATE"] = "date";
366
+ FieldTypes["TIME"] = "time";
367
+ FieldTypes["DATETIME"] = "datetime";
368
+ FieldTypes["FILE"] = "file";
369
+ FieldTypes["PASSWORD"] = "password";
370
+ FieldTypes["EMAIL"] = "email";
371
+ FieldTypes["NUMBER"] = "number";
372
+ FieldTypes["TEL"] = "tel";
373
+ FieldTypes["URL"] = "url";
374
+ FieldTypes["SEARCH"] = "search";
375
+ // MONTH = 'month',
376
+ // WEEK = 'week',
377
+ // HIDDEN = 'hidden',
378
+ // COLOR = 'color',
379
+ // RANGE = 'range',
380
+ // CURRENCY = 'currency',
381
+ // PERCENT = 'percent',
382
+ })(FieldTypes || (FieldTypes = {}));
383
+
384
+ var InputType;
385
+ (function (InputType) {
386
+ InputType["TEXT"] = "text";
387
+ InputType["PASSWORD"] = "password";
388
+ InputType["EMAIL"] = "email";
389
+ InputType["NUMBER"] = "number";
390
+ InputType["TEL"] = "tel";
391
+ InputType["URL"] = "url";
392
+ InputType["SEARCH"] = "search";
393
+ InputType["DATE"] = "date";
394
+ InputType["TIME"] = "time";
395
+ InputType["DATETIME"] = "datetime-local";
396
+ InputType["MONTH"] = "month";
397
+ InputType["WEEK"] = "week";
398
+ InputType["FILE"] = "file";
399
+ InputType["TEXTAREA"] = "textarea";
400
+ })(InputType || (InputType = {}));
401
+
402
+ var TextInput = React.forwardRef(function MyInput(_a, ref) {
403
+ var _b = _a.type, type = _b === void 0 ? InputType.TEXT : _b, required = _a.required, className = _a.className, onChange = _a.onChange, placeholder = _a.placeholder, icon = _a.icon, disabled = _a.disabled, rest = __rest(_a, ["type", "required", "className", "onChange", "placeholder", "icon", "disabled"]);
404
+ React.useEffect(function () {
405
+ if (typeof window !== 'undefined') {
406
+ // eslint-disable-next-line global-require
407
+ require('date-input-polyfill');
408
+ }
409
+ }, []);
410
+ var format = 'dd/mm/yyyy';
411
+ var placeholderSet = type === 'date' ? format.toUpperCase() : placeholder;
412
+ if (type === InputType.TEXTAREA) {
413
+ return (jsx("div", { "data-testid": "TextInput", className: "relative", children: jsx("textarea", __assign({ ref: ref, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, rows: 4, className: cx('form-item text-input resize-none', className) }, rest)) }));
414
+ }
415
+ return (jsxs("div", { "data-testid": "TextInput", className: "relative", children: [icon && (jsx("div", { className: "form-icon absolute inset-y-0 start-3 flex items-center ps-3.5 pointer-events-none", children: jsx(Icon, { name: icon }) })), jsx("input", __assign({ ref: ref, type: type, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, className: cx('form-item text-input', { 'pl-12': icon }, className) }, rest))] }));
416
+ });
417
+ TextInput.displayName = 'TextInput';
418
+
419
+ var Checkbox = React.forwardRef(function MyInput(_a, ref) {
420
+ var id = _a.id, label = _a.label, required = _a.required, className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["id", "label", "required", "className", "disabled"]);
421
+ return (jsxs("div", { "data-testid": "Checkbox", className: cx('flex items-center', className), children: [jsxs("div", __assign({ className: "relative bg-none w-5 h-5 flex justify-center items-center", "aria-label": label, id: id, ref: ref }, rest, { children: [jsx("input", __assign({ id: id, ref: ref, disabled: disabled, type: "checkbox", className: "form-item checkbox m-0 appearance-none peer h-full w-full shrink-0 focus:ring-2", required: required }, rest)), jsx("span", { className: "absolute transition-opacity opacity-0 pointer-events-none peer-checked:opacity-100 w-full h-full flex items-center justify-center top-0 left-0", children: jsx(Icon, { name: "mdi:check-bold", size: 12 }) })] })), label && (jsx("label", { className: "label pl-2 leading-none", htmlFor: id, children: label }))] }));
422
+ });
423
+ Checkbox.displayName = 'Checkbox';
424
+
425
+ var Label = function (_a) {
426
+ var label = _a.label, id = _a.id;
427
+ return (jsx("label", { "data-testid": "Label", className: "label mb-1", htmlFor: id, children: label }));
428
+ };
429
+ Label.displayName = 'Label';
430
+
431
+ var FormSelect = function (_a) {
432
+ var id = _a.id, name = _a.name, options = _a.options, required = _a.required, className = _a.className, disabled = _a.disabled;
433
+ return (jsx("div", { id: id, className: cx('pb-2', className), children: jsxs("div", { className: "relative", children: [jsx("select", { id: id, name: name, disabled: disabled, required: required, className: "form-item text-input", children: options.map(function (option) { return (jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value)); }) }), jsx("div", { className: "form-icon absolute inset-0 z-10 pointer-events-none h-full w-12 items-center justify-center top-0 right-0 left-auto flex", children: jsx(Icon, { name: "mdi:chevron-down", size: 24, className: "pointer-events-none" }) })] }) }));
434
+ };
435
+ FormSelect.displayName = 'FormSelect';
436
+
437
+ var Radio = React.forwardRef(function MyInput(_a, ref) {
438
+ var id = _a.id, name = _a.name, label = _a.label, required = _a.required, className = _a.className, options = _a.options, rest = __rest(_a, ["id", "name", "label", "required", "className", "options"]);
439
+ return (jsx("div", { "data-testid": "Radio", className: cx('flex items-center', className), children: jsx("div", __assign({ className: cx('flex flex-col gap-2', className), "aria-label": label, id: id, ref: ref }, rest, { children: options === null || options === void 0 ? void 0 : options.map(function (option) { return (jsxs("div", { className: "flex items-center relative", children: [jsxs("div", { className: "relative flex items-center", children: [jsx("input", { id: option.value, name: name, type: "radio", required: required, className: "form-item radio peer appearance-none m-0 p-0 w-4 h-4" }), jsx("div", { className: "form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none", children: jsx(Icon, { name: "mdi:circle", size: 12 }) })] }), jsx("label", { className: "label pl-2 leading-none", htmlFor: option.value, children: option.label })] }, option.value)); }) })) }));
440
+ });
441
+ Radio.displayName = 'Radio';
442
+
443
+ var Switch = React.forwardRef(function MyInput(_a, ref) {
444
+ var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, rest = __rest(_a, ["id", "name", "required", "disabled", "className"]);
445
+ return (jsxs("label", { "data-testid": "Switch", className: cx('inline-flex items-center cursor-pointer', className), children: [jsx("input", __assign({ ref: ref, id: id, name: name, type: "checkbox", value: "", className: "sr-only peer", disabled: disabled, required: required }, rest)), jsx("div", { className: "form-item switch peer-focus:ring-info dark:peer-focus:ring-info relative w-11 h-6 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[1px] after:start-[1px] after:bg-white after:border after:rounded-full after:h-5 after:w-5 after:transition-all transition-all" })] }));
446
+ });
447
+ Switch.displayName = 'Switch';
448
+
449
+ var FileUpload = React.forwardRef(function MyInput(_a, ref) {
450
+ var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, rest = __rest(_a, ["id", "name", "required", "disabled", "className"]);
451
+ return (jsx("div", { "data-testid": "FileUpload", className: className, children: jsx("input", __assign({ ref: ref, className: cx('form-item text-input file-upload p-0 relative m-0 min-w-0 flex-auto appearance-none block box-border bg-clip-padding file:p-3 file:cursor-pointer file:mr-3 file:overflow-hidden cursor-pointer file:border-0 file:rounded-none file:border-solid file:border-inherit file:transition file:duration-150 file:ease-in-out file:[border-inline-end-width:1px] file:[margin-inline-end:0.75rem] '), "aria-describedby": "file_input_help", type: "file", disabled: disabled, required: required, name: name, id: id }, rest)) }));
452
+ });
453
+ FileUpload.displayName = 'FileUpload';
454
+
455
+ var FormField = function (_a) {
456
+ var name = _a.name, type = _a.type, label = _a.label, required = _a.required, className = _a.className, icon = _a.icon, options = _a.options, disabled = _a.disabled, description = _a.description, showPasswordLabel = _a.showPasswordLabel, hidePasswordLabel = _a.hidePasswordLabel;
457
+ var _b = useForm(), control = _b.control, register = _b.register;
458
+ var _c = React.useState(false), passwordShowStatus = _c[0], setPasswordShow = _c[1];
459
+ var renderType = function (type, field) {
460
+ switch (type) {
461
+ case FieldTypes.TEXT:
462
+ return (jsx(TextInput, __assign({ type: InputType.TEXT, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
463
+ case FieldTypes.PASSWORD: {
464
+ var toggleType = passwordShowStatus ? InputType.TEXT : InputType.PASSWORD;
465
+ var btnClass = 'appearance-none border-none bg-transparent flex items-center';
466
+ return (jsxs("div", { className: "relative", children: [jsx("span", { className: "absolute right-0 top-0 flex items-center justify-center h-full z-10 pr-2", onClick: function () { return setPasswordShow(function (pS) { return !pS; }); }, role: "button", tabIndex: 0, children: passwordShowStatus ? (jsx("button", { type: "button", "aria-label": hidePasswordLabel, className: cx(btnClass, 'form-icon'), children: jsx(Icon, { name: "mdi:eye-off", size: 24 }) })) : (jsx("button", { type: "button", "aria-label": showPasswordLabel, className: cx(btnClass, 'form-icon'), children: jsx(Icon, { name: "mdi:eye", size: 24 }) })) }), jsx(TextInput, __assign({ type: toggleType, required: required, icon: icon, className: className, disabled: disabled }, field, register(name)))] }));
467
+ }
468
+ case FieldTypes.TEXTAREA:
469
+ return (jsx(TextInput, __assign({ type: InputType.TEXTAREA, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
470
+ case FieldTypes.EMAIL:
471
+ return (jsx(TextInput, __assign({ type: InputType.EMAIL, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
472
+ case FieldTypes.DATE:
473
+ return (jsx(TextInput, __assign({ type: InputType.DATE, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
474
+ case FieldTypes.DATETIME:
475
+ return (jsx(TextInput, __assign({ type: InputType.DATETIME, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
476
+ case FieldTypes.NUMBER:
477
+ return (jsx(TextInput, __assign({ type: InputType.NUMBER, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
478
+ case FieldTypes.CHECKBOX:
479
+ return (jsx(Checkbox, __assign({ required: required, id: name, className: className, label: label, disabled: disabled }, field, register(name))));
480
+ case FieldTypes.RADIO:
481
+ return (jsx(Radio, __assign({ required: required, id: name, className: className, label: label, options: options, disabled: disabled }, field, register(name))));
482
+ case FieldTypes.SWITCH:
483
+ return jsx(Switch, __assign({ required: required, className: className, disabled: disabled }, field, register(name)));
484
+ case FieldTypes.SELECT:
485
+ return (jsx(FormSelect, __assign({ required: required, id: name, className: className, disabled: disabled, label: label, options: options }, field, register(name))));
486
+ case FieldTypes.FILE:
487
+ return (jsx(FileUpload, __assign({ required: required, id: name, className: className, disabled: disabled }, field, register(name))));
488
+ default:
489
+ return (jsx(TextInput, __assign({ type: InputType.TEXT, required: required, disabled: disabled, icon: icon, className: className }, field, register(name))));
490
+ }
491
+ };
492
+ // TODO: HELPER CLASSES : data-[invalid=true]:bg-error data-[valid]:bg-success
493
+ var showLabel = label && type !== FieldTypes.CHECKBOX;
494
+ return (jsx("div", { className: "relative", children: jsxs("div", { "data-testid": "FormField", className: "mb-4", children: [showLabel && (jsx("div", { className: "flex items-baseline justify-between", children: jsx(Label, { label: label, id: name }) })), jsx(Controller, { name: "checkbox", control: control, rules: { required: true }, render: function (_a) {
495
+ var field = _a.field;
496
+ return renderType(type, field);
497
+ } }), description && jsx(Copy, { size: SIZE$1.SMALL, children: description })] }) }));
498
+ };
499
+ FormField.displayName = 'FormField';
500
+
501
+ export { Blockquote, Button, Container, ContentPageLayout, ContentRowsLayout, Copy, Form, FormField, Heading, Hr, Icon, Image, Link, List, ListItem, Loader, Notice };
package/dist/index.js CHANGED
@@ -3,6 +3,8 @@
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var cx = require('classnames');
5
5
  var react = require('@iconify/react');
6
+ var reactHookForm = require('react-hook-form');
7
+ var React = require('react');
6
8
 
7
9
  var Blockquote = function (_a) {
8
10
  var text = _a.text, citation = _a.citation, className = _a.className, citationAttribute = _a.citationAttribute, _b = _a.showIcon, showIcon = _b === void 0 ? true : _b;
@@ -58,7 +60,7 @@ var Button = function (_a) {
58
60
  icon: 'w-6 h-6',
59
61
  },
60
62
  };
61
- var classes = cx('font-bold flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded', { 'text-white border-primary hover:bg-primary-darker hover:border-primary-darker': variant === 'primary' }, { 'text-white border-secondary hover:bg-secondary-darker hover:border-secondary-darker': variant === 'secondary' }, { 'text-black border-tertiary hover:bg-tertiary-darker hover:border-tertiary-darker': variant === 'tertiary' }, { 'bg-primary': variant === 'primary' && !outline }, { 'bg-secondary': variant === 'secondary' && !outline }, { 'bg-tertiary': variant === 'tertiary' && !outline }, { 'bg-transparent': outline }, { shadow: raised }, { uppercase: uppercase }, { 'auto-cols-auto grid-cols-2 gap-2': icon || external }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, "".concat(sizes[size].y, " ").concat(sizes[size].x, " ").concat(sizes[size].text), className);
63
+ var classes = cx('font-bold flex items-center transition-all duration-200 transform active:scale-95 justify-around border-solid border rounded cursor-pointer focus:outline-none', { 'text-white border-primary hover:bg-primary-darker hover:border-primary-darker': variant === 'primary' }, { 'text-white border-secondary hover:bg-secondary-darker hover:border-secondary-darker': variant === 'secondary' }, { 'text-black border-tertiary hover:bg-tertiary-darker hover:border-tertiary-darker': variant === 'tertiary' }, { 'bg-primary': variant === 'primary' && !outline }, { 'bg-secondary': variant === 'secondary' && !outline }, { 'bg-tertiary': variant === 'tertiary' && !outline }, { 'bg-transparent': outline }, { shadow: raised }, { uppercase: uppercase }, { 'auto-cols-auto grid-cols-2 gap-2': icon || external }, { 'rounded-full': rounded }, { 'flex-row-reverse': iconFirst }, "".concat(sizes[size].y, " ").concat(sizes[size].x, " ").concat(sizes[size].text), className);
62
64
  var iconClasses = cx(sizes[size].icon);
63
65
  return (jsxRuntime.jsx("button", { id: id, "data-testid": testID || id || 'Button', onClick: onClick, className: classes, type: type, disabled: disabled, "aria-label": ariaLabel, role: "button", children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, icon && !external && (jsxRuntime.jsx("span", { className: "flex items-center", children: jsxRuntime.jsx(react.Icon, { icon: icon, className: iconClasses }) })), external && (jsxRuntime.jsx("span", { className: "flex items-center", children: jsxRuntime.jsx(react.Icon, { icon: "carbon:launch", className: iconClasses }) }))] }) }));
64
66
  };
@@ -164,11 +166,12 @@ Heading.displayName = 'Heading';
164
166
  * List of supported icons can be found at https://icon-sets.iconify.design.
165
167
  */
166
168
  var Icon = function (_a) {
167
- var name = _a.name, _b = _a.size, size = _b === void 0 ? 24 : _b, color = _a.color, id = _a.id, testID = _a.testID;
169
+ var name = _a.name, _b = _a.size, size = _b === void 0 ? 24 : _b, color = _a.color, id = _a.id, className = _a.className, testID = _a.testID;
170
+ console.log('Icon name', name, color);
168
171
  if (color) {
169
- return jsxRuntime.jsx(react.Icon, { "data-testid": testID || id || "Icon", icon: name, width: size, height: size, color: color });
172
+ return (jsxRuntime.jsx(react.Icon, { "data-testid": testID || id || 'Icon', icon: name, width: size, height: size, color: color, className: className, fill: color || 'currentColor' }));
170
173
  }
171
- return jsxRuntime.jsx(react.Icon, { "data-testid": testID || id || "Icon", icon: name, width: size, height: size, className: cx('fill-current') });
174
+ return (jsxRuntime.jsx(react.Icon, { "data-testid": testID || id || 'Icon', icon: name, width: size, height: size }));
172
175
  };
173
176
  Icon.displayName = 'Icon';
174
177
 
@@ -248,9 +251,9 @@ var Notice = function (_a) {
248
251
  Notice.displayName = 'Notice';
249
252
 
250
253
  var Loader = function (_a) {
251
- var _b = _a.size, size = _b === void 0 ? 8 : _b;
254
+ var color = _a.color, _b = _a.size, size = _b === void 0 ? 8 : _b, _c = _a.thickness, thickness = _c === void 0 ? 4 : _c;
252
255
  var sizeClass = size ? "w-".concat(size, " h-").concat(size) : 'w-8 h-8';
253
- return (jsxRuntime.jsx("div", { "data-testid": "Loader", children: jsxRuntime.jsxs("div", { role: "status", children: [jsxRuntime.jsxs("svg", { className: "animate-spin -ml-1 mr-3 ".concat(sizeClass, " text-white"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntime.jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })] }) }));
256
+ return (jsxRuntime.jsx("div", { "data-testid": "Loader", children: jsxRuntime.jsxs("div", { role: "status", children: [jsxRuntime.jsxs("svg", { className: "animate-spin -ml-1 mr-3 ".concat(sizeClass, " text-white"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: color || 'currentColor', strokeWidth: thickness }), jsxRuntime.jsx("path", { className: "opacity-75", fill: color || 'currentColor', d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }), jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })] }) }));
254
257
  };
255
258
  Loader.displayName = 'Loader';
256
259
 
@@ -297,12 +300,214 @@ var ContentRowsLayout = function (_a) {
297
300
  };
298
301
  ContentRowsLayout.displayName = 'ContentRowsLayout';
299
302
 
303
+ var Form = function (_a) {
304
+ var children = _a.children, className = _a.className, submit = _a.submit, onSubmit = _a.onSubmit, hideSubmit = _a.hideSubmit, ariaSubmitLabel = _a.ariaSubmitLabel, submitID = _a.submitID, initialValues = _a.initialValues, _b = _a.submitVariant, submitVariant = _b === void 0 ? BTN_VARIANTS.PRIMARY : _b;
305
+ var _c = reactHookForm.useForm({
306
+ defaultValues: initialValues,
307
+ }), handleSubmit = _c.handleSubmit, formState = _c.formState;
308
+ var submitClasses = cx({ 'sr-only': hideSubmit });
309
+ console.log('FORM formState', formState);
310
+ return (jsxRuntime.jsx("div", { "data-testid": "Form", className: "w-full max-w-s @form @containers", children: jsxRuntime.jsxs("form", { onSubmit: handleSubmit(onSubmit), className: cx('form px-8 pt-6 pb-8 mb-4 w-2xs', className), children: [children, jsxRuntime.jsx("div", { className: 'flex items-center justify-end py-2', children: jsxRuntime.jsx(Button, { id: submitID || submit, className: submitClasses, ariaLabel: ariaSubmitLabel || submit || 'Submit', type: BTN_TYPES.SUBMIT, variant: submitVariant, children: submit }) })] }) }));
311
+ };
312
+ Form.displayName = 'Form';
313
+
314
+ /******************************************************************************
315
+ Copyright (c) Microsoft Corporation.
316
+
317
+ Permission to use, copy, modify, and/or distribute this software for any
318
+ purpose with or without fee is hereby granted.
319
+
320
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
321
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
322
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
323
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
324
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
325
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
326
+ PERFORMANCE OF THIS SOFTWARE.
327
+ ***************************************************************************** */
328
+ /* global Reflect, Promise, SuppressedError, Symbol */
329
+
330
+
331
+ var __assign = function() {
332
+ __assign = Object.assign || function __assign(t) {
333
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
334
+ s = arguments[i];
335
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
336
+ }
337
+ return t;
338
+ };
339
+ return __assign.apply(this, arguments);
340
+ };
341
+
342
+ function __rest(s, e) {
343
+ var t = {};
344
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
345
+ t[p] = s[p];
346
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
347
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
348
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
349
+ t[p[i]] = s[p[i]];
350
+ }
351
+ return t;
352
+ }
353
+
354
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
355
+ var e = new Error(message);
356
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
357
+ };
358
+
359
+ var FieldTypes;
360
+ (function (FieldTypes) {
361
+ FieldTypes["TEXT"] = "text";
362
+ FieldTypes["TEXTAREA"] = "textarea";
363
+ FieldTypes["SELECT"] = "select";
364
+ FieldTypes["CHECKBOX"] = "checkbox";
365
+ FieldTypes["RADIO"] = "radio";
366
+ FieldTypes["SWITCH"] = "switch";
367
+ FieldTypes["DATE"] = "date";
368
+ FieldTypes["TIME"] = "time";
369
+ FieldTypes["DATETIME"] = "datetime";
370
+ FieldTypes["FILE"] = "file";
371
+ FieldTypes["PASSWORD"] = "password";
372
+ FieldTypes["EMAIL"] = "email";
373
+ FieldTypes["NUMBER"] = "number";
374
+ FieldTypes["TEL"] = "tel";
375
+ FieldTypes["URL"] = "url";
376
+ FieldTypes["SEARCH"] = "search";
377
+ // MONTH = 'month',
378
+ // WEEK = 'week',
379
+ // HIDDEN = 'hidden',
380
+ // COLOR = 'color',
381
+ // RANGE = 'range',
382
+ // CURRENCY = 'currency',
383
+ // PERCENT = 'percent',
384
+ })(FieldTypes || (FieldTypes = {}));
385
+
386
+ var InputType;
387
+ (function (InputType) {
388
+ InputType["TEXT"] = "text";
389
+ InputType["PASSWORD"] = "password";
390
+ InputType["EMAIL"] = "email";
391
+ InputType["NUMBER"] = "number";
392
+ InputType["TEL"] = "tel";
393
+ InputType["URL"] = "url";
394
+ InputType["SEARCH"] = "search";
395
+ InputType["DATE"] = "date";
396
+ InputType["TIME"] = "time";
397
+ InputType["DATETIME"] = "datetime-local";
398
+ InputType["MONTH"] = "month";
399
+ InputType["WEEK"] = "week";
400
+ InputType["FILE"] = "file";
401
+ InputType["TEXTAREA"] = "textarea";
402
+ })(InputType || (InputType = {}));
403
+
404
+ var TextInput = React.forwardRef(function MyInput(_a, ref) {
405
+ var _b = _a.type, type = _b === void 0 ? InputType.TEXT : _b, required = _a.required, className = _a.className, onChange = _a.onChange, placeholder = _a.placeholder, icon = _a.icon, disabled = _a.disabled, rest = __rest(_a, ["type", "required", "className", "onChange", "placeholder", "icon", "disabled"]);
406
+ React.useEffect(function () {
407
+ if (typeof window !== 'undefined') {
408
+ // eslint-disable-next-line global-require
409
+ require('date-input-polyfill');
410
+ }
411
+ }, []);
412
+ var format = 'dd/mm/yyyy';
413
+ var placeholderSet = type === 'date' ? format.toUpperCase() : placeholder;
414
+ if (type === InputType.TEXTAREA) {
415
+ return (jsxRuntime.jsx("div", { "data-testid": "TextInput", className: "relative", children: jsxRuntime.jsx("textarea", __assign({ ref: ref, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, rows: 4, className: cx('form-item text-input resize-none', className) }, rest)) }));
416
+ }
417
+ return (jsxRuntime.jsxs("div", { "data-testid": "TextInput", className: "relative", children: [icon && (jsxRuntime.jsx("div", { className: "form-icon absolute inset-y-0 start-3 flex items-center ps-3.5 pointer-events-none", children: jsxRuntime.jsx(Icon, { name: icon }) })), jsxRuntime.jsx("input", __assign({ ref: ref, type: type, required: required, "aria-required": required, disabled: disabled, placeholder: placeholderSet, onChange: onChange, className: cx('form-item text-input', { 'pl-12': icon }, className) }, rest))] }));
418
+ });
419
+ TextInput.displayName = 'TextInput';
420
+
421
+ var Checkbox = React.forwardRef(function MyInput(_a, ref) {
422
+ var id = _a.id, label = _a.label, required = _a.required, className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["id", "label", "required", "className", "disabled"]);
423
+ return (jsxRuntime.jsxs("div", { "data-testid": "Checkbox", className: cx('flex items-center', className), children: [jsxRuntime.jsxs("div", __assign({ className: "relative bg-none w-5 h-5 flex justify-center items-center", "aria-label": label, id: id, ref: ref }, rest, { children: [jsxRuntime.jsx("input", __assign({ id: id, ref: ref, disabled: disabled, type: "checkbox", className: "form-item checkbox m-0 appearance-none peer h-full w-full shrink-0 focus:ring-2", required: required }, rest)), jsxRuntime.jsx("span", { className: "absolute transition-opacity opacity-0 pointer-events-none peer-checked:opacity-100 w-full h-full flex items-center justify-center top-0 left-0", children: jsxRuntime.jsx(Icon, { name: "mdi:check-bold", size: 12 }) })] })), label && (jsxRuntime.jsx("label", { className: "label pl-2 leading-none", htmlFor: id, children: label }))] }));
424
+ });
425
+ Checkbox.displayName = 'Checkbox';
426
+
427
+ var Label = function (_a) {
428
+ var label = _a.label, id = _a.id;
429
+ return (jsxRuntime.jsx("label", { "data-testid": "Label", className: "label mb-1", htmlFor: id, children: label }));
430
+ };
431
+ Label.displayName = 'Label';
432
+
433
+ var FormSelect = function (_a) {
434
+ var id = _a.id, name = _a.name, options = _a.options, required = _a.required, className = _a.className, disabled = _a.disabled;
435
+ return (jsxRuntime.jsx("div", { id: id, className: cx('pb-2', className), children: jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx("select", { id: id, name: name, disabled: disabled, required: required, className: "form-item text-input", children: options.map(function (option) { return (jsxRuntime.jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value)); }) }), jsxRuntime.jsx("div", { className: "form-icon absolute inset-0 z-10 pointer-events-none h-full w-12 items-center justify-center top-0 right-0 left-auto flex", children: jsxRuntime.jsx(Icon, { name: "mdi:chevron-down", size: 24, className: "pointer-events-none" }) })] }) }));
436
+ };
437
+ FormSelect.displayName = 'FormSelect';
438
+
439
+ var Radio = React.forwardRef(function MyInput(_a, ref) {
440
+ var id = _a.id, name = _a.name, label = _a.label, required = _a.required, className = _a.className, options = _a.options, rest = __rest(_a, ["id", "name", "label", "required", "className", "options"]);
441
+ return (jsxRuntime.jsx("div", { "data-testid": "Radio", className: cx('flex items-center', className), children: jsxRuntime.jsx("div", __assign({ className: cx('flex flex-col gap-2', className), "aria-label": label, id: id, ref: ref }, rest, { children: options === null || options === void 0 ? void 0 : options.map(function (option) { return (jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [jsxRuntime.jsx("input", { id: option.value, name: name, type: "radio", required: required, className: "form-item radio peer appearance-none m-0 p-0 w-4 h-4" }), jsxRuntime.jsx("div", { className: "form-icon opacity-0 peer-checked:opacity-100 absolute w-4 h-4 flex items-center justify-center top-0 left-0 pointer-events-none", children: jsxRuntime.jsx(Icon, { name: "mdi:circle", size: 12 }) })] }), jsxRuntime.jsx("label", { className: "label pl-2 leading-none", htmlFor: option.value, children: option.label })] }, option.value)); }) })) }));
442
+ });
443
+ Radio.displayName = 'Radio';
444
+
445
+ var Switch = React.forwardRef(function MyInput(_a, ref) {
446
+ var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, rest = __rest(_a, ["id", "name", "required", "disabled", "className"]);
447
+ return (jsxRuntime.jsxs("label", { "data-testid": "Switch", className: cx('inline-flex items-center cursor-pointer', className), children: [jsxRuntime.jsx("input", __assign({ ref: ref, id: id, name: name, type: "checkbox", value: "", className: "sr-only peer", disabled: disabled, required: required }, rest)), jsxRuntime.jsx("div", { className: "form-item switch peer-focus:ring-info dark:peer-focus:ring-info relative w-11 h-6 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[1px] after:start-[1px] after:bg-white after:border after:rounded-full after:h-5 after:w-5 after:transition-all transition-all" })] }));
448
+ });
449
+ Switch.displayName = 'Switch';
450
+
451
+ var FileUpload = React.forwardRef(function MyInput(_a, ref) {
452
+ var id = _a.id, name = _a.name, required = _a.required, disabled = _a.disabled, className = _a.className, rest = __rest(_a, ["id", "name", "required", "disabled", "className"]);
453
+ return (jsxRuntime.jsx("div", { "data-testid": "FileUpload", className: className, children: jsxRuntime.jsx("input", __assign({ ref: ref, className: cx('form-item text-input file-upload p-0 relative m-0 min-w-0 flex-auto appearance-none block box-border bg-clip-padding file:p-3 file:cursor-pointer file:mr-3 file:overflow-hidden cursor-pointer file:border-0 file:rounded-none file:border-solid file:border-inherit file:transition file:duration-150 file:ease-in-out file:[border-inline-end-width:1px] file:[margin-inline-end:0.75rem] '), "aria-describedby": "file_input_help", type: "file", disabled: disabled, required: required, name: name, id: id }, rest)) }));
454
+ });
455
+ FileUpload.displayName = 'FileUpload';
456
+
457
+ var FormField = function (_a) {
458
+ var name = _a.name, type = _a.type, label = _a.label, required = _a.required, className = _a.className, icon = _a.icon, options = _a.options, disabled = _a.disabled, description = _a.description, showPasswordLabel = _a.showPasswordLabel, hidePasswordLabel = _a.hidePasswordLabel;
459
+ var _b = reactHookForm.useForm(), control = _b.control, register = _b.register;
460
+ var _c = React.useState(false), passwordShowStatus = _c[0], setPasswordShow = _c[1];
461
+ var renderType = function (type, field) {
462
+ switch (type) {
463
+ case FieldTypes.TEXT:
464
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.TEXT, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
465
+ case FieldTypes.PASSWORD: {
466
+ var toggleType = passwordShowStatus ? InputType.TEXT : InputType.PASSWORD;
467
+ var btnClass = 'appearance-none border-none bg-transparent flex items-center';
468
+ return (jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx("span", { className: "absolute right-0 top-0 flex items-center justify-center h-full z-10 pr-2", onClick: function () { return setPasswordShow(function (pS) { return !pS; }); }, role: "button", tabIndex: 0, children: passwordShowStatus ? (jsxRuntime.jsx("button", { type: "button", "aria-label": hidePasswordLabel, className: cx(btnClass, 'form-icon'), children: jsxRuntime.jsx(Icon, { name: "mdi:eye-off", size: 24 }) })) : (jsxRuntime.jsx("button", { type: "button", "aria-label": showPasswordLabel, className: cx(btnClass, 'form-icon'), children: jsxRuntime.jsx(Icon, { name: "mdi:eye", size: 24 }) })) }), jsxRuntime.jsx(TextInput, __assign({ type: toggleType, required: required, icon: icon, className: className, disabled: disabled }, field, register(name)))] }));
469
+ }
470
+ case FieldTypes.TEXTAREA:
471
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.TEXTAREA, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
472
+ case FieldTypes.EMAIL:
473
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.EMAIL, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
474
+ case FieldTypes.DATE:
475
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.DATE, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
476
+ case FieldTypes.DATETIME:
477
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.DATETIME, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
478
+ case FieldTypes.NUMBER:
479
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.NUMBER, required: required, icon: icon, className: className, disabled: disabled }, field, register(name))));
480
+ case FieldTypes.CHECKBOX:
481
+ return (jsxRuntime.jsx(Checkbox, __assign({ required: required, id: name, className: className, label: label, disabled: disabled }, field, register(name))));
482
+ case FieldTypes.RADIO:
483
+ return (jsxRuntime.jsx(Radio, __assign({ required: required, id: name, className: className, label: label, options: options, disabled: disabled }, field, register(name))));
484
+ case FieldTypes.SWITCH:
485
+ return jsxRuntime.jsx(Switch, __assign({ required: required, className: className, disabled: disabled }, field, register(name)));
486
+ case FieldTypes.SELECT:
487
+ return (jsxRuntime.jsx(FormSelect, __assign({ required: required, id: name, className: className, disabled: disabled, label: label, options: options }, field, register(name))));
488
+ case FieldTypes.FILE:
489
+ return (jsxRuntime.jsx(FileUpload, __assign({ required: required, id: name, className: className, disabled: disabled }, field, register(name))));
490
+ default:
491
+ return (jsxRuntime.jsx(TextInput, __assign({ type: InputType.TEXT, required: required, disabled: disabled, icon: icon, className: className }, field, register(name))));
492
+ }
493
+ };
494
+ // TODO: HELPER CLASSES : data-[invalid=true]:bg-error data-[valid]:bg-success
495
+ var showLabel = label && type !== FieldTypes.CHECKBOX;
496
+ return (jsxRuntime.jsx("div", { className: "relative", children: jsxRuntime.jsxs("div", { "data-testid": "FormField", className: "mb-4", children: [showLabel && (jsxRuntime.jsx("div", { className: "flex items-baseline justify-between", children: jsxRuntime.jsx(Label, { label: label, id: name }) })), jsxRuntime.jsx(reactHookForm.Controller, { name: "checkbox", control: control, rules: { required: true }, render: function (_a) {
497
+ var field = _a.field;
498
+ return renderType(type, field);
499
+ } }), description && jsxRuntime.jsx(Copy, { size: SIZE$1.SMALL, children: description })] }) }));
500
+ };
501
+ FormField.displayName = 'FormField';
502
+
300
503
  exports.Blockquote = Blockquote;
301
504
  exports.Button = Button;
302
505
  exports.Container = Container;
303
506
  exports.ContentPageLayout = ContentPageLayout;
304
507
  exports.ContentRowsLayout = ContentRowsLayout;
305
508
  exports.Copy = Copy;
509
+ exports.Form = Form;
510
+ exports.FormField = FormField;
306
511
  exports.Heading = Heading;
307
512
  exports.Hr = Hr;
308
513
  exports.Icon = Icon;
@@ -16,12 +16,12 @@ export declare enum BTN_SIZES {
16
16
  }
17
17
  export interface Props {
18
18
  variant?: BTN_VARIANTS;
19
- size: BTN_SIZES;
19
+ size?: BTN_SIZES;
20
20
  uppercase?: boolean;
21
21
  children: React.ReactNode;
22
22
  type?: BTN_TYPES;
23
23
  disabled?: boolean;
24
- ariaLabel: string;
24
+ ariaLabel?: string;
25
25
  onClick?: MouseEventHandler<HTMLButtonElement>;
26
26
  icon?: string;
27
27
  external?: boolean;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { Props } from './Checkbox.types';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
4
+ export default Checkbox;
5
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Checkbox from '.';
3
+ declare const meta: Meta<typeof Checkbox>;
4
+ type Story = StoryObj<typeof Checkbox>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1,12 @@
1
+ export declare enum Size {
2
+ SMALL = "small",
3
+ MEDIUM = "medium",
4
+ LARGE = "large"
5
+ }
6
+ export interface Props {
7
+ id: string;
8
+ label?: string;
9
+ required?: boolean;
10
+ className?: string;
11
+ disabled?: boolean;
12
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Checkbox';
@@ -35,7 +35,7 @@ export interface Props {
35
35
  contextual?: CONTEXTUAL;
36
36
  inverted?: boolean;
37
37
  maxLength?: boolean;
38
- as: TAG;
38
+ as?: TAG;
39
39
  id?: string;
40
40
  testID?: string;
41
41
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { Props } from './FileUpload.types';
3
+ declare const FileUpload: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
4
+ export default FileUpload;
5
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import FileUpload from '.';
3
+ declare const meta: Meta<typeof FileUpload>;
4
+ type Story = StoryObj<typeof FileUpload>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1,7 @@
1
+ export interface Props {
2
+ id: string;
3
+ name: string;
4
+ disabled?: boolean;
5
+ required?: boolean;
6
+ className?: string;
7
+ }
@@ -0,0 +1 @@
1
+ export { default } from './FileUpload';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Props } from './Form.types';
3
3
  declare const Form: {
4
- ({ children, className, noValidate, submit, onSubmit, hideSubmit, ariaSubmitLabel, submitID, }: Props): React.ReactElement;
4
+ ({ children, className, submit, onSubmit, hideSubmit, ariaSubmitLabel, submitID, initialValues, submitVariant, }: Props): React.ReactElement;
5
5
  displayName: string;
6
6
  };
7
7
  export default Form;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { BTN_VARIANTS } from "../Button/Button.types";
2
3
  export interface Props {
3
4
  /** The form inputs and content. */
4
5
  children: React.ReactNode;
@@ -11,11 +12,16 @@ export interface Props {
11
12
  [k: string]: FormDataEntryValue;
12
13
  }) => void;
13
14
  /** The label for the submit button. */
14
- submit: string;
15
+ submit?: string;
15
16
  /** Hide submit button. */
16
17
  hideSubmit?: boolean;
17
18
  /** The aria-label attribute value for the submit button. */
18
19
  ariaSubmitLabel?: string;
19
20
  /** Unique form submit button id. */
20
21
  submitID?: string;
22
+ /** Initial form values. */
23
+ initialValues?: {
24
+ [k: string]: FormDataEntryValue;
25
+ };
26
+ submitVariant?: BTN_VARIANTS;
21
27
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Props } from './FormField.types';
3
3
  declare const FormField: {
4
- ({ name, type, className, label, required, ...rest }: Props): React.ReactElement;
4
+ ({ name, type, label, required, className, icon, options, disabled, description, showPasswordLabel, hidePasswordLabel, }: Props): React.ReactElement;
5
5
  displayName: string;
6
6
  };
7
7
  export default FormField;
@@ -22,4 +22,13 @@ export interface Props {
22
22
  className?: string;
23
23
  label?: string;
24
24
  required?: boolean;
25
+ icon?: string;
26
+ options?: {
27
+ value: string;
28
+ label: string;
29
+ }[];
30
+ disabled?: boolean;
31
+ description?: string;
32
+ showPasswordLabel?: string;
33
+ hidePasswordLabel?: string;
25
34
  }
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Props } from './FormSelect.types';
3
- declare const FormSelect: ({ id, name, options, required, className, iconColor, label, itemIcon, selectIconDown, selectIconUp, }: Props) => React.ReactElement;
3
+ declare const FormSelect: {
4
+ ({ id, name, options, required, className, disabled }: Props): React.ReactElement;
5
+ displayName: string;
6
+ };
4
7
  export default FormSelect;
8
+ export type { Props };
@@ -7,12 +7,12 @@ type OptionsType = {
7
7
  disabled?: boolean;
8
8
  };
9
9
  export interface Props {
10
- /** The select visible default label value. */
11
- label?: string;
12
10
  /** The selected option's value. */
13
11
  options: Array<OptionsType>;
14
12
  /** Unique id for the field, required for a11y. */
15
13
  id: string;
14
+ /** The select visible default label value. */
15
+ label?: string;
16
16
  /** Is field required. */
17
17
  required?: boolean;
18
18
  /** Additional classes. */
@@ -24,11 +24,13 @@ export interface Props {
24
24
  /** Additional wrapper CSS classes. */
25
25
  wrapperStyles?: string;
26
26
  /** Select Up Icon. */
27
- selectIconUp: string;
27
+ selectIconUp?: string;
28
28
  /** Select Down Icon. */
29
- selectIconDown: string;
29
+ selectIconDown?: string;
30
30
  /** Select Form Item Name. */
31
31
  name?: string;
32
+ /** Is field disabled. */
33
+ disabled?: boolean;
32
34
  }
33
35
  export interface ItemProps {
34
36
  children: React.ReactNode;
@@ -4,7 +4,7 @@ import { Props } from './Icon.types';
4
4
  * List of supported icons can be found at https://icon-sets.iconify.design.
5
5
  */
6
6
  declare const Icon: {
7
- ({ name, size, color, id, testID }: Props): React.ReactElement;
7
+ ({ name, size, color, id, className, testID }: Props): React.ReactElement;
8
8
  displayName: string;
9
9
  };
10
10
  export default Icon;
@@ -1,7 +1,8 @@
1
1
  export interface Props {
2
2
  name: string;
3
- size: number;
3
+ size?: number;
4
4
  color?: string;
5
5
  id?: string;
6
6
  testID?: string;
7
+ className?: string;
7
8
  }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Props } from './Label.types';
3
+ declare const Label: {
4
+ ({ label, id }: Props): React.ReactElement;
5
+ displayName: string;
6
+ };
7
+ export default Label;
8
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Label from '.';
3
+ declare const meta: Meta<typeof Label>;
4
+ type Story = StoryObj<typeof Label>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface Props {
2
+ label: string;
3
+ id: string;
4
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Label';
@@ -1,6 +1,6 @@
1
1
  import { Props } from './Loader.types';
2
2
  declare const Loader: {
3
- ({ size }: Props): React.ReactElement;
3
+ ({ color, size, thickness }: Props): React.ReactElement;
4
4
  displayName: string;
5
5
  };
6
6
  export default Loader;
@@ -1,4 +1,5 @@
1
1
  export interface Props {
2
2
  color?: string;
3
3
  size?: number;
4
+ thickness?: number;
4
5
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { Props } from './Radio.types';
3
+ declare const Radio: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
4
+ export default Radio;
5
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Radio from '.';
3
+ declare const meta: Meta<typeof Radio>;
4
+ type Story = StoryObj<typeof Radio>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export interface Props {
2
+ id: string;
3
+ name: string;
4
+ icon?: string;
5
+ label?: string;
6
+ required?: boolean;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ options?: {
10
+ value: string;
11
+ label: string;
12
+ }[];
13
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Radio';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { Props } from './Switch.types';
3
+ declare const Switch: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
4
+ export default Switch;
5
+ export type { Props };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Switch from '.';
3
+ declare const meta: Meta<typeof Switch>;
4
+ type Story = StoryObj<typeof Switch>;
5
+ export declare const Default: Story;
6
+ export default meta;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface Props {
2
+ id: string;
3
+ name: string;
4
+ disabled?: boolean;
5
+ required?: boolean;
6
+ className?: string;
7
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Switch';
@@ -9,7 +9,7 @@ export declare enum InputType {
9
9
  SEARCH = "search",
10
10
  DATE = "date",
11
11
  TIME = "time",
12
- DATETIME_LOCAL = "datetime-local",
12
+ DATETIME = "datetime-local",
13
13
  MONTH = "month",
14
14
  WEEK = "week",
15
15
  FILE = "file",
@@ -17,7 +17,7 @@ export declare enum InputType {
17
17
  }
18
18
  export interface Props {
19
19
  /** Input type. */
20
- type: InputType;
20
+ type?: InputType;
21
21
  /** Specify if input is required. */
22
22
  required?: boolean;
23
23
  /** Custom style attributes. */
@@ -28,4 +28,8 @@ export interface Props {
28
28
  placeholder?: string;
29
29
  /** Input name attribute. */
30
30
  name?: string;
31
+ /** Input icon value. */
32
+ icon?: string;
33
+ /** Input status. */
34
+ disabled?: boolean;
31
35
  }
@@ -13,3 +13,5 @@ export { default as Loader } from './Loader';
13
13
  export { default as Container } from './Container';
14
14
  export { default as ContentPageLayout } from './ContentPageLayout';
15
15
  export { default as ContentRowsLayout } from './ContentRowsLayout';
16
+ export { default as Form } from './Form';
17
+ export { default as FormField } from './FormField';
@@ -0,0 +1 @@
1
+ export default function useTheme(): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4alldigital/foundation-ui--gamma",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "description": "Foundation UI Component library with GAMMA theme. ",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -24,7 +24,7 @@
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },
27
- "gitHead": "07799f8e3c5c4ff651953516dc903d493073a2a9",
27
+ "gitHead": "e9c4a28d509b941a55be49820670259e870b3b19",
28
28
  "dependencies": {
29
29
  "@headlessui/react": "^1.7.8",
30
30
  "@heroicons/react": "^2.0.14",