Skip to content

Commit

Permalink
Updated: Steps component updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arifulislam5577 committed Oct 15, 2024
1 parent 29348ec commit cc3af00
Show file tree
Hide file tree
Showing 22 changed files with 534 additions and 403 deletions.
60 changes: 43 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.

### v1.0.1

We are thrilled to announce the initial release of Keep React, our open-source component library built on React and Tailwind CSS. This release marks the beginning of our journey in providing a collection of pre-designed UI components to simplify web application development.
We are thrilled to announce the initial release of Keep React, our open-source component library built on React and Tailwind CSS. This release marks the beginning of our journey in providing a collection of pre-designed UI components to simplify web application development.

### Key Features

Expand All @@ -16,23 +16,49 @@ All notable changes to this project will be documented in this file.

### v1.0.2 (2023-11-17)

- Fixed Typography Error
- Update Documentation
- Add className Props in every component
- customClass props removed with className props
- Fixed Typography Error
- Update Documentation
- Add className Props in every component
- customClass props removed with className props

### v1.1.0 (2023-12-18)
### v1.1.0 (2023-12-18)

#### Features
- Alert component props and structure changed
- Accordion component props and structure changed
- Notification component props and structure changed
- Popover component props and structure changed
- Added Modal and Notification component open animation
- Added Typography component
- CSS Import Style changed
- Keep Preset import styles changed
#### Features

- Alert component props and structure changed
- Accordion component props and structure changed
- Notification component props and structure changed
- Popover component props and structure changed
- Added Modal and Notification component open animation
- Added Typography component
- CSS Import Style changed
- Keep Preset import styles changed

#### Bug fixes
- Date Picker Type Issue
- Popover width Issue

- Date Picker Type Issue
- Popover width Issue

### v1.6.0 (2024-10-13)

#### Features

- Accordion component restructure
- Alert color update
- Avatar component restructure
- Badge padding update
- Breadcrumb component restructure
- Carousel bug fixed
- Charts new example added
- Checkbox new variant
- Drawer component package changed
- Input OTP component added
- Modal Animation changed
- Notification Animation changed
- Popover component package changed
- Select component added
- Slider component color updated
- Spinner component remove extra color variant
- Tabs component package changed
- Tooltip component package changed
- Toast component configure updated
4 changes: 3 additions & 1 deletion app/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ const Header = () => {
</span>
)}
</button>
<Link href="/docs/getting-started/introduction" className={cn(buttonVariants({ color: 'secondary' }))}>
<Link
href="/docs/getting-started/introduction"
className={cn(buttonVariants({ color: 'secondary' }), 'hidden sm:block')}>
get started
</Link>
<Drawer showCloseIcon={false} onOpenChange={setActive} open={active}>
Expand Down
9 changes: 9 additions & 0 deletions app/docs/components/datePicker/DatePicker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DefaultDatePicker, DefaultDatePickerCode } from './variant/DefaultDateP
import { MultipleDatePicker, MultipleDatePickerCode } from './variant/MultipleDatePicker'
import { DateRangePicker, DateRangePickerCode } from './variant/DateRangePicker'
import { DateRangePicker2, DateRangePicker2Code } from './variant/DateRangePickerWithTwoMonth'
import { CircleDatePicker, CircleDatePickerCode } from './variant/CircleDatePicker'

import CodeHighlightPreview from '../../../components/CodeHighlightPreview'

Expand All @@ -17,6 +18,14 @@ The Default Date Picker component provides a simple interface for selecting a si
<DefaultDatePicker />
</CodeHighlightPreview>

## Circle day shape

We can change day picker day shape by using dayShape props using `"circle"` and `'rounded'`. By default it will be `'rounded'`.

<CodeHighlightPreview code={CircleDatePickerCode}>
<CircleDatePicker />
</CodeHighlightPreview>

## Multiple Date Picker

The Multiple Date Picker allows users to view and select dates from multiple months. You can customize the number of months displayed using the `numberOfMonths` prop.
Expand Down
82 changes: 82 additions & 0 deletions app/docs/components/datePicker/variant/CircleDatePicker.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
'use client'
import { format } from 'date-fns'
import { Calendar } from 'phosphor-react'
import { useState } from 'react'
import { Button, DatePicker, Popover, PopoverAction, PopoverContent } from '../../../../src'

const CircleDatePicker = () => {
const [date, setDate] = useState<Date>()
return (
<Popover>
<PopoverAction asChild>
<Button
color="secondary"
size="lg"
className="w-[280px] justify-start gap-2.5 border border-metal-100 text-body-4"
variant="outline">
<Calendar size={20} className="text-metal-400 dark:text-white" />
{date ? format(date ?? new Date(), 'PPP') : <span>Select Your Date</span>}
</Button>
</PopoverAction>
<PopoverContent align="start" className="max-w-min border-0">
<DatePicker dayShape="circle" mode="single" selected={date} onSelect={setDate} showOutsideDays={true} />
</PopoverContent>
</Popover>
)
}

const CircleDatePickerCode = {
'DatePickerComponent.jsx': `
'use client'
import { format } from 'date-fns'
import { useState } from 'react'
import { Calendar } from 'phosphor-react'
import { Button, DatePicker, Popover, PopoverContent, PopoverAction } from 'keep-react'
export const DatePickerComponent = () => {
const [date, setDate] = useState(null)
return (
<Popover>
<PopoverAction asChild>
<Button color="secondary" size="lg" className="w-[286px] justify-start gap-2 border border-metal-100" variant="outline">
<Calendar size={20} className="text-metal-400 dark:text-white" />
{date ? format(date ?? new Date(), 'PPP') : <span>Select Your Date</span>}
</Button>
</PopoverAction>
<PopoverContent align="start" className="max-w-min border-0">
<DatePicker dayShape="circle" mode="single" selected={date} onSelect={setDate} showOutsideDays={true} />
</PopoverContent>
</Popover>
)
}
`,
'DatePickerComponent.tsx': `
'use client'
import { useState } from 'react'
import { format } from 'date-fns'
import { Calendar } from 'phosphor-react'
import { Button, DatePicker, Popover, PopoverAction, PopoverContent } from 'keep-react'
export const DatePickerComponent = () => {
const [date, setDate] = useState<Date>()
return (
<Popover>
<PopoverAction asChild>
<Button
color="secondary"
size="lg"
className="w-[286px] justify-start gap-2.5 border border-metal-100 text-body-4"
variant="outline">
<Calendar size={20} className="text-metal-400 dark:text-white" />
{date ? format(date ?? new Date(), 'PPP') : <span>Select Your Date</span>}
</Button>
</PopoverAction>
<PopoverContent align="start" className="max-w-min border-0">
<DatePicker mode="single" selected={date} onSelect={setDate} showOutsideDays={true} />
</PopoverContent>
</Popover>
)
}
`,
}
export { CircleDatePicker, CircleDatePickerCode }
39 changes: 16 additions & 23 deletions app/docs/components/steps/Step.mdx
Original file line number Diff line number Diff line change
@@ -1,48 +1,41 @@
import { DefaultStep, DefaultStepCode } from './variant/DefaultStep'
import { DefaultSteps, DefaultStepsCode } from './variant/DefaultSteps'
import { StepWithIcon, StepWithIconCode } from './variant/StepWithIcon'
import { StepWithBorder, StepWithBorderCode } from './variant/StepWithBorder'

import { StepPointAPI, StepLineAPI } from './StepApi'
import { StepsWithNumber, StepsWithNumberCode } from './variant/StepsWithNumber'
import { StepPointAPI } from './StepApi'
import CodeHighlightPreview from '../../../components/CodeHighlightPreview'

import ComponentApi from '../../../components/ComponentApi'

## Table of Contents

The Steps Component is a user interface element used to guide users through a multi-step process or workflow. It presents a visual representation of the various stages or steps a user needs to complete in sequential order.
The Steps Component is a UI element that guides users through a multi-step process or workflow. It visually represents the different stages a user needs to complete in sequence.

## Default Step
## Default Steps

The Default Step refers to the fundamental and default configuration of a Steps Component within a user interface. It provides a clear visual representation of each step in a multi-step process.
The Default Steps configuration showcases the basic setup of the Steps Component within the UI.

<CodeHighlightPreview github="Steps" code={DefaultStepCode}>
<DefaultStep />
<CodeHighlightPreview github="Steps" code={DefaultStepsCode}>
<DefaultSteps />
</CodeHighlightPreview>

## Step With Border
## Steps Number Point

The `border` variant of the Step Point adds a border around the step indicator, making it more prominent and visually distinct.
You can display numbers as step indicators by passing them as children to the `<StepsPoint>` component.

<CodeHighlightPreview github="Steps" code={StepWithBorderCode}>
<StepWithBorder />
<CodeHighlightPreview github="Steps" code={StepsWithNumberCode}>
<StepsWithNumber />
</CodeHighlightPreview>

## Step With Icon
## Steps With Icon

The `icon` variant of the Step Point includes an icon within the step indicator, providing an additional visual cue.
To use icons as step indicators, pass the desired icon as children to the `<StepsPoint>` component.

<CodeHighlightPreview github="Steps" code={StepWithIconCode}>
<StepWithIcon />
</CodeHighlightPreview>

## Step Point API Reference
## Steps Point API Reference

Explore the available props for the `<StepPoint/>` component
Below are the available props for the `<StepsPoint>` component:

<ComponentApi data={StepPointAPI} />

## Step Line API Reference

Explore the available props for the `<StepLine/>` component

<ComponentApi data={StepLineAPI} />
30 changes: 17 additions & 13 deletions app/docs/components/steps/StepApi.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
export const StepPointAPI = [
{
id: 1,
propsName: 'completed',
propsName: 'isComplete',
propsType: 'boolean',
propsDescription: 'Indicates if the step is completed.',
default: 'false',
},
{
id: 2,
propsName: 'variant',
propsType: ['default', 'border', 'icon'],
propsDescription: 'Variant of the step point.',
default: 'default',
propsName: 'className',
propsType: 'string',
propsDescription: 'The className of the step point.',
default: '',
},
]

export const StepLineAPI = [
{
id: 1,
propsName: 'completed',
propsType: 'boolean',
propsDescription: 'Indicates if the step line is completed.',
default: 'false',
id: 3,
propsName: 'rootClassName',
propsType: 'string',
propsDescription: 'The className of the step container.',
default: '',
},
{
id: 4,
propsName: 'lineClassName',
propsType: 'string',
propsDescription: 'The className of the step line.',
default: '',
},
]
Loading

0 comments on commit cc3af00

Please sign in to comment.