|
| 1 | +import type { TemplateOnlyComponent } from '@ember/component/template-only'; |
| 2 | + |
| 3 | +import ShwTextH2 from 'showcase/components/shw/text/h2'; |
| 4 | +import ShwTextH3 from 'showcase/components/shw/text/h3'; |
| 5 | +import ShwGrid from 'showcase/components/shw/grid'; |
| 6 | +import ShwPlaceholder from 'showcase/components/shw/placeholder'; |
| 7 | +import ShwDivider from 'showcase/components/shw/divider'; |
| 8 | +import ShwOutliner from 'showcase/components/shw/outliner'; |
| 9 | + |
| 10 | +import { |
| 11 | + HdsLayoutGrid, |
| 12 | + HdsLayoutGridItem, |
| 13 | +} from '@hashicorp/design-system-components/components'; |
| 14 | + |
| 15 | +const SubSectionBaseElements: TemplateOnlyComponent = <template> |
| 16 | + <ShwTextH2>GridItem</ShwTextH2> |
| 17 | + |
| 18 | + <ShwGrid @columns={{1}} as |SG|> |
| 19 | + <SG.Item @label="used directly or via yielded component"> |
| 20 | + <ShwOutliner> |
| 21 | + <HdsLayoutGrid as |HLG|> |
| 22 | + <ShwPlaceholder @text="item #1" @height="40" @background="#e4c5f3" /> |
| 23 | + |
| 24 | + <HdsLayoutGridItem> |
| 25 | + <ShwPlaceholder @text="item #2 within GridItem" @height="40" @background="#e5ffd2" /> |
| 26 | + </HdsLayoutGridItem> |
| 27 | + |
| 28 | + <ShwPlaceholder @text="item #3" @height="40" @background="#d2f4ff" /> |
| 29 | + |
| 30 | + <HLG.Item> |
| 31 | + <ShwPlaceholder @text="item #4 within HLG.Item" @height="40" @background="#fff8d2" /> |
| 32 | + </HLG.Item> |
| 33 | + </HdsLayoutGrid> |
| 34 | + </ShwOutliner> |
| 35 | + </SG.Item> |
| 36 | + </ShwGrid> |
| 37 | + |
| 38 | + <ShwDivider @level={{2}} /> |
| 39 | + |
| 40 | + <ShwTextH3>colspan</ShwTextH3> |
| 41 | + |
| 42 | + <ShwGrid @columns={{1}} @gap="1.5rem" as |SG|> |
| 43 | + <SG.Item @label="1st item w/ colspan=2"> |
| 44 | + <ShwOutliner> |
| 45 | + <HdsLayoutGrid @columnMinWidth="250px" @gap="12" as |HLG|> |
| 46 | + <HLG.Item @colspan={{2}}> |
| 47 | + <ShwPlaceholder @text="#1" @height="40" @background="#e4c5f3" /> |
| 48 | + </HLG.Item> |
| 49 | + <HLG.Item> |
| 50 | + <ShwPlaceholder @text="#2" @height="40" @background="#e5ffd2" /> |
| 51 | + </HLG.Item> |
| 52 | + <HLG.Item> |
| 53 | + <ShwPlaceholder @text="#3" @height="40" @background="#d2f4ff" /> |
| 54 | + </HLG.Item> |
| 55 | + <HLG.Item> |
| 56 | + <ShwPlaceholder @text="#4" @height="40" @background="#fff8d2" /> |
| 57 | + </HLG.Item> |
| 58 | + </HdsLayoutGrid> |
| 59 | + </ShwOutliner> |
| 60 | + </SG.Item> |
| 61 | + |
| 62 | + <SG.Item @label="1st item w/ colspan=3"> |
| 63 | + <ShwOutliner> |
| 64 | + <HdsLayoutGrid @columnMinWidth="250px" @gap="12" as |HLG|> |
| 65 | + <HLG.Item @colspan={{3}}> |
| 66 | + <ShwPlaceholder @text="#1" @height="40" @background="#e4c5f3" /> |
| 67 | + </HLG.Item> |
| 68 | + <HLG.Item> |
| 69 | + <ShwPlaceholder @text="#2" @height="40" @background="#e5ffd2" /> |
| 70 | + </HLG.Item> |
| 71 | + <HLG.Item> |
| 72 | + <ShwPlaceholder @text="#3" @height="40" @background="#d2f4ff" /> |
| 73 | + </HLG.Item> |
| 74 | + <HLG.Item> |
| 75 | + <ShwPlaceholder @text="#4" @height="40" @background="#fff8d2" /> |
| 76 | + </HLG.Item> |
| 77 | + </HdsLayoutGrid> |
| 78 | + </ShwOutliner> |
| 79 | + </SG.Item> |
| 80 | + |
| 81 | + <SG.Item @label="1st item w/ colspan=4"> |
| 82 | + <ShwOutliner> |
| 83 | + <HdsLayoutGrid @columnMinWidth="250px" @gap="12" as |HLG|> |
| 84 | + <HLG.Item @colspan={{4}}> |
| 85 | + <ShwPlaceholder @text="#1" @height="40" @background="#e4c5f3" /> |
| 86 | + </HLG.Item> |
| 87 | + <HLG.Item> |
| 88 | + <ShwPlaceholder @text="#2" @height="40" @background="#e5ffd2" /> |
| 89 | + </HLG.Item> |
| 90 | + <HLG.Item> |
| 91 | + <ShwPlaceholder @text="#3" @height="40" @background="#d2f4ff" /> |
| 92 | + </HLG.Item> |
| 93 | + <HLG.Item> |
| 94 | + <ShwPlaceholder @text="#4" @height="40" @background="#fff8d2" /> |
| 95 | + </HLG.Item> |
| 96 | + </HdsLayoutGrid> |
| 97 | + </ShwOutliner> |
| 98 | + </SG.Item> |
| 99 | + </ShwGrid> |
| 100 | + |
| 101 | + <ShwDivider @level={{2}} /> |
| 102 | + |
| 103 | + <ShwTextH3>rowspan</ShwTextH3> |
| 104 | + |
| 105 | + <ShwGrid @columns={{1}} @gap="1.5rem" as |SG|> |
| 106 | + <SG.Item @label="1st item w/ rowspan=2"> |
| 107 | + <ShwOutliner> |
| 108 | + <HdsLayoutGrid @columnMinWidth="33.33%" @gap="12" as |HLG|> |
| 109 | + <HLG.Item @rowspan={{2}}> |
| 110 | + <ShwPlaceholder @text="#1" @height="100%" @background="#e4c5f3" /> |
| 111 | + </HLG.Item> |
| 112 | + <HLG.Item> |
| 113 | + <ShwPlaceholder @text="#2" @height="40" @background="#e5ffd2" /> |
| 114 | + </HLG.Item> |
| 115 | + <HLG.Item> |
| 116 | + <ShwPlaceholder @text="#3" @height="40" @background="#d2f4ff" /> |
| 117 | + </HLG.Item> |
| 118 | + <HLG.Item> |
| 119 | + <ShwPlaceholder @text="#4" @height="40" @background="#fff8d2" /> |
| 120 | + </HLG.Item> |
| 121 | + </HdsLayoutGrid> |
| 122 | + </ShwOutliner> |
| 123 | + </SG.Item> |
| 124 | + |
| 125 | + <SG.Item @label="2nd item w/ rowspan=3"> |
| 126 | + <ShwOutliner> |
| 127 | + <HdsLayoutGrid @columnMinWidth="50%" @gap="12" as |HLG|> |
| 128 | + <HLG.Item> |
| 129 | + <ShwPlaceholder @text="#1" @height="40" @background="#e4c5f3" /> |
| 130 | + </HLG.Item> |
| 131 | + <HLG.Item @rowspan={{3}}> |
| 132 | + <ShwPlaceholder @text="#2" @height="100%" @background="#e5ffd2" /> |
| 133 | + </HLG.Item> |
| 134 | + <HLG.Item> |
| 135 | + <ShwPlaceholder @text="#3" @height="40" @background="#d2f4ff" /> |
| 136 | + </HLG.Item> |
| 137 | + <HLG.Item> |
| 138 | + <ShwPlaceholder @text="#4" @height="40" @background="#fff8d2" /> |
| 139 | + </HLG.Item> |
| 140 | + </HdsLayoutGrid> |
| 141 | + </ShwOutliner> |
| 142 | + </SG.Item> |
| 143 | + </ShwGrid> |
| 144 | + |
| 145 | + <ShwDivider @level={{2}} /> |
| 146 | + |
| 147 | + <ShwTextH3>colspan & rowspan</ShwTextH3> |
| 148 | + |
| 149 | + <ShwGrid @columns={{1}} @gap="1.5rem" as |SG|> |
| 150 | + <SG.Item @label="1st item w/ colspan=2 & rowspan=3"> |
| 151 | + <ShwOutliner> |
| 152 | + <HdsLayoutGrid @columnMinWidth="33.33%" @gap="12" as |HLG|> |
| 153 | + <HLG.Item @colspan={{2}} @rowspan={{3}}> |
| 154 | + <ShwPlaceholder @text="#1" @height="100%" @background="#e4c5f3" /> |
| 155 | + </HLG.Item> |
| 156 | + <HLG.Item> |
| 157 | + <ShwPlaceholder @text="#2" @height="40" @background="#e5ffd2" /> |
| 158 | + </HLG.Item> |
| 159 | + <HLG.Item> |
| 160 | + <ShwPlaceholder @text="#3" @height="40" @background="#d2f4ff" /> |
| 161 | + </HLG.Item> |
| 162 | + <HLG.Item> |
| 163 | + <ShwPlaceholder @text="#4" @height="40" @background="#fff8d2" /> |
| 164 | + </HLG.Item> |
| 165 | + <HLG.Item> |
| 166 | + <ShwPlaceholder @text="#5" @height="40" @background="#f3d9c5" /> |
| 167 | + </HLG.Item> |
| 168 | + <HLG.Item> |
| 169 | + <ShwPlaceholder @text="#6" @height="40" @background="#fee1ec" /> |
| 170 | + </HLG.Item> |
| 171 | + </HdsLayoutGrid> |
| 172 | + </ShwOutliner> |
| 173 | + </SG.Item> |
| 174 | + </ShwGrid> |
| 175 | +</template>; |
| 176 | + |
| 177 | +export default SubSectionBaseElements; |
| 178 | + |
0 commit comments