@dscout/particle 1.0.0-alpha.21 → 1.0.0-alpha.23
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 +45 -76
- package/lib/cjs/components/advanced_options.d.ts +3 -3
- package/lib/cjs/components/advanced_options.js +14 -13
- package/lib/cjs/components/advanced_options.js.map +1 -1
- package/lib/cjs/components/attribute_input.d.ts +4 -3
- package/lib/cjs/components/attribute_input.js +4 -3
- package/lib/cjs/components/attribute_input.js.map +1 -1
- package/lib/cjs/components/attribute_selector.d.ts +4 -3
- package/lib/cjs/components/attribute_selector.js +4 -3
- package/lib/cjs/components/attribute_selector.js.map +1 -1
- package/lib/cjs/components/avatar.d.ts +3 -3
- package/lib/cjs/components/avatar.js +3 -2
- package/lib/cjs/components/avatar.js.map +1 -1
- package/lib/cjs/components/blitz.d.ts +2 -2
- package/lib/cjs/components/blitz.js +28 -4
- package/lib/cjs/components/blitz.js.map +1 -1
- package/lib/cjs/components/button.d.ts +3 -3
- package/lib/cjs/components/button.js +3 -2
- package/lib/cjs/components/button.js.map +1 -1
- package/lib/cjs/components/button_control.d.ts +3 -3
- package/lib/cjs/components/button_control.js +3 -2
- package/lib/cjs/components/button_control.js.map +1 -1
- package/lib/cjs/components/button_icon.d.ts +10 -10
- package/lib/cjs/components/button_icon.js +3 -2
- package/lib/cjs/components/button_icon.js.map +1 -1
- package/lib/cjs/components/button_mode.d.ts +3 -3
- package/lib/cjs/components/button_mode.js +3 -2
- package/lib/cjs/components/button_mode.js.map +1 -1
- package/lib/cjs/components/button_plain.d.ts +3 -3
- package/lib/cjs/components/button_plain.js +3 -2
- package/lib/cjs/components/button_plain.js.map +1 -1
- package/lib/cjs/components/card.d.ts +3 -3
- package/lib/cjs/components/card.js +3 -2
- package/lib/cjs/components/card.js.map +1 -1
- package/lib/cjs/components/card_body.d.ts +3 -3
- package/lib/cjs/components/card_body.js +3 -2
- package/lib/cjs/components/card_body.js.map +1 -1
- package/lib/cjs/components/card_footer.d.ts +3 -3
- package/lib/cjs/components/card_footer.js +3 -2
- package/lib/cjs/components/card_footer.js.map +1 -1
- package/lib/cjs/components/cards.d.ts +3 -3
- package/lib/cjs/components/cards.js +3 -2
- package/lib/cjs/components/cards.js.map +1 -1
- package/lib/cjs/components/checkbox_input.d.ts +5 -3
- package/lib/cjs/components/checkbox_input.js +4 -3
- package/lib/cjs/components/checkbox_input.js.map +1 -1
- package/lib/cjs/components/chip.d.ts +3 -3
- package/lib/cjs/components/chip.js +3 -2
- package/lib/cjs/components/chip.js.map +1 -1
- package/lib/cjs/components/collapsible_content.d.ts +3 -3
- package/lib/cjs/components/collapsible_content.js +11 -3
- package/lib/cjs/components/collapsible_content.js.map +1 -1
- package/lib/cjs/components/collapsing_menu.d.ts +3 -3
- package/lib/cjs/components/collapsing_menu.js +39 -16
- package/lib/cjs/components/collapsing_menu.js.map +1 -1
- package/lib/cjs/components/column.d.ts +2 -2
- package/lib/cjs/components/common_input.d.ts +3 -3
- package/lib/cjs/components/common_input.js +4 -2
- package/lib/cjs/components/common_input.js.map +1 -1
- package/lib/cjs/components/common_menu_item.d.ts +3 -3
- package/lib/cjs/components/common_menu_item.js +2 -2
- package/lib/cjs/components/common_menu_item.js.map +1 -1
- package/lib/cjs/components/container.d.ts +4 -3
- package/lib/cjs/components/container.js +8 -3
- package/lib/cjs/components/container.js.map +1 -1
- package/lib/cjs/components/container_header.d.ts +2 -2
- package/lib/cjs/components/date_input.d.ts +3 -3
- package/lib/cjs/components/date_input.js +2 -2
- package/lib/cjs/components/date_input.js.map +1 -1
- package/lib/cjs/components/drag_and_drop.d.ts +5 -3
- package/lib/cjs/components/drag_and_drop.js +4 -3
- package/lib/cjs/components/drag_and_drop.js.map +1 -1
- package/lib/cjs/components/dropdown.d.ts +2 -2
- package/lib/cjs/components/dropdown.js +3 -2
- package/lib/cjs/components/dropdown.js.map +1 -1
- package/lib/cjs/components/dropdown_input_toggle.d.ts +3 -3
- package/lib/cjs/components/dropdown_input_toggle.js +3 -2
- package/lib/cjs/components/dropdown_input_toggle.js.map +1 -1
- package/lib/cjs/components/editing_container.d.ts +2 -2
- package/lib/cjs/components/editing_container.js +8 -3
- package/lib/cjs/components/editing_container.js.map +1 -1
- package/lib/cjs/components/email_input.d.ts +3 -3
- package/lib/cjs/components/email_input.js +2 -2
- package/lib/cjs/components/email_input.js.map +1 -1
- package/lib/cjs/components/file_input.d.ts +5 -3
- package/lib/cjs/components/file_input.js +6 -4
- package/lib/cjs/components/file_input.js.map +1 -1
- package/lib/cjs/components/flex.d.ts +11 -4
- package/lib/cjs/components/flex.js +17 -11
- package/lib/cjs/components/flex.js.map +1 -1
- package/lib/cjs/components/focus_trap.d.ts +1 -1
- package/lib/cjs/components/footnote.d.ts +3 -3
- package/lib/cjs/components/footnote.js +3 -2
- package/lib/cjs/components/footnote.js.map +1 -1
- package/lib/cjs/components/heading.d.ts +3 -3
- package/lib/cjs/components/heading.js +4 -3
- package/lib/cjs/components/heading.js.map +1 -1
- package/lib/cjs/components/input_addon.js +1 -1
- package/lib/cjs/components/input_addon.js.map +1 -1
- package/lib/cjs/components/input_group.d.ts +3 -3
- package/lib/cjs/components/input_group.js +3 -2
- package/lib/cjs/components/input_group.js.map +1 -1
- package/lib/cjs/components/input_group_item.js +1 -1
- package/lib/cjs/components/input_group_item.js.map +1 -1
- package/lib/cjs/components/link_text.d.ts +3 -3
- package/lib/cjs/components/link_text.js +3 -2
- package/lib/cjs/components/link_text.js.map +1 -1
- package/lib/cjs/components/list.d.ts +3 -3
- package/lib/cjs/components/list.js +4 -3
- package/lib/cjs/components/list.js.map +1 -1
- package/lib/cjs/components/list_inline.d.ts +3 -3
- package/lib/cjs/components/list_inline.js +4 -3
- package/lib/cjs/components/list_inline.js.map +1 -1
- package/lib/cjs/components/menu.d.ts +3 -3
- package/lib/cjs/components/menu.js +3 -2
- package/lib/cjs/components/menu.js.map +1 -1
- package/lib/cjs/components/menu_item.d.ts +3 -3
- package/lib/cjs/components/menu_item.js +2 -2
- package/lib/cjs/components/menu_item.js.map +1 -1
- package/lib/cjs/components/menu_item_li.d.ts +2 -2
- package/lib/cjs/components/menu_item_li.js +2 -2
- package/lib/cjs/components/menu_item_li.js.map +1 -1
- package/lib/cjs/components/menu_link.d.ts +3 -3
- package/lib/cjs/components/menu_link.js +2 -2
- package/lib/cjs/components/menu_link.js.map +1 -1
- package/lib/cjs/components/menu_list.d.ts +3 -3
- package/lib/cjs/components/menu_list.js +3 -2
- package/lib/cjs/components/menu_list.js.map +1 -1
- package/lib/cjs/components/menu_section.d.ts +3 -3
- package/lib/cjs/components/menu_section.js +3 -2
- package/lib/cjs/components/menu_section.js.map +1 -1
- package/lib/cjs/components/menu_title.d.ts +3 -3
- package/lib/cjs/components/menu_title.js +3 -2
- package/lib/cjs/components/menu_title.js.map +1 -1
- package/lib/cjs/components/modal.d.ts +5 -3
- package/lib/cjs/components/modal.js +3 -3
- package/lib/cjs/components/modal.js.map +1 -1
- package/lib/cjs/components/modifier.d.ts +13 -13
- package/lib/cjs/components/modifier.js +3 -43
- package/lib/cjs/components/modifier.js.map +1 -1
- package/lib/cjs/components/number_input.d.ts +3 -3
- package/lib/cjs/components/number_input.js +2 -2
- package/lib/cjs/components/number_input.js.map +1 -1
- package/lib/cjs/components/password_input.d.ts +3 -3
- package/lib/cjs/components/password_input.js +2 -2
- package/lib/cjs/components/password_input.js.map +1 -1
- package/lib/cjs/components/pill.d.ts +3 -3
- package/lib/cjs/components/pill.js +3 -2
- package/lib/cjs/components/pill.js.map +1 -1
- package/lib/cjs/components/radio_input.d.ts +4 -3
- package/lib/cjs/components/radio_input.js +4 -3
- package/lib/cjs/components/radio_input.js.map +1 -1
- package/lib/cjs/components/range_input.d.ts +4 -3
- package/lib/cjs/components/range_input.js +5 -3
- package/lib/cjs/components/range_input.js.map +1 -1
- package/lib/cjs/components/row.d.ts +3 -3
- package/lib/cjs/components/row.js +3 -2
- package/lib/cjs/components/row.js.map +1 -1
- package/lib/cjs/components/search_input.d.ts +3 -3
- package/lib/cjs/components/search_input.js +2 -2
- package/lib/cjs/components/search_input.js.map +1 -1
- package/lib/cjs/components/segmented_controls.d.ts +3 -3
- package/lib/cjs/components/segmented_controls.js +3 -2
- package/lib/cjs/components/segmented_controls.js.map +1 -1
- package/lib/cjs/components/select_input.d.ts +5 -3
- package/lib/cjs/components/select_input.js +6 -4
- package/lib/cjs/components/select_input.js.map +1 -1
- package/lib/cjs/components/separator.d.ts +2 -2
- package/lib/cjs/components/speech_bubble.d.ts +3 -3
- package/lib/cjs/components/speech_bubble.js +3 -2
- package/lib/cjs/components/speech_bubble.js.map +1 -1
- package/lib/cjs/components/tags_input.d.ts +2 -2
- package/lib/cjs/components/tags_input.js +3 -2
- package/lib/cjs/components/tags_input.js.map +1 -1
- package/lib/cjs/components/text_input.d.ts +3 -3
- package/lib/cjs/components/text_input.js +2 -2
- package/lib/cjs/components/text_input.js.map +1 -1
- package/lib/cjs/components/textarea.d.ts +5 -3
- package/lib/cjs/components/textarea.js +5 -4
- package/lib/cjs/components/textarea.js.map +1 -1
- package/lib/cjs/components/theme_provider.d.ts +29 -1
- package/lib/cjs/components/theme_provider.js +28 -28
- package/lib/cjs/components/theme_provider.js.map +1 -1
- package/lib/cjs/components/thumbnail.d.ts +3 -3
- package/lib/cjs/components/thumbnail.js +3 -2
- package/lib/cjs/components/thumbnail.js.map +1 -1
- package/lib/cjs/components/togglable_fieldset.d.ts +3 -3
- package/lib/cjs/components/togglable_fieldset.js +7 -7
- package/lib/cjs/components/togglable_fieldset.js.map +1 -1
- package/lib/cjs/components/toggle.d.ts +5 -3
- package/lib/cjs/components/toggle.js +4 -3
- package/lib/cjs/components/toggle.js.map +1 -1
- package/lib/cjs/components/tooltip.d.ts +2 -2
- package/lib/cjs/components/tooltip_container.d.ts +3 -3
- package/lib/cjs/components/tooltip_container.js +3 -2
- package/lib/cjs/components/tooltip_container.js.map +1 -1
- package/lib/cjs/components/with_addons.d.ts +3 -3
- package/lib/cjs/components/with_addons.js +2 -2
- package/lib/cjs/components/with_addons.js.map +1 -1
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +5 -7
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types.d.ts +17 -4
- package/lib/cjs/utils/dom.d.ts +1 -1
- package/lib/cjs/utils/modifier_classes.d.ts +6 -0
- package/lib/cjs/utils/modifier_classes.js +57 -0
- package/lib/cjs/utils/modifier_classes.js.map +1 -0
- package/lib/cjs/utils/strings.d.ts +0 -2
- package/lib/cjs/utils/strings.js +1 -8
- package/lib/cjs/utils/strings.js.map +1 -1
- package/lib/esm/components/advanced_options.d.ts +3 -3
- package/lib/esm/components/advanced_options.js +15 -14
- package/lib/esm/components/advanced_options.js.map +1 -1
- package/lib/esm/components/attribute_input.d.ts +4 -3
- package/lib/esm/components/attribute_input.js +4 -3
- package/lib/esm/components/attribute_input.js.map +1 -1
- package/lib/esm/components/attribute_selector.d.ts +4 -3
- package/lib/esm/components/attribute_selector.js +4 -3
- package/lib/esm/components/attribute_selector.js.map +1 -1
- package/lib/esm/components/avatar.d.ts +3 -3
- package/lib/esm/components/avatar.js +3 -2
- package/lib/esm/components/avatar.js.map +1 -1
- package/lib/esm/components/blitz.d.ts +2 -2
- package/lib/esm/components/blitz.js +5 -4
- package/lib/esm/components/blitz.js.map +1 -1
- package/lib/esm/components/button.d.ts +3 -3
- package/lib/esm/components/button.js +3 -2
- package/lib/esm/components/button.js.map +1 -1
- package/lib/esm/components/button_control.d.ts +3 -3
- package/lib/esm/components/button_control.js +3 -2
- package/lib/esm/components/button_control.js.map +1 -1
- package/lib/esm/components/button_icon.d.ts +10 -10
- package/lib/esm/components/button_icon.js +3 -2
- package/lib/esm/components/button_icon.js.map +1 -1
- package/lib/esm/components/button_mode.d.ts +3 -3
- package/lib/esm/components/button_mode.js +3 -2
- package/lib/esm/components/button_mode.js.map +1 -1
- package/lib/esm/components/button_plain.d.ts +3 -3
- package/lib/esm/components/button_plain.js +3 -2
- package/lib/esm/components/button_plain.js.map +1 -1
- package/lib/esm/components/card.d.ts +3 -3
- package/lib/esm/components/card.js +3 -2
- package/lib/esm/components/card.js.map +1 -1
- package/lib/esm/components/card_body.d.ts +3 -3
- package/lib/esm/components/card_body.js +3 -2
- package/lib/esm/components/card_body.js.map +1 -1
- package/lib/esm/components/card_footer.d.ts +3 -3
- package/lib/esm/components/card_footer.js +3 -2
- package/lib/esm/components/card_footer.js.map +1 -1
- package/lib/esm/components/cards.d.ts +3 -3
- package/lib/esm/components/cards.js +3 -2
- package/lib/esm/components/cards.js.map +1 -1
- package/lib/esm/components/checkbox_input.d.ts +5 -3
- package/lib/esm/components/checkbox_input.js +4 -3
- package/lib/esm/components/checkbox_input.js.map +1 -1
- package/lib/esm/components/chip.d.ts +3 -3
- package/lib/esm/components/chip.js +3 -2
- package/lib/esm/components/chip.js.map +1 -1
- package/lib/esm/components/collapsible_content.d.ts +3 -3
- package/lib/esm/components/collapsible_content.js +11 -3
- package/lib/esm/components/collapsible_content.js.map +1 -1
- package/lib/esm/components/collapsing_menu.d.ts +3 -3
- package/lib/esm/components/collapsing_menu.js +16 -16
- package/lib/esm/components/collapsing_menu.js.map +1 -1
- package/lib/esm/components/column.d.ts +2 -2
- package/lib/esm/components/common_input.d.ts +3 -3
- package/lib/esm/components/common_input.js +4 -2
- package/lib/esm/components/common_input.js.map +1 -1
- package/lib/esm/components/common_menu_item.d.ts +3 -3
- package/lib/esm/components/common_menu_item.js +2 -2
- package/lib/esm/components/common_menu_item.js.map +1 -1
- package/lib/esm/components/container.d.ts +4 -3
- package/lib/esm/components/container.js +8 -3
- package/lib/esm/components/container.js.map +1 -1
- package/lib/esm/components/container_header.d.ts +2 -2
- package/lib/esm/components/date_input.d.ts +3 -3
- package/lib/esm/components/date_input.js +2 -2
- package/lib/esm/components/date_input.js.map +1 -1
- package/lib/esm/components/drag_and_drop.d.ts +5 -3
- package/lib/esm/components/drag_and_drop.js +4 -3
- package/lib/esm/components/drag_and_drop.js.map +1 -1
- package/lib/esm/components/dropdown.d.ts +2 -2
- package/lib/esm/components/dropdown.js +3 -2
- package/lib/esm/components/dropdown.js.map +1 -1
- package/lib/esm/components/dropdown_input_toggle.d.ts +3 -3
- package/lib/esm/components/dropdown_input_toggle.js +3 -2
- package/lib/esm/components/dropdown_input_toggle.js.map +1 -1
- package/lib/esm/components/editing_container.d.ts +2 -2
- package/lib/esm/components/editing_container.js +8 -3
- package/lib/esm/components/editing_container.js.map +1 -1
- package/lib/esm/components/email_input.d.ts +3 -3
- package/lib/esm/components/email_input.js +2 -2
- package/lib/esm/components/email_input.js.map +1 -1
- package/lib/esm/components/file_input.d.ts +5 -3
- package/lib/esm/components/file_input.js +6 -4
- package/lib/esm/components/file_input.js.map +1 -1
- package/lib/esm/components/flex.d.ts +11 -4
- package/lib/esm/components/flex.js +17 -11
- package/lib/esm/components/flex.js.map +1 -1
- package/lib/esm/components/focus_trap.d.ts +1 -1
- package/lib/esm/components/footnote.d.ts +3 -3
- package/lib/esm/components/footnote.js +3 -2
- package/lib/esm/components/footnote.js.map +1 -1
- package/lib/esm/components/heading.d.ts +3 -3
- package/lib/esm/components/heading.js +4 -3
- package/lib/esm/components/heading.js.map +1 -1
- package/lib/esm/components/input_addon.js +1 -1
- package/lib/esm/components/input_addon.js.map +1 -1
- package/lib/esm/components/input_group.d.ts +3 -3
- package/lib/esm/components/input_group.js +3 -2
- package/lib/esm/components/input_group.js.map +1 -1
- package/lib/esm/components/input_group_item.js +1 -1
- package/lib/esm/components/input_group_item.js.map +1 -1
- package/lib/esm/components/link_text.d.ts +3 -3
- package/lib/esm/components/link_text.js +3 -2
- package/lib/esm/components/link_text.js.map +1 -1
- package/lib/esm/components/list.d.ts +3 -3
- package/lib/esm/components/list.js +4 -3
- package/lib/esm/components/list.js.map +1 -1
- package/lib/esm/components/list_inline.d.ts +3 -3
- package/lib/esm/components/list_inline.js +4 -3
- package/lib/esm/components/list_inline.js.map +1 -1
- package/lib/esm/components/menu.d.ts +3 -3
- package/lib/esm/components/menu.js +3 -2
- package/lib/esm/components/menu.js.map +1 -1
- package/lib/esm/components/menu_item.d.ts +3 -3
- package/lib/esm/components/menu_item.js +2 -2
- package/lib/esm/components/menu_item.js.map +1 -1
- package/lib/esm/components/menu_item_li.d.ts +2 -2
- package/lib/esm/components/menu_item_li.js +2 -2
- package/lib/esm/components/menu_item_li.js.map +1 -1
- package/lib/esm/components/menu_link.d.ts +3 -3
- package/lib/esm/components/menu_link.js +2 -2
- package/lib/esm/components/menu_link.js.map +1 -1
- package/lib/esm/components/menu_list.d.ts +3 -3
- package/lib/esm/components/menu_list.js +3 -2
- package/lib/esm/components/menu_list.js.map +1 -1
- package/lib/esm/components/menu_section.d.ts +3 -3
- package/lib/esm/components/menu_section.js +3 -2
- package/lib/esm/components/menu_section.js.map +1 -1
- package/lib/esm/components/menu_title.d.ts +3 -3
- package/lib/esm/components/menu_title.js +3 -2
- package/lib/esm/components/menu_title.js.map +1 -1
- package/lib/esm/components/modal.d.ts +5 -3
- package/lib/esm/components/modal.js +3 -3
- package/lib/esm/components/modal.js.map +1 -1
- package/lib/esm/components/modifier.d.ts +13 -13
- package/lib/esm/components/modifier.js +3 -43
- package/lib/esm/components/modifier.js.map +1 -1
- package/lib/esm/components/number_input.d.ts +3 -3
- package/lib/esm/components/number_input.js +2 -2
- package/lib/esm/components/number_input.js.map +1 -1
- package/lib/esm/components/password_input.d.ts +3 -3
- package/lib/esm/components/password_input.js +2 -2
- package/lib/esm/components/password_input.js.map +1 -1
- package/lib/esm/components/pill.d.ts +3 -3
- package/lib/esm/components/pill.js +3 -2
- package/lib/esm/components/pill.js.map +1 -1
- package/lib/esm/components/radio_input.d.ts +4 -3
- package/lib/esm/components/radio_input.js +4 -3
- package/lib/esm/components/radio_input.js.map +1 -1
- package/lib/esm/components/range_input.d.ts +4 -3
- package/lib/esm/components/range_input.js +5 -3
- package/lib/esm/components/range_input.js.map +1 -1
- package/lib/esm/components/row.d.ts +3 -3
- package/lib/esm/components/row.js +3 -2
- package/lib/esm/components/row.js.map +1 -1
- package/lib/esm/components/search_input.d.ts +3 -3
- package/lib/esm/components/search_input.js +2 -2
- package/lib/esm/components/search_input.js.map +1 -1
- package/lib/esm/components/segmented_controls.d.ts +3 -3
- package/lib/esm/components/segmented_controls.js +3 -2
- package/lib/esm/components/segmented_controls.js.map +1 -1
- package/lib/esm/components/select_input.d.ts +5 -3
- package/lib/esm/components/select_input.js +6 -4
- package/lib/esm/components/select_input.js.map +1 -1
- package/lib/esm/components/separator.d.ts +2 -2
- package/lib/esm/components/speech_bubble.d.ts +3 -3
- package/lib/esm/components/speech_bubble.js +3 -2
- package/lib/esm/components/speech_bubble.js.map +1 -1
- package/lib/esm/components/tags_input.d.ts +2 -2
- package/lib/esm/components/tags_input.js +3 -2
- package/lib/esm/components/tags_input.js.map +1 -1
- package/lib/esm/components/text_input.d.ts +3 -3
- package/lib/esm/components/text_input.js +2 -2
- package/lib/esm/components/text_input.js.map +1 -1
- package/lib/esm/components/textarea.d.ts +5 -3
- package/lib/esm/components/textarea.js +5 -4
- package/lib/esm/components/textarea.js.map +1 -1
- package/lib/esm/components/theme_provider.d.ts +29 -1
- package/lib/esm/components/theme_provider.js +28 -28
- package/lib/esm/components/theme_provider.js.map +1 -1
- package/lib/esm/components/thumbnail.d.ts +3 -3
- package/lib/esm/components/thumbnail.js +3 -2
- package/lib/esm/components/thumbnail.js.map +1 -1
- package/lib/esm/components/togglable_fieldset.d.ts +3 -3
- package/lib/esm/components/togglable_fieldset.js +7 -7
- package/lib/esm/components/togglable_fieldset.js.map +1 -1
- package/lib/esm/components/toggle.d.ts +5 -3
- package/lib/esm/components/toggle.js +4 -3
- package/lib/esm/components/toggle.js.map +1 -1
- package/lib/esm/components/tooltip.d.ts +2 -2
- package/lib/esm/components/tooltip_container.d.ts +3 -3
- package/lib/esm/components/tooltip_container.js +3 -2
- package/lib/esm/components/tooltip_container.js.map +1 -1
- package/lib/esm/components/with_addons.d.ts +3 -3
- package/lib/esm/components/with_addons.js +2 -2
- package/lib/esm/components/with_addons.js.map +1 -1
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types.d.ts +17 -4
- package/lib/esm/utils/dom.d.ts +1 -1
- package/lib/esm/utils/modifier_classes.d.ts +6 -0
- package/lib/esm/utils/modifier_classes.js +46 -0
- package/lib/esm/utils/modifier_classes.js.map +1 -0
- package/lib/esm/utils/strings.d.ts +0 -2
- package/lib/esm/utils/strings.js +0 -6
- package/lib/esm/utils/strings.js.map +1 -1
- package/lib/stylesheets/particle.css +188 -156
- package/lib/stylesheets/particle.css.map +1 -1
- package/lib/stylesheets/particle.min.css +1 -1
- package/lib/stylesheets/particle.min.css.gz +0 -0
- package/package.json +1 -1
- package/styles/color_schemes/_base_colors.scss +1 -1
- package/styles/components/collapsible/_base.scss +11 -3
- package/styles/components/container/_base.scss +32 -5
- package/styles/components/container/themes/_theme_builder.scss +12 -6
- package/styles/components/drag_and_drop/themes/_theme_builder.scss +3 -3
- package/styles/utilities/_shadows.scss +4 -0
- package/styles/utilities/_spacing.scss +59 -39
- package/lib/cjs/components/collapsible.d.ts +0 -10
- package/lib/cjs/components/collapsible.js +0 -17
- package/lib/cjs/components/collapsible.js.map +0 -1
- package/lib/cjs/components/focus_intent.d.ts +0 -23
- package/lib/cjs/components/focus_intent.js +0 -92
- package/lib/cjs/components/focus_intent.js.map +0 -1
- package/lib/esm/components/collapsible.d.ts +0 -10
- package/lib/esm/components/collapsible.js +0 -13
- package/lib/esm/components/collapsible.js.map +0 -1
- package/lib/esm/components/focus_intent.d.ts +0 -23
- package/lib/esm/components/focus_intent.js +0 -66
- package/lib/esm/components/focus_intent.js.map +0 -1
|
@@ -29,9 +29,10 @@ exports.ButtonControl = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
32
33
|
function ButtonControl(_a) {
|
|
33
|
-
var _modifierClass = _a._modifierClass, active = _a.active, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, name = _a.name, onClick = _a.onClick, title = _a.title, rest = __rest(_a, ["_modifierClass", "active", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "disabled", "getRef", "id", "name", "onClick", "title"]);
|
|
34
|
-
var className = (0, class_names_1.default)('Button__Control', _modifierClass, {
|
|
34
|
+
var _modifierClass = _a._modifierClass, active = _a.active, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, margin = _a.margin, name = _a.name, onClick = _a.onClick, title = _a.title, rest = __rest(_a, ["_modifierClass", "active", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "disabled", "getRef", "id", "margin", "name", "onClick", "title"]);
|
|
35
|
+
var className = (0, class_names_1.default)('Button__Control', _modifierClass, (0, modifier_classes_1.getMarginClass)(margin), {
|
|
35
36
|
'Button__Control--active': active
|
|
36
37
|
});
|
|
37
38
|
return (react_1.default.createElement("button", __assign({}, (0, data_attributes_1.default)(rest), { "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: className, disabled: disabled, id: id, name: name, onClick: onClick, ref: getRef, title: title, type: "button" }), children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button_control.js","sourceRoot":"","sources":["../../../src/components/button_control.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"button_control.js","sourceRoot":"","sources":["../../../src/components/button_control.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,6EAAyD;AACzD,8DAA2D;AAkB3D,SAAgB,aAAa,CAAC,EAiBT;IAhBnB,IAAA,cAAc,oBAAA,EACd,MAAM,YAAA,EACW,YAAY,sBAAA,EACZ,YAAY,sBAAA,EACf,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,KAAK,WAAA,EACF,IAAI,cAhBqB,iMAiB7B,CADQ;IAEP,IAAM,SAAS,GAAG,IAAA,qBAAU,EAC1B,iBAAiB,EACjB,cAAc,EACd,IAAA,iCAAc,EAAC,MAAM,CAAC,EACtB;QACE,yBAAyB,EAAE,MAAM;KAClC,CACF,CAAC;IAEF,OAAO,CACL,qDACM,IAAA,yBAAiB,EAAC,IAAI,CAAC,qBACZ,YAAY,mBACZ,YAAY,gBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,EACjC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,QAAQ,KAEZ,QAAQ,CACF,CACV,CAAC;AACJ,CAAC;AA/CD,sCA+CC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GetRef } from '../utils/refs';
|
|
3
|
-
import type { CommonComponentProps,
|
|
4
|
-
interface ButtonIconProps extends CommonComponentProps,
|
|
3
|
+
import type { Colors, CommonComponentProps, MarginModifierProp, ModifierClassProp, Radii } from '../types';
|
|
4
|
+
interface ButtonIconProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
'aria-controls'?: string;
|
|
6
6
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
7
7
|
'aria-pressed'?: boolean;
|
|
8
|
-
bgColor?:
|
|
8
|
+
bgColor?: Colors;
|
|
9
9
|
bgSize?: string | number;
|
|
10
|
-
borderColor?:
|
|
10
|
+
borderColor?: Colors;
|
|
11
11
|
children?: React.ReactNode;
|
|
12
|
-
color?:
|
|
12
|
+
color?: Colors;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
getRef?: GetRef<HTMLButtonElement>;
|
|
15
|
-
hoverBgColor?:
|
|
16
|
-
hoverBorderColor?:
|
|
17
|
-
hoverColor?:
|
|
15
|
+
hoverBgColor?: Colors;
|
|
16
|
+
hoverBorderColor?: Colors;
|
|
17
|
+
hoverColor?: Colors;
|
|
18
18
|
hoverBgSize?: string | number;
|
|
19
19
|
id?: string;
|
|
20
20
|
linkComponent?: 'a' | React.ComponentType;
|
|
@@ -23,10 +23,10 @@ interface ButtonIconProps extends CommonComponentProps, ModifierProps {
|
|
|
23
23
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
24
24
|
onMouseUp?: React.MouseEventHandler<HTMLButtonElement>;
|
|
25
25
|
onMouseDown?: React.MouseEventHandler<HTMLButtonElement>;
|
|
26
|
-
radius?:
|
|
26
|
+
radius?: Radii;
|
|
27
27
|
refProp?: string;
|
|
28
28
|
title?: string;
|
|
29
29
|
type?: 'button' | 'submit';
|
|
30
30
|
}
|
|
31
|
-
export declare function ButtonIcon({ _modifierClass, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-pressed': ariaPressed, bgColor, bgSize, borderColor, children, color, disabled, getRef, hoverBgColor, hoverBorderColor, hoverColor, hoverBgSize, id, linkComponent, linkProps, name, onClick, onMouseUp, radius, onMouseDown, refProp, title, type, ...rest }: ButtonIconProps): React.JSX.Element;
|
|
31
|
+
export declare function ButtonIcon({ _modifierClass, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-pressed': ariaPressed, bgColor, bgSize, borderColor, children, color, disabled, getRef, hoverBgColor, hoverBorderColor, hoverColor, hoverBgSize, id, linkComponent, linkProps, margin, name, onClick, onMouseUp, radius, onMouseDown, refProp, title, type, ...rest }: ButtonIconProps): React.JSX.Element;
|
|
32
32
|
export {};
|
|
@@ -52,13 +52,14 @@ exports.ButtonIcon = void 0;
|
|
|
52
52
|
var react_1 = __importStar(require("react"));
|
|
53
53
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
54
54
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
55
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
55
56
|
var common_button_1 = require("./common_button");
|
|
56
57
|
var DEFAULT_COLOR = 'gray-1';
|
|
57
58
|
var DEFAULT_HOVER_COLOR = 'main';
|
|
58
59
|
var DEFAULT_DISABLED_COLOR = 'gray-3';
|
|
59
60
|
var DEFAULT_RADIUS = 'circle';
|
|
60
61
|
function ButtonIcon(_a) {
|
|
61
|
-
var _modifierClass = _a._modifierClass, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], ariaPressed = _a["aria-pressed"], bgColor = _a.bgColor, bgSize = _a.bgSize, borderColor = _a.borderColor, children = _a.children, color = _a.color, disabled = _a.disabled, getRef = _a.getRef, hoverBgColor = _a.hoverBgColor, hoverBorderColor = _a.hoverBorderColor, hoverColor = _a.hoverColor, hoverBgSize = _a.hoverBgSize, id = _a.id, linkComponent = _a.linkComponent, linkProps = _a.linkProps, name = _a.name, onClick = _a.onClick, onMouseUp = _a.onMouseUp, radius = _a.radius, onMouseDown = _a.onMouseDown, refProp = _a.refProp, title = _a.title, type = _a.type, rest = __rest(_a, ["_modifierClass", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-pressed', "bgColor", "bgSize", "borderColor", "children", "color", "disabled", "getRef", "hoverBgColor", "hoverBorderColor", "hoverColor", "hoverBgSize", "id", "linkComponent", "linkProps", "name", "onClick", "onMouseUp", "radius", "onMouseDown", "refProp", "title", "type"]);
|
|
62
|
+
var _modifierClass = _a._modifierClass, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], ariaPressed = _a["aria-pressed"], bgColor = _a.bgColor, bgSize = _a.bgSize, borderColor = _a.borderColor, children = _a.children, color = _a.color, disabled = _a.disabled, getRef = _a.getRef, hoverBgColor = _a.hoverBgColor, hoverBorderColor = _a.hoverBorderColor, hoverColor = _a.hoverColor, hoverBgSize = _a.hoverBgSize, id = _a.id, linkComponent = _a.linkComponent, linkProps = _a.linkProps, margin = _a.margin, name = _a.name, onClick = _a.onClick, onMouseUp = _a.onMouseUp, radius = _a.radius, onMouseDown = _a.onMouseDown, refProp = _a.refProp, title = _a.title, type = _a.type, rest = __rest(_a, ["_modifierClass", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-pressed', "bgColor", "bgSize", "borderColor", "children", "color", "disabled", "getRef", "hoverBgColor", "hoverBorderColor", "hoverColor", "hoverBgSize", "id", "linkComponent", "linkProps", "margin", "name", "onClick", "onMouseUp", "radius", "onMouseDown", "refProp", "title", "type"]);
|
|
62
63
|
var _b = (0, react_1.useState)(false), hovered = _b[0], setHovered = _b[1];
|
|
63
64
|
function getBgColorClass() {
|
|
64
65
|
var colorEnum = bgColor;
|
|
@@ -97,7 +98,7 @@ function ButtonIcon(_a) {
|
|
|
97
98
|
}
|
|
98
99
|
return "rounded--".concat(radiusEnum);
|
|
99
100
|
}
|
|
100
|
-
var btnClass = (0, class_names_1.default)('Button-Icon', getBgColorClass(), getColorClass(), getBorderColorClass(), getRadiusClass(), _modifierClass);
|
|
101
|
+
var btnClass = (0, class_names_1.default)('Button-Icon', getBgColorClass(), getColorClass(), getBorderColorClass(), getRadiusClass(), (0, modifier_classes_1.getMarginClass)(margin), _modifierClass);
|
|
101
102
|
var style = {
|
|
102
103
|
height: hovered ? hoverBgSize || bgSize : bgSize,
|
|
103
104
|
width: hovered ? hoverBgSize || bgSize : bgSize
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button_icon.js","sourceRoot":"","sources":["../../../src/components/button_icon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;
|
|
1
|
+
{"version":3,"file":"button_icon.js","sourceRoot":"","sources":["../../../src/components/button_icon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AAWxC,qEAA8C;AAC9C,6EAAyD;AACzD,8DAA2D;AAE3D,iDAA+C;AAiC/C,IAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,IAAM,mBAAmB,GAAG,MAAM,CAAC;AACnC,IAAM,sBAAsB,GAAG,QAAQ,CAAC;AACxC,IAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC,SAAgB,UAAU,CAAC,EAgCT;IA/BhB,IAAA,cAAc,oBAAA,EACG,YAAY,sBAAA,EACZ,YAAY,sBAAA,EACf,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnB,WAAW,qBAAA,EAC3B,OAAO,aAAA,EACP,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,QAAQ,cAAA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,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI;QAEV,wCAAM,SAAS,EAAC,YAAY,IAAE,QAAQ,CAAQ,CACjC,CAChB,CAAC;AACJ,CAAC;AAtID,gCAsIC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GetRef } from '../utils/refs';
|
|
3
|
-
import type { CommonComponentProps,
|
|
4
|
-
interface ButtonModeProps extends CommonComponentProps,
|
|
3
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
4
|
+
interface ButtonModeProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
active?: boolean;
|
|
6
6
|
'aria-controls'?: string;
|
|
7
7
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
@@ -20,5 +20,5 @@ interface ButtonModeProps extends CommonComponentProps, ModifierProps {
|
|
|
20
20
|
title?: string;
|
|
21
21
|
type?: 'button' | 'submit';
|
|
22
22
|
}
|
|
23
|
-
export declare function ButtonMode({ _modifierClass, active, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-pressed': ariaPressed, children, disabled, getRef, id, linkComponent, linkProps, name, onClick, onMouseUp, onMouseDown, refProp, title, type, ...rest }: ButtonModeProps): React.JSX.Element;
|
|
23
|
+
export declare function ButtonMode({ _modifierClass, active, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, 'aria-pressed': ariaPressed, children, disabled, getRef, id, linkComponent, linkProps, margin, name, onClick, onMouseUp, onMouseDown, refProp, title, type, ...rest }: ButtonModeProps): React.JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -30,9 +30,10 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
32
|
var common_button_1 = require("./common_button");
|
|
33
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
33
34
|
function ButtonMode(_a) {
|
|
34
|
-
var _modifierClass = _a._modifierClass, active = _a.active, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], ariaPressed = _a["aria-pressed"], children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, linkComponent = _a.linkComponent, linkProps = _a.linkProps, name = _a.name, onClick = _a.onClick, onMouseUp = _a.onMouseUp, onMouseDown = _a.onMouseDown, refProp = _a.refProp, title = _a.title, type = _a.type, rest = __rest(_a, ["_modifierClass", "active", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-pressed', "children", "disabled", "getRef", "id", "linkComponent", "linkProps", "name", "onClick", "onMouseUp", "onMouseDown", "refProp", "title", "type"]);
|
|
35
|
-
var className = (0, class_names_1.default)('Button Button-Mode', _modifierClass, {
|
|
35
|
+
var _modifierClass = _a._modifierClass, active = _a.active, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], ariaPressed = _a["aria-pressed"], children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, linkComponent = _a.linkComponent, linkProps = _a.linkProps, margin = _a.margin, name = _a.name, onClick = _a.onClick, onMouseUp = _a.onMouseUp, onMouseDown = _a.onMouseDown, refProp = _a.refProp, title = _a.title, type = _a.type, rest = __rest(_a, ["_modifierClass", "active", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-pressed', "children", "disabled", "getRef", "id", "linkComponent", "linkProps", "margin", "name", "onClick", "onMouseUp", "onMouseDown", "refProp", "title", "type"]);
|
|
36
|
+
var className = (0, class_names_1.default)('Button Button-Mode', _modifierClass, (0, modifier_classes_1.getMarginClass)(margin), {
|
|
36
37
|
'Button-Mode--selected': active
|
|
37
38
|
});
|
|
38
39
|
return (react_1.default.createElement(common_button_1.CommonButton, __assign({}, (0, data_attributes_1.default)(rest), { "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-pressed": ariaPressed, className: className, disabled: disabled, getRef: getRef, id: id, linkComponent: linkComponent, linkProps: linkProps, name: name, onClick: onClick, onMouseUp: onMouseUp, onMouseDown: onMouseDown, refProp: refProp, title: title, type: type }), children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button_mode.js","sourceRoot":"","sources":["../../../src/components/button_mode.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"button_mode.js","sourceRoot":"","sources":["../../../src/components/button_mode.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,6EAAyD;AAEzD,iDAA+C;AAC/C,8DAA2D;AAyB3D,SAAgB,UAAU,CAAC,EAwBT;IAvBhB,IAAA,cAAc,oBAAA,EACd,MAAM,YAAA,EACW,YAAY,sBAAA,EACZ,YAAY,sBAAA,EACf,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnB,WAAW,qBAAA,EAC3B,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,aAAa,mBAAA,EACb,SAAS,eAAA,EACT,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,KAAK,WAAA,EACL,IAAI,UAAA,EACD,IAAI,cAvBkB,8RAwB1B,CADQ;IAEP,IAAM,SAAS,GAAG,IAAA,qBAAU,EAC1B,oBAAoB,EACpB,cAAc,EACd,IAAA,iCAAc,EAAC,MAAM,CAAC,EACtB;QACE,uBAAuB,EAAE,MAAM;KAChC,CACF,CAAC;IAEF,OAAO,CACL,8BAAC,4BAAY,eACP,IAAA,yBAAiB,EAAC,IAAI,CAAC,qBACZ,YAAY,mBACZ,YAAY,gBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,kBACnB,WAAW,EACzB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,EAAE,EACN,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,KAET,QAAQ,CACI,CAChB,CAAC;AACJ,CAAC;AA5DD,gCA4DC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CommonComponentProps,
|
|
2
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
|
-
interface ButtonPlainProps extends CommonComponentProps,
|
|
4
|
+
interface ButtonPlainProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
'aria-controls'?: string;
|
|
6
6
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -13,5 +13,5 @@ interface ButtonPlainProps extends CommonComponentProps, ModifierProps {
|
|
|
13
13
|
title?: string;
|
|
14
14
|
type?: 'button' | 'submit';
|
|
15
15
|
}
|
|
16
|
-
export declare function ButtonPlain({ _modifierClass, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, disabled, getRef, id, name, onClick, title, type, ...rest }: ButtonPlainProps): React.JSX.Element;
|
|
16
|
+
export declare function ButtonPlain({ _modifierClass, 'aria-controls': ariaControls, 'aria-expanded': ariaExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, disabled, getRef, id, margin, name, onClick, title, type, ...rest }: ButtonPlainProps): React.JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -29,9 +29,10 @@ exports.ButtonPlain = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
32
33
|
function ButtonPlain(_a) {
|
|
33
|
-
var _modifierClass = _a._modifierClass, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, name = _a.name, onClick = _a.onClick, title = _a.title, _b = _a.type, type = _b === void 0 ? 'button' : _b, rest = __rest(_a, ["_modifierClass", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "disabled", "getRef", "id", "name", "onClick", "title", "type"]);
|
|
34
|
-
return (react_1.default.createElement("button", __assign({}, (0, data_attributes_1.default)(rest), { "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Button--plain', _modifierClass), disabled: disabled, id: id, ref: getRef, name: name, onClick: onClick, title: title,
|
|
34
|
+
var _modifierClass = _a._modifierClass, ariaControls = _a["aria-controls"], ariaExpanded = _a["aria-expanded"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, margin = _a.margin, name = _a.name, onClick = _a.onClick, title = _a.title, _b = _a.type, type = _b === void 0 ? 'button' : _b, rest = __rest(_a, ["_modifierClass", 'aria-controls', 'aria-expanded', 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "disabled", "getRef", "id", "margin", "name", "onClick", "title", "type"]);
|
|
35
|
+
return (react_1.default.createElement("button", __assign({}, (0, data_attributes_1.default)(rest), { "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Button--plain', (0, modifier_classes_1.getMarginClass)(margin), _modifierClass), disabled: disabled, id: id, ref: getRef, name: name, onClick: onClick, title: title,
|
|
35
36
|
// eslint-disable-next-line react/button-has-type
|
|
36
37
|
type: type }), children));
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button_plain.js","sourceRoot":"","sources":["../../../src/components/button_plain.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"button_plain.js","sourceRoot":"","sources":["../../../src/components/button_plain.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,6EAAyD;AACzD,8DAA2D;AAkB3D,SAAgB,WAAW,CAAC,EAiBT;IAhBjB,IAAA,cAAc,oBAAA,EACG,YAAY,sBAAA,EACZ,YAAY,sBAAA,EACf,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,KAAK,WAAA,EACL,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACZ,IAAI,cAhBmB,+LAiB3B,CADQ;IAEP,OAAO,CACL,qDACM,IAAA,yBAAiB,EAAC,IAAI,CAAC,qBACZ,YAAY,mBACZ,YAAY,gBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,EACjC,SAAS,EAAE,IAAA,qBAAU,EACnB,eAAe,EACf,IAAA,iCAAc,EAAC,MAAM,CAAC,EACtB,cAAc,CACf,EACD,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK;QACZ,iDAAiD;QACjD,IAAI,EAAE,IAAI,KAET,QAAQ,CACF,CACV,CAAC;AACJ,CAAC;AA3CD,kCA2CC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GetRef } from '../utils/refs';
|
|
3
|
-
import type { CommonComponentProps,
|
|
4
|
-
interface CardProps extends CommonComponentProps,
|
|
3
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
4
|
+
interface CardProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
borderColor?: string;
|
|
6
6
|
borderPosition?: 'all' | 'bottom' | 'left' | 'right' | 'top';
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -21,5 +21,5 @@ interface CardProps extends CommonComponentProps, ModifierProps {
|
|
|
21
21
|
max?: number | string;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export declare function Card({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, borderColor, borderPosition, children, getRef, height, id, linkComponent, linkProps, refProp, width, ...rest }: CardProps): React.JSX.Element;
|
|
24
|
+
export declare function Card({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, borderColor, borderPosition, children, getRef, height, id, linkComponent, linkProps, margin, refProp, width, ...rest }: CardProps): React.JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -30,6 +30,7 @@ var react_1 = __importDefault(require("react"));
|
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var reject_1 = __importDefault(require("../utils/reject"));
|
|
32
32
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
33
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
33
34
|
var DISALLOWED_LINK_PROPS = ['className'];
|
|
34
35
|
function sanitizeProps(props) {
|
|
35
36
|
if (props)
|
|
@@ -37,8 +38,8 @@ function sanitizeProps(props) {
|
|
|
37
38
|
}
|
|
38
39
|
function Card(_a) {
|
|
39
40
|
var _b, _c;
|
|
40
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], borderColor = _a.borderColor, _d = _a.borderPosition, borderPosition = _d === void 0 ? 'all' : _d, children = _a.children, getRef = _a.getRef, _e = _a.height, height = _e === void 0 ? {} : _e, id = _a.id, linkComponent = _a.linkComponent, linkProps = _a.linkProps, _f = _a.refProp, refProp = _f === void 0 ? 'ref' : _f, _g = _a.width, width = _g === void 0 ? {} : _g, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "borderColor", "borderPosition", "children", "getRef", "height", "id", "linkComponent", "linkProps", "refProp", "width"]);
|
|
41
|
-
var className = (0, class_names_1.default)('Card', _modifierClass, (_b = {},
|
|
41
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], borderColor = _a.borderColor, _d = _a.borderPosition, borderPosition = _d === void 0 ? 'all' : _d, children = _a.children, getRef = _a.getRef, _e = _a.height, height = _e === void 0 ? {} : _e, id = _a.id, linkComponent = _a.linkComponent, linkProps = _a.linkProps, margin = _a.margin, _f = _a.refProp, refProp = _f === void 0 ? 'ref' : _f, _g = _a.width, width = _g === void 0 ? {} : _g, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "borderColor", "borderPosition", "children", "getRef", "height", "id", "linkComponent", "linkProps", "margin", "refProp", "width"]);
|
|
42
|
+
var className = (0, class_names_1.default)('Card', _modifierClass, (0, modifier_classes_1.getMarginClass)(margin), (_b = {},
|
|
42
43
|
_b["b-color--".concat(borderColor)] = borderColor,
|
|
43
44
|
_b['Card--bordered'] = borderColor,
|
|
44
45
|
_b["Card--bordered-".concat(borderPosition)] = borderColor && borderPosition,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,2DAAqC;AACrC,6EAAyD;AACzD,8DAA2D;AA0B3D,IAAM,qBAAqB,GAAG,CAAC,WAAW,CAAC,CAAC;AAE5C,SAAS,aAAa,CAAC,KAA6B;IAClD,IAAI,KAAK;QAAE,OAAO,IAAA,gBAAM,EAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;AACzD,CAAC;AAED,SAAgB,IAAI,CAAC,EAiBT;;IAhBV,IAAA,cAAc,oBAAA,EACA,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,WAAW,iBAAA,EACX,sBAAsB,EAAtB,cAAc,mBAAG,KAAK,KAAA,EACtB,QAAQ,cAAA,EACR,MAAM,YAAA,E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|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CommonComponentProps,
|
|
2
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
|
-
interface CardBodyProps extends CommonComponentProps,
|
|
4
|
+
interface CardBodyProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
getRef?: GetRef<HTMLDivElement>;
|
|
7
7
|
id?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function CardBody({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, getRef, id, ...rest }: CardBodyProps): React.JSX.Element;
|
|
9
|
+
export declare function CardBody({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, getRef, id, margin, ...rest }: CardBodyProps): React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -29,9 +29,10 @@ exports.CardBody = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
32
33
|
function CardBody(_a) {
|
|
33
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, getRef = _a.getRef, id = _a.id, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "getRef", "id"]);
|
|
34
|
-
return (react_1.default.createElement("div", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Card__Body', _modifierClass), id: id, ref: getRef }), children));
|
|
34
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, getRef = _a.getRef, id = _a.id, margin = _a.margin, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "getRef", "id", "margin"]);
|
|
35
|
+
return (react_1.default.createElement("div", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Card__Body', (0, modifier_classes_1.getMarginClass)(margin), _modifierClass), id: id, ref: getRef }), children));
|
|
35
36
|
}
|
|
36
37
|
exports.CardBody = CardBody;
|
|
37
38
|
//# sourceMappingURL=card_body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card_body.js","sourceRoot":"","sources":["../../../src/components/card_body.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"card_body.js","sourceRoot":"","sources":["../../../src/components/card_body.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,6EAAyD;AACzD,8DAA2D;AAW3D,SAAgB,QAAQ,CAAC,EAUT;IATd,IAAA,cAAc,oBAAA,EACA,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,MAAM,YAAA,EACH,IAAI,cATgB,6GAUxB,CADQ;IAEP,OAAO,CACL,kDACM,IAAA,yBAAiB,EAAC,IAAI,CAAC,kBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,EACjC,SAAS,EAAE,IAAA,qBAAU,EACnB,YAAY,EACZ,IAAA,iCAAc,EAAC,MAAM,CAAC,EACtB,cAAc,CACf,EACD,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,MAAM,KAEV,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AA5BD,4BA4BC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GetRef } from '../utils/refs';
|
|
3
|
-
import type { CommonComponentProps,
|
|
4
|
-
interface CardFooterProps extends CommonComponentProps,
|
|
3
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
4
|
+
interface CardFooterProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
hasDivider?: boolean;
|
|
7
7
|
getRef?: GetRef<HTMLDivElement>;
|
|
8
8
|
id?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function CardFooter({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, hasDivider, getRef, id, ...rest }: CardFooterProps): React.JSX.Element;
|
|
10
|
+
export declare function CardFooter({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, hasDivider, getRef, id, margin, ...rest }: CardFooterProps): React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -29,9 +29,10 @@ exports.CardFooter = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
32
33
|
function CardFooter(_a) {
|
|
33
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, _b = _a.hasDivider, hasDivider = _b === void 0 ? true : _b, getRef = _a.getRef, id = _a.id, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "hasDivider", "getRef", "id"]);
|
|
34
|
-
return (react_1.default.createElement("div", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Card__Footer', _modifierClass), id: id, ref: getRef, style: hasDivider ? undefined : { borderTop: 'none' } }), children));
|
|
34
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, _b = _a.hasDivider, hasDivider = _b === void 0 ? true : _b, getRef = _a.getRef, id = _a.id, margin = _a.margin, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "hasDivider", "getRef", "id", "margin"]);
|
|
35
|
+
return (react_1.default.createElement("div", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Card__Footer', (0, modifier_classes_1.getMarginClass)(margin), _modifierClass), id: id, ref: getRef, style: hasDivider ? undefined : { borderTop: 'none' } }), children));
|
|
35
36
|
}
|
|
36
37
|
exports.CardFooter = CardFooter;
|
|
37
38
|
//# sourceMappingURL=card_footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card_footer.js","sourceRoot":"","sources":["../../../src/components/card_footer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"card_footer.js","sourceRoot":"","sources":["../../../src/components/card_footer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,6EAAyD;AACzD,8DAA2D;AAY3D,SAAgB,UAAU,CAAC,EAWT;IAVhB,IAAA,cAAc,oBAAA,EACA,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,QAAQ,cAAA,EACR,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,MAAM,YAAA,EACN,EAAE,QAAA,EACF,MAAM,YAAA,EACH,IAAI,cAVkB,2HAW1B,CADQ;IAEP,OAAO,CACL,kDACM,IAAA,yBAAiB,EAAC,IAAI,CAAC,kBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,EACjC,SAAS,EAAE,IAAA,qBAAU,EACnB,cAAc,EACd,IAAA,iCAAc,EAAC,MAAM,CAAC,EACtB,cAAc,CACf,EACD,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,KAEpD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AA9BD,gCA8BC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GetRef } from '../utils/refs';
|
|
3
|
-
import type { CommonComponentProps,
|
|
4
|
-
interface CardsProps extends CommonComponentProps,
|
|
3
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
4
|
+
interface CardsProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
getRef?: GetRef<HTMLDivElement>;
|
|
7
7
|
id?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function Cards({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, getRef, id, ...rest }: CardsProps): React.JSX.Element;
|
|
9
|
+
export declare function Cards({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, getRef, id, margin, ...rest }: CardsProps): React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -29,9 +29,10 @@ exports.Cards = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
32
33
|
function Cards(_a) {
|
|
33
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, getRef = _a.getRef, id = _a.id, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "getRef", "id"]);
|
|
34
|
-
return (react_1.default.createElement("div", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Cards', _modifierClass), id: id, ref: getRef }), children));
|
|
34
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, getRef = _a.getRef, id = _a.id, margin = _a.margin, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "getRef", "id", "margin"]);
|
|
35
|
+
return (react_1.default.createElement("div", __assign({}, (0, data_attributes_1.default)(rest), { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, className: (0, class_names_1.default)('Cards', (0, modifier_classes_1.getMarginClass)(margin), _modifierClass), id: id, ref: getRef }), children));
|
|
35
36
|
}
|
|
36
37
|
exports.Cards = Cards;
|
|
37
38
|
//# sourceMappingURL=cards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../../src/components/cards.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../../src/components/cards.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAS1B,qEAA8C;AAC9C,6EAAyD;AACzD,8DAA2D;AAW3D,SAAgB,KAAK,CAAC,EAUT;IATX,IAAA,cAAc,oBAAA,EACA,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,EAAE,QAAA,EACF,MAAM,YAAA,EACH,IAAI,cATa,6GAUrB,CADQ;IAEP,OAAO,CACL,kDACM,IAAA,yBAAiB,EAAC,IAAI,CAAC,kBACf,SAAS,qBACJ,cAAc,sBACb,eAAe,EACjC,SAAS,EAAE,IAAA,qBAAU,EAAC,OAAO,EAAE,IAAA,iCAAc,EAAC,MAAM,CAAC,EAAE,cAAc,CAAC,EACtE,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,MAAM,KAEV,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AAxBD,sBAwBC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GetRef } from '../utils/refs';
|
|
3
|
-
import type { Colors, CommonComponentProps,
|
|
4
|
-
interface CheckboxInputProps extends CommonComponentProps,
|
|
3
|
+
import type { Colors, CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
4
|
+
interface CheckboxInputProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
6
|
+
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
6
7
|
checked?: boolean;
|
|
7
8
|
color?: Colors;
|
|
8
9
|
defaultChecked?: boolean;
|
|
@@ -14,8 +15,9 @@ interface CheckboxInputProps extends CommonComponentProps, ModifierProps {
|
|
|
14
15
|
name?: string;
|
|
15
16
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
16
17
|
readOnly?: boolean;
|
|
18
|
+
required?: boolean;
|
|
17
19
|
tabIndex?: number;
|
|
18
20
|
value?: number | string;
|
|
19
21
|
}
|
|
20
|
-
export declare function CheckboxInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, checked, color, defaultChecked, disabled, getRef, id, indeterminate, label, name, onChange, readOnly, tabIndex, value, ...rest }: CheckboxInputProps): React.JSX.Element;
|
|
22
|
+
export declare function CheckboxInput({ _modifierClass, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-required': ariaRequired, checked, color, defaultChecked, disabled, getRef, id, indeterminate, label, margin, name, onChange, readOnly, required, tabIndex, value, ...rest }: CheckboxInputProps): React.JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -31,6 +31,7 @@ var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
|
31
31
|
var forms_1 = require("../utils/forms");
|
|
32
32
|
var refs_1 = require("../utils/refs");
|
|
33
33
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
34
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
34
35
|
var shared_hooks_1 = require("./shared_hooks");
|
|
35
36
|
var checkbox_check_1 = require("../icons/checkbox_check");
|
|
36
37
|
var checkbox_indeterminate_1 = require("../icons/checkbox_indeterminate");
|
|
@@ -40,13 +41,13 @@ function renderIcon(checked, indeterminate, readOnly) {
|
|
|
40
41
|
return react_1.default.createElement(checkbox_check_1.IconCheckboxCheck, { "aria-hidden": true });
|
|
41
42
|
}
|
|
42
43
|
function CheckboxInput(_a) {
|
|
43
|
-
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], checked = _a.checked, _b = _a.color, color = _b === void 0 ? 'dscout' : _b, defaultChecked = _a.defaultChecked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, indeterminate = _a.indeterminate, label = _a.label, name = _a.name, onChange = _a.onChange, readOnly = _a.readOnly, tabIndex = _a.tabIndex, value = _a.value, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', "checked", "color", "defaultChecked", "disabled", "getRef", "id", "indeterminate", "label", "name", "onChange", "readOnly", "tabIndex", "value"]);
|
|
44
|
+
var _modifierClass = _a._modifierClass, ariaDescribedby = _a["aria-describedby"], ariaInvalid = _a["aria-invalid"], ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaRequired = _a["aria-required"], checked = _a.checked, _b = _a.color, color = _b === void 0 ? 'dscout' : _b, defaultChecked = _a.defaultChecked, disabled = _a.disabled, getRef = _a.getRef, id = _a.id, indeterminate = _a.indeterminate, label = _a.label, margin = _a.margin, name = _a.name, onChange = _a.onChange, readOnly = _a.readOnly, required = _a.required, tabIndex = _a.tabIndex, value = _a.value, rest = __rest(_a, ["_modifierClass", 'aria-describedby', 'aria-invalid', 'aria-label', 'aria-labelledby', 'aria-required', "checked", "color", "defaultChecked", "disabled", "getRef", "id", "indeterminate", "label", "margin", "name", "onChange", "readOnly", "required", "tabIndex", "value"]);
|
|
44
45
|
var checkboxId = (0, shared_hooks_1.useFallbackId)(id);
|
|
45
|
-
var className = (0, class_names_1.default)('Selector', _modifierClass, {
|
|
46
|
+
var className = (0, class_names_1.default)('Selector', (0, modifier_classes_1.getMarginClass)(margin), _modifierClass, {
|
|
46
47
|
'Selector--with-label': label
|
|
47
48
|
});
|
|
48
49
|
return (react_1.default.createElement("div", { className: className },
|
|
49
|
-
react_1.default.createElement("input", __assign({}, (0, data_attributes_1.default)(rest), { "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, checked: checked, className: "Selector__Checkbox", defaultChecked: defaultChecked, disabled: disabled || readOnly, id: checkboxId, name: name, onChange: onChange, readOnly: readOnly, ref: function (ref) {
|
|
50
|
+
react_1.default.createElement("input", __assign({}, (0, data_attributes_1.default)(rest), { "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-required": ariaRequired, checked: checked, className: "Selector__Checkbox", defaultChecked: defaultChecked, disabled: disabled || readOnly, id: checkboxId, name: name, onChange: onChange, readOnly: readOnly, required: required, ref: function (ref) {
|
|
50
51
|
if (ref)
|
|
51
52
|
ref.indeterminate = indeterminate;
|
|
52
53
|
(0, refs_1.handleGetRef)(getRef, ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox_input.js","sourceRoot":"","sources":["../../../src/components/checkbox_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
|
|
1
|
+
{"version":3,"file":"checkbox_input.js","sourceRoot":"","sources":["../../../src/components/checkbox_input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAU1B,qEAA8C;AAC9C,wCAA4C;AAC5C,sCAA6C;AAC7C,6EAAyD;AACzD,8DAA2D;AAE3D,+CAA+C;AAE/C,0DAA4D;AAC5D,0EAA4E;AAwB5E,SAAS,UAAU,CACjB,OAAgB,EAChB,aAAsB,EACtB,QAAiB;IAEjB,IAAI,aAAa,IAAI,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC;QACzC,OAAO,8BAAC,kDAAyB,0BAAe,CAAC;IAEnD,OAAO,8BAAC,kCAAiB,0BAAe,CAAC;AAC3C,CAAC;AAED,SAAgB,aAAa,CAAC,EAuBT;IAtBnB,IAAA,cAAc,oBAAA,EACM,eAAe,yBAAA,EACnB,WAAW,qBAAA,EACb,SAAS,mBAAA,EACJ,cAAc,wBAAA,EAChB,YAAY,sBAAA,EAC7B,OAAO,aAAA,EACP,aAAgB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAChB,cAAc,o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K,IAAI,CACR,yCAAO,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,UAAU,IACnD,KAAK,CACA,CACT;QACA,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,CACzC,CACP,CAAC;AACJ,CAAC;AArED,sCAqEC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Colors, CommonComponentProps,
|
|
2
|
+
import type { Colors, CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
|
-
interface ChipProps extends CommonComponentProps,
|
|
4
|
+
interface ChipProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
color?: Colors;
|
|
7
7
|
getRef?: GetRef<HTMLSpanElement>;
|
|
@@ -28,5 +28,5 @@ interface ChipProps extends CommonComponentProps, ModifierProps {
|
|
|
28
28
|
* will match the inherited text color. If desired, the text color can be set
|
|
29
29
|
* explicitly with `textColor` prop, but that's an unlikely use case.
|
|
30
30
|
*/
|
|
31
|
-
export declare function Chip({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, color, getRef, id, outline, textColor, title, ...rest }: ChipProps): React.JSX.Element;
|
|
31
|
+
export declare function Chip({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, color, getRef, id, margin, outline, textColor, title, ...rest }: ChipProps): React.JSX.Element;
|
|
32
32
|
export {};
|
|
@@ -29,6 +29,7 @@ exports.Chip = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
31
31
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
32
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
32
33
|
var DEFAULT_TEXT_COLOR = 'invert';
|
|
33
34
|
/**
|
|
34
35
|
* With no color specified, the `<Chip />` bases its colors off of the text
|
|
@@ -50,14 +51,14 @@ var DEFAULT_TEXT_COLOR = 'invert';
|
|
|
50
51
|
*/
|
|
51
52
|
function Chip(_a) {
|
|
52
53
|
var _b, _c;
|
|
53
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, color = _a.color, getRef = _a.getRef, id = _a.id, outline = _a.outline, textColor = _a.textColor, title = _a.title, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "color", "getRef", "id", "outline", "textColor", "title"]);
|
|
54
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, color = _a.color, getRef = _a.getRef, id = _a.id, margin = _a.margin, outline = _a.outline, textColor = _a.textColor, title = _a.title, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "color", "getRef", "id", "margin", "outline", "textColor", "title"]);
|
|
54
55
|
function getContentColor() {
|
|
55
56
|
if (outline)
|
|
56
57
|
return textColor || null;
|
|
57
58
|
return textColor || DEFAULT_TEXT_COLOR;
|
|
58
59
|
}
|
|
59
60
|
var contentColor = getContentColor();
|
|
60
|
-
var chipClassname = (0, class_names_1.default)('Chip', _modifierClass, (_b = {
|
|
61
|
+
var chipClassname = (0, class_names_1.default)('Chip', (0, modifier_classes_1.getMarginClass)(margin), _modifierClass, (_b = {
|
|
61
62
|
'Chip--outlined': outline
|
|
62
63
|
},
|
|
63
64
|
_b["color--".concat(color)] = color && outline,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;
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AE,KAAK;QAEZ,wCAAM,SAAS,EAAE,gBAAgB,IAAG,QAAQ,CAAQ,CAC/C,CACR,CAAC;AACJ,CAAC;AAnDD,oBAmDC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CommonComponentProps,
|
|
2
|
+
import type { CommonComponentProps, MarginModifierProp, ModifierClassProp } from '../types';
|
|
3
3
|
import type { GetRef } from '../utils/refs';
|
|
4
|
-
interface CollapsibleContentProps extends CommonComponentProps,
|
|
4
|
+
interface CollapsibleContentProps extends CommonComponentProps, MarginModifierProp, ModifierClassProp {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
collapsed: boolean;
|
|
7
7
|
getRef?: GetRef<HTMLDivElement>;
|
|
@@ -14,5 +14,5 @@ interface CollapsibleContentProps extends CommonComponentProps, ModifierProps {
|
|
|
14
14
|
* transition. When fully expanded or collapsed, it removes the `maxHeight` so
|
|
15
15
|
* that any content that might change height will not be cut off.
|
|
16
16
|
*/
|
|
17
|
-
export declare function CollapsibleContent({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, collapsed: collapsedProp, getRef, id, ...rest }: CollapsibleContentProps): React.JSX.Element;
|
|
17
|
+
export declare function CollapsibleContent({ _modifierClass, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-describedby': ariaDescribedby, children, collapsed: collapsedProp, getRef, id, margin, ...rest }: CollapsibleContentProps): React.JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -54,6 +54,7 @@ var class_names_1 = __importDefault(require("../utils/class_names"));
|
|
|
54
54
|
var dom_1 = require("../utils/dom");
|
|
55
55
|
var refs_1 = require("../utils/refs");
|
|
56
56
|
var data_attributes_1 = __importDefault(require("../utils/data_attributes"));
|
|
57
|
+
var modifier_classes_1 = require("../utils/modifier_classes");
|
|
57
58
|
var shared_hooks_1 = require("./shared_hooks");
|
|
58
59
|
var HEIGHT_BUFFER = 10;
|
|
59
60
|
var TRANSITION_DURATION = 200; // should match the duration defined in CSS
|
|
@@ -65,7 +66,7 @@ var TRANSITION_DURATION = 200; // should match the duration defined in CSS
|
|
|
65
66
|
* that any content that might change height will not be cut off.
|
|
66
67
|
*/
|
|
67
68
|
function CollapsibleContent(_a) {
|
|
68
|
-
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, collapsedProp = _a.collapsed, getRef = _a.getRef, id = _a.id, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "collapsed", "getRef", "id"]);
|
|
69
|
+
var _modifierClass = _a._modifierClass, ariaLabel = _a["aria-label"], ariaLabelledby = _a["aria-labelledby"], ariaDescribedby = _a["aria-describedby"], children = _a.children, collapsedProp = _a.collapsed, getRef = _a.getRef, id = _a.id, margin = _a.margin, rest = __rest(_a, ["_modifierClass", 'aria-label', 'aria-labelledby', 'aria-describedby', "children", "collapsed", "getRef", "id", "margin"]);
|
|
69
70
|
var _b = (0, react_1.useState)(collapsedProp), collapsedState = _b[0], setCollapsedState = _b[1];
|
|
70
71
|
var _c = (0, react_1.useState)(false), transitioningState = _c[0], setTransitioningState = _c[1];
|
|
71
72
|
var content = (0, react_1.useRef)();
|
|
@@ -99,9 +100,16 @@ function CollapsibleContent(_a) {
|
|
|
99
100
|
setMaxHeight(collapsedState);
|
|
100
101
|
startTransitionTimeout();
|
|
101
102
|
}, [collapsedState]);
|
|
102
|
-
var wrapperClassNames = (0, class_names_1.default)('Collapsible__Wrapper', _modifierClass, {
|
|
103
|
+
var wrapperClassNames = (0, class_names_1.default)('Collapsible__Wrapper', _modifierClass, (0, modifier_classes_1.getMarginClass)(margin), {
|
|
103
104
|
'Collapsible__Wrapper--collapsed': collapsedState,
|
|
104
|
-
'Collapsible__Wrapper--transitioning': transitioningState
|
|
105
|
+
'Collapsible__Wrapper--transitioning': transitioningState,
|
|
106
|
+
/**
|
|
107
|
+
* This margin utility class prevents the wrapper from adding extra vertical
|
|
108
|
+
* space when collapsed. The utility class is used instead of a CSS property
|
|
109
|
+
* so that it take precedence over any default margin applied by a
|
|
110
|
+
* a parent's `.spacing-v--` utility class.
|
|
111
|
+
*/
|
|
112
|
+
'margin-b--none': collapsedState || transitioningState
|
|
105
113
|
});
|
|
106
114
|
var contentClassNames = (0, class_names_1.default)('Collapsible__Content', {
|
|
107
115
|
'Collapsible__Content--collapsed': collapsedState
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible_content.js","sourceRoot":"","sources":["../../../src/components/collapsible_content.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgD;
|
|
1
|
+
{"version":3,"file":"collapsible_content.js","sourceRoot":"","sources":["../../../src/components/collapsible_content.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgD;AAShD,qEAA8C;AAC9C,oCAA0E;AAC1E,sCAA6C;AAC7C,6EAAyD;AACzD,8DAA2D;AAE3D,+CAAuE;AAYvE,IAAM,aAAa,GAAG,EAAE,CAAC;AACzB,IAAM,mBAAmB,GAAG,GAAG,CAAC,CAAC,2CAA2C;AAE5E;;;;;;GAMG;AAEH,SAAgB,kBAAkB,CAAC,EAWT;IAVxB,IAAA,cAAc,oBAAA,EACA,SAAS,mBAAA,EACJ,cAAc,wBAAA,EACb,eAAe,yBAAA,EACnC,QAAQ,cAAA,EACG,aAAa,eAAA,EACxB,MAAM,YAAA,EACN,EAAE,QAAA,EACF,MAAM,YAAA,EACH,IAAI,cAV0B,0HAWlC,CADQ;IAED,IAAA,KAAsC,IAAA,gBAAQ,EAAC,aAAa,CAAC,EAA5D,cAAc,QAAA,EAAE,iBAAiB,QAA2B,CAAC;IAC9D,IAAA,KAA8C,IAAA,gBAAQ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