|
1 | 1 | { |
2 | 2 | "schemaVersion": "1.0.0", |
3 | 3 | "readme": "", |
4 | | - "modules": [] |
| 4 | + "modules": [ |
| 5 | + { |
| 6 | + "kind": "javascript-module", |
| 7 | + "path": "index.ts", |
| 8 | + "declarations": [], |
| 9 | + "exports": [ |
| 10 | + { |
| 11 | + "kind": "js", |
| 12 | + "name": "*", |
| 13 | + "declaration": { |
| 14 | + "name": "*", |
| 15 | + "package": "./src/card.js" |
| 16 | + } |
| 17 | + } |
| 18 | + ] |
| 19 | + }, |
| 20 | + { |
| 21 | + "kind": "javascript-module", |
| 22 | + "path": "register.ts", |
| 23 | + "declarations": [], |
| 24 | + "exports": [ |
| 25 | + { |
| 26 | + "kind": "custom-element-definition", |
| 27 | + "name": "sl-card", |
| 28 | + "declaration": { |
| 29 | + "name": "Card", |
| 30 | + "module": "/src/card.js" |
| 31 | + } |
| 32 | + } |
| 33 | + ] |
| 34 | + }, |
| 35 | + { |
| 36 | + "kind": "javascript-module", |
| 37 | + "path": "src/card.ts", |
| 38 | + "declarations": [ |
| 39 | + { |
| 40 | + "kind": "class", |
| 41 | + "description": "Use cards to display media and text in a compact, appealing way.\n\n```html\n<sl-card></sl-card>\n```", |
| 42 | + "name": "Card", |
| 43 | + "cssProperties": [ |
| 44 | + { |
| 45 | + "description": "The aspectratio of the media container (default is 4/3). By default this ratio is always maintained, and will cause the media to become smaller when there isn't sufficient space for the full width.", |
| 46 | + "name": "--sl-card-media-aspect-ratio" |
| 47 | + }, |
| 48 | + { |
| 49 | + "description": "The width of the media in relation to the text. Can be set in pixels or `fr`.", |
| 50 | + "name": "--sl-card-media-width" |
| 51 | + }, |
| 52 | + { |
| 53 | + "description": "X-Focuspoint of the media; this is taken as the center when the media is cropped.", |
| 54 | + "name": "--sl-card-media-x" |
| 55 | + }, |
| 56 | + { |
| 57 | + "description": "Y-Focuspoint of the media; this is taken as the center when the media is cropped.", |
| 58 | + "name": "--sl-card-media-y" |
| 59 | + }, |
| 60 | + { |
| 61 | + "description": "When card is smaller than this size it will switch from horizontal (when set) to vertical layout.", |
| 62 | + "name": "--sl-card-orientation-breakpoint" |
| 63 | + }, |
| 64 | + { |
| 65 | + "description": "Set this to 100% when the aspectratio of the media doesn't matter and you want it to fill the full height of the card.", |
| 66 | + "name": "--sl-card-stretch-image" |
| 67 | + }, |
| 68 | + { |
| 69 | + "description": "The width of the text in relation to the media. Can be set in pixels (not recommended) or `fr`.", |
| 70 | + "name": "--sl-card-text-width" |
| 71 | + } |
| 72 | + ], |
| 73 | + "slots": [ |
| 74 | + { |
| 75 | + "description": "Title of the card", |
| 76 | + "name": "default" |
| 77 | + }, |
| 78 | + { |
| 79 | + "description": "Media, this can be an image or video", |
| 80 | + "name": "media" |
| 81 | + }, |
| 82 | + { |
| 83 | + "description": "Subtitle or badges", |
| 84 | + "name": "header" |
| 85 | + }, |
| 86 | + { |
| 87 | + "description": "Body text of the card", |
| 88 | + "name": "body" |
| 89 | + }, |
| 90 | + { |
| 91 | + "description": "Icon button for actions on the card.", |
| 92 | + "name": "actions" |
| 93 | + } |
| 94 | + ], |
| 95 | + "members": [ |
| 96 | + { |
| 97 | + "kind": "field", |
| 98 | + "name": "explicitHeight", |
| 99 | + "type": { |
| 100 | + "text": "boolean | undefined" |
| 101 | + }, |
| 102 | + "description": "When the height of the card is set (or constrained) by its container (for example in a grid with fixed rows) this needs to be set to be added in order to assure the correct rendering", |
| 103 | + "attribute": "explicit-height" |
| 104 | + }, |
| 105 | + { |
| 106 | + "kind": "field", |
| 107 | + "name": "height", |
| 108 | + "type": { |
| 109 | + "text": "CardHeightOptions" |
| 110 | + }, |
| 111 | + "default": "'fixed'", |
| 112 | + "description": "When the height is `fixed` the image will determine the height of the card, when it is `flex` the height of the text will determine the height of the card.", |
| 113 | + "attribute": "height", |
| 114 | + "reflects": true |
| 115 | + }, |
| 116 | + { |
| 117 | + "kind": "field", |
| 118 | + "name": "mediaPosition", |
| 119 | + "type": { |
| 120 | + "text": "CardMediaPosition" |
| 121 | + }, |
| 122 | + "default": "'start'", |
| 123 | + "description": "Show the media at the start or at the end.", |
| 124 | + "attribute": "media-position", |
| 125 | + "reflects": true |
| 126 | + }, |
| 127 | + { |
| 128 | + "kind": "field", |
| 129 | + "name": "orientation", |
| 130 | + "type": { |
| 131 | + "text": "CardOrientation" |
| 132 | + }, |
| 133 | + "default": "'horizontal'", |
| 134 | + "description": "The position of the media in relation to the text", |
| 135 | + "attribute": "orientation", |
| 136 | + "reflects": true |
| 137 | + }, |
| 138 | + { |
| 139 | + "kind": "field", |
| 140 | + "name": "padding", |
| 141 | + "type": { |
| 142 | + "text": "boolean" |
| 143 | + }, |
| 144 | + "default": "false", |
| 145 | + "description": "Indicates whether there is a padding around the media. Recommended to set to true when the `--sl-card-stretch-image` isn't set to 100%", |
| 146 | + "attribute": "padding", |
| 147 | + "reflects": true |
| 148 | + } |
| 149 | + ], |
| 150 | + "attributes": [ |
| 151 | + { |
| 152 | + "name": "padding", |
| 153 | + "type": { |
| 154 | + "text": "boolean" |
| 155 | + }, |
| 156 | + "default": "false", |
| 157 | + "description": "Indicates whether there is a padding around the media. Recommended to set to true when the `--sl-card-stretch-image` isn't set to 100%", |
| 158 | + "fieldName": "padding" |
| 159 | + }, |
| 160 | + { |
| 161 | + "name": "explicit-height", |
| 162 | + "type": { |
| 163 | + "text": "boolean | undefined" |
| 164 | + }, |
| 165 | + "description": "When the height of the card is set (or constrained) by its container (for example in a grid with fixed rows) this needs to be set to be added in order to assure the correct rendering", |
| 166 | + "fieldName": "explicitHeight" |
| 167 | + }, |
| 168 | + { |
| 169 | + "name": "height", |
| 170 | + "type": { |
| 171 | + "text": "CardHeightOptions" |
| 172 | + }, |
| 173 | + "default": "'fixed'", |
| 174 | + "description": "When the height is `fixed` the image will determine the height of the card, when it is `flex` the height of the text will determine the height of the card.", |
| 175 | + "fieldName": "height" |
| 176 | + }, |
| 177 | + { |
| 178 | + "name": "orientation", |
| 179 | + "type": { |
| 180 | + "text": "CardOrientation" |
| 181 | + }, |
| 182 | + "default": "'horizontal'", |
| 183 | + "description": "The position of the media in relation to the text", |
| 184 | + "fieldName": "orientation" |
| 185 | + }, |
| 186 | + { |
| 187 | + "name": "media-position", |
| 188 | + "type": { |
| 189 | + "text": "CardMediaPosition" |
| 190 | + }, |
| 191 | + "default": "'start'", |
| 192 | + "description": "Show the media at the start or at the end.", |
| 193 | + "fieldName": "mediaPosition" |
| 194 | + } |
| 195 | + ], |
| 196 | + "superclass": { |
| 197 | + "name": "LitElement", |
| 198 | + "package": "lit" |
| 199 | + }, |
| 200 | + "tagName": "sl-card", |
| 201 | + "customElement": true, |
| 202 | + "methods": [ |
| 203 | + { |
| 204 | + "kind": "method", |
| 205 | + "name": "#setIcon", |
| 206 | + "return": { |
| 207 | + "type": { |
| 208 | + "text": "void" |
| 209 | + } |
| 210 | + } |
| 211 | + }, |
| 212 | + { |
| 213 | + "kind": "method", |
| 214 | + "name": "#setOrientation", |
| 215 | + "return": { |
| 216 | + "type": { |
| 217 | + "text": "void" |
| 218 | + } |
| 219 | + } |
| 220 | + } |
| 221 | + ], |
| 222 | + "fields": [ |
| 223 | + { |
| 224 | + "kind": "field", |
| 225 | + "name": "#resizeObserver", |
| 226 | + "privacy": "private", |
| 227 | + "type": { |
| 228 | + "text": "ResizeObserver | undefined" |
| 229 | + }, |
| 230 | + "default": "new ResizeObserver(() => {\n this.#setOrientation();\n })", |
| 231 | + "description": "Observe the grid width." |
| 232 | + }, |
| 233 | + { |
| 234 | + "kind": "field", |
| 235 | + "name": "media", |
| 236 | + "type": { |
| 237 | + "text": "HTMLElement[] | undefined" |
| 238 | + }, |
| 239 | + "privacy": "private" |
| 240 | + }, |
| 241 | + { |
| 242 | + "kind": "field", |
| 243 | + "name": "icon", |
| 244 | + "type": { |
| 245 | + "text": "HTMLElement[] | undefined" |
| 246 | + }, |
| 247 | + "privacy": "private" |
| 248 | + } |
| 249 | + ] |
| 250 | + } |
| 251 | + ], |
| 252 | + "exports": [ |
| 253 | + { |
| 254 | + "kind": "js", |
| 255 | + "name": "Card", |
| 256 | + "declaration": { |
| 257 | + "name": "Card", |
| 258 | + "module": "src/card.ts" |
| 259 | + } |
| 260 | + } |
| 261 | + ] |
| 262 | + } |
| 263 | + ] |
5 | 264 | } |
0 commit comments