@qoretechnologies/reqore 0.55.13 → 0.56.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 (76) hide show
  1. package/dist/components/Button/index.d.ts +6 -0
  2. package/dist/components/Button/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.js +3 -0
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  6. package/dist/components/ControlGroup/index.js +15 -3
  7. package/dist/components/ControlGroup/index.js.map +1 -1
  8. package/dist/components/DatePicker/index.d.ts.map +1 -1
  9. package/dist/components/DatePicker/index.js +1 -1
  10. package/dist/components/DatePicker/index.js.map +1 -1
  11. package/dist/components/Drawer/backdrop.d.ts.map +1 -1
  12. package/dist/components/Drawer/backdrop.js +1 -1
  13. package/dist/components/Drawer/backdrop.js.map +1 -1
  14. package/dist/components/Drawer/index.d.ts.map +1 -1
  15. package/dist/components/Drawer/index.js +2 -2
  16. package/dist/components/Drawer/index.js.map +1 -1
  17. package/dist/components/Dropdown/index.d.ts +1 -1
  18. package/dist/components/Dropdown/index.d.ts.map +1 -1
  19. package/dist/components/Dropdown/index.js +2 -2
  20. package/dist/components/Dropdown/index.js.map +1 -1
  21. package/dist/components/InternalPopover/index.d.ts +3 -0
  22. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  23. package/dist/components/InternalPopover/index.js +33 -8
  24. package/dist/components/InternalPopover/index.js.map +1 -1
  25. package/dist/components/Menu/index.d.ts +4 -1
  26. package/dist/components/Menu/index.d.ts.map +1 -1
  27. package/dist/components/Panel/index.d.ts +3 -0
  28. package/dist/components/Panel/index.d.ts.map +1 -1
  29. package/dist/components/Panel/index.js +18 -3
  30. package/dist/components/Panel/index.js.map +1 -1
  31. package/dist/components/Popover/index.d.ts +3 -0
  32. package/dist/components/Popover/index.d.ts.map +1 -1
  33. package/dist/components/Popover/index.js +152 -43
  34. package/dist/components/Popover/index.js.map +1 -1
  35. package/dist/components/Table/index.d.ts.map +1 -1
  36. package/dist/components/Table/index.js +101 -81
  37. package/dist/components/Table/index.js.map +1 -1
  38. package/dist/components/Textarea/index.d.ts.map +1 -1
  39. package/dist/components/Textarea/index.js +1 -1
  40. package/dist/components/Textarea/index.js.map +1 -1
  41. package/dist/constants/sizes.d.ts +64 -2
  42. package/dist/constants/sizes.d.ts.map +1 -1
  43. package/dist/constants/sizes.js +99 -39
  44. package/dist/constants/sizes.js.map +1 -1
  45. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  46. package/dist/containers/ReqoreProvider.js +35 -21
  47. package/dist/containers/ReqoreProvider.js.map +1 -1
  48. package/dist/containers/UIProvider.d.ts +6 -0
  49. package/dist/containers/UIProvider.d.ts.map +1 -1
  50. package/dist/containers/UIProvider.js +4 -1
  51. package/dist/containers/UIProvider.js.map +1 -1
  52. package/dist/helpers/utils.d.ts.map +1 -1
  53. package/dist/helpers/utils.js +6 -0
  54. package/dist/helpers/utils.js.map +1 -1
  55. package/dist/hooks/useLatestZIndex.d.ts.map +1 -1
  56. package/dist/hooks/useLatestZIndex.js +1 -1
  57. package/dist/hooks/useLatestZIndex.js.map +1 -1
  58. package/dist/hooks/useReqoreContext.d.ts.map +1 -1
  59. package/dist/hooks/useReqoreContext.js +1 -2
  60. package/dist/hooks/useReqoreContext.js.map +1 -1
  61. package/dist/index.d.ts +5 -5
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +2 -2
  64. package/dist/index.js.map +1 -1
  65. package/docs/docs/components/button.mdx +391 -0
  66. package/docs/docs/components/input.mdx +328 -0
  67. package/docs/docs/components/panel.mdx +442 -0
  68. package/docs/docs/components/table.mdx +872 -0
  69. package/docs/docs/guides/effects.mdx +586 -0
  70. package/docs/docs/guides/getting-started.mdx +164 -0
  71. package/docs/docs/guides/theming.mdx +252 -0
  72. package/docs/docs/intro.md +98 -0
  73. package/docs/sidebars.js +23 -0
  74. package/package.json +11 -3
  75. package/tests.json +1 -1
  76. package/typedoc.json +10 -0
@@ -0,0 +1,164 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # Getting Started
6
+
7
+ ## Installation
8
+
9
+ Install Reqore using your preferred package manager:
10
+
11
+ ```bash
12
+ # Using npm
13
+ npm install @qoretechnologies/reqore
14
+
15
+ # Using yarn
16
+ yarn add @qoretechnologies/reqore
17
+
18
+ # Using pnpm
19
+ pnpm add @qoretechnologies/reqore
20
+ ```
21
+
22
+ ## Peer Dependencies
23
+
24
+ Reqore requires React 18.2.0 or higher:
25
+
26
+ ```bash
27
+ npm install react@^18.2.0 react-dom@^18.2.0
28
+ ```
29
+
30
+ ## Basic Setup
31
+
32
+ Wrap your application with `ReqoreUIProvider` to enable Reqore components:
33
+
34
+ ```tsx
35
+ import React from 'react';
36
+ import { ReqoreUIProvider, ReqoreButton } from '@qoretechnologies/reqore';
37
+
38
+ export const App = () => (
39
+ <ReqoreUIProvider>
40
+ <ReqoreButton intent='success'>Hello Reqore</ReqoreButton>
41
+ </ReqoreUIProvider>
42
+ );
43
+ ```
44
+
45
+ ## Provider Options
46
+
47
+ The `ReqoreUIProvider` accepts several configuration options:
48
+
49
+ ```tsx
50
+ import { ReqoreUIProvider } from '@qoretechnologies/reqore';
51
+
52
+ function App() {
53
+ return (
54
+ <ReqoreUIProvider
55
+ theme={{
56
+ main: '#3b82f6',
57
+ text: {
58
+ color: '#ffffff',
59
+ },
60
+ }}
61
+ options={{
62
+ animations: {
63
+ buttons: true,
64
+ dialogs: true,
65
+ },
66
+ uiScale: 1.0,
67
+ }}
68
+ >
69
+ {/* Your app */}
70
+ </ReqoreUIProvider>
71
+ );
72
+ }
73
+ ```
74
+
75
+ ### Provider Props
76
+
77
+ - **theme**: Custom theme object (see [Theming](./theming) for details)
78
+ - **options**: Configuration options
79
+ - `animations`: Enable/disable animations for different component types
80
+ - `uiScale`: Scale the entire UI (useful for accessibility)
81
+ - `customPortalId`: Custom portal element ID for modals and popovers
82
+
83
+ ## Using Components
84
+
85
+ ### Basic Button Example
86
+
87
+ ```tsx
88
+ import { ReqoreButton } from '@qoretechnologies/reqore';
89
+
90
+ function MyComponent() {
91
+ return (
92
+ <ReqoreButton intent='success' icon='CheckLine' onClick={() => console.log('Clicked!')}>
93
+ Click Me
94
+ </ReqoreButton>
95
+ );
96
+ }
97
+ ```
98
+
99
+ ### Form Components
100
+
101
+ ```tsx
102
+ import {
103
+ ReqoreInput,
104
+ ReqoreTextarea,
105
+ ReqoreCheckbox,
106
+ ReqoreControlGroup,
107
+ } from '@qoretechnologies/reqore';
108
+
109
+ function MyForm() {
110
+ return (
111
+ <ReqoreControlGroup vertical>
112
+ <ReqoreInput label='Name' placeholder='Enter your name' />
113
+ <ReqoreTextarea label='Description' placeholder='Enter description' />
114
+ <ReqoreCheckbox label='I agree to terms' />
115
+ </ReqoreControlGroup>
116
+ );
117
+ }
118
+ ```
119
+
120
+ ### Layout Components
121
+
122
+ ```tsx
123
+ import { ReqorePanel, ReqoreColumns, ReqoreColumn } from '@qoretechnologies/reqore';
124
+
125
+ function MyLayout() {
126
+ return (
127
+ <ReqorePanel label='Dashboard'>
128
+ <ReqoreColumns>
129
+ <ReqoreColumn>Left column content</ReqoreColumn>
130
+ <ReqoreColumn>Right column content</ReqoreColumn>
131
+ </ReqoreColumns>
132
+ </ReqorePanel>
133
+ );
134
+ }
135
+ ```
136
+
137
+ ## TypeScript Support
138
+
139
+ Reqore is written in TypeScript and provides full type definitions:
140
+
141
+ ```tsx
142
+ import { IReqoreButtonProps, IReqoreTheme } from '@qoretechnologies/reqore';
143
+
144
+ const buttonProps: IReqoreButtonProps = {
145
+ intent: 'success',
146
+ icon: 'CheckLine',
147
+ disabled: false,
148
+ };
149
+
150
+ const customTheme: IReqoreTheme = {
151
+ main: '#3b82f6',
152
+ // ... other theme properties
153
+ };
154
+ ```
155
+
156
+ ## Next Steps
157
+
158
+ - Learn how to customize the appearance with [Theming](./theming)
159
+ - Explore individual components:
160
+ - [Button](../components/button)
161
+ - [Panel](../components/panel)
162
+ - [Input](../components/input)
163
+ - [Table](../components/table)
164
+ - Check out [Effects](./effects) for advanced visual styling
@@ -0,0 +1,252 @@
1
+ ---
2
+ sidebar_position: 2
3
+ ---
4
+
5
+ # Theming
6
+
7
+ Reqore provides a powerful theming system that allows you to customize the appearance of all components from a single place.
8
+
9
+ ## Basic Theme Customization
10
+
11
+ The simplest way to theme Reqore is by passing a theme object to the `ReqoreUIProvider`:
12
+
13
+ ```tsx
14
+ import { ReqoreUIProvider, ReqoreButton } from '@qoretechnologies/reqore';
15
+
16
+ const theme = {
17
+ main: '#3b82f6', // Primary color
18
+ text: {
19
+ color: '#ffffff', // Text color
20
+ },
21
+ };
22
+
23
+ function App() {
24
+ return (
25
+ <ReqoreUIProvider theme={theme}>
26
+ <ReqoreButton>Themed Button</ReqoreButton>
27
+ </ReqoreUIProvider>
28
+ );
29
+ }
30
+ ```
31
+
32
+ ## Theme Structure
33
+
34
+ ### Main Colors
35
+
36
+ ```tsx
37
+ const theme = {
38
+ main: '#3b82f6', // Primary brand color
39
+ originalMain: '#1e40af', // Fallback main color
40
+ sidebar: {
41
+ main: '#1e293b', // Sidebar background
42
+ },
43
+ popover: {
44
+ main: '#1e293b', // Popover background
45
+ },
46
+ };
47
+ ```
48
+
49
+ ### Intent Colors
50
+
51
+ Intent colors provide semantic meaning to components:
52
+
53
+ ```tsx
54
+ const theme = {
55
+ intents: {
56
+ info: '#3b82f6', // Information
57
+ success: '#10b981', // Success states
58
+ warning: '#f59e0b', // Warnings
59
+ danger: '#ef4444', // Errors and dangerous actions
60
+ pending: '#8b5cf6', // Pending states
61
+ muted: '#6b7280', // Muted/disabled states
62
+ },
63
+ };
64
+ ```
65
+
66
+ ### Text Styling
67
+
68
+ ```tsx
69
+ const theme = {
70
+ text: {
71
+ color: '#f9fafb', // Default text color
72
+ dim: '#9ca3af', // Dimmed text
73
+ },
74
+ };
75
+ ```
76
+
77
+ ## Using Intents
78
+
79
+ Most components support the `intent` prop for semantic coloring:
80
+
81
+ ```tsx
82
+ import { ReqoreButton, ReqoreControlGroup } from '@qoretechnologies/reqore';
83
+
84
+ function IntentExample() {
85
+ return (
86
+ <ReqoreControlGroup>
87
+ <ReqoreButton intent='info'>Info</ReqoreButton>
88
+ <ReqoreButton intent='success'>Success</ReqoreButton>
89
+ <ReqoreButton intent='warning'>Warning</ReqoreButton>
90
+ <ReqoreButton intent='danger'>Danger</ReqoreButton>
91
+ </ReqoreControlGroup>
92
+ );
93
+ }
94
+ ```
95
+
96
+ ## Component-Specific Theming
97
+
98
+ Some components support their own theme customization:
99
+
100
+ ```tsx
101
+ const theme = {
102
+ main: '#3b82f6',
103
+ buttons: {
104
+ effect: {
105
+ gradient: {
106
+ colors: 'info:darken:2:1',
107
+ animate: 'active',
108
+ },
109
+ },
110
+ },
111
+ };
112
+ ```
113
+
114
+ ## Custom Themes Per Component
115
+
116
+ Components can override the global theme using the `customTheme` prop:
117
+
118
+ ```tsx
119
+ import { ReqoreButton } from '@qoretechnologies/reqore';
120
+
121
+ function CustomThemedButton() {
122
+ return (
123
+ <ReqoreButton
124
+ customTheme={{
125
+ main: '#ec4899',
126
+ text: {
127
+ color: '#ffffff',
128
+ },
129
+ }}
130
+ >
131
+ Custom Theme
132
+ </ReqoreButton>
133
+ );
134
+ }
135
+ ```
136
+
137
+ ## Dark Mode
138
+
139
+ Reqore's default theme works well in dark mode. You can create your own dark theme:
140
+
141
+ ```tsx
142
+ const darkTheme = {
143
+ main: '#1e40af',
144
+ text: {
145
+ color: '#f9fafb',
146
+ dim: '#6b7280',
147
+ },
148
+ intents: {
149
+ info: '#60a5fa',
150
+ success: '#34d399',
151
+ warning: '#fbbf24',
152
+ danger: '#f87171',
153
+ },
154
+ };
155
+ ```
156
+
157
+ ## Effects and Gradients
158
+
159
+ Components support advanced visual effects:
160
+
161
+ ```tsx
162
+ import { ReqoreButton } from '@qoretechnologies/reqore';
163
+
164
+ function EffectButton() {
165
+ return (
166
+ <ReqoreButton
167
+ effect={{
168
+ gradient: {
169
+ colors: {
170
+ 0: '#3b82f6',
171
+ 100: '#8b5cf6',
172
+ },
173
+ animate: 'hover',
174
+ },
175
+ spaced: 2,
176
+ uppercase: true,
177
+ weight: 'bold',
178
+ }}
179
+ >
180
+ Gradient Button
181
+ </ReqoreButton>
182
+ );
183
+ }
184
+ ```
185
+
186
+ ### Effect Properties
187
+
188
+ - **gradient**: Define color gradients
189
+ - `colors`: Color stops (0-100)
190
+ - `type`: 'linear' or 'radial'
191
+ - `direction`: Gradient direction
192
+ - `animate`: Animation trigger ('hover', 'active', 'always')
193
+ - **spaced**: Letter spacing
194
+ - **uppercase**: Transform text to uppercase
195
+ - **weight**: Font weight
196
+ - **textSize**: Custom text size
197
+ - **glow**: Add glow effects
198
+
199
+ ## Theme Helper Functions
200
+
201
+ Reqore provides helper functions for working with colors:
202
+
203
+ ```tsx
204
+ import { changeLightness, getReadableColor } from '@qoretechnologies/reqore';
205
+
206
+ // Lighten or darken a color
207
+ const lighter = changeLightness('#3b82f6', 0.2);
208
+ const darker = changeLightness('#3b82f6', -0.2);
209
+
210
+ // Get readable text color for a background
211
+ const textColor = getReadableColor(theme, '#3b82f6');
212
+ ```
213
+
214
+ ## Best Practices
215
+
216
+ 1. **Consistency**: Use intent colors consistently across your application
217
+ 2. **Contrast**: Ensure sufficient contrast for accessibility
218
+ 3. **Test**: Test your theme in both light and dark environments
219
+ 4. **Gradual**: Start with main colors and add intent colors as needed
220
+ 5. **Component Props**: Use `customTheme` sparingly for one-off customizations
221
+
222
+ ## Complete Theme Example
223
+
224
+ ```tsx
225
+ import { ReqoreUIProvider, IReqoreTheme } from '@qoretechnologies/reqore';
226
+
227
+ const myTheme: IReqoreTheme = {
228
+ main: '#3b82f6',
229
+ text: {
230
+ color: '#f9fafb',
231
+ dim: '#9ca3af',
232
+ },
233
+ intents: {
234
+ info: '#3b82f6',
235
+ success: '#10b981',
236
+ warning: '#f59e0b',
237
+ danger: '#ef4444',
238
+ pending: '#8b5cf6',
239
+ muted: '#6b7280',
240
+ },
241
+ sidebar: {
242
+ main: '#1e293b',
243
+ },
244
+ popover: {
245
+ main: '#1e293b',
246
+ },
247
+ };
248
+
249
+ function App() {
250
+ return <ReqoreUIProvider theme={myTheme}>{/* Your app */}</ReqoreUIProvider>;
251
+ }
252
+ ```
@@ -0,0 +1,98 @@
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # Introduction to Reqore
6
+
7
+ Reqore is a comprehensive, highly customizable UI library for React applications. Built with TypeScript and styled-components, it provides a complete set of components for building modern, theme-able user interfaces.
8
+
9
+ ## Key Features
10
+
11
+ - 🎨 **Fully Theme-able**: Deep theming system with support for custom colors, effects, and gradients
12
+ - 🧩 **Modular Components**: 40+ production-ready components for every use case
13
+ - ♿ **Accessible**: Built with accessibility in mind
14
+ - 📱 **Responsive**: Components work seamlessly across all device sizes
15
+ - 🎭 **Intent System**: Built-in semantic color system (success, warning, danger, info, etc.)
16
+ - ✨ **Visual Effects**: Advanced gradient effects, animations, and styling options
17
+ - 📦 **TypeScript First**: Full TypeScript support with comprehensive type definitions
18
+ - 🔧 **Customizable**: Extensive props for fine-tuning component behavior and appearance
19
+
20
+ ## Component Categories
21
+
22
+ ### Layout & Structure
23
+
24
+ - **Panels**: Container components with headers, footers, and collapsible sections
25
+ - **Columns**: Flexible column layouts
26
+ - **ControlGroup**: Group related controls with automatic spacing
27
+ - **Tabs**: Tabbed interfaces with customizable styling
28
+
29
+ ### Forms & Inputs
30
+
31
+ - **Input**: Text inputs with validation and icons
32
+ - **Textarea**: Multi-line text inputs
33
+ - **Checkbox**: Single and grouped checkboxes with switch variants
34
+ - **RadioGroup**: Radio button groups
35
+ - **Dropdown**: Customizable dropdown menus
36
+ - **MultiSelect**: Multiple selection with tags
37
+ - **DatePicker**: Date and time selection
38
+ - **Slider**: Range sliders
39
+
40
+ ### Data Display
41
+
42
+ - **Table**: Feature-rich tables with sorting, filtering, and pagination
43
+ - **Collection**: Display collections of items in various layouts
44
+ - **Tree**: Hierarchical data display
45
+ - **KeyValueTable**: Display key-value pairs
46
+
47
+ ### Navigation
48
+
49
+ - **Menu**: Vertical navigation menus
50
+ - **Navbar**: Top navigation bars
51
+ - **Breadcrumbs**: Breadcrumb navigation
52
+ - **Pagination**: Page navigation controls
53
+
54
+ ### Feedback & Overlays
55
+
56
+ - **Modal**: Dialog boxes and popups
57
+ - **Drawer**: Side panel drawers
58
+ - **Popover**: Contextual popovers and tooltips
59
+ - **Message**: Alert and notification messages
60
+ - **Notifications**: Toast notifications system
61
+
62
+ ### Content & Typography
63
+
64
+ - **Headings**: H1-H6 heading components
65
+ - **Paragraph**: Styled paragraph text
66
+ - **Span**: Inline text with effects
67
+ - **Tag**: Label tags and badges
68
+
69
+ ## Quick Example
70
+
71
+ ```tsx
72
+ import {
73
+ ReqoreUIProvider,
74
+ ReqoreButton,
75
+ ReqorePanel,
76
+ ReqoreControlGroup,
77
+ } from '@qoretechnologies/reqore';
78
+
79
+ function App() {
80
+ return (
81
+ <ReqoreUIProvider>
82
+ <ReqorePanel label='Welcome to Reqore'>
83
+ <ReqoreControlGroup>
84
+ <ReqoreButton intent='success'>Success</ReqoreButton>
85
+ <ReqoreButton intent='warning'>Warning</ReqoreButton>
86
+ <ReqoreButton intent='danger'>Danger</ReqoreButton>
87
+ </ReqoreControlGroup>
88
+ </ReqorePanel>
89
+ </ReqoreUIProvider>
90
+ );
91
+ }
92
+ ```
93
+
94
+ ## Next Steps
95
+
96
+ - Follow the [Getting Started](./guides/getting-started) guide to install and set up Reqore
97
+ - Learn about [Theming](./guides/theming) to customize the look and feel
98
+ - Explore individual [Components](./components/button) to see what's available
@@ -0,0 +1,23 @@
1
+ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
2
+ const sidebars = {
3
+ docs: [
4
+ 'docs/intro',
5
+ {
6
+ type: 'category',
7
+ label: 'Guides',
8
+ items: ['docs/guides/getting-started', 'docs/guides/theming', 'docs/guides/effects'],
9
+ },
10
+ {
11
+ type: 'category',
12
+ label: 'Components',
13
+ items: [
14
+ 'docs/components/button',
15
+ 'docs/components/panel',
16
+ 'docs/components/input',
17
+ 'docs/components/table',
18
+ ],
19
+ },
20
+ ],
21
+ };
22
+
23
+ module.exports = sidebars;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qoretechnologies/reqore",
3
- "version": "0.55.13",
3
+ "version": "0.56.1",
4
4
  "description": "ReQore is a highly theme-able and modular UI library for React",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,10 @@
16
16
  "lint": "yarn run eslint ./src/",
17
17
  "storybook": "storybook dev -p 6007",
18
18
  "init-storybook": "yarn test:ci && yarn storybook",
19
- "build-storybook": "storybook build"
19
+ "build-storybook": "storybook build",
20
+ "docs:dev": "docusaurus start",
21
+ "docs:build": "docusaurus build",
22
+ "docs:api": "typedoc --options typedoc.json"
20
23
  },
21
24
  "repository": {
22
25
  "type": "git",
@@ -89,7 +92,12 @@
89
92
  "ts-jest": "^29.0.5",
90
93
  "ts-node": "^9.1.1",
91
94
  "typescript": "^4.7.3",
92
- "viteshot": "^0.3.1"
95
+ "viteshot": "^0.3.1",
96
+ "@docusaurus/core": "^3.6.0",
97
+ "@docusaurus/preset-classic": "^3.6.0",
98
+ "docusaurus-plugin-typedoc": "^1.0.4",
99
+ "typedoc": "^0.26.6",
100
+ "typedoc-plugin-markdown": "^4.1.0"
93
101
  },
94
102
  "peerDependencies": {
95
103
  "react": "^18.2.0",