@arthurzakharov/ui-kit 1.0.6 → 1.0.8

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 (140) hide show
  1. package/dist/assets/button-Bg4CwXVJ.css +1 -0
  2. package/dist/assets/card-image-DQ9c4G_r.css +1 -0
  3. package/dist/assets/card-text-fgHu9TyO.css +1 -0
  4. package/dist/assets/checkbox-C8mg6gvd.css +1 -0
  5. package/dist/assets/dropdown-Ba3Wegqm.css +1 -0
  6. package/dist/assets/header-CvDToxgv.css +1 -0
  7. package/dist/assets/input-3QR47UJ8.css +1 -0
  8. package/dist/assets/label-CCZNUUQp.css +1 -0
  9. package/dist/assets/main-BgL82qFL.css +1 -0
  10. package/dist/assets/radio-BkD7BKk0.css +1 -0
  11. package/dist/assets/radio-text-DIB67n3r.css +1 -0
  12. package/dist/assets/text-Dt0DeN-I.css +1 -0
  13. package/dist/assets/textarea-86fWKmQJ.css +1 -0
  14. package/dist/components/certifications/certifications.component.d.ts +5 -1
  15. package/dist/components/control/components/box/box.component.d.ts +9 -1
  16. package/dist/components/control/components/box/box.component.js +13 -13
  17. package/dist/components/control/components/button/button.component.d.ts +12 -1
  18. package/dist/components/control/components/button/button.component.js +28 -28
  19. package/dist/components/control/components/card-image/card-image.component.d.ts +6 -1
  20. package/dist/components/control/components/card-image/card-image.component.js +57 -5
  21. package/dist/components/control/components/card-text/card-text.component.d.ts +5 -1
  22. package/dist/components/control/components/card-text/card-text.component.js +45 -5
  23. package/dist/components/control/components/checkbox/checkbox.component.d.ts +5 -1
  24. package/dist/components/control/components/checkbox/checkbox.component.js +49 -5
  25. package/dist/components/control/components/choice/choice.component.d.ts +8 -1
  26. package/dist/components/control/components/dropdown/dropdown.component.d.ts +14 -1
  27. package/dist/components/control/components/dropdown/dropdown.component.js +95 -9
  28. package/dist/components/control/components/hidden-input/hidden-input.component.d.ts +11 -1
  29. package/dist/components/control/components/hidden-input/hidden-input.component.js +14 -15
  30. package/dist/components/control/components/input/input.component.d.ts +7 -1
  31. package/dist/components/control/components/input/input.component.js +27 -27
  32. package/dist/components/control/components/label/label.component.d.ts +6 -1
  33. package/dist/components/control/components/label/label.component.js +12 -12
  34. package/dist/components/control/components/radio/radio.component.d.ts +6 -1
  35. package/dist/components/control/components/radio/radio.component.js +54 -5
  36. package/dist/components/control/components/radio-label/radio-label.component.d.ts +16 -2
  37. package/dist/components/control/components/radio-text/radio-text.component.d.ts +6 -1
  38. package/dist/components/control/components/radio-text/radio-text.component.js +1 -1
  39. package/dist/components/control/components/text/text.component.d.ts +6 -1
  40. package/dist/components/control/components/text/text.component.js +47 -5
  41. package/dist/components/control/components/textarea/textarea.component.d.ts +8 -1
  42. package/dist/components/control/components/textarea/textarea.component.js +34 -4
  43. package/dist/components/control/control.component.d.ts +17 -0
  44. package/dist/components/control/control.component.js +35 -0
  45. package/dist/components/header/header.component.d.ts +12 -0
  46. package/dist/components/header/header.component.js +45 -0
  47. package/dist/main.d.ts +2 -2
  48. package/dist/main.js +2 -2
  49. package/dist/utils/converter/converter.d.ts +2 -1
  50. package/package.json +12 -4
  51. package/dist/assets/button-XGvsKGqH.css +0 -1
  52. package/dist/assets/index-CqamBlbE.css +0 -1
  53. package/dist/assets/input-DTN-3ZET.css +0 -1
  54. package/dist/assets/label-DF2VBeUr.css +0 -1
  55. package/dist/assets/main-C0tWHTEq.css +0 -1
  56. package/dist/assets/radio-text-DAsITkgm.css +0 -1
  57. package/dist/components/certifications/certifications.types.d.ts +0 -5
  58. package/dist/components/certifications/certifications.types.js +0 -1
  59. package/dist/components/certifications/index.d.ts +0 -1
  60. package/dist/components/certifications/index.js +0 -4
  61. package/dist/components/control/components/box/box.types.d.ts +0 -9
  62. package/dist/components/control/components/box/box.types.js +0 -1
  63. package/dist/components/control/components/box/index.d.ts +0 -1
  64. package/dist/components/control/components/box/index.js +0 -4
  65. package/dist/components/control/components/button/button.types.d.ts +0 -16
  66. package/dist/components/control/components/button/button.types.js +0 -1
  67. package/dist/components/control/components/button/index.d.ts +0 -1
  68. package/dist/components/control/components/button/index.js +0 -4
  69. package/dist/components/control/components/card-image/card-image.types.d.ts +0 -6
  70. package/dist/components/control/components/card-image/card-image.types.js +0 -1
  71. package/dist/components/control/components/card-image/index.d.ts +0 -1
  72. package/dist/components/control/components/card-image/index.js +0 -4
  73. package/dist/components/control/components/card-text/card-text.types.d.ts +0 -5
  74. package/dist/components/control/components/card-text/card-text.types.js +0 -1
  75. package/dist/components/control/components/card-text/index.d.ts +0 -1
  76. package/dist/components/control/components/card-text/index.js +0 -4
  77. package/dist/components/control/components/checkbox/checkbox.types.d.ts +0 -5
  78. package/dist/components/control/components/checkbox/checkbox.types.js +0 -1
  79. package/dist/components/control/components/checkbox/index.d.ts +0 -1
  80. package/dist/components/control/components/checkbox/index.js +0 -4
  81. package/dist/components/control/components/choice/choice.types.d.ts +0 -8
  82. package/dist/components/control/components/choice/choice.types.js +0 -1
  83. package/dist/components/control/components/choice/index.d.ts +0 -1
  84. package/dist/components/control/components/choice/index.js +0 -4
  85. package/dist/components/control/components/dropdown/dropdown.types.d.ts +0 -14
  86. package/dist/components/control/components/dropdown/dropdown.types.js +0 -1
  87. package/dist/components/control/components/dropdown/index.d.ts +0 -1
  88. package/dist/components/control/components/dropdown/index.js +0 -4
  89. package/dist/components/control/components/hidden-input/hidden-input.types.d.ts +0 -11
  90. package/dist/components/control/components/hidden-input/hidden-input.types.js +0 -1
  91. package/dist/components/control/components/hidden-input/index.d.ts +0 -1
  92. package/dist/components/control/components/hidden-input/index.js +0 -4
  93. package/dist/components/control/components/input/index.d.ts +0 -1
  94. package/dist/components/control/components/input/index.js +0 -4
  95. package/dist/components/control/components/input/input.types.d.ts +0 -7
  96. package/dist/components/control/components/input/input.types.js +0 -1
  97. package/dist/components/control/components/label/index.d.ts +0 -1
  98. package/dist/components/control/components/label/index.js +0 -4
  99. package/dist/components/control/components/label/label.types.d.ts +0 -8
  100. package/dist/components/control/components/label/label.types.js +0 -1
  101. package/dist/components/control/components/radio/index.d.ts +0 -1
  102. package/dist/components/control/components/radio/index.js +0 -4
  103. package/dist/components/control/components/radio/radio.types.d.ts +0 -6
  104. package/dist/components/control/components/radio/radio.types.js +0 -1
  105. package/dist/components/control/components/radio-label/index.d.ts +0 -1
  106. package/dist/components/control/components/radio-label/index.js +0 -4
  107. package/dist/components/control/components/radio-label/radio-label.types.d.ts +0 -17
  108. package/dist/components/control/components/radio-label/radio-label.types.js +0 -1
  109. package/dist/components/control/components/radio-text/index.d.ts +0 -1
  110. package/dist/components/control/components/radio-text/index.js +0 -4
  111. package/dist/components/control/components/radio-text/radio-text.types.d.ts +0 -6
  112. package/dist/components/control/components/radio-text/radio-text.types.js +0 -1
  113. package/dist/components/control/components/text/index.d.ts +0 -1
  114. package/dist/components/control/components/text/index.js +0 -4
  115. package/dist/components/control/components/text/text.types.d.ts +0 -6
  116. package/dist/components/control/components/text/text.types.js +0 -1
  117. package/dist/components/control/components/textarea/index.d.ts +0 -1
  118. package/dist/components/control/components/textarea/index.js +0 -4
  119. package/dist/components/control/components/textarea/textarea.types.d.ts +0 -8
  120. package/dist/components/control/components/textarea/textarea.types.js +0 -1
  121. package/dist/components/control/hooks/index.d.ts +0 -1
  122. package/dist/components/control/hooks/index.js +0 -4
  123. package/dist/components/control/hooks/useChoice/index.d.ts +0 -1
  124. package/dist/components/control/hooks/useChoice/index.js +0 -4
  125. package/dist/components/control/index.d.ts +0 -17
  126. package/dist/components/control/index.js +0 -12
  127. package/dist/components/control/types.js +0 -1
  128. package/dist/components/control/utils/index.d.ts +0 -1
  129. package/dist/components/control/utils/index.js +0 -6
  130. package/dist/enums.d.ts +0 -14
  131. package/dist/enums.js +0 -4
  132. package/dist/index-DtupH5zG.js +0 -405
  133. package/dist/types.d.ts +0 -3
  134. package/dist/types.js +0 -1
  135. package/dist/utils/converter/index.d.ts +0 -1
  136. package/dist/utils/converter/index.js +0 -4
  137. package/dist/utils/index.d.ts +0 -2
  138. package/dist/utils/index.js +0 -6
  139. package/dist/utils/time/index.d.ts +0 -1
  140. package/dist/utils/time/index.js +0 -4
@@ -0,0 +1 @@
1
+ ._Button_1npja_1{box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center}._ButtonSizeSm_1npja_10{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._ButtonSizeSm_1npja_10 ._ButtonText_1npja_15{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._ButtonSizeMd_1npja_21,._ButtonSizeLg_1npja_22{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-md)}._ButtonSizeMd_1npja_21 ._ButtonText_1npja_15{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._ButtonSizeLg_1npja_22 ._ButtonText_1npja_15{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._ButtonColorNext_1npja_37{background-color:var(--rm-ui-next-btn-bg)}._ButtonColorNext_1npja_37 ._ButtonText_1npja_15{color:#fff}._ButtonColorPrevious_1npja_45{background-color:transparent}._ButtonColorPrevious_1npja_45 ._ButtonText_1npja_15{color:var(--rm-ui-color-text-secondary)}._Button_1npja_1:hover{cursor:pointer}._Button_1npja_1:focus{outline-color:var(--rm-ui-color-focus)}._ButtonFullWidth_1npja_61{width:100%}._ButtonText_1npja_15{font-family:var(--rm-ui-font-family-medium),sans-serif}._ButtonInfo_1npja_69{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px);color:#fff}
@@ -0,0 +1 @@
1
+ ._CardImage_dw1xq_1{--font-size: 12px;--line-height: 14px;--img-size: 110px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--rm-ui-padding-xs)}._CardImageContent_dw1xq_13{width:135px;height:130px;padding:6px;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch}._CardImageContent_dw1xq_13:hover{cursor:pointer}._CardImageTop_dw1xq_27{position:relative;flex-grow:1}._CardImageWrap_dw1xq_32{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--img-size);height:var(--img-size);background-repeat:no-repeat;background-size:700%}._CardImageBottom_dw1xq_43{flex-basis:calc(var(--line-height) * 2);display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center;gap:var(--rm-ui-padding-xs)}
@@ -0,0 +1 @@
1
+ ._CardText_1eht8_1{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--rm-ui-padding-sm)}._CardTextLabel_1eht8_9{position:relative;padding:var(--rm-ui-padding-md) var(--rm-ui-padding-sm);flex-basis:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._CardTextLabel_1eht8_9:hover{cursor:pointer}._CardTextChoice_1eht8_24{display:flex;flex-direction:row;align-items:center;justify-content:center}
@@ -0,0 +1 @@
1
+ ._Checkbox_1gskb_1{position:relative;display:inline-flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._Checkbox_1gskb_1:hover{cursor:pointer}._CheckboxChoice_1gskb_14{position:relative;left:0;top:3px}._CheckboxContent_1gskb_20{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-text-primary)}._CheckboxContent_1gskb_20 button{background-color:transparent;border:none;padding:0;font-family:inherit;font-size:inherit;line-height:inherit;color:var(--rm-ui-color-action)}._CheckboxContent_1gskb_20 button:hover{cursor:pointer;text-decoration:underline}
@@ -0,0 +1 @@
1
+ ._Dropdown_cmvnx_1{--transition-time: .2s;--under-chevron: linear-gradient(90deg, rgba(255, 255, 255, 0) -10%, rgba(255, 255, 255, .5411764706) 25%, #fff 50%);--border-radius: 3px;position:relative;font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-text-primary);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xxs)}._DropdownBorder_cmvnx_17{position:relative;min-height:60px;flex-grow:1;display:flex;align-items:center;justify-content:flex-start;padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);overflow:hidden}._DropdownContent_cmvnx_28{display:flex;flex-direction:column;align-items:flex-start;justify-content:center}._DropdownBorder_cmvnx_17:hover{cursor:pointer}._DropdownChevron_cmvnx_39{width:24px;height:24px;transition:transform var(--transition-time) ease-out}._DropdownChevron_cmvnx_39[data-open=false]{transform:rotate(0)}._DropdownChevron_cmvnx_39[data-open=true]{transform:rotate(180deg)}._DropdownChevronWrap_cmvnx_53{position:absolute;z-index:1;right:0;top:50%;transform:translateY(-50%);background:var(--under-chevron);border-radius:10px;width:80px;height:100%;padding-right:var(--rm-ui-padding-sm);display:flex;justify-content:flex-end;align-items:center}._DropdownBox_cmvnx_69{flex-grow:1;border-radius:10px;background-color:var(--rm-ui-grey-50)}._DropdownBoxVisible_cmvnx_75{display:block}._DropdownBoxHidden_cmvnx_79{display:none}._DropdownSearch_cmvnx_83{position:relative;border-bottom:1px var(--rm-ui-grey-300) solid;padding:var(--rm-ui-padding-sm)}._DropdownSearchVisible_cmvnx_89{display:block}._DropdownSearchHidden_cmvnx_93{display:none}._DropdownClose_cmvnx_97{border-top:1px var(--rm-ui-grey-300) solid;padding:var(--rm-ui-padding-sm);display:flex;flex-direction:row;align-items:center;justify-content:flex-end}._DropdownInput_cmvnx_106{width:100%;border-radius:10px;padding:var(--rm-ui-padding-xs) calc(var(--rm-ui-padding-sm) * 2 + 12px) var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);border:1px var(--rm-ui-grey-300) solid;box-sizing:border-box;font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary);outline-color:var(--rm-ui-color-accent-primary)}._DropdownGlass_cmvnx_120{position:absolute;z-index:1;right:calc(var(--rm-ui-padding-sm) * 2);top:50%;transform:translateY(-50%);width:24px;height:24px;color:var(--rm-ui-grey-300)}._DropdownChoices_cmvnx_131{list-style:none;margin:0;padding:0;max-height:228px;overflow-y:scroll;border-radius:10px}._DropdownChoice_cmvnx_131{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-sm);padding:6px var(--rm-ui-padding-sm)}._DropdownChoice_cmvnx_131:hover{cursor:pointer;background-color:#fff}._DropdownChoiceNoResult_cmvnx_154{color:var(--rm-ui-grey-600);text-align:center}html[dir=rtl] ._DropdownGlass_cmvnx_120{left:31px;right:initial}html[dir=rtl] ._DropdownChevronWrap_cmvnx_53{left:19px;right:initial}
@@ -0,0 +1 @@
1
+ ._Header_2g7zf_1{display:flex;flex-direction:row;align-items:center;justify-content:space-between}._HeaderInfo_2g7zf_8{display:flex;flex-direction:column;align-items:flex-end;gap:2px}._HeaderLogo_2g7zf_15{height:var(--rm-ui-header-logo-height);pointer-events:none}._HeaderLogoPlaceholder_2g7zf_20{display:flex;width:var(--rm-ui-header-logo-height);height:var(--rm-ui-header-logo-height)}._HeaderPhoneButton_2g7zf_26{padding:0;border:none;background-color:transparent;display:flex;flex-direction:row;align-items:center;gap:var(--rm-ui-padding-xs);outline-offset:2px;outline-color:var(--rm-ui-color-focus)}._HeaderPhoneButtonIcon_2g7zf_38{width:22px;height:22px;stroke:var(--rm-ui-color-theme-primary);stroke-width:3px}._HeaderPhoneButtonNumber_2g7zf_45,._HeaderDescriptions_2g7zf_46{display:none}@media screen and (min-width:768px){._HeaderPhoneButtonNumber_2g7zf_45{display:flex;font-family:var(--rm-ui-font-family-bold),sans-serif;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);letter-spacing:.1px;color:var(--rm-ui-color-theme-primary)}._HeaderDescriptions_2g7zf_46{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xxs);font-family:var(--rm-ui-font-family-light),sans-serif;font-size:var( --rm-ui-font-size-body-extra-small);line-height:var( --rm-ui-line-height-body-extra-small);color:var(--rm-ui-color-theme-primary)}._HeaderDescriptionsIcon_2g7zf_72{stroke:var(--rm-ui-color-theme-primary);stroke-width:3px}._HeaderDescriptionsIconSm_2g7zf_77{width:10px;height:10px}._HeaderDescriptionsIconMd_2g7zf_82{width:12px;height:12px}}
@@ -0,0 +1 @@
1
+ ._Input_1ldi1_1{outline:none;box-sizing:border-box;width:100%;border:none;padding:0;font-family:var(--rm-ui-font-family-medium),sans-serif;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Input_1ldi1_1:hover{cursor:pointer}._Input_1ldi1_1:disabled{opacity:.33}._Input_1ldi1_1:disabled,._Input_1ldi1_1:-webkit-autofill,._Input_1ldi1_1:-webkit-autofill:hover,._Input_1ldi1_1:-webkit-autofill:focus,._Input_1ldi1_1:-webkit-autofill:active,._Input_1ldi1_1:autofill,._Input_1ldi1_1:autofill:hover,._Input_1ldi1_1:autofill:focus,._Input_1ldi1_1:autofill:active{background:transparent;transition:background 7200s ease-in-out 0s}._Input_1ldi1_1:-webkit-autofill{animation-name:_autofill-start_1ldi1_1;animation-duration:.1s;-webkit-text-fill-color:var(--rm-ui-color-text-primary)}._Input_1ldi1_1:not(:-webkit-autofill){animation-name:_autofill-cancel_1ldi1_1;animation-duration:.1s}@keyframes _autofill-start_1ldi1_1{}@keyframes _autofill-cancel_1ldi1_1{}
@@ -0,0 +1 @@
1
+ ._Label_1vr4d_1{font-family:var(--rm-ui-font-family-regular),sans-serif;transition:color .15s ease-out}._LabelPositionIdle_1vr4d_6{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._LabelPositionActive_1vr4d_11{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._LabelStateIdle_1vr4d_16{color:var(--rm-ui-color-text-secondary)}._LabelStateError_1vr4d_20{color:var(--rm-ui-color-error)}._LabelStateSuccess_1vr4d_24{color:var(--rm-ui-color-success)}
@@ -0,0 +1 @@
1
+ :root{--rm-ui-padding-xxs: 4px;--rm-ui-padding-xs: 8px;--rm-ui-padding-sm: 12px;--rm-ui-padding-md: 16px;--rm-ui-padding-lg: 24px;--rm-ui-padding-xl: 32px;--rm-ui-padding-xxl: 40px;--rm-ui-padding-xxxl: 48px;--rm-ui-border-radius-sm: 8px;--rm-ui-border-radius-md: 12px;--rm-ui-border-radius-lg: 16px;--rm-ui-border-radius-xl: 24px;--rm-ui-font-size-body-extra-small: 12px;--rm-ui-line-height-body-extra-small: 16px;--rm-ui-font-size-body-small: 14px;--rm-ui-line-height-body-small: 20px;--rm-ui-font-size-body: 16px;--rm-ui-line-height-body: 24px;--rm-ui-font-size-body-large: 20px;--rm-ui-line-height-body-large: 30px;--rm-ui-font-size-hl5: 14px;--rm-ui-line-height-hl5: 22px;--rm-ui-font-size-hl4: 18px;--rm-ui-line-height-hl4: 24px;--rm-ui-font-size-hl3: 20px;--rm-ui-line-height-hl3: 30px;--rm-ui-font-size-hl2: 24px;--rm-ui-line-height-hl2: 32px;--rm-ui-font-size-hl1: 28px;--rm-ui-line-height-hl1: 36px;--rm-ui-font-family-light: "Lato Light", sans-serif;--rm-ui-font-family-light-i: "Lato Light Italic", sans-serif;--rm-ui-font-family-regular: "Lato Regular", sans-serif;--rm-ui-font-family-regular-i: "Lato Regular Italic", sans-serif;--rm-ui-font-family-medium: "Lato Bold", sans-serif;--rm-ui-font-family-medium-i: "Lato Bold Italic", sans-serif;--rm-ui-font-family-bold: "Lato Black", sans-serif;--rm-ui-font-family-bold-i: "Lato Black Italic", sans-serif;--rm-ui-grey-950: #0a0a0a;--rm-ui-grey-900: #171717;--rm-ui-grey-800: #262626;--rm-ui-grey-700: #404040;--rm-ui-grey-600: #525252;--rm-ui-grey-500: #737373;--rm-ui-grey-400: #a3a3a3;--rm-ui-grey-300: #d4d4d4;--rm-ui-grey-200: #e5e5e5;--rm-ui-grey-100: #f5f5f5;--rm-ui-grey-50: #fafafa;--rm-ui-color-text-primary: var(--rm-ui-grey-800);--rm-ui-color-text-secondary: var(--rm-ui-grey-500);--rm-ui-color-accent-primary: #23bf96;--rm-ui-color-accent-secondary: #23bf96;--rm-ui-color-theme-primary: #302677;--rm-ui-color-theme-secondary: #302677;--rm-ui-color-action: #006cff;--rm-ui-color-inverted: #ffffff;--rm-ui-color-error: #dc2626;--rm-ui-color-success: #00b649;--rm-ui-color-focus: #ff8d02;--rm-ui-color-link: #ff8206;--rm-ui-certifications-color: #b1b4c7;--rm-ui-certifications-size: 20px;--rm-ui-card-background: #ffffff;--rm-ui-next-btn-bg: #23bf96;--rm-ui-next-btn-bg-hover: #3adbb1;--rm-ui-header-logo-height: 30px}
@@ -0,0 +1 @@
1
+ ._Radio_1wc8m_1{display:inline-flex}._RadioOrientationHorizontal_1wc8m_5{flex-direction:row;gap:var(--rm-ui-padding-lg)}._RadioOrientationVertical_1wc8m_10{flex-direction:column;gap:var(--rm-ui-padding-xxs)}._RadioLabel_1wc8m_15{position:relative;display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._RadioLabel_1wc8m_15:hover{cursor:pointer}
@@ -0,0 +1 @@
1
+ ._RadioText_9i5dh_1{position:relative;display:flex;align-items:center;justify-content:center}._RadioTextSizeMd_9i5dh_8{font-size:12px;line-height:14px}._RadioTextSizeLg_9i5dh_13{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._RadioTextOneLine_9i5dh_18,._RadioTextOneLine_9i5dh_18 ._RadioTextContent_9i5dh_19{white-space:nowrap}._RadioTextContent_9i5dh_19{display:flex;align-items:center;justify-content:flex-start;color:var(--rm-ui-color-text-primary);text-align:left;white-space:pre-wrap}._RadioTextContent_9i5dh_19[data-checked=false]{font-family:var(--rm-ui-font-family-regular),sans-serif}._RadioTextContent_9i5dh_19[data-checked=true]{font-family:var(--rm-ui-font-family-medium),sans-serif}
@@ -0,0 +1 @@
1
+ ._Text_1ble1_1{box-sizing:border-box;position:relative;flex-grow:1;height:58px;padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);display:flex;flex-direction:row;justify-content:stretch;align-items:flex-end}._Text_1ble1_1:hover{cursor:pointer}._TextLabel_1ble1_17{position:absolute;left:var(--rm-ui-padding-sm);transition:top .15s ease-out}._TextLabelIdle_1ble1_23{top:50%;transform:translateY(-50%)}._TextLabelActive_1ble1_28{top:var(--rm-ui-padding-xs);transform:translateY(0)}
@@ -0,0 +1 @@
1
+ ._Textarea_e95r3_1{resize:none;outline:none;box-sizing:border-box;width:100%;border:none;border-radius:10px;padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm);font-family:var(--rm-ui-font-family-medium),sans-serif;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Textarea_e95r3_1:hover{cursor:pointer}._Textarea_e95r3_1:disabled{opacity:.33}._Textarea_e95r3_1:disabled,._Textarea_e95r3_1:-webkit-autofill,._Textarea_e95r3_1:-webkit-autofill:hover,._Textarea_e95r3_1:-webkit-autofill:focus,._Textarea_e95r3_1:-webkit-autofill:active,._Textarea_e95r3_1:autofill,._Textarea_e95r3_1:autofill:hover,._Textarea_e95r3_1:autofill:focus,._Textarea_e95r3_1:autofill:active{background:transparent;transition:background 7200s ease-in-out 0s}._Textarea_e95r3_1:-webkit-autofill{animation-name:_autofill-start_e95r3_1;animation-duration:.1s;-webkit-text-fill-color:var(--rm-ui-grey-500)}._Textarea_e95r3_1:not(:-webkit-autofill){animation-name:_autofill-cancel_e95r3_1;animation-duration:.1s}@keyframes _autofill-start_e95r3_1{}@keyframes _autofill-cancel_e95r3_1{}
@@ -1,2 +1,6 @@
1
- import { CertificationsProps } from './certifications.types';
1
+ type CertificationIcon = 'free' | 'gdpr' | 'ssl';
2
+ type CertificationsProps = Readonly<{
3
+ icons?: CertificationIcon[];
4
+ }>;
2
5
  export declare const Certifications: ({ icons }: CertificationsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,2 +1,10 @@
1
- import { BoxProps } from './box.types';
1
+ import { State } from '../../types';
2
+ import { PropsWithChildren } from 'react';
3
+ export interface BoxProps extends PropsWithChildren {
4
+ state?: State;
5
+ focused?: boolean;
6
+ checked?: boolean;
7
+ className?: string;
8
+ onClick?: () => void;
9
+ }
2
10
  export declare const Box: import('react').ForwardRefExoticComponent<BoxProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,32 +1,32 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { forwardRef as _ } from "react";
3
- import S from "clsx";
4
- import '../../../../assets/box-b_yPaNPs.css';const l = "_Box_1tiwz_1", i = "_BoxChecked_1tiwz_15", n = "_BoxStateIdle_1tiwz_21", u = "_BoxFocused_1tiwz_25", m = "_BoxStateError_1tiwz_30", f = "_BoxStateSuccess_1tiwz_34", o = {
5
- Box: l,
6
- BoxChecked: i,
3
+ import l from "clsx";
4
+ import '../../../../assets/box-b_yPaNPs.css';const i = "_Box_1tiwz_1", S = "_BoxChecked_1tiwz_15", n = "_BoxStateIdle_1tiwz_21", u = "_BoxFocused_1tiwz_25", m = "_BoxStateError_1tiwz_30", f = "_BoxStateSuccess_1tiwz_34", o = {
5
+ Box: i,
6
+ BoxChecked: S,
7
7
  BoxStateIdle: n,
8
8
  BoxFocused: u,
9
9
  BoxStateError: m,
10
10
  BoxStateSuccess: f
11
- }, k = _((c, s) => {
12
- const { children: x, className: r, focused: B, checked: a = !1, state: t = "idle", onClick: e } = c;
11
+ }, z = _((e, c) => {
12
+ const { children: s, className: x, focused: r, checked: B = !1, state: t = "idle", onClick: a } = e;
13
13
  return /* @__PURE__ */ d(
14
14
  "div",
15
15
  {
16
16
  "data-testid": "box",
17
- ref: s,
18
- className: S(o.Box, r, {
19
- [o.BoxFocused]: B,
20
- [o.BoxChecked]: a,
17
+ ref: c,
18
+ className: l(o.Box, x, {
19
+ [o.BoxFocused]: r,
20
+ [o.BoxChecked]: B,
21
21
  [o.BoxStateIdle]: t === "idle",
22
22
  [o.BoxStateError]: t === "error",
23
23
  [o.BoxStateSuccess]: t === "success"
24
24
  }),
25
- onClick: () => e == null ? void 0 : e.call(null),
26
- children: x
25
+ onClick: () => a?.call(null),
26
+ children: s
27
27
  }
28
28
  );
29
29
  });
30
30
  export {
31
- k as Box
31
+ z as Box
32
32
  };
@@ -1,2 +1,13 @@
1
- import { ButtonProps } from './button.types';
1
+ import { PropsWithChildren } from 'react';
2
+ export interface ButtonProps extends PropsWithChildren {
3
+ color: 'next' | 'previous';
4
+ size: 'sm' | 'md' | 'lg';
5
+ type: 'submit' | 'reset' | 'button';
6
+ disabled?: boolean;
7
+ info?: string;
8
+ fullWidth?: boolean;
9
+ onClick?: () => void;
10
+ onFocus?: () => void;
11
+ onBlur?: () => void;
12
+ }
2
13
  export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,53 +1,53 @@
1
- import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
- import h from "clsx";
3
- import { containsHtml as m } from "../../utils/utils.js";
4
- import '../../../../assets/button-XGvsKGqH.css';const S = "_Button_hr1uu_1", x = "_ButtonSizeSm_hr1uu_10", z = "_ButtonText_hr1uu_15", f = "_ButtonSizeMd_hr1uu_21", p = "_ButtonSizeLg_hr1uu_22", C = "_ButtonColorNext_hr1uu_37", N = "_ButtonColorPrevious_hr1uu_45", g = "_ButtonFullWidth_hr1uu_61", I = "_ButtonInfo_hr1uu_69", t = {
1
+ import { jsxs as d, jsx as u } from "react/jsx-runtime";
2
+ import m from "clsx";
3
+ import { containsHtml as p } from "../../utils/utils.js";
4
+ import '../../../../assets/button-Bg4CwXVJ.css';const S = "_Button_1npja_1", x = "_ButtonSizeSm_1npja_10", z = "_ButtonText_1npja_15", f = "_ButtonSizeMd_1npja_21", j = "_ButtonSizeLg_1npja_22", C = "_ButtonColorNext_1npja_37", h = "_ButtonColorPrevious_1npja_45", N = "_ButtonFullWidth_1npja_61", g = "_ButtonInfo_1npja_69", t = {
5
5
  Button: S,
6
6
  ButtonSizeSm: x,
7
7
  ButtonText: z,
8
8
  ButtonSizeMd: f,
9
- ButtonSizeLg: p,
9
+ ButtonSizeLg: j,
10
10
  ButtonColorNext: C,
11
- ButtonColorPrevious: N,
12
- ButtonFullWidth: g,
13
- ButtonInfo: I
14
- }, T = (r) => {
11
+ ButtonColorPrevious: h,
12
+ ButtonFullWidth: N,
13
+ ButtonInfo: g
14
+ }, L = (e) => {
15
15
  const {
16
- children: i,
17
- color: B,
16
+ children: s,
17
+ color: l,
18
18
  size: n,
19
- type: _,
20
- disabled: c = !1,
19
+ type: B,
20
+ disabled: i = !1,
21
21
  info: o = "",
22
22
  fullWidth: a = !1,
23
- onClick: u,
24
- onFocus: l,
25
- onBlur: e
26
- } = r;
23
+ onClick: c,
24
+ onFocus: r,
25
+ onBlur: _
26
+ } = e;
27
27
  return /* @__PURE__ */ d(
28
28
  "button",
29
29
  {
30
30
  "data-testid": "button",
31
- type: _,
32
- disabled: c,
33
- className: h(t.Button, {
31
+ type: B,
32
+ disabled: i,
33
+ className: m(t.Button, {
34
34
  [t.ButtonSizeSm]: n === "sm",
35
35
  [t.ButtonSizeMd]: n === "md",
36
36
  [t.ButtonSizeLg]: n === "lg",
37
- [t.ButtonColorNext]: B === "next",
38
- [t.ButtonColorPrevious]: B === "previous",
37
+ [t.ButtonColorNext]: l === "next",
38
+ [t.ButtonColorPrevious]: l === "previous",
39
39
  [t.ButtonFullWidth]: a
40
40
  }),
41
- onClick: () => u == null ? void 0 : u.call(null),
42
- onFocus: () => l == null ? void 0 : l.call(null),
43
- onBlur: () => e == null ? void 0 : e.call(null),
41
+ onClick: () => c?.call(null),
42
+ onFocus: () => r?.call(null),
43
+ onBlur: () => _?.call(null),
44
44
  children: [
45
- /* @__PURE__ */ s("span", { className: t.ButtonText, children: i }),
46
- m(o) && o ? /* @__PURE__ */ s("span", { className: t.ButtonInfo, dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ s("span", { className: t.ButtonInfo, children: o })
45
+ /* @__PURE__ */ u("span", { className: t.ButtonText, children: s }),
46
+ p(o) && o ? /* @__PURE__ */ u("span", { className: t.ButtonInfo, dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ u("span", { className: t.ButtonInfo, children: o })
47
47
  ]
48
48
  }
49
49
  );
50
50
  };
51
51
  export {
52
- T as Button
52
+ L as Button
53
53
  };
@@ -1,2 +1,7 @@
1
- import { CardImageProps } from './card-image.types';
1
+ import { Interactive, RadioChoice, ChoiceValue, State } from '../../types';
2
+ export interface CardImageProps extends Interactive<ChoiceValue> {
3
+ sprite: string;
4
+ choices: RadioChoice[];
5
+ state?: State;
6
+ }
2
7
  export declare const CardImage: (props: CardImageProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,59 @@
1
- import "react/jsx-runtime";
2
- import { c as a } from "../../../../index-DtupH5zG.js";
3
- import "../../hooks/useChoice/useChoice.hook.js";
4
- import "../../utils/utils.js";
1
+ import { jsx as a, jsxs as g } from "react/jsx-runtime";
2
+ import { Box as f } from "../box/box.component.js";
3
+ import { Choice as q } from "../choice/choice.component.js";
4
+ import { HiddenInput as w } from "../hidden-input/hidden-input.component.js";
5
+ import { RadioLabel as B } from "../radio-label/radio-label.component.js";
6
+ import { RadioText as N } from "../radio-text/radio-text.component.js";
7
+ import { useChoice as T } from "../../hooks/useChoice/useChoice.hook.js";
8
+ import { getChoiceId as b } from "../../utils/utils.js";
9
+ import '../../../../assets/card-image-DQ9c4G_r.css';const W = "_CardImage_dw1xq_1", j = "_CardImageContent_dw1xq_13", y = "_CardImageTop_dw1xq_27", R = "_CardImageWrap_dw1xq_32", $ = "_CardImageBottom_dw1xq_43", r = {
10
+ CardImage: W,
11
+ CardImageContent: j,
12
+ CardImageTop: y,
13
+ CardImageWrap: R,
14
+ CardImageBottom: $
15
+ }, J = (l) => {
16
+ const { sprite: I, choices: p, state: c = "idle", id: d, value: t, disabled: n, onChange: _ } = l, { type: i, onChoiceChange: v } = T(t, d, _);
17
+ return /* @__PURE__ */ a("div", { className: r.CardImage, children: p.map((e, h, u) => {
18
+ const m = b(d, e.value, h);
19
+ return /* @__PURE__ */ a(B, { id: m, value: t, state: c, choice: e, choices: u, children: ({ focused: s, hovered: x, checked: o, state: C }) => /* @__PURE__ */ a(f, { state: C, checked: o, focused: s, children: /* @__PURE__ */ g("div", { className: r.CardImageContent, children: [
20
+ /* @__PURE__ */ a(
21
+ w,
22
+ {
23
+ type: i,
24
+ id: m,
25
+ name: d,
26
+ value: e.value,
27
+ checked: o,
28
+ disabled: n,
29
+ onChange: () => v(e.value)
30
+ }
31
+ ),
32
+ /* @__PURE__ */ a("div", { className: r.CardImageTop, children: /* @__PURE__ */ a(
33
+ "div",
34
+ {
35
+ "data-image": e.icon,
36
+ style: { backgroundImage: `url(${I})` },
37
+ className: r.CardImageWrap
38
+ }
39
+ ) }),
40
+ /* @__PURE__ */ g("div", { className: r.CardImageBottom, children: [
41
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
42
+ q,
43
+ {
44
+ type: i,
45
+ state: C,
46
+ checked: o,
47
+ focused: s,
48
+ hovered: x,
49
+ disabled: n
50
+ }
51
+ ) }),
52
+ /* @__PURE__ */ a(N, { size: "md", checked: o, children: e.label })
53
+ ] })
54
+ ] }) }) }, m);
55
+ }) });
56
+ };
5
57
  export {
6
- a as CardImage
58
+ J as CardImage
7
59
  };
@@ -1,2 +1,6 @@
1
- import { CardTextProps } from './card-text.types';
1
+ import { Interactive, RadioChoice, ChoiceValue, State } from '../../types';
2
+ export interface CardTextProps extends Interactive<ChoiceValue> {
3
+ choices: RadioChoice[];
4
+ state?: State;
5
+ }
2
6
  export declare const CardText: (props: CardTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,47 @@
1
- import "react/jsx-runtime";
2
- import { b as i } from "../../../../index-DtupH5zG.js";
3
- import "../../hooks/useChoice/useChoice.hook.js";
4
- import "../../utils/utils.js";
1
+ import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
+ import { Box as b } from "../box/box.component.js";
3
+ import { Choice as g } from "../choice/choice.component.js";
4
+ import { HiddenInput as L } from "../hidden-input/hidden-input.component.js";
5
+ import { RadioLabel as I } from "../radio-label/radio-label.component.js";
6
+ import { RadioText as N } from "../radio-text/radio-text.component.js";
7
+ import { useChoice as j } from "../../hooks/useChoice/useChoice.hook.js";
8
+ import { getChoiceId as R } from "../../utils/utils.js";
9
+ import '../../../../assets/card-text-fgHu9TyO.css';const y = "_CardText_1eht8_1", z = "_CardTextLabel_1eht8_9", B = "_CardTextChoice_1eht8_24", i = {
10
+ CardText: y,
11
+ CardTextLabel: z,
12
+ CardTextChoice: B
13
+ }, J = (m) => {
14
+ const { choices: x, state: c = "idle", id: r, value: d, disabled: n = !1, onChange: h } = m, { type: l, onChoiceChange: T } = j(d, r, h);
15
+ return /* @__PURE__ */ e("div", { className: i.CardText, children: x.map((t, p, _) => {
16
+ const o = R(r, t.value, p);
17
+ return /* @__PURE__ */ e(I, { id: o, value: d, state: c, choice: t, choices: _, children: ({ focused: s, hovered: f, checked: a, state: C }) => /* @__PURE__ */ e(b, { state: C, checked: a, focused: s, children: /* @__PURE__ */ v("div", { className: i.CardTextLabel, children: [
18
+ /* @__PURE__ */ e(
19
+ L,
20
+ {
21
+ type: l,
22
+ id: o,
23
+ name: r,
24
+ value: t.value,
25
+ checked: a,
26
+ disabled: n,
27
+ onChange: (H, u) => T(t.value, u)
28
+ }
29
+ ),
30
+ /* @__PURE__ */ e("div", { className: i.CardTextChoice, children: /* @__PURE__ */ e(
31
+ g,
32
+ {
33
+ type: l,
34
+ state: C,
35
+ checked: a,
36
+ focused: s,
37
+ hovered: f,
38
+ disabled: n
39
+ }
40
+ ) }),
41
+ /* @__PURE__ */ e(N, { size: "lg", checked: a, children: t.label })
42
+ ] }) }) }, o);
43
+ }) });
44
+ };
5
45
  export {
6
- i as CardText
46
+ J as CardText
7
47
  };
@@ -1,2 +1,6 @@
1
- import { CheckboxProps } from './checkbox.types';
1
+ import { PropsWithChildren } from 'react';
2
+ import { Interactive, State } from '../../types';
3
+ export interface CheckboxProps extends PropsWithChildren, Interactive<boolean> {
4
+ state?: State;
5
+ }
2
6
  export declare const Checkbox: (props: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,51 @@
1
- import "react/jsx-runtime";
2
- import "usehooks-ts";
3
- import { C as i } from "../../../../index-DtupH5zG.js";
4
- import "../../../../utils/converter/converter.js";
1
+ import { jsxs as v, jsx as c } from "react/jsx-runtime";
2
+ import { useToggle as a } from "usehooks-ts";
3
+ import { Choice as _ } from "../choice/choice.component.js";
4
+ import { HiddenInput as B } from "../hidden-input/hidden-input.component.js";
5
+ import { Converter as F } from "../../../../utils/converter/converter.js";
6
+ import '../../../../assets/checkbox-C8mg6gvd.css';const I = "_Checkbox_1gskb_1", N = "_CheckboxChoice_1gskb_14", j = "_CheckboxContent_1gskb_20", s = {
7
+ Checkbox: I,
8
+ CheckboxChoice: N,
9
+ CheckboxContent: j
10
+ }, D = (i) => {
11
+ const { children: u, state: k = "idle", id: o, value: n, disabled: e = !1, onChange: l, onFocus: b, onBlur: x } = i, [r, h] = a(!1), [d, C] = a(!1), m = (t) => {
12
+ e || r || (t.preventDefault(), l(!n, o));
13
+ }, p = (t) => {
14
+ e || (t.stopPropagation(), l(!n, o));
15
+ }, f = () => {
16
+ e || (h(), b?.call(null, o));
17
+ }, g = () => {
18
+ e || (h(), x?.call(null, o));
19
+ };
20
+ return /* @__PURE__ */ v(
21
+ "label",
22
+ {
23
+ htmlFor: o,
24
+ className: s.Checkbox,
25
+ onClick: m,
26
+ onFocus: f,
27
+ onBlur: g,
28
+ onMouseEnter: () => C(),
29
+ onMouseLeave: () => C(),
30
+ children: [
31
+ /* @__PURE__ */ c(
32
+ B,
33
+ {
34
+ type: "checkbox",
35
+ id: o,
36
+ name: o,
37
+ value: F.Boolean.ToBooleanString(n),
38
+ checked: n,
39
+ disabled: e,
40
+ onChange: p
41
+ }
42
+ ),
43
+ /* @__PURE__ */ c("div", { className: s.CheckboxChoice, children: /* @__PURE__ */ c(_, { type: "checkbox", state: k, checked: n, focused: r, hovered: d, disabled: e }) }),
44
+ /* @__PURE__ */ c("div", { className: s.CheckboxContent, children: u })
45
+ ]
46
+ }
47
+ );
48
+ };
5
49
  export {
6
- i as Checkbox
50
+ D as Checkbox
7
51
  };
@@ -1,2 +1,9 @@
1
- import { ChoiceProps } from './choice.types';
1
+ export interface ChoiceProps {
2
+ type: 'radio' | 'checkbox';
3
+ checked: boolean;
4
+ state?: 'idle' | 'error' | 'success';
5
+ focused?: boolean;
6
+ hovered?: boolean;
7
+ disabled?: boolean;
8
+ }
2
9
  export declare const Choice: (props: ChoiceProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,15 @@
1
- import { DropdownProps } from './dropdown.types';
1
+ import { QuestionChoice } from '../../types';
2
+ export interface DropdownProps {
3
+ choices: QuestionChoice[];
4
+ value: QuestionChoice[];
5
+ label?: string;
6
+ placeholder?: string;
7
+ noResult?: string;
8
+ isSearchHidden?: boolean;
9
+ multiple?: boolean;
10
+ closeButton?: string;
11
+ onChange: (values: QuestionChoice[]) => void;
12
+ onOpen?: (height: number, width: number) => void;
13
+ onClose?: () => void;
14
+ }
2
15
  export declare const Dropdown: (props: DropdownProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,97 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "usehooks-ts";
4
- import "lucide-react";
5
- import "clsx";
6
- import { D as e } from "../../../../index-DtupH5zG.js";
7
- import "../../utils/utils.js";
8
- import "../../../../utils/converter/converter.js";
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as u, useState as C, useEffect as N, useMemo as K } from "react";
3
+ import { useBoolean as M, useResizeObserver as T, useOnClickOutside as E } from "usehooks-ts";
4
+ import { ChevronDown as $, Search as q } from "lucide-react";
5
+ import R from "clsx";
6
+ import { Box as k } from "../box/box.component.js";
7
+ import { Button as J } from "../button/button.component.js";
8
+ import { Choice as P } from "../choice/choice.component.js";
9
+ import { Label as Q } from "../label/label.component.js";
10
+ import { RadioText as v } from "../radio-text/radio-text.component.js";
11
+ import { clickHasNode as U } from "../../utils/utils.js";
12
+ import { Converter as X } from "../../../../utils/converter/converter.js";
13
+ import '../../../../assets/dropdown-Ba3Wegqm.css';const Y = "_Dropdown_cmvnx_1", Z = "_DropdownBorder_cmvnx_17", oo = "_DropdownContent_cmvnx_28", eo = "_DropdownChevron_cmvnx_39", no = "_DropdownChevronWrap_cmvnx_53", ro = "_DropdownBox_cmvnx_69", co = "_DropdownBoxVisible_cmvnx_75", so = "_DropdownBoxHidden_cmvnx_79", io = "_DropdownSearch_cmvnx_83", lo = "_DropdownSearchVisible_cmvnx_89", to = "_DropdownSearchHidden_cmvnx_93", po = "_DropdownClose_cmvnx_97", ao = "_DropdownInput_cmvnx_106", ho = "_DropdownGlass_cmvnx_120", wo = "_DropdownChoices_cmvnx_131", Do = "_DropdownChoice_cmvnx_131", mo = "_DropdownChoiceNoResult_cmvnx_154", e = {
14
+ Dropdown: Y,
15
+ DropdownBorder: Z,
16
+ DropdownContent: oo,
17
+ DropdownChevron: eo,
18
+ DropdownChevronWrap: no,
19
+ DropdownBox: ro,
20
+ DropdownBoxVisible: co,
21
+ DropdownBoxHidden: so,
22
+ DropdownSearch: io,
23
+ DropdownSearchVisible: lo,
24
+ DropdownSearchHidden: to,
25
+ DropdownClose: po,
26
+ DropdownInput: ao,
27
+ DropdownGlass: ho,
28
+ DropdownChoices: wo,
29
+ DropdownChoice: Do,
30
+ DropdownChoiceNoResult: mo
31
+ }, ko = (c) => {
32
+ const { choices: x = [], value: a = [], isSearchHidden: H = !1, multiple: l = !1, onChange: h, onOpen: z, onClose: V } = c, y = c.label || "", I = c.placeholder || "Wählen Sie Ihre private Krankenversicherung...", O = c.noResult || "Keine Versicherung gefunden.", W = c.closeButton || "Schließen", f = u(null), w = u(null), B = u(null), { value: t, setFalse: D, toggle: A } = M(!1), [m, G] = C(""), [s, L] = C({ width: 0, height: 0 }), [p, S] = C([]);
33
+ T({
34
+ ref: w,
35
+ onResize: (o) => L({ width: o.width || 0, height: o.height || 0 })
36
+ }), E(w, (o) => {
37
+ U(o, f) || (l && h(p), D());
38
+ }), N(() => S(Array.isArray(a) ? a : []), [a]), N(() => {
39
+ t && s.width && s.height ? (B.current?.focus(), z?.call(null, s.height, s.width)) : V?.call(null);
40
+ }, [t, s]);
41
+ const j = (o, d) => {
42
+ S((i) => i.some(({ value: _ }) => _ === o) ? i.filter(({ value: _ }) => _ !== o) : [...i, { value: o, label: d }]);
43
+ }, F = () => {
44
+ D(), h(p);
45
+ }, b = K(
46
+ () => x.filter(({ label: o }) => o.toLowerCase().includes(m.toLowerCase())),
47
+ [m, x]
48
+ );
49
+ return /* @__PURE__ */ r("div", { className: e.Dropdown, children: [
50
+ /* @__PURE__ */ n(k, { ref: f, onClick: A, children: /* @__PURE__ */ r("div", { className: e.DropdownBorder, children: [
51
+ /* @__PURE__ */ r("div", { className: e.DropdownContent, children: [
52
+ /* @__PURE__ */ n(Q, { position: "active", children: y }),
53
+ /* @__PURE__ */ n(v, { size: "lg", checked: !0, oneLine: !0, children: X.Answer.FromArrayToMultiple(p.map(({ label: o }) => o)) || I })
54
+ ] }),
55
+ /* @__PURE__ */ n("div", { className: e.DropdownChevronWrap, children: /* @__PURE__ */ n($, { "data-open": t, className: e.DropdownChevron }) })
56
+ ] }) }),
57
+ /* @__PURE__ */ n(k, { ref: w, className: t ? e.DropdownBoxVisible : e.DropdownBoxHidden, children: /* @__PURE__ */ r("div", { className: e.DropdownBox, children: [
58
+ /* @__PURE__ */ r("div", { className: R(e.DropdownSearch, H ? e.DropdownSearchHidden : e.DropdownSearchVisible), children: [
59
+ /* @__PURE__ */ n(
60
+ "input",
61
+ {
62
+ ref: B,
63
+ value: m,
64
+ type: "text",
65
+ className: e.DropdownInput,
66
+ onChange: (o) => G(o.target.value)
67
+ }
68
+ ),
69
+ /* @__PURE__ */ n(q, { className: e.DropdownGlass })
70
+ ] }),
71
+ /* @__PURE__ */ n("ul", { className: e.DropdownChoices, children: b.length ? b.map(({ value: o, label: d }, i) => /* @__PURE__ */ r(
72
+ "li",
73
+ {
74
+ className: e.DropdownChoice,
75
+ onClick: () => {
76
+ l ? j(o, d) : (D(), h([{ value: o, label: d }]));
77
+ },
78
+ children: [
79
+ l && /* @__PURE__ */ n(
80
+ P,
81
+ {
82
+ type: "checkbox",
83
+ checked: p.some((g) => g.value === o)
84
+ }
85
+ ),
86
+ /* @__PURE__ */ n(v, { size: "lg", checked: !1, children: d })
87
+ ]
88
+ },
89
+ o + i
90
+ )) : /* @__PURE__ */ n("li", { className: R(e.DropdownChoice, e.DropdownChoiceNoResult), children: /* @__PURE__ */ n(v, { size: "lg", checked: !1, children: O }) }) }),
91
+ l && /* @__PURE__ */ n("div", { className: e.DropdownClose, children: /* @__PURE__ */ n(J, { color: "next", size: "sm", type: "button", onClick: () => F(), children: W }) })
92
+ ] }) })
93
+ ] });
94
+ };
9
95
  export {
10
- e as Dropdown
96
+ ko as Dropdown
11
97
  };
@@ -1,2 +1,12 @@
1
- import { HiddenInputProps } from './hidden-input.types';
1
+ import { ChangeEvent } from 'react';
2
+ import { InputChangeSource } from '../../types';
3
+ export interface HiddenInputProps {
4
+ id: string;
5
+ value: string;
6
+ name: string;
7
+ type: 'radio' | 'checkbox';
8
+ checked: boolean;
9
+ disabled?: boolean;
10
+ onChange: (e: ChangeEvent<HTMLInputElement>, source?: InputChangeSource) => void;
11
+ }
2
12
  export declare const HiddenInput: (props: HiddenInputProps) => import("react/jsx-runtime").JSX.Element;