Skip to content

Commit c07f0d2

Browse files
authored
Revert "Refactor to define a single wrap method (#91)"
This reverts commit 8e93bcc.
1 parent 10d58cb commit c07f0d2

File tree

46 files changed

+283
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+283
-142
lines changed

packages/lab-example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"license": "BSD-3-Clause",
1616
"author": {
17-
"name": "Jupyter Developer Team"
17+
"name": "Jupyter Developer Team",
18+
"email": ""
1819
},
1920
"files": [
2021
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",

packages/react-components/src/accordion-item/index.ts renamed to packages/react-components/src/accordion-item/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpAccordionItem } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpAccordionItem
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const AccordionItem: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/accordion/index.ts renamed to packages/react-components/src/accordion/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpAccordion } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpAccordion
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const Accordion: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/anchor/index.ts renamed to packages/react-components/src/anchor/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpAnchor } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpAnchor } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Anchor: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/anchored-region/index.ts renamed to packages/react-components/src/anchored-region/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpAnchoredRegion } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpAnchoredRegion
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const AnchoredRegion: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/avatar/index.ts renamed to packages/react-components/src/avatar/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpAvatar } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpAvatar } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Avatar: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/badge/index.ts renamed to packages/react-components/src/badge/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpBadge } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpBadge } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Badge: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/breadcrumb-item/index.ts renamed to packages/react-components/src/breadcrumb-item/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpBreadcrumbItem } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpBreadcrumbItem
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const BreadcrumbItem: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/breadcrumb/index.ts renamed to packages/react-components/src/breadcrumb/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpBreadcrumb } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpBreadcrumb
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const Breadcrumb: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/button/index.ts renamed to packages/react-components/src/button/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpButton } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpButton } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Button: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/card/index.ts renamed to packages/react-components/src/card/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpCard } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpCard } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Card: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement>,

packages/react-components/src/checkbox/index.ts renamed to packages/react-components/src/checkbox/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpCheckbox } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpCheckbox
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const Checkbox: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/combobox/index.ts renamed to packages/react-components/src/combobox/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpCombobox } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpCombobox
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const Combobox: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/data-grid/index.ts renamed to packages/react-components/src/data-grid/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
// Distributed under the terms of the Modified BSD License.
33

44
import {
5+
provideJupyterDesignSystem,
56
jpDataGrid,
67
jpDataGridCell,
78
jpDataGridRow
89
} from '@jupyter/web-components';
9-
import type React from 'react';
10-
import { wrap } from '../wrap';
10+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
11+
import React from 'react';
12+
13+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
1114

1215
// WARNING The wrapping needs to be called in order (from bottom to top DOM elements)
1316
// Otherwise during the wrapping the tag for sub elements won't be resolved and this

packages/react-components/src/date-field/index.ts renamed to packages/react-components/src/date-field/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpDateField } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpDateField
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const DateField: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/design-system-provider/index.ts renamed to packages/react-components/src/design-system-provider/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpDesignSystemProvider } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpDesignSystemProvider
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const DesignSystemProvider: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/dialog/index.ts renamed to packages/react-components/src/dialog/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpDialog } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpDialog } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Dialog: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/disclosure/index.ts renamed to packages/react-components/src/disclosure/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpDisclosure } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpDisclosure
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const Disclosure: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/divider/index.ts renamed to packages/react-components/src/divider/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpDivider } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpDivider } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Divider: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/drafts/picker/index.ts renamed to packages/react-components/src/drafts/picker/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpPicker } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../../wrap';
4+
import { provideJupyterDesignSystem, jpPicker } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
/**
911
* @alpha

packages/react-components/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
export * from './wrap';
5-
64
export * from './accordion';
75
export * from './accordion-item';
86
export * from './anchor';

packages/react-components/src/listbox/index.ts renamed to packages/react-components/src/listbox/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpListbox } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpListbox } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Listbox: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/menu-item/index.ts renamed to packages/react-components/src/menu-item/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpMenuItem } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import {
5+
provideJupyterDesignSystem,
6+
jpMenuItem
7+
} from '@jupyter/web-components';
8+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
9+
import React from 'react';
10+
11+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
712

813
export const MenuItem: React.DetailedHTMLFactory<
914
React.HTMLAttributes<HTMLElement> & {

packages/react-components/src/menu/index.ts renamed to packages/react-components/src/menu/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// Copyright (c) Jupyter Development Team.
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { jpMenu } from '@jupyter/web-components';
5-
import type React from 'react';
6-
import { wrap } from '../wrap';
4+
import { provideJupyterDesignSystem, jpMenu } from '@jupyter/web-components';
5+
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
6+
import React from 'react';
7+
8+
const { wrap } = provideReactWrapper(React, provideJupyterDesignSystem());
79

810
export const Menu: React.DetailedHTMLFactory<
911
React.HTMLAttributes<HTMLElement>,

0 commit comments

Comments
 (0)