@tcn/ui 0.0.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/README.md +11 -0
- package/dist/actions/button/base_button/base_button.d.ts +15 -0
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -0
- package/dist/actions/button/base_button/base_button.js +56 -0
- package/dist/actions/button/base_button/base_button.js.map +1 -0
- package/dist/actions/button/button/button.d.ts +6 -0
- package/dist/actions/button/button/button.d.ts.map +1 -0
- package/dist/actions/button/button/button.js +11 -0
- package/dist/actions/button/button/button.js.map +1 -0
- package/dist/actions/button/button_group/button_group.d.ts +12 -0
- package/dist/actions/button/button_group/button_group.d.ts.map +1 -0
- package/dist/actions/button/button_group/button_group.js +57 -0
- package/dist/actions/button/button_group/button_group.js.map +1 -0
- package/dist/actions/button/select_group/select_group.d.ts +13 -0
- package/dist/actions/button/select_group/select_group.d.ts.map +1 -0
- package/dist/actions/button/select_group/select_group.js +51 -0
- package/dist/actions/button/select_group/select_group.js.map +1 -0
- package/dist/actions/button/select_group/single_select_group.d.ts +10 -0
- package/dist/actions/button/select_group/single_select_group.d.ts.map +1 -0
- package/dist/actions/button/select_group/single_select_group.js +34 -0
- package/dist/actions/button/select_group/single_select_group.js.map +1 -0
- package/dist/actions/button/slim_button/slim_button.d.ts +4 -0
- package/dist/actions/button/slim_button/slim_button.d.ts.map +1 -0
- package/dist/actions/button/slim_button/slim_button.js +19 -0
- package/dist/actions/button/slim_button/slim_button.js.map +1 -0
- package/dist/actions/index.d.ts +7 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +15 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/badge.css +1 -0
- package/dist/base_button.css +1 -0
- package/dist/body_text.css +1 -0
- package/dist/body_text.module-h4XQE2pC.js +5 -0
- package/dist/body_text.module-h4XQE2pC.js.map +1 -0
- package/dist/bottom_resize_handle.css +1 -0
- package/dist/bubble.css +1 -0
- package/dist/button.css +1 -0
- package/dist/button_group.css +1 -0
- package/dist/callout.css +1 -0
- package/dist/callout.module-D8ECmxpO.js +5 -0
- package/dist/callout.module-D8ECmxpO.js.map +1 -0
- package/dist/caption.css +1 -0
- package/dist/caption.module-DDq0H4xZ.js +5 -0
- package/dist/caption.module-DDq0H4xZ.js.map +1 -0
- package/dist/card.css +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/chip.css +1 -0
- package/dist/circle.css +1 -0
- package/dist/collapsible_box.css +1 -0
- package/dist/collapsible_box.module-BiS98xXA.js +5 -0
- package/dist/collapsible_box.module-BiS98xXA.js.map +1 -0
- package/dist/color_input.css +1 -0
- package/dist/color_picker.css +1 -0
- package/dist/column.css +1 -0
- package/dist/confirm.css +1 -0
- package/dist/date_picker.css +1 -0
- package/dist/date_picker_date.css +1 -0
- package/dist/date_picker_day.css +1 -0
- package/dist/date_picker_header.css +1 -0
- package/dist/date_picker_input.css +1 -0
- package/dist/date_picker_time_selector.css +1 -0
- package/dist/date_picker_year_input.css +1 -0
- package/dist/date_picker_year_selector.css +1 -0
- package/dist/divider.css +1 -0
- package/dist/drawer_bottom.css +1 -0
- package/dist/drawer_end.css +1 -0
- package/dist/drawer_start.css +1 -0
- package/dist/drawer_top.css +1 -0
- package/dist/end_resize_handle.css +1 -0
- package/dist/feedback/index.d.ts +4 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +9 -0
- package/dist/feedback/index.js.map +1 -0
- package/dist/feedback/lazy/lazy.d.ts +11 -0
- package/dist/feedback/lazy/lazy.d.ts.map +1 -0
- package/dist/feedback/lazy/lazy.js +27 -0
- package/dist/feedback/lazy/lazy.js.map +1 -0
- package/dist/feedback/loading/loading.d.ts +11 -0
- package/dist/feedback/loading/loading.d.ts.map +1 -0
- package/dist/feedback/loading/loading.js +52 -0
- package/dist/feedback/loading/loading.js.map +1 -0
- package/dist/feedback/progress/progress_bar.d.ts +7 -0
- package/dist/feedback/progress/progress_bar.d.ts.map +1 -0
- package/dist/feedback/progress/progress_bar.js +41 -0
- package/dist/feedback/progress/progress_bar.js.map +1 -0
- package/dist/field_control.css +1 -0
- package/dist/field_set.css +1 -0
- package/dist/footer.css +1 -0
- package/dist/footnote.css +1 -0
- package/dist/footnote.module-DEyFuqOr.js +5 -0
- package/dist/footnote.module-DEyFuqOr.js.map +1 -0
- package/dist/form/field/common/field_control/field_control.d.ts +13 -0
- package/dist/form/field/common/field_control/field_control.d.ts.map +1 -0
- package/dist/form/field/common/field_control/field_control.js +38 -0
- package/dist/form/field/common/field_control/field_control.js.map +1 -0
- package/dist/form/field/common/field_description.d.ts +7 -0
- package/dist/form/field/common/field_description.d.ts.map +1 -0
- package/dist/form/field/common/field_description.js +25 -0
- package/dist/form/field/common/field_description.js.map +1 -0
- package/dist/form/field/common/field_error.d.ts +6 -0
- package/dist/form/field/common/field_error.d.ts.map +1 -0
- package/dist/form/field/common/field_error.js +35 -0
- package/dist/form/field/common/field_error.js.map +1 -0
- package/dist/form/field/common/field_header.d.ts +12 -0
- package/dist/form/field/common/field_header.d.ts.map +1 -0
- package/dist/form/field/common/field_header.js +28 -0
- package/dist/form/field/common/field_header.js.map +1 -0
- package/dist/form/field/common/field_label.d.ts +8 -0
- package/dist/form/field/common/field_label.d.ts.map +1 -0
- package/dist/form/field/common/field_label.js +38 -0
- package/dist/form/field/common/field_label.js.map +1 -0
- package/dist/form/field/common/status_input/status_input.d.ts +14 -0
- package/dist/form/field/common/status_input/status_input.d.ts.map +1 -0
- package/dist/form/field/common/status_input/status_input.js +56 -0
- package/dist/form/field/common/status_input/status_input.js.map +1 -0
- package/dist/form/field/common/types.d.ts +10 -0
- package/dist/form/field/common/types.d.ts.map +1 -0
- package/dist/form/field/common/types.js +2 -0
- package/dist/form/field/common/types.js.map +1 -0
- package/dist/form/field/field.d.ts +10 -0
- package/dist/form/field/field.d.ts.map +1 -0
- package/dist/form/field/field.js +19 -0
- package/dist/form/field/field.js.map +1 -0
- package/dist/form/field/form_field.d.ts +6 -0
- package/dist/form/field/form_field.d.ts.map +1 -0
- package/dist/form/field/form_field.js +18 -0
- package/dist/form/field/form_field.js.map +1 -0
- package/dist/form/field/h_field/h_field.d.ts +11 -0
- package/dist/form/field/h_field/h_field.d.ts.map +1 -0
- package/dist/form/field/h_field/h_field.js +60 -0
- package/dist/form/field/h_field/h_field.js.map +1 -0
- package/dist/form/field/v_field/v_field.d.ts +10 -0
- package/dist/form/field/v_field/v_field.d.ts.map +1 -0
- package/dist/form/field/v_field/v_field.js +68 -0
- package/dist/form/field/v_field/v_field.js.map +1 -0
- package/dist/form/field_presenters/field_presenter.d.ts +39 -0
- package/dist/form/field_presenters/field_presenter.d.ts.map +1 -0
- package/dist/form/field_presenters/field_presenter.js +71 -0
- package/dist/form/field_presenters/field_presenter.js.map +1 -0
- package/dist/form/field_presenters/options_field_presenter.d.ts +15 -0
- package/dist/form/field_presenters/options_field_presenter.d.ts.map +1 -0
- package/dist/form/field_presenters/options_field_presenter.js +18 -0
- package/dist/form/field_presenters/options_field_presenter.js.map +1 -0
- package/dist/form/field_set/field_set.d.ts +13 -0
- package/dist/form/field_set/field_set.d.ts.map +1 -0
- package/dist/form/field_set/field_set.js +65 -0
- package/dist/form/field_set/field_set.js.map +1 -0
- package/dist/form/form_field.d.ts +6 -0
- package/dist/form/form_field.d.ts.map +1 -0
- package/dist/form/form_field.js +18 -0
- package/dist/form/form_field.js.map +1 -0
- package/dist/form/index.d.ts +6 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +11 -0
- package/dist/form/index.js.map +1 -0
- package/dist/grid.css +1 -0
- package/dist/h_field.css +1 -0
- package/dist/header.css +1 -0
- package/dist/headline.css +1 -0
- package/dist/headline.module-BiwHBtGf.js +5 -0
- package/dist/headline.module-BiwHBtGf.js.map +1 -0
- package/dist/input.css +1 -0
- package/dist/inputs/checkbox/checkbox.d.ts +11 -0
- package/dist/inputs/checkbox/checkbox.d.ts.map +1 -0
- package/dist/inputs/checkbox/checkbox.js +34 -0
- package/dist/inputs/checkbox/checkbox.js.map +1 -0
- package/dist/inputs/checkbox/checkbox_row.d.ts +8 -0
- package/dist/inputs/checkbox/checkbox_row.d.ts.map +1 -0
- package/dist/inputs/checkbox/checkbox_row.js +16 -0
- package/dist/inputs/checkbox/checkbox_row.js.map +1 -0
- package/dist/inputs/color_input/color_input.d.ts +13 -0
- package/dist/inputs/color_input/color_input.d.ts.map +1 -0
- package/dist/inputs/color_input/color_input.js +145 -0
- package/dist/inputs/color_input/color_input.js.map +1 -0
- package/dist/inputs/color_input/color_picker.d.ts +8 -0
- package/dist/inputs/color_input/color_picker.d.ts.map +1 -0
- package/dist/inputs/color_input/color_picker.js +39 -0
- package/dist/inputs/color_input/color_picker.js.map +1 -0
- package/dist/inputs/combo_box/combo_box.d.ts +11 -0
- package/dist/inputs/combo_box/combo_box.d.ts.map +1 -0
- package/dist/inputs/combo_box/combo_box.js +91 -0
- package/dist/inputs/combo_box/combo_box.js.map +1 -0
- package/dist/inputs/date_picker/date_picker.d.ts +20 -0
- package/dist/inputs/date_picker/date_picker.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker.js +114 -0
- package/dist/inputs/date_picker/date_picker.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_body.d.ts +7 -0
- package/dist/inputs/date_picker/date_picker_body.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_body.js +26 -0
- package/dist/inputs/date_picker/date_picker_body.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_date.d.ts +8 -0
- package/dist/inputs/date_picker/date_picker_date.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_date.js +71 -0
- package/dist/inputs/date_picker/date_picker_date.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_day.d.ts +6 -0
- package/dist/inputs/date_picker/date_picker_day.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_day.js +25 -0
- package/dist/inputs/date_picker/date_picker_day.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_header.d.ts +7 -0
- package/dist/inputs/date_picker/date_picker_header.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_header.js +87 -0
- package/dist/inputs/date_picker/date_picker_header.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_input.d.ts +24 -0
- package/dist/inputs/date_picker/date_picker_input.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_input.js +139 -0
- package/dist/inputs/date_picker/date_picker_input.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_presenter.d.ts +45 -0
- package/dist/inputs/date_picker/date_picker_presenter.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_presenter.js +170 -0
- package/dist/inputs/date_picker/date_picker_presenter.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_time_selector.d.ts +13 -0
- package/dist/inputs/date_picker/date_picker_time_selector.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_time_selector.js +90 -0
- package/dist/inputs/date_picker/date_picker_time_selector.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_year_input.d.ts +6 -0
- package/dist/inputs/date_picker/date_picker_year_input.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_year_input.js +51 -0
- package/dist/inputs/date_picker/date_picker_year_input.js.map +1 -0
- package/dist/inputs/date_picker/date_picker_year_selector.d.ts +7 -0
- package/dist/inputs/date_picker/date_picker_year_selector.d.ts.map +1 -0
- package/dist/inputs/date_picker/date_picker_year_selector.js +116 -0
- package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -0
- package/dist/inputs/index.d.ts +46 -0
- package/dist/inputs/index.d.ts.map +1 -0
- package/dist/inputs/index.js +90 -0
- package/dist/inputs/index.js.map +1 -0
- package/dist/inputs/input/input.d.ts +14 -0
- package/dist/inputs/input/input.d.ts.map +1 -0
- package/dist/inputs/input/input.js +24 -0
- package/dist/inputs/input/input.js.map +1 -0
- package/dist/inputs/mask_input/alpha_character.d.ts +10 -0
- package/dist/inputs/mask_input/alpha_character.d.ts.map +1 -0
- package/dist/inputs/mask_input/alpha_character.js +15 -0
- package/dist/inputs/mask_input/alpha_character.js.map +1 -0
- package/dist/inputs/mask_input/alpha_numeric_character.d.ts +10 -0
- package/dist/inputs/mask_input/alpha_numeric_character.d.ts.map +1 -0
- package/dist/inputs/mask_input/alpha_numeric_character.js +15 -0
- package/dist/inputs/mask_input/alpha_numeric_character.js.map +1 -0
- package/dist/inputs/mask_input/character.d.ts +14 -0
- package/dist/inputs/mask_input/character.d.ts.map +1 -0
- package/dist/inputs/mask_input/character.js +26 -0
- package/dist/inputs/mask_input/character.js.map +1 -0
- package/dist/inputs/mask_input/constant_character.d.ts +10 -0
- package/dist/inputs/mask_input/constant_character.d.ts.map +1 -0
- package/dist/inputs/mask_input/constant_character.js +23 -0
- package/dist/inputs/mask_input/constant_character.js.map +1 -0
- package/dist/inputs/mask_input/key_capture_input.d.ts +11 -0
- package/dist/inputs/mask_input/key_capture_input.d.ts.map +1 -0
- package/dist/inputs/mask_input/key_capture_input.js +79 -0
- package/dist/inputs/mask_input/key_capture_input.js.map +1 -0
- package/dist/inputs/mask_input/language_character.d.ts +10 -0
- package/dist/inputs/mask_input/language_character.d.ts.map +1 -0
- package/dist/inputs/mask_input/language_character.js +15 -0
- package/dist/inputs/mask_input/language_character.js.map +1 -0
- package/dist/inputs/mask_input/mask.d.ts +38 -0
- package/dist/inputs/mask_input/mask.d.ts.map +1 -0
- package/dist/inputs/mask_input/mask.js +174 -0
- package/dist/inputs/mask_input/mask.js.map +1 -0
- package/dist/inputs/mask_input/mask_config.d.ts +26 -0
- package/dist/inputs/mask_input/mask_config.d.ts.map +1 -0
- package/dist/inputs/mask_input/mask_config.js +2 -0
- package/dist/inputs/mask_input/mask_config.js.map +1 -0
- package/dist/inputs/mask_input/mask_cursor.d.ts +14 -0
- package/dist/inputs/mask_input/mask_cursor.d.ts.map +1 -0
- package/dist/inputs/mask_input/mask_cursor.js +2 -0
- package/dist/inputs/mask_input/mask_cursor.js.map +1 -0
- package/dist/inputs/mask_input/mask_input.d.ts +13 -0
- package/dist/inputs/mask_input/mask_input.d.ts.map +1 -0
- package/dist/inputs/mask_input/mask_input.js +122 -0
- package/dist/inputs/mask_input/mask_input.js.map +1 -0
- package/dist/inputs/mask_input/mask_presenter.d.ts +45 -0
- package/dist/inputs/mask_input/mask_presenter.d.ts.map +1 -0
- package/dist/inputs/mask_input/mask_presenter.js +146 -0
- package/dist/inputs/mask_input/mask_presenter.js.map +1 -0
- package/dist/inputs/mask_input/numeric_character.d.ts +10 -0
- package/dist/inputs/mask_input/numeric_character.d.ts.map +1 -0
- package/dist/inputs/mask_input/numeric_character.js +15 -0
- package/dist/inputs/mask_input/numeric_character.js.map +1 -0
- package/dist/inputs/mask_input/regex_character.d.ts +13 -0
- package/dist/inputs/mask_input/regex_character.d.ts.map +1 -0
- package/dist/inputs/mask_input/regex_character.js +33 -0
- package/dist/inputs/mask_input/regex_character.js.map +1 -0
- package/dist/inputs/multi_combo_box/multi_combo_box.d.ts +16 -0
- package/dist/inputs/multi_combo_box/multi_combo_box.d.ts.map +1 -0
- package/dist/inputs/multi_combo_box/multi_combo_box.js +101 -0
- package/dist/inputs/multi_combo_box/multi_combo_box.js.map +1 -0
- package/dist/inputs/multiselect/multiselect.d.ts +11 -0
- package/dist/inputs/multiselect/multiselect.d.ts.map +1 -0
- package/dist/inputs/multiselect/multiselect.js +105 -0
- package/dist/inputs/multiselect/multiselect.js.map +1 -0
- package/dist/inputs/multiselect/multiselect_inline_values.d.ts +9 -0
- package/dist/inputs/multiselect/multiselect_inline_values.d.ts.map +1 -0
- package/dist/inputs/multiselect/multiselect_inline_values.js +49 -0
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -0
- package/dist/inputs/multiselect/multiselect_row.d.ts +10 -0
- package/dist/inputs/multiselect/multiselect_row.d.ts.map +1 -0
- package/dist/inputs/multiselect/multiselect_row.js +35 -0
- package/dist/inputs/multiselect/multiselect_row.js.map +1 -0
- package/dist/inputs/multiselect/multiselect_values.d.ts +10 -0
- package/dist/inputs/multiselect/multiselect_values.d.ts.map +1 -0
- package/dist/inputs/multiselect/multiselect_values.js +62 -0
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -0
- package/dist/inputs/options/option.d.ts +11 -0
- package/dist/inputs/options/option.d.ts.map +1 -0
- package/dist/inputs/options/option.js +10 -0
- package/dist/inputs/options/option.js.map +1 -0
- package/dist/inputs/options/utils.d.ts +5 -0
- package/dist/inputs/options/utils.d.ts.map +1 -0
- package/dist/inputs/options/utils.js +13 -0
- package/dist/inputs/options/utils.js.map +1 -0
- package/dist/inputs/phone_number_input/countries_phone_information.d.ts +11 -0
- package/dist/inputs/phone_number_input/countries_phone_information.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/countries_phone_information.js +840 -0
- package/dist/inputs/phone_number_input/countries_phone_information.js.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +15 -0
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_input.js +209 -0
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -0
- package/dist/inputs/phone_number_input/utils.d.ts +2 -0
- package/dist/inputs/phone_number_input/utils.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/utils.js +7 -0
- package/dist/inputs/phone_number_input/utils.js.map +1 -0
- package/dist/inputs/radio/radio.d.ts +13 -0
- package/dist/inputs/radio/radio.d.ts.map +1 -0
- package/dist/inputs/radio/radio.js +57 -0
- package/dist/inputs/radio/radio.js.map +1 -0
- package/dist/inputs/radio/radio_row.d.ts +9 -0
- package/dist/inputs/radio/radio_row.d.ts.map +1 -0
- package/dist/inputs/radio/radio_row.js +19 -0
- package/dist/inputs/radio/radio_row.js.map +1 -0
- package/dist/inputs/select/select.d.ts +13 -0
- package/dist/inputs/select/select.d.ts.map +1 -0
- package/dist/inputs/select/select.js +107 -0
- package/dist/inputs/select/select.js.map +1 -0
- package/dist/inputs/slider/slider.d.ts +12 -0
- package/dist/inputs/slider/slider.d.ts.map +1 -0
- package/dist/inputs/slider/slider.js +42 -0
- package/dist/inputs/slider/slider.js.map +1 -0
- package/dist/inputs/slider/slider_row.d.ts +8 -0
- package/dist/inputs/slider/slider_row.d.ts.map +1 -0
- package/dist/inputs/slider/slider_row.js +16 -0
- package/dist/inputs/slider/slider_row.js.map +1 -0
- package/dist/inputs/suggestions/suggestion_item.d.ts +9 -0
- package/dist/inputs/suggestions/suggestion_item.d.ts.map +1 -0
- package/dist/inputs/suggestions/suggestion_item.js +38 -0
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -0
- package/dist/inputs/suggestions/suggestion_list.d.ts +15 -0
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -0
- package/dist/inputs/suggestions/suggestion_list.js +240 -0
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -0
- package/dist/inputs/switch/switch.d.ts +11 -0
- package/dist/inputs/switch/switch.d.ts.map +1 -0
- package/dist/inputs/switch/switch.js +71 -0
- package/dist/inputs/switch/switch.js.map +1 -0
- package/dist/inputs/switch/switch_row.d.ts +8 -0
- package/dist/inputs/switch/switch_row.d.ts.map +1 -0
- package/dist/inputs/switch/switch_row.js +16 -0
- package/dist/inputs/switch/switch_row.js.map +1 -0
- package/dist/inputs/textarea/textarea.d.ts +11 -0
- package/dist/inputs/textarea/textarea.d.ts.map +1 -0
- package/dist/inputs/textarea/textarea.js +22 -0
- package/dist/inputs/textarea/textarea.js.map +1 -0
- package/dist/inputs/textarea/textarea_row.d.ts +8 -0
- package/dist/inputs/textarea/textarea_row.d.ts.map +1 -0
- package/dist/inputs/textarea/textarea_row.js +12 -0
- package/dist/inputs/textarea/textarea_row.js.map +1 -0
- package/dist/inputs/unit_input/unit_input.d.ts +14 -0
- package/dist/inputs/unit_input/unit_input.d.ts.map +1 -0
- package/dist/inputs/unit_input/unit_input.js +83 -0
- package/dist/inputs/unit_input/unit_input.js.map +1 -0
- package/dist/layouts/column/column.d.ts +10 -0
- package/dist/layouts/column/column.d.ts.map +1 -0
- package/dist/layouts/column/column.js +52 -0
- package/dist/layouts/column/column.js.map +1 -0
- package/dist/layouts/divider/divider.d.ts +26 -0
- package/dist/layouts/divider/divider.d.ts.map +1 -0
- package/dist/layouts/divider/divider.js +54 -0
- package/dist/layouts/divider/divider.js.map +1 -0
- package/dist/layouts/draggable_list/draggable_list.d.ts +2 -0
- package/dist/layouts/draggable_list/draggable_list.d.ts.map +1 -0
- package/dist/layouts/draggable_list/draggable_list.js +6 -0
- package/dist/layouts/draggable_list/draggable_list.js.map +1 -0
- package/dist/layouts/drawers/drawer_bottom/drawer_bottom.d.ts +7 -0
- package/dist/layouts/drawers/drawer_bottom/drawer_bottom.d.ts.map +1 -0
- package/dist/layouts/drawers/drawer_bottom/drawer_bottom.js +22 -0
- package/dist/layouts/drawers/drawer_bottom/drawer_bottom.js.map +1 -0
- package/dist/layouts/drawers/drawer_end/drawer_end.d.ts +7 -0
- package/dist/layouts/drawers/drawer_end/drawer_end.d.ts.map +1 -0
- package/dist/layouts/drawers/drawer_end/drawer_end.js +20 -0
- package/dist/layouts/drawers/drawer_end/drawer_end.js.map +1 -0
- package/dist/layouts/drawers/drawer_start/drawer_start.d.ts +7 -0
- package/dist/layouts/drawers/drawer_start/drawer_start.d.ts.map +1 -0
- package/dist/layouts/drawers/drawer_start/drawer_start.js +22 -0
- package/dist/layouts/drawers/drawer_start/drawer_start.js.map +1 -0
- package/dist/layouts/drawers/drawer_top/drawer_top.d.ts +7 -0
- package/dist/layouts/drawers/drawer_top/drawer_top.d.ts.map +1 -0
- package/dist/layouts/drawers/drawer_top/drawer_top.js +20 -0
- package/dist/layouts/drawers/drawer_top/drawer_top.js.map +1 -0
- package/dist/layouts/footer/footer.d.ts +10 -0
- package/dist/layouts/footer/footer.d.ts.map +1 -0
- package/dist/layouts/footer/footer.js +22 -0
- package/dist/layouts/footer/footer.js.map +1 -0
- package/dist/layouts/grid/grid.d.ts +29 -0
- package/dist/layouts/grid/grid.d.ts.map +1 -0
- package/dist/layouts/grid/grid.js +78 -0
- package/dist/layouts/grid/grid.js.map +1 -0
- package/dist/layouts/header/header.d.ts +9 -0
- package/dist/layouts/header/header.d.ts.map +1 -0
- package/dist/layouts/header/header.js +30 -0
- package/dist/layouts/header/header.js.map +1 -0
- package/dist/layouts/index.d.ts +15 -0
- package/dist/layouts/index.d.ts.map +1 -0
- package/dist/layouts/index.js +31 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/layouts/list/item.d.ts +7 -0
- package/dist/layouts/list/item.d.ts.map +1 -0
- package/dist/layouts/list/item.js +11 -0
- package/dist/layouts/list/item.js.map +1 -0
- package/dist/layouts/list/list.d.ts +7 -0
- package/dist/layouts/list/list.d.ts.map +1 -0
- package/dist/layouts/list/list.js +20 -0
- package/dist/layouts/list/list.js.map +1 -0
- package/dist/layouts/list/section_header.d.ts +6 -0
- package/dist/layouts/list/section_header.d.ts.map +1 -0
- package/dist/layouts/list/section_header.js +12 -0
- package/dist/layouts/list/section_header.js.map +1 -0
- package/dist/layouts/sidebar_end/sidebar_end.d.ts +11 -0
- package/dist/layouts/sidebar_end/sidebar_end.d.ts.map +1 -0
- package/dist/layouts/sidebar_end/sidebar_end.js +58 -0
- package/dist/layouts/sidebar_end/sidebar_end.js.map +1 -0
- package/dist/layouts/sidebar_start/sidebar_start.d.ts +11 -0
- package/dist/layouts/sidebar_start/sidebar_start.d.ts.map +1 -0
- package/dist/layouts/sidebar_start/sidebar_start.js +55 -0
- package/dist/layouts/sidebar_start/sidebar_start.js.map +1 -0
- package/dist/layouts/utility_bar/utility_bar.d.ts +9 -0
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -0
- package/dist/layouts/utility_bar/utility_bar.js +32 -0
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -0
- package/dist/left_resize_handle.css +1 -0
- package/dist/loading.css +1 -0
- package/dist/menu.css +1 -0
- package/dist/modal.css +1 -0
- package/dist/multi_combo_box.css +1 -0
- package/dist/multiselect.css +1 -0
- package/dist/multiselect_values.css +1 -0
- package/dist/multiselect_values.module-BMJOyYHe.js +5 -0
- package/dist/multiselect_values.module-BMJOyYHe.js.map +1 -0
- package/dist/overlay/context_menu/context_menu.d.ts +10 -0
- package/dist/overlay/context_menu/context_menu.d.ts.map +1 -0
- package/dist/overlay/context_menu/context_menu.js +45 -0
- package/dist/overlay/context_menu/context_menu.js.map +1 -0
- package/dist/overlay/menu/menu.d.ts +29 -0
- package/dist/overlay/menu/menu.d.ts.map +1 -0
- package/dist/overlay/menu/menu.js +165 -0
- package/dist/overlay/menu/menu.js.map +1 -0
- package/dist/overlay/popper/popper.d.ts +22 -0
- package/dist/overlay/popper/popper.d.ts.map +1 -0
- package/dist/overlay/popper/popper.js +111 -0
- package/dist/overlay/popper/popper.js.map +1 -0
- package/dist/overlay/portal/portal.css +1 -0
- package/dist/overlay/portal/portal.d.ts +7 -0
- package/dist/overlay/portal/portal.d.ts.map +1 -0
- package/dist/overlay/portal/portal_platform.d.ts +27 -0
- package/dist/overlay/portal/portal_platform.d.ts.map +1 -0
- package/dist/overlay/portal/portal_platform.js +70 -0
- package/dist/overlay/portal/portal_platform.js.map +1 -0
- package/dist/overlay/portal/portal_platform_context.d.ts +6 -0
- package/dist/overlay/portal/portal_platform_context.d.ts.map +1 -0
- package/dist/overlay/portal/portal_platform_context.js +12 -0
- package/dist/overlay/portal/portal_platform_context.js.map +1 -0
- package/dist/overlay/tooltip/tooltip.d.ts +7 -0
- package/dist/overlay/tooltip/tooltip.d.ts.map +1 -0
- package/dist/overlay/tooltip/tooltip.js +20 -0
- package/dist/overlay/tooltip/tooltip.js.map +1 -0
- package/dist/page.css +1 -0
- package/dist/page.module-DXhph-u6.js +5 -0
- package/dist/page.module-DXhph-u6.js.map +1 -0
- package/dist/panel.css +1 -0
- package/dist/panel.module-CtikcmYB.js +5 -0
- package/dist/panel.module-CtikcmYB.js.map +1 -0
- package/dist/phone_number_input.css +1 -0
- package/dist/picture_placeholder.css +1 -0
- package/dist/popper.css +1 -0
- package/dist/portal-qqIp4SIl.js +12 -0
- package/dist/portal-qqIp4SIl.js.map +1 -0
- package/dist/progress_bar.css +1 -0
- package/dist/radio.css +1 -0
- package/dist/rect.css +1 -0
- package/dist/right_resize_handle.css +1 -0
- package/dist/select.css +1 -0
- package/dist/select_group.css +1 -0
- package/dist/sidebar_end.css +1 -0
- package/dist/sidebar_start.css +1 -0
- package/dist/slider.css +1 -0
- package/dist/slim_button.css +1 -0
- package/dist/stack.css +1 -0
- package/dist/stack.module-CBV1f12Z.js +5 -0
- package/dist/stack.module-CBV1f12Z.js.map +1 -0
- package/dist/stacks/box/bottom_resize_handle.d.ts +10 -0
- package/dist/stacks/box/bottom_resize_handle.d.ts.map +1 -0
- package/dist/stacks/box/bottom_resize_handle.js +33 -0
- package/dist/stacks/box/bottom_resize_handle.js.map +1 -0
- package/dist/stacks/box/box.d.ts +42 -0
- package/dist/stacks/box/box.d.ts.map +1 -0
- package/dist/stacks/box/box.js +168 -0
- package/dist/stacks/box/box.js.map +1 -0
- package/dist/stacks/box/end_resize_handle.d.ts +10 -0
- package/dist/stacks/box/end_resize_handle.d.ts.map +1 -0
- package/dist/stacks/box/end_resize_handle.js +33 -0
- package/dist/stacks/box/end_resize_handle.js.map +1 -0
- package/dist/stacks/box/handle_props.d.ts +7 -0
- package/dist/stacks/box/handle_props.d.ts.map +1 -0
- package/dist/stacks/box/handle_props.js +2 -0
- package/dist/stacks/box/handle_props.js.map +1 -0
- package/dist/stacks/box/left_resize_handle.d.ts +10 -0
- package/dist/stacks/box/left_resize_handle.d.ts.map +1 -0
- package/dist/stacks/box/left_resize_handle.js +35 -0
- package/dist/stacks/box/left_resize_handle.js.map +1 -0
- package/dist/stacks/box/resize_handlers.d.ts +3 -0
- package/dist/stacks/box/resize_handlers.d.ts.map +1 -0
- package/dist/stacks/box/resize_handlers.js +50 -0
- package/dist/stacks/box/resize_handlers.js.map +1 -0
- package/dist/stacks/box/right_resize_handle.d.ts +10 -0
- package/dist/stacks/box/right_resize_handle.d.ts.map +1 -0
- package/dist/stacks/box/right_resize_handle.js +35 -0
- package/dist/stacks/box/right_resize_handle.js.map +1 -0
- package/dist/stacks/box/start_resize_handle.d.ts +10 -0
- package/dist/stacks/box/start_resize_handle.d.ts.map +1 -0
- package/dist/stacks/box/start_resize_handle.js +34 -0
- package/dist/stacks/box/start_resize_handle.js.map +1 -0
- package/dist/stacks/box/top_resize_handle.d.ts +10 -0
- package/dist/stacks/box/top_resize_handle.d.ts.map +1 -0
- package/dist/stacks/box/top_resize_handle.js +34 -0
- package/dist/stacks/box/top_resize_handle.js.map +1 -0
- package/dist/stacks/h_collapsible_box.d.ts +8 -0
- package/dist/stacks/h_collapsible_box.d.ts.map +1 -0
- package/dist/stacks/h_collapsible_box.js +40 -0
- package/dist/stacks/h_collapsible_box.js.map +1 -0
- package/dist/stacks/h_stack.d.ts +10 -0
- package/dist/stacks/h_stack.d.ts.map +1 -0
- package/dist/stacks/h_stack.js +101 -0
- package/dist/stacks/h_stack.js.map +1 -0
- package/dist/stacks/index.d.ts +12 -0
- package/dist/stacks/index.d.ts.map +1 -0
- package/dist/stacks/index.js +17 -0
- package/dist/stacks/index.js.map +1 -0
- package/dist/stacks/spacer.d.ts +12 -0
- package/dist/stacks/spacer.d.ts.map +1 -0
- package/dist/stacks/spacer.js +37 -0
- package/dist/stacks/spacer.js.map +1 -0
- package/dist/stacks/story_components/circle.d.ts +8 -0
- package/dist/stacks/story_components/circle.d.ts.map +1 -0
- package/dist/stacks/story_components/circle.js +25 -0
- package/dist/stacks/story_components/circle.js.map +1 -0
- package/dist/stacks/story_components/horizontal_border.d.ts +5 -0
- package/dist/stacks/story_components/horizontal_border.d.ts.map +1 -0
- package/dist/stacks/story_components/horizontal_border.js +18 -0
- package/dist/stacks/story_components/horizontal_border.js.map +1 -0
- package/dist/stacks/story_components/picture_placeholder.d.ts +7 -0
- package/dist/stacks/story_components/picture_placeholder.d.ts.map +1 -0
- package/dist/stacks/story_components/picture_placeholder.js +39 -0
- package/dist/stacks/story_components/picture_placeholder.js.map +1 -0
- package/dist/stacks/story_components/rect.d.ts +7 -0
- package/dist/stacks/story_components/rect.d.ts.map +1 -0
- package/dist/stacks/story_components/rect.js +32 -0
- package/dist/stacks/story_components/rect.js.map +1 -0
- package/dist/stacks/story_components/style_box.d.ts +5 -0
- package/dist/stacks/story_components/style_box.d.ts.map +1 -0
- package/dist/stacks/story_components/style_box.js +12 -0
- package/dist/stacks/story_components/style_box.js.map +1 -0
- package/dist/stacks/types/alignment.d.ts +2 -0
- package/dist/stacks/types/alignment.d.ts.map +1 -0
- package/dist/stacks/types/as.d.ts +5 -0
- package/dist/stacks/types/as.d.ts.map +1 -0
- package/dist/stacks/types/common.d.ts +5 -0
- package/dist/stacks/types/common.d.ts.map +1 -0
- package/dist/stacks/types/styles.d.ts +42 -0
- package/dist/stacks/types/styles.d.ts.map +1 -0
- package/dist/stacks/utils/extract_style_props.d.ts +10 -0
- package/dist/stacks/utils/extract_style_props.d.ts.map +1 -0
- package/dist/stacks/utils/extract_style_props.js +297 -0
- package/dist/stacks/utils/extract_style_props.js.map +1 -0
- package/dist/stacks/utils/isCustomSizeProp.d.ts +2 -0
- package/dist/stacks/utils/isCustomSizeProp.d.ts.map +1 -0
- package/dist/stacks/utils/isCustomSizeProp.js +7 -0
- package/dist/stacks/utils/isCustomSizeProp.js.map +1 -0
- package/dist/stacks/utils/remove_undefined_properties.d.ts +2 -0
- package/dist/stacks/utils/remove_undefined_properties.d.ts.map +1 -0
- package/dist/stacks/utils/remove_undefined_properties.js +10 -0
- package/dist/stacks/utils/remove_undefined_properties.js.map +1 -0
- package/dist/stacks/utils/use_is_collapsed.d.ts +3 -0
- package/dist/stacks/utils/use_is_collapsed.d.ts.map +1 -0
- package/dist/stacks/utils/use_is_collapsed.js +22 -0
- package/dist/stacks/utils/use_is_collapsed.js.map +1 -0
- package/dist/stacks/v_collapsible_box.d.ts +8 -0
- package/dist/stacks/v_collapsible_box.d.ts.map +1 -0
- package/dist/stacks/v_collapsible_box.js +40 -0
- package/dist/stacks/v_collapsible_box.js.map +1 -0
- package/dist/stacks/v_stack.d.ts +10 -0
- package/dist/stacks/v_stack.d.ts.map +1 -0
- package/dist/stacks/v_stack.js +102 -0
- package/dist/stacks/v_stack.js.map +1 -0
- package/dist/stacks/z_stack.d.ts +12 -0
- package/dist/stacks/z_stack.d.ts.map +1 -0
- package/dist/stacks/z_stack.js +89 -0
- package/dist/stacks/z_stack.js.map +1 -0
- package/dist/start_resize_handle.css +1 -0
- package/dist/status_input.css +1 -0
- package/dist/subheadline.css +1 -0
- package/dist/subheadline.module-C-v7zMkQ.js +5 -0
- package/dist/subheadline.module-C-v7zMkQ.js.map +1 -0
- package/dist/suggestion_item.css +1 -0
- package/dist/suggestion_list.css +1 -0
- package/dist/surfaces/alert/alert.d.ts +11 -0
- package/dist/surfaces/alert/alert.d.ts.map +1 -0
- package/dist/surfaces/alert/alert.js +25 -0
- package/dist/surfaces/alert/alert.js.map +1 -0
- package/dist/surfaces/card/card.d.ts +7 -0
- package/dist/surfaces/card/card.d.ts.map +1 -0
- package/dist/surfaces/card/card.js +20 -0
- package/dist/surfaces/card/card.js.map +1 -0
- package/dist/surfaces/confirm/confirm.d.ts +12 -0
- package/dist/surfaces/confirm/confirm.d.ts.map +1 -0
- package/dist/surfaces/confirm/confirm.js +70 -0
- package/dist/surfaces/confirm/confirm.js.map +1 -0
- package/dist/surfaces/index.d.ts +11 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +23 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/modal/modal.d.ts +7 -0
- package/dist/surfaces/modal/modal.d.ts.map +1 -0
- package/dist/surfaces/modal/modal.js +11 -0
- package/dist/surfaces/modal/modal.js.map +1 -0
- package/dist/surfaces/page/h_page.d.ts +6 -0
- package/dist/surfaces/page/h_page.d.ts.map +1 -0
- package/dist/surfaces/page/h_page.js +22 -0
- package/dist/surfaces/page/h_page.js.map +1 -0
- package/dist/surfaces/page/v_page.d.ts +6 -0
- package/dist/surfaces/page/v_page.d.ts.map +1 -0
- package/dist/surfaces/page/v_page.js +21 -0
- package/dist/surfaces/page/v_page.js.map +1 -0
- package/dist/surfaces/panel/h_panel.d.ts +9 -0
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -0
- package/dist/surfaces/panel/h_panel.js +56 -0
- package/dist/surfaces/panel/h_panel.js.map +1 -0
- package/dist/surfaces/panel/v_panel.d.ts +9 -0
- package/dist/surfaces/panel/v_panel.d.ts.map +1 -0
- package/dist/surfaces/panel/v_panel.js +56 -0
- package/dist/surfaces/panel/v_panel.js.map +1 -0
- package/dist/surfaces/popover/popover.d.ts +6 -0
- package/dist/surfaces/popover/popover.d.ts.map +1 -0
- package/dist/surfaces/popover/popover.js +52 -0
- package/dist/surfaces/popover/popover.js.map +1 -0
- package/dist/surfaces/window/window.d.ts +5 -0
- package/dist/surfaces/window/window.d.ts.map +1 -0
- package/dist/surfaces/window/window.js +19 -0
- package/dist/surfaces/window/window.js.map +1 -0
- package/dist/switch.css +1 -0
- package/dist/textarea.css +1 -0
- package/dist/themes/index.d.ts +6 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +343 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/stories/button_showcase.d.ts +2 -0
- package/dist/themes/stories/button_showcase.d.ts.map +1 -0
- package/dist/themes/stories/controls_fieldset.d.ts +2 -0
- package/dist/themes/stories/controls_fieldset.d.ts.map +1 -0
- package/dist/themes/stories/menu_showcase.d.ts +2 -0
- package/dist/themes/stories/menu_showcase.d.ts.map +1 -0
- package/dist/themes/stylesheets/reset.css +1 -0
- package/dist/themes/stylesheets/reset.d.ts +2 -0
- package/dist/themes/stylesheets/reset.d.ts.map +1 -0
- package/dist/themes/theme.d.ts +7 -0
- package/dist/themes/theme.d.ts.map +1 -0
- package/dist/themes/theme.js +10 -0
- package/dist/themes/theme.js.map +1 -0
- package/dist/themes/theme_variables.d.ts +66 -0
- package/dist/themes/theme_variables.d.ts.map +1 -0
- package/dist/themes/theme_variables.js +69 -0
- package/dist/themes/theme_variables.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.css +1 -0
- package/dist/themes/themes/ergo/ergo_theme.d.ts +2 -0
- package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -0
- package/dist/themes/themes/windows_98/windows_98.css +1 -0
- package/dist/themes/themes/windows_98/windows_98_theme.d.ts +2 -0
- package/dist/themes/themes/windows_98/windows_98_theme.d.ts.map +1 -0
- package/dist/themes/themes/windows_98/windows_98_theme.js +1171 -0
- package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -0
- package/dist/title.css +1 -0
- package/dist/title.module-B16de2jd.js +5 -0
- package/dist/title.module-B16de2jd.js.map +1 -0
- package/dist/tokens/badge/badge.d.ts +8 -0
- package/dist/tokens/badge/badge.d.ts.map +1 -0
- package/dist/tokens/badge/badge.js +50 -0
- package/dist/tokens/badge/badge.js.map +1 -0
- package/dist/tokens/bubble/bubble.d.ts +11 -0
- package/dist/tokens/bubble/bubble.d.ts.map +1 -0
- package/dist/tokens/bubble/bubble.js +44 -0
- package/dist/tokens/bubble/bubble.js.map +1 -0
- package/dist/tokens/chip/chip.d.ts +9 -0
- package/dist/tokens/chip/chip.d.ts.map +1 -0
- package/dist/tokens/chip/chip.js +30 -0
- package/dist/tokens/chip/chip.js.map +1 -0
- package/dist/tokens/index.d.ts +4 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +9 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tooltip.css +1 -0
- package/dist/top_resize_handle.css +1 -0
- package/dist/typography/body_text/body_text.d.ts +18 -0
- package/dist/typography/body_text/body_text.d.ts.map +1 -0
- package/dist/typography/body_text/body_text.js +37 -0
- package/dist/typography/body_text/body_text.js.map +1 -0
- package/dist/typography/callout/callout.d.ts +18 -0
- package/dist/typography/callout/callout.d.ts.map +1 -0
- package/dist/typography/callout/callout.js +35 -0
- package/dist/typography/callout/callout.js.map +1 -0
- package/dist/typography/caption/caption.d.ts +18 -0
- package/dist/typography/caption/caption.d.ts.map +1 -0
- package/dist/typography/caption/caption.js +35 -0
- package/dist/typography/caption/caption.js.map +1 -0
- package/dist/typography/footnote/footnote.d.ts +18 -0
- package/dist/typography/footnote/footnote.d.ts.map +1 -0
- package/dist/typography/footnote/footnote.js +35 -0
- package/dist/typography/footnote/footnote.js.map +1 -0
- package/dist/typography/headline/headline.d.ts +18 -0
- package/dist/typography/headline/headline.d.ts.map +1 -0
- package/dist/typography/headline/headline.js +36 -0
- package/dist/typography/headline/headline.js.map +1 -0
- package/dist/typography/index.d.ts +8 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography/index.js +17 -0
- package/dist/typography/index.js.map +1 -0
- package/dist/typography/subheadline/subheadline.d.ts +18 -0
- package/dist/typography/subheadline/subheadline.d.ts.map +1 -0
- package/dist/typography/subheadline/subheadline.js +36 -0
- package/dist/typography/subheadline/subheadline.js.map +1 -0
- package/dist/typography/title/title.d.ts +19 -0
- package/dist/typography/title/title.d.ts.map +1 -0
- package/dist/typography/title/title.js +37 -0
- package/dist/typography/title/title.js.map +1 -0
- package/dist/unit_input.css +1 -0
- package/dist/utility_bar.css +1 -0
- package/dist/utils/calendar/calendar_date.d.ts +10 -0
- package/dist/utils/calendar/calendar_date.d.ts.map +1 -0
- package/dist/utils/calendar/calendar_date.js +2 -0
- package/dist/utils/calendar/calendar_date.js.map +1 -0
- package/dist/utils/calendar/calendar_dates_generator.d.ts +10 -0
- package/dist/utils/calendar/calendar_dates_generator.d.ts.map +1 -0
- package/dist/utils/calendar/calendar_dates_generator.js +37 -0
- package/dist/utils/calendar/calendar_dates_generator.js.map +1 -0
- package/dist/utils/calendar/get_days_of_week.d.ts +2 -0
- package/dist/utils/calendar/get_days_of_week.d.ts.map +1 -0
- package/dist/utils/calendar/get_days_of_week.js +12 -0
- package/dist/utils/calendar/get_days_of_week.js.map +1 -0
- package/dist/utils/calendar/get_months_of_year.d.ts +2 -0
- package/dist/utils/calendar/get_months_of_year.d.ts.map +1 -0
- package/dist/utils/calendar/get_months_of_year.js +18 -0
- package/dist/utils/calendar/get_months_of_year.js.map +1 -0
- package/dist/utils/calendar/month.d.ts +16 -0
- package/dist/utils/calendar/month.d.ts.map +1 -0
- package/dist/utils/calendar/month.js +18 -0
- package/dist/utils/calendar/month.js.map +1 -0
- package/dist/utils/click_away_listener.d.ts +11 -0
- package/dist/utils/click_away_listener.d.ts.map +1 -0
- package/dist/utils/click_away_listener.js +58 -0
- package/dist/utils/click_away_listener.js.map +1 -0
- package/dist/utils/default_value.d.ts +2 -0
- package/dist/utils/default_value.d.ts.map +1 -0
- package/dist/utils/default_value.js +7 -0
- package/dist/utils/default_value.js.map +1 -0
- package/dist/utils/focus_redirect.d.ts +6 -0
- package/dist/utils/focus_redirect.d.ts.map +1 -0
- package/dist/utils/focus_redirect.js +24 -0
- package/dist/utils/focus_redirect.js.map +1 -0
- package/dist/utils/hooks/make_context_hook.d.ts +5 -0
- package/dist/utils/hooks/make_context_hook.d.ts.map +1 -0
- package/dist/utils/hooks/make_context_hook.js +11 -0
- package/dist/utils/hooks/make_context_hook.js.map +1 -0
- package/dist/utils/hooks/use_draggable.d.ts +8 -0
- package/dist/utils/hooks/use_draggable.d.ts.map +1 -0
- package/dist/utils/hooks/use_draggable.js +30 -0
- package/dist/utils/hooks/use_draggable.js.map +1 -0
- package/dist/utils/hooks/use_fork_ref.d.ts +3 -0
- package/dist/utils/hooks/use_fork_ref.d.ts.map +1 -0
- package/dist/utils/hooks/use_fork_ref.js +12 -0
- package/dist/utils/hooks/use_fork_ref.js.map +1 -0
- package/dist/utils/hooks/use_media_query.d.ts +9 -0
- package/dist/utils/hooks/use_media_query.d.ts.map +1 -0
- package/dist/utils/hooks/use_media_query.js +16 -0
- package/dist/utils/hooks/use_media_query.js.map +1 -0
- package/dist/utils/hooks/use_resize_observer.d.ts +9 -0
- package/dist/utils/hooks/use_resize_observer.d.ts.map +1 -0
- package/dist/utils/hooks/use_resize_observer.js +78 -0
- package/dist/utils/hooks/use_resize_observer.js.map +1 -0
- package/dist/utils/index.d.ts +17 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +30 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/responsive/responsive_renderer.d.ts +21 -0
- package/dist/utils/responsive/responsive_renderer.d.ts.map +1 -0
- package/dist/utils/responsive/responsive_renderer.js +12 -0
- package/dist/utils/responsive/responsive_renderer.js.map +1 -0
- package/dist/utils/scroll_away_listener.d.ts +18 -0
- package/dist/utils/scroll_away_listener.d.ts.map +1 -0
- package/dist/utils/scroll_away_listener.js +23 -0
- package/dist/utils/scroll_away_listener.js.map +1 -0
- package/dist/utils/types/dimensions.d.ts +15 -0
- package/dist/utils/types/dimensions.d.ts.map +1 -0
- package/dist/utils/types/variations.d.ts +5 -0
- package/dist/utils/types/variations.d.ts.map +1 -0
- package/dist/v_field.css +0 -0
- package/dist/window.css +1 -0
- package/package.json +136 -0
- package/src/actions/button/__stories__/button.stories.tsx +159 -0
- package/src/actions/button/__stories__/button_group.stories.tsx +106 -0
- package/src/actions/button/__stories__/select_group.stories.tsx +156 -0
- package/src/actions/button/__stories__/slim_button.stories.tsx +274 -0
- package/src/actions/button/base_button/base_button.module.css +15 -0
- package/src/actions/button/base_button/base_button.tsx +81 -0
- package/src/actions/button/button/button.module.css +129 -0
- package/src/actions/button/button/button.tsx +21 -0
- package/src/actions/button/button_group/button_group.module.css +67 -0
- package/src/actions/button/button_group/button_group.tsx +69 -0
- package/src/actions/button/select_group/select_group.module.css +67 -0
- package/src/actions/button/select_group/select_group.tsx +78 -0
- package/src/actions/button/select_group/single_select_group.tsx +48 -0
- package/src/actions/button/slim_button/slim_button.module.css +33 -0
- package/src/actions/button/slim_button/slim_button.tsx +18 -0
- package/src/actions/index.ts +19 -0
- package/src/feedback/index.ts +3 -0
- package/src/feedback/lazy/lazy.stories.tsx +56 -0
- package/src/feedback/lazy/lazy.tsx +53 -0
- package/src/feedback/loading/__storybook__/loading.stories.tsx +81 -0
- package/src/feedback/loading/__storybook__/storybook_custom_lines.module.css +3 -0
- package/src/feedback/loading/loading.module.css +20 -0
- package/src/feedback/loading/loading.tsx +71 -0
- package/src/feedback/progress/progress_bar.module.css +59 -0
- package/src/feedback/progress/progress_bar.stories.tsx +48 -0
- package/src/feedback/progress/progress_bar.tsx +43 -0
- package/src/feedback/storybook.module.css +5 -0
- package/src/form/field/common/field_control/field_control.module.css +20 -0
- package/src/form/field/common/field_control/field_control.tsx +53 -0
- package/src/form/field/common/field_description.tsx +26 -0
- package/src/form/field/common/field_error.tsx +37 -0
- package/src/form/field/common/field_header.tsx +40 -0
- package/src/form/field/common/field_label.tsx +38 -0
- package/src/form/field/common/status_input/status_input.module.css +10 -0
- package/src/form/field/common/status_input/status_input.tsx +84 -0
- package/src/form/field/common/types.ts +9 -0
- package/src/form/field/field.stories.tsx +131 -0
- package/src/form/field/field.tsx +37 -0
- package/src/form/field/form_field.tsx +29 -0
- package/src/form/field/h_field/h_field.module.css +6 -0
- package/src/form/field/h_field/h_field.stories.tsx +90 -0
- package/src/form/field/h_field/h_field.tsx +70 -0
- package/src/form/field/v_field/v_field.module.css +0 -0
- package/src/form/field/v_field/v_field.stories.tsx +90 -0
- package/src/form/field/v_field/v_field.tsx +74 -0
- package/src/form/field_presenters/field_presenter.ts +162 -0
- package/src/form/field_presenters/options_field_presenter.ts +36 -0
- package/src/form/field_set/field_set.module.css +17 -0
- package/src/form/field_set/field_set.stories.tsx +102 -0
- package/src/form/field_set/field_set.tsx +65 -0
- package/src/form/form_field.tsx +29 -0
- package/src/form/index.ts +5 -0
- package/src/inputs/__storybook__/stories.module.css +5 -0
- package/src/inputs/checkbox/checkbox.module.css +51 -0
- package/src/inputs/checkbox/checkbox.stories.tsx +48 -0
- package/src/inputs/checkbox/checkbox.tsx +43 -0
- package/src/inputs/checkbox/checkbox_row.tsx +29 -0
- package/src/inputs/color_input/color_input.module.css +62 -0
- package/src/inputs/color_input/color_input.stories.tsx +39 -0
- package/src/inputs/color_input/color_input.tsx +153 -0
- package/src/inputs/color_input/color_picker.module.css +13 -0
- package/src/inputs/color_input/color_picker.tsx +41 -0
- package/src/inputs/combo_box/combo_box.stories.tsx +93 -0
- package/src/inputs/combo_box/combo_box.tsx +153 -0
- package/src/inputs/date_picker/date_picker.module.css +20 -0
- package/src/inputs/date_picker/date_picker.stories.tsx +126 -0
- package/src/inputs/date_picker/date_picker.tsx +170 -0
- package/src/inputs/date_picker/date_picker_body.tsx +53 -0
- package/src/inputs/date_picker/date_picker_date.module.css +78 -0
- package/src/inputs/date_picker/date_picker_date.tsx +99 -0
- package/src/inputs/date_picker/date_picker_day.module.css +4 -0
- package/src/inputs/date_picker/date_picker_day.tsx +29 -0
- package/src/inputs/date_picker/date_picker_header.module.css +3 -0
- package/src/inputs/date_picker/date_picker_header.tsx +98 -0
- package/src/inputs/date_picker/date_picker_input.module.css +61 -0
- package/src/inputs/date_picker/date_picker_input.stories.tsx +108 -0
- package/src/inputs/date_picker/date_picker_input.tsx +180 -0
- package/src/inputs/date_picker/date_picker_presenter.ts +426 -0
- package/src/inputs/date_picker/date_picker_time_selector.module.css +33 -0
- package/src/inputs/date_picker/date_picker_time_selector.tsx +112 -0
- package/src/inputs/date_picker/date_picker_year_input.module.css +49 -0
- package/src/inputs/date_picker/date_picker_year_input.tsx +51 -0
- package/src/inputs/date_picker/date_picker_year_selector.module.css +51 -0
- package/src/inputs/date_picker/date_picker_year_selector.tsx +130 -0
- package/src/inputs/index.ts +60 -0
- package/src/inputs/input/input.module.css +80 -0
- package/src/inputs/input/input.stories.tsx +129 -0
- package/src/inputs/input/input.tsx +36 -0
- package/src/inputs/mask_input/__tests__/mask_presenter.test.ts +131 -0
- package/src/inputs/mask_input/alpha_character.ts +13 -0
- package/src/inputs/mask_input/alpha_numeric_character.ts +13 -0
- package/src/inputs/mask_input/character.ts +31 -0
- package/src/inputs/mask_input/constant_character.ts +46 -0
- package/src/inputs/mask_input/key_capture_input.stories.tsx +69 -0
- package/src/inputs/mask_input/key_capture_input.tsx +144 -0
- package/src/inputs/mask_input/language_character.ts +13 -0
- package/src/inputs/mask_input/mask.ts +309 -0
- package/src/inputs/mask_input/mask_config.ts +25 -0
- package/src/inputs/mask_input/mask_cursor.ts +23 -0
- package/src/inputs/mask_input/mask_input.stories.tsx +63 -0
- package/src/inputs/mask_input/mask_input.tsx +246 -0
- package/src/inputs/mask_input/mask_presenter.ts +306 -0
- package/src/inputs/mask_input/numeric_character.ts +13 -0
- package/src/inputs/mask_input/regex_character.ts +62 -0
- package/src/inputs/multi_combo_box/multi_combo_box.module.css +3 -0
- package/src/inputs/multi_combo_box/multi_combo_box.stories.tsx +71 -0
- package/src/inputs/multi_combo_box/multi_combo_box.tsx +133 -0
- package/src/inputs/multiselect/multiselect.module.css +3 -0
- package/src/inputs/multiselect/multiselect.tsx +133 -0
- package/src/inputs/multiselect/multiselect_inline_values.tsx +49 -0
- package/src/inputs/multiselect/multiselect_row.tsx +57 -0
- package/src/inputs/multiselect/multiselect_values.module.css +31 -0
- package/src/inputs/multiselect/multiselect_values.tsx +63 -0
- package/src/inputs/multiselect/mutliselect.stories.tsx +112 -0
- package/src/inputs/options/option.tsx +23 -0
- package/src/inputs/options/utils.ts +18 -0
- package/src/inputs/phone_number_input/__tests__/utils.test.ts +52 -0
- package/src/inputs/phone_number_input/countries_phone_information.ts +846 -0
- package/src/inputs/phone_number_input/phone_number_input.module.css +50 -0
- package/src/inputs/phone_number_input/phone_number_input.stories.tsx +119 -0
- package/src/inputs/phone_number_input/phone_number_input.tsx +329 -0
- package/src/inputs/phone_number_input/utils.ts +7 -0
- package/src/inputs/radio/radio.module.css +87 -0
- package/src/inputs/radio/radio.stories.tsx +20 -0
- package/src/inputs/radio/radio.tsx +68 -0
- package/src/inputs/radio/radio_row.tsx +45 -0
- package/src/inputs/select/select.module.css +66 -0
- package/src/inputs/select/select.stories.tsx +173 -0
- package/src/inputs/select/select.tsx +160 -0
- package/src/inputs/slider/slider.module.css +150 -0
- package/src/inputs/slider/slider.stories.tsx +52 -0
- package/src/inputs/slider/slider.tsx +57 -0
- package/src/inputs/slider/slider_row.tsx +33 -0
- package/src/inputs/suggestions/suggestion_item.module.css +54 -0
- package/src/inputs/suggestions/suggestion_item.tsx +53 -0
- package/src/inputs/suggestions/suggestion_list.module.css +29 -0
- package/src/inputs/suggestions/suggestion_list.stories.tsx +348 -0
- package/src/inputs/suggestions/suggestion_list.tsx +411 -0
- package/src/inputs/switch/TODO.md +3 -0
- package/src/inputs/switch/switch.module.css +110 -0
- package/src/inputs/switch/switch.stories.tsx +63 -0
- package/src/inputs/switch/switch.tsx +82 -0
- package/src/inputs/switch/switch_row.tsx +33 -0
- package/src/inputs/textarea/textarea.module.css +66 -0
- package/src/inputs/textarea/textarea.stories.tsx +44 -0
- package/src/inputs/textarea/textarea.tsx +32 -0
- package/src/inputs/textarea/textarea_row.tsx +24 -0
- package/src/inputs/unit_input/unit_input.module.css +23 -0
- package/src/inputs/unit_input/unit_input.stories.tsx +100 -0
- package/src/inputs/unit_input/unit_input.tsx +115 -0
- package/src/layouts/column/column.module.css +33 -0
- package/src/layouts/column/column.tsx +57 -0
- package/src/layouts/divider/__stories__/divider.stories.tsx +103 -0
- package/src/layouts/divider/divider.module.css +102 -0
- package/src/layouts/divider/divider.tsx +81 -0
- package/src/layouts/draggable_list/draggable_list.tsx +5 -0
- package/src/layouts/drawers/__stories__/drawers.stories.tsx +26 -0
- package/src/layouts/drawers/drawer_bottom/drawer_bottom.module.css +3 -0
- package/src/layouts/drawers/drawer_bottom/drawer_bottom.tsx +23 -0
- package/src/layouts/drawers/drawer_end/drawer_end.module.css +3 -0
- package/src/layouts/drawers/drawer_end/drawer_end.tsx +24 -0
- package/src/layouts/drawers/drawer_start/drawer_start.module.css +3 -0
- package/src/layouts/drawers/drawer_start/drawer_start.tsx +23 -0
- package/src/layouts/drawers/drawer_top/drawer_top.module.css +3 -0
- package/src/layouts/drawers/drawer_top/drawer_top.tsx +24 -0
- package/src/layouts/footer/footer.module.css +31 -0
- package/src/layouts/footer/footer.tsx +29 -0
- package/src/layouts/grid/grid.module.css +22 -0
- package/src/layouts/grid/grid.stories.tsx +260 -0
- package/src/layouts/grid/grid.tsx +120 -0
- package/src/layouts/header/header.module.css +6 -0
- package/src/layouts/header/header.tsx +37 -0
- package/src/layouts/index.ts +14 -0
- package/src/layouts/list/item.tsx +18 -0
- package/src/layouts/list/list.tsx +23 -0
- package/src/layouts/list/section_header.module.css +18 -0
- package/src/layouts/list/section_header.tsx +15 -0
- package/src/layouts/sidebar_end/sidebar_end.module.css +31 -0
- package/src/layouts/sidebar_end/sidebar_end.tsx +64 -0
- package/src/layouts/sidebar_start/sidebar_start.module.css +31 -0
- package/src/layouts/sidebar_start/sidebar_start.tsx +61 -0
- package/src/layouts/utility_bar/utility_bar.module.css +7 -0
- package/src/layouts/utility_bar/utility_bar.tsx +39 -0
- package/src/overlay/context_menu/context_menu.stories.tsx +79 -0
- package/src/overlay/context_menu/context_menu.tsx +55 -0
- package/src/overlay/menu/menu.module.css +33 -0
- package/src/overlay/menu/menu.stories.tsx +345 -0
- package/src/overlay/menu/menu.tsx +267 -0
- package/src/overlay/popper/popper.module.css +10 -0
- package/src/overlay/popper/popper.stories.tsx +431 -0
- package/src/overlay/popper/popper.tsx +218 -0
- package/src/overlay/portal/portal.css +35 -0
- package/src/overlay/portal/portal.stories.tsx +43 -0
- package/src/overlay/portal/portal.tsx +26 -0
- package/src/overlay/portal/portal_platform.tsx +120 -0
- package/src/overlay/portal/portal_platform_context.ts +11 -0
- package/src/overlay/tooltip/tooltip.module.css +3 -0
- package/src/overlay/tooltip/tooltip.stories.tsx +15 -0
- package/src/overlay/tooltip/tooltip.tsx +24 -0
- package/src/stacks/box/bottom_resize_handle.module.css +10 -0
- package/src/stacks/box/bottom_resize_handle.tsx +42 -0
- package/src/stacks/box/box.tsx +220 -0
- package/src/stacks/box/end_resize_handle.module.css +17 -0
- package/src/stacks/box/end_resize_handle.tsx +42 -0
- package/src/stacks/box/handle_props.ts +6 -0
- package/src/stacks/box/left_resize_handle.module.css +10 -0
- package/src/stacks/box/left_resize_handle.tsx +43 -0
- package/src/stacks/box/resize_handlers.ts +129 -0
- package/src/stacks/box/right_resize_handle.module.css +10 -0
- package/src/stacks/box/right_resize_handle.tsx +43 -0
- package/src/stacks/box/start_resize_handle.module.css +17 -0
- package/src/stacks/box/start_resize_handle.tsx +42 -0
- package/src/stacks/box/top_resize_handle.module.css +10 -0
- package/src/stacks/box/top_resize_handle.tsx +41 -0
- package/src/stacks/collapsible_box.module.css +37 -0
- package/src/stacks/collapsible_box.stories.tsx +66 -0
- package/src/stacks/demo.module.css +4 -0
- package/src/stacks/demo.stories.tsx +145 -0
- package/src/stacks/h_collapsible_box.tsx +48 -0
- package/src/stacks/h_stack.stories.tsx +107 -0
- package/src/stacks/h_stack.tsx +114 -0
- package/src/stacks/index.ts +11 -0
- package/src/stacks/spacer.tsx +47 -0
- package/src/stacks/stack.module.css +357 -0
- package/src/stacks/stacks.mdx +240 -0
- package/src/stacks/story_components/circle.module.css +7 -0
- package/src/stacks/story_components/circle.tsx +30 -0
- package/src/stacks/story_components/horizontal_border.tsx +15 -0
- package/src/stacks/story_components/picture_placeholder.module.css +3 -0
- package/src/stacks/story_components/picture_placeholder.tsx +42 -0
- package/src/stacks/story_components/rect.module.css +8 -0
- package/src/stacks/story_components/rect.tsx +36 -0
- package/src/stacks/story_components/style_box.tsx +19 -0
- package/src/stacks/types/alignment.ts +1 -0
- package/src/stacks/types/as.tsx +11 -0
- package/src/stacks/types/common.ts +4 -0
- package/src/stacks/types/styles.ts +44 -0
- package/src/stacks/utils/extract_style_props.ts +323 -0
- package/src/stacks/utils/isCustomSizeProp.ts +3 -0
- package/src/stacks/utils/remove_undefined_properties.ts +11 -0
- package/src/stacks/utils/use_is_collapsed.ts +33 -0
- package/src/stacks/v_collapsible_box.tsx +48 -0
- package/src/stacks/v_stack.stories.tsx +40 -0
- package/src/stacks/v_stack.tsx +118 -0
- package/src/stacks/z_stack.stories.tsx +119 -0
- package/src/stacks/z_stack.tsx +104 -0
- package/src/surfaces/alert/alert.stories.tsx +33 -0
- package/src/surfaces/alert/alert.tsx +30 -0
- package/src/surfaces/card/card.module.css +5 -0
- package/src/surfaces/card/card.tsx +24 -0
- package/src/surfaces/confirm/confirm.module.css +40 -0
- package/src/surfaces/confirm/confirm.stories.tsx +43 -0
- package/src/surfaces/confirm/confirm.tsx +91 -0
- package/src/surfaces/index.ts +10 -0
- package/src/surfaces/modal/modal.module.css +3 -0
- package/src/surfaces/modal/modal.stories.tsx +15 -0
- package/src/surfaces/modal/modal.tsx +19 -0
- package/src/surfaces/page/h_page.tsx +23 -0
- package/src/surfaces/page/page.module.css +12 -0
- package/src/surfaces/page/v_page.tsx +22 -0
- package/src/surfaces/panel/h_panel.tsx +59 -0
- package/src/surfaces/panel/panel.module.css +14 -0
- package/src/surfaces/panel/v_panel.tsx +59 -0
- package/src/surfaces/popover/popover.tsx +53 -0
- package/src/surfaces/window/window.module.css +5 -0
- package/src/surfaces/window/window.stories.tsx +15 -0
- package/src/surfaces/window/window.tsx +21 -0
- package/src/themes/index.ts +5 -0
- package/src/themes/stories/button_showcase.tsx +153 -0
- package/src/themes/stories/controls_fieldset.tsx +249 -0
- package/src/themes/stories/menu_showcase.tsx +508 -0
- package/src/themes/stories/themes.stories.tsx +35 -0
- package/src/themes/stylesheets/reset.css +134 -0
- package/src/themes/stylesheets/reset.ts +4 -0
- package/src/themes/theme.tsx +14 -0
- package/src/themes/theme_variables.ts +81 -0
- package/src/themes/themes/ergo/ergo_theme.css +194 -0
- package/src/themes/themes/ergo/ergo_theme.ts +4 -0
- package/src/themes/themes/windows_98/windows_98.css +1165 -0
- package/src/themes/themes/windows_98/windows_98_theme.ts +4 -0
- package/src/tokens/badge/badge.module.css +14 -0
- package/src/tokens/badge/badge.stories.tsx +25 -0
- package/src/tokens/badge/badge.tsx +56 -0
- package/src/tokens/bubble/bubble.module.css +11 -0
- package/src/tokens/bubble/bubble.stories.tsx +168 -0
- package/src/tokens/bubble/bubble.tsx +53 -0
- package/src/tokens/chip/chip.module.css +13 -0
- package/src/tokens/chip/chip.stories.tsx +51 -0
- package/src/tokens/chip/chip.tsx +36 -0
- package/src/tokens/index.ts +3 -0
- package/src/typography/__tests__/sanity.test.ts +7 -0
- package/src/typography/body_text/body_text.module.css +60 -0
- package/src/typography/body_text/body_text.stories.tsx +46 -0
- package/src/typography/body_text/body_text.tsx +76 -0
- package/src/typography/callout/callout.module.css +55 -0
- package/src/typography/callout/callout.stories.tsx +94 -0
- package/src/typography/callout/callout.tsx +74 -0
- package/src/typography/caption/caption.module.css +55 -0
- package/src/typography/caption/caption.stories.tsx +94 -0
- package/src/typography/caption/caption.tsx +74 -0
- package/src/typography/footnote/footnote.module.css +55 -0
- package/src/typography/footnote/footnote.stories.tsx +94 -0
- package/src/typography/footnote/footnote.tsx +74 -0
- package/src/typography/headline/headline.module.css +56 -0
- package/src/typography/headline/headline.stories.tsx +94 -0
- package/src/typography/headline/headline.tsx +84 -0
- package/src/typography/index.ts +7 -0
- package/src/typography/subheadline/subheadline.module.css +56 -0
- package/src/typography/subheadline/subheadline.stories.tsx +94 -0
- package/src/typography/subheadline/subheadline.tsx +87 -0
- package/src/typography/title/title.module.css +53 -0
- package/src/typography/title/title.stories.tsx +46 -0
- package/src/typography/title/title.tsx +88 -0
- package/src/typography/typography-showcase.stories.tsx +347 -0
- package/src/utils/__stories__/use_draggable.stories.tsx +217 -0
- package/src/utils/calendar/calendar_date.ts +10 -0
- package/src/utils/calendar/calendar_dates_generator.ts +59 -0
- package/src/utils/calendar/get_days_of_week.ts +17 -0
- package/src/utils/calendar/get_months_of_year.ts +32 -0
- package/src/utils/calendar/month.ts +16 -0
- package/src/utils/click_away_listener.stories.tsx +264 -0
- package/src/utils/click_away_listener.tsx +124 -0
- package/src/utils/default_value.test.ts +20 -0
- package/src/utils/default_value.ts +3 -0
- package/src/utils/focus_redirect.tsx +26 -0
- package/src/utils/hooks/make_context_hook.ts +17 -0
- package/src/utils/hooks/use_draggable.ts +74 -0
- package/src/utils/hooks/use_fork_ref.ts +18 -0
- package/src/utils/hooks/use_media_query.ts +32 -0
- package/src/utils/hooks/use_resize_observer.ts +148 -0
- package/src/utils/index.ts +20 -0
- package/src/utils/responsive/responsive_renderer.stories.tsx +77 -0
- package/src/utils/responsive/responsive_renderer.tsx +31 -0
- package/src/utils/scroll_away_listener.stories.tsx +293 -0
- package/src/utils/scroll_away_listener.tsx +55 -0
- package/src/utils/types/dimensions.ts +16 -0
- package/src/utils/types/variations.ts +4 -0
- package/tsconfig.json +30 -0
- package/types/css_variables.d.ts +8 -0
- package/types/file_types.d.ts +54 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { BodyText } from '../../typography/index.js';
|
|
2
|
+
import { VStack } from '../../stacks/v_stack.js';
|
|
3
|
+
import { ZStack } from '../../stacks/z_stack.js';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import React, { useLayoutEffect, Children, isValidElement } from 'react';
|
|
6
|
+
import { useRef, useState } from 'react';
|
|
7
|
+
import { FocusRedirect } from '../../utils/index.js';
|
|
8
|
+
import { SuggestionItem } from './suggestion_item.js';
|
|
9
|
+
import { OptionProps, Option } from '../options/option.js';
|
|
10
|
+
import styles from './suggestion_list.module.css';
|
|
11
|
+
|
|
12
|
+
import { Button } from '../../actions/index.js';
|
|
13
|
+
import { Popper } from '../../overlay/popper/popper.js';
|
|
14
|
+
|
|
15
|
+
const MAX_RESULTS = 50;
|
|
16
|
+
const BATCH_SIZE = 50;
|
|
17
|
+
|
|
18
|
+
export interface SuggestionListProps
|
|
19
|
+
extends Omit<React.HTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
20
|
+
value?: string;
|
|
21
|
+
scrollToValue?: string;
|
|
22
|
+
anchorElement: HTMLElement | null;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
onChange?: (value: string) => void;
|
|
25
|
+
onOptionSelect?: (
|
|
26
|
+
value: string,
|
|
27
|
+
label: string | undefined,
|
|
28
|
+
isSuggestion: boolean
|
|
29
|
+
) => void;
|
|
30
|
+
noSuggestionMessage?: React.ReactNode;
|
|
31
|
+
trimCustomInput?: boolean;
|
|
32
|
+
haveValueAsOption?: boolean;
|
|
33
|
+
onClose?: (
|
|
34
|
+
inputValue: string,
|
|
35
|
+
cursorStartPosition: number | null,
|
|
36
|
+
cursorEndPosition: number | null
|
|
37
|
+
) => void;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function SuggestionList({
|
|
41
|
+
value = '',
|
|
42
|
+
scrollToValue,
|
|
43
|
+
anchorElement,
|
|
44
|
+
children,
|
|
45
|
+
onOptionSelect,
|
|
46
|
+
noSuggestionMessage = '-- No Matches --',
|
|
47
|
+
onClose,
|
|
48
|
+
onChange,
|
|
49
|
+
onKeyUp,
|
|
50
|
+
onKeyDown,
|
|
51
|
+
trimCustomInput = false,
|
|
52
|
+
haveValueAsOption = false,
|
|
53
|
+
...props
|
|
54
|
+
}: SuggestionListProps) {
|
|
55
|
+
// Extract valid Option components from children
|
|
56
|
+
const suggestions = Children.toArray(children).filter(
|
|
57
|
+
(child): child is React.ReactElement<OptionProps> =>
|
|
58
|
+
isValidElement(child) && child.type === Option
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const [selectedIndex, setSelectedIndex] = useState(() => {
|
|
62
|
+
if (scrollToValue != null) {
|
|
63
|
+
const index = suggestions.findIndex(option => option.props.value === scrollToValue);
|
|
64
|
+
if (index !== -1) {
|
|
65
|
+
return index;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return -1;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const keyPressedDownRef = useRef('');
|
|
72
|
+
const [maxResults, setMaxResults] = useState(MAX_RESULTS);
|
|
73
|
+
const [focusedIndex, setFocusedIndex] = useState(selectedIndex);
|
|
74
|
+
const [internalValue, setInternalValue] = useState(value);
|
|
75
|
+
const internalInputRef = useRef<HTMLInputElement | null>(null);
|
|
76
|
+
const [totalMatchedLength, setTotalMatchedLength] = useState(suggestions.length);
|
|
77
|
+
const [matchedOptions, setMatchedOptions] = useState<React.ReactElement<OptionProps>[]>(
|
|
78
|
+
() => getMatchedOptions(value, MAX_RESULTS)
|
|
79
|
+
);
|
|
80
|
+
const [suggestionsWidth, setSuggestionsWidth] = useState<string | undefined>();
|
|
81
|
+
const [suggestionsHeight, setSuggestionsHeight] = useState<string | undefined>();
|
|
82
|
+
|
|
83
|
+
function handleKeyUp(event: React.KeyboardEvent<HTMLInputElement>) {
|
|
84
|
+
const key = event.key;
|
|
85
|
+
const input = event.currentTarget;
|
|
86
|
+
|
|
87
|
+
const isSameKey = (keyPressedDownRef.current = key);
|
|
88
|
+
keyPressedDownRef.current = '';
|
|
89
|
+
|
|
90
|
+
// Enter and Escape remove the popover, so we want to handle this on keyup.
|
|
91
|
+
// This prevents from another element from getting the key events.
|
|
92
|
+
if (isSameKey) {
|
|
93
|
+
switch (key) {
|
|
94
|
+
case 'Enter': {
|
|
95
|
+
if (matchedOptions[focusedIndex] == null) {
|
|
96
|
+
const value = trimCustomInput ? input.value.trim() : input.value;
|
|
97
|
+
|
|
98
|
+
if (value === '') {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const lowercaseValue = value.toLocaleLowerCase();
|
|
103
|
+
const option = suggestions.find(
|
|
104
|
+
option =>
|
|
105
|
+
option.props.value.toLocaleLowerCase() === lowercaseValue ||
|
|
106
|
+
(option.props.label != null &&
|
|
107
|
+
option.props.label.toLocaleLowerCase() === lowercaseValue)
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
const isSuggestion = option != null;
|
|
111
|
+
const label = option?.props.label || value;
|
|
112
|
+
const optionValue = option?.props.value || value;
|
|
113
|
+
|
|
114
|
+
requestAnimationFrame(() => {
|
|
115
|
+
onOptionSelect && onOptionSelect(optionValue, label, isSuggestion);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
const selectedOption = matchedOptions[focusedIndex];
|
|
121
|
+
const optionProps = selectedOption.props;
|
|
122
|
+
|
|
123
|
+
// Don't select disabled options
|
|
124
|
+
if (optionProps.disabled) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
requestAnimationFrame(() => {
|
|
129
|
+
onOptionSelect && onOptionSelect(optionProps.value, optionProps.label, true);
|
|
130
|
+
});
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case 'Escape': {
|
|
134
|
+
onClose && onClose(input.value, input.selectionStart, input.selectionEnd);
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
onKeyUp && onKeyUp(event);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
|
|
144
|
+
const key = event.key;
|
|
145
|
+
keyPressedDownRef.current = key;
|
|
146
|
+
|
|
147
|
+
// We handle these key events on keydown to be responsive navigation.
|
|
148
|
+
switch (key) {
|
|
149
|
+
case 'ArrowDown': {
|
|
150
|
+
let newIndex = focusedIndex + 1;
|
|
151
|
+
|
|
152
|
+
// Skip disabled options
|
|
153
|
+
while (
|
|
154
|
+
newIndex < matchedOptions.length &&
|
|
155
|
+
matchedOptions[newIndex]?.props.disabled
|
|
156
|
+
) {
|
|
157
|
+
newIndex++;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (newIndex === matchedOptions.length) {
|
|
161
|
+
// Wrap around to first non-disabled option
|
|
162
|
+
newIndex = 0;
|
|
163
|
+
while (
|
|
164
|
+
newIndex < matchedOptions.length &&
|
|
165
|
+
matchedOptions[newIndex]?.props.disabled
|
|
166
|
+
) {
|
|
167
|
+
newIndex++;
|
|
168
|
+
}
|
|
169
|
+
// If all options are disabled, stay at -1
|
|
170
|
+
if (newIndex === matchedOptions.length) {
|
|
171
|
+
newIndex = -1;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
setFocusedIndex(newIndex);
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case 'Tab': {
|
|
180
|
+
let step = 1;
|
|
181
|
+
if (event.shiftKey) {
|
|
182
|
+
step = -1;
|
|
183
|
+
}
|
|
184
|
+
let newIndex = focusedIndex + step;
|
|
185
|
+
// Skip disabled options
|
|
186
|
+
if (step > 0) {
|
|
187
|
+
while (
|
|
188
|
+
newIndex < matchedOptions.length &&
|
|
189
|
+
matchedOptions[newIndex]?.props.disabled
|
|
190
|
+
) {
|
|
191
|
+
newIndex++;
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
while (newIndex >= 0 && matchedOptions[newIndex]?.props.disabled) {
|
|
195
|
+
newIndex--;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (newIndex === matchedOptions.length) {
|
|
200
|
+
// Wrap around to first non-disabled option
|
|
201
|
+
newIndex = 0;
|
|
202
|
+
while (
|
|
203
|
+
newIndex < matchedOptions.length &&
|
|
204
|
+
matchedOptions[newIndex]?.props.disabled
|
|
205
|
+
) {
|
|
206
|
+
newIndex++;
|
|
207
|
+
}
|
|
208
|
+
// If all options are disabled, stay at -1
|
|
209
|
+
if (newIndex === matchedOptions.length) {
|
|
210
|
+
newIndex = -1;
|
|
211
|
+
}
|
|
212
|
+
} else if (newIndex <= -1) {
|
|
213
|
+
// Wrap around to last non-disabled option
|
|
214
|
+
newIndex = matchedOptions.length - 1;
|
|
215
|
+
while (newIndex >= 0 && matchedOptions[newIndex]?.props.disabled) {
|
|
216
|
+
newIndex--;
|
|
217
|
+
}
|
|
218
|
+
// If all options are disabled, stay at -1
|
|
219
|
+
if (newIndex === -1) {
|
|
220
|
+
newIndex = -1;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
setFocusedIndex(newIndex);
|
|
225
|
+
event.preventDefault();
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
case 'ArrowUp': {
|
|
229
|
+
let newIndex = focusedIndex - 1;
|
|
230
|
+
|
|
231
|
+
// Skip disabled options
|
|
232
|
+
while (newIndex >= 0 && matchedOptions[newIndex]?.props.disabled) {
|
|
233
|
+
newIndex--;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (newIndex === -1) {
|
|
237
|
+
// Wrap around to last non-disabled option
|
|
238
|
+
newIndex = matchedOptions.length - 1;
|
|
239
|
+
while (newIndex >= 0 && matchedOptions[newIndex]?.props.disabled) {
|
|
240
|
+
newIndex--;
|
|
241
|
+
}
|
|
242
|
+
// If all options are disabled, stay at -1
|
|
243
|
+
if (newIndex === -1) {
|
|
244
|
+
newIndex = -1;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
setFocusedIndex(newIndex);
|
|
249
|
+
event.preventDefault();
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
onKeyDown && onKeyDown(event);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function getMatchedOptions(value: string, maxResults: number) {
|
|
257
|
+
const results = suggestions.filter(option => {
|
|
258
|
+
const props = option.props;
|
|
259
|
+
const label = String(props.label).toLocaleLowerCase();
|
|
260
|
+
const keywords = props.keywords?.map(k => k.toLocaleLowerCase()) || [];
|
|
261
|
+
const optionValue = String(props.value).toLocaleLowerCase();
|
|
262
|
+
const searchValue = value.toLocaleLowerCase();
|
|
263
|
+
|
|
264
|
+
return (
|
|
265
|
+
label.includes(searchValue) ||
|
|
266
|
+
keywords.some(k => k.includes(searchValue)) ||
|
|
267
|
+
optionValue.includes(searchValue)
|
|
268
|
+
);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
if (
|
|
272
|
+
haveValueAsOption &&
|
|
273
|
+
value.trim().length > 0 &&
|
|
274
|
+
!results.some(r => r.props.value === value)
|
|
275
|
+
) {
|
|
276
|
+
results.unshift(
|
|
277
|
+
<Option key="value" value={value} label={value} keywords={[value]}>
|
|
278
|
+
{value}
|
|
279
|
+
</Option>
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
setTotalMatchedLength(results.length);
|
|
284
|
+
return results.slice(0, maxResults);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function focusInput() {
|
|
288
|
+
const input = internalInputRef.current;
|
|
289
|
+
if (input != null) {
|
|
290
|
+
input.focus();
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function handleUseClose() {
|
|
295
|
+
const input = internalInputRef.current;
|
|
296
|
+
if (input != null) {
|
|
297
|
+
onClose && onClose(input.value, input.selectionStart, input.selectionEnd);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function handleChange(event: React.ChangeEvent<HTMLInputElement>) {
|
|
302
|
+
const input = event.currentTarget;
|
|
303
|
+
|
|
304
|
+
setMaxResults(MAX_RESULTS);
|
|
305
|
+
setInternalValue(event.target.value);
|
|
306
|
+
|
|
307
|
+
const newMatches = getMatchedOptions(input.value, MAX_RESULTS);
|
|
308
|
+
setMatchedOptions(newMatches);
|
|
309
|
+
|
|
310
|
+
onChange && onChange(event.target.value);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function handleShowMore() {
|
|
314
|
+
const newMaxResults = maxResults + BATCH_SIZE;
|
|
315
|
+
setMaxResults(newMaxResults);
|
|
316
|
+
const newMatches = getMatchedOptions(internalValue, newMaxResults);
|
|
317
|
+
setMatchedOptions(newMatches);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
useLayoutEffect(() => {
|
|
321
|
+
const input = internalInputRef.current;
|
|
322
|
+
|
|
323
|
+
if (input != null && input.value.length > 0) {
|
|
324
|
+
input.select();
|
|
325
|
+
} else if (input != null) {
|
|
326
|
+
input.focus();
|
|
327
|
+
}
|
|
328
|
+
}, []);
|
|
329
|
+
|
|
330
|
+
useLayoutEffect(() => {
|
|
331
|
+
if (anchorElement != null) {
|
|
332
|
+
const rect = anchorElement.getBoundingClientRect();
|
|
333
|
+
setSuggestionsWidth(`${rect.width}px`);
|
|
334
|
+
setSuggestionsHeight(`${rect.height}px`);
|
|
335
|
+
|
|
336
|
+
if (internalInputRef.current != null && anchorElement instanceof HTMLInputElement) {
|
|
337
|
+
internalInputRef.current.value = anchorElement.value;
|
|
338
|
+
internalInputRef.current.selectionStart = anchorElement.selectionStart;
|
|
339
|
+
internalInputRef.current.selectionEnd = anchorElement.selectionEnd;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}, [anchorElement]);
|
|
343
|
+
|
|
344
|
+
useLayoutEffect(() => {
|
|
345
|
+
if (scrollToValue != null) {
|
|
346
|
+
const index = matchedOptions.findIndex(
|
|
347
|
+
option => option.props.value === scrollToValue
|
|
348
|
+
);
|
|
349
|
+
setSelectedIndex(index);
|
|
350
|
+
}
|
|
351
|
+
}, [matchedOptions, scrollToValue]);
|
|
352
|
+
|
|
353
|
+
useLayoutEffect(() => {
|
|
354
|
+
setFocusedIndex(internalValue === '' ? selectedIndex : -1);
|
|
355
|
+
}, [internalValue, selectedIndex]);
|
|
356
|
+
|
|
357
|
+
return (
|
|
358
|
+
<Popper
|
|
359
|
+
open
|
|
360
|
+
anchorElement={anchorElement}
|
|
361
|
+
onClose={handleUseClose}
|
|
362
|
+
verticalAnchor="top"
|
|
363
|
+
verticalOrigin="top"
|
|
364
|
+
verticalOffset={-4}
|
|
365
|
+
>
|
|
366
|
+
<VStack
|
|
367
|
+
minHeight={`calc(${suggestionsHeight}, 8px)`}
|
|
368
|
+
maxHeight="300px"
|
|
369
|
+
minWidth={suggestionsWidth}
|
|
370
|
+
width="auto"
|
|
371
|
+
hAlign="start"
|
|
372
|
+
className={classNames(styles['suggestion-list'], 'suggestion-list')}
|
|
373
|
+
>
|
|
374
|
+
<input
|
|
375
|
+
ref={internalInputRef}
|
|
376
|
+
key={-1}
|
|
377
|
+
value={internalValue}
|
|
378
|
+
onKeyUp={handleKeyUp}
|
|
379
|
+
onKeyDown={handleKeyDown}
|
|
380
|
+
onChange={handleChange}
|
|
381
|
+
className={classNames(styles.input, 'suggestion-list-search-input')}
|
|
382
|
+
{...props}
|
|
383
|
+
/>
|
|
384
|
+
<VStack>
|
|
385
|
+
{matchedOptions.map((option, index) => (
|
|
386
|
+
<SuggestionItem
|
|
387
|
+
key={index}
|
|
388
|
+
option={option}
|
|
389
|
+
isSelected={index === selectedIndex && internalValue !== ''}
|
|
390
|
+
isFocused={index === focusedIndex}
|
|
391
|
+
onClick={onOptionSelect}
|
|
392
|
+
/>
|
|
393
|
+
))}
|
|
394
|
+
{totalMatchedLength > matchedOptions.length && (
|
|
395
|
+
<>
|
|
396
|
+
<Button marginBlock="8px" hierarchy="tertiary" onClick={handleShowMore}>
|
|
397
|
+
Show More
|
|
398
|
+
</Button>
|
|
399
|
+
</>
|
|
400
|
+
)}
|
|
401
|
+
</VStack>
|
|
402
|
+
{matchedOptions.length === 0 && (
|
|
403
|
+
<ZStack padding="8px" className={styles['no-results']}>
|
|
404
|
+
<BodyText>{noSuggestionMessage}</BodyText>
|
|
405
|
+
</ZStack>
|
|
406
|
+
)}
|
|
407
|
+
<FocusRedirect key={matchedOptions.length + 1} onRedirect={focusInput} />
|
|
408
|
+
</VStack>
|
|
409
|
+
</Popper>
|
|
410
|
+
);
|
|
411
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*** wrapper ************************************************************/
|
|
2
|
+
.switch-wrapper {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
width: calc(36px * var(--scalar, 1));
|
|
6
|
+
height: calc(18px * var(--scalar, 1));
|
|
7
|
+
border-radius: 13px;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
background-color: #aaa;
|
|
11
|
+
border: 1px solid #aaa;
|
|
12
|
+
transition:
|
|
13
|
+
background-color 200ms ease-out,
|
|
14
|
+
border-color 200ms ease-out;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.switch-wrapper[data-focused="true"][data-is-checked="false"],
|
|
18
|
+
.switch-wrapper[data-focused="true"][data-is-checked="true"] {
|
|
19
|
+
outline: 3px solid color-mix(in srgb, var(--accent-color) 40%, transparent);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* wrapper end*/
|
|
23
|
+
|
|
24
|
+
.switch {
|
|
25
|
+
-webkit-appearance: none !important;
|
|
26
|
+
-moz-appearance: none !important;
|
|
27
|
+
appearance: none !important;
|
|
28
|
+
outline: 0 !important;
|
|
29
|
+
height: 100% !important;
|
|
30
|
+
width: 100% !important;
|
|
31
|
+
margin: 0;
|
|
32
|
+
-webkit-tap-highlight-color: transparent;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/*** track ***************************************************************/
|
|
36
|
+
|
|
37
|
+
.switch-wrapper[data-is-disabled="true"] {
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.switch-wrapper[data-is-disabled="true"] {
|
|
42
|
+
background-color: #d3d3d3;
|
|
43
|
+
border-color: #d3d3d3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.switch-wrapper[data-is-checked="true"][data-is-disabled="false"] {
|
|
47
|
+
background-color: var(--accent-color);
|
|
48
|
+
border-color: var(--accent-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*** switch ***************************************************************/
|
|
52
|
+
.switch::after {
|
|
53
|
+
content: "";
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 0px;
|
|
56
|
+
transition: transform 200ms ease-out;
|
|
57
|
+
width: calc(16px * var(--scalar, 1));
|
|
58
|
+
height: calc(16px * var(--scalar, 1));
|
|
59
|
+
border-radius: 12px;
|
|
60
|
+
background-color: var(--surface, #fff);
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.switch-wrapper[data-is-disabled="true"] > .switch::after,
|
|
65
|
+
.switch-wrapper[data-is-disabled="true"] > .switch,
|
|
66
|
+
.switch-wrapper[data-is-disabled="true"] {
|
|
67
|
+
cursor: not-allowed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.switch-wrapper[data-is-disabled="false"] > .switch::after,
|
|
71
|
+
.switch-wrapper[data-is-disabled="false"] > .switch,
|
|
72
|
+
.switch-wrapper[data-is-disabled="false"] {
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.switch:dir(ltr)::after {
|
|
77
|
+
transform: translate(0%, 0px);
|
|
78
|
+
left: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.switch:dir(rtl)::after {
|
|
82
|
+
transform: translate(0%, 0px);
|
|
83
|
+
right: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.switch-wrapper[data-is-checked="true"] .switch:dir(ltr)::after {
|
|
87
|
+
transform: translate(112%, 0px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.switch-wrapper[data-is-checked="true"] .switch:dir(rtl)::after {
|
|
91
|
+
transform: translate(-112%, 0px);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/*** icon ********************************************************************/
|
|
95
|
+
.switch-icon {
|
|
96
|
+
position: absolute;
|
|
97
|
+
display: inline-block;
|
|
98
|
+
color: #fff;
|
|
99
|
+
top: 50%;
|
|
100
|
+
left: calc(3px * var(--scalar, 1) - 1px);
|
|
101
|
+
height: calc(16px * var(--scalar, 1) - 2px);
|
|
102
|
+
width: calc(16px * var(--scalar, 1) - 2px);
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
translate: 0 -50%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.switch-icon[data-is-checked="false"]:dir(ltr),
|
|
108
|
+
.switch-icon[data-is-checked="true"]:dir(rtl) {
|
|
109
|
+
translate: calc(16px * var(--scalar, 1)) -50%;
|
|
110
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Switch as Component, SwitchProps } from './switch.js';
|
|
3
|
+
import styles from '../__storybook__/stories.module.css';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Switch',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
function Base(props: SwitchProps) {
|
|
10
|
+
const [checked, setChecked] = useState(props.checked ?? false);
|
|
11
|
+
return <Component checked={checked} onChange={setChecked} {...props} />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function Switch() {
|
|
15
|
+
return (
|
|
16
|
+
<table className={styles.story}>
|
|
17
|
+
<thead>
|
|
18
|
+
<tr>
|
|
19
|
+
<th>Name</th>
|
|
20
|
+
<th>Component</th>
|
|
21
|
+
</tr>
|
|
22
|
+
</thead>
|
|
23
|
+
<tbody>
|
|
24
|
+
<tr>
|
|
25
|
+
<td>Baseline</td>
|
|
26
|
+
<td>
|
|
27
|
+
<Base />
|
|
28
|
+
</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>Omit Icons</td>
|
|
32
|
+
<td>
|
|
33
|
+
<Base omitIcons />
|
|
34
|
+
</td>
|
|
35
|
+
</tr>
|
|
36
|
+
<tr>
|
|
37
|
+
<td>Disabled</td>
|
|
38
|
+
<td>
|
|
39
|
+
<Base disabled />
|
|
40
|
+
</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr>
|
|
43
|
+
<td>Disabled checked</td>
|
|
44
|
+
<td>
|
|
45
|
+
<Base disabled checked />
|
|
46
|
+
</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>disabled Omit Icons</td>
|
|
50
|
+
<td>
|
|
51
|
+
<Base disabled omitIcons />
|
|
52
|
+
</td>
|
|
53
|
+
</tr>
|
|
54
|
+
<tr>
|
|
55
|
+
<td>disabled Omit Icons checked</td>
|
|
56
|
+
<td>
|
|
57
|
+
<Base disabled omitIcons checked />
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { useRef, useState, HTMLAttributes, ChangeEvent } from 'react';
|
|
2
|
+
import { useForkRef } from '../../utils/index.js';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import styles from './switch.module.css';
|
|
5
|
+
import { CheckIcon } from '@tcn/icons/check_icon.js';
|
|
6
|
+
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
7
|
+
|
|
8
|
+
export interface SwitchProps extends Omit<HTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onChange?: (value: boolean, event: ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
omitIcons?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const Switch = React.forwardRef(function Switch(
|
|
18
|
+
{
|
|
19
|
+
checked,
|
|
20
|
+
backgroundColor: onColor,
|
|
21
|
+
style,
|
|
22
|
+
className,
|
|
23
|
+
inputRef,
|
|
24
|
+
omitIcons = false,
|
|
25
|
+
onChange,
|
|
26
|
+
...props
|
|
27
|
+
}: SwitchProps,
|
|
28
|
+
ref: React.Ref<HTMLDivElement>
|
|
29
|
+
) {
|
|
30
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
31
|
+
const internalInputRef = useRef<HTMLInputElement | null>(null);
|
|
32
|
+
const forkedInputRef = useForkRef(inputRef, internalInputRef);
|
|
33
|
+
const customStyles: any = {};
|
|
34
|
+
|
|
35
|
+
function blur(event: React.FocusEvent<HTMLInputElement>) {
|
|
36
|
+
props.onBlur && props.onBlur(event);
|
|
37
|
+
setIsFocused(false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function focus(event: React.FocusEvent<HTMLInputElement>) {
|
|
41
|
+
props.onFocus && props.onFocus(event);
|
|
42
|
+
setIsFocused(true);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (onColor != null) {
|
|
46
|
+
customStyles['--accent-color'] = onColor;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const Icon = checked ? CheckIcon : CrossIcon;
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div
|
|
53
|
+
ref={ref}
|
|
54
|
+
data-focused={isFocused}
|
|
55
|
+
data-is-checked={Boolean(checked)}
|
|
56
|
+
data-is-disabled={props.disabled || false}
|
|
57
|
+
data-width="fixed"
|
|
58
|
+
className={classnames(styles['switch-wrapper'], className, 'switch-wrapper')}
|
|
59
|
+
>
|
|
60
|
+
{!omitIcons && (
|
|
61
|
+
<Icon
|
|
62
|
+
className={classnames(styles['switch-icon'], 'switch-icon')}
|
|
63
|
+
data-is-checked={checked}
|
|
64
|
+
/>
|
|
65
|
+
)}
|
|
66
|
+
<input
|
|
67
|
+
ref={forkedInputRef}
|
|
68
|
+
type="checkbox"
|
|
69
|
+
className={classnames(styles.switch, 'switch')}
|
|
70
|
+
onBlur={blur}
|
|
71
|
+
onFocus={focus}
|
|
72
|
+
style={{ ...style, ...customStyles }}
|
|
73
|
+
checked={checked}
|
|
74
|
+
data-is-disabled={props.disabled || false}
|
|
75
|
+
onChange={e => {
|
|
76
|
+
onChange && onChange(Boolean(e.currentTarget.checked), e);
|
|
77
|
+
}}
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useSignalValue } from '@tcn/state';
|
|
3
|
+
import { FieldPresenter } from '../../form/field_presenters/field_presenter.js';
|
|
4
|
+
import { Switch, SwitchProps } from './switch.js';
|
|
5
|
+
import { HField } from '../../form/field/h_field/h_field.js';
|
|
6
|
+
|
|
7
|
+
export interface SwitchRowProps
|
|
8
|
+
extends Omit<
|
|
9
|
+
SwitchProps,
|
|
10
|
+
'onChange' | 'checked' | 'label' | 'description' | 'errorMessage'
|
|
11
|
+
> {
|
|
12
|
+
presenter?: FieldPresenter<boolean>;
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function SwitchRow({ presenter, id, ...props }: SwitchRowProps) {
|
|
17
|
+
const [finalPresenter] = useState(() => {
|
|
18
|
+
if (presenter == null) {
|
|
19
|
+
return new FieldPresenter<boolean>('Label', false);
|
|
20
|
+
}
|
|
21
|
+
return presenter;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const { label, value, description, error } = useSignalValue(
|
|
25
|
+
finalPresenter.stateBroadcast
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<HField id={id} label={label} description={description} errorMessage={error}>
|
|
30
|
+
<Switch {...props} checked={value} onChange={finalPresenter.setValue} />
|
|
31
|
+
</HField>
|
|
32
|
+
);
|
|
33
|
+
}
|