Skip to content

Commit fcb2164

Browse files
authored
Merge pull request #2878 from Shopify/mv-admin-components-to-shared
Use shared data for Admin components
2 parents b61f776 + d222c9f commit fcb2164

File tree

25 files changed

+607
-80
lines changed

25 files changed

+607
-80
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@babel/node": "^7.8.7",
3535
"@changesets/changelog-github": "^0.4.7",
3636
"@changesets/cli": "^2.25.2",
37+
"@rollup/plugin-replace": "^6.0.1",
3738
"@shopify/babel-preset": "^24.1.0",
3839
"@shopify/browserslist-config": "^3.0.0",
3940
"@shopify/eslint-plugin": "^42.0.0",
@@ -44,10 +45,9 @@
4445
"@shopify/loom-plugin-eslint": "^2.0.0",
4546
"@shopify/loom-plugin-prettier": "^2.0.0",
4647
"@shopify/typescript-configs": "^5.1.0",
47-
"@rollup/plugin-replace": "^6.0.1",
4848
"eslint": "^8.28.0",
4949
"nodemon": "^2.0.4",
50-
"prettier": "^2.8.0",
50+
"prettier": "^2.8.8",
5151
"typescript": "^4.9.0"
5252
},
5353
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Badge',
5+
description:
6+
"Use `s-badge` to inform merchants of the status of an object or of an action that's been taken.",
7+
category: 'Polaris web components',
8+
subCategory: 'Titles and text',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'Banner',
13+
url: 'banner',
14+
},
15+
{
16+
type: 'component',
17+
name: 'Text',
18+
url: 'text',
19+
},
20+
],
21+
};
22+
23+
export default data;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Checkbox',
5+
description:
6+
'Use `s-checkbox` when you want to provide users with a clear selection option, such as for agreeing to terms and conditions or selecting multiple options from a list.',
7+
category: 'Polaris web components',
8+
subCategory: 'Forms',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'Switch',
13+
url: 'switch',
14+
},
15+
{
16+
type: 'component',
17+
name: 'Select',
18+
url: 'select',
19+
},
20+
{
21+
type: 'component',
22+
name: 'ChoiceList',
23+
url: 'choice-list',
24+
},
25+
],
26+
};
27+
28+
export default data;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'ChoiceList',
5+
description:
6+
'Use `s-choice-list` to present multiple options to merchants. Choice lists can present options with either radio buttons for single selection or checkboxes for multiple selection.',
7+
category: 'Polaris web components',
8+
subCategory: 'Forms',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'Select',
13+
url: 'select',
14+
},
15+
{
16+
type: 'component',
17+
name: 'Checkbox',
18+
url: 'checkbox',
19+
},
20+
],
21+
};
22+
23+
export default data;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Clickable',
5+
description:
6+
'The `s-clickable` component is an escape hatch for when `s-button` and `s-link` are not sufficient to create an interactive element.',
7+
category: 'Polaris web components',
8+
subCategory: 'Actions',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'Button',
13+
url: 'button',
14+
},
15+
{
16+
type: 'component',
17+
name: 'Link',
18+
url: 'link',
19+
},
20+
],
21+
};
22+
23+
export default data;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'DatePicker',
5+
description:
6+
'Use a date picker to allow merchants to select a date or a date range.',
7+
category: 'Polaris web components',
8+
subCategory: 'Forms',
9+
related: [],
10+
};
11+
12+
export default data;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Divider',
5+
description:
6+
'Use `s-divider` to create a clear visual separation between different elements in your user interface.',
7+
category: 'Polaris web components',
8+
subCategory: 'Structure',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'Section',
13+
url: 'section',
14+
},
15+
{
16+
type: 'component',
17+
name: 'Stack',
18+
url: 'stack',
19+
},
20+
],
21+
};
22+
23+
export default data;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'EmailField',
5+
description:
6+
'Use `s-email-field` to allow merchants to input email addresses. This component provides built-in email validation and appropriate keyboard settings.',
7+
category: 'Polaris web components',
8+
subCategory: 'Forms',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'TextField',
13+
url: 'textfield',
14+
},
15+
{
16+
type: 'component',
17+
name: 'TextArea',
18+
url: 'textarea',
19+
},
20+
],
21+
};
22+
23+
export default data;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Grid',
5+
description:
6+
'Use `s-grid` to organize your content in a matrix of rows and columns and make responsive layouts for pages. Grid follows the same pattern as the [CSS grid layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout).',
7+
category: 'Polaris web components',
8+
subCategory: 'Structure',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'Box',
13+
url: 'box',
14+
},
15+
{
16+
type: 'component',
17+
name: 'Stack',
18+
url: 'stack',
19+
},
20+
],
21+
};
22+
23+
export default data;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'MoneyField',
5+
description:
6+
'Use `s-money-field` when you need to collect monetary values from merchants. It provides appropriate formatting and validation for currency amounts.',
7+
category: 'Polaris web components',
8+
subCategory: 'Forms',
9+
related: [
10+
{
11+
type: 'component',
12+
name: 'NumberField',
13+
url: 'numberfield',
14+
},
15+
{
16+
type: 'component',
17+
name: 'TextField',
18+
url: 'textfield',
19+
},
20+
],
21+
};
22+
23+
export default data;

0 commit comments

Comments
 (0)