@juspay/blend-design-system 0.0.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 (256) hide show
  1. package/README.md +177 -0
  2. package/dist/assets/main.css +1 -0
  3. package/dist/breakpoints/breakPoints.d.ts +5 -0
  4. package/dist/components/Accordion/Accordion.d.ts +4 -0
  5. package/dist/components/Accordion/AccordionItem.d.ts +6 -0
  6. package/dist/components/Accordion/accordion.tokens.d.ts +49 -0
  7. package/dist/components/Accordion/index.d.ts +3 -0
  8. package/dist/components/Accordion/types.d.ts +29 -0
  9. package/dist/components/Alert/Alert.d.ts +4 -0
  10. package/dist/components/Alert/alert.tokens.d.ts +25 -0
  11. package/dist/components/Alert/index.d.ts +2 -0
  12. package/dist/components/Alert/types.d.ts +33 -0
  13. package/dist/components/Avatar/Avatar.d.ts +12 -0
  14. package/dist/components/Avatar/StyledAvatar.d.ts +8 -0
  15. package/dist/components/Avatar/avatarUtils.d.ts +7 -0
  16. package/dist/components/Avatar/index.d.ts +2 -0
  17. package/dist/components/Avatar/token.d.ts +71 -0
  18. package/dist/components/Avatar/types.d.ts +29 -0
  19. package/dist/components/AvatarGroup/AvatarGroup.d.ts +11 -0
  20. package/dist/components/AvatarGroup/StyledAvatarGroup.d.ts +6 -0
  21. package/dist/components/AvatarGroup/avatarGroupUtils.d.ts +24 -0
  22. package/dist/components/AvatarGroup/index.d.ts +2 -0
  23. package/dist/components/AvatarGroup/token.d.ts +89 -0
  24. package/dist/components/AvatarGroup/types.d.ts +29 -0
  25. package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
  26. package/dist/components/Breadcrumb/breadcrumb.tokens.d.ts +31 -0
  27. package/dist/components/Breadcrumb/index.d.ts +2 -0
  28. package/dist/components/Breadcrumb/types.d.ts +6 -0
  29. package/dist/components/Button/Button.d.ts +18 -0
  30. package/dist/components/Button/button.tokens.d.ts +61 -0
  31. package/dist/components/Button/index.d.ts +2 -0
  32. package/dist/components/Button/types.d.ts +34 -0
  33. package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -0
  34. package/dist/components/ButtonGroup/index.d.ts +2 -0
  35. package/dist/components/ButtonGroup/types.d.ts +6 -0
  36. package/dist/components/Charts/ChartHeader.d.ts +2 -0
  37. package/dist/components/Charts/ChartLegend.d.ts +3 -0
  38. package/dist/components/Charts/ChartUtils.d.ts +5 -0
  39. package/dist/components/Charts/Charts.d.ts +3 -0
  40. package/dist/components/Charts/CustomTooltip.d.ts +2 -0
  41. package/dist/components/Charts/index.d.ts +2 -0
  42. package/dist/components/Charts/renderChart.d.ts +2 -0
  43. package/dist/components/Charts/types.d.ts +83 -0
  44. package/dist/components/Charts/utils.d.ts +1 -0
  45. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  46. package/dist/components/Checkbox/StyledCheckbox.d.ts +11 -0
  47. package/dist/components/Checkbox/checkbox.token.d.ts +96 -0
  48. package/dist/components/Checkbox/checkboxUtils.d.ts +68 -0
  49. package/dist/components/Checkbox/index.d.ts +2 -0
  50. package/dist/components/Checkbox/types.d.ts +21 -0
  51. package/dist/components/DataTable/ColumnFilter/index.d.ts +9 -0
  52. package/dist/components/DataTable/ColumnManager.d.ts +5 -0
  53. package/dist/components/DataTable/DataTable.d.ts +3 -0
  54. package/dist/components/DataTable/DataTable.stories.d.ts +16 -0
  55. package/dist/components/DataTable/DataTableHeader/index.d.ts +3 -0
  56. package/dist/components/DataTable/DataTableHeader/types.d.ts +20 -0
  57. package/dist/components/DataTable/DataTablePagination.d.ts +11 -0
  58. package/dist/components/DataTable/TableBody/BulkActionBar.d.ts +8 -0
  59. package/dist/components/DataTable/TableBody/index.d.ts +4 -0
  60. package/dist/components/DataTable/TableBody/types.d.ts +32 -0
  61. package/dist/components/DataTable/TableCell/index.d.ts +3 -0
  62. package/dist/components/DataTable/TableCell/types.d.ts +12 -0
  63. package/dist/components/DataTable/TableFooter/index.d.ts +3 -0
  64. package/dist/components/DataTable/TableFooter/types.d.ts +10 -0
  65. package/dist/components/DataTable/TableHeader/FilterComponents.d.ts +59 -0
  66. package/dist/components/DataTable/TableHeader/handlers.d.ts +28 -0
  67. package/dist/components/DataTable/TableHeader/index.d.ts +3 -0
  68. package/dist/components/DataTable/TableHeader/types.d.ts +21 -0
  69. package/dist/components/DataTable/TableHeader/utils.d.ts +29 -0
  70. package/dist/components/DataTable/columnTypes.d.ts +87 -0
  71. package/dist/components/DataTable/dataTable.tokens.d.ts +174 -0
  72. package/dist/components/DataTable/index.d.ts +10 -0
  73. package/dist/components/DataTable/types.d.ts +230 -0
  74. package/dist/components/DataTable/utils.d.ts +52 -0
  75. package/dist/components/DateRangePicker/CalendarGrid.d.ts +11 -0
  76. package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
  77. package/dist/components/DateRangePicker/QuickRangeSelector.d.ts +13 -0
  78. package/dist/components/DateRangePicker/TimeSelector.d.ts +7 -0
  79. package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +188 -0
  80. package/dist/components/DateRangePicker/index.d.ts +2 -0
  81. package/dist/components/DateRangePicker/types.d.ts +38 -0
  82. package/dist/components/DateRangePicker/utils.d.ts +470 -0
  83. package/dist/components/Directory/Directory.d.ts +6 -0
  84. package/dist/components/Directory/NavItem.d.ts +7 -0
  85. package/dist/components/Directory/Section.d.ts +3 -0
  86. package/dist/components/Directory/index.d.ts +2 -0
  87. package/dist/components/Directory/types.d.ts +29 -0
  88. package/dist/components/Directory/utils.d.ts +9 -0
  89. package/dist/components/Drawer/Drawer.d.ts +6 -0
  90. package/dist/components/Drawer/components/DrawerBase.d.ts +30 -0
  91. package/dist/components/Drawer/components/NestedSelectDrawer.d.ts +72 -0
  92. package/dist/components/Drawer/components/SelectDrawer.d.ts +9 -0
  93. package/dist/components/Drawer/components/StatusDrawer.d.ts +5 -0
  94. package/dist/components/Drawer/drawer.tokens.d.ts +60 -0
  95. package/dist/components/Drawer/index.d.ts +3 -0
  96. package/dist/components/Drawer/types.d.ts +384 -0
  97. package/dist/components/Dropdown/Dropdown.d.ts +9 -0
  98. package/dist/components/GradientBlur/GradientBlur.d.ts +2 -0
  99. package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +3 -0
  100. package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +33 -0
  101. package/dist/components/Inputs/DropdownInput/index.d.ts +2 -0
  102. package/dist/components/Inputs/DropdownInput/types.d.ts +31 -0
  103. package/dist/components/Inputs/MultiValueInput/MultiValueInput.d.ts +3 -0
  104. package/dist/components/Inputs/MultiValueInput/index.d.ts +2 -0
  105. package/dist/components/Inputs/MultiValueInput/multiValueInput.tokens.d.ts +33 -0
  106. package/dist/components/Inputs/MultiValueInput/types.d.ts +25 -0
  107. package/dist/components/Inputs/NumberInput/NumberInput.d.ts +3 -0
  108. package/dist/components/Inputs/NumberInput/index.d.ts +2 -0
  109. package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +44 -0
  110. package/dist/components/Inputs/NumberInput/types.d.ts +16 -0
  111. package/dist/components/Inputs/OTPInput/OTPInput.d.ts +3 -0
  112. package/dist/components/Inputs/OTPInput/index.d.ts +2 -0
  113. package/dist/components/Inputs/OTPInput/otpInput.tokens.d.ts +34 -0
  114. package/dist/components/Inputs/OTPInput/types.d.ts +11 -0
  115. package/dist/components/Inputs/SearchInput/SearchInput.d.ts +3 -0
  116. package/dist/components/Inputs/SearchInput/index.d.ts +2 -0
  117. package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +41 -0
  118. package/dist/components/Inputs/SearchInput/types.d.ts +7 -0
  119. package/dist/components/Inputs/TextArea/TextArea.d.ts +3 -0
  120. package/dist/components/Inputs/TextArea/index.d.ts +2 -0
  121. package/dist/components/Inputs/TextArea/textarea.token.d.ts +27 -0
  122. package/dist/components/Inputs/TextArea/types.d.ts +22 -0
  123. package/dist/components/Inputs/TextInput/TextInput.d.ts +3 -0
  124. package/dist/components/Inputs/TextInput/index.d.ts +2 -0
  125. package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +33 -0
  126. package/dist/components/Inputs/TextInput/types.d.ts +24 -0
  127. package/dist/components/Inputs/UnitInput/UnitInput.d.ts +3 -0
  128. package/dist/components/Inputs/UnitInput/index.d.ts +2 -0
  129. package/dist/components/Inputs/UnitInput/types.d.ts +25 -0
  130. package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +40 -0
  131. package/dist/components/Inputs/index.d.ts +8 -0
  132. package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +8 -0
  133. package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +18 -0
  134. package/dist/components/Menu/Menu.d.ts +8 -0
  135. package/dist/components/Menu/MenuGroupLabel.d.ts +3 -0
  136. package/dist/components/Menu/MenuItem.d.ts +9 -0
  137. package/dist/components/Menu/MenuPlayground.d.ts +3 -0
  138. package/dist/components/Menu/MenuPlaygroundComprehensive.d.ts +3 -0
  139. package/dist/components/Menu/SubMenu.d.ts +5 -0
  140. package/dist/components/Menu/index.d.ts +2 -0
  141. package/dist/components/Menu/menu.styles.d.ts +2 -0
  142. package/dist/components/Menu/menu.tokens.d.ts +100 -0
  143. package/dist/components/Menu/types.d.ts +55 -0
  144. package/dist/components/Menu/utils.d.ts +3 -0
  145. package/dist/components/Modal/Modal.d.ts +3 -0
  146. package/dist/components/Modal/index.d.ts +2 -0
  147. package/dist/components/Modal/modal.tokens.d.ts +48 -0
  148. package/dist/components/Modal/types.d.ts +22 -0
  149. package/dist/components/MultiSelect/MultiSelect.d.ts +3 -0
  150. package/dist/components/MultiSelect/MultiSelectMenu.d.ts +3 -0
  151. package/dist/components/MultiSelect/MultiSelectMenuItem.d.ts +10 -0
  152. package/dist/components/MultiSelect/MultiSelectSubMenu.d.ts +10 -0
  153. package/dist/components/MultiSelect/SelectAllItem.d.ts +8 -0
  154. package/dist/components/MultiSelect/index.d.ts +2 -0
  155. package/dist/components/MultiSelect/multiSelect.tokens.d.ts +77 -0
  156. package/dist/components/MultiSelect/types.d.ts +92 -0
  157. package/dist/components/MultiSelect/utils.d.ts +11 -0
  158. package/dist/components/Popover/Popover.d.ts +6 -0
  159. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  160. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  161. package/dist/components/Popover/index.d.ts +2 -0
  162. package/dist/components/Popover/popover.tokens.d.ts +40 -0
  163. package/dist/components/Popover/types.d.ts +31 -0
  164. package/dist/components/Primitives/Block/Block.d.ts +189 -0
  165. package/dist/components/Primitives/PrimitiveButton/PrimitiveButton.d.ts +131 -0
  166. package/dist/components/Primitives/PrimitiveInput/PrimitiveInput.d.ts +91 -0
  167. package/dist/components/Primitives/PrimitiveLink.d.ts +58 -0
  168. package/dist/components/Primitives/PrimitiveText/PrimitiveText.d.ts +39 -0
  169. package/dist/components/Primitives/PrimitiveTextArea.d.ts +88 -0
  170. package/dist/components/ProgressBar/ProgressBar.d.ts +4 -0
  171. package/dist/components/ProgressBar/index.d.ts +3 -0
  172. package/dist/components/ProgressBar/progressbar.tokens.d.ts +63 -0
  173. package/dist/components/ProgressBar/types.d.ts +22 -0
  174. package/dist/components/ProgressBar/utils.d.ts +7 -0
  175. package/dist/components/Radio/Radio.d.ts +6 -0
  176. package/dist/components/Radio/RadioGroup.d.ts +4 -0
  177. package/dist/components/Radio/StyledRadio.d.ts +7 -0
  178. package/dist/components/Radio/index.d.ts +4 -0
  179. package/dist/components/Radio/radio.token.d.ts +75 -0
  180. package/dist/components/Radio/types.d.ts +30 -0
  181. package/dist/components/Radio/utils.d.ts +47 -0
  182. package/dist/components/Select/Select.d.ts +25 -0
  183. package/dist/components/Select/SelectMenu.d.ts +3 -0
  184. package/dist/components/Select/index.d.ts +2 -0
  185. package/dist/components/Select/select.token.d.ts +40 -0
  186. package/dist/components/Select/types.d.ts +55 -0
  187. package/dist/components/Sidebar/Sidebar.d.ts +4 -0
  188. package/dist/components/Sidebar/index.d.ts +2 -0
  189. package/dist/components/Sidebar/types.d.ts +44 -0
  190. package/dist/components/SingleSelect/SingleSelect.d.ts +3 -0
  191. package/dist/components/SingleSelect/SingleSelectMenu.d.ts +21 -0
  192. package/dist/components/SingleSelect/index.d.ts +2 -0
  193. package/dist/components/SingleSelect/types.d.ts +26 -0
  194. package/dist/components/Slider/Slider.d.ts +5 -0
  195. package/dist/components/Slider/index.d.ts +3 -0
  196. package/dist/components/Slider/types.d.ts +30 -0
  197. package/dist/components/Slider/utils.d.ts +49 -0
  198. package/dist/components/Snackbar/Snackbar.d.ts +4 -0
  199. package/dist/components/Snackbar/index.d.ts +3 -0
  200. package/dist/components/Snackbar/snackbar.tokens.d.ts +52 -0
  201. package/dist/components/Snackbar/types.d.ts +26 -0
  202. package/dist/components/SplitTag/SplitTag.d.ts +6 -0
  203. package/dist/components/SplitTag/index.d.ts +2 -0
  204. package/dist/components/SplitTag/types.d.ts +16 -0
  205. package/dist/components/StatCard/StatCard.d.ts +6 -0
  206. package/dist/components/StatCard/index.d.ts +2 -0
  207. package/dist/components/StatCard/statcard.tokens.d.ts +145 -0
  208. package/dist/components/StatCard/types.d.ts +32 -0
  209. package/dist/components/Switch/StyledSwitch.d.ts +11 -0
  210. package/dist/components/Switch/Switch.d.ts +5 -0
  211. package/dist/components/Switch/SwitchGroup.d.ts +4 -0
  212. package/dist/components/Switch/index.d.ts +4 -0
  213. package/dist/components/Switch/switch.token.d.ts +112 -0
  214. package/dist/components/Switch/types.d.ts +30 -0
  215. package/dist/components/Switch/utils.d.ts +58 -0
  216. package/dist/components/Tabs/StyledTabs.d.ts +22 -0
  217. package/dist/components/Tabs/Tabs.d.ts +5 -0
  218. package/dist/components/Tabs/TabsContent.d.ts +2 -0
  219. package/dist/components/Tabs/TabsList.d.ts +8 -0
  220. package/dist/components/Tabs/TabsTrigger.d.ts +10 -0
  221. package/dist/components/Tabs/index.d.ts +6 -0
  222. package/dist/components/Tabs/tabs.token.d.ts +60 -0
  223. package/dist/components/Tabs/types.d.ts +34 -0
  224. package/dist/components/Tags/Tags.d.ts +3 -0
  225. package/dist/components/Tags/index.d.ts +2 -0
  226. package/dist/components/Tags/tag.tokens.d.ts +57 -0
  227. package/dist/components/Tags/types.d.ts +35 -0
  228. package/dist/components/Text/Text.d.ts +12 -0
  229. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  230. package/dist/components/Tooltip/index.d.ts +2 -0
  231. package/dist/components/Tooltip/tooltip.tokens.d.ts +31 -0
  232. package/dist/components/Tooltip/types.d.ts +33 -0
  233. package/dist/context/ThemeContext.d.ts +66 -0
  234. package/dist/context/ThemeProvider.d.ts +11 -0
  235. package/dist/context/index.d.ts +4 -0
  236. package/dist/context/initComponentTokens.d.ts +4 -0
  237. package/dist/context/useComponentToken.d.ts +29 -0
  238. package/dist/foundationToken.d.ts +214 -0
  239. package/dist/hooks/index.d.ts +2 -0
  240. package/dist/hooks/useBreakPoints.d.ts +4 -0
  241. package/dist/hooks/useClickOutside.d.ts +3 -0
  242. package/dist/hooks/useDebounce.d.ts +1 -0
  243. package/dist/hooks/useResizeObserver.d.ts +1 -0
  244. package/dist/hooks/useResponsiveTokens.d.ts +2 -0
  245. package/dist/hooks/useScrollLock.d.ts +2 -0
  246. package/dist/main.d.ts +34 -0
  247. package/dist/main.js +50499 -0
  248. package/dist/tokens/border.tokens.d.ts +29 -0
  249. package/dist/tokens/color.tokens.d.ts +16 -0
  250. package/dist/tokens/font.tokens.d.ts +72 -0
  251. package/dist/tokens/index.d.ts +2 -0
  252. package/dist/tokens/opacity.tokens.d.ts +18 -0
  253. package/dist/tokens/shadows.tokens.d.ts +15 -0
  254. package/dist/tokens/theme.token.d.ts +16 -0
  255. package/dist/tokens/unit.tokens.d.ts +34 -0
  256. package/package.json +99 -0
package/README.md ADDED
@@ -0,0 +1,177 @@
1
+ # Blend Design System
2
+
3
+ A comprehensive React component library and design system by Juspay, built with TypeScript and styled-components.
4
+
5
+ [![npm version](https://badge.fury.io/js/@juspay%2Fblend-design-system.svg)](https://badge.fury.io/js/@juspay%2Fblend-design-system)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## 🚀 Features
9
+
10
+ - **50+ Production-ready Components** - Buttons, Forms, Navigation, Data Display, and more
11
+ - **TypeScript Support** - Full type safety and IntelliSense support
12
+ - **Accessible by Default** - Built with accessibility best practices using Radix UI primitives
13
+ - **Customizable Theming** - Flexible design tokens and theme system
14
+ - **Modern React** - Built for React 19+ with hooks and modern patterns
15
+ - **Tree Shakeable** - Import only what you need
16
+ - **Styled Components** - CSS-in-JS with full theming support
17
+
18
+ ## 📦 Installation
19
+
20
+ ```bash
21
+ npm install @juspay/blend-design-system
22
+ # or
23
+ yarn add @juspay/blend-design-system
24
+ # or
25
+ pnpm add @juspay/blend-design-system
26
+ ```
27
+
28
+ ## 🎯 Quick Start
29
+
30
+ ```tsx
31
+ import React from 'react'
32
+ import { Button, Alert, ThemeProvider } from '@juspay/blend-design-system'
33
+ import '@juspay/blend-design-system/style.css'
34
+
35
+ function App() {
36
+ return (
37
+ <ThemeProvider>
38
+ <div>
39
+ <Alert variant="success">Welcome to Blend Design System!</Alert>
40
+ <Button variant="primary" size="medium">
41
+ Get Started
42
+ </Button>
43
+ </div>
44
+ </ThemeProvider>
45
+ )
46
+ }
47
+
48
+ export default App
49
+ ```
50
+
51
+ ## 📚 Components
52
+
53
+ ### Form Components
54
+
55
+ - **Button** - Primary, secondary, and various button styles
56
+ - **ButtonGroup** - Group related buttons together
57
+ - **Inputs** - Text, number, textarea, and specialized input components
58
+ - **Checkbox** - Accessible checkbox with custom styling
59
+ - **Radio** - Radio button groups
60
+ - **Switch** - Toggle switches
61
+ - **Slider** - Range and value sliders
62
+ - **SingleSelect** - Dropdown selection
63
+ - **MultiSelect** - Multiple option selection
64
+
65
+ ### Navigation
66
+
67
+ - **Tabs** - Horizontal and vertical tab navigation
68
+ - **Breadcrumb** - Navigation breadcrumbs
69
+ - **Menu** - Dropdown and context menus
70
+ - **Sidebar** - Collapsible sidebar navigation
71
+
72
+ ### Data Display
73
+
74
+ - **DataTable** - Feature-rich data tables with sorting, filtering
75
+ - **StatCard** - Statistical information cards
76
+ - **Charts** - Data visualization components
77
+ - **Avatar** - User profile pictures
78
+ - **AvatarGroup** - Multiple avatar display
79
+ - **Tags** - Label and category tags
80
+ - **SplitTag** - Tags with actions
81
+
82
+ ### Feedback
83
+
84
+ - **Alert** - Success, error, warning, and info alerts
85
+ - **Modal** - Dialog and modal windows
86
+ - **Tooltip** - Contextual help tooltips
87
+ - **Snackbar** - Toast notifications
88
+ - **Popover** - Floating content containers
89
+
90
+ ### Layout
91
+
92
+ - **Accordion** - Collapsible content sections
93
+ - **DateRangePicker** - Date range selection
94
+
95
+ ## 🎨 Design Tokens
96
+
97
+ Blend includes a comprehensive set of design tokens for consistent styling:
98
+
99
+ ```tsx
100
+ import { foundationToken } from '@juspay/blend-design-system'
101
+
102
+ // Colors
103
+ foundationToken.colors.primary[500] // #2B7FFF
104
+ foundationToken.colors.gray[100] // #F2F4F8
105
+
106
+ // Typography
107
+ foundationToken.fontSize.headingLG // 24px
108
+ foundationToken.fontWeight[600] // 600
109
+
110
+ // Spacing
111
+ foundationToken.spacing[16] // 16px
112
+ foundationToken.borderRadius[8] // 8px
113
+ ```
114
+
115
+ ## 🔧 Theming
116
+
117
+ Customize the design system to match your brand:
118
+
119
+ ```tsx
120
+ import { ThemeProvider, createTheme } from '@juspay/blend-design-system'
121
+
122
+ const customTheme = createTheme({
123
+ colors: {
124
+ primary: {
125
+ 500: '#your-brand-color',
126
+ },
127
+ },
128
+ })
129
+
130
+ function App() {
131
+ return <ThemeProvider theme={customTheme}>{/* Your app */}</ThemeProvider>
132
+ }
133
+ ```
134
+
135
+ ## 📖 Documentation
136
+
137
+ - **[Component Documentation](https://juspay.design/)** - Complete component API and examples
138
+ - **[Storybook](https://storybook.juspay.design/)** - Interactive component playground
139
+ - **[Design Guidelines](https://juspay.design/guidelines)** - Design principles and usage guidelines
140
+
141
+ ## 🛠️ Development
142
+
143
+ ```bash
144
+ # Clone the repository
145
+ git clone https://github.com/juspay/blend-design-system.git
146
+
147
+ # Install dependencies
148
+ pnpm install
149
+
150
+ # Start development
151
+ pnpm dev
152
+
153
+ # Build the library
154
+ pnpm build
155
+
156
+ # Run tests
157
+ pnpm test
158
+ ```
159
+
160
+ ## 📝 Contributing
161
+
162
+ We welcome contributions! Please see our [Contributing Guide](https://github.com/juspay/blend-design-system/blob/main/CONTRIBUTING.md) for details.
163
+
164
+ ## 📄 License
165
+
166
+ MIT © [Juspay Technologies](https://juspay.in)
167
+
168
+ ## 🔗 Links
169
+
170
+ - **Homepage**: [https://juspay.design/](https://juspay.design/)
171
+ - **Repository**: [https://github.com/juspay/blend-design-system](https://github.com/juspay/blend-design-system)
172
+ - **Issues**: [https://github.com/juspay/blend-design-system/issues](https://github.com/juspay/blend-design-system/issues)
173
+ - **Storybook**: [https://storybook.juspay.design/](https://storybook.juspay.design/)
174
+
175
+ ---
176
+
177
+ Built with ❤️ by the Juspay Design Team
@@ -0,0 +1 @@
1
+ .gradient-blur{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0}.gradient-blur>div,.gradient-blur:before,.gradient-blur:after{position:absolute;top:0;right:0;bottom:0;left:0}.gradient-blur:before{content:"";z-index:30;-webkit-backdrop-filter:blur(.5px);backdrop-filter:blur(.5px);mask:linear-gradient(to top,rgba(0,0,0,0) 0%,rgba(0,0,0,1) 12.5%,rgba(0,0,0,1) 25%,rgba(0,0,0,0) 37.5%)}.gradient-blur>div:nth-of-type(1){z-index:32;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);mask:linear-gradient(to top,rgba(0,0,0,0) 12.5%,rgba(0,0,0,1) 25%,rgba(0,0,0,1) 37.5%,rgba(0,0,0,0) 50%)}.gradient-blur>div:nth-of-type(2){z-index:33;-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);mask:linear-gradient(to top,rgba(0,0,0,0) 25%,rgba(0,0,0,1) 37.5%,rgba(0,0,0,1) 50%,rgba(0,0,0,0) 62.5%)}.gradient-blur>div:nth-of-type(3){z-index:34;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);mask:linear-gradient(to top,rgba(0,0,0,0) 37.5%,rgba(0,0,0,1) 50%,rgba(0,0,0,1) 62.5%,rgba(0,0,0,0) 75%)}.gradient-blur>div:nth-of-type(4){z-index:35;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);mask:linear-gradient(to top,rgba(0,0,0,0) 50%,rgba(0,0,0,1) 62.5%,rgba(0,0,0,1) 75%,rgba(0,0,0,0) 87.5%)}.gradient-blur>div:nth-of-type(5){z-index:36;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);mask:linear-gradient(to top,rgba(0,0,0,0) 62.5%,rgba(0,0,0,1) 75%,rgba(0,0,0,1) 87.5%,rgba(0,0,0,0) 100%)}.gradient-blur>div:nth-of-type(6){z-index:37;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);mask:linear-gradient(to top,rgba(0,0,0,0) 75%,rgba(0,0,0,1) 87.5%,rgba(0,0,0,1) 100%)}.gradient-blur:after{content:"";z-index:38;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);mask:linear-gradient(to top,rgba(0,0,0,0) 87.5%,rgba(0,0,0,1) 100%)}
@@ -0,0 +1,5 @@
1
+ export type BreakpointType = {
2
+ sm: number;
3
+ lg: number;
4
+ };
5
+ export declare const BREAKPOINTS: BreakpointType;
@@ -0,0 +1,4 @@
1
+ import { AccordionProps } from './types';
2
+ import * as React from 'react';
3
+ declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default Accordion;
@@ -0,0 +1,6 @@
1
+ import { AccordionItemProps, AccordionType, AccordionChevronPosition } from './types';
2
+ declare const AccordionItem: import('react').ForwardRefExoticComponent<AccordionItemProps & {
3
+ accordionType?: AccordionType;
4
+ chevronPosition?: AccordionChevronPosition;
5
+ } & import('react').RefAttributes<HTMLDivElement>>;
6
+ export default AccordionItem;
@@ -0,0 +1,49 @@
1
+ import { CSSObject } from 'styled-components';
2
+ import { AccordionType } from './types';
3
+ import { FoundationTokenType } from '../../tokens/theme.token';
4
+ export type AccordionState = 'default' | 'hover' | 'active' | 'disabled' | 'open' | 'closed';
5
+ export type AccordionTokenType = {
6
+ gap: {
7
+ [key in AccordionType]: CSSObject['gap'];
8
+ };
9
+ borderRadius: {
10
+ [key in AccordionType]: CSSObject['borderRadius'];
11
+ };
12
+ item: {
13
+ trigger: {
14
+ border: {
15
+ [key in AccordionType]: {
16
+ [key in AccordionState]?: CSSObject['border'];
17
+ };
18
+ };
19
+ padding: {
20
+ [key in AccordionType]: CSSObject['padding'];
21
+ };
22
+ backgroundColor: {
23
+ [key in AccordionType]: {
24
+ [key in AccordionState]?: CSSObject['backgroundColor'];
25
+ };
26
+ };
27
+ title: {
28
+ fontSize: CSSObject['fontSize'];
29
+ fontWeight: CSSObject['fontWeight'];
30
+ color: {
31
+ [key in AccordionState]?: CSSObject['color'];
32
+ };
33
+ };
34
+ subtext: {
35
+ fontSize: CSSObject['fontSize'];
36
+ gap: CSSObject['gap'];
37
+ color: {
38
+ [key in AccordionState]?: CSSObject['color'];
39
+ };
40
+ };
41
+ };
42
+ separator: {
43
+ color: {
44
+ [key in AccordionType]: CSSObject['color'];
45
+ };
46
+ };
47
+ };
48
+ };
49
+ export declare const getAccordionToken: (foundationToken: FoundationTokenType) => AccordionTokenType;
@@ -0,0 +1,3 @@
1
+ export { default as Accordion } from './Accordion';
2
+ export { default as AccordionItem } from './AccordionItem';
3
+ export * from './types';
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ export declare enum AccordionType {
3
+ BORDER = "border",
4
+ NO_BORDER = "noBorder"
5
+ }
6
+ export declare enum AccordionChevronPosition {
7
+ LEFT = "left",
8
+ RIGHT = "right"
9
+ }
10
+ export type AccordionItemProps = {
11
+ value: string;
12
+ title: string;
13
+ subtext?: string;
14
+ leftSlot?: ReactNode;
15
+ rightSlot?: ReactNode;
16
+ subtextSlot?: ReactNode;
17
+ children: ReactNode;
18
+ isDisabled?: boolean;
19
+ className?: string;
20
+ chevronPosition?: AccordionChevronPosition;
21
+ };
22
+ export type AccordionProps = {
23
+ children: ReactNode;
24
+ accordionType?: AccordionType;
25
+ defaultValue?: string | string[];
26
+ value?: string | string[];
27
+ isMultiple?: boolean;
28
+ onValueChange?: (value: string | string[]) => void;
29
+ };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { AlertProps } from './types';
3
+ declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default Alert;
@@ -0,0 +1,25 @@
1
+ import { CSSObject } from 'styled-components';
2
+ import { AlertStyle, AlertVariant } from './types';
3
+ import { FoundationTokenType } from '../../tokens/theme.token';
4
+ import { BreakpointType } from '../../breakpoints/breakPoints';
5
+ export type AlertTokenType = {
6
+ padding: CSSObject['padding'];
7
+ borderRadius: CSSObject['borderRadius'];
8
+ background: {
9
+ [key in AlertVariant]: {
10
+ [key in AlertStyle]: CSSObject['color'];
11
+ };
12
+ };
13
+ border: {
14
+ [key in AlertVariant]: CSSObject['color'];
15
+ };
16
+ button: {
17
+ [key in AlertVariant]: CSSObject['color'];
18
+ };
19
+ };
20
+ export type ResponsiveAlertTokens = {
21
+ [key in keyof BreakpointType]: AlertTokenType;
22
+ };
23
+ declare const alertTokens: AlertTokenType;
24
+ export declare const getAlertTokens: (foundationToken: FoundationTokenType) => ResponsiveAlertTokens;
25
+ export default alertTokens;
@@ -0,0 +1,2 @@
1
+ export { default as Alert } from './Alert';
2
+ export * from './types';
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ export declare enum AlertVariant {
3
+ PRIMARY = "primary",
4
+ SUCCESS = "success",
5
+ WARNING = "warning",
6
+ ERROR = "error",
7
+ PURPLE = "purple",
8
+ ORANGE = "orange",
9
+ NEUTRAL = "neutral"
10
+ }
11
+ export declare enum AlertActionPlacement {
12
+ BOTTOM = "bottom",
13
+ RIGHT = "right"
14
+ }
15
+ export declare enum AlertStyle {
16
+ SUBTLE = "subtle",
17
+ NO_FILL = "noFill"
18
+ }
19
+ export type AlertAction = {
20
+ label: string;
21
+ onClick: () => void;
22
+ };
23
+ export type AlertProps = {
24
+ heading: string;
25
+ description: string;
26
+ variant?: AlertVariant;
27
+ style?: AlertStyle;
28
+ primaryAction?: AlertAction;
29
+ secondaryAction?: AlertAction;
30
+ onClose?: () => void;
31
+ icon?: ReactNode;
32
+ actionPlacement?: AlertActionPlacement;
33
+ };
@@ -0,0 +1,12 @@
1
+ import { AvatarSize, AvatarShape } from './types';
2
+ declare const Avatar: import('react').ForwardRefExoticComponent<{
3
+ src?: string;
4
+ alt?: string;
5
+ fallback?: React.ReactNode;
6
+ size?: AvatarSize;
7
+ shape?: AvatarShape;
8
+ online?: boolean;
9
+ leadingSlot?: React.ReactNode;
10
+ trailingSlot?: React.ReactNode;
11
+ } & Omit<import('react').HTMLAttributes<HTMLDivElement>, "children"> & import('react').RefAttributes<HTMLDivElement>>;
12
+ export default Avatar;
@@ -0,0 +1,8 @@
1
+ import { StyledAvatarContainerProps, StyledAvatarIndicatorProps } from './types';
2
+ export declare const StyledAvatarContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledAvatarContainerProps>> & string;
3
+ export declare const StyledAvatarImage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
4
+ export declare const StyledAvatarFallback: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export declare const StyledAvatarIndicator: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, StyledAvatarIndicatorProps>> & string;
6
+ export declare const StyledAvatarWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const StyledAvatarLeadingSlot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ export declare const StyledAvatarTrailingSlot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -0,0 +1,7 @@
1
+ export declare const getInitialsFromText: (text: string) => string;
2
+ export declare const isValidImageUrl: (url: string) => Promise<boolean>;
3
+ export declare const hexToRgb: (hex: string) => {
4
+ r: number;
5
+ g: number;
6
+ b: number;
7
+ } | null;
@@ -0,0 +1,2 @@
1
+ export { default as Avatar } from './Avatar';
2
+ export * from './types';
@@ -0,0 +1,71 @@
1
+ declare const avatarTokens: {
2
+ container: {
3
+ background: {
4
+ default: string;
5
+ };
6
+ border: {
7
+ withImage: string;
8
+ withoutImage: string;
9
+ };
10
+ };
11
+ text: {
12
+ color: {
13
+ default: string;
14
+ };
15
+ };
16
+ indicator: {
17
+ background: {
18
+ default: string;
19
+ };
20
+ ring: {
21
+ color: string;
22
+ };
23
+ };
24
+ sizes: {
25
+ sm: {
26
+ width: string;
27
+ height: string;
28
+ fontSize: string;
29
+ fontWeight: string;
30
+ indicatorSize: string;
31
+ indicatorRingWidth: string;
32
+ indicatorOffset: string;
33
+ };
34
+ md: {
35
+ width: string;
36
+ height: string;
37
+ fontSize: string;
38
+ fontWeight: string;
39
+ indicatorSize: string;
40
+ indicatorRingWidth: string;
41
+ indicatorOffset: string;
42
+ };
43
+ lg: {
44
+ width: string;
45
+ height: string;
46
+ fontSize: string;
47
+ fontWeight: string;
48
+ indicatorSize: string;
49
+ indicatorRingWidth: string;
50
+ indicatorOffset: string;
51
+ };
52
+ xl: {
53
+ width: string;
54
+ height: string;
55
+ fontSize: string;
56
+ fontWeight: string;
57
+ indicatorSize: string;
58
+ indicatorRingWidth: string;
59
+ indicatorOffset: string;
60
+ };
61
+ };
62
+ shapes: {
63
+ circular: {
64
+ borderRadius: string;
65
+ };
66
+ rounded: {
67
+ borderRadius: string;
68
+ };
69
+ };
70
+ };
71
+ export default avatarTokens;
@@ -0,0 +1,29 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare enum AvatarSize {
3
+ SM = "sm",
4
+ MD = "md",
5
+ LG = "lg",
6
+ XL = "xl"
7
+ }
8
+ export declare enum AvatarShape {
9
+ CIRCULAR = "circular",
10
+ ROUNDED = "rounded"
11
+ }
12
+ export type AvatarProps = {
13
+ src?: string;
14
+ alt?: string;
15
+ fallback?: React.ReactNode;
16
+ size?: AvatarSize;
17
+ shape?: AvatarShape;
18
+ online?: boolean;
19
+ leadingSlot?: React.ReactNode;
20
+ trailingSlot?: React.ReactNode;
21
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
22
+ export type StyledAvatarContainerProps = {
23
+ $size: AvatarSize;
24
+ $shape: AvatarShape;
25
+ $hasImage: boolean;
26
+ };
27
+ export type StyledAvatarIndicatorProps = {
28
+ $size: AvatarSize;
29
+ };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { AvatarShape, AvatarSize } from '../Avatar/types';
3
+ declare const AvatarGroup: React.ForwardRefExoticComponent<{
4
+ avatars: import('./types').AvatarData[];
5
+ maxCount?: number;
6
+ size?: AvatarSize;
7
+ shape?: AvatarShape;
8
+ selectedAvatarIds?: (string | number)[];
9
+ onSelectionChange?: (selectedIds: (string | number)[]) => void;
10
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & React.RefAttributes<HTMLDivElement>>;
11
+ export default AvatarGroup;
@@ -0,0 +1,6 @@
1
+ import { StyledAvatarGroupContainerProps, StyledAvatarWrapperProps, StyledOverflowCounterProps } from './types';
2
+ export declare const StyledAvatarGroupContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledAvatarGroupContainerProps>> & string;
3
+ export declare const StyledAvatarWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledAvatarWrapperProps>> & string;
4
+ export declare const StyledOverflowCounter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledOverflowCounterProps>> & string;
5
+ export declare const StyledMenuContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
+ export declare const VisuallyHidden: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -0,0 +1,24 @@
1
+ import { default as React, RefObject } from 'react';
2
+ import { AvatarData } from './types';
3
+ import { AvatarProps } from '../Avatar/types';
4
+ interface MenuItemProps {
5
+ id: string;
6
+ text: string;
7
+ hasSlotL?: boolean;
8
+ slotL?: React.ReactNode;
9
+ onClick?: () => void;
10
+ data?: Record<string, boolean | string | number>;
11
+ }
12
+ /**
13
+ * Positions the menu relative to the overflow counter
14
+ */
15
+ export declare const positionMenu: (menuRef: RefObject<HTMLDivElement>, counterRef: RefObject<HTMLButtonElement>) => void;
16
+ /**
17
+ * Creates menu items from avatar data array
18
+ */
19
+ export declare const createMenuItems: (avatars: AvatarData[], selectedIds: (string | number)[], onSelect: (id: string | number) => void, AvatarComponent: React.ComponentType<AvatarProps>) => MenuItemProps[];
20
+ /**
21
+ * Filters avatars based on search term
22
+ */
23
+ export declare const filterAvatars: (avatars: AvatarData[], searchTerm: string) => AvatarData[];
24
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as AvatarGroup } from './AvatarGroup';
2
+ export * from './types';
@@ -0,0 +1,89 @@
1
+ declare const avatarGroupTokens: {
2
+ container: {
3
+ spacing: {
4
+ sm: string;
5
+ md: string;
6
+ lg: string;
7
+ xl: string;
8
+ };
9
+ };
10
+ avatar: {
11
+ stacking: {
12
+ zIndex: number;
13
+ };
14
+ selected: {
15
+ ringColor: string;
16
+ ringWidth: string;
17
+ ringOffset: string;
18
+ };
19
+ border: {
20
+ width: string;
21
+ color: string;
22
+ };
23
+ };
24
+ overflowCounter: {
25
+ background: {
26
+ default: string;
27
+ hover: string;
28
+ active: string;
29
+ };
30
+ text: {
31
+ color: string;
32
+ };
33
+ border: {
34
+ width: string;
35
+ color: string;
36
+ };
37
+ sizes: {
38
+ sm: {
39
+ width: string;
40
+ height: string;
41
+ fontSize: string;
42
+ fontWeight: string;
43
+ indicatorSize: string;
44
+ indicatorRingWidth: string;
45
+ indicatorOffset: string;
46
+ };
47
+ md: {
48
+ width: string;
49
+ height: string;
50
+ fontSize: string;
51
+ fontWeight: string;
52
+ indicatorSize: string;
53
+ indicatorRingWidth: string;
54
+ indicatorOffset: string;
55
+ };
56
+ lg: {
57
+ width: string;
58
+ height: string;
59
+ fontSize: string;
60
+ fontWeight: string;
61
+ indicatorSize: string;
62
+ indicatorRingWidth: string;
63
+ indicatorOffset: string;
64
+ };
65
+ xl: {
66
+ width: string;
67
+ height: string;
68
+ fontSize: string;
69
+ fontWeight: string;
70
+ indicatorSize: string;
71
+ indicatorRingWidth: string;
72
+ indicatorOffset: string;
73
+ };
74
+ };
75
+ shapes: {
76
+ circular: {
77
+ borderRadius: string;
78
+ };
79
+ rounded: {
80
+ borderRadius: string;
81
+ };
82
+ };
83
+ };
84
+ menu: {
85
+ spacing: string;
86
+ zIndex: number;
87
+ };
88
+ };
89
+ export default avatarGroupTokens;
@@ -0,0 +1,29 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { AvatarProps, AvatarSize, AvatarShape } from '../Avatar/types';
3
+ export interface AvatarData extends Omit<AvatarProps, 'className' | 'id'> {
4
+ id: string | number;
5
+ alt?: string;
6
+ fallback?: string | React.ReactNode;
7
+ }
8
+ export type AvatarGroupProps = {
9
+ avatars: AvatarData[];
10
+ maxCount?: number;
11
+ size?: AvatarSize;
12
+ shape?: AvatarShape;
13
+ selectedAvatarIds?: (string | number)[];
14
+ onSelectionChange?: (selectedIds: (string | number)[]) => void;
15
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
16
+ export type StyledAvatarGroupContainerProps = {
17
+ $spacing?: string;
18
+ };
19
+ export type StyledAvatarWrapperProps = {
20
+ $index: number;
21
+ $total: number;
22
+ $isSelected: boolean;
23
+ $size: AvatarSize;
24
+ };
25
+ export type StyledOverflowCounterProps = {
26
+ $size: AvatarSize;
27
+ $shape: AvatarShape;
28
+ $isOpen: boolean;
29
+ };