Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Philibeaux <aphilibeaux@scaleway.com>
  • Loading branch information
philibea committed Dec 16, 2024
1 parent 6e17823 commit a746f6b
Show file tree
Hide file tree
Showing 63 changed files with 993 additions and 581 deletions.
11 changes: 1 addition & 10 deletions examples/next-advanced/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,13 @@ const nextConfig = () => {
},
poweredByHeader: false,
reactStrictMode: true,
swcMinify: true,
compiler: {
emotion: true,
},
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
esmExternals: 'loose', // See https://github.com/Hacker0x01/react-datepicker/issues/3834
},
transpilePackages: [
'@ultraviolet/ui',
'@ultraviolet/form',
'@ultraviolet/icons',
'react-syntax-highlighter',
],
transpilePackages: ['react-syntax-highlighter'],
}

return config
Expand Down
9 changes: 0 additions & 9 deletions examples/next-login/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,12 @@ const nextConfig = () => {
},
poweredByHeader: false,
reactStrictMode: true,
swcMinify: true,
compiler: {
emotion: true,
},
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
esmExternals: 'loose', // See https://github.com/Hacker0x01/react-datepicker/issues/3834
},
transpilePackages: [
'@ultraviolet/ui',
'@ultraviolet/form',
'@ultraviolet/icons',
],
}
return config
}
Expand Down
3 changes: 2 additions & 1 deletion examples/next-login/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dependencies": {
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.0",
"@ultraviolet/fonts": "workspace:*",
"@ultraviolet/form": "workspace:*",
"@ultraviolet/icons": "workspace:*",
"@ultraviolet/ui": "workspace:*",
Expand All @@ -31,7 +32,7 @@
"devDependencies": {
"@babel/core": "7.26.0",
"@types/node": "22.10.2",
"@types/react":"19.0.0",
"@types/react": "19.0.0",
"@types/react-syntax-highlighter": "15.5.13",
"next-transpile-modules": "10.0.1"
}
Expand Down
9 changes: 0 additions & 9 deletions examples/next-simple/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,12 @@ const nextConfig = () => {
},
poweredByHeader: false,
reactStrictMode: true,
swcMinify: true,
compiler: {
emotion: true,
},
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
esmExternals: 'loose', // See https://github.com/Hacker0x01/react-datepicker/issues/3834
},
transpilePackages: [
'@ultraviolet/ui',
'@ultraviolet/form',
'@ultraviolet/icons',
],
}

return config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ exports[`CheckboxField > should render correctly 1`] = `
id=":r0:"
name="test"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down Expand Up @@ -633,7 +632,6 @@ exports[`CheckboxField > should render correctly checked without value 1`] = `
id=":r6:"
name="checked"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down Expand Up @@ -971,7 +969,6 @@ exports[`CheckboxField > should render correctly disabled 1`] = `
id=":r4:"
name="test"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down Expand Up @@ -1308,7 +1305,6 @@ exports[`CheckboxField > should render correctly not checked without value 1`] =
id=":r8:"
name="checked"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down Expand Up @@ -1646,7 +1642,6 @@ exports[`CheckboxField > should render correctly with aria-label 1`] = `
id=":r2:"
name="test"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down Expand Up @@ -2011,7 +2006,6 @@ exports[`CheckboxField > should render correctly with errors 1`] = `
id=":rd:"
name="test"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down Expand Up @@ -2377,7 +2371,6 @@ exports[`CheckboxField > should trigger events correctly 1`] = `
id=":ra:"
name="test"
type="checkbox"
value=""
/>
<svg
class="emotion-4 emotion-5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { StoryFn } from '@storybook/react'
import { Stack } from '@ultraviolet/ui'
import type { ComponentProps } from 'react'
import { CheckboxGroupField } from '..'
import { useFormContext } from '../../..'

export const DirectionStory: StoryFn<typeof CheckboxGroupField> = args => {
const DirectionTemplate = (args: ComponentProps<typeof CheckboxGroupField>) => {
const { watch } = useFormContext()

return (
Expand All @@ -27,7 +28,7 @@ export const DirectionStory: StoryFn<typeof CheckboxGroupField> = args => {
}

export const Direction: StoryFn<typeof CheckboxGroupField> = args => (
<DirectionStory {...args} />
<DirectionTemplate {...args} />
)

Direction.parameters = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { StoryFn } from '@storybook/react'
import { Stack } from '@ultraviolet/ui'
import type { ComponentProps } from 'react'
import { CheckboxGroupField } from '..'
import { Submit } from '../..'

export const NotRequiredStory: StoryFn<typeof CheckboxGroupField> = args => (
export const NotRequiredTemplate = (
args: ComponentProps<typeof CheckboxGroupField>,
) => (
<Stack gap={1}>
<CheckboxGroupField {...args}>
<CheckboxGroupField.Checkbox
Expand All @@ -24,7 +27,7 @@ export const NotRequiredStory: StoryFn<typeof CheckboxGroupField> = args => (
)

export const NotRequired: StoryFn<typeof CheckboxGroupField> = args => (
<NotRequiredStory {...args} />
<NotRequiredTemplate {...args} />
)

NotRequired.parameters = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { StoryFn } from '@storybook/react'
import { Stack } from '@ultraviolet/ui'
import type { ComponentProps } from 'react'
import { CheckboxGroupField } from '..'
import { Submit } from '../..'

export const PartiallyRequiredStory: StoryFn<
typeof CheckboxGroupField
> = args => (
const PartiallyRequiredStory = (
args: ComponentProps<typeof CheckboxGroupField>,
) => (
<Stack gap={1}>
<CheckboxGroupField {...args}>
<CheckboxGroupField.Checkbox
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { StoryFn } from '@storybook/react'
import { Stack } from '@ultraviolet/ui'
import type { ComponentProps } from 'react'
import { CheckboxGroupField } from '..'
import { Submit } from '../..'

export const RequiredStory: StoryFn<typeof CheckboxGroupField> = args => (
export const RequiredTemplate = (
args: ComponentProps<typeof CheckboxGroupField>,
) => (
<Stack gap={1}>
<CheckboxGroupField {...args}>
<CheckboxGroupField.Checkbox
Expand All @@ -21,7 +24,7 @@ export const RequiredStory: StoryFn<typeof CheckboxGroupField> = args => (
)

export const Required: StoryFn<typeof CheckboxGroupField> = args => (
<RequiredStory {...args} />
<RequiredTemplate {...args} />
)

Required.parameters = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import type { StoryFn } from '@storybook/react'
import { Stack } from '@ultraviolet/ui'
import type { ComponentProps } from 'react'
import { CheckboxGroupField } from '..'

const CheckboxGroupFieldStory: StoryFn<typeof CheckboxGroupField> = args => (
const CheckboxGroupTemplate = (
args: ComponentProps<typeof CheckboxGroupField>,
) => (
<Stack gap={2}>
<CheckboxGroupField {...args}>
<CheckboxGroupField.Checkbox
Expand All @@ -19,7 +22,7 @@ const CheckboxGroupFieldStory: StoryFn<typeof CheckboxGroupField> = args => (
)

export const Template: StoryFn<typeof CheckboxGroupField> = args => (
<CheckboxGroupFieldStory {...args} />
<CheckboxGroupTemplate {...args} />
)

Template.args = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ exports[`DateField > should render correctly 1`] = `
id=":r1:"
name="test"
type="text"
value=""
/>
<div
class="emotion-10 emotion-11"
Expand Down Expand Up @@ -446,7 +445,6 @@ exports[`DateField > should render correctly disabled 1`] = `
id=":r4:"
name="test"
type="text"
value=""
/>
<div
class="emotion-10 emotion-11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ exports[`NumberInputFieldV2 > should render correctly 1`] = `
name="test"
placeholder=""
type="number"
value=""
/>
</div>
<div
Expand Down Expand Up @@ -737,7 +736,6 @@ exports[`NumberInputFieldV2 > should render correctly disabled 1`] = `
name="test"
placeholder=""
type="number"
value=""
/>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { StoryFn } from '@storybook/react'
import { Stack } from '@ultraviolet/ui'
import type { ComponentProps } from 'react'
import { RadioGroupField } from '..'
import { Submit } from '../..'

export const RequiredStory: StoryFn<typeof RadioGroupField> = args => (
const RequiredTemplate = (args: ComponentProps<typeof RadioGroupField>) => (
<Stack gap={1}>
<RadioGroupField {...args}>
<RadioGroupField.Radio value="radio-1" label="Radio 1" />
Expand All @@ -14,7 +15,7 @@ export const RequiredStory: StoryFn<typeof RadioGroupField> = args => (
)

export const Required: StoryFn<typeof RadioGroupField> = args => (
<RequiredStory {...args} />
<RequiredTemplate {...args} />
)

Required.args = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SelectInputField } from '..'
export const Template: StoryFn<
StoryFn<ComponentProps<typeof SelectInputField>>
> = args => (
<SelectInputField {...args}>
<SelectInputField name="replace-me" {...args}>
<SelectInputField.Option value="a">Option A</SelectInputField.Option>
<SelectInputField.Option value="b">Option B</SelectInputField.Option>
</SelectInputField>
Expand Down
Loading

0 comments on commit a746f6b

Please sign in to comment.