Skip to content

Commit 2290e20

Browse files
Keep/change component structure (#93)
* Added: Alert Component Re-Structure * Added: Accordion added * Added: Accordion added * Added: Accordion Added * Added: Empty Component Re-structure done * Popover: Change popover structure * Popover * Delete: Popover Delete * Card * Update: cn function updated * Added: Typography component added * Added: Typography documentation added * Added: Notification component restructure done * Fixed: Carousel responsive issue * Added: Modal Animation added * Added: Popover re-structure done * Fixed: Input Focus fixed * Completed: Noted component Re-structure done * Fixed: Fixed Package Issue * Added: Npm package * Fixed: Fix all the issue * Added: Typography search added * Added: Readme installation process update
1 parent a743f81 commit 2290e20

File tree

158 files changed

+7234
-7427
lines changed

Some content is hidden

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

158 files changed

+7234
-7427
lines changed

.storybook/style.css

Lines changed: 311 additions & 286 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,20 @@ All notable changes to this project will be documented in this file.
1919
- Fixed Typography Error
2020
- Update Documentation
2121
- Add className Props in every component
22-
- customClass props removed with className props
22+
- customClass props removed with className props
23+
24+
### v1.1.0 (2023-12-18)
25+
26+
#### Features
27+
- Alert component props and structure changed
28+
- Accordion component props and structure changed
29+
- Notification component props and structure changed
30+
- Popover component props and structure changed
31+
- Added Modal and Notification component open animation
32+
- Added Typography component
33+
- CSS Import Style changed
34+
- Keep Preset import styles changed
35+
36+
#### Bug fixes
37+
- Date Picker Type Issue
38+
- Popover width Issue

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pnpm add keep-react
5353
following code:
5454

5555
```jsx
56-
import keepPreset from "keep-react/src/keep-preset.js";
56+
import keepPreset from "keep-react/preset";
5757
export default {
5858
content: ["node_modules/keep-react/**/*.{js,jsx,ts,tsx}"],
5959
presets: [keepPreset],
@@ -63,7 +63,7 @@ export default {
6363
`Step 4:` Add Tailwind CSS to index.css File:
6464

6565
```css
66-
@import "keep-react/src/main.min.css";
66+
@import "keep-react/css";
6767
@tailwind base;
6868
@tailwind components;
6969
@tailwind utilities;
@@ -107,14 +107,14 @@ following code
107107
```js
108108
module.exports = {
109109
content: ["node_modules/keep-react/**/*.{js,jsx,ts,tsx}"],
110-
presets: [require("keep-react/src/keep-preset.js")],
110+
presets: [require("keep-react/preset")],
111111
};
112112
```
113113

114114
`Step 4:` Add Tailwind CSS to globals.css File:
115115

116116
```css
117-
@import "keep-react/src/main.min.css";
117+
@import "keep-react/css";
118118
@tailwind base;
119119
@tailwind components;
120120
@tailwind utilities;

app/docs/components/accordion/accordion.mdx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { DefaultAccordion, DefaultAccordionCode } from './variant/DefaultAccordion'
2-
import { AccordionCollapseAll, AccordionCollapseAllCode } from './variant/AccordionCollapseAll'
3-
import { AccordionWithLeftSideIcon, AccordionWithLeftSideIconCode } from './variant/AccordionWithLeftSideIcon'
4-
import { AccordionAlwaysOpen, AccordionAlwaysOpenCode } from './variant/AccordionAlwaysOpen'
2+
import { AccordionFlush, AccordionFlushCode } from './variant/AccordionFlush'
3+
import { AccordionOpenPanel, AccordionOpenPanelCode } from './variant/AccordionOpenPanel'
54
import { DisabledAccordionCode, DisabledAccordion } from './variant/DisabledAccordion'
6-
import { AccordionWithCustomIcon, AccordionWithCustomIconCode } from './variant/AccordionWithCustomIcon'
5+
import { AccordionWithIcon, AccordionWithIconCode } from './variant/AccordionWithIcon'
6+
import { CustomizeAccordion, CustomizeAccordionCode } from './variant/CustomizeAccordion'
77
import CodePreview from '~/components/CodePreview'
88
import CssThemePreview from '~/components/CssThemePreview'
99
import ComponentApi from '~/components/ComponentApi'
@@ -15,50 +15,50 @@ The Accordion Component in the Keep React allows you to create collapsible secti
1515

1616
## Default Accordion
1717

18-
The Default Accordion Component allows you to craft collapsible content sections. Users can reveal and hide the content by simply clicking on the disclosure button.
18+
The default Accordion component allows users to reveal and hide content by simply clicking on the disclosure button.
1919

2020
<CodePreview github="Accordion" code={DefaultAccordionCode}>
2121
<DefaultAccordion />
2222
</CodePreview>
2323

24-
## Controlling Collapse Behavior
24+
## Flush Accordion
2525

26-
The `collapseAll` property lets you control the initial state of accordion panels. When set to `true`, all panels are collapsed by default. Users can then expand individual panels as needed.
26+
Control the initial state of accordion panels with the `flush` property.
2727

28-
<CodePreview github="Accordion" code={AccordionCollapseAllCode}>
29-
<AccordionCollapseAll />
28+
<CodePreview github="Accordion" code={AccordionFlushCode}>
29+
<AccordionFlush />
3030
</CodePreview>
3131

32-
## Visual Context with Left-Side Icons
32+
## Accordion First Open Panel
3333

34-
Using the `iconPosition="left"` property in the AccordionPanel, you can position icons on the left side of the panel header. This allows you to offer context or indicate the content within the panel.
34+
Use the `openFirstPanel` property to set the first accordion panel to be open by default.
3535

36-
<CodePreview github="Accordion" code={AccordionWithLeftSideIconCode}>
37-
<AccordionWithLeftSideIcon />
36+
<CodePreview github="Accordion" code={AccordionOpenPanelCode}>
37+
<AccordionOpenPanel />
3838
</CodePreview>
3939

40-
## Customizing Icons
40+
## Accordion With Icon
4141

42-
If you prefer custom icons, you have the freedom to choose your preferred icons for the accordion's open and close states. Utilize the `openIcon` and `closeIcon` props for this purpose.
42+
Enhance your accordion with icons for a more visually appealing experience.
4343

44-
<CodePreview github="Accordion" code={AccordionWithCustomIconCode}>
45-
<AccordionWithCustomIcon />
44+
<CodePreview github="Accordion" code={AccordionWithIconCode}>
45+
<AccordionWithIcon />
4646
</CodePreview>
4747

48-
## Panels That Stay Open
48+
## Disabled Accordions
4949

50-
With the `alwaysOpen={true}` property, you can configure all panels to remain expanded. This eliminates the need for users to manually toggle panels, ensuring all content is consistently visible.
50+
Control user interactions by making specific AccordionPanel components non-interactive with the `disabled` property.
5151

52-
<CodePreview github="Accordion" code={AccordionAlwaysOpenCode}>
53-
<AccordionAlwaysOpen />
52+
<CodePreview github="Accordion" code={DisabledAccordionCode}>
53+
<DisabledAccordion />
5454
</CodePreview>
5555

56-
## Disabled Accordions
56+
## Customize Accordion
5757

58-
If you need to control which panels users can interact with, the `disabled` property on specific AccordionPanel components makes certain panels non-interactive.
58+
Tailor the accordion to fit your design preferences with custom styling.
5959

60-
<CodePreview github="Accordion" code={DisabledAccordionCode}>
61-
<DisabledAccordion />
60+
<CodePreview github="Accordion" code={CustomizeAccordionCode}>
61+
<CustomizeAccordion />
6262
</CodePreview>
6363

6464
## API Reference

app/docs/components/accordion/accordionApi.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const accordionApiData = [
22
{
33
id: 1,
4-
propsName: 'alwaysOpen',
4+
propsName: 'openFirstPanel',
55
propsType: 'boolean',
66
propsDescription: 'Keep first panels always open.',
77
default: 'false',
@@ -10,24 +10,9 @@ export const accordionApiData = [
1010
id: 3,
1111
propsName: 'flush',
1212
propsType: 'boolean',
13-
propsDescription: 'Accordion without outer border and rounded corners.',
13+
propsDescription: 'Accordion without outer border and and background color',
1414
default: 'false',
1515
},
16-
{
17-
id: 4,
18-
propsName: 'collapseAll',
19-
propsType: 'boolean',
20-
propsDescription: 'Collapse panels by default.',
21-
default: 'false',
22-
},
23-
24-
{
25-
id: 6,
26-
propsName: 'iconPosition',
27-
propsType: ['left', 'right'],
28-
propsDescription: 'Position of the arrow icon.',
29-
default: 'left',
30-
},
3116
{
3217
id: 7,
3318
propsName: 'disabled',

app/docs/components/accordion/variant/AccordionAlwaysOpen.tsx

Lines changed: 0 additions & 95 deletions
This file was deleted.

app/docs/components/accordion/variant/AccordionCollapseAll.tsx

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)