diff --git a/packages/go-ui-storybook/src/stories/BlockLoading.tsx b/packages/go-ui-storybook/src/stories/BlockLoading.tsx index 5b3661ab28..e68232c213 100644 --- a/packages/go-ui-storybook/src/stories/BlockLoading.tsx +++ b/packages/go-ui-storybook/src/stories/BlockLoading.tsx @@ -3,10 +3,10 @@ import { BlockLoadingProps, } from '@ifrc-go/ui'; -function Blockloading(props: BlockLoadingProps) { +function BlockLoading(props: BlockLoadingProps) { return ( // eslint-disable-next-line react/jsx-props-no-spreading ); } -export default Blockloading; +export default BlockLoading; diff --git a/packages/go-ui-storybook/src/stories/Container.stories.tsx b/packages/go-ui-storybook/src/stories/Container.stories.tsx index dba0879516..daaed68ca1 100644 --- a/packages/go-ui-storybook/src/stories/Container.stories.tsx +++ b/packages/go-ui-storybook/src/stories/Container.stories.tsx @@ -95,7 +95,6 @@ export const WithGridViewAndPadding: Story = { contentViewType: 'grid', spacing: 'default', numPreferredGridContentColumns: 2, - withGridViewInFilter: true, }, }; @@ -109,7 +108,7 @@ export const ContainerElementRef: Story = { }, }; -export const WithHeadinglevel: Story = { +export const WithHeadingLevel: Story = { args: { heading: 'Container Heading', headerDescription: 'This is a description for the header', @@ -148,7 +147,7 @@ export const NumPreferredGridContentColumns: Story = { numPreferredGridContentColumns: 2, }, }; -export const Withspacing: Story = { +export const WithSpacing: Story = { args: { heading: 'Container Heading', headerDescription: 'This is a description for the header', @@ -158,7 +157,6 @@ export const Withspacing: Story = { contentViewType: 'default', spacing: 'none', numPreferredGridContentColumns: 2, - withGridViewInFilter: true, }, }; @@ -172,7 +170,6 @@ export const WithGridViewInFilter: Story = { contentViewType: 'default', spacing: 'default', numPreferredGridContentColumns: 2, - withGridViewInFilter: true, }, }; diff --git a/packages/go-ui-storybook/src/stories/RadioInput.stories.tsx b/packages/go-ui-storybook/src/stories/RadioInput.stories.tsx index e5bcc9ce34..3defa882b0 100644 --- a/packages/go-ui-storybook/src/stories/RadioInput.stories.tsx +++ b/packages/go-ui-storybook/src/stories/RadioInput.stories.tsx @@ -57,7 +57,7 @@ function Template(args:Args) { ] = useArgs(); // NOTE: We are casting args as props because of discriminated union - // used in RadionInputProps + // used in RadioInputProps const handleChange = (val: string | undefined, name: string) => { setArgs({ value: val }); // eslint-disable-next-line react/destructuring-assignment diff --git a/packages/go-ui-storybook/src/stories/SearchMultiSelectInput.stories.tsx b/packages/go-ui-storybook/src/stories/SearchMultiSelectInput.stories.tsx index 1798d444bf..4b3fcf98e3 100644 --- a/packages/go-ui-storybook/src/stories/SearchMultiSelectInput.stories.tsx +++ b/packages/go-ui-storybook/src/stories/SearchMultiSelectInput.stories.tsx @@ -37,7 +37,7 @@ const options: Option[] = [ }, { key: '4', - label: 'Forecasst Based Action', + label: 'Forecast Based Action', }, ]; const keySelector = (d: Option) => d.key; @@ -106,7 +106,7 @@ function Template(args:Args) { keySelector={keySelector} labelSelector={labelSelector} placeholder="Select an emergency type" - name="searchmultiselectinput" + name="search" /> ); } diff --git a/packages/go-ui-storybook/src/stories/SearchSelectInput.stories.tsx b/packages/go-ui-storybook/src/stories/SearchSelectInput.stories.tsx index 7d8a278f88..a0217ac912 100644 --- a/packages/go-ui-storybook/src/stories/SearchSelectInput.stories.tsx +++ b/packages/go-ui-storybook/src/stories/SearchSelectInput.stories.tsx @@ -109,7 +109,7 @@ function Template(args:Args) { labelSelector={labelSelector} onChange={handleChange} value={value} - name="searchselectinput" + name="search" options={options} onSearchValueChange={handleSearchValueChange} searchOptions={filteredOptions} diff --git a/packages/go-ui-storybook/src/stories/SelectInput.stories.tsx b/packages/go-ui-storybook/src/stories/SelectInput.stories.tsx index 9e4dcbcf88..42344b499c 100644 --- a/packages/go-ui-storybook/src/stories/SelectInput.stories.tsx +++ b/packages/go-ui-storybook/src/stories/SelectInput.stories.tsx @@ -119,7 +119,7 @@ export const Disabled: Story = { }, }; -export const Novalue: Story = { +export const NoValue: Story = { args: { name: 'no-value', options, diff --git a/packages/go-ui-storybook/src/stories/Table.stories.tsx b/packages/go-ui-storybook/src/stories/Table.stories.tsx index 88c7534cf2..c4d47e20c9 100644 --- a/packages/go-ui-storybook/src/stories/Table.stories.tsx +++ b/packages/go-ui-storybook/src/stories/Table.stories.tsx @@ -19,7 +19,7 @@ import Table from './Table'; interface Data { id: number; name: string; - dateofbirth: string; + dateOfBirth: string; link: string; characteristics: string[]; status: string; @@ -31,7 +31,7 @@ const data = [ { id: 1, name: 'African Elephant', - dateofbirth: '2010-05-12', + dateOfBirth: '2010-05-12', link: 'https://en.wikipedia.org/wiki/african_elephant', characteristics: [ 'Large', @@ -45,7 +45,7 @@ const data = [ { id: 2, name: 'Bald Eagle', - dateofbirth: '2012-07-04', + dateOfBirth: '2012-07-04', link: 'https://en.wikipedia.org/wiki/bald_eagle', characteristics: [ 'Large wingspan', @@ -59,7 +59,7 @@ const data = [ { id: 3, name: 'Cheetah', - dateofbirth: '2015-03-22', + dateOfBirth: '2015-03-22', link: 'https://en.wikipedia.org/wiki/cheetah', characteristics: [ 'Fast', @@ -73,7 +73,7 @@ const data = [ { id: 4, name: 'Dolphin', - dateofbirth: '2013-09-18', + dateOfBirth: '2013-09-18', link: 'https://en.wikipedia.org/wiki/dolphin', characteristics: [ 'Intelligent', @@ -87,7 +87,7 @@ const data = [ { id: 5, name: 'Emperor Penguin', - dateofbirth: '2011-12-01', + dateOfBirth: '2011-12-01', link: 'https://en.wikipedia.org/wiki/emperor_penguin', characteristics: [ 'Large', @@ -101,7 +101,7 @@ const data = [ { id: 6, name: 'Fennec Fox', - dateofbirth: '2016-01-10', + dateOfBirth: '2016-01-10', link: 'https://en.wikipedia.org/wiki/fennec_fox', characteristics: [ 'Small', @@ -115,7 +115,7 @@ const data = [ { id: 7, name: 'Giant Panda', - dateofbirth: '2014-08-23', + dateOfBirth: '2014-08-23', link: 'https://en.wikipedia.org/wiki/giant_panda', characteristics: [ 'Black and white', @@ -129,7 +129,7 @@ const data = [ { id: 8, name: 'Great White Shark', - dateofbirth: '2009-06-15', + dateOfBirth: '2009-06-15', link: 'https://en.wikipedia.org/wiki/great_white_shark', characteristics: [ 'Large', @@ -143,11 +143,11 @@ const data = [ { id: 9, name: 'Hummingbird', - dateofbirth: '2018-04-05', + dateOfBirth: '2018-04-05', link: 'https://en.wikipedia.org/wiki/hummingbird', characteristics: [ 'Small', - 'Colorful', + 'Colourful', 'Fast wings', ], status: 'Least Concern', @@ -157,7 +157,7 @@ const data = [ { id: 10, name: 'Indian Tiger', - dateofbirth: '2013-11-11', + dateOfBirth: '2013-11-11', link: 'https://en.wikipedia.org/wiki/indian_tiger', characteristics: [ 'Striped', @@ -183,9 +183,9 @@ const columns = [ (item) => item.name, ), createDateColumn( - 'dateofbirth', + 'dateOfBirth', 'Date of Birth', - (item) => item.dateofbirth, + (item) => item.dateOfBirth, ), createElementColumn( 'link', diff --git a/packages/go-ui-storybook/src/stories/TextInput.stories.tsx b/packages/go-ui-storybook/src/stories/TextInput.stories.tsx index eddd16e745..a4cc23bd9a 100644 --- a/packages/go-ui-storybook/src/stories/TextInput.stories.tsx +++ b/packages/go-ui-storybook/src/stories/TextInput.stories.tsx @@ -47,7 +47,7 @@ function Template(args:Args) { diff --git a/packages/go-ui-storybook/src/stories/Typography.mdx b/packages/go-ui-storybook/src/stories/Typography.mdx index 4350f5ddfc..76ca6a791b 100644 --- a/packages/go-ui-storybook/src/stories/Typography.mdx +++ b/packages/go-ui-storybook/src/stories/Typography.mdx @@ -37,7 +37,7 @@ export const SampleText = 'Night; and once again, the while I wait for you, cold **Font Type:** Sans Serif -**Weights:** 300(light), 400(regular), 500(medium), 600(semibold), 700(blold) +**Weights:** 300(light), 400(regular), 500(medium), 600(semibold), 700(bold) { alerts.filter((alert) => !alert.nonDismissable).forEach((alert) => { - // NOTE: skip if there is alreayd a timeout + // NOTE: skip if there is already a timeout if (dismissTimeout.current[alert.name]) { return; } diff --git a/packages/ui/src/components/DefaultMessage/i18n.json b/packages/ui/src/components/DefaultMessage/i18n.json index a4d73eb201..4e83d50ae6 100644 --- a/packages/ui/src/components/DefaultMessage/i18n.json +++ b/packages/ui/src/components/DefaultMessage/i18n.json @@ -2,7 +2,7 @@ "namespace": "common", "strings": { "messageTitleFetching":"Fetching data...", - "messageTitleFilterdDataNotAvailable":"Data is not available for selected filter!", + "messageTitleFilteredDataNotAvailable":"Data is not available for selected filter!", "messageTitleDataNotAvailable":"Data is not available!", "messageTitleDataFailedToFetch": "Failed to fetch data!" } diff --git a/packages/ui/src/components/DefaultMessage/index.tsx b/packages/ui/src/components/DefaultMessage/index.tsx index 76b07e6835..7a45672738 100644 --- a/packages/ui/src/components/DefaultMessage/index.tsx +++ b/packages/ui/src/components/DefaultMessage/index.tsx @@ -52,7 +52,7 @@ function DefaultMessage(props: Props) { } if (filtered) { - return filteredEmptyMessage ?? strings.messageTitleFilterdDataNotAvailable; + return filteredEmptyMessage ?? strings.messageTitleFilteredDataNotAvailable; } if (empty) { diff --git a/packages/ui/src/components/NumberOutput/index.tsx b/packages/ui/src/components/NumberOutput/index.tsx index 6e419174e1..a4b1d2be4f 100644 --- a/packages/ui/src/components/NumberOutput/index.tsx +++ b/packages/ui/src/components/NumberOutput/index.tsx @@ -21,7 +21,7 @@ export interface Props { */ invalidText?: React.ReactNode; /** - * Normalize numer into Millions(M), Billion(B) + * Normalize number into Millions(M), Billion(B) */ compact?: boolean; /** diff --git a/packages/ui/src/index.tsx b/packages/ui/src/index.tsx index 222a388200..f09e41ec64 100644 --- a/packages/ui/src/index.tsx +++ b/packages/ui/src/index.tsx @@ -19,7 +19,7 @@ export { default as BarChart } from './components/BarChart'; export type { Props as BlockLoadingProps } from './components/BlockLoading'; export { default as BlockLoading } from './components/BlockLoading'; -// NOTE: Ovearlay needs to be exported before +// NOTE: Overlay needs to be exported before // BodyOverlay for styling to work properly // eslint-disable-next-line simple-import-sort/exports export { default as Portal } from './components/Portal'; diff --git a/packages/ui/src/utils/chart.ts b/packages/ui/src/utils/chart.ts index 01716bb43b..acec3c5f9d 100644 --- a/packages/ui/src/utils/chart.ts +++ b/packages/ui/src/utils/chart.ts @@ -436,7 +436,7 @@ export function getEvenDistribution(min: number, max: number, distribution: numb return getEvenlyDistributedExcess(additional); } -export function getEvenlyDistributibleBounds(bounds: Bounds, numBreaks: number): Bounds { +export function getEvenlyDistributableBounds(bounds: Bounds, numBreaks: number): Bounds { const { left, right } = getEvenDistribution( bounds.min, bounds.max, diff --git a/packages/ui/src/utils/common.test.ts b/packages/ui/src/utils/common.test.ts index e3ac644e89..69a00014ee 100644 --- a/packages/ui/src/utils/common.test.ts +++ b/packages/ui/src/utils/common.test.ts @@ -70,7 +70,7 @@ test('Denormalize List', () => { districts: [1, 2, 3], }, { id: 2, - country: 'Afganistan', + country: 'Afghanistan', districts: [1, 2, 3, 4, 5], }]; const expected = [ @@ -91,27 +91,27 @@ test('Denormalize List', () => { }, { id: 2, - country: 'Afganistan', + country: 'Afghanistan', district: 1, }, { id: 2, - country: 'Afganistan', + country: 'Afghanistan', district: 2, }, { id: 2, - country: 'Afganistan', + country: 'Afghanistan', district: 3, }, { id: 2, - country: 'Afganistan', + country: 'Afghanistan', district: 4, }, { id: 2, - country: 'Afganistan', + country: 'Afghanistan', district: 5, }, ];