gd-design-library 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/README.md +2 -2
  2. package/ai/README.md +210 -16
  3. package/ai/schemas/components/Accordion.d.ts +84 -0
  4. package/ai/schemas/components/Button.d.ts +12 -0
  5. package/ai/schemas/components/Column.d.ts +5 -5
  6. package/ai/schemas/components/InputFile.d.ts +17 -5
  7. package/ai/schemas/components/Menu.d.ts +37 -0
  8. package/ai/schemas/components/Row.d.ts +6 -6
  9. package/ai/schemas/components/Scroll.d.ts +7 -0
  10. package/ai/schemas/components/Typography.d.ts +0 -21
  11. package/assets/icons/account_circle.d.ts +1 -3
  12. package/assets/icons/account_circle.js +7 -14
  13. package/assets/icons/arrow-down.d.ts +2 -3
  14. package/assets/icons/arrow-down.js +6 -11
  15. package/assets/icons/arrow-forward.d.ts +1 -3
  16. package/assets/icons/arrow-forward.js +6 -13
  17. package/assets/icons/attachment.d.ts +1 -3
  18. package/assets/icons/attachment.js +7 -14
  19. package/assets/icons/check.d.ts +1 -3
  20. package/assets/icons/check.js +5 -11
  21. package/assets/icons/chevron-left.d.ts +1 -3
  22. package/assets/icons/chevron-left.js +7 -14
  23. package/assets/icons/chevron-right.d.ts +1 -3
  24. package/assets/icons/chevron-right.js +6 -13
  25. package/assets/icons/content-copy.d.ts +1 -3
  26. package/assets/icons/content-copy.js +7 -14
  27. package/assets/icons/delete_outlined.d.ts +1 -3
  28. package/assets/icons/delete_outlined.js +5 -12
  29. package/assets/icons/dot.d.ts +1 -3
  30. package/assets/icons/dot.js +5 -11
  31. package/assets/icons/error_outline.d.ts +1 -4
  32. package/assets/icons/error_outline.js +6 -18
  33. package/assets/icons/eye.d.ts +1 -3
  34. package/assets/icons/eye.js +7 -14
  35. package/assets/icons/file-copy.d.ts +1 -3
  36. package/assets/icons/file-copy.js +7 -13
  37. package/assets/icons/filter.d.ts +1 -3
  38. package/assets/icons/filter.js +6 -13
  39. package/assets/icons/folder.d.ts +1 -3
  40. package/assets/icons/folder.js +6 -13
  41. package/assets/icons/folderOpen.d.ts +1 -3
  42. package/assets/icons/folderOpen.js +7 -14
  43. package/assets/icons/home.d.ts +1 -3
  44. package/assets/icons/home.js +6 -13
  45. package/assets/icons/local_shipping.d.ts +1 -3
  46. package/assets/icons/local_shipping.js +4 -11
  47. package/assets/icons/minus.d.ts +1 -3
  48. package/assets/icons/minus.js +7 -13
  49. package/assets/icons/mobile_menu_button.d.ts +1 -3
  50. package/assets/icons/mobile_menu_button.js +7 -14
  51. package/assets/icons/paymentCard.d.ts +1 -3
  52. package/assets/icons/paymentCard.js +6 -13
  53. package/assets/icons/plus.d.ts +1 -3
  54. package/assets/icons/plus.js +5 -11
  55. package/assets/icons/portrait.d.ts +1 -3
  56. package/assets/icons/portrait.js +5 -12
  57. package/assets/icons/processing.d.ts +1 -3
  58. package/assets/icons/processing.js +6 -13
  59. package/assets/icons/ruler.d.ts +1 -3
  60. package/assets/icons/ruler.js +6 -13
  61. package/assets/icons/search.d.ts +1 -3
  62. package/assets/icons/search.js +6 -13
  63. package/assets/icons/shopping_bag.d.ts +1 -3
  64. package/assets/icons/shopping_bag.js +7 -14
  65. package/assets/icons/slash.d.ts +1 -3
  66. package/assets/icons/slash.js +6 -13
  67. package/assets/icons/star.d.ts +1 -3
  68. package/assets/icons/star.js +6 -12
  69. package/assets/icons/starOutlined.d.ts +1 -3
  70. package/assets/icons/starOutlined.js +5 -11
  71. package/assets/icons/toast_error.d.ts +1 -3
  72. package/assets/icons/toast_error.js +9 -15
  73. package/assets/icons/toast_info.d.ts +1 -3
  74. package/assets/icons/toast_info.js +7 -13
  75. package/assets/icons/toast_warning.d.ts +1 -3
  76. package/assets/icons/toast_warning.js +7 -13
  77. package/assets/icons/upload.d.ts +1 -3
  78. package/assets/icons/upload.js +6 -13
  79. package/assets/icons/volume-up.d.ts +1 -3
  80. package/assets/icons/volume-up.js +6 -13
  81. package/assets/icons/wifiTethering.d.ts +1 -3
  82. package/assets/icons/wifiTethering.js +4 -11
  83. package/components/core/Button/Button.js +30 -27
  84. package/components/core/Button/Button.types.d.ts +2 -2
  85. package/components/core/Button/ButtonStyled.js +40 -39
  86. package/components/core/Dropdown/Dropdown.d.ts +1 -1
  87. package/components/core/Dropdown/Dropdown.js +16 -16
  88. package/components/core/Dropdown/Dropdown.types.d.ts +3 -3
  89. package/components/core/Dropdown/DropdownStyled.js +13 -14
  90. package/components/core/Icon/Icon.js +41 -33
  91. package/components/core/Icon/Icon.types.d.ts +2 -1
  92. package/components/core/Icon/constants.d.ts +37 -109
  93. package/components/core/Input/Input.d.ts +1 -1
  94. package/components/core/InputFile/InputFile.d.ts +0 -32
  95. package/components/core/InputFile/InputFile.js +47 -33
  96. package/components/core/InputFile/InputFileStyled.js +24 -22
  97. package/components/core/Loader/Loader.js +19 -17
  98. package/components/core/Loader/Loader.types.d.ts +3 -1
  99. package/components/core/Loader/LoaderStyled.js +34 -30
  100. package/components/core/Menu/Menu.d.ts +2 -2
  101. package/components/core/Menu/Menu.js +116 -93
  102. package/components/core/Menu/Menu.types.d.ts +16 -11
  103. package/components/core/Menu/MenuStyled.d.ts +1 -1
  104. package/components/core/Menu/constants.js +4 -12
  105. package/components/core/Modal/Modal.js +60 -36
  106. package/components/core/Modal/ModalStyled.js +21 -22
  107. package/components/core/Scroll/Scroll.d.ts +6 -0
  108. package/components/core/Scroll/Scroll.js +53 -31
  109. package/components/core/Scroll/Scroll.types.d.ts +5 -0
  110. package/components/core/Scroll/ScrollBar.js +45 -43
  111. package/components/core/Scroll/ScrollStyled.js +46 -42
  112. package/components/core/Scroll/constants.d.ts +2 -0
  113. package/components/core/Scroll/constants.js +6 -4
  114. package/components/core/Select/Select.js +162 -134
  115. package/components/core/Select/Select.types.d.ts +2 -4
  116. package/components/core/Snackbar/Snackbar.js +60 -37
  117. package/components/core/Snackbar/Snackbar.types.d.ts +1 -2
  118. package/components/core/Snackbar/SnackbarManager.js +45 -30
  119. package/components/core/Snackbar/SnackbarStyled.d.ts +5 -5
  120. package/components/core/Snackbar/SnackbarStyled.js +111 -101
  121. package/components/core/Textarea/Textarea.d.ts +4 -0
  122. package/components/core/Tooltip/Tooltip.js +66 -43
  123. package/components/core/Tooltip/TooltipStyled.js +26 -27
  124. package/components/core/Tooltip/utils.js +47 -45
  125. package/components/core/Typography/Typography.js +18 -18
  126. package/components/core/Typography/Typography.types.d.ts +3 -3
  127. package/components/core/Typography/TypographyStyled.js +28 -29
  128. package/components/domainSpecific/Accordion/Accordion.d.ts +1 -1
  129. package/components/domainSpecific/Accordion/Accordion.js +19 -17
  130. package/components/domainSpecific/Accordion/Accordion.types.d.ts +7 -4
  131. package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.d.ts +1 -1
  132. package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +13 -12
  133. package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.d.ts +1 -1
  134. package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +15 -14
  135. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
  136. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +18 -16
  137. package/components/domainSpecific/Accordion/AccordionStyled.js +44 -35
  138. package/components/domainSpecific/Header/Header.js +4 -4
  139. package/components/domainSpecific/SearchModal/SearchModal.js +0 -1
  140. package/components/domainSpecific/SearchModal/SearchModal.types.d.ts +1 -1
  141. package/components/index.types.d.ts +1 -0
  142. package/components/layout/ChatContainer/ChatContainer.js +53 -47
  143. package/components/layout/ChatContainer/ChatContainer.types.d.ts +7 -3
  144. package/components/layout/ChatContainer/ChatContainerStyled.d.ts +1 -0
  145. package/components/layout/ChatContainer/ChatContainerStyled.js +113 -103
  146. package/components/layout/Column/Column.types.d.ts +3 -1
  147. package/components/layout/Column/ColumnStyled.js +23 -23
  148. package/components/layout/FlexContainer/FlexContainerStyled.js +7 -8
  149. package/components/layout/Row/Row.d.ts +1 -1
  150. package/components/layout/Row/Row.js +20 -20
  151. package/components/layout/Row/Row.types.d.ts +3 -1
  152. package/components/layout/Row/RowStyled.js +26 -26
  153. package/hooks/useMediaQuery/useMediaQuery.js +9 -7
  154. package/hooks/useTheme/NoOpTheme.d.ts +157 -64
  155. package/index.d.ts +4 -0
  156. package/index.js +168 -169
  157. package/llms.txt +19 -4
  158. package/package.json +1 -1
  159. package/tokens/accordion.d.ts +9 -3
  160. package/tokens/accordion.js +14 -11
  161. package/tokens/button.d.ts +17 -18
  162. package/tokens/button.js +54 -55
  163. package/tokens/chat.d.ts +54 -18
  164. package/tokens/chat.js +61 -25
  165. package/tokens/constants.d.ts +0 -1
  166. package/tokens/constants.js +1 -1
  167. package/tokens/defaultTheme.d.ts +157 -64
  168. package/tokens/index.d.ts +135 -59
  169. package/tokens/index.js +95 -97
  170. package/tokens/link.d.ts +5 -0
  171. package/tokens/loader.d.ts +3 -0
  172. package/tokens/loader.js +3 -0
  173. package/tokens/menu.d.ts +1 -0
  174. package/tokens/menu.js +6 -5
  175. package/tokens/modal.d.ts +5 -3
  176. package/tokens/modal.js +42 -59
  177. package/tokens/scroll.d.ts +17 -0
  178. package/tokens/scroll.js +19 -2
  179. package/tokens/select.d.ts +7 -5
  180. package/tokens/select.js +7 -5
  181. package/tokens/snackbar.d.ts +36 -20
  182. package/tokens/snackbar.js +92 -93
  183. package/tokens/textarea.d.ts +4 -0
  184. package/tokens/tooltip.d.ts +4 -0
  185. package/tokens/tooltip.js +23 -20
  186. package/tokens/typography.js +114 -116
  187. package/tokens/values.d.ts +4 -0
  188. package/tokens/values.js +6 -2
  189. package/types/styles.d.ts +1 -0
  190. package/utils/helpers.js +14 -15
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GridKit – Grid Dynamics Design System
2
2
 
3
- ![](./gridKit_logo.png)
3
+ ![GridKit Logo](./gridKit_logo.png)
4
4
 
5
5
  **GridKit** is the official design system and component library from Grid Dynamics.
6
6
  It provides a set of reusable, accessible, and themeable React UI components designed to accelerate the development of consistent, scalable applications – with a focus on e-commerce and enterprise platforms.
@@ -76,7 +76,7 @@ yarn storybook
76
76
 
77
77
  ## 🏗️ Project Structure
78
78
 
79
- ```
79
+ ```bash
80
80
  gd-design-system/
81
81
  ├── src/
82
82
  │ ├── components/
package/ai/README.md CHANGED
@@ -46,10 +46,28 @@ Practical generation tips (what the model should output)
46
46
  - Do not inline the ThemeProvider inside leaf components; provide it at the app root. See Theme provider/hook entries in the schema.
47
47
  - Keep imports consolidated to one source: `gd-design-library`.
48
48
 
49
+ Specific component rules updates
50
+
51
+ - Button (icon-only): when `isIcon` is true, pass the icon via `iconStart` and omit `children`. Always provide an accessible `ariaLabel`.
52
+ - Button (state control): Control button states using `className` prop with values like `"active"`, `"hover"`, or combine with `disabled` prop for disabled state. Example: `<Button className="active" justifyContent="start">Press Me</Button>`.
53
+ - Button (Box props): Use Box layout props like `justifyContent="start"`, `padding`, `width`, `height` for flexible layouts. Example: `<Button padding="8px" width="300px" justifyContent="start" iconStart={<Icon name="folder" />}>Custom Styled</Button>`.
54
+
49
55
  API guardrails from the schema/prompt (must-follow)
50
56
 
51
57
  - Row/Column/Card.Row/Card.Column: use `isWrap` (boolean), NOT `wrap`. **IMPORTANT: `isWrap` defaults to `true`**, use `isWrap={false}` to prevent wrapping.
52
- - Icon: **ONLY use icon names from the available list**: cross, success, error, warning, info, dot, check, arrowDown, arrowRight, arrowLeft, arrowForward, keyboardArrowDown, keyboardArrowUp, mobileMenu, home, slash, localShipping, favorite, favoriteOutlined, shoppingBag, paymentCard, accountCircle, portrait, deleteOutlined, minus, plus, edit, search, filter, ruler, attachment, upload, folder, folderOpen, contentCopy, fileCopy, eye, volumeUp, send, chat, chatBubble, phone, processing, wifiTethering, star, starOutlined, thumbUp, thumbDown, thumbUpFilled, thumbDownFilled, errorOutline. Do NOT use icons not in this list (e.g., no "settings", "close", "add", "info" icons).
58
+ - Icon: **ONLY use icon names from the IconsList**. Complete list of 51 available icons:
59
+ - **Status & Feedback**: `cross`, `success`, `error`, `warning`, `info`, `dot`, `check`, `errorOutline`
60
+ - **Navigation & Arrows**: `arrowDown`, `arrowRight`, `arrowLeft`, `arrowForward`, `keyboardArrowDown`, `keyboardArrowUp`
61
+ - **UI & Interface**: `mobileMenu`, `home`, `slash`
62
+ - **E-commerce**: `localShipping`, `favorite`, `favoriteOutlined`, `shoppingBag`, `paymentCard`
63
+ - **User & Account**: `accountCircle`, `portrait`
64
+ - **Actions**: `deleteOutlined`, `minus`, `plus`, `edit`, `search`, `filter`, `ruler`
65
+ - **Files & Documents**: `attachment`, `upload`, `folder`, `folderOpen`, `contentCopy`, `fileCopy`
66
+ - **Media**: `eye`, `volumeUp`, `send`
67
+ - **Communication**: `chat`, `chatBubble`, `phone`
68
+ - **System**: `processing`, `wifiTethering`
69
+ - **Rating & Feedback**: `star`, `starOutlined`, `thumbUp`, `thumbDown`, `thumbUpFilled`, `thumbDownFilled`
70
+ - **IMPORTANT**: Do NOT use icon names not in this list (e.g., no "settings", "close", "add", "chevronRight", "expandMore", "infoIcon"). Use only the exact names from IconsList above.
53
71
  - Image and Card.Image: `width` and `height` props are numbers only (e.g., `width={96}`), not strings like `"96px"`.
54
72
  - Card.Title and other Card subcomponents: `sizeVariant` only accepts `CardSizeVariant.Default` or `CardSizeVariant.Sm`.
55
73
  - Counter and Card.Counter: use `initial` (not `value`) for the starting quantity; use `onCounterChange` as the change handler.
@@ -66,12 +84,52 @@ Component catalog
66
84
  - Layout: Box, FlexContainer, Column, Row, Wrapper, Scroll, Separator
67
85
  - Forms: Form, Input, Select, Search, Label, Textarea, Switch, Toggle, RadioGroup, Slider, InputFile, DragAndDropFiles
68
86
  - Feedback & overlays: InlineNotification, Loader, Skeleton, Snackbar, SnackbarManager, Tooltip, Modal, Portal
69
- - Navigation & structure: Breadcrumbs, Tabs, Stepper, List, Accordion, Link
87
+ - Navigation & structure: Breadcrumbs, Tabs, Stepper, List, Accordion (with subcomponents: AccordionItem, AccordionHeader, AccordionContent), Link
70
88
  - Display & content: Typography, Button, Icon, Image, Card, Avatar, Carousel, ContentCarousel, Counter, Price, ProgressBar, Rating, ChatContainer, ChatBubble
71
89
  - Not part of gd-design-library (do not request/use): Grid, Stack, Alert, Toast, Table, Badge, ButtonGroup, Dropdown, Drawer, Popover, Pagination, Heading, Spinner.
72
90
 
91
+ Important component structures:
92
+
93
+ - **Accordion** requires three subcomponents working together:
94
+ - `Accordion`: Main wrapper with props for `value`, `defaultValue`, `allowMultipleExpand`, `withSeparator`, `onChange`
95
+ - `AccordionItem`: Individual item wrapper (MUST have unique `id` prop). **Supports all Box layout props** (margin, padding, width, height, flex, position, gap, overflow, and more)
96
+ - `AccordionHeader`: Clickable header (use `expandIcon` prop with Icon component, e.g., `<Icon name="keyboardArrowDown" />`)
97
+ - `AccordionContent`: Collapsible content section
98
+ - Structure: `<Accordion><AccordionItem id="unique"><AccordionHeader>Title</AccordionHeader><AccordionContent>Content</AccordionContent></AccordionItem></Accordion>`
99
+ - ALWAYS import: `import { Accordion, AccordionItem, AccordionHeader, AccordionContent } from 'gd-design-library';`
100
+
73
101
  Patterns from stories (grounded tips)
74
102
 
103
+ - Accordion:
104
+ - Structure is mandatory: `<Accordion><AccordionItem id="unique-id"><AccordionHeader expandIcon={<Icon name="keyboardArrowDown" />}><h3>Title</h3></AccordionHeader><AccordionContent><p>Content</p></AccordionContent></AccordionItem></Accordion>`
105
+ - ALWAYS provide unique `id` prop to each AccordionItem (required for state management)
106
+ - Use `expandIcon` prop on AccordionHeader with Icon component for visual expand/collapse indicator
107
+ - Common icon choices from IconsList: `keyboardArrowDown` (default down arrow), `plus` (plus/minus style), `arrowRight` (side arrow), `arrowDown` (simple arrow)
108
+ - Controlled mode: use `value={expandedIds}` and `onChange={setExpandedIds}` for external state management
109
+ - Uncontrolled mode: use `defaultValue={["id1", "id2"]}` for initially expanded items
110
+ - Set `allowMultipleExpand={true}` for settings panels or comparison scenarios where multiple items can be open
111
+ - Set `allowMultipleExpand={false}` (default) for FAQs or step-by-step guides where only one item should be open
112
+ - Use `withSeparator={false}` to remove dividers between accordion items
113
+ - Apply `styles` prop to AccordionItem for custom borders, backgrounds: `styles={{ border: '2px solid #0066cc' }}`
114
+ - Apply `styles` prop to AccordionHeader for custom header styling: `styles={{ backgroundColor: '#4CAF50', color: 'white' }}`
115
+ - Apply `styles` prop to AccordionContent for custom content styling: `styles={{ backgroundColor: '#f9f9f9', padding: '24px' }}`
116
+ - **AccordionItem Box Layout Props** (NEW):
117
+ - Use `margin` for spacing between items: `margin="16px 0"`
118
+ - Use `padding` for internal spacing: `padding="20px"`
119
+ - Use `width` and `maxWidth` for responsive layouts: `width="100%" maxWidth="600px"`
120
+ - Use `flex` for flexible layouts: `flex="1"` (in flex container)
121
+ - Use `minWidth` to prevent items from becoming too narrow: `minWidth="200px"`
122
+ - Use `height`, `minHeight`, `maxHeight` for vertical sizing
123
+ - Use flexbox props: `flexDirection`, `justifyContent`, `alignItems`, `gap`
124
+ - Use positioning props: `position`, `top`, `right`, `bottom`, `left`, `zIndex`
125
+ - Use `overflow` to control content overflow: `overflow="hidden"`
126
+ - All standard CSS Box props are supported on AccordionItem
127
+ - For rich headers, wrap complex JSX in divs: `<AccordionHeader><div style={{display: 'flex'}}><Icon name="info" /><h3>Title</h3></div></AccordionHeader>`
128
+ - Nest accordions by placing Accordion inside AccordionContent for hierarchical data
129
+ - Use with semantic HTML: wrap header content in h3, h4 tags
130
+ - Combine with InlineNotification inside AccordionContent for contextual alerts
131
+ - Use onChange to track analytics, update URLs, or persist preferences to localStorage
132
+ - Accessibility: ARIA attributes (aria-expanded, aria-controls) are automatically provided by AccordionHeader
75
133
  - Textarea:
76
134
  - Control resizing with the `resize` prop using the `TextareaResize` enum (e.g., None, Horizontal, Vertical, Both). Prefer `dynamicHeightAdjustment` for auto-growing content.
77
135
  - Use `rows` for fixed height or `minHeight`/`maxHeight` for constraints.
@@ -80,7 +138,11 @@ Patterns from stories (grounded tips)
80
138
  - Limits and events: `maxLength` to constrain length; `onCustomResize` receives `{ height, width }` when user resizes.
81
139
  - Buttons:
82
140
  - Variants: `ButtonVariant.Primary | Secondary | Tertiary | Outlined | Text | Inherit`. For icon-only buttons, set `isIcon`.
141
+ - Icon-only usage: when `isIcon` is true, pass the icon via `iconStart` and omit `children`. Always provide an accessible `ariaLabel`.
83
142
  - Rounded: Use `rounded` prop with values: `none | xs | sm | md | lg | xl | round`. Use `round` for circular icon buttons.
143
+ - Interactive states: Buttons have built-in hover, active (press), and disabled states with smooth transitions. Use `className` for custom CSS classes (e.g., `className="active"`, `className="hover"`, `className="disabled"`) and `styles` prop for inline styles.
144
+ - State control via className: Control button states using `className` prop with values like `"active"`, `"hover"`, or combine with `disabled` prop for disabled state. Example: `<Button className="active" justifyContent="start">Press Me</Button>`.
145
+ - Box props: Use Box layout props like `justifyContent="start"` to align button content, and combine with `alignItems`, `gap`, `margin`, `padding`, `width`, `height` for flexible layouts. Button extends Box component props for full layout control. Example: `<Button padding="8px" width="300px" justifyContent="start" iconStart={<Icon name="folder" />}>Custom Styled</Button>`.
84
146
  - Forms and labels:
85
147
  - Always provide a visible label via the `label` prop or a separate `<Label htmlFor>` paired with the input `name/id`. Wrap controls with `<Form>` and handle submit via `onSubmit`.
86
148
  - Layout composition:
@@ -93,17 +155,19 @@ Patterns from stories (grounded tips)
93
155
  - Use `Icon name="phone"` for contact, calling, or communication features
94
156
  - Combine with `ChatContainer` and `ChatBubble` components for complete chat interfaces
95
157
 
96
- - Complete icon catalog (50+ icons organized by category):
97
- - Status & Feedback: `cross`, `success`, `error`, `warning`, `info`, `dot`, `check`, `errorOutline`
98
- - Navigation & Direction: `arrowDown`, `arrowRight`, `arrowLeft`, `arrowForward`, `keyboardArrowDown`, `keyboardArrowUp`
99
- - UI & Interface: `mobileMenu`, `home`, `slash`
100
- - E-commerce & Shopping: `localShipping`, `favorite`, `favoriteOutlined`, `shoppingBag`, `paymentCard`
101
- - User & Account: `accountCircle`, `portrait`
102
- - Actions & Operations: `deleteOutlined`, `minus`, `plus`, `edit`, `search`, `filter`, `ruler`
103
- - File & Document: `attachment`, `upload`, `folder`, `folderOpen`, `contentCopy`, `fileCopy`
104
- - Media & Communication: `eye`, `volumeUp`, `send`, `chat`, `chatBubble`, `phone`
105
- - System & Technical: `processing`, `wifiTethering`
106
- - Rating & Feedback: `star`, `starOutlined`, `thumbUp`, `thumbDown`, `thumbUpFilled`, `thumbDownFilled`
158
+ - Complete icon catalog (51 icons from IconsList, organized by category):
159
+ - **Status & Feedback** (8): `cross`, `success`, `error`, `warning`, `info`, `dot`, `check`, `errorOutline`
160
+ - **Navigation & Arrows** (6): `arrowDown`, `arrowRight`, `arrowLeft`, `arrowForward`, `keyboardArrowDown`, `keyboardArrowUp`
161
+ - **UI & Interface** (3): `mobileMenu`, `home`, `slash`
162
+ - **E-commerce** (5): `localShipping`, `favorite`, `favoriteOutlined`, `shoppingBag`, `paymentCard`
163
+ - **User & Account** (2): `accountCircle`, `portrait`
164
+ - **Actions** (7): `deleteOutlined`, `minus`, `plus`, `edit`, `search`, `filter`, `ruler`
165
+ - **Files & Documents** (6): `attachment`, `upload`, `folder`, `folderOpen`, `contentCopy`, `fileCopy`
166
+ - **Media** (3): `eye`, `volumeUp`, `send`
167
+ - **Communication** (3): `chat`, `chatBubble`, `phone`
168
+ - **System** (2): `processing`, `wifiTethering`
169
+ - **Rating & Feedback** (6): `star`, `starOutlined`, `thumbUp`, `thumbDown`, `thumbUpFilled`, `thumbDownFilled`
170
+ - **CRITICAL**: These are the ONLY valid icon names. Do not invent or use: "add" (use `plus`), "chevronRight" (use `arrowRight`), "expandMore" (use `arrowDown`), "settings", "close", "infoIcon", etc.
107
171
  - TextArea component for multi-line text input:
108
172
  - Use `Textarea` for detailed information like comments, descriptions, or messages
109
173
  - Apply `dynamicHeightAdjustment={true}` for auto-growing text areas
@@ -163,7 +227,7 @@ Patterns from stories (grounded tips)
163
227
 
164
228
  Example: Correct usage
165
229
 
166
- ```
230
+ ```typescript
167
231
  import { Form, Input, Button, Typography, Box, FlexContainer, Column, Card, Link } from 'gd-design-library';
168
232
 
169
233
  export function LoginCard() {
@@ -180,7 +244,7 @@ export function LoginCard() {
180
244
  </Column>
181
245
  </Form>
182
246
  <Typography variant="small">
183
- Dont have an account? <Link href="#">Sign up</Link>
247
+ Don't have an account? <Link href="#">Sign up</Link>
184
248
  </Typography>
185
249
  </Column>
186
250
  </Card>
@@ -189,9 +253,91 @@ export function LoginCard() {
189
253
  }
190
254
  ```
191
255
 
192
- Incorrect usage (anti-patterns)
256
+ Example: Accordion usage (correct)
257
+
258
+ ```typescript
259
+ import { Accordion, AccordionItem, AccordionHeader, AccordionContent, Icon, Typography } from 'gd-design-library';
260
+
261
+ export function FAQSection() {
262
+ return (
263
+ <Accordion defaultValue={["faq1"]}>
264
+ <AccordionItem id="faq1">
265
+ <AccordionHeader expandIcon={<Icon name="keyboardArrowDown" />}>
266
+ <Typography as="h3" variant="h5">How do I get started?</Typography>
267
+ </AccordionHeader>
268
+ <AccordionContent>
269
+ <Typography variant="body">
270
+ Follow these steps to begin using the design system in your project.
271
+ </Typography>
272
+ </AccordionContent>
273
+ </AccordionItem>
274
+ <AccordionItem id="faq2">
275
+ <AccordionHeader expandIcon={<Icon name="keyboardArrowDown" />}>
276
+ <Typography as="h3" variant="h5">What are the pricing options?</Typography>
277
+ </AccordionHeader>
278
+ <AccordionContent>
279
+ <Typography variant="body">
280
+ We offer three flexible pricing plans to meet your needs.
281
+ </Typography>
282
+ </AccordionContent>
283
+ </AccordionItem>
284
+ </Accordion>
285
+ );
286
+ }
287
+ ```
288
+
289
+ Example: Accordion with Box Layout Props (correct)
290
+
291
+ ```typescript
292
+ import { Accordion, AccordionItem, AccordionHeader, AccordionContent, Icon, Typography } from 'gd-design-library';
193
293
 
294
+ export function StyledAccordionSection() {
295
+ return (
296
+ <Accordion>
297
+ <AccordionItem
298
+ id="item1"
299
+ margin="16px 0"
300
+ padding="20px"
301
+ width="100%"
302
+ maxWidth="600px"
303
+ styles={{
304
+ border: '2px solid #4CAF50',
305
+ borderRadius: '12px',
306
+ backgroundColor: '#f1f8f4'
307
+ }}
308
+ >
309
+ <AccordionHeader expandIcon={<Icon name="keyboardArrowDown" />}>
310
+ <Typography as="h3" variant="h5">Item with Box Props</Typography>
311
+ </AccordionHeader>
312
+ <AccordionContent>
313
+ <Typography variant="body">
314
+ This AccordionItem uses Box layout props like margin, padding, width, and maxWidth for flexible layout control.
315
+ </Typography>
316
+ </AccordionContent>
317
+ </AccordionItem>
318
+ <AccordionItem
319
+ id="item2"
320
+ flex="1"
321
+ minWidth="200px"
322
+ styles={{ border: '1px solid #ddd', borderRadius: '8px' }}
323
+ >
324
+ <AccordionHeader expandIcon={<Icon name="keyboardArrowDown" />}>
325
+ <Typography as="h3" variant="h5">Flex Item</Typography>
326
+ </AccordionHeader>
327
+ <AccordionContent>
328
+ <Typography variant="body">
329
+ Using flex="1" for flexible width distribution in a flex container.
330
+ </Typography>
331
+ </AccordionContent>
332
+ </AccordionItem>
333
+ </Accordion>
334
+ );
335
+ }
194
336
  ```
337
+
338
+ Incorrect usage (anti-patterns)
339
+
340
+ ```typescript
195
341
  import Button from 'some-ui-lib';
196
342
  import { Box } from '@mui/material';
197
343
 
@@ -204,6 +350,54 @@ export function Login() {
204
350
  }
205
351
  ```
206
352
 
353
+ Accordion anti-patterns (WRONG - do not do this):
354
+
355
+ ```typescript
356
+ // ❌ WRONG: Missing subcomponents structure
357
+ <Accordion>
358
+ <div title="Section 1">Content 1</div>
359
+ </Accordion>
360
+
361
+ // ❌ WRONG: Missing AccordionItem id prop
362
+ <Accordion>
363
+ <AccordionItem> {/* Missing required id prop */}
364
+ <AccordionHeader>Title</AccordionHeader>
365
+ <AccordionContent>Content</AccordionContent>
366
+ </AccordionItem>
367
+ </Accordion>
368
+
369
+ // ❌ WRONG: Using value/title props instead of proper structure
370
+ <Accordion>
371
+ <AccordionItem value="item1" title="Section 1">
372
+ Content 1 {/* Missing AccordionContent wrapper */}
373
+ </AccordionItem>
374
+ </Accordion>
375
+
376
+ // ❌ WRONG: Missing Icon import for expandIcon
377
+ <Accordion>
378
+ <AccordionItem id="item1">
379
+ <AccordionHeader expandIcon="arrow"> {/* String instead of Icon component */}
380
+ <h3>Title</h3>
381
+ </AccordionHeader>
382
+ <AccordionContent>Content</AccordionContent>
383
+ </AccordionItem>
384
+ </Accordion>
385
+
386
+ // ✅ CORRECT: Proper structure with all required parts
387
+ import { Accordion, AccordionItem, AccordionHeader, AccordionContent, Icon } from 'gd-design-library';
388
+
389
+ <Accordion>
390
+ <AccordionItem id="item1">
391
+ <AccordionHeader expandIcon={<Icon name="keyboardArrowDown" />}>
392
+ <h3>Title</h3>
393
+ </AccordionHeader>
394
+ <AccordionContent>
395
+ <p>Content</p>
396
+ </AccordionContent>
397
+ </AccordionItem>
398
+ </Accordion>
399
+ ```
400
+
207
401
  Troubleshooting and notes
208
402
 
209
403
  - If a component/prop isn’t recognized, verify it exists in `gd-design-library` exports and the AI schemas under `./ai/schemas/components/*`.
@@ -14,6 +14,68 @@ declare const _default: {
14
14
  touchSupport: boolean;
15
15
  keyboardSupport: boolean;
16
16
  screenReaderSupport: boolean;
17
+ subcomponents: {
18
+ AccordionItem: {
19
+ description: string;
20
+ props: ({
21
+ name: string;
22
+ type: string;
23
+ description: string;
24
+ required: boolean;
25
+ default?: undefined;
26
+ } | {
27
+ name: string;
28
+ type: string;
29
+ description: string;
30
+ default: string;
31
+ required?: undefined;
32
+ } | {
33
+ name: string;
34
+ type: string;
35
+ description: string;
36
+ required?: undefined;
37
+ default?: undefined;
38
+ })[];
39
+ };
40
+ AccordionHeader: {
41
+ description: string;
42
+ props: ({
43
+ name: string;
44
+ type: string;
45
+ description: string;
46
+ required: boolean;
47
+ default?: undefined;
48
+ } | {
49
+ name: string;
50
+ type: string;
51
+ description: string;
52
+ required?: undefined;
53
+ default?: undefined;
54
+ } | {
55
+ name: string;
56
+ type: string;
57
+ description: string;
58
+ default: string;
59
+ required?: undefined;
60
+ })[];
61
+ };
62
+ AccordionContent: {
63
+ description: string;
64
+ props: ({
65
+ name: string;
66
+ type: string;
67
+ description: string;
68
+ required: boolean;
69
+ default?: undefined;
70
+ } | {
71
+ name: string;
72
+ type: string;
73
+ description: string;
74
+ default: string;
75
+ required?: undefined;
76
+ })[];
77
+ };
78
+ };
17
79
  props: ({
18
80
  name: string;
19
81
  type: string;
@@ -58,6 +120,26 @@ declare const _default: {
58
120
  code: string;
59
121
  useCase: string;
60
122
  };
123
+ 'Rich Header Content': {
124
+ code: string;
125
+ useCase: string;
126
+ };
127
+ 'Nested Accordions': {
128
+ code: string;
129
+ useCase: string;
130
+ };
131
+ 'Custom Styled Items': {
132
+ code: string;
133
+ useCase: string;
134
+ };
135
+ 'AccordionItem with Box Layout Props': {
136
+ code: string;
137
+ useCase: string;
138
+ };
139
+ 'Flex Layout Accordion Items': {
140
+ code: string;
141
+ useCase: string;
142
+ };
61
143
  };
62
144
  examples: string[];
63
145
  troubleshooting: {
@@ -66,6 +148,8 @@ declare const _default: {
66
148
  'State not updating': string;
67
149
  'Accessibility issues': string;
68
150
  'Performance issues': string;
151
+ 'Icon not rotating': string;
152
+ 'Missing id error': string;
69
153
  };
70
154
  bestPractices: string[];
71
155
  };
@@ -82,6 +82,18 @@ declare const _default: {
82
82
  code: string;
83
83
  useCase: string;
84
84
  };
85
+ 'State Control via className': {
86
+ code: string;
87
+ useCase: string;
88
+ };
89
+ 'Custom Styled with Box Props': {
90
+ code: string;
91
+ useCase: string;
92
+ };
93
+ 'Disabled with Box Props': {
94
+ code: string;
95
+ useCase: string;
96
+ };
85
97
  };
86
98
  examples: string[];
87
99
  troubleshooting: {
@@ -19,24 +19,24 @@ declare const _default: {
19
19
  type: string;
20
20
  description: string;
21
21
  default: string;
22
- enum: string[];
22
+ enum?: undefined;
23
23
  } | {
24
24
  name: string;
25
25
  type: string;
26
26
  description: string;
27
- default: number;
28
- enum?: undefined;
27
+ default: string;
28
+ enum: string[];
29
29
  } | {
30
30
  name: string;
31
31
  type: string;
32
32
  description: string;
33
- default: boolean;
33
+ default: number;
34
34
  enum?: undefined;
35
35
  } | {
36
36
  name: string;
37
37
  type: string;
38
38
  description: string;
39
- default: string;
39
+ default: boolean;
40
40
  enum?: undefined;
41
41
  } | {
42
42
  name: string;
@@ -18,31 +18,43 @@ declare const _default: {
18
18
  name: string;
19
19
  type: string;
20
20
  description: string;
21
+ default: string;
21
22
  enum?: undefined;
22
- default?: undefined;
23
+ required?: undefined;
23
24
  } | {
24
25
  name: string;
25
26
  type: string;
26
27
  description: string;
27
- enum: string[];
28
- default?: undefined;
28
+ enum: (string | boolean)[];
29
+ default: string;
30
+ required?: undefined;
29
31
  } | {
30
32
  name: string;
31
33
  type: string;
32
34
  description: string;
33
35
  default: boolean;
34
36
  enum?: undefined;
37
+ required?: undefined;
35
38
  } | {
36
39
  name: string;
37
40
  type: string;
38
41
  description: string;
39
- default: {};
42
+ default: string;
43
+ required: boolean;
40
44
  enum?: undefined;
41
45
  } | {
42
46
  name: string;
43
47
  type: string;
44
48
  description: string;
45
- default: string;
49
+ default?: undefined;
50
+ enum?: undefined;
51
+ required?: undefined;
52
+ } | {
53
+ name: string;
54
+ type: string;
55
+ description: string;
56
+ required: boolean;
57
+ default?: undefined;
46
58
  enum?: undefined;
47
59
  })[];
48
60
  examples: string[];
@@ -0,0 +1,37 @@
1
+ declare const _default: {
2
+ component: {
3
+ name: string;
4
+ import: string;
5
+ description: string;
6
+ category: string;
7
+ complexity: string;
8
+ accessibility: string;
9
+ performance: string;
10
+ dependencies: string[];
11
+ peerDependencies: string[];
12
+ bundleSize: string;
13
+ browserSupport: string;
14
+ touchSupport: boolean;
15
+ keyboardSupport: boolean;
16
+ screenReaderSupport: boolean;
17
+ props: ({
18
+ name: string;
19
+ type: string;
20
+ description: string;
21
+ default?: undefined;
22
+ } | {
23
+ name: string;
24
+ type: string;
25
+ description: string;
26
+ default: boolean;
27
+ } | {
28
+ name: string;
29
+ type: string;
30
+ description: string;
31
+ default: string;
32
+ })[];
33
+ examples: string[];
34
+ };
35
+ compositionTips: string[];
36
+ };
37
+ export default _default;
@@ -15,6 +15,12 @@ declare const _default: {
15
15
  keyboardSupport: boolean;
16
16
  screenReaderSupport: boolean;
17
17
  props: ({
18
+ name: string;
19
+ type: string;
20
+ description: string;
21
+ default: string;
22
+ enum?: undefined;
23
+ } | {
18
24
  name: string;
19
25
  type: string;
20
26
  description: string;
@@ -36,13 +42,7 @@ declare const _default: {
36
42
  name: string;
37
43
  type: string;
38
44
  description: string;
39
- enum?: undefined;
40
45
  default?: undefined;
41
- } | {
42
- name: string;
43
- type: string;
44
- description: string;
45
- default: string;
46
46
  enum?: undefined;
47
47
  })[];
48
48
  examples: string[];
@@ -21,6 +21,13 @@ declare const _default: {
21
21
  default: string;
22
22
  enum: string[];
23
23
  required?: undefined;
24
+ } | {
25
+ name: string;
26
+ type: string;
27
+ description: string;
28
+ default: boolean;
29
+ enum?: undefined;
30
+ required?: undefined;
24
31
  } | {
25
32
  name: string;
26
33
  type: string;
@@ -28,27 +28,6 @@ declare const _default: {
28
28
  default: string;
29
29
  enum?: undefined;
30
30
  required?: undefined;
31
- } | {
32
- name: string;
33
- type: string;
34
- description: string;
35
- default: {};
36
- enum?: undefined;
37
- required?: undefined;
38
- } | {
39
- name: string;
40
- type: string;
41
- description: string;
42
- default: never[];
43
- enum: string[];
44
- required?: undefined;
45
- } | {
46
- name: string;
47
- type: string;
48
- description: string;
49
- default?: undefined;
50
- enum?: undefined;
51
- required?: undefined;
52
31
  } | {
53
32
  name: string;
54
33
  type: string;
@@ -1,7 +1,5 @@
1
- export declare const AccountCircleIcon: ({ width, height, fillSvg, fill, ...rest }: {
1
+ export declare const AccountCircleIcon: ({ fillSvg, fill, ...rest }: {
2
2
  [x: string]: any;
3
- width?: number | undefined;
4
- height?: number | undefined;
5
3
  fillSvg?: string | undefined;
6
4
  fill?: string | undefined;
7
5
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,17 +1,10 @@
1
1
  "use client";
2
- import { jsx as t } from "@emotion/react/jsx-runtime";
3
- import { icon as n } from "../../tokens/icon.js";
4
- import { SizeVariant as c } from "../../types/common.js";
5
- const {
6
- width: l,
7
- height: h
8
- } = n.size[c.Sm], f = ({
9
- width: o = l,
10
- height: i = h,
11
- fillSvg: e = "none",
12
- fill: r = "currentColor",
13
- ...C
14
- }) => /* @__PURE__ */ t("svg", { width: o, height: i, viewBox: "0 0 24 24", fill: e, xmlns: "http://www.w3.org/2000/svg", ...C, children: /* @__PURE__ */ t("path", { d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 5C13.66 5 15 6.34 15 8C15 9.66 13.66 11 12 11C10.34 11 9 9.66 9 8C9 6.34 10.34 5 12 5ZM12 19.2C9.5 19.2 7.29 17.92 6 15.98C6.03 13.99 10 12.9 12 12.9C13.99 12.9 17.97 13.99 18 15.98C16.71 17.92 14.5 19.2 12 19.2Z", fill: r }) });
2
+ import { jsx as C } from "@emotion/react/jsx-runtime";
3
+ const c = ({
4
+ fillSvg: o = "none",
5
+ fill: n = "currentColor",
6
+ ...r
7
+ }) => /* @__PURE__ */ C("svg", { viewBox: "0 0 24 24", fill: o, xmlns: "http://www.w3.org/2000/svg", ...r, children: /* @__PURE__ */ C("path", { d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 5C13.66 5 15 6.34 15 8C15 9.66 13.66 11 12 11C10.34 11 9 9.66 9 8C9 6.34 10.34 5 12 5ZM12 19.2C9.5 19.2 7.29 17.92 6 15.98C6.03 13.99 10 12.9 12 12.9C13.99 12.9 17.97 13.99 18 15.98C16.71 17.92 14.5 19.2 12 19.2Z", fill: n }) });
15
8
  export {
16
- f as AccountCircleIcon
9
+ c as AccountCircleIcon
17
10
  };