Skip to content

Commit

Permalink
chore: components d to h type docs (#3502)
Browse files Browse the repository at this point in the history
* chore: initial types export

* chore: new api pages

* chore: improved documentation of existing type exports

* chore: missing changeset and vrt pages

* chore: ensure CI does not crash

* chore: pr feedback

* chore: not extending html props from paste types

* chore: correct types from datagrid

* chore: missing typedocs

* chore: updated types
  • Loading branch information
SiTaggart committed Oct 3, 2023
1 parent dc8deca commit b48a0f4
Show file tree
Hide file tree
Showing 175 changed files with 99,740 additions and 9,417 deletions.
6 changes: 6 additions & 0 deletions .changeset/flat-worms-explode.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/heading': patch
'@twilio-paste/core': patch
---

[Heading]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/giant-gorillas-behave.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/data-grid': patch
'@twilio-paste/core': patch
---

[Data Grid]: Improved TsDoc type annotation
6 changes: 6 additions & 0 deletions .changeset/green-deers-attend.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/editable-code-block': patch
'@twilio-paste/core': patch
---

[Editable Code Block]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/healthy-laws-marry.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/form': patch
'@twilio-paste/core': patch
---

[Form]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/lazy-hats-report.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/display-heading': patch
'@twilio-paste/core': patch
---

[Display Heading]: Improved TsDoc type annotations
1 change: 1 addition & 0 deletions .changeset/light-buttons-type.md
@@ -1,5 +1,6 @@
---
'@twilio-paste/codemods': minor
'@twilio-paste/core': minor
---

[Codemods] New exports from icons package
6 changes: 6 additions & 0 deletions .changeset/mean-pugs-dream.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/display-pill-group': patch
'@twilio-paste/core': patch
---

[Display Pill Group]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/perfect-shoes-kneel.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/description-list': patch
'@twilio-paste/core': patch
---

[Description List] Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/purple-oranges-tease.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/date-picker': patch
'@twilio-paste/core': patch
---

[Date Picker]: Improved TsDoc type annotation
6 changes: 6 additions & 0 deletions .changeset/purple-stingrays-dream.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/codemods': patch
'@twilio-paste/core': patch
---

[Codemods] updated pacakge exports
6 changes: 6 additions & 0 deletions .changeset/rare-pillows-sleep.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/help-text': patch
'@twilio-paste/core': patch
---

[Healp Text]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/shaggy-flies-laugh.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/file-picker': patch
'@twilio-paste/core': patch
---

[File Picker]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/short-mirrors-call.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/form-pill-group': patch
'@twilio-paste/core': patch
---

[Form Pill Group]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/six-pots-enjoy.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/disclosure': patch
'@twilio-paste/core': patch
---

[Disclosure]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/tender-parrots-look.md
@@ -0,0 +1,6 @@
---
"@twilio-paste/table": patch
"@twilio-paste/core": patch
---

[Table] Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/warm-bears-peel.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/file-uploader': patch
'@twilio-paste/core': patch
---

[File Uploader]: Improved TsDoc type annotations
6 changes: 6 additions & 0 deletions .changeset/wicked-mice-join.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/detail-text': patch
'@twilio-paste/core': patch
---

[Detail Text]: Improved TsDoc type annotations
17 changes: 9 additions & 8 deletions .github/workflows/on_pull_request.yml
Expand Up @@ -53,12 +53,15 @@ jobs:
- name: Build packages
run: yarn build

- name: Run type checker
run: yarn type-check
- run: yarn build:typedocs
- name: Verify generated types are checked in for website
run: yarn check:type-docs

eslint:
name: Lint repository
runs-on: ubuntu-latest
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -100,8 +103,6 @@ jobs:

- name: Build packages
run: yarn build
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

- name: Run eslint
run: yarn lint
Expand Down Expand Up @@ -159,6 +160,8 @@ jobs:
react17_tests:
name: Test repository using React 17
runs-on: ubuntu-latest
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -193,8 +196,6 @@ jobs:
# Note: Build first before we change the react version installed.
- name: Build packages
run: yarn build
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

- name: Install React 17
run: |
Expand All @@ -210,6 +211,8 @@ jobs:
react16_tests:
name: Test repository using React 16
runs-on: ubuntu-latest
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -244,8 +247,6 @@ jobs:
# Note: Build first before we change the react version installed.
- name: Build packages
run: yarn build
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

- name: Install React 16
run: |
Expand Down
28 changes: 27 additions & 1 deletion cypress/integration/sitemap-vrt/constants.ts
Expand Up @@ -58,11 +58,23 @@ export const SITEMAP = [
"/components/checkbox/api",
"/components/checkbox/changelog",
"/components/data-grid/",
"/components/data-grid/api",
"/components/data-grid/changelog",
"/components/detail-text",
"/components/detail-text/api",
"/components/detail-text/changelog",
"/components/description-list/",
"/components/description-list/api",
"/components/description-list/changelog",
"/components/display-heading/",
"/components/display-heading/api",
"/components/display-heading/changelog",
"/components/display-pill-group/",
"/components/display-pill-group/api",
"/components/display-pill-group/changelog",
"/components/disclosure/",
"/components/disclosure/api",
"/components/disclosure/changelog",
"/components/button/",
"/components/button/api",
"/components/button/changelog",
Expand All @@ -71,17 +83,31 @@ export const SITEMAP = [
"/components/flex/api",
"/components/flex/changelog",
"/components/file-picker/",
"/components/file-picker/api",
"/components/file-picker/changelog",
"/components/file-uploader/",
"/components/file-uploader/api",
"/components/file-uploader/changelog",
"/components/form/",
"/components/form/api",
"/components/form/changelog",
"/components/combobox/",
"/components/date-picker/",
"/components/date-picker/api",
"/components/date-picker/changelog",
"/components/grid/",
"/components/grid/api",
"/components/grid/changelog",
"/components/heading/",
"/components/heading/api",
"/components/heading/changelog",
"/components/form-pill-group/",
"/components/form-pill-group/api",
"/components/form-pill-group/changelog",
"/components/alert/",
"/components/help-text/",
"/components/help-text/api",
"/components/help-text/changelog",
"/components/icon/",
"/components/icon/usage-guidelines/",
"/components/",
Expand Down Expand Up @@ -201,7 +227,7 @@ export const SITEMAP = [
const SITEMAP_CHUNKS: string[][] = [];
const CHUNK_SIZE = 25;

for (var i = 0, len = SITEMAP.length; i < len; i += CHUNK_SIZE) {
for (let i = 0, len = SITEMAP.length; i < len; i += CHUNK_SIZE) {
SITEMAP_CHUNKS.push(SITEMAP.slice(i, i + CHUNK_SIZE));
}

Expand Down
14 changes: 12 additions & 2 deletions package.json
Expand Up @@ -6,7 +6,12 @@
"author": "Twilio Inc.",
"license": "MIT",
"workspaces": {
"packages": ["apps/**/*", "packages/**/*", "templates/**/*", "!packages/paste-core/core-bundle/**/*"]
"packages": [
"apps/**/*",
"packages/**/*",
"templates/**/*",
"!packages/paste-core/core-bundle/**/*"
]
},
"types": "./types/index.d.ts",
"engines": {
Expand Down Expand Up @@ -38,6 +43,7 @@
"build:theme-designer": "yarn nx run @twilio-paste/theme-designer:build",
"build:nextjs-template": "yarn nx run @twilio-paste/nextjs-template:build",
"build:contrast-checking": "yarn nx run @twilio-paste/token-contrast-checker:build",
"check:type-docs": "bash ./tools/build/generate-type-docs/check-uncommited-type.sh",
"pre-push": "concurrently \"yarn:lint\" \"yarn:test\" \"yarn:format\" \"yarn:type-check\"",
"prerelease": "yarn build && yarn lint && yarn test",
"release": "yarn changeset publish",
Expand Down Expand Up @@ -221,5 +227,9 @@
}
},
"packageManager": "yarn@3.6.3",
"browserslist": ["last 2 versions", "not dead", "not IE 11"]
"browserslist": [
"last 2 versions",
"not dead",
"not IE 11"
]
}
3 changes: 0 additions & 3 deletions packages/paste-codemods/tools/.cache/mappings.json
Expand Up @@ -83,9 +83,7 @@
"DescriptionListDetails": "@twilio-paste/core/description-list",
"DescriptionListSet": "@twilio-paste/core/description-list",
"DescriptionListTerm": "@twilio-paste/core/description-list",
"StyledDescriptionListSet": "@twilio-paste/core/description-list",
"DetailText": "@twilio-paste/core/detail-text",
"AnimatedDisclosureContent": "@twilio-paste/core/disclosure",
"Disclosure": "@twilio-paste/core/disclosure",
"DisclosureContent": "@twilio-paste/core/disclosure",
"DisclosureHeading": "@twilio-paste/core/disclosure",
Expand Down Expand Up @@ -120,7 +118,6 @@
"useFormPillState": "@twilio-paste/core/form-pill-group",
"Heading": "@twilio-paste/core/heading",
"HelpText": "@twilio-paste/core/help-text",
"HelpTextVariants": "@twilio-paste/core/help-text",
"InPageNavigation": "@twilio-paste/core/in-page-navigation",
"InPageNavigationItem": "@twilio-paste/core/in-page-navigation",
"InlineCode": "@twilio-paste/core/inline-code",
Expand Down
4 changes: 2 additions & 2 deletions packages/paste-core/components/avatar/type-docs.json
Expand Up @@ -430,7 +430,7 @@
},
"element": {
"type": "string",
"defaultValue": "'AVATAR'",
"defaultValue": "AVATAR",
"required": false,
"externalProp": false,
"description": "Overrides the default element name to apply unique styles with the Customization Provider"
Expand Down Expand Up @@ -2046,7 +2046,7 @@
},
"element": {
"type": "string",
"defaultValue": "'AVATAR_GROUP'",
"defaultValue": "AVATAR_GROUP",
"required": false,
"externalProp": false,
"description": "Overrides the default element name to apply unique styles with the Customization Provider"
Expand Down
14 changes: 7 additions & 7 deletions packages/paste-core/components/badge/type-docs.json
Expand Up @@ -8,14 +8,14 @@
},
"element": {
"type": "string",
"defaultValue": "'BADGE'",
"defaultValue": "BADGE",
"required": false,
"externalProp": false,
"description": "Overrides the default element name to apply unique styles with the Customization Provider"
},
"size": {
"type": "BadgeSizes",
"defaultValue": "'default'",
"defaultValue": "default",
"required": false,
"externalProp": false
}
Expand All @@ -26,7 +26,7 @@
"defaultValue": "null",
"required": true,
"externalProp": false,
"description": "Underlying HTML element to render. Can be 'span', 'button', or 'a'."
"description": "Underlying HTML element to render. Can be \"span\", \"button\", or \"a\"."
},
"variant": {
"type": "| \"neutral\"\n | \"warning\"\n | \"error\"\n | \"success\"\n | \"new\"\n | \"subaccount\"\n | \"decorative10\"\n | \"decorative20\"\n | \"decorative30\"\n | \"decorative40\"\n | \"neutral_counter\"\n | \"error_counter\"\n | \"default\"\n | \"info\"",
Expand Down Expand Up @@ -450,7 +450,7 @@
},
"element": {
"type": "string",
"defaultValue": "'BADGE'",
"defaultValue": "BADGE",
"required": false,
"externalProp": false,
"description": "Overrides the default element name to apply unique styles with the Customization Provider"
Expand Down Expand Up @@ -1563,7 +1563,7 @@
},
"size": {
"type": "BadgeSizes",
"defaultValue": "'default'",
"defaultValue": "default",
"required": false,
"externalProp": false
},
Expand Down Expand Up @@ -1634,7 +1634,7 @@
"defaultValue": "null",
"required": true,
"externalProp": false,
"description": "Underlying HTML element to render. Can be 'span', 'button', or 'a'."
"description": "Underlying HTML element to render. Can be \"span\", \"button\", or \"a\"."
},
"about": {
"type": "string",
Expand Down Expand Up @@ -3289,7 +3289,7 @@
"defaultValue": "null",
"required": true,
"externalProp": false,
"description": "Underlying HTML element to render. Can be 'span', 'button', or 'a'."
"description": "Underlying HTML element to render. Can be \"span\", \"button\", or \"a\"."
},
"about": {
"type": "string",
Expand Down

0 comments on commit b48a0f4

Please sign in to comment.