goobs-frontend 0.8.30 → 0.9.0
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.
- package/README.md +260 -248
- package/package.json +40 -28
- package/src/stories/Button.tsx +6 -8
- package/src/stories/Page.stories.ts +1 -1
- package/src/stories/button.css +1 -1
- package/src/stories/page.css +2 -3
package/README.md
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# goobs-frontend
|
|
2
2
|
|
|
3
|
-
goobs-frontend,
|
|
3
|
+
goobs-frontend, is a React-based UI library built on Material-UI.
|
|
4
4
|
|
|
5
5
|
The NPM repo is available here - https://www.npmjs.com/package/goobs-frontend
|
|
6
6
|
|
|
7
7
|
This entire repository is written in TypeScript, and there is no need for a separate types installation.
|
|
8
8
|
|
|
9
|
+
## Storybook
|
|
10
|
+
|
|
11
|
+
See component design and documentation in Storybook available here - https://storybook.technologiesunlimited.net/
|
|
12
|
+
|
|
9
13
|
## Integrating goobs-frontend with Next.js
|
|
10
14
|
|
|
11
|
-
This guide explains how to integrate
|
|
15
|
+
This guide explains how to integrate goobs-frontend with a Next.js project
|
|
12
16
|
|
|
13
17
|
**Step 1: Install the project**
|
|
14
18
|
|
|
15
|
-
In your Next.js project directory, run the following command to install goobs-frontend
|
|
19
|
+
In your Next.js project directory, run the following command to install goobs-frontend
|
|
16
20
|
|
|
17
21
|
#### npm
|
|
18
22
|
|
|
@@ -28,364 +32,372 @@ yarn add goobs-frontend
|
|
|
28
32
|
|
|
29
33
|
**Step 2: Update next.config.js**
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
You must then transpile the package in next.config
|
|
32
36
|
|
|
33
37
|
```javascript
|
|
34
38
|
/** @type {import('next').NextConfig} */
|
|
35
39
|
|
|
36
40
|
const nextConfig = {
|
|
37
|
-
reactStrictMode: true,
|
|
38
|
-
swcMinify: true,
|
|
39
41
|
transpilePackages: ['goobs-frontend'],
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
export default nextConfig
|
|
43
45
|
```
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
**Step 3: Implement into project and build to confirm functionality**
|
|
48
|
-
|
|
49
|
-
All components should be successfully building as of this release and are being used within production in one way or another.
|
|
50
|
-
|
|
51
|
-
This README update, along with the following documentation updates, are all part of a push to better document the usage of this project.
|
|
47
|
+
After this is done, you can import components from goobs-frontend into your project.
|
|
52
48
|
|
|
53
49
|
## Components
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
Below is a high-level overview of all components now available in goobs-frontend. For full usage instructions, code snippets, and best practices, see our Storybook.
|
|
56
52
|
|
|
57
53
|
### Accordion
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
Description: A collapsible container for toggling expanded/collapsed content.
|
|
56
|
+
|
|
57
|
+
Features:
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
Built on Material-UI’s Accordion.
|
|
60
|
+
|
|
61
|
+
Combines Accordion, AccordionSummary, and AccordionDetails for a complete layout.
|
|
62
62
|
|
|
63
63
|
### Button
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Description: A Material-UI Button wrapper with advanced customization—supporting icons, text alignment, and coloring.
|
|
66
|
+
|
|
67
|
+
Features: Flexible icon positioning (left, right, above).
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
Configurable background color, text color, dimensions, etc.
|
|
68
70
|
|
|
69
71
|
### Card
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Description: A versatile container with multiple variants (inventory, pricing, product, tasks, etc.).
|
|
74
|
+
|
|
75
|
+
Features: Displays images, stepper integration, and optional breadcrumbs.
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
Ideal for product listings, tasks, or advanced pricing scenarios.
|
|
74
78
|
|
|
75
79
|
### CodeCopy
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
Description: Renders syntax-highlighted code blocks and offers a single-click “Copy to clipboard” button.
|
|
82
|
+
|
|
83
|
+
Features: Uses highlight.js for syntax highlighting.
|
|
84
|
+
|
|
85
|
+
Great for docs, tutorials, or developer portals.
|
|
78
86
|
|
|
79
|
-
|
|
87
|
+
### ConfirmationCodeInputs
|
|
80
88
|
|
|
81
|
-
|
|
89
|
+
Description: An OTP-style multi-digit input.
|
|
82
90
|
|
|
83
|
-
|
|
91
|
+
Features: Automatically moves focus between fields, numeric-only.
|
|
84
92
|
|
|
85
|
-
|
|
93
|
+
Visual valid/invalid status indicator.
|
|
94
|
+
|
|
95
|
+
### ComplexTextEditor
|
|
96
|
+
|
|
97
|
+
Description: A text editor capable of switching between modes (simple, markdown, or rich text) via a single toolbar.
|
|
98
|
+
|
|
99
|
+
Features: Uses sub-editors (SimpleEditor, RichTextEditor, MarkdownEditor).
|
|
100
|
+
|
|
101
|
+
Accepts label, min-rows, error text, etc.
|
|
86
102
|
|
|
87
103
|
### Content
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
Description: A catch-all container that can render multiple typed sub-components (typography, images, forms, etc.).
|
|
106
|
+
|
|
107
|
+
Features: Allows dynamic rendering of sub-components in a structured layout.
|
|
108
|
+
|
|
109
|
+
### CustomToolbar
|
|
110
|
+
|
|
111
|
+
Description: A flexible toolbar with optional buttons, search bar, dropdowns, and management actions.
|
|
112
|
+
|
|
113
|
+
Features:
|
|
114
|
+
|
|
115
|
+
- Left: Renders an optional vertical divider and an array of buttons.
|
|
116
|
+
- LeftCenter: Typically a search bar.
|
|
117
|
+
- Right: Renders one or more Dropdown components.
|
|
118
|
+
- RightCenter: Manages selected rows or data actions (duplicate, delete, etc.).
|
|
119
|
+
|
|
120
|
+
### DataGrid
|
|
90
121
|
|
|
91
|
-
|
|
122
|
+
Description: A table/grid with row selection, search, pagination, and advanced row management (duplicate, delete, etc.).
|
|
123
|
+
|
|
124
|
+
Features:
|
|
125
|
+
|
|
126
|
+
- Built-in search integration.
|
|
127
|
+
- Custom toolbars, footers, and row selection.
|
|
128
|
+
- Single or multiple row selection with checkboxes.
|
|
129
|
+
|
|
130
|
+
### DataGridCheckbox
|
|
131
|
+
|
|
132
|
+
Description: A specialized Checkbox for data grid usage, logging click/change events.
|
|
133
|
+
|
|
134
|
+
Features:
|
|
135
|
+
|
|
136
|
+
- Styled for grid contexts.
|
|
137
|
+
- Allows debug logging or analytics.
|
|
92
138
|
|
|
93
139
|
### DateField
|
|
94
140
|
|
|
95
|
-
|
|
141
|
+
Description: A date picker that supports both manual text entry and a pop-up calendar (via react-datepicker).
|
|
142
|
+
|
|
143
|
+
Features:
|
|
144
|
+
|
|
145
|
+
- Arrow-key increments for day/month/year.
|
|
146
|
+
- Partial manual editing (e.g., only day or month).
|
|
147
|
+
|
|
148
|
+
### Dialog and Popup
|
|
149
|
+
|
|
150
|
+
Description: Modal components for various form-based interactions.
|
|
96
151
|
|
|
97
|
-
|
|
152
|
+
Features:
|
|
153
|
+
|
|
154
|
+
- Popup for simpler modals; Dialog for more complex or multi-step forms.
|
|
155
|
+
- Both can integrate with form controls or custom actions.
|
|
98
156
|
|
|
99
157
|
### Dropdown
|
|
100
158
|
|
|
101
|
-
|
|
159
|
+
Description: A select input with advanced styling (label above or on the outline) and typed options.
|
|
160
|
+
|
|
161
|
+
Features:
|
|
162
|
+
|
|
163
|
+
- Allows custom color overrides for background, outline, and font.
|
|
164
|
+
- Works well in forms or toolbars.
|
|
165
|
+
|
|
166
|
+
### FormDataGrid
|
|
167
|
+
|
|
168
|
+
Description: A specialized DataGrid for form-based usage.
|
|
102
169
|
|
|
103
|
-
|
|
170
|
+
Features:
|
|
171
|
+
|
|
172
|
+
- Possibly merges form validation with row-based data editing.
|
|
173
|
+
- Accepts typed definitions for columns, validation, or data transformations.
|
|
104
174
|
|
|
105
175
|
### Grid
|
|
106
176
|
|
|
107
|
-
|
|
177
|
+
Description: A flexible grid system for laying out UI components, wrapping Material-UI’s Grid.
|
|
178
|
+
|
|
179
|
+
Features:
|
|
108
180
|
|
|
109
|
-
|
|
181
|
+
- Row/column/cell configurations with advanced spacing and alignment.
|
|
182
|
+
- Perfect for building complex multi-column forms or pages.
|
|
110
183
|
|
|
111
184
|
### IncrementNumberField
|
|
112
185
|
|
|
113
|
-
|
|
186
|
+
Description: A numeric input with dedicated increment/decrement buttons.
|
|
187
|
+
|
|
188
|
+
Features:
|
|
189
|
+
|
|
190
|
+
- Restricts input to digits.
|
|
191
|
+
- Configurable label, background, outline, and text color.
|
|
192
|
+
|
|
193
|
+
### MultiSelectChip
|
|
114
194
|
|
|
115
|
-
|
|
195
|
+
Description: A multiple-selection dropdown that displays selected items as chips.
|
|
116
196
|
|
|
117
|
-
|
|
197
|
+
Features:
|
|
118
198
|
|
|
119
|
-
|
|
199
|
+
- Easy to handle multiple values.
|
|
200
|
+
- Optional background, font, and label styling.
|
|
120
201
|
|
|
121
|
-
|
|
202
|
+
### Nav (Vertical)
|
|
203
|
+
|
|
204
|
+
Description: A vertical navigation component with expandable main/sub nav items, optional search, etc.
|
|
205
|
+
|
|
206
|
+
Features:
|
|
207
|
+
|
|
208
|
+
- Supports multiple levels: mainNav, subNav, and viewNav.
|
|
209
|
+
- Collapsible sections and optional route-based or onClick triggers.
|
|
122
210
|
|
|
123
211
|
### NumberField
|
|
124
212
|
|
|
125
|
-
|
|
213
|
+
Description: A numeric text field with optional min/max constraints.
|
|
126
214
|
|
|
127
|
-
|
|
215
|
+
Features:
|
|
216
|
+
|
|
217
|
+
- Restricts non-numeric input.
|
|
218
|
+
- Auto-corrects values outside allowable ranges.
|
|
128
219
|
|
|
129
220
|
### PasswordField
|
|
130
221
|
|
|
131
|
-
|
|
222
|
+
Description: A text field for secure passwords, featuring a show/hide toggle icon.
|
|
223
|
+
|
|
224
|
+
Features:
|
|
132
225
|
|
|
133
|
-
|
|
226
|
+
- Color overrides for background, outline, text.
|
|
227
|
+
- Eye icon toggles between hidden and visible text.
|
|
134
228
|
|
|
135
229
|
### PhoneNumberField
|
|
136
230
|
|
|
137
|
-
|
|
231
|
+
Description: A phone number input that auto-formats values (e.g., +1-xxx-xxx-xxxx).
|
|
232
|
+
|
|
233
|
+
Features:
|
|
138
234
|
|
|
139
|
-
|
|
235
|
+
- Removes non-digit characters, ensures +1.
|
|
236
|
+
- Great for US-based phone inputs, can be adapted for international usage.
|
|
140
237
|
|
|
141
238
|
### PricingTable
|
|
142
239
|
|
|
143
|
-
|
|
240
|
+
Description: A tabular display of multi-tier pricing data, toggling monthly/annual costs, etc.
|
|
241
|
+
|
|
242
|
+
Features:
|
|
243
|
+
|
|
244
|
+
- Compare multiple packages.
|
|
245
|
+
- Checkmark-based feature lists.
|
|
246
|
+
- Integrated CTA buttons, easily link to a router or checkout flow.
|
|
247
|
+
|
|
248
|
+
### ProjectBoard
|
|
249
|
+
|
|
250
|
+
Description: A kanban-like board for tasks, with drag-and-drop columns, search, and sub-forms (AddTask, ShowTask).
|
|
251
|
+
|
|
252
|
+
Features:
|
|
144
253
|
|
|
145
|
-
|
|
254
|
+
- Handles status/sub-status or severity-based columns.
|
|
255
|
+
- Built-in search, comment, revision history, assigned user, etc.
|
|
146
256
|
|
|
147
|
-
###
|
|
257
|
+
### QRCodeComponent
|
|
148
258
|
|
|
149
|
-
|
|
259
|
+
Description: Dynamically generates a QR code from TOTP secrets (or any string).
|
|
150
260
|
|
|
151
|
-
|
|
261
|
+
Features:
|
|
262
|
+
|
|
263
|
+
- Integrates with otplib for generating or verifying TOTP secrets.
|
|
264
|
+
- Accepts size, optional title, and callback for the generated secret.
|
|
152
265
|
|
|
153
266
|
### RadioGroup
|
|
154
267
|
|
|
155
|
-
|
|
268
|
+
Description: A group of radio buttons for single-option selection, built on Material-UI’s RadioGroup.
|
|
269
|
+
|
|
270
|
+
Features:
|
|
271
|
+
|
|
272
|
+
- Accepts typed RadioOption for label customizations.
|
|
273
|
+
- Includes an optional overall label with custom font variants/colors.
|
|
274
|
+
|
|
275
|
+
### RichTextEditor
|
|
276
|
+
|
|
277
|
+
Description: A full WYSIWYG editor with optional Markdown toggles, link insertion, bold/italic, etc.
|
|
278
|
+
|
|
279
|
+
Features:
|
|
280
|
+
|
|
281
|
+
- Built on Slate or similar.
|
|
282
|
+
- Separate toolbars for Rich Text vs. Markdown modes.
|
|
283
|
+
|
|
284
|
+
### SearchableDropdown
|
|
285
|
+
|
|
286
|
+
Description: A dropdown with real-time filtering, based on Material-UI’s Autocomplete.
|
|
287
|
+
|
|
288
|
+
Features:
|
|
156
289
|
|
|
157
|
-
|
|
290
|
+
- Additional attributes for each option (attribute1, attribute2).
|
|
291
|
+
- Flexible color/label styling.
|
|
158
292
|
|
|
159
293
|
### Searchbar
|
|
160
294
|
|
|
161
|
-
|
|
295
|
+
Description: A stylized search input field, typically placed in a toolbar or nav.
|
|
162
296
|
|
|
163
|
-
|
|
297
|
+
Features:
|
|
164
298
|
|
|
165
|
-
|
|
299
|
+
- Icon, label positioning, and color customization.
|
|
300
|
+
- Easy onChange event to handle filtering or searching.
|
|
166
301
|
|
|
167
|
-
|
|
302
|
+
### ShowTask
|
|
168
303
|
|
|
169
|
-
|
|
304
|
+
Description: A modal-based component that displays a single task, its fields, and a comment section with revision history.
|
|
305
|
+
|
|
306
|
+
Features:
|
|
307
|
+
|
|
308
|
+
- Edits or adds comments, optionally restricted to the original commenter.
|
|
309
|
+
- Adjust sub-status, assigned user, next-action date, etc.
|
|
310
|
+
|
|
311
|
+
### Stepper (CustomStepper)
|
|
312
|
+
|
|
313
|
+
Description: A multi-step progress indicator for processes or wizards.
|
|
314
|
+
|
|
315
|
+
Features:
|
|
316
|
+
|
|
317
|
+
- Supports “completed”, “active”, “error”, or “inactive” steps.
|
|
318
|
+
- Displays optional step descriptions or links.
|
|
319
|
+
- Step icons can be customized (check, lock, error, etc.).
|
|
320
|
+
|
|
321
|
+
### StyledTooltip
|
|
322
|
+
|
|
323
|
+
Description: A Material-UI Tooltip extended with custom color, offsets, and arrow placement.
|
|
324
|
+
|
|
325
|
+
Features:
|
|
326
|
+
|
|
327
|
+
- Override background color, text color, arrow color.
|
|
328
|
+
- Precisely position via offset props.
|
|
329
|
+
|
|
330
|
+
### Tabs (Horizontal)
|
|
331
|
+
|
|
332
|
+
Description: A horizontal tab navigation bar built with Material-UI’s Tabs.
|
|
333
|
+
|
|
334
|
+
Features:
|
|
335
|
+
|
|
336
|
+
- Route-based (trigger='route') or custom callback (trigger='onClick') tab switches.
|
|
337
|
+
- Supports alignment (left, center, right, justify) and optional borders.
|
|
170
338
|
|
|
171
339
|
### TextField
|
|
172
340
|
|
|
173
|
-
|
|
341
|
+
Description: A Material-UI TextField wrapper with advanced color and label position overrides, plus optional end adornments.
|
|
342
|
+
|
|
343
|
+
Features:
|
|
174
344
|
|
|
175
|
-
|
|
345
|
+
- Label can shrink onto or above the outline for a unique UI.
|
|
346
|
+
- Extended color styling for background, outline, font, placeholder, etc.
|
|
176
347
|
|
|
177
348
|
### Toolbar
|
|
178
349
|
|
|
179
|
-
|
|
350
|
+
Description: A flexible container for actions, often used atop tables or pages for filtering, button actions, and more.
|
|
180
351
|
|
|
181
|
-
|
|
352
|
+
Features:
|
|
353
|
+
|
|
354
|
+
- Extensible subcomponents (Left, LeftCenter, Right, RightCenter).
|
|
355
|
+
- Adapts layout based on screen size (desktop, tablet, mobile).
|
|
182
356
|
|
|
183
357
|
### Tooltip
|
|
184
358
|
|
|
185
|
-
|
|
359
|
+
Description: A styled tooltip (see StyledTooltip).
|
|
360
|
+
|
|
361
|
+
Features:
|
|
186
362
|
|
|
187
|
-
|
|
363
|
+
- Enhanced theming, offsets, arrow customization.
|
|
364
|
+
- Works with icons, text, or anything that needs a hover tooltip.
|
|
188
365
|
|
|
189
366
|
### TransferList
|
|
190
367
|
|
|
191
|
-
|
|
368
|
+
Description: A dual-list component for transferring items between left and right.
|
|
192
369
|
|
|
193
|
-
|
|
370
|
+
Features:
|
|
194
371
|
|
|
195
|
-
|
|
372
|
+
- “Move selected” or “Move all” controls.
|
|
373
|
+
- Single or multiple selection variants.
|
|
374
|
+
- Can pair with dropdowns for multi-collection contexts.
|
|
196
375
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
[Typography Wiki](https://github.com/goobz22/goobs-frontend/wiki/Typography)
|
|
200
|
-
|
|
201
|
-
## Usage
|
|
202
|
-
|
|
203
|
-
To use the components, types, and utilities in your project, you can import them from the `goobs-frontend` package. Here's a comprehensive list of all available imports:
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
import {
|
|
207
|
-
// Components
|
|
208
|
-
CustomButton,
|
|
209
|
-
CustomGrid,
|
|
210
|
-
Typography,
|
|
211
|
-
ConfirmationCodeInput,
|
|
212
|
-
RadioGroup,
|
|
213
|
-
PopupForm,
|
|
214
|
-
ContentSection,
|
|
215
|
-
Accordion,
|
|
216
|
-
AccordionSummary,
|
|
217
|
-
AccordionDetails,
|
|
218
|
-
Card,
|
|
219
|
-
CodeCopy,
|
|
220
|
-
Nav,
|
|
221
|
-
PricingTable,
|
|
222
|
-
CustomStepper,
|
|
223
|
-
CustomToolbar,
|
|
224
|
-
TransferList,
|
|
225
|
-
StyledTooltip,
|
|
226
|
-
QRCodeComponent,
|
|
227
|
-
DateField,
|
|
228
|
-
Dropdown,
|
|
229
|
-
IncrementNumberField,
|
|
230
|
-
NumberField,
|
|
231
|
-
PasswordField,
|
|
232
|
-
PhoneNumberField,
|
|
233
|
-
Searchbar,
|
|
234
|
-
TextField,
|
|
235
|
-
|
|
236
|
-
// Types
|
|
237
|
-
CustomButtonProps,
|
|
238
|
-
CustomGridProps,
|
|
239
|
-
Alignment,
|
|
240
|
-
BorderProp,
|
|
241
|
-
columnconfig,
|
|
242
|
-
gridconfig,
|
|
243
|
-
cellconfig,
|
|
244
|
-
FontFamily,
|
|
245
|
-
TypographyVariant,
|
|
246
|
-
TypographyProps,
|
|
247
|
-
ConfirmationCodeInputsProps,
|
|
248
|
-
RadioOption,
|
|
249
|
-
RadioGroupProps,
|
|
250
|
-
PopupFormProps,
|
|
251
|
-
ContentSectionProps,
|
|
252
|
-
CardProps,
|
|
253
|
-
CodeCopyProps,
|
|
254
|
-
NavProps,
|
|
255
|
-
PricingProps,
|
|
256
|
-
CustomStepperProps,
|
|
257
|
-
ToolbarProps,
|
|
258
|
-
TransferListProps,
|
|
259
|
-
CustomTooltipProps,
|
|
260
|
-
QRCodeProps,
|
|
261
|
-
DateFieldProps,
|
|
262
|
-
DropdownProps,
|
|
263
|
-
IncrementNumberFieldProps,
|
|
264
|
-
NumberFieldProps,
|
|
265
|
-
PasswordFieldProps,
|
|
266
|
-
PhoneNumberFieldProps,
|
|
267
|
-
SearchbarProps,
|
|
268
|
-
TextFieldProps,
|
|
269
|
-
|
|
270
|
-
// Extended Types
|
|
271
|
-
ExtendedButtonProps,
|
|
272
|
-
ExtendedTypographyProps,
|
|
273
|
-
ExtendedTextFieldProps,
|
|
274
|
-
ExtendedQRCodeProps,
|
|
275
|
-
ExtendedDropdownProps,
|
|
276
|
-
ExtendedDateFieldProps,
|
|
277
|
-
ExtendedNumberFieldProps,
|
|
278
|
-
ExtendedIncrementNumberFieldProps,
|
|
279
|
-
ExtendedPasswordFieldProps,
|
|
280
|
-
ExtendedSearchbarProps,
|
|
281
|
-
ExtendedCodeCopyProps,
|
|
282
|
-
ExtendedCardProps,
|
|
283
|
-
ExtendedTransferListProps,
|
|
284
|
-
ExtendedStepperProps,
|
|
285
|
-
ExtendedPricingProps,
|
|
286
|
-
ExtendedImageProps,
|
|
287
|
-
ExtendedConfirmationCodeInputsProps,
|
|
288
|
-
ExtendedRadioGroupProps,
|
|
289
|
-
|
|
290
|
-
// Component Props Types
|
|
291
|
-
TypographyComponentProps,
|
|
292
|
-
ConfirmationCodeInputProps,
|
|
293
|
-
RadioGroupComponentProps,
|
|
294
|
-
PopupFormComponentProps,
|
|
295
|
-
ContentSectionComponentProps,
|
|
296
|
-
AccordionProps,
|
|
297
|
-
AccordionSummaryProps,
|
|
298
|
-
AccordionDetailsProps,
|
|
299
|
-
CardComponentProps,
|
|
300
|
-
CodeCopyComponentProps,
|
|
301
|
-
NavComponentProps,
|
|
302
|
-
PricingTableComponentProps,
|
|
303
|
-
CustomStepperComponentProps,
|
|
304
|
-
CustomToolbarComponentProps,
|
|
305
|
-
TransferListComponentProps,
|
|
306
|
-
StyledTooltipComponentProps,
|
|
307
|
-
|
|
308
|
-
// Styles
|
|
309
|
-
formContainerStyle,
|
|
310
|
-
|
|
311
|
-
// Animations
|
|
312
|
-
Animation,
|
|
313
|
-
|
|
314
|
-
// Colors
|
|
315
|
-
moss,
|
|
316
|
-
aqua,
|
|
317
|
-
madder,
|
|
318
|
-
woad,
|
|
319
|
-
marine,
|
|
320
|
-
pansy,
|
|
321
|
-
stainlessSteel,
|
|
322
|
-
coal,
|
|
323
|
-
ocean,
|
|
324
|
-
sky,
|
|
325
|
-
salmon,
|
|
326
|
-
lightning,
|
|
327
|
-
sage,
|
|
328
|
-
lilac,
|
|
329
|
-
gunpowder,
|
|
330
|
-
lightMadder,
|
|
331
|
-
black,
|
|
332
|
-
white,
|
|
333
|
-
none,
|
|
334
|
-
semiTransparentWhite,
|
|
335
|
-
semiTransparentBlack,
|
|
336
|
-
red,
|
|
337
|
-
green,
|
|
338
|
-
greyborder,
|
|
339
|
-
|
|
340
|
-
// Typography
|
|
341
|
-
arapeyh1,
|
|
342
|
-
arapeyh2,
|
|
343
|
-
arapeyh3,
|
|
344
|
-
arapeyh4,
|
|
345
|
-
arapeyh5,
|
|
346
|
-
arapeyh6,
|
|
347
|
-
arapeyparagraph,
|
|
348
|
-
interh1,
|
|
349
|
-
interh2,
|
|
350
|
-
interh3,
|
|
351
|
-
interh4,
|
|
352
|
-
interh5,
|
|
353
|
-
interh6,
|
|
354
|
-
interparagraph,
|
|
355
|
-
interhelperheader,
|
|
356
|
-
interhelperfooter,
|
|
357
|
-
merrih1,
|
|
358
|
-
merrih2,
|
|
359
|
-
merrih3,
|
|
360
|
-
merrih4,
|
|
361
|
-
merrih5,
|
|
362
|
-
merrih6,
|
|
363
|
-
merriparagraph,
|
|
364
|
-
merrihelperfooter,
|
|
365
|
-
} from 'goobs-frontend'
|
|
366
|
-
```
|
|
376
|
+
### Typography
|
|
367
377
|
|
|
368
|
-
|
|
378
|
+
Description: A text component supporting multiple font families (Arapey, Inter, Merriweather) and variant styles.
|
|
369
379
|
|
|
370
|
-
|
|
380
|
+
Features:
|
|
371
381
|
|
|
372
|
-
|
|
382
|
+
- Additional variants like paragraph, helperheader, helperfooter.
|
|
383
|
+
- Flexible coloring and consistent text sizing across your app.
|
|
373
384
|
|
|
374
|
-
|
|
385
|
+
### Feedback and Contributions
|
|
375
386
|
|
|
376
|
-
We welcome
|
|
387
|
+
We welcome contributions of all kinds:
|
|
377
388
|
|
|
378
|
-
|
|
389
|
+
- Issues: Report bugs or request features via GitHub Issues.
|
|
390
|
+
- Pull Requests: Fork, create a branch, and open a PR for review.
|
|
391
|
+
- Custom Requests: If you need special features or want these components ported to a different design system, reach out.
|
|
379
392
|
|
|
380
|
-
|
|
393
|
+
### License
|
|
381
394
|
|
|
382
|
-
|
|
395
|
+
goobs-frontend is licensed under the MIT License.
|
|
383
396
|
|
|
384
|
-
|
|
397
|
+
### Contact
|
|
385
398
|
|
|
386
|
-
|
|
387
|
-
- LinkedIn - https://www.linkedin.com/in/matthew-goluba/
|
|
399
|
+
For questions, support, or further details, please contact Matthew Goluba
|
|
388
400
|
|
|
389
|
-
|
|
401
|
+
Email: mkgoluba@technologiesunlimited.net
|
|
390
402
|
|
|
391
|
-
|
|
403
|
+
Enjoy building with goobs-frontend!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goobs-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A comprehensive React-based libary that extends the functionality of Material-UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -82,42 +82,54 @@
|
|
|
82
82
|
},
|
|
83
83
|
"homepage": "https://github.com/goobz22/goobs-frontend#readme",
|
|
84
84
|
"keywords": [
|
|
85
|
+
"accordion",
|
|
86
|
+
"button",
|
|
87
|
+
"card",
|
|
88
|
+
"code-copy",
|
|
85
89
|
"confirmationCodeInput",
|
|
86
90
|
"confirmationCode",
|
|
87
|
-
"
|
|
88
|
-
"radioGroup",
|
|
91
|
+
"complexeditor",
|
|
89
92
|
"contentSection",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
93
|
+
"customizable-components",
|
|
94
|
+
"dataGrid",
|
|
95
|
+
"dialog",
|
|
96
|
+
"dropdown",
|
|
97
|
+
"front-end",
|
|
95
98
|
"form",
|
|
96
|
-
"
|
|
99
|
+
"formData",
|
|
100
|
+
"formDataGrid",
|
|
97
101
|
"grid",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"phonenumber",
|
|
106
|
-
"password",
|
|
102
|
+
"incrementNumberField",
|
|
103
|
+
"material-ui",
|
|
104
|
+
"mfa",
|
|
105
|
+
"multiSelectChip",
|
|
106
|
+
"navigation",
|
|
107
|
+
"next.js",
|
|
108
|
+
"node.js",
|
|
107
109
|
"number",
|
|
108
|
-
"
|
|
110
|
+
"password",
|
|
111
|
+
"phonenumber",
|
|
112
|
+
"popup",
|
|
109
113
|
"pricing-table",
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"code-copy",
|
|
115
|
-
"customizable-components",
|
|
114
|
+
"projectBoard",
|
|
115
|
+
"qrCode",
|
|
116
|
+
"radioButton",
|
|
117
|
+
"radioGroup",
|
|
116
118
|
"react-components",
|
|
117
|
-
"
|
|
118
|
-
"front-end",
|
|
119
|
+
"responsive",
|
|
119
120
|
"responsive-design",
|
|
120
|
-
"
|
|
121
|
+
"searchbar",
|
|
122
|
+
"stepper",
|
|
123
|
+
"storybook",
|
|
124
|
+
"tabs",
|
|
125
|
+
"textField",
|
|
126
|
+
"tooltip",
|
|
127
|
+
"transferList",
|
|
128
|
+
"2fa",
|
|
129
|
+
"two-factor-auth",
|
|
130
|
+
"typescript",
|
|
131
|
+
"typography",
|
|
132
|
+
"ui-library"
|
|
121
133
|
],
|
|
122
134
|
"resolutions": {
|
|
123
135
|
"string-width": "^4.2.3",
|
package/src/stories/Button.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
|
|
2
3
|
import './button.css'
|
|
3
4
|
|
|
4
5
|
export interface ButtonProps {
|
|
@@ -22,26 +23,23 @@ export const Button = ({
|
|
|
22
23
|
label,
|
|
23
24
|
...props
|
|
24
25
|
}: ButtonProps) => {
|
|
25
|
-
// Determine which CSS class to apply
|
|
26
26
|
const mode = primary
|
|
27
27
|
? 'storybook-button--primary'
|
|
28
28
|
: 'storybook-button--secondary'
|
|
29
|
-
|
|
30
|
-
// Use inline styles for background color
|
|
31
|
-
const inlineStyles: React.CSSProperties = {
|
|
32
|
-
backgroundColor,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
29
|
return (
|
|
36
30
|
<button
|
|
37
31
|
type="button"
|
|
38
32
|
className={['storybook-button', `storybook-button--${size}`, mode].join(
|
|
39
33
|
' '
|
|
40
34
|
)}
|
|
41
|
-
style={inlineStyles}
|
|
42
35
|
{...props}
|
|
43
36
|
>
|
|
44
37
|
{label}
|
|
38
|
+
<style>{`
|
|
39
|
+
button {
|
|
40
|
+
background-color: ${backgroundColor};
|
|
41
|
+
}
|
|
42
|
+
`}</style>
|
|
45
43
|
</button>
|
|
46
44
|
)
|
|
47
45
|
}
|
|
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>
|
|
|
17
17
|
|
|
18
18
|
export const LoggedOut: Story = {}
|
|
19
19
|
|
|
20
|
-
// More on
|
|
20
|
+
// More on component testing: https://storybook.js.org/docs/writing-tests/component-testing
|
|
21
21
|
export const LoggedIn: Story = {
|
|
22
22
|
play: async ({ canvasElement }) => {
|
|
23
23
|
const canvas = within(canvasElement)
|
package/src/stories/button.css
CHANGED
package/src/stories/page.css
CHANGED
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.storybook-page a {
|
|
25
|
-
color:
|
|
26
|
-
text-decoration: none;
|
|
25
|
+
color: inherit;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
.storybook-page ul {
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
border-radius: 1em;
|
|
43
42
|
background: #e7fdd8;
|
|
44
43
|
padding: 4px 12px;
|
|
45
|
-
color: #
|
|
44
|
+
color: #357a14;
|
|
46
45
|
font-weight: 700;
|
|
47
46
|
font-size: 11px;
|
|
48
47
|
line-height: 12px;
|