mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Merge pull request #302 from IBM/docs-vercel
Deploy documentation to Vercel
This commit is contained in:
commit
ea56f9acba
16 changed files with 93 additions and 875 deletions
1
.assets/powered-by-vercel.svg
Normal file
1
.assets/powered-by-vercel.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg width="212" height="44" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="212" height="44" rx="8" fill="#000"/><path d="M60.438 15.227V26.5h1.406v-4.023h2.836c2.117 0 3.625-1.493 3.625-3.602 0-2.148-1.477-3.648-3.61-3.648h-4.257zm1.406 1.25h2.484c1.633 0 2.531.851 2.531 2.398 0 1.492-.93 2.352-2.53 2.352h-2.485v-4.75zm11.5 10.171c2.399 0 3.883-1.656 3.883-4.359 0-2.71-1.484-4.36-3.883-4.36-2.398 0-3.883 1.65-3.883 4.36 0 2.703 1.485 4.36 3.883 4.36zm0-1.21c-1.594 0-2.492-1.157-2.492-3.149 0-2 .898-3.148 2.492-3.148 1.594 0 2.492 1.148 2.492 3.148 0 1.992-.898 3.148-2.492 3.148zm15.954-7.36h-1.352l-1.656 6.735h-.125l-1.883-6.735h-1.29l-1.882 6.735h-.125l-1.656-6.735h-1.36l2.36 8.422h1.36l1.874-6.516h.125l1.883 6.516h1.367l2.36-8.422zm4.523 1.04c1.336 0 2.227.984 2.258 2.476h-4.64c.101-1.492 1.039-2.477 2.382-2.477zm2.219 5.202c-.352.742-1.086 1.14-2.172 1.14-1.43 0-2.36-1.054-2.43-2.718v-.062h6.055v-.516c0-2.617-1.383-4.234-3.656-4.234-2.313 0-3.797 1.718-3.797 4.367 0 2.664 1.46 4.351 3.797 4.351 1.844 0 3.156-.89 3.547-2.328H96.04zm3.242 2.18h1.344v-5.219c0-1.187.93-2.047 2.211-2.047.266 0 .75.047.86.078V17.97a5.77 5.77 0 00-.672-.04c-1.117 0-2.086.579-2.336 1.4h-.125v-1.25h-1.281V26.5zm8.899-7.383c1.336 0 2.227.985 2.258 2.477h-4.641c.102-1.492 1.04-2.477 2.383-2.477zm2.219 5.203c-.352.742-1.086 1.14-2.172 1.14-1.43 0-2.359-1.054-2.43-2.718v-.062h6.055v-.516c0-2.617-1.383-4.234-3.656-4.234-2.313 0-3.797 1.718-3.797 4.367 0 2.664 1.461 4.351 3.797 4.351 1.844 0 3.156-.89 3.547-2.328H110.4zm6.36 2.328c1.164 0 2.164-.554 2.695-1.492h.125V26.5h1.281V14.734h-1.343v4.672h-.118c-.476-.922-1.468-1.476-2.64-1.476-2.141 0-3.539 1.718-3.539 4.36 0 2.648 1.382 4.358 3.539 4.358zm.312-7.507c1.524 0 2.477 1.218 2.477 3.148 0 1.945-.946 3.148-2.477 3.148-1.539 0-2.461-1.18-2.461-3.148 0-1.96.93-3.148 2.461-3.148zm14.462 7.507c2.133 0 3.531-1.726 3.531-4.359 0-2.648-1.391-4.36-3.531-4.36-1.156 0-2.18.571-2.641 1.477h-.125v-4.672h-1.344V26.5h1.282v-1.344h.125c.531.938 1.531 1.492 2.703 1.492zm-.313-7.507c1.539 0 2.453 1.18 2.453 3.148 0 1.969-.914 3.148-2.453 3.148-1.531 0-2.484-1.203-2.484-3.148s.953-3.148 2.484-3.148zm6.04 10.406c1.492 0 2.164-.578 2.882-2.531l3.29-8.938h-1.43l-2.305 6.93h-.125l-2.312-6.93h-1.453l3.117 8.43-.157.5c-.351 1.015-.773 1.383-1.546 1.383-.188 0-.399-.008-.563-.04V29.5c.188.031.422.047.602.047zm17.391-3.047l3.898-11.273h-2.148l-2.813 8.921h-.132l-2.836-8.921h-2.227l3.938 11.273h2.32zm8.016-7.18c1.164 0 1.93.813 1.969 2.078h-4.024c.086-1.25.899-2.078 2.055-2.078zm1.984 4.828c-.281.633-.945.985-1.906.985-1.273 0-2.094-.89-2.141-2.313v-.101h5.969v-.625c0-2.696-1.461-4.313-3.898-4.313-2.477 0-4.016 1.727-4.016 4.477s1.516 4.414 4.031 4.414c2.016 0 3.446-.969 3.797-2.524h-1.836zm3.547 2.352h1.938v-4.938c0-1.195.875-1.976 2.133-1.976.328 0 .843.055.992.11v-1.798c-.18-.054-.524-.085-.805-.085-1.101 0-2.023.625-2.258 1.468h-.132v-1.328h-1.868V26.5zm13.501-5.672c-.203-1.797-1.532-3.047-3.727-3.047-2.57 0-4.078 1.649-4.078 4.422 0 2.813 1.516 4.469 4.086 4.469 2.164 0 3.508-1.203 3.719-2.992h-1.844c-.203.89-.875 1.367-1.883 1.367-1.32 0-2.117-1.047-2.117-2.844 0-1.773.789-2.797 2.117-2.797 1.063 0 1.703.594 1.883 1.422h1.844zm5.117-1.508c1.164 0 1.93.813 1.969 2.078h-4.024c.086-1.25.899-2.078 2.055-2.078zm1.985 4.828c-.282.633-.946.985-1.907.985-1.273 0-2.093-.89-2.14-2.313v-.101h5.968v-.625c0-2.696-1.461-4.313-3.898-4.313-2.477 0-4.016 1.727-4.016 4.477s1.516 4.414 4.032 4.414c2.015 0 3.445-.969 3.796-2.524h-1.835zm3.625 2.352h1.937V14.648h-1.937V26.5zM23.325 13l9.325 16H14l9.325-16z" fill="#fff"/><path stroke="#5E5E5E" d="M43.5 0v44"/></svg>
|
After Width: | Height: | Size: 3.5 KiB |
|
@ -3022,23 +3022,24 @@ import { Pagination } from "carbon-components-svelte";
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Type | Default value |
|
| Prop name | Type | Default value |
|
||||||
| :---------------- | :--------------------------------------------------------------- | :---------------- |
|
| :-------------------- | :--------------------------------------------------------------- | :---------------- |
|
||||||
| page | <code>number</code> | 1 |
|
| page | <code>number</code> | 1 |
|
||||||
| totalItems | <code>number</code> | 0 |
|
| totalItems | <code>number</code> | 0 |
|
||||||
| disabled | <code>boolean</code> | false |
|
| disabled | <code>boolean</code> | false |
|
||||||
| forwardText | <code>string</code> | "Next page" |
|
| forwardText | <code>string</code> | "Next page" |
|
||||||
| backwardText | <code>string</code> | "Previous page" |
|
| backwardText | <code>string</code> | "Previous page" |
|
||||||
| itemsPerPageText | <code>string</code> | "Items per page:" |
|
| itemsPerPageText | <code>string</code> | "Items per page:" |
|
||||||
| itemText | <code>(min: number, max: number) => string</code> | -- |
|
| itemText | <code>(min: number, max: number) => string</code> | -- |
|
||||||
| itemRangeText | <code>(min: number, max: number, total: number) => string</code> | -- |
|
| itemRangeText | <code>(min: number, max: number, total: number) => string</code> | -- |
|
||||||
| pageInputDisabled | <code>boolean</code> | false |
|
| pageInputDisabled | <code>boolean</code> | false |
|
||||||
| pageSize | <code>number</code> | 10 |
|
| pageSizeInputDisabled | <code>boolean</code> | false |
|
||||||
| pageSizes | <code>number[]</code> | -- |
|
| pageSize | <code>number</code> | 10 |
|
||||||
| pagesUnknown | <code>boolean</code> | false |
|
| pageSizes | <code>number[]</code> | -- |
|
||||||
| pageText | <code>(page: number) => string</code> | -- |
|
| pagesUnknown | <code>boolean</code> | false |
|
||||||
| pageRangeText | <code>(current: number, total: number) => string</code> | -- |
|
| pageText | <code>(page: number) => string</code> | -- |
|
||||||
| id | <code>string</code> | -- |
|
| pageRangeText | <code>(current: number, total: number) => string</code> | -- |
|
||||||
|
| id | <code>string</code> | -- |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
|
13
README.md
13
README.md
|
@ -1,13 +1,14 @@
|
||||||
# carbon-components-svelte
|
# carbon-components-svelte
|
||||||
|
|
||||||
|
> `carbon-components-svelte` is a Svelte component library that implements the [Carbon Design System](https://github.com/carbon-design-system), an open source design system by IBM.
|
||||||
|
|
||||||
|
> A design system can facilitate frontend development and prototyping because it is encourages reuse, consistency, and extensibility.
|
||||||
|
|
||||||
[![NPM][npm]][npm-url]
|
[![NPM][npm]][npm-url]
|
||||||
[![Build][build]][build-badge]
|
[![Build][build]][build-badge]
|
||||||
|
<a href="https://www.vercel.com?utm_source=carbon-components-svelte&utm_campaign=oss" target="_blank">
|
||||||
> Svelte implementation of the [Carbon Design System](https://github.com/carbon-design-system)
|
<img height="32px" src="./.assets/powered-by-vercel.svg" alt="Deploys by Vercel" />
|
||||||
|
</a>
|
||||||
`carbon-components-svelte` is a Svelte component library that implements the Carbon Design System, an open source design system by IBM.
|
|
||||||
|
|
||||||
A design system can facilitate frontend development and prototyping because it is encourages reuse, consistency, and extensibility.
|
|
||||||
|
|
||||||
## [Documentation](http://ibm.biz/carbon-svelte)
|
## [Documentation](http://ibm.biz/carbon-svelte)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
*
|
|
||||||
!Staticfile
|
|
||||||
!dist
|
|
|
@ -1,2 +0,0 @@
|
||||||
root: dist
|
|
||||||
force_https: true
|
|
|
@ -5,6 +5,10 @@
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Carbon Components Svelte</title>
|
<title>Carbon Components Svelte</title>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://unpkg.com/carbon-components-svelte/css/all.css"
|
||||||
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
applications:
|
|
||||||
- name: carbon-components-svelte
|
|
||||||
memory: 64M
|
|
||||||
disk_quota: 64M
|
|
||||||
buildpacks:
|
|
||||||
- https://github.com/cloudfoundry/staticfile-buildpack.git
|
|
|
@ -6,9 +6,8 @@
|
||||||
"dev:svite": "svite",
|
"dev:svite": "svite",
|
||||||
"build": "run-s build:*",
|
"build": "run-s build:*",
|
||||||
"build:routify": "routify run -b",
|
"build:routify": "routify run -b",
|
||||||
"build:svite": "svite build --assetsDir=assets",
|
"build:svite": "svite build",
|
||||||
"postbuild": "node scripts/postbuild",
|
"postbuild": "node scripts/postbuild"
|
||||||
"deploy": "npx gh-pages -d dist"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltech/routify": "^1.9.9",
|
"@sveltech/routify": "^1.9.9",
|
||||||
|
@ -16,11 +15,9 @@
|
||||||
"clipboard-copy": "^3.1.0",
|
"clipboard-copy": "^3.1.0",
|
||||||
"fs-extra": "^9.0.1",
|
"fs-extra": "^9.0.1",
|
||||||
"mdsvex": "^0.8.8",
|
"mdsvex": "^0.8.8",
|
||||||
"node-sass": "^4.14.1",
|
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"playwright": "^1.4.2",
|
"playwright": "^1.4.2",
|
||||||
"polka": "^0.5.2",
|
"polka": "^0.5.2",
|
||||||
"posthtml": "^0.13.3",
|
|
||||||
"prettier": "^2.1.2",
|
"prettier": "^2.1.2",
|
||||||
"prettier-plugin-svelte": "^1.4.0",
|
"prettier-plugin-svelte": "^1.4.0",
|
||||||
"prism-svelte": "^0.4.7",
|
"prism-svelte": "^0.4.7",
|
||||||
|
|
1
docs/public/powered-by-vercel.svg
Normal file
1
docs/public/powered-by-vercel.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg width="212" height="44" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="212" height="44" rx="8" fill="#000"/><path d="M60.438 15.227V26.5h1.406v-4.023h2.836c2.117 0 3.625-1.493 3.625-3.602 0-2.148-1.477-3.648-3.61-3.648h-4.257zm1.406 1.25h2.484c1.633 0 2.531.851 2.531 2.398 0 1.492-.93 2.352-2.53 2.352h-2.485v-4.75zm11.5 10.171c2.399 0 3.883-1.656 3.883-4.359 0-2.71-1.484-4.36-3.883-4.36-2.398 0-3.883 1.65-3.883 4.36 0 2.703 1.485 4.36 3.883 4.36zm0-1.21c-1.594 0-2.492-1.157-2.492-3.149 0-2 .898-3.148 2.492-3.148 1.594 0 2.492 1.148 2.492 3.148 0 1.992-.898 3.148-2.492 3.148zm15.954-7.36h-1.352l-1.656 6.735h-.125l-1.883-6.735h-1.29l-1.882 6.735h-.125l-1.656-6.735h-1.36l2.36 8.422h1.36l1.874-6.516h.125l1.883 6.516h1.367l2.36-8.422zm4.523 1.04c1.336 0 2.227.984 2.258 2.476h-4.64c.101-1.492 1.039-2.477 2.382-2.477zm2.219 5.202c-.352.742-1.086 1.14-2.172 1.14-1.43 0-2.36-1.054-2.43-2.718v-.062h6.055v-.516c0-2.617-1.383-4.234-3.656-4.234-2.313 0-3.797 1.718-3.797 4.367 0 2.664 1.46 4.351 3.797 4.351 1.844 0 3.156-.89 3.547-2.328H96.04zm3.242 2.18h1.344v-5.219c0-1.187.93-2.047 2.211-2.047.266 0 .75.047.86.078V17.97a5.77 5.77 0 00-.672-.04c-1.117 0-2.086.579-2.336 1.4h-.125v-1.25h-1.281V26.5zm8.899-7.383c1.336 0 2.227.985 2.258 2.477h-4.641c.102-1.492 1.04-2.477 2.383-2.477zm2.219 5.203c-.352.742-1.086 1.14-2.172 1.14-1.43 0-2.359-1.054-2.43-2.718v-.062h6.055v-.516c0-2.617-1.383-4.234-3.656-4.234-2.313 0-3.797 1.718-3.797 4.367 0 2.664 1.461 4.351 3.797 4.351 1.844 0 3.156-.89 3.547-2.328H110.4zm6.36 2.328c1.164 0 2.164-.554 2.695-1.492h.125V26.5h1.281V14.734h-1.343v4.672h-.118c-.476-.922-1.468-1.476-2.64-1.476-2.141 0-3.539 1.718-3.539 4.36 0 2.648 1.382 4.358 3.539 4.358zm.312-7.507c1.524 0 2.477 1.218 2.477 3.148 0 1.945-.946 3.148-2.477 3.148-1.539 0-2.461-1.18-2.461-3.148 0-1.96.93-3.148 2.461-3.148zm14.462 7.507c2.133 0 3.531-1.726 3.531-4.359 0-2.648-1.391-4.36-3.531-4.36-1.156 0-2.18.571-2.641 1.477h-.125v-4.672h-1.344V26.5h1.282v-1.344h.125c.531.938 1.531 1.492 2.703 1.492zm-.313-7.507c1.539 0 2.453 1.18 2.453 3.148 0 1.969-.914 3.148-2.453 3.148-1.531 0-2.484-1.203-2.484-3.148s.953-3.148 2.484-3.148zm6.04 10.406c1.492 0 2.164-.578 2.882-2.531l3.29-8.938h-1.43l-2.305 6.93h-.125l-2.312-6.93h-1.453l3.117 8.43-.157.5c-.351 1.015-.773 1.383-1.546 1.383-.188 0-.399-.008-.563-.04V29.5c.188.031.422.047.602.047zm17.391-3.047l3.898-11.273h-2.148l-2.813 8.921h-.132l-2.836-8.921h-2.227l3.938 11.273h2.32zm8.016-7.18c1.164 0 1.93.813 1.969 2.078h-4.024c.086-1.25.899-2.078 2.055-2.078zm1.984 4.828c-.281.633-.945.985-1.906.985-1.273 0-2.094-.89-2.141-2.313v-.101h5.969v-.625c0-2.696-1.461-4.313-3.898-4.313-2.477 0-4.016 1.727-4.016 4.477s1.516 4.414 4.031 4.414c2.016 0 3.446-.969 3.797-2.524h-1.836zm3.547 2.352h1.938v-4.938c0-1.195.875-1.976 2.133-1.976.328 0 .843.055.992.11v-1.798c-.18-.054-.524-.085-.805-.085-1.101 0-2.023.625-2.258 1.468h-.132v-1.328h-1.868V26.5zm13.501-5.672c-.203-1.797-1.532-3.047-3.727-3.047-2.57 0-4.078 1.649-4.078 4.422 0 2.813 1.516 4.469 4.086 4.469 2.164 0 3.508-1.203 3.719-2.992h-1.844c-.203.89-.875 1.367-1.883 1.367-1.32 0-2.117-1.047-2.117-2.844 0-1.773.789-2.797 2.117-2.797 1.063 0 1.703.594 1.883 1.422h1.844zm5.117-1.508c1.164 0 1.93.813 1.969 2.078h-4.024c.086-1.25.899-2.078 2.055-2.078zm1.985 4.828c-.282.633-.946.985-1.907.985-1.273 0-2.093-.89-2.14-2.313v-.101h5.968v-.625c0-2.696-1.461-4.313-3.898-4.313-2.477 0-4.016 1.727-4.016 4.477s1.516 4.414 4.032 4.414c2.015 0 3.445-.969 3.796-2.524h-1.835zm3.625 2.352h1.937V14.648h-1.937V26.5zM23.325 13l9.325 16H14l9.325-16z" fill="#fff"/><path stroke="#5E5E5E" d="M43.5 0v44"/></svg>
|
After Width: | Height: | Size: 3.5 KiB |
|
@ -2,7 +2,6 @@ const sirv = require("sirv");
|
||||||
const polka = require("polka");
|
const polka = require("polka");
|
||||||
const { chromium } = require("playwright");
|
const { chromium } = require("playwright");
|
||||||
const fs = require("fs-extra");
|
const fs = require("fs-extra");
|
||||||
const posthtml = require("posthtml");
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3000;
|
||||||
|
@ -17,58 +16,25 @@ async function scrape(page, url = "") {
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function relativePaths(depth = 0) {
|
async function processHtml(html, { dir, outfilePath }) {
|
||||||
const asset_extension = new RegExp(/.(js|css|ico)$/);
|
|
||||||
let relative_path =
|
|
||||||
depth > 0
|
|
||||||
? Array.from({ length: depth }, (_, i) => "../")
|
|
||||||
.join("")
|
|
||||||
.slice(0, -1)
|
|
||||||
: ".";
|
|
||||||
|
|
||||||
return (tree) => {
|
|
||||||
tree.match(
|
|
||||||
[
|
|
||||||
{ attrs: { href: asset_extension } },
|
|
||||||
{ attrs: { src: asset_extension } },
|
|
||||||
],
|
|
||||||
(node) => {
|
|
||||||
if ("href" in node.attrs) {
|
|
||||||
node.attrs.href = relative_path + node.attrs.href;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("src" in node.attrs) {
|
|
||||||
node.attrs.src = relative_path + node.attrs.src;
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
tree.match({ attrs: { id: "__routify_iframes" } }, (node) => {});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function processHtml(html, { dir, outfilePath, depth }) {
|
|
||||||
const processed = await posthtml().use(relativePaths(depth)).process(html);
|
|
||||||
if (dir) {
|
if (dir) {
|
||||||
await fs.ensureDir(outfilePath);
|
await fs.ensureDir(outfilePath);
|
||||||
await fs.writeFile(
|
await fs.writeFile(
|
||||||
path.join(outfilePath, "index.html"),
|
path.join(outfilePath, "index.html"),
|
||||||
await `<!DOCTYPE html><html lang="en">${processed.html}</html>`
|
await `<!DOCTYPE html><html lang="en">${html}</html>`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
await fs.writeFile(
|
await fs.writeFile(
|
||||||
path.join(outfilePath),
|
path.join(outfilePath),
|
||||||
await `<!DOCTYPE html><html lang="en">${processed.html}</html>`
|
await `<!DOCTYPE html><html lang="en">${html}</html>`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Prerendered:", outfilePath);
|
console.log("Prerendered path:", outfilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
const app = polka()
|
const app = polka()
|
||||||
.use(sirv("dist", { single: true }))
|
.use(sirv(OUT_DIR, { single: true }))
|
||||||
.listen(PORT, async (error) => {
|
.listen(PORT, async (error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@ -89,12 +55,10 @@ const app = polka()
|
||||||
await processHtml(result, {
|
await processHtml(result, {
|
||||||
dir: true,
|
dir: true,
|
||||||
outfilePath: `${OUT_DIR}/${filePath}`,
|
outfilePath: `${OUT_DIR}/${filePath}`,
|
||||||
depth: 2,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await fs.ensureDir(`${OUT_DIR}/framed/`);
|
await fs.ensureDir(`${OUT_DIR}/framed/`);
|
||||||
await fs.ensureDir(`${OUT_DIR}/framed/Grid`);
|
|
||||||
|
|
||||||
const framed = [
|
const framed = [
|
||||||
{
|
{
|
||||||
|
@ -128,7 +92,6 @@ const app = polka()
|
||||||
await processHtml(result, {
|
await processHtml(result, {
|
||||||
dir: true,
|
dir: true,
|
||||||
outfilePath: `${OUT_DIR}/${filePath}`,
|
outfilePath: `${OUT_DIR}/${filePath}`,
|
||||||
depth: 3,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,4 @@
|
||||||
import { routes } from "../.routify/routes";
|
import { routes } from "../.routify/routes";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" global>
|
|
||||||
@import "carbon-components-svelte/css/all";
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<Router routes="{routes}" />
|
<Router routes="{routes}" />
|
||||||
|
|
24
docs/src/components/Footer.svelte
Normal file
24
docs/src/components/Footer.svelte
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<script>
|
||||||
|
import { Content, Grid, Row, Column, Link } from "carbon-components-svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
footer {
|
||||||
|
background: var(--cds-ui-01);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<footer class="bx--content">
|
||||||
|
<Grid>
|
||||||
|
<Row>
|
||||||
|
<Column>
|
||||||
|
<Link
|
||||||
|
href="https://www.vercel.com?utm_source=carbon-components-svelte&utm_campaign=oss"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<img src="/powered-by-vercel.svg" alt="Deploys by Vercel" />
|
||||||
|
</Link>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
</Grid>
|
||||||
|
</footer>
|
|
@ -143,7 +143,7 @@
|
||||||
kind="ghost"
|
kind="ghost"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
size="field"
|
size="field"
|
||||||
href="{src}"
|
href="{$url(src)}"
|
||||||
icon="{Launch16}"
|
icon="{Launch16}"
|
||||||
>
|
>
|
||||||
Open in new tab
|
Open in new tab
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
SideNavItems,
|
SideNavItems,
|
||||||
SideNavMenu,
|
SideNavMenu,
|
||||||
SideNavMenuItem,
|
SideNavMenuItem,
|
||||||
SideNavLink,
|
|
||||||
} from "carbon-components-svelte";
|
} from "carbon-components-svelte";
|
||||||
import LogoGithub20 from "carbon-icons-svelte/lib/LogoGithub20";
|
import LogoGithub20 from "carbon-icons-svelte/lib/LogoGithub20";
|
||||||
import Theme from "../components/Theme.svelte";
|
import Theme from "../components/Theme.svelte";
|
||||||
|
import Footer from "../components/Footer.svelte";
|
||||||
|
|
||||||
let isOpen = false;
|
let isOpen = false;
|
||||||
let isSideNavOpen = true;
|
let isSideNavOpen = true;
|
||||||
|
@ -164,7 +164,6 @@
|
||||||
|
|
||||||
<svelte:body
|
<svelte:body
|
||||||
on:mouseover="{async (e) => {
|
on:mouseover="{async (e) => {
|
||||||
return;
|
|
||||||
if (process.env.NODE_ENV === 'development') return;
|
if (process.env.NODE_ENV === 'development') return;
|
||||||
if (!e.target.href || !e.target
|
if (!e.target.href || !e.target
|
||||||
.getAttribute('class')
|
.getAttribute('class')
|
||||||
|
@ -179,7 +178,7 @@
|
||||||
<Theme persist>
|
<Theme persist>
|
||||||
<Header
|
<Header
|
||||||
aria-label="Navigation"
|
aria-label="Navigation"
|
||||||
href="/"
|
href="{$url('/')}"
|
||||||
expandedByDefault="{true}"
|
expandedByDefault="{true}"
|
||||||
bind:isSideNavOpen
|
bind:isSideNavOpen
|
||||||
>
|
>
|
||||||
|
@ -240,4 +239,5 @@
|
||||||
</SideNavItems>
|
</SideNavItems>
|
||||||
</SideNav>
|
</SideNav>
|
||||||
<slot />
|
<slot />
|
||||||
|
<Footer />
|
||||||
</Theme>
|
</Theme>
|
||||||
|
|
806
docs/yarn.lock
806
docs/yarn.lock
File diff suppressed because it is too large
Load diff
6
types/index.d.ts
vendored
6
types/index.d.ts
vendored
|
@ -2918,6 +2918,12 @@ export class Pagination extends CarbonSvelteComponent {
|
||||||
*/
|
*/
|
||||||
pageInputDisabled?: boolean;
|
pageInputDisabled?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to disable the page size input
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
pageSizeInputDisabled?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the number of items to display in a page
|
* Specify the number of items to display in a page
|
||||||
* @default 10
|
* @default 10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue