Skip to content

Commit

Permalink
Upgrade react and migrate the code
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio committed Dec 10, 2024
1 parent f163327 commit 1e9c507
Show file tree
Hide file tree
Showing 176 changed files with 138 additions and 273 deletions.
4 changes: 2 additions & 2 deletions packages/adapters/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
},
"devDependencies": {
"@public-ui/components": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"typescript": "5.6.3",
"unbuild": "1.2.1"
},
Expand Down
1 change: 0 additions & 1 deletion packages/adapters/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ register(DEFAULT, defineCustomElements)
Then, you can import any component from `@public-ui/react` and render it within React components:

```tsx
import React from 'react';
import type { FC } from 'react';
import { KolButton } from '@public-ui/react';

Expand Down
4 changes: 2 additions & 2 deletions packages/adapters/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"@types/normalize-package-data": "2.4.4",
"@types/react": "18.3.4",
"@types/react-dom": "18.3.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"typescript": "5.6.3",
"unbuild": "1.2.1"
},
Expand Down
1 change: 0 additions & 1 deletion packages/designer/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

<link rel="shortcut icon" type="image/x-icon" href="assets/kolibri.ico" />
<link rel="stylesheet" href="assets/bundes/style.css" />
<link rel="stylesheet" href="assets/codicons/codicon.css" />
<link rel="stylesheet" href="assets/fontawesome-free/css/all.min.css" />
<link rel="stylesheet" href="assets/icofont/icofont.min.css" />
Expand Down
4 changes: 2 additions & 2 deletions packages/samples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"npm-run-all": "4.1.5",
"postcss-loader": "8.1.1",
"prettier": "3.4.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-number-format": "5.4.2",
"react-router": "6.28.0",
"react-router-dom": "6.28.0",
Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<meta name="description" content="Webapp demonstrating KolBri-components with React." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" type="image/x-icon" href="assets/kolibri.ico" />
<link rel="stylesheet" href="assets/bundes/style.css" />
<link rel="stylesheet" href="assets/codicons/codicon.css" />
<link rel="stylesheet" href="assets/fontawesome-free/css/all.min.css" />
<link rel="stylesheet" href="assets/icofont/icofont.min.css" />
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { useLocation } from 'react-router';
import { Navigate, Route, Routes, useSearchParams } from 'react-router-dom';

Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/src/components/BackPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { KolAlert, KolButton } from '@public-ui/react';
import React from 'react';

import type { FC } from 'react';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/FormWrap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButton, KolForm } from '@public-ui/react';

export const FormWrap = <P,>({ RefComponent: Component, ...props }: { RefComponent: any } & Partial<P>) => {
Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from 'react';
import { KolAccordion, KolTree, KolTreeItem } from '@public-ui/react';
import { useMobile } from '../hooks/useMobile';
import type { Routes, Route } from '../shares/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC, PropsWithChildren } from 'react';
import React, { useContext, useMemo } from 'react';
import { useContext, useMemo } from 'react';

import { PUBLIC_CODE_COMPONENT_URL, PUBLIC_DOC_COMPONENT_URL } from '../shares/constants';

Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { KolButton, KolHeading, KolSelect, KolVersion } from '@public-ui/react';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/abbr/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolAbbr } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/accordion/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolAccordion } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { KolAccordion } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';
Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/src/components/alert/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { KolAlert } from '@public-ui/react';
import type { FC } from 'react';
import type { AlertType, AlertVariant, HeadingLevel } from '@public-ui/components';
Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/src/components/alert/card-msg.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { AlertVariants } from './basic';
import { SampleDescription } from '../SampleDescription';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/alert/html.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolAlert, KolHeading } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';
import type { FC } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/avatar/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { KolAvatar } from '@public-ui/react';
import React from 'react';

import type { FC } from 'react';
import { SampleDescription } from '../SampleDescription';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/badge/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolBadge } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';

Expand Down
1 change: 0 additions & 1 deletion packages/samples/react/src/components/badge/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { KolBadge } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/breadcrumb/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolBreadcrumb } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button-group/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolBadge, KolButton, KolButtonGroup } from '@public-ui/react';
import { SampleDescription } from '../SampleDescription';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { KolButtonLink } from '@public-ui/react';
import React from 'react';

import type { FC } from 'react';
import { SampleDescription } from '../SampleDescription';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button-link/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButtonLink } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button-link/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButtonLink } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button-link/image.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButtonLink } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { KolButton, KolLink } from '@public-ui/react';
import React from 'react';

import type { FC } from 'react';
import { SampleDescription } from '../SampleDescription';
import { useToasterService } from '../../hooks/useToasterService';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { KolButton } from '@public-ui/react';
import React from 'react';

import type { FC } from 'react';
import { SampleDescription } from '../SampleDescription';
import { useToasterService } from '../../hooks/useToasterService';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button/baselined.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButton } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/button/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { ButtonVariants } from './partials/variants';
import { SampleDescription } from '../SampleDescription';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { ButtonVariants } from './partials/variants';
import { SampleDescription } from '../SampleDescription';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button/icons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButton } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as React from 'react';

import { KolButton } from '@public-ui/react';
import { useToasterService } from '../../../hooks/useToasterService';
import type { ButtonSampleProps } from './type';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { ButtonCases } from './cases';
import { KolHeading } from '@public-ui/react';
import type { ButtonSampleProps } from './type';
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/button/short-key.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { KolButton } from '@public-ui/react';
import React from 'react';

import type { FC } from 'react';
import { SampleDescription } from '../SampleDescription';
import { useToasterService } from '../../hooks/useToasterService';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/button/width.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolButton } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/card/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolCard } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/combobox/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';
import { useContext } from 'react';
import React from 'react';

import { FormWrap } from '../FormWrap';
import { ComboboxVariants } from './partials/variants';
import { SampleDescription } from '../SampleDescription';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolCombobox } from '@public-ui/react';

import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { Components } from '@public-ui/components';

import { ComboboxCases } from './cases';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/details/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolDetails } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/drawer/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React, { useRef, useState, useContext, useEffect } from 'react';
import { useRef, useState, useContext, useEffect } from 'react';
import { useSearchParams } from 'react-router-dom';

import { HideMenusContext } from '../../shares/HideMenusContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React, { useState, useContext } from 'react';
import { useState, useContext } from 'react';
import { useSearchParams } from 'react-router-dom';

import { HideMenusContext } from '../../shares/HideMenusContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { KolInputRadio } from '@public-ui/react';

Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/form/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { SampleDescription } from '../SampleDescription';
import { KolForm, KolInputText } from '@public-ui/react';

Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/form/error-list.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { SampleDescription } from '../SampleDescription';
import { KolForm, KolInputText } from '@public-ui/react';

Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/handout/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ButtonProps, KoliBriTableHeaders } from '@public-ui/components';
import type { FC } from 'react';
import React from 'react';

import {
KolAbbr,
KolAccordion,
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/heading/badged.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolBadge, KolHeading } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/heading/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolHeading } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/heading/paragraph.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolHeading } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/icon/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolIcon } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/react/src/components/image/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { SampleDescription } from '../SampleDescription';
import { KolImage } from '@public-ui/react';

Expand Down
2 changes: 0 additions & 2 deletions packages/samples/react/src/components/indented-text/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { KolBadge, KolIndentedText } from '@public-ui/react';

import type { FC } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { FormWrap } from '../FormWrap';
import { InputCheckboxVariants } from './partials/variants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { FormWrap } from '../FormWrap';
import { SampleDescription } from '../SampleDescription';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { forwardRef } from 'react';
import { forwardRef } from 'react';

import { KolInputCheckbox } from '@public-ui/react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { forwardRef } from 'react';
import { forwardRef } from 'react';

import { InputCheckboxCases } from './cases';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FC } from 'react';
import React from 'react';

import { SampleDescription } from '../SampleDescription';
import { InputCheckboxVariants } from './partials/variants';
import { FormWrap } from '../FormWrap';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FC } from 'react';
import React from 'react';

import { FormWrap } from '../FormWrap';
import { InputColorVariants } from './partials/variants';
Expand Down
Loading

0 comments on commit 1e9c507

Please sign in to comment.