@airtable/blocks 0.0.0-experimental-3e47d4d04-20250909 → 0.0.0-experimental-e625869e5-20251002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/base/types/airtable_interface.js +1 -3
- package/dist/esm/base/ui/block_wrapper.js +131 -96
- package/dist/esm/base/ui/cell_renderer.js +5 -176
- package/dist/esm/base/ui/global_alert.js +7 -3
- package/dist/esm/base/ui/global_css_helpers.js +28 -0
- package/dist/esm/base/ui/ui.js +1 -21
- package/dist/esm/base/ui/unstable_standalone_ui.js +28 -26
- package/dist/esm/base/ui/use_loadable.js +2 -3
- package/dist/esm/interface/types/airtable_interface.js +2 -3
- package/dist/esm/interface/ui/block_wrapper.js +45 -54
- package/dist/esm/interface/ui/cell_renderer.js +19 -0
- package/dist/esm/interface/ui/global_css_helpers.js +17 -0
- package/dist/esm/interface/ui/ui.js +1 -1
- package/dist/esm/interface/ui/use_custom_properties.js +43 -14
- package/dist/esm/shared/private_utils.js +51 -1
- package/dist/esm/shared/sdk_core.js +1 -1
- package/dist/esm/shared/ui/cell_renderer.js +137 -0
- package/dist/esm/shared/ui/use_watchable.js +2 -3
- package/dist/types/src/base/types/airtable_interface.d.ts +1 -3
- package/dist/types/src/base/types/airtable_interface.d.ts.map +1 -1
- package/dist/types/src/base/ui/block_wrapper.d.ts +2 -16
- package/dist/types/src/base/ui/block_wrapper.d.ts.map +1 -1
- package/dist/types/src/base/ui/cell_renderer.d.ts +6 -58
- package/dist/types/src/base/ui/cell_renderer.d.ts.map +1 -1
- package/dist/types/src/base/ui/global_css_helpers.d.ts +4 -0
- package/dist/types/src/base/ui/global_css_helpers.d.ts.map +1 -0
- package/dist/types/src/base/ui/ui.d.ts +1 -21
- package/dist/types/src/base/ui/ui.d.ts.map +1 -1
- package/dist/types/src/base/ui/unstable_standalone_ui.d.ts +2 -22
- package/dist/types/src/base/ui/unstable_standalone_ui.d.ts.map +1 -1
- package/dist/types/src/base/ui/use_loadable.d.ts.map +1 -1
- package/dist/types/src/interface/types/airtable_interface.d.ts +6 -4
- package/dist/types/src/interface/types/airtable_interface.d.ts.map +1 -1
- package/dist/types/src/interface/ui/block_wrapper.d.ts +1 -4
- package/dist/types/src/interface/ui/block_wrapper.d.ts.map +1 -1
- package/dist/types/src/interface/ui/cell_renderer.d.ts +19 -0
- package/dist/types/src/interface/ui/cell_renderer.d.ts.map +1 -0
- package/dist/types/src/interface/ui/global_css_helpers.d.ts +3 -0
- package/dist/types/src/interface/ui/global_css_helpers.d.ts.map +1 -0
- package/dist/types/src/interface/ui/ui.d.ts +1 -1
- package/dist/types/src/interface/ui/ui.d.ts.map +1 -1
- package/dist/types/src/interface/ui/use_custom_properties.d.ts +7 -0
- package/dist/types/src/interface/ui/use_custom_properties.d.ts.map +1 -1
- package/dist/types/src/shared/private_utils.d.ts +9 -1
- package/dist/types/src/shared/private_utils.d.ts.map +1 -1
- package/dist/types/src/shared/ui/cell_renderer.d.ts +32 -0
- package/dist/types/src/shared/ui/cell_renderer.d.ts.map +1 -0
- package/dist/types/src/shared/ui/use_watchable.d.ts.map +1 -1
- package/package.json +5 -39
- package/dist/esm/base/ui/baymax_utils.js +0 -455
- package/dist/esm/base/ui/box.js +0 -77
- package/dist/esm/base/ui/button.js +0 -143
- package/dist/esm/base/ui/choice_token.js +0 -84
- package/dist/esm/base/ui/collaborator_token.js +0 -115
- package/dist/esm/base/ui/color_palette.js +0 -185
- package/dist/esm/base/ui/color_palette_synced.js +0 -62
- package/dist/esm/base/ui/confirmation_dialog.js +0 -96
- package/dist/esm/base/ui/control_sizes.js +0 -92
- package/dist/esm/base/ui/create_detect_element_resize.js +0 -197
- package/dist/esm/base/ui/css_helpers.js +0 -17
- package/dist/esm/base/ui/dialog.js +0 -93
- package/dist/esm/base/ui/dialog_close_button.js +0 -96
- package/dist/esm/base/ui/field_icon.js +0 -37
- package/dist/esm/base/ui/field_picker.js +0 -91
- package/dist/esm/base/ui/field_picker_synced.js +0 -59
- package/dist/esm/base/ui/form_field.js +0 -102
- package/dist/esm/base/ui/geometry/geometry.js +0 -9
- package/dist/esm/base/ui/geometry/point.js +0 -12
- package/dist/esm/base/ui/geometry/rect.js +0 -44
- package/dist/esm/base/ui/geometry/size.js +0 -12
- package/dist/esm/base/ui/heading.js +0 -125
- package/dist/esm/base/ui/icon.js +0 -102
- package/dist/esm/base/ui/icon_config.js +0 -423
- package/dist/esm/base/ui/input.js +0 -152
- package/dist/esm/base/ui/input_synced.js +0 -59
- package/dist/esm/base/ui/key_codes.js +0 -66
- package/dist/esm/base/ui/label.js +0 -73
- package/dist/esm/base/ui/link.js +0 -189
- package/dist/esm/base/ui/loader.js +0 -52
- package/dist/esm/base/ui/modal.js +0 -135
- package/dist/esm/base/ui/model_picker_select.js +0 -50
- package/dist/esm/base/ui/popover.js +0 -312
- package/dist/esm/base/ui/progress_bar.js +0 -106
- package/dist/esm/base/ui/record_card.js +0 -556
- package/dist/esm/base/ui/record_card_list.js +0 -292
- package/dist/esm/base/ui/select.js +0 -182
- package/dist/esm/base/ui/select_and_select_buttons_helpers.js +0 -53
- package/dist/esm/base/ui/select_buttons.js +0 -150
- package/dist/esm/base/ui/select_buttons_synced.js +0 -55
- package/dist/esm/base/ui/select_synced.js +0 -58
- package/dist/esm/base/ui/switch.js +0 -160
- package/dist/esm/base/ui/switch_synced.js +0 -46
- package/dist/esm/base/ui/synced.js +0 -39
- package/dist/esm/base/ui/system/all_styles_set.js +0 -86
- package/dist/esm/base/ui/system/appearance/appearance_set.js +0 -21
- package/dist/esm/base/ui/system/appearance/background_color.js +0 -12
- package/dist/esm/base/ui/system/appearance/border.js +0 -48
- package/dist/esm/base/ui/system/appearance/border_radius.js +0 -12
- package/dist/esm/base/ui/system/appearance/box_shadow.js +0 -12
- package/dist/esm/base/ui/system/appearance/opacity.js +0 -12
- package/dist/esm/base/ui/system/dimensions/dimensions_set.js +0 -23
- package/dist/esm/base/ui/system/dimensions/height.js +0 -12
- package/dist/esm/base/ui/system/dimensions/max_height.js +0 -12
- package/dist/esm/base/ui/system/dimensions/max_width.js +0 -12
- package/dist/esm/base/ui/system/dimensions/min_height.js +0 -12
- package/dist/esm/base/ui/system/dimensions/min_width.js +0 -12
- package/dist/esm/base/ui/system/dimensions/width.js +0 -12
- package/dist/esm/base/ui/system/display.js +0 -13
- package/dist/esm/base/ui/system/flex_container/align_content.js +0 -9
- package/dist/esm/base/ui/system/flex_container/align_items.js +0 -9
- package/dist/esm/base/ui/system/flex_container/flex_container_set.js +0 -23
- package/dist/esm/base/ui/system/flex_container/flex_direction.js +0 -9
- package/dist/esm/base/ui/system/flex_container/flex_wrap.js +0 -9
- package/dist/esm/base/ui/system/flex_container/justify_content.js +0 -9
- package/dist/esm/base/ui/system/flex_container/justify_items.js +0 -10
- package/dist/esm/base/ui/system/flex_item/align_self.js +0 -9
- package/dist/esm/base/ui/system/flex_item/flex.js +0 -9
- package/dist/esm/base/ui/system/flex_item/flex_basis.js +0 -9
- package/dist/esm/base/ui/system/flex_item/flex_grow.js +0 -9
- package/dist/esm/base/ui/system/flex_item/flex_item_set.js +0 -25
- package/dist/esm/base/ui/system/flex_item/flex_shrink.js +0 -9
- package/dist/esm/base/ui/system/flex_item/justify_self.js +0 -10
- package/dist/esm/base/ui/system/flex_item/order.js +0 -9
- package/dist/esm/base/ui/system/index.js +0 -96
- package/dist/esm/base/ui/system/overflow.js +0 -15
- package/dist/esm/base/ui/system/position/bottom.js +0 -17
- package/dist/esm/base/ui/system/position/left.js +0 -17
- package/dist/esm/base/ui/system/position/position.js +0 -9
- package/dist/esm/base/ui/system/position/position_set.js +0 -23
- package/dist/esm/base/ui/system/position/right.js +0 -17
- package/dist/esm/base/ui/system/position/top.js +0 -17
- package/dist/esm/base/ui/system/position/z_index.js +0 -12
- package/dist/esm/base/ui/system/spacing/margin.js +0 -65
- package/dist/esm/base/ui/system/spacing/padding.js +0 -58
- package/dist/esm/base/ui/system/spacing/spacing_set.js +0 -15
- package/dist/esm/base/ui/system/typography/font_family.js +0 -12
- package/dist/esm/base/ui/system/typography/font_size.js +0 -12
- package/dist/esm/base/ui/system/typography/font_style.js +0 -9
- package/dist/esm/base/ui/system/typography/font_weight.js +0 -12
- package/dist/esm/base/ui/system/typography/letter_spacing.js +0 -12
- package/dist/esm/base/ui/system/typography/line_height.js +0 -9
- package/dist/esm/base/ui/system/typography/text_align.js +0 -9
- package/dist/esm/base/ui/system/typography/text_color.js +0 -12
- package/dist/esm/base/ui/system/typography/text_decoration.js +0 -9
- package/dist/esm/base/ui/system/typography/text_transform.js +0 -9
- package/dist/esm/base/ui/system/typography/typography_set.js +0 -31
- package/dist/esm/base/ui/system/utils/csstype.js +0 -1
- package/dist/esm/base/ui/system/utils/ensure_numbers_are_within_scale.js +0 -36
- package/dist/esm/base/ui/system/utils/get_style_props_for_responsive_prop.js +0 -67
- package/dist/esm/base/ui/system/utils/types.js +0 -1
- package/dist/esm/base/ui/table_picker.js +0 -64
- package/dist/esm/base/ui/table_picker_synced.js +0 -55
- package/dist/esm/base/ui/text.js +0 -109
- package/dist/esm/base/ui/text_button.js +0 -189
- package/dist/esm/base/ui/theme/default_theme/button_variants.js +0 -53
- package/dist/esm/base/ui/theme/default_theme/control_sizes.js +0 -96
- package/dist/esm/base/ui/theme/default_theme/heading_styles.js +0 -93
- package/dist/esm/base/ui/theme/default_theme/index.js +0 -31
- package/dist/esm/base/ui/theme/default_theme/input_variants.js +0 -32
- package/dist/esm/base/ui/theme/default_theme/link_variants.js +0 -29
- package/dist/esm/base/ui/theme/default_theme/select_buttons_variants.js +0 -66
- package/dist/esm/base/ui/theme/default_theme/select_variants.js +0 -44
- package/dist/esm/base/ui/theme/default_theme/switch_variants.js +0 -78
- package/dist/esm/base/ui/theme/default_theme/text_button_variants.js +0 -38
- package/dist/esm/base/ui/theme/default_theme/text_styles.js +0 -75
- package/dist/esm/base/ui/theme/default_theme/tokens.js +0 -205
- package/dist/esm/base/ui/theme/theme_context.js +0 -7
- package/dist/esm/base/ui/theme/use_theme.js +0 -4
- package/dist/esm/base/ui/tooltip.js +0 -165
- package/dist/esm/base/ui/types/aria_props.js +0 -1
- package/dist/esm/base/ui/types/data_attributes_prop.js +0 -1
- package/dist/esm/base/ui/types/tooltip_anchor_props.js +0 -1
- package/dist/esm/base/ui/use_form_field.js +0 -14
- package/dist/esm/base/ui/use_styled_system.js +0 -19
- package/dist/esm/base/ui/use_text_color_for_background_color.js +0 -9
- package/dist/esm/base/ui/view_picker.js +0 -82
- package/dist/esm/base/ui/view_picker_synced.js +0 -59
- package/dist/esm/base/ui/viewport_constraint.js +0 -120
- package/dist/esm/base/ui/with_styled_system.js +0 -120
- package/dist/types/src/base/ui/baymax_utils.d.ts +0 -2
- package/dist/types/src/base/ui/baymax_utils.d.ts.map +0 -1
- package/dist/types/src/base/ui/box.d.ts +0 -35
- package/dist/types/src/base/ui/box.d.ts.map +0 -1
- package/dist/types/src/base/ui/button.d.ts +0 -86
- package/dist/types/src/base/ui/button.d.ts.map +0 -1
- package/dist/types/src/base/ui/choice_token.d.ts +0 -49
- package/dist/types/src/base/ui/choice_token.d.ts.map +0 -1
- package/dist/types/src/base/ui/collaborator_token.d.ts +0 -45
- package/dist/types/src/base/ui/collaborator_token.d.ts.map +0 -1
- package/dist/types/src/base/ui/color_palette.d.ts +0 -77
- package/dist/types/src/base/ui/color_palette.d.ts.map +0 -1
- package/dist/types/src/base/ui/color_palette_synced.d.ts +0 -30
- package/dist/types/src/base/ui/color_palette_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/confirmation_dialog.d.ts +0 -66
- package/dist/types/src/base/ui/confirmation_dialog.d.ts.map +0 -1
- package/dist/types/src/base/ui/control_sizes.d.ts +0 -16
- package/dist/types/src/base/ui/control_sizes.d.ts.map +0 -1
- package/dist/types/src/base/ui/css_helpers.d.ts +0 -6
- package/dist/types/src/base/ui/css_helpers.d.ts.map +0 -1
- package/dist/types/src/base/ui/dialog.d.ts +0 -58
- package/dist/types/src/base/ui/dialog.d.ts.map +0 -1
- package/dist/types/src/base/ui/dialog_close_button.d.ts +0 -40
- package/dist/types/src/base/ui/dialog_close_button.d.ts.map +0 -1
- package/dist/types/src/base/ui/field_icon.d.ts +0 -25
- package/dist/types/src/base/ui/field_icon.d.ts.map +0 -1
- package/dist/types/src/base/ui/field_picker.d.ts +0 -34
- package/dist/types/src/base/ui/field_picker.d.ts.map +0 -1
- package/dist/types/src/base/ui/field_picker_synced.d.ts +0 -18
- package/dist/types/src/base/ui/field_picker_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/form_field.d.ts +0 -42
- package/dist/types/src/base/ui/form_field.d.ts.map +0 -1
- package/dist/types/src/base/ui/geometry/geometry.d.ts +0 -3
- package/dist/types/src/base/ui/geometry/geometry.d.ts.map +0 -1
- package/dist/types/src/base/ui/geometry/point.d.ts +0 -2
- package/dist/types/src/base/ui/geometry/point.d.ts.map +0 -1
- package/dist/types/src/base/ui/geometry/rect.d.ts +0 -2
- package/dist/types/src/base/ui/geometry/rect.d.ts.map +0 -1
- package/dist/types/src/base/ui/geometry/size.d.ts +0 -2
- package/dist/types/src/base/ui/geometry/size.d.ts.map +0 -1
- package/dist/types/src/base/ui/heading.d.ts +0 -64
- package/dist/types/src/base/ui/heading.d.ts.map +0 -1
- package/dist/types/src/base/ui/icon.d.ts +0 -45
- package/dist/types/src/base/ui/icon.d.ts.map +0 -1
- package/dist/types/src/base/ui/icon_config.d.ts +0 -424
- package/dist/types/src/base/ui/icon_config.d.ts.map +0 -1
- package/dist/types/src/base/ui/input.d.ts +0 -120
- package/dist/types/src/base/ui/input.d.ts.map +0 -1
- package/dist/types/src/base/ui/input_synced.d.ts +0 -18
- package/dist/types/src/base/ui/input_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/key_codes.d.ts +0 -2
- package/dist/types/src/base/ui/key_codes.d.ts.map +0 -1
- package/dist/types/src/base/ui/label.d.ts +0 -35
- package/dist/types/src/base/ui/label.d.ts.map +0 -1
- package/dist/types/src/base/ui/link.d.ts +0 -84
- package/dist/types/src/base/ui/link.d.ts.map +0 -1
- package/dist/types/src/base/ui/loader.d.ts +0 -38
- package/dist/types/src/base/ui/loader.d.ts.map +0 -1
- package/dist/types/src/base/ui/modal.d.ts +0 -54
- package/dist/types/src/base/ui/modal.d.ts.map +0 -1
- package/dist/types/src/base/ui/model_picker_select.d.ts +0 -19
- package/dist/types/src/base/ui/model_picker_select.d.ts.map +0 -1
- package/dist/types/src/base/ui/popover.d.ts +0 -106
- package/dist/types/src/base/ui/popover.d.ts.map +0 -1
- package/dist/types/src/base/ui/progress_bar.d.ts +0 -60
- package/dist/types/src/base/ui/progress_bar.d.ts.map +0 -1
- package/dist/types/src/base/ui/record_card.d.ts +0 -80
- package/dist/types/src/base/ui/record_card.d.ts.map +0 -1
- package/dist/types/src/base/ui/record_card_list.d.ts +0 -88
- package/dist/types/src/base/ui/record_card_list.d.ts.map +0 -1
- package/dist/types/src/base/ui/select.d.ts +0 -82
- package/dist/types/src/base/ui/select.d.ts.map +0 -1
- package/dist/types/src/base/ui/select_and_select_buttons_helpers.d.ts +0 -25
- package/dist/types/src/base/ui/select_and_select_buttons_helpers.d.ts.map +0 -1
- package/dist/types/src/base/ui/select_buttons.d.ts +0 -56
- package/dist/types/src/base/ui/select_buttons.d.ts.map +0 -1
- package/dist/types/src/base/ui/select_buttons_synced.d.ts +0 -18
- package/dist/types/src/base/ui/select_buttons_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/select_synced.d.ts +0 -18
- package/dist/types/src/base/ui/select_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/switch.d.ts +0 -82
- package/dist/types/src/base/ui/switch.d.ts.map +0 -1
- package/dist/types/src/base/ui/switch_synced.d.ts +0 -18
- package/dist/types/src/base/ui/switch_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/synced.d.ts +0 -23
- package/dist/types/src/base/ui/synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/all_styles_set.d.ts +0 -85
- package/dist/types/src/base/ui/system/all_styles_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/appearance/appearance_set.d.ts +0 -14
- package/dist/types/src/base/ui/system/appearance/appearance_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/appearance/background_color.d.ts +0 -12
- package/dist/types/src/base/ui/system/appearance/background_color.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/appearance/border.d.ts +0 -30
- package/dist/types/src/base/ui/system/appearance/border.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/appearance/border_radius.d.ts +0 -12
- package/dist/types/src/base/ui/system/appearance/border_radius.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/appearance/box_shadow.d.ts +0 -12
- package/dist/types/src/base/ui/system/appearance/box_shadow.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/appearance/opacity.d.ts +0 -12
- package/dist/types/src/base/ui/system/appearance/opacity.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/dimensions_set.d.ts +0 -15
- package/dist/types/src/base/ui/system/dimensions/dimensions_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/height.d.ts +0 -12
- package/dist/types/src/base/ui/system/dimensions/height.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/max_height.d.ts +0 -12
- package/dist/types/src/base/ui/system/dimensions/max_height.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/max_width.d.ts +0 -12
- package/dist/types/src/base/ui/system/dimensions/max_width.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/min_height.d.ts +0 -12
- package/dist/types/src/base/ui/system/dimensions/min_height.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/min_width.d.ts +0 -12
- package/dist/types/src/base/ui/system/dimensions/min_width.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/dimensions/width.d.ts +0 -12
- package/dist/types/src/base/ui/system/dimensions/width.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/display.d.ts +0 -13
- package/dist/types/src/base/ui/system/display.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/align_content.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_container/align_content.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/align_items.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_container/align_items.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/flex_container_set.d.ts +0 -15
- package/dist/types/src/base/ui/system/flex_container/flex_container_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/flex_direction.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_container/flex_direction.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/flex_wrap.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_container/flex_wrap.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/justify_content.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_container/justify_content.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_container/justify_items.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_container/justify_items.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/align_self.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/align_self.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/flex.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_basis.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/flex_basis.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_grow.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/flex_grow.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_item_set.d.ts +0 -16
- package/dist/types/src/base/ui/system/flex_item/flex_item_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/flex_shrink.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/flex_shrink.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/justify_self.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/justify_self.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/flex_item/order.d.ts +0 -12
- package/dist/types/src/base/ui/system/flex_item/order.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/index.d.ts +0 -106
- package/dist/types/src/base/ui/system/index.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/overflow.d.ts +0 -17
- package/dist/types/src/base/ui/system/overflow.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/bottom.d.ts +0 -12
- package/dist/types/src/base/ui/system/position/bottom.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/left.d.ts +0 -12
- package/dist/types/src/base/ui/system/position/left.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/position.d.ts +0 -12
- package/dist/types/src/base/ui/system/position/position.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/position_set.d.ts +0 -15
- package/dist/types/src/base/ui/system/position/position_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/right.d.ts +0 -12
- package/dist/types/src/base/ui/system/position/right.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/top.d.ts +0 -12
- package/dist/types/src/base/ui/system/position/top.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/position/z_index.d.ts +0 -12
- package/dist/types/src/base/ui/system/position/z_index.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/spacing/margin.d.ts +0 -24
- package/dist/types/src/base/ui/system/spacing/margin.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/spacing/padding.d.ts +0 -24
- package/dist/types/src/base/ui/system/spacing/padding.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/spacing/spacing_set.d.ts +0 -11
- package/dist/types/src/base/ui/system/spacing/spacing_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/font_family.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/font_family.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/font_size.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/font_size.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/font_style.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/font_style.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/font_weight.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/font_weight.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/letter_spacing.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/letter_spacing.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/line_height.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/line_height.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/text_align.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/text_align.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/text_color.d.ts +0 -16
- package/dist/types/src/base/ui/system/typography/text_color.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/text_decoration.d.ts +0 -14
- package/dist/types/src/base/ui/system/typography/text_decoration.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/text_transform.d.ts +0 -12
- package/dist/types/src/base/ui/system/typography/text_transform.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/typography/typography_set.d.ts +0 -19
- package/dist/types/src/base/ui/system/typography/typography_set.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/utils/csstype.d.ts +0 -3977
- package/dist/types/src/base/ui/system/utils/csstype.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/utils/ensure_numbers_are_within_scale.d.ts +0 -2
- package/dist/types/src/base/ui/system/utils/ensure_numbers_are_within_scale.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/utils/get_style_props_for_responsive_prop.d.ts +0 -2
- package/dist/types/src/base/ui/system/utils/get_style_props_for_responsive_prop.d.ts.map +0 -1
- package/dist/types/src/base/ui/system/utils/types.d.ts +0 -31
- package/dist/types/src/base/ui/system/utils/types.d.ts.map +0 -1
- package/dist/types/src/base/ui/table_picker.d.ts +0 -28
- package/dist/types/src/base/ui/table_picker.d.ts.map +0 -1
- package/dist/types/src/base/ui/table_picker_synced.d.ts +0 -18
- package/dist/types/src/base/ui/table_picker_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/text.d.ts +0 -66
- package/dist/types/src/base/ui/text.d.ts.map +0 -1
- package/dist/types/src/base/ui/text_button.d.ts +0 -83
- package/dist/types/src/base/ui/text_button.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/button_variants.d.ts +0 -8
- package/dist/types/src/base/ui/theme/default_theme/button_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/control_sizes.d.ts +0 -107
- package/dist/types/src/base/ui/theme/default_theme/control_sizes.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/heading_styles.d.ts +0 -11
- package/dist/types/src/base/ui/theme/default_theme/heading_styles.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/index.d.ts +0 -342
- package/dist/types/src/base/ui/theme/default_theme/index.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/input_variants.d.ts +0 -5
- package/dist/types/src/base/ui/theme/default_theme/input_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/link_variants.d.ts +0 -7
- package/dist/types/src/base/ui/theme/default_theme/link_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/select_buttons_variants.d.ts +0 -8
- package/dist/types/src/base/ui/theme/default_theme/select_buttons_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/select_variants.d.ts +0 -5
- package/dist/types/src/base/ui/theme/default_theme/select_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/switch_variants.d.ts +0 -16
- package/dist/types/src/base/ui/theme/default_theme/switch_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/text_button_variants.d.ts +0 -7
- package/dist/types/src/base/ui/theme/default_theme/text_button_variants.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/text_styles.d.ts +0 -76
- package/dist/types/src/base/ui/theme/default_theme/text_styles.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/default_theme/tokens.d.ts +0 -111
- package/dist/types/src/base/ui/theme/default_theme/tokens.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/theme_context.d.ts +0 -342
- package/dist/types/src/base/ui/theme/theme_context.d.ts.map +0 -1
- package/dist/types/src/base/ui/theme/use_theme.d.ts +0 -342
- package/dist/types/src/base/ui/theme/use_theme.d.ts.map +0 -1
- package/dist/types/src/base/ui/tooltip.d.ts +0 -64
- package/dist/types/src/base/ui/tooltip.d.ts.map +0 -1
- package/dist/types/src/base/ui/types/aria_props.d.ts +0 -22
- package/dist/types/src/base/ui/types/aria_props.d.ts.map +0 -1
- package/dist/types/src/base/ui/types/data_attributes_prop.d.ts +0 -10
- package/dist/types/src/base/ui/types/data_attributes_prop.d.ts.map +0 -1
- package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts +0 -13
- package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts.map +0 -1
- package/dist/types/src/base/ui/use_form_field.d.ts +0 -2
- package/dist/types/src/base/ui/use_form_field.d.ts.map +0 -1
- package/dist/types/src/base/ui/use_styled_system.d.ts +0 -2
- package/dist/types/src/base/ui/use_styled_system.d.ts.map +0 -1
- package/dist/types/src/base/ui/use_text_color_for_background_color.d.ts +0 -2
- package/dist/types/src/base/ui/use_text_color_for_background_color.d.ts.map +0 -1
- package/dist/types/src/base/ui/view_picker.d.ts +0 -34
- package/dist/types/src/base/ui/view_picker.d.ts.map +0 -1
- package/dist/types/src/base/ui/view_picker_synced.d.ts +0 -18
- package/dist/types/src/base/ui/view_picker_synced.d.ts.map +0 -1
- package/dist/types/src/base/ui/viewport_constraint.d.ts +0 -57
- package/dist/types/src/base/ui/viewport_constraint.d.ts.map +0 -1
- package/dist/types/src/base/ui/with_styled_system.d.ts +0 -2
- package/dist/types/src/base/ui/with_styled_system.d.ts.map +0 -1
- package/types/styled-system__core.d.ts +0 -41
|
@@ -1,455 +0,0 @@
|
|
|
1
|
-
import { css, keyframes } from 'emotion';
|
|
2
|
-
import { has } from '../../shared/private_utils';
|
|
3
|
-
import { spawnError } from '../../shared/error_utils';
|
|
4
|
-
const bounceIn = keyframes`
|
|
5
|
-
from, 50%, to {
|
|
6
|
-
-webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
7
|
-
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
8
|
-
}
|
|
9
|
-
0% {
|
|
10
|
-
opacity: 0.9;
|
|
11
|
-
-webkit-transform: scale3d(.98, .98, .98);
|
|
12
|
-
transform: scale3d(.98, .98, .98);
|
|
13
|
-
}
|
|
14
|
-
70% {
|
|
15
|
-
opacity: 1;
|
|
16
|
-
-webkit-transform: scale3d(1.01, 1.01, 1.01);
|
|
17
|
-
transform: scale3d(1.01, 1.01, 1.01);
|
|
18
|
-
}
|
|
19
|
-
to {
|
|
20
|
-
-webkit-transform: scale3d(1, 1, 1);
|
|
21
|
-
transform: scale3d(1, 1, 1);
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
const spinScale = keyframes`
|
|
25
|
-
0% {
|
|
26
|
-
transform: rotate(0) scale(1);
|
|
27
|
-
}
|
|
28
|
-
50% {
|
|
29
|
-
transform: rotate(360deg) scale(0.9);
|
|
30
|
-
}
|
|
31
|
-
100% {
|
|
32
|
-
transform: rotate(720deg) scale(1);
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
// TODO (stephen): import values from theme object?
|
|
37
|
-
const emotionClassNameByBaymaxClassName = {
|
|
38
|
-
absolute: css`
|
|
39
|
-
position: absolute;
|
|
40
|
-
`,
|
|
41
|
-
'align-top': css`
|
|
42
|
-
vertical-align: top;
|
|
43
|
-
`,
|
|
44
|
-
'all-0': css`
|
|
45
|
-
top: 0;
|
|
46
|
-
left: 0;
|
|
47
|
-
right: 0;
|
|
48
|
-
bottom: 0;
|
|
49
|
-
`,
|
|
50
|
-
animate: css`
|
|
51
|
-
transition: 0.085s all ease-in;
|
|
52
|
-
`,
|
|
53
|
-
'animate-bounce-in': css`
|
|
54
|
-
animation-name: ${bounceIn};
|
|
55
|
-
animation-duration: 240ms;
|
|
56
|
-
`,
|
|
57
|
-
'animate-infinite': css`
|
|
58
|
-
animation-iteration-count: infinite;
|
|
59
|
-
`,
|
|
60
|
-
'animate-spin-scale': css`
|
|
61
|
-
animation-name: ${spinScale};
|
|
62
|
-
animation-duration: 1800ms;
|
|
63
|
-
animation-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
64
|
-
`,
|
|
65
|
-
appFontColorLight: css`
|
|
66
|
-
color: hsl(0, 0%, 33%);
|
|
67
|
-
`,
|
|
68
|
-
'background-center': css`
|
|
69
|
-
background-position: center center;
|
|
70
|
-
`,
|
|
71
|
-
'background-cover': css`
|
|
72
|
-
background-size: cover;
|
|
73
|
-
`,
|
|
74
|
-
'background-transparent': css`
|
|
75
|
-
background-color: transparent;
|
|
76
|
-
`,
|
|
77
|
-
big: css`
|
|
78
|
-
font-size: 0.9rem;
|
|
79
|
-
`,
|
|
80
|
-
block: css`
|
|
81
|
-
display: block;
|
|
82
|
-
`,
|
|
83
|
-
blue: css`
|
|
84
|
-
background-color: rgb(45, 127, 249);
|
|
85
|
-
`,
|
|
86
|
-
'border-box': css`
|
|
87
|
-
box-sizing: border-box;
|
|
88
|
-
`,
|
|
89
|
-
'bottom-0': css`
|
|
90
|
-
bottom: 0;
|
|
91
|
-
`,
|
|
92
|
-
caps: css`
|
|
93
|
-
text-transform: uppercase;
|
|
94
|
-
letter-spacing: 0.1em;
|
|
95
|
-
`,
|
|
96
|
-
cardBoxShadow: css`
|
|
97
|
-
box-shadow: 0 0 0 2px hsla(0, 0%, 0%, 0.1);
|
|
98
|
-
transition-property: box-shadow;
|
|
99
|
-
-webkit-transition-property: box-shadow;
|
|
100
|
-
-moz-transition-property: box-shadow;
|
|
101
|
-
transition-duration: 0.15s;
|
|
102
|
-
-webkit-transition-duration: 0.15s;
|
|
103
|
-
-moz-transition-duration: 0.15s;
|
|
104
|
-
transition-timing-function: ease-out;
|
|
105
|
-
-webkit-transition-timing-function: ease-out;
|
|
106
|
-
-moz-transition-timing-function: ease-out;
|
|
107
|
-
&:hover {
|
|
108
|
-
box-shadow: 0 0 0 2px hsla(0, 0%, 0%, 0.25);
|
|
109
|
-
}
|
|
110
|
-
`,
|
|
111
|
-
center: css`
|
|
112
|
-
text-align: center;
|
|
113
|
-
`,
|
|
114
|
-
circle: css`
|
|
115
|
-
border-radius: 50%;
|
|
116
|
-
`,
|
|
117
|
-
dark: css`
|
|
118
|
-
background-color: hsl(0, 0%, 20%);
|
|
119
|
-
`,
|
|
120
|
-
darken1: css`
|
|
121
|
-
background-color: hsla(0, 0%, 0%, 0.05);
|
|
122
|
-
`,
|
|
123
|
-
'darken1-focus': css`
|
|
124
|
-
&:focus {
|
|
125
|
-
background-color: hsla(0, 0%, 0%, 0.05);
|
|
126
|
-
}
|
|
127
|
-
`,
|
|
128
|
-
'darken1-hover': css`
|
|
129
|
-
&:hover {
|
|
130
|
-
background-color: hsla(0, 0%, 0%, 0.05);
|
|
131
|
-
}
|
|
132
|
-
`,
|
|
133
|
-
darken2: css`
|
|
134
|
-
background-color: hsla(0, 0%, 0%, 0.1);
|
|
135
|
-
`,
|
|
136
|
-
darken3: css`
|
|
137
|
-
background-color: hsla(0, 0%, 0%, 0.25);
|
|
138
|
-
`,
|
|
139
|
-
darken4: css`
|
|
140
|
-
background-color: hsla(0, 0%, 0%, 0.5);
|
|
141
|
-
`,
|
|
142
|
-
fixed: css`
|
|
143
|
-
position: fixed;
|
|
144
|
-
`,
|
|
145
|
-
flex: css`
|
|
146
|
-
display: -webkit-box;
|
|
147
|
-
display: -webkit-flex;
|
|
148
|
-
display: -ms-flexbox;
|
|
149
|
-
display: flex;
|
|
150
|
-
`,
|
|
151
|
-
'flex-auto': css`
|
|
152
|
-
-webkit-box-flex: 1;
|
|
153
|
-
-webkit-flex: 1 1 auto;
|
|
154
|
-
-ms-flex: 1 1 auto;
|
|
155
|
-
flex: 1 1 auto;
|
|
156
|
-
min-width: 0;
|
|
157
|
-
min-height: 0;
|
|
158
|
-
`,
|
|
159
|
-
'flex-inline': css`
|
|
160
|
-
display: -webkit-inline-flex;
|
|
161
|
-
display: -ms-inline-flexbox;
|
|
162
|
-
display: inline-flex;
|
|
163
|
-
`,
|
|
164
|
-
'flex-none': css`
|
|
165
|
-
-webkit-box-flex: 0;
|
|
166
|
-
-webkit-flex: none;
|
|
167
|
-
-ms-flex: none;
|
|
168
|
-
flex: none;
|
|
169
|
-
`,
|
|
170
|
-
'flex-reverse': css`
|
|
171
|
-
-webkit-flex-direction: row-reverse;
|
|
172
|
-
flex-direction: row-reverse;
|
|
173
|
-
`,
|
|
174
|
-
'flex-wrap': css`
|
|
175
|
-
-webkit-flex-wrap: wrap;
|
|
176
|
-
-ms-flex-wrap: wrap;
|
|
177
|
-
flex-wrap: wrap;
|
|
178
|
-
`,
|
|
179
|
-
focusable: css`
|
|
180
|
-
&:focus {
|
|
181
|
-
outline: 0;
|
|
182
|
-
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
|
|
183
|
-
}
|
|
184
|
-
`,
|
|
185
|
-
gray: css`
|
|
186
|
-
background-color: rgb(102, 102, 102);
|
|
187
|
-
`,
|
|
188
|
-
grayLight2: css`
|
|
189
|
-
background-color: rgb(238, 238, 238);
|
|
190
|
-
`,
|
|
191
|
-
green: css`
|
|
192
|
-
background-color: rgb(32, 201, 51);
|
|
193
|
-
`,
|
|
194
|
-
'height-full': css`
|
|
195
|
-
height: 100%;
|
|
196
|
-
`,
|
|
197
|
-
inline: css`
|
|
198
|
-
display: inline;
|
|
199
|
-
`,
|
|
200
|
-
'inline-block': css`
|
|
201
|
-
display: inline-block;
|
|
202
|
-
`,
|
|
203
|
-
'items-center': css`
|
|
204
|
-
-webkit-box-align: center;
|
|
205
|
-
-webkit-align-items: center;
|
|
206
|
-
-ms-flex-align: center;
|
|
207
|
-
-ms-grid-row-align: center;
|
|
208
|
-
align-items: center;
|
|
209
|
-
`,
|
|
210
|
-
'justify-center': css`
|
|
211
|
-
-webkit-box-pack: center;
|
|
212
|
-
-webkit-justify-content: center;
|
|
213
|
-
-ms-flex-pack: center;
|
|
214
|
-
justify-content: center;
|
|
215
|
-
`,
|
|
216
|
-
'justify-end': css`
|
|
217
|
-
-webkit-box-pack: end;
|
|
218
|
-
-webkit-justify-content: flex-end;
|
|
219
|
-
-ms-flex-pack: end;
|
|
220
|
-
justify-content: flex-end;
|
|
221
|
-
`,
|
|
222
|
-
'justify-start': css`
|
|
223
|
-
-webkit-box-pack: start;
|
|
224
|
-
-webkit-justify-content: flex-start;
|
|
225
|
-
-ms-flex-pack: start;
|
|
226
|
-
justify-content: flex-start;
|
|
227
|
-
`,
|
|
228
|
-
'left-0': css`
|
|
229
|
-
left: 0;
|
|
230
|
-
`,
|
|
231
|
-
'light-scrollbar': css`
|
|
232
|
-
&::-webkit-scrollbar {
|
|
233
|
-
width: 12px;
|
|
234
|
-
height: 12px;
|
|
235
|
-
position: absolute;
|
|
236
|
-
top: 0;
|
|
237
|
-
left: 0;
|
|
238
|
-
right: 0;
|
|
239
|
-
bottom: 0;
|
|
240
|
-
}
|
|
241
|
-
&::-webkit-scrollbar-button {
|
|
242
|
-
display: none;
|
|
243
|
-
height: 0;
|
|
244
|
-
width: 0;
|
|
245
|
-
}
|
|
246
|
-
&::-webkit-scrollbar-thumb {
|
|
247
|
-
background-color: hsla(0, 0%, 0%, 0.35);
|
|
248
|
-
background-clip: padding-box;
|
|
249
|
-
border: 3px solid rgba(0, 0, 0, 0);
|
|
250
|
-
border-radius: 6px;
|
|
251
|
-
min-height: 36px;
|
|
252
|
-
}
|
|
253
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
254
|
-
background-color: hsla(0, 0%, 0%, 0.4);
|
|
255
|
-
}
|
|
256
|
-
`,
|
|
257
|
-
'line-height-4': css`
|
|
258
|
-
line-height: 1.5;
|
|
259
|
-
`,
|
|
260
|
-
'link-quiet': css`
|
|
261
|
-
&:hover {
|
|
262
|
-
opacity: 0.85;
|
|
263
|
-
}
|
|
264
|
-
`,
|
|
265
|
-
'link-unquiet': css`
|
|
266
|
-
&:hover {
|
|
267
|
-
opacity: 1;
|
|
268
|
-
}
|
|
269
|
-
`,
|
|
270
|
-
'link-unquiet-focusable': css`
|
|
271
|
-
&:hover {
|
|
272
|
-
opacity: 1;
|
|
273
|
-
}
|
|
274
|
-
&:focus {
|
|
275
|
-
opacity: 1;
|
|
276
|
-
}
|
|
277
|
-
`,
|
|
278
|
-
m0: css`
|
|
279
|
-
margin: 0;
|
|
280
|
-
`,
|
|
281
|
-
m2: css`
|
|
282
|
-
margin: 1rem;
|
|
283
|
-
`,
|
|
284
|
-
mb1: css`
|
|
285
|
-
margin-bottom: 0.5rem;
|
|
286
|
-
`,
|
|
287
|
-
ml1: css`
|
|
288
|
-
margin-left: 0.5rem;
|
|
289
|
-
`,
|
|
290
|
-
'mr-half': css`
|
|
291
|
-
margin-right: 0.25rem;
|
|
292
|
-
`,
|
|
293
|
-
mr1: css`
|
|
294
|
-
margin-right: 0.5rem;
|
|
295
|
-
`,
|
|
296
|
-
mt0: css`
|
|
297
|
-
margin-top: 0;
|
|
298
|
-
`,
|
|
299
|
-
mt1: css`
|
|
300
|
-
margin-top: 0.5rem;
|
|
301
|
-
`,
|
|
302
|
-
mt2: css`
|
|
303
|
-
margin-top: 1rem;
|
|
304
|
-
`,
|
|
305
|
-
'no-outline': css`
|
|
306
|
-
outline: 0;
|
|
307
|
-
`,
|
|
308
|
-
'no-user-select': css`
|
|
309
|
-
user-select: none;
|
|
310
|
-
-webkit-user-select: none;
|
|
311
|
-
`,
|
|
312
|
-
noevents: css`
|
|
313
|
-
pointer-events: none;
|
|
314
|
-
`,
|
|
315
|
-
normal: css`
|
|
316
|
-
font-size: 0.8rem;
|
|
317
|
-
`,
|
|
318
|
-
nowrap: css`
|
|
319
|
-
white-space: nowrap;
|
|
320
|
-
`,
|
|
321
|
-
'overflow-auto': css`
|
|
322
|
-
overflow: auto;
|
|
323
|
-
`,
|
|
324
|
-
'overflow-hidden': css`
|
|
325
|
-
overflow: hidden;
|
|
326
|
-
`,
|
|
327
|
-
'p-half': css`
|
|
328
|
-
padding: 0.25rem;
|
|
329
|
-
`,
|
|
330
|
-
p1: css`
|
|
331
|
-
padding: 0.5rem;
|
|
332
|
-
`,
|
|
333
|
-
p2: css`
|
|
334
|
-
padding: 1rem;
|
|
335
|
-
`,
|
|
336
|
-
pill: css`
|
|
337
|
-
border-radius: 9999px;
|
|
338
|
-
`,
|
|
339
|
-
pointer: css`
|
|
340
|
-
cursor: pointer;
|
|
341
|
-
`,
|
|
342
|
-
pr1: css`
|
|
343
|
-
padding-right: 0.5rem;
|
|
344
|
-
`,
|
|
345
|
-
'print-color-exact': css`
|
|
346
|
-
-webkit-print-color-adjust: exact;
|
|
347
|
-
`,
|
|
348
|
-
px1: css`
|
|
349
|
-
padding-left: 0.5rem;
|
|
350
|
-
padding-right: 0.5rem;
|
|
351
|
-
`,
|
|
352
|
-
quiet: css`
|
|
353
|
-
opacity: 0.75;
|
|
354
|
-
`,
|
|
355
|
-
quieter: css`
|
|
356
|
-
opacity: 0.5;
|
|
357
|
-
`,
|
|
358
|
-
red: css`
|
|
359
|
-
background-color: rgb(248, 43, 96);
|
|
360
|
-
`,
|
|
361
|
-
relative: css`
|
|
362
|
-
position: relative;
|
|
363
|
-
`,
|
|
364
|
-
'right-0': css`
|
|
365
|
-
right: 0;
|
|
366
|
-
`,
|
|
367
|
-
rounded: css`
|
|
368
|
-
border-radius: 3px;
|
|
369
|
-
`,
|
|
370
|
-
'rounded-big': css`
|
|
371
|
-
border-radius: 6px;
|
|
372
|
-
`,
|
|
373
|
-
'self-end': css`
|
|
374
|
-
-webkit-align-self: flex-end;
|
|
375
|
-
-ms-flex-item-align: end;
|
|
376
|
-
align-self: flex-end;
|
|
377
|
-
`,
|
|
378
|
-
small: css`
|
|
379
|
-
font-size: 11px;
|
|
380
|
-
`,
|
|
381
|
-
stroked1: css`
|
|
382
|
-
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
|
|
383
|
-
`,
|
|
384
|
-
strong: css`
|
|
385
|
-
font-weight: 500;
|
|
386
|
-
`,
|
|
387
|
-
'styled-input': css`
|
|
388
|
-
-webkit-appearance: none;
|
|
389
|
-
-moz-appearance: none;
|
|
390
|
-
appearance: none;
|
|
391
|
-
border-style: solid;
|
|
392
|
-
border-width: 2px;
|
|
393
|
-
border-color: transparent;
|
|
394
|
-
outline: none;
|
|
395
|
-
&:active {
|
|
396
|
-
border-color: hsla(0, 0%, 0%, 0.25);
|
|
397
|
-
}
|
|
398
|
-
&:focus {
|
|
399
|
-
border-color: hsla(0, 0%, 0%, 0.25);
|
|
400
|
-
}
|
|
401
|
-
`,
|
|
402
|
-
'text-blue': css`
|
|
403
|
-
color: rgb(45, 127, 249);
|
|
404
|
-
fill: rgb(45, 127, 249);
|
|
405
|
-
`,
|
|
406
|
-
'text-blue-focus': css`
|
|
407
|
-
&:focus {
|
|
408
|
-
color: rgb(45, 127, 249);
|
|
409
|
-
fill: rgb(45, 127, 249);
|
|
410
|
-
}
|
|
411
|
-
`,
|
|
412
|
-
'text-dark': css`
|
|
413
|
-
color: hsl(0, 0%, 20%);
|
|
414
|
-
fill: hsl(0, 0%, 20%);
|
|
415
|
-
`,
|
|
416
|
-
'text-white': css`
|
|
417
|
-
color: hsl(0, 0%, 100%);
|
|
418
|
-
fill: hsl(0, 0%, 100%);
|
|
419
|
-
`,
|
|
420
|
-
'top-0': css`
|
|
421
|
-
top: 0;
|
|
422
|
-
`,
|
|
423
|
-
truncate: css`
|
|
424
|
-
max-width: 100%;
|
|
425
|
-
overflow: hidden;
|
|
426
|
-
text-overflow: ellipsis;
|
|
427
|
-
white-space: nowrap;
|
|
428
|
-
`,
|
|
429
|
-
understroke: css`
|
|
430
|
-
padding-bottom: 0.14rem;
|
|
431
|
-
border-bottom: 2px solid hsla(0, 0%, 0%, 0.1);
|
|
432
|
-
`,
|
|
433
|
-
white: css`
|
|
434
|
-
background-color: hsl(0, 0%, 100%);
|
|
435
|
-
`,
|
|
436
|
-
'width-full': css`
|
|
437
|
-
width: 100%;
|
|
438
|
-
`,
|
|
439
|
-
yellow: css`
|
|
440
|
-
background-color: rgb(252, 180, 0);
|
|
441
|
-
`
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* @internal
|
|
446
|
-
*/
|
|
447
|
-
export function baymax(baymaxClassNames) {
|
|
448
|
-
return baymaxClassNames.split(/\s+/).filter(Boolean).map(baymaxClassName => {
|
|
449
|
-
if (has(emotionClassNameByBaymaxClassName, baymaxClassName)) {
|
|
450
|
-
return emotionClassNameByBaymaxClassName[baymaxClassName];
|
|
451
|
-
} else {
|
|
452
|
-
throw spawnError('Baymax class not found: %s. If required, add the definition to baymax_utils.js.`', baymaxClassName);
|
|
453
|
-
}
|
|
454
|
-
}).join(' ');
|
|
455
|
-
}
|
package/dist/esm/base/ui/box.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
/** @module @airtable/blocks/ui: Box */ /** */
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { cx } from 'emotion';
|
|
5
|
-
import useStyledSystem from './use_styled_system';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Props for the Box component. Also accepts:
|
|
9
|
-
* * {@link AllStylesProps}
|
|
10
|
-
* * {@link AriaProps}
|
|
11
|
-
*
|
|
12
|
-
* @docsPath UI/components/Box
|
|
13
|
-
* @noInheritDoc
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A box component for creating layouts.
|
|
18
|
-
*
|
|
19
|
-
* [[ Story id="box--example" title="Box example" ]]
|
|
20
|
-
*
|
|
21
|
-
* @component
|
|
22
|
-
* @docsPath UI/components/Box
|
|
23
|
-
*/
|
|
24
|
-
const Box = (props, ref) => {
|
|
25
|
-
const {
|
|
26
|
-
as: Component = 'div',
|
|
27
|
-
id,
|
|
28
|
-
children,
|
|
29
|
-
className,
|
|
30
|
-
style,
|
|
31
|
-
tabIndex,
|
|
32
|
-
role,
|
|
33
|
-
onClick,
|
|
34
|
-
onMouseEnter,
|
|
35
|
-
onMouseLeave,
|
|
36
|
-
// This hasOnClick prop is set by the Tooltip wrapper. Destructure it here just to get it out of `props`.
|
|
37
|
-
// See 7a80fefd0a0bc871c31e0c063662c6100b0ca77d
|
|
38
|
-
// TODO(stephen): clean this up.
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
|
-
hasOnClick,
|
|
41
|
-
dataAttributes = {},
|
|
42
|
-
'aria-label': ariaLabel,
|
|
43
|
-
'aria-labelledby': ariaLabelledBy,
|
|
44
|
-
'aria-describedby': ariaDescribedBy,
|
|
45
|
-
'aria-controls': ariaControls,
|
|
46
|
-
'aria-expanded': ariaExpanded,
|
|
47
|
-
'aria-haspopup': ariaHasPopup,
|
|
48
|
-
'aria-hidden': ariaHidden,
|
|
49
|
-
'aria-live': ariaLive,
|
|
50
|
-
...styleProps
|
|
51
|
-
} = props;
|
|
52
|
-
const classNameForStyleProps = useStyledSystem(styleProps);
|
|
53
|
-
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
54
|
-
ref: ref,
|
|
55
|
-
id: id,
|
|
56
|
-
className: cx(classNameForStyleProps, className),
|
|
57
|
-
style: style,
|
|
58
|
-
tabIndex: tabIndex,
|
|
59
|
-
role: role
|
|
60
|
-
// TODO (stephen): remove tooltip anchor props
|
|
61
|
-
,
|
|
62
|
-
onMouseEnter: onMouseEnter,
|
|
63
|
-
onMouseLeave: onMouseLeave,
|
|
64
|
-
onClick: onClick,
|
|
65
|
-
"aria-label": ariaLabel,
|
|
66
|
-
"aria-labelledby": ariaLabelledBy,
|
|
67
|
-
"aria-describedby": ariaDescribedBy,
|
|
68
|
-
"aria-controls": ariaControls,
|
|
69
|
-
"aria-expanded": ariaExpanded,
|
|
70
|
-
"aria-haspopup": ariaHasPopup,
|
|
71
|
-
"aria-hidden": ariaHidden,
|
|
72
|
-
"aria-live": ariaLive
|
|
73
|
-
}, dataAttributes), children);
|
|
74
|
-
};
|
|
75
|
-
const ForwardedRefBox = /*#__PURE__*/React.forwardRef(Box);
|
|
76
|
-
ForwardedRefBox.displayName = 'Box';
|
|
77
|
-
export default ForwardedRefBox;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/** @module @airtable/blocks/ui: Button */ /** */
|
|
2
|
-
import { cx } from 'emotion';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { compose } from '@styled-system/core';
|
|
5
|
-
import { createEnum } from '../../shared/private_utils';
|
|
6
|
-
import useStyledSystem from './use_styled_system';
|
|
7
|
-
import { maxWidth, minWidth, width, flexItemSet, positionSet, margin, display } from './system';
|
|
8
|
-
import useTheme from './theme/use_theme';
|
|
9
|
-
import { ControlSize, useButtonSize } from './control_sizes';
|
|
10
|
-
import Icon from './icon';
|
|
11
|
-
import cssHelpers from './css_helpers';
|
|
12
|
-
import Box from './box';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Style props for the {@link Button} component. Also accepts:
|
|
16
|
-
* * {@link FlexItemSetProps}
|
|
17
|
-
* * {@link MarginProps}
|
|
18
|
-
* * {@link MaxWidthProps}
|
|
19
|
-
* * {@link MinWidthProps}
|
|
20
|
-
* * {@link PositionSetProps}
|
|
21
|
-
* * {@link WidthProps}
|
|
22
|
-
*
|
|
23
|
-
* @noInheritDoc
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
const styleParser = compose(display, maxWidth, minWidth, width, flexItemSet, positionSet, margin);
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Variants for the {@link Button} component:
|
|
30
|
-
*
|
|
31
|
-
* • **default**
|
|
32
|
-
*
|
|
33
|
-
* Gray button for toolbars and other generic actions.
|
|
34
|
-
*
|
|
35
|
-
* • **primary**
|
|
36
|
-
*
|
|
37
|
-
* Blue button used for primary actions and CTAs. There should only be one primary button present at a time. Often used in {@link Dialog} and bottom bars.
|
|
38
|
-
*
|
|
39
|
-
* • **secondary**
|
|
40
|
-
*
|
|
41
|
-
* Transparent button that pairs with the primary button. This is typically used for cancel or back buttons.
|
|
42
|
-
*
|
|
43
|
-
* • **danger**
|
|
44
|
-
*
|
|
45
|
-
* Red button that replaces primary buttons for dangerous or otherwise difficult-to-reverse actions like record deletion.
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
const ButtonVariant = createEnum('default', 'primary', 'secondary', 'danger');
|
|
49
|
-
|
|
50
|
-
/** @internal */
|
|
51
|
-
function useButtonVariant() {
|
|
52
|
-
let variant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ButtonVariant.default;
|
|
53
|
-
const {
|
|
54
|
-
buttonVariants
|
|
55
|
-
} = useTheme();
|
|
56
|
-
return buttonVariants[variant];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Props for the {@link Button} component. Also accepts:
|
|
61
|
-
* * {@link AriaProps}
|
|
62
|
-
* * {@link ButtonStyleProps}
|
|
63
|
-
*
|
|
64
|
-
* @noInheritDoc
|
|
65
|
-
* @docsPath UI/components/Button
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Clickable button component.
|
|
70
|
-
*
|
|
71
|
-
* [[ Story id="button--example" title="Box example" ]]
|
|
72
|
-
*
|
|
73
|
-
* @component
|
|
74
|
-
* @docsPath UI/components/Button
|
|
75
|
-
*/
|
|
76
|
-
const Button = (props, ref) => {
|
|
77
|
-
const {
|
|
78
|
-
size = ControlSize.default,
|
|
79
|
-
variant = ButtonVariant.default,
|
|
80
|
-
icon,
|
|
81
|
-
id,
|
|
82
|
-
className,
|
|
83
|
-
style,
|
|
84
|
-
onMouseEnter,
|
|
85
|
-
onMouseLeave,
|
|
86
|
-
onClick,
|
|
87
|
-
// This hasOnClick prop is set by the Tooltip wrapper. Destructure it here just to get it out of `props`.
|
|
88
|
-
// See 7a80fefd0a0bc871c31e0c063662c6100b0ca77d
|
|
89
|
-
// TODO(stephen): clean this up.
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
91
|
-
hasOnClick,
|
|
92
|
-
type = 'button',
|
|
93
|
-
disabled,
|
|
94
|
-
tabIndex,
|
|
95
|
-
children,
|
|
96
|
-
'aria-label': ariaLabel,
|
|
97
|
-
'aria-selected': ariaSelected,
|
|
98
|
-
...styleProps
|
|
99
|
-
} = props;
|
|
100
|
-
const classNameForButtonSize = useButtonSize(size);
|
|
101
|
-
const classNameForButtonVariant = useButtonVariant(variant);
|
|
102
|
-
const classNameForStyleProps = useStyledSystem({
|
|
103
|
-
display: 'inline-flex',
|
|
104
|
-
...styleProps
|
|
105
|
-
}, styleParser);
|
|
106
|
-
const hasIcon = icon !== undefined;
|
|
107
|
-
const hasChildren = !!children;
|
|
108
|
-
if (!hasChildren && !ariaLabel) {
|
|
109
|
-
// eslint-disable-next-line no-console
|
|
110
|
-
console.error('<Button> without a text label should include an explicit aria-label prop.');
|
|
111
|
-
}
|
|
112
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
113
|
-
ref: ref,
|
|
114
|
-
id: id,
|
|
115
|
-
className: cx(classNameForButtonVariant, classNameForButtonSize, classNameForStyleProps, className),
|
|
116
|
-
style: style
|
|
117
|
-
// TODO (stephen): remove tooltip anchor props
|
|
118
|
-
,
|
|
119
|
-
onMouseEnter: onMouseEnter,
|
|
120
|
-
onMouseLeave: onMouseLeave,
|
|
121
|
-
onClick: onClick,
|
|
122
|
-
type: type,
|
|
123
|
-
disabled: disabled,
|
|
124
|
-
tabIndex: tabIndex,
|
|
125
|
-
"aria-label": ariaLabel,
|
|
126
|
-
"aria-selected": ariaSelected
|
|
127
|
-
}, typeof icon === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
128
|
-
name: icon,
|
|
129
|
-
size: "1em",
|
|
130
|
-
fillColor: "currentColor",
|
|
131
|
-
flex: "none"
|
|
132
|
-
}) : icon, hasChildren && /*#__PURE__*/React.createElement(Box, {
|
|
133
|
-
as: "span"
|
|
134
|
-
// The margin is on the span, and not on the icon because it would mean that when using a custom icon
|
|
135
|
-
// the consumer would manually need to figure out what the margin is supposed to be.
|
|
136
|
-
,
|
|
137
|
-
marginLeft: hasIcon ? '0.5em' : undefined,
|
|
138
|
-
className: cssHelpers.TRUNCATE
|
|
139
|
-
}, children));
|
|
140
|
-
};
|
|
141
|
-
const ForwardedRefButton = /*#__PURE__*/React.forwardRef(Button);
|
|
142
|
-
ForwardedRefButton.displayName = 'Button';
|
|
143
|
-
export default ForwardedRefButton;
|