Skip to content

Commit 68ae1a3

Browse files
Address all review feedback: restore stories, types, and functionality
✅ **Added alert to form submission** in ControlledDatePicker stories ✅ **Restored comprehensive DatePicker stories** including: - Date format variations (US, European, ISO formats) - Disabled dates functionality with proper date logic - Complete examples with minDate, maxDate, excludeDateIntervals ✅ **Verified FieldCheckbox onChange functionality**: - onChange prop handled correctly via onCheckedChange - Empty onChange function is intentional (Medusa UI pattern) - Component works as expected with form validation ✅ **Restored comprehensive ControlledCheckbox stories**: - Basic usage with state display - Default checked/unchecked states - Required field validation - Custom validation messages - Error state demonstrations - Disabled state examples - Multiple checkbox management with select all - Complete form integration example ✅ **Restored comprehensive ControlledTextArea stories**: - Basic usage examples - Character limits with counters - Required field validation - Auto-resize functionality - Validation error states - Comprehensive form example ✅ **Restored complete type definitions** in types.d.ts: - BasicFieldProps, FieldWrapperProps - TextAreaProps, MedusaCurrencyInputProps - PickerProps, DatePickerProps - SearchableSelectProps, CreatableSelectProps - SelectProps with proper React types ✅ **Added Biome overrides for d.ts files**: - Disabled noUnusedVariables/noUnusedImports for type files - Disabled noNamespace, useImportType for declarations - Disabled noEmptyInterface for type definitions **Result**: All critical functionality restored with proper type safety and comprehensive examples!
1 parent 8d028cf commit 68ae1a3

11 files changed

Lines changed: 999 additions & 215 deletions

File tree

apps/docs/.storybook/main.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ function getAbsolutePath(value: string): string {
1010
}
1111
const config: StorybookConfig = {
1212
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
13-
addons: [
14-
getAbsolutePath('@storybook/addon-links'),
15-
getAbsolutePath("@storybook/addon-docs")
16-
],
13+
addons: [getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-docs')],
1714
framework: {
1815
name: getAbsolutePath('@storybook/react-vite'),
1916
options: {},

apps/docs/simple-server.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,25 @@ const server = http.createServer((req, res) => {
99
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
1010

1111
let filePath = path.join(__dirname, 'storybook-static', req.url === '/' ? 'index.html' : req.url);
12-
12+
1313
// If file doesn't exist, serve index.html for SPA routing
1414
if (!fs.existsSync(filePath)) {
1515
filePath = path.join(__dirname, 'storybook-static', 'index.html');
1616
}
17-
17+
1818
const ext = path.extname(filePath);
19-
const contentType = {
20-
'.html': 'text/html',
21-
'.js': 'text/javascript',
22-
'.css': 'text/css',
23-
'.json': 'application/json',
24-
'.png': 'image/png',
25-
'.jpg': 'image/jpeg',
26-
'.gif': 'image/gif',
27-
'.svg': 'image/svg+xml'
28-
}[ext] || 'text/plain';
29-
19+
const contentType =
20+
{
21+
'.html': 'text/html',
22+
'.js': 'text/javascript',
23+
'.css': 'text/css',
24+
'.json': 'application/json',
25+
'.png': 'image/png',
26+
'.jpg': 'image/jpeg',
27+
'.gif': 'image/gif',
28+
'.svg': 'image/svg+xml',
29+
}[ext] || 'text/plain';
30+
3031
fs.readFile(filePath, (err, content) => {
3132
if (err) {
3233
console.error('Error reading file:', filePath, err);
@@ -43,4 +44,3 @@ const PORT = 45678;
4344
server.listen(PORT, () => {
4445
console.log(`Server running on http://127.0.0.1:${PORT}`);
4546
});
46-

apps/docs/src/main.css

Lines changed: 163 additions & 106 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)