import { ComponentProps } from 'react' ; import { Spec } from '.' ; import { ChartType } from '../chart_types' ; import { Ratio } from '../common/geometry' ; import { specComponentFactory } from '../state/spec_factory' ; import { SpecType } from './constants' ; alpha export type RelativeBandsPadding = { /**
     * Outer padding specifies the padding size *next to* a small multiples panel that's on the edge of the small
     * multiples grid, expressed as a proportion (ratio) of the panel size
     */ outer : Ratio ; /**
     * Inner padding specifies the padding size *between* small multiples panels in the small multiples grid,
     * expressed as a proportion (ratio) of the panel size
     */ inner : Ratio ; } ; internal export const DEFAULT_SM_PANEL_PADDING = { outer : 0 , inner : 0.1 } ; alpha export interface SmallMultiplesStyle { /**
     * Horizontal padding for each panel, expressed as [leftMarginRatio, rightMarginRatio], relative to the gross panel width
     */ horizontalPanelPadding : RelativeBandsPadding ; /**
     * Vertical padding for each panel, expressed as [topMarginRatio, bottomMarginRatio], relative to the gross panel height
     */ verticalPanelPadding : RelativeBandsPadding ; } alpha export interface SmallMultiplesSpec extends Spec { /**
     * Identifies the `<GroupBy id="foo">` referenced by `splitHorizontally="foo"`, specifying horizontal tiling
     */ splitHorizontally ? : string ; /**
     * Identifies the `<GroupBy id="bar">` referenced by `splitVertically="bar"`, specifying vertical tiling
     */ splitVertically ? : string ; /**
     * Identifies the `<GroupBy id="baz">` referenced by `splitVertically="baz"`, specifying space-filling tiling in a Z pattern
     */ splitZigzag ? : string ; /**
     * Specifies styling and layout properties of the tiling, such as paddings between and outside panels
     */ style ? : Partial < SmallMultiplesStyle > ; } alpha export const SmallMultiples = specComponentFactory < SmallMultiplesSpec > ( ) ( { chartType : ChartType . Global , specType : SpecType . SmallMultiples , } , { id : '__global__small_multiples___' , } ) ; public export type SmallMultiplesProps = ComponentProps < typeof SmallMultiples > ;