@ambuj.bhaskar/react-component-library 0.3.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/index.d.ts +147 -6
- package/dist/index.js +46 -46
- package/package.json +2 -2
package/dist/assets/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*{box-sizing:border-box}body{margin:0}mark{background-color:unset!important;padding:0rem!important}hr,p{margin:0}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}}.icon_svg{width:100%;height:100%}.size_xs{width:16px;height:16px}.size_s{width:20px;height:20px}.size_m{width:24px;height:24px}.size_l{width:32px;height:32px}.size_xl{width:48px;height:48px}.button{transition:all .2s ease-in-out;display:flex;align-items:center;cursor:pointer;position:relative;background-color:unset;border:none}.button .background{position:absolute;z-index:1;width:100%;height:100%;top:0;left:0;border-radius:500px}.button .background.primary{filter:opacity(.05)}.button .background.primary:hover{filter:opacity(.15)}.button .background.primary:active{filter:opacity(1)}.button .background.secondary{filter:opacity(.1)}.button .background.secondary:hover{filter:opacity(.15)}.button .background.secondary:active{filter:opacity(.2)}.button .background.tertiary{filter:opacity(0)}.button .background.tertiary:hover{filter:opacity(.1)}.button .background.tertiary:active{filter:opacity(.2)}.button .background.nav{filter:opacity(0)}.button .background.nav:hover{filter:opacity(.1)}.button .background.nav:active{filter:opacity(.2)}.button .background.disabled{filter:opacity(.05)!important}.button .background.disabled.tertiary,.button .background.disabled.nav{filter:opacity(0)!important}.button>p{align-self:center;font-weight:var(--hydra_font_weight_m);z-index:2}.button.disabled,.button.disabled:hover,.button.disabled:active{cursor:no-drop!important;color:var(--hydra_c_disabled)!important}.button.disabled{cursor:no-drop;color:var(--hydra_c_disabled)}.button.disabled.primary,.button.disabled.primary:hover,.button.disabled.primary:active{outline-width:1px!important}.button.disabled.secondary,.button.disabled.secondary:hover,.button.disabled.secondary:active,.button.disabled.tertiary,.button.disabled.tertiary:hover,.button.disabled.tertiary:active,.button.disabled.nav,.button.disabled.nav:hover,.button.disabled.nav:active{outline-width:0px!important}.button.disabled.primary{outline-width:1px!important}.button.secondary{outline-width:0px!important}.button.secondary:hover,.button.secondary:active{outline-width:1px!important}.button.nav,.button.nav:hover{outline-width:0px!important}.button.nav:active{outline-width:1px!important}.button>p,.button>svg{z-index:2;pointer-events:none}.button.primary:active>p{color:var(--hydra_c_text_tertiary)!important}.button.fixed.h_s{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_m{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_l{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.hugging.p_s{padding:3px 10px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m{padding:6px 18px;border-radius:500px}.button.hugging.p_l{padding:10px 22px;border-radius:500px}.button.fixed.h_s.icon{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_m.icon{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_l.icon{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.hugging.p_s.icon{padding:5px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m.icon{padding:10px;border-radius:500px}.button.hugging.p_l.icon{padding:15px;border-radius:500px}.button.text_xs{font-size:var(--font_xs)!important}.button.text_s{font-size:var(--font_s)!important}.button.text_m{font-size:var(--font_m)!important}.button.text_l{font-size:var(--font_l)!important}.button.text_xl{font-size:var(--font_xl)!important}.input_wrapper{--color_text_secondary: #292929;--color_input_box_default: rgb(224, 222, 222);--color_input_box_active: #ffffff;--color_input_box_border_primary: #292929;--color_input_box_disabled: rgb(168, 168, 168);--color_disabled: rgb(24, 24, 24);--font_s: 14px;transition:all .2s ease-in-out;display:flex;align-items:center;position:relative;border:none;box-sizing:border-box;gap:8px;color:var(--color_text_secondary);background-color:var(--color_input_box_default);border-radius:25px;--input_box_height_s: 30px;--input_box_height_m: 40px;--input_box_height_l: 50px;--input_box_padding_s: .5rem 1.25rem;--input_box_padding_m: .75rem 1.25rem;--input_box_padding_l: .5rem 1.5rem}.input_wrapper.disabled{cursor:no-drop!important}.input_wrapper.disabled>.input{cursor:no-drop!important}.input_wrapper.h_s{height:var(--input_box_height_s);padding:var(--input_box_padding_s)}.input_wrapper.h_m{height:var(--input_box_height_m);padding:var(--input_box_padding_m)}.input_wrapper.h_l{height:var(--input_box_height_l);padding:var(--input_box_padding_l)}.input_wrapper:focus-within{background-color:var(--color_input_box_active);outline:1px solid var(--color_input_box_border_primary)}.input_wrapper.icon_before{flex-direction:row}.input_wrapper.icon_after{flex-direction:row-reverse}.input{border:none!important;outline:none!important;background:transparent;text-overflow:ellipsis;overflow:hidden!important;min-width:0!important;flex-grow:1;font-size:var(--font_s)!important}.input_wrapper:not(.empty):not(.disabled):not(:focus-within){background-color:var(--color_input_box_result);color:var(--color_text_secondary)}.input::placeholder{font-size:var(--font_s)!important;color:var(--color_text_secondary)}.icon-wrapper{display:flex;align-items:center;justify-content:center}.input_wrapper.input-disabled{background-color:var(--color_input_box_disabled);color:var(--color_disabled)}.single_select_container,.ant-select-dropdown{--color_select_border: #a3a3a3;--c_single_select_input_fill_active: rgb(214, 214, 214);--font_s: 14px;--font_weight_m: 500;--c_text_primary: #fff;--c_single_select_input_fill_default: #bbbbbb;--c_single_select_fill_menu_item_default: #dddddd;--c_single_select_fill_menu_item_active: #cecece;--c_single_select_fill_menu_item_hover: #b1b1b1;--c_secondary: #fff;--c_text_primary: #292929}.single_select_container{display:flex;justify-content:center;align-items:center;height:unset;--select_height_s: 30px;--select_height_default: 40px;--select_height_l: 50px;--select_padding_s: 1rem 1rem;--select_padding_default: 1.25rem 1rem;--select_padding_l: .5rem 1.5rem}.ant-select-focused:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{outline:1px solid var(--color_select_border)!important;background-color:var(--c_single_select_input_fill_active)!important}.ant-select-focused:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector>.ant-select-selection-item{font-weight:var(--font_weight_m)!important}.single_select_container>.ant-select-selector{outline:none!important;border:none!important;border-radius:100px!important;box-shadow:none!important;color:var(--c_text_primary)!important;background-color:var(--c_single_select_input_fill_default)!important}.single_select_container.h_s>.ant-select-selector{height:var(--select_height_s)!important;padding:var(--select_padding_s)!important}.single_select_container.h_m>.ant-select-selector{height:var(--select_height_default)!important;padding:var(--select_padding_default)!important}.single_select_container.h_l>.ant-select-selector{height:var(--select_height_l)!important;padding:var(--select_padding_l)!important}.single_select_container.h_l>.ant-select-selector:focus{background-color:red!important}.ant-select-dropdown{z-index:10000;border-radius:20px;outline:1px solid var(--color_select_border);box-shadow:unset;padding:0}.ant-select-dropdown .ant-select-item-option{align-items:center;padding:1rem;background-color:var(--c_single_select_fill_menu_item_default)!important;color:var(--c_text_primary)!important;border-radius:0}.ant-select-dropdown .ant-select-item-option-selected{align-items:center;padding:1rem;background-color:var(--c_single_select_fill_menu_item_active)!important}.ant-select-dropdown .ant-select-item-option-active:not(.ant-select-item-option-selected){align-items:center;padding:1rem;background-color:var(--c_single_select_fill_menu_item_hover)!important}.ant-select .ant-select-arrow{padding-right:.75rem;color:var(--c_secondary)}.ant-select-selection-placeholder{font-size:var(--font_s)!important;color:var(--c_text_secondary)!important}.ant-select-selection-item{font-size:var(--font_s)!important;color:var(--c_text_primary)!important;background-color:unset!important}
|
|
1
|
+
*{box-sizing:border-box}body{margin:0}mark{background-color:unset!important;padding:0rem!important}hr,p{margin:0}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}}.icon_svg{width:100%;height:100%}.size_xs{width:16px;height:16px}.size_s{width:20px;height:20px}.size_m{width:24px;height:24px}.size_l{width:32px;height:32px}.size_xl{width:48px;height:48px}.button{transition:all .2s ease-in-out;display:flex;align-items:center;cursor:pointer;position:relative;background-color:unset;border:none}.button .background{position:absolute;z-index:1;width:100%;height:100%;top:0;left:0;border-radius:500px}.button .background.primary{filter:opacity(.05)}.button .background.primary:hover{filter:opacity(.15)}.button .background.primary:active{filter:opacity(1)}.button .background.secondary{filter:opacity(.1)}.button .background.secondary:hover{filter:opacity(.15)}.button .background.secondary:active{filter:opacity(.2)}.button .background.tertiary{filter:opacity(0)}.button .background.tertiary:hover{filter:opacity(.1)}.button .background.tertiary:active{filter:opacity(.2)}.button .background.nav{filter:opacity(0)}.button .background.nav:hover{filter:opacity(.1)}.button .background.nav:active{filter:opacity(.2)}.button .background.disabled{filter:opacity(.05)!important}.button .background.disabled.tertiary,.button .background.disabled.nav{filter:opacity(0)!important}.button>p{align-self:center;font-weight:var(--hydra_font_weight_m);z-index:2}.button.disabled,.button.disabled:hover,.button.disabled:active{cursor:no-drop!important;color:var(--hydra_c_disabled)!important}.button.disabled{cursor:no-drop;color:var(--hydra_c_disabled)}.button.disabled.primary,.button.disabled.primary:hover,.button.disabled.primary:active{outline-width:1px!important}.button.disabled.secondary,.button.disabled.secondary:hover,.button.disabled.secondary:active,.button.disabled.tertiary,.button.disabled.tertiary:hover,.button.disabled.tertiary:active,.button.disabled.nav,.button.disabled.nav:hover,.button.disabled.nav:active{outline-width:0px!important}.button.disabled.primary{outline-width:1px!important}.button.secondary{outline-width:0px!important}.button.secondary:hover,.button.secondary:active{outline-width:1px!important}.button.nav,.button.nav:hover{outline-width:0px!important}.button.nav:active{outline-width:1px!important}.button>p,.button>svg{z-index:2;pointer-events:none}.button.primary:active>p{color:var(--hydra_c_text_tertiary)!important}.button.fixed.h_s{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_m{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_l{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.hugging.p_s{padding:3px 10px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m{padding:6px 18px;border-radius:500px}.button.hugging.p_l{padding:10px 22px;border-radius:500px}.button.fixed.h_s.icon{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_m.icon{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_l.icon{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.hugging.p_s.icon{padding:5px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m.icon{padding:10px;border-radius:500px}.button.hugging.p_l.icon{padding:15px;border-radius:500px}.button.text_xs{font-size:var(--font_xs)!important}.button.text_s{font-size:var(--font_s)!important}.button.text_m{font-size:var(--font_m)!important}.button.text_l{font-size:var(--font_l)!important}.button.text_xl{font-size:var(--font_xl)!important}.input_wrapper{--color_text_placeholder: #929292;--color_text_primary: #292929;--color_input_box_default: #2929291a;--color_input_box_active: #29292926;--color_input_box_result: #29292926;--color_input_box_border_primary: #292929;--color_input_box_disabled: rgb(168, 168, 168);--color_disabled: rgb(24, 24, 24);--font_s: 14px;transition:all .2s ease-in-out;display:flex;align-items:center;position:relative;border:none;box-sizing:border-box;gap:8px;color:var(--color_text_primary);background-color:var(--color_input_box_default);border-radius:25px;--input_box_height_s: 30px;--input_box_height_m: 40px;--input_box_height_l: 50px;--input_box_padding_s: .5rem 1.25rem;--input_box_padding_m: .75rem 1.25rem;--input_box_padding_l: .5rem 1.5rem}.input_wrapper.disabled{cursor:no-drop!important}.input_wrapper.disabled>.input{cursor:no-drop!important}.input_wrapper.h_s{height:var(--input_box_height_s);padding:var(--input_box_padding_s)}.input_wrapper.h_m{height:var(--input_box_height_m);padding:var(--input_box_padding_m)}.input_wrapper.h_l{height:var(--input_box_height_l);padding:var(--input_box_padding_l)}.input_wrapper:focus-within{background-color:var(--color_input_box_active);outline:1px solid var(--color_input_box_border_primary)}.input_wrapper.icon_before{flex-direction:row}.input_wrapper.icon_after{flex-direction:row-reverse}.input{border:none!important;outline:none!important;background:transparent;text-overflow:ellipsis;overflow:hidden!important;min-width:0!important;flex-grow:1;font-size:var(--font_s)!important}.input_wrapper:not(.empty):not(.disabled):not(:focus-within){background-color:var(--color_input_box_result);color:var(--color_text_primary)}.input::placeholder{font-size:var(--font_s)!important;color:var(--color_text_placeholder)}.icon-wrapper{display:flex;align-items:center;justify-content:center}.input_wrapper.input-disabled{background-color:var(--color_input_box_disabled);color:var(--color_disabled)}.single_select_container,.single_select_dropdown{--color_select_border: #a3a3a3;--c_single_select_input_fill_default: #bbbbbb;--c_single_select_input_fill_active: #b3b3b3;--font_s: 14px;--font_weight_m: 500;--c_text_primary: #fff;--c_single_select_fill_menu_item_default: #fff;--c_text_primary: #292929;--c_single_select_fill_menu_item_active: #fff5d1;--c_single_select_fill_menu_item_hover: #fffcf0;--c_secondary: #fff;--select_height_s: 30px;--select_height_m: 40px;--select_height_l: 50px;--select_padding_s: 1rem 1rem;--select_padding_m: 1.25rem 1rem;--select_padding_l: .5rem 1.5rem}.single_select_container{display:flex;justify-content:center;align-items:center;height:unset}.single_select_container.ant-select-focused:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{outline:1px solid var(--color_select_border)!important;background-color:var(--c_single_select_input_fill_active)!important}.single_select_container.ant-select-focused:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector>.ant-select-selection-item{font-weight:var(--font_weight_m)!important}.single_select_container>.ant-select-selector{outline:none!important;border:none!important;border-radius:100px!important;box-shadow:none!important;color:var(--c_text_primary)!important;background-color:var(--c_single_select_input_fill_default)!important}.single_select_container.h_s>.ant-select-selector{height:var(--select_height_s)!important;padding:var(--select_padding_s)!important}.single_select_container.h_m>.ant-select-selector{height:var(--select_height_m)!important;padding:var(--select_padding_m)!important}.single_select_container.h_l>.ant-select-selector{height:var(--select_height_l)!important;padding:var(--select_padding_l)!important}.single_select_container.h_l>.ant-select-selector:focus{background-color:red!important}.single_select_dropdown{z-index:10000;border-radius:20px;outline:1px solid var(--color_select_border);box-shadow:unset;padding:0}.single_select_dropdown .ant-select-item-option{display:flex!important;align-items:center!important;background-color:var(--c_single_select_fill_menu_item_default)!important;color:var(--c_text_primary)!important;border-radius:0}.single_select_dropdown .ant-select-item-option-content{display:flex!important;align-items:center!important}.single_select_dropdown.h_s .ant-select-item-option{height:var(--select_height_s)!important;padding:var(--select_padding_s)!important}.single_select_dropdown.h_m .ant-select-item-option{height:var(--select_height_m)!important;padding:var(--select_padding_m)!important}.single_select_dropdown.h_l .ant-select-item-option{height:var(--select_height_l)!important;padding:var(--select_padding_l)!important}.single_select_dropdown .ant-select-item-option>.ant-select-item-option-content>img{max-height:1.5rem}.single_select_dropdown .ant-select-item-option{padding:.3rem .5rem}.single_select_dropdown.items_center .ant-select-item-option-content{justify-content:center!important}.single_select_dropdown.items_start .ant-select-item-option-content{justify-content:flex-start!important}.single_select_dropdown.items_end .ant-select-item-option-content{justify-content:flex-end!important}.single_select_dropdown .ant-select-item-option-selected{background-color:var(--c_single_select_fill_menu_item_active)!important}.single_select_dropdown .ant-select-item-option-active:not(.ant-select-item-option-selected){background-color:var(--c_single_select_fill_menu_item_hover)!important}.ant-select .ant-select-arrow{padding-right:.75rem;color:var(--c_secondary)}.ant-select-selection-placeholder{font-size:var(--font_s)!important;color:var(--c_text_primary)!important}.single_select_container.items_center .ant-select-selection-item{display:flex!important;align-items:center!important;justify-content:center!important}.single_select_container.items_start .ant-select-selection-item{display:flex!important;align-items:center!important;justify-content:flex-start!important}.single_select_container.items_end .ant-select-selection-item{display:flex!important;align-items:center!important;justify-content:flex-end!important}.single_select_container .ant-select-selection-item{font-size:var(--font_s)!important;color:var(--c_text_primary)!important;background-color:unset!important}.single_select_container .ant-select-selection-item>img{max-height:1.5rem}.contact_input{display:flex;flex-direction:row;align-items:center;gap:.5rem;min-width:24rem}.multi_select_container,.multi_select_dropdown{--font_weight_m: 500;--color_text_primary: #292929;--fill_focused: #b8b8b8;--fill_default: #cecece;--color_icon: #292929;--color_text_secondary: #f1f1f1;--color_dropdown_border: #b8b8b8;--menuitem_active: #9b9b9b;--menuitem_hover: #d6d6d6;--menuitem_default: #ebebeb}.multi_select_container{display:flex;justify-content:center;align-items:center;height:unset;--select_height_s: 30px;--select_height_default: 40px;--select_height_l: 50px;--select_padding_s: 1rem 1rem;--select_padding_default: 1.25rem 1rem;--select_padding_l: .5rem 1.5rem}.multi_select_container.ant-select-focused:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{outline:1px solid var(--color_dropdown_border)!important;background-color:var(--fill_focused)!important}.multi_select_container.ant-select-focused:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector>.ant-select-selection-item{font-weight:var(--font_weight_m)!important}.multi_select_container>.ant-select-selector{outline:none!important;border:none!important;border-radius:100px!important;box-shadow:none!important;color:var(--color_text_primary)!important;background-color:var(--fill_default)!important;width:100%!important;height:40px!important;padding:0 .75rem!important}.ant-select-selection-overflow-item>.ant-select-selection-item{background-color:var(--menuitem_active)!important;border-radius:500px!important}.ant-select-selection-item{border-radius:500px!important}.multi_select_container.h_s>.ant-select-selector{height:var(--select_height_s)!important}.multi_select_container.h_m>.ant-select-selector{height:var(--select_height_default)!important}.multi_select_container.h_l>.ant-select-selector{height:var(--select_height_l)!important}.multi_select_container.h_l>.ant-select-selector:focus{background-color:red!important}.ant-select-selection-wrap{height:100%}.ant-select-selection-item{font-size:var(--font_s)!important;color:var(--color_text_primary)!important}.multi_select_dropdown{z-index:10000;border-radius:20px;outline:1px solid var(--color_dropdown_border);box-shadow:unset;padding:0}.multi_select_dropdown .ant-select-item-option{align-items:center;padding:1rem;background-color:var(--menuitem_default)!important;color:var(--color_text_primary)!important;border-radius:0}.multi_select_dropdown .ant-select-item-option-selected{align-items:center;padding:1rem;background-color:var(--menuitem_active)!important}.multi_select_dropdown .ant-select-item-option-active:not(.ant-select-item-option-selected){align-items:center;padding:1rem;background-color:var(--menuitem_hover)!important}.ant-select .ant-select-arrow{padding-right:.75rem;color:var(--color_icon)}.ant-select-selection-placeholder{font-size:var(--font_s)!important;color:var(--color_text_primary)!important}.ant-select-selection-item{font-size:var(--font_s)!important;color:var(--color_text_primary)!important;background-color:unset!important}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
4
|
import * as React_2 from 'react';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
3
6
|
|
|
4
7
|
/**
|
|
5
8
|
* Button component props.
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {Object} ButtonProps
|
|
11
|
+
* @property {string} [variant="primary"] - Variant of the button, affects styling.
|
|
12
|
+
* @property {string} [background="rgb(255, 204, 0)"] - Background color of the button.
|
|
13
|
+
* @property {string} [border="#292929"] - Border color of the button.
|
|
14
|
+
* @property {string} [container="hugging"] - Container type for button sizing.
|
|
15
|
+
* @property {string} [width="13.5rem"] - Width of the button.
|
|
16
|
+
* @property {string} [height="m"] - Height of the button.
|
|
17
|
+
* @property {string} [padding="m"] - Padding inside the button.
|
|
18
|
+
* @property {string} [gap="0.25rem"] - Gap between elements inside the button.
|
|
19
|
+
* @property {string} [placement="center"] - Placement of the content inside the button.
|
|
20
|
+
* @property {boolean} [disabled=false] - If true, the button is disabled.
|
|
21
|
+
* @property {boolean} [loading=false] - If true, the button shows a loading state.
|
|
22
|
+
* @property {string} [text=null] - Text to display inside the button.
|
|
23
|
+
* @property {string} [textSize="s"] - Size of the text inside the button.
|
|
24
|
+
* @property {string} [textColor="#292929"] - Color of the text inside the button.
|
|
25
|
+
* @property {Object.<string, string>} [textColorStates=null] - Color states for the text.
|
|
26
|
+
* @property {IconName} [icon=null] - Icon to display inside the button.
|
|
27
|
+
* @property {string} [iconSize="s"] - Size of the icon inside the button.
|
|
28
|
+
* @property {string} [iconColor="#292929"] - Color of the icon inside the button.
|
|
29
|
+
* @property {string} [iconPosition="before"] - Position of the icon relative to the text.
|
|
30
|
+
* @property {Object.<string, string>} [iconColorStates=null] - Color states for the icon.
|
|
31
|
+
* @property {string} [className=null] - Additional class names for styling.
|
|
32
|
+
* @property {...React.ComponentPropsWithoutRef<'button'>} [props=null] - Other button props
|
|
6
33
|
*/
|
|
7
34
|
export declare const Button: React.FC<ButtonProps>;
|
|
8
35
|
|
|
@@ -42,12 +69,56 @@ declare type ColorStatesType = {
|
|
|
42
69
|
active?: Color;
|
|
43
70
|
};
|
|
44
71
|
|
|
72
|
+
/**
|
|
73
|
+
* ContactInput component.
|
|
74
|
+
*
|
|
75
|
+
* @typedef {Object} ContactInputProps
|
|
76
|
+
* @param {string} [value] - The current value of the contact input.
|
|
77
|
+
* @param {(val: string) => void} [onChange=() => {}] - Callback when the input value changes.
|
|
78
|
+
* @param {"s" | "m" | "l"} [height="m"] - Height of the input fields.
|
|
79
|
+
* @param {CSSstring} [width="16rem"] - Width of the component.
|
|
80
|
+
* @param {string} [className=""] - Additional class names for styling.
|
|
81
|
+
* @param {string} [placeholder="XXXXXX XXXXX"] - Placeholder text for the contact input field.
|
|
82
|
+
* @param {string} [separator=" "] - Separator between the country code and phone number.
|
|
83
|
+
* @param {boolean} [disabled=false] - Disables the contact input fields.
|
|
84
|
+
*/
|
|
85
|
+
export declare const ContactInput: ({ value, onChange, height, width, className, placeholder, separator, disabled, }: ContactInputProps) => JSX_2.Element;
|
|
86
|
+
|
|
87
|
+
declare type ContactInputProps = {
|
|
88
|
+
value?: string;
|
|
89
|
+
onChange?: (val: string) => void;
|
|
90
|
+
height?: "s" | "m" | "l";
|
|
91
|
+
width?: CSSstring;
|
|
92
|
+
className?: string;
|
|
93
|
+
placeholder?: string;
|
|
94
|
+
separator?: string;
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
};
|
|
97
|
+
|
|
45
98
|
declare type CSSstring = string;
|
|
46
99
|
|
|
100
|
+
declare type CustomOption = {
|
|
101
|
+
label: any;
|
|
102
|
+
value: any;
|
|
103
|
+
};
|
|
104
|
+
|
|
47
105
|
declare type HTMLButtonProps = ComponentProps<"button">;
|
|
48
106
|
|
|
49
107
|
declare type HTMLInputProps = ComponentProps<"input">;
|
|
50
108
|
|
|
109
|
+
/**
|
|
110
|
+
* A component that renders an icon by its name.
|
|
111
|
+
*
|
|
112
|
+
* The icon must be registered in the {@link IconRegistry}.
|
|
113
|
+
*
|
|
114
|
+
* @prop {string} name - Name of the icon to use.
|
|
115
|
+
* @prop {string} [className] - Additional class names for styling.
|
|
116
|
+
* @prop {"xs" | "s" | "m" | "l" | "xl"} [size] - Size of the icon.
|
|
117
|
+
* @prop {string} [background] - Background color of the icon.
|
|
118
|
+
* @prop {string} [color] - Color of the icon.
|
|
119
|
+
* @prop {React.MouseEventHandler<SVGSVGElement>} [onClick] - Callback when the icon is clicked.
|
|
120
|
+
* @prop {React.SVGAttributes<SVGSVGElement>} ...svgProps - Additional props to pass to the SVG element.
|
|
121
|
+
*/
|
|
51
122
|
export declare const Icon: React_2.FC<IconProps>;
|
|
52
123
|
|
|
53
124
|
declare type IconName = keyof typeof IconRegistry;
|
|
@@ -65,6 +136,20 @@ declare type IconProps = SVGprops & {
|
|
|
65
136
|
|
|
66
137
|
declare const IconRegistry: Record<string, any>;
|
|
67
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Input component props.
|
|
141
|
+
*
|
|
142
|
+
* @prop {string} [className] - Additional class names for styling.
|
|
143
|
+
* @prop {string | number} [value] - The value of the input.
|
|
144
|
+
* @prop {"s" | "m" | "l"} [height] - The height of the input.
|
|
145
|
+
* @prop {CSSstring} [width] - The width of the input.
|
|
146
|
+
* @prop {"flex-start" | "center" | "flex-end"} [placement] - The placement of the content inside the input.
|
|
147
|
+
* @prop {IconName} [icon] - The icon to display inside the input.
|
|
148
|
+
* @prop {"before" | "after"} [iconPosition] - The position of the icon relative to the input.
|
|
149
|
+
* @prop {Color} [iconColor] - The color of the icon.
|
|
150
|
+
* @prop {boolean} [disabled] - If true, the input is disabled.
|
|
151
|
+
* @prop {React.ChangeEventHandler<HTMLInputElement>} [onChange] - The callback function when the input changes.
|
|
152
|
+
*/
|
|
68
153
|
export declare const Input: React.FC<InputProps>;
|
|
69
154
|
|
|
70
155
|
declare type InputProps = HTMLInputProps & {
|
|
@@ -82,26 +167,82 @@ declare type InputProps = HTMLInputProps & {
|
|
|
82
167
|
|
|
83
168
|
declare type JustifyContent = "center" | "start" | "end" | "flex-start" | "flex-end" | "left" | "right" | "baseline" | "first baseline" | "last baseline" | "space-between" | "space-around" | "space-evenly" | "stretch";
|
|
84
169
|
|
|
170
|
+
/**
|
|
171
|
+
* A multiselect component.
|
|
172
|
+
*
|
|
173
|
+
* @prop {Option[]} options - Options for the multiselect.
|
|
174
|
+
* @prop {(value: string[]) => void} onChange - Callback function when the selection changes.
|
|
175
|
+
* @prop {string} [placeholder] - Placeholder text for the input.
|
|
176
|
+
* @prop {boolean} [searchable] - Whether the input is searchable.
|
|
177
|
+
* @prop {string[]} [value] - The selected values.
|
|
178
|
+
* @prop {string} [className] - The class name for the component.
|
|
179
|
+
* @prop {boolean} [disabled] - Whether the component is disabled.
|
|
180
|
+
* @prop {CSSstring} [width] - The width of the component.
|
|
181
|
+
* @prop {string} [height] - The height of the component.
|
|
182
|
+
* @prop {string} [id] - The id of the component.
|
|
183
|
+
*/
|
|
184
|
+
export declare const Multiselect: default_2.FC<MultiselectProps>;
|
|
185
|
+
|
|
186
|
+
declare type MultiselectProps = {
|
|
187
|
+
options: Option_2[];
|
|
188
|
+
onChange: (value: string[]) => void;
|
|
189
|
+
placeholder?: string;
|
|
190
|
+
searchable?: boolean;
|
|
191
|
+
maxTagCount?: "responsive" | number;
|
|
192
|
+
value?: string[];
|
|
193
|
+
width?: CSSstring;
|
|
194
|
+
height?: string;
|
|
195
|
+
className?: string;
|
|
196
|
+
disabled?: boolean;
|
|
197
|
+
id?: string;
|
|
198
|
+
suffixIcon?: ReactNode | boolean;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
declare type Option_2 = {
|
|
202
|
+
label: string;
|
|
203
|
+
value: string;
|
|
204
|
+
};
|
|
205
|
+
|
|
85
206
|
declare type Padding = "s" | "m" | "l";
|
|
86
207
|
|
|
208
|
+
/**
|
|
209
|
+
* A single select component.
|
|
210
|
+
*
|
|
211
|
+
* @prop {Option[]} options - Options for the select.
|
|
212
|
+
* @prop {(value: string) => void} onChange - Callback function when the selection changes.
|
|
213
|
+
* @prop {string} [placeholder] - Placeholder text for the input.
|
|
214
|
+
* @prop {boolean} [searchable] - Whether the input is searchable.
|
|
215
|
+
* @prop {string} [value] - The selected value.
|
|
216
|
+
* @prop {string} [className] - The class name for the component.
|
|
217
|
+
* @prop {boolean} [disabled] - Whether the component is disabled.
|
|
218
|
+
* @prop {CSSstring} [width] - The width of the component.
|
|
219
|
+
* @prop {string} [height] - The height of the component.
|
|
220
|
+
* @prop {string} [id] - The id of the component.
|
|
221
|
+
*/
|
|
87
222
|
export declare const Select: React.FC<SelectProps>;
|
|
88
223
|
|
|
89
224
|
declare type SelectProps = {
|
|
90
|
-
options:
|
|
91
|
-
|
|
92
|
-
label: string;
|
|
93
|
-
}[];
|
|
225
|
+
options: Option_2[] | CustomOption[];
|
|
226
|
+
onChange: (value: string) => void;
|
|
94
227
|
placeholder?: string;
|
|
95
228
|
searchable?: boolean;
|
|
96
|
-
|
|
229
|
+
placement?: "start" | "center" | "end";
|
|
97
230
|
value?: string;
|
|
98
|
-
|
|
231
|
+
className?: string;
|
|
99
232
|
disabled?: boolean;
|
|
100
233
|
width?: CSSstring;
|
|
101
234
|
height?: string;
|
|
102
235
|
id?: string;
|
|
236
|
+
suffixIcon?: ReactNode | boolean;
|
|
103
237
|
};
|
|
104
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Spinner component props.
|
|
241
|
+
*
|
|
242
|
+
* @typedef {Object} SpinnerProps
|
|
243
|
+
* @property {SpinnerProps.size} [size="m"] - Size of the spinner.
|
|
244
|
+
* @property {SpinnerProps.color} [color] - Color of the spinner.
|
|
245
|
+
*/
|
|
105
246
|
export declare const Spinner: React_2.FC<SpinnerProps>;
|
|
106
247
|
|
|
107
248
|
declare type SpinnerProps = {
|