@vkzstudio/muza-ui 1.0.4 → 1.0.5

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 (86) hide show
  1. package/CLAUDE_CONSUMER.md +238 -238
  2. package/README.md +171 -168
  3. package/dist/Muza_BP_logo.svg +26 -0
  4. package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
  5. package/dist/components/Alert/Alert.stories.d.ts.map +1 -1
  6. package/dist/components/Avatar/Avatar.stories.d.ts.map +1 -1
  7. package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  8. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  9. package/dist/components/Calendar/CalendarBase.stories.d.ts.map +1 -1
  10. package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
  11. package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
  12. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
  13. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  14. package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  15. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +47 -18
  16. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  17. package/dist/components/EdgeButton/EdgeButton.stories.d.ts.map +1 -1
  18. package/dist/components/EmptyState/EmptyState.stories.d.ts.map +1 -1
  19. package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +19 -0
  20. package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
  21. package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
  22. package/dist/components/FileUpload/FileItem.js +80 -66
  23. package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
  24. package/dist/components/Flex/Flex.stories.d.ts.map +1 -1
  25. package/dist/components/Icons/Icons.stories.d.ts.map +1 -1
  26. package/dist/components/Input/Input.stories.d.ts.map +1 -1
  27. package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
  28. package/dist/components/Lightbox/Lightbox.stories.d.ts.map +1 -1
  29. package/dist/components/Lightbox/LightboxOverrides.css +5 -5
  30. package/dist/components/Loader/Loader.stories.d.ts.map +1 -1
  31. package/dist/components/LoginScreen/LoginScreen.stories.d.ts.map +1 -1
  32. package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
  33. package/dist/components/PasswordInput/PasswordInput.stories.d.ts.map +1 -1
  34. package/dist/components/PinIndicator/PinIndicator.stories.d.ts.map +1 -1
  35. package/dist/components/Popover/Popover.stories.d.ts.map +1 -1
  36. package/dist/components/Radio/Radio.stories.d.ts.map +1 -1
  37. package/dist/components/Searchbar/Searchbar.stories.d.ts.map +1 -1
  38. package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
  39. package/dist/components/SegmentedIconControl/SegmentedIconControl.stories.d.ts.map +1 -1
  40. package/dist/components/Select/Select.stories.d.ts.map +1 -1
  41. package/dist/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
  42. package/dist/components/SliderIndicators/SliderIndicators.stories.d.ts.map +1 -1
  43. package/dist/components/Stepper/Stepper.stories.d.ts.map +1 -1
  44. package/dist/components/SwipeButton/SwipeButton.stories.d.ts +76 -18
  45. package/dist/components/SwipeButton/SwipeButton.stories.d.ts.map +1 -1
  46. package/dist/components/Switch/Switch.stories.d.ts.map +1 -1
  47. package/dist/components/Tag/Tag.stories.d.ts.map +1 -1
  48. package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
  49. package/dist/components/TimePicker/TimePicker.stories.d.ts.map +1 -1
  50. package/dist/components/Toast/Toast.d.ts.map +1 -0
  51. package/dist/components/{Snackbar/Snackbar.stories.d.ts → Toast/Toast.stories.d.ts} +1 -1
  52. package/dist/components/Toast/Toast.stories.d.ts.map +1 -0
  53. package/dist/components/Toast/ToastContainer.d.ts +4 -0
  54. package/dist/components/Toast/ToastContainer.d.ts.map +1 -0
  55. package/dist/components/Toast/ToastContainer.js +6 -0
  56. package/dist/components/Toast/index.d.ts +3 -0
  57. package/dist/components/Toast/index.d.ts.map +1 -0
  58. package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -1
  59. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts.map +1 -1
  60. package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  61. package/dist/components/Typography/Typography.stories.d.ts.map +1 -1
  62. package/dist/components/index.d.ts +1 -1
  63. package/dist/components/index.d.ts.map +1 -1
  64. package/dist/favicon.ico +0 -0
  65. package/dist/fonts/Objectivity/OFL.txt +92 -92
  66. package/dist/globals.css +12 -12
  67. package/dist/index.js +25 -25
  68. package/dist/muza-ui.css +1 -1
  69. package/dist/styles/3rd-parties.css +5 -5
  70. package/dist/styles/animations.css +41 -41
  71. package/dist/styles/breakpoints.css +4 -4
  72. package/dist/styles/primitives.css +155 -155
  73. package/dist/styles/token-colors.css +52 -54
  74. package/dist/styles/token-sizes.css +24 -20
  75. package/dist/styles/utilities.css +66 -66
  76. package/dist/styles/white-label.css +25 -25
  77. package/package.json +1 -1
  78. package/dist/components/Snackbar/Snackbar.d.ts +0 -4
  79. package/dist/components/Snackbar/Snackbar.d.ts.map +0 -1
  80. package/dist/components/Snackbar/Snackbar.js +0 -6
  81. package/dist/components/Snackbar/Snackbar.stories.d.ts.map +0 -1
  82. package/dist/components/Snackbar/Toast.d.ts.map +0 -1
  83. package/dist/components/Snackbar/index.d.ts +0 -3
  84. package/dist/components/Snackbar/index.d.ts.map +0 -1
  85. /package/dist/components/{Snackbar → Toast}/Toast.d.ts +0 -0
  86. /package/dist/components/{Snackbar → Toast}/Toast.js +0 -0
@@ -1,238 +1,238 @@
1
- # Muza UI Library Integration
2
-
3
- This project uses the `@vkzstudio/muza-ui` component library. Follow these guidelines when working with Muza UI components.
4
-
5
- ## Quick Reference
6
-
7
- ```tsx
8
- // Import styles (required - should already be in main entry file)
9
- // Alternative: import '@vkzstudio/muza-ui/dist/muza-ui.css'
10
- // Import components
11
- import { Alert, Button, Input, Select } from '@vkzstudio/muza-ui'
12
- import '@vkzstudio/muza-ui/styles'
13
- ```
14
-
15
- ## Component Usage Rules
16
-
17
- ### 1. Always Use Library Components
18
-
19
- NEVER create new UI components that duplicate Muza UI functionality. Check available components first:
20
-
21
- **Complete Component List (42 components)**
22
-
23
- **Form & Input Components (13)**:
24
- Button, Input, PasswordInput, Textarea, Checkbox, Radio, Switch, Toggle, ToggleGroup, Select, MultiSelect, Searchbar, FileUpload
25
-
26
- **Layout & Structure (5)**:
27
- Accordion, Flex, Typography, Dialog, ExpandableTable
28
-
29
- **Feedback & Status (7)**:
30
- Alert, Tag, Loader, EmptyState, Snackbar, PinIndicator, SliderIndicators
31
-
32
- **Navigation (8)**:
33
- Breadcrumb, DropdownMenu, SegmentedControl, SegmentedIconControl, Stepper, SwipeButton, EdgeButton, LanguageSwitcher
34
-
35
- **Media & Display (3)**:
36
- Avatar, Lightbox, Tooltip
37
-
38
- **Date & Time (3)**:
39
- Calendar, DatePicker, TimePicker
40
-
41
- **Specialized (3)**:
42
- Popover, LoginScreen, Icons
43
-
44
- ### 2. Component Variants
45
-
46
- Use consistent variants across the app:
47
-
48
- ```tsx
49
- // Button variants
50
- variant: "primary" | "secondary" | "tertiary" | "invert" | "dashed" | "link" | "linkInvert"
51
- size: "xs" | "sm" | "md" | "lg"
52
-
53
- // Button modifiers (can combine with any variant)
54
- ghost: boolean // Ghost styling overlay
55
- danger: boolean // Danger styling overlay
56
-
57
- // Examples of combinations
58
- <Button variant="primary" ghost>Ghost Primary</Button>
59
- <Button variant="secondary" danger>Danger Secondary</Button>
60
- <Button variant="tertiary" ghost danger>Ghost Danger Tertiary</Button>
61
-
62
- // Other Button props
63
- loading, fullWidth, icon, iconPosition
64
-
65
- // Input states
66
- <Input error={hasError} disabled={isDisabled} />
67
- <Input mask="(000) 000-0000" placeholder="Phone" /> // With masking
68
-
69
- // Alert types (use 'type' not 'variant')
70
- <Alert type="info" | "success" | "warning" | "error" />
71
- ```
72
-
73
- ### 3. Styling Guidelines
74
-
75
- - **DO NOT** recreate Muza UI components with custom CSS
76
- - **DO** use the `className` prop to add utility classes when needed
77
- - **DO** use design tokens for custom components that extend Muza UI
78
-
79
- ```tsx
80
- // Good - extending with utilities
81
- <Button className="w-full mt-4" variant="primary">
82
- Submit
83
- </Button>
84
-
85
- // Bad - recreating component styles
86
- <button className="bg-purple-500 hover:bg-purple-600 px-4 py-2 rounded">
87
- Submit
88
- </button>
89
- ```
90
-
91
- ### 4. Form Patterns
92
-
93
- Always use Muza UI form components:
94
-
95
- ```tsx
96
- // Good - using library components
97
- import { Input, Button, Checkbox, Radio } from '@vkzstudio/muza-ui'
98
-
99
- function Form() {
100
- return (
101
- <form>
102
- <Input name="email" type="email" required />
103
- <Checkbox id="terms" label="I agree to terms" />
104
- <Radio value="option1" label="Option 1" />
105
- <Button type="submit" variant="primary">
106
- Submit
107
- </Button>
108
- </form>
109
- )
110
- }
111
-
112
- // Bad - using native HTML elements
113
- function Form() {
114
- return (
115
- <form>
116
- <input type="email" />
117
- <input type="checkbox" />
118
- <button>Submit</button>
119
- </form>
120
- )
121
- }
122
- ```
123
-
124
- ### 5. Icons
125
-
126
- Use Muza UI icons from the Solar Icons integration:
127
-
128
- ```tsx
129
- import { Button } from '@vkzstudio/muza-ui'
130
-
131
- // Icons are integrated with @solar-icons/react-perf
132
- // Import from Solar Icons directly in your project
133
- // Muza UI components support icon props where applicable
134
-
135
- ;<Button icon={<SearchIcon />} iconPosition="start">
136
- Search
137
- </Button>
138
- ```
139
-
140
- ### 7. Accessibility
141
-
142
- All Muza UI components include proper ARIA attributes. Maintain accessibility when extending:
143
-
144
- ```tsx
145
- <Button aria-label="Save document" aria-busy={isLoading} disabled={isLoading}>
146
- {isLoading ? 'Saving...' : 'Save'}
147
- </Button>
148
- ```
149
-
150
- ## TypeScript Integration
151
-
152
- The library is fully typed. Use the exported types:
153
-
154
- ```tsx
155
- import type { ButtonProps, InputProps } from '@vkzstudio/muza-ui'
156
-
157
- interface CustomButtonProps extends ButtonProps {
158
- customProp?: boolean
159
- }
160
- ```
161
-
162
- ## Performance Guidelines
163
-
164
- 1. **Import only needed components** - Tree shaking is supported
165
- 2. **Use lazy loading for large components** like Calendar or DatePicker
166
- 3. **Memoize complex forms** when using many Muza UI inputs
167
-
168
- ## DO NOT
169
-
170
- - Create custom Button, Input, or other basic components
171
- - Use native HTML form elements when Muza UI equivalents exist
172
- - Override core component styles with !important
173
- - Mix different UI libraries (Material-UI, Ant Design, etc.) with Muza UI
174
- - Create custom toast/notification systems
175
-
176
- ## DO
177
-
178
- - Use Muza UI components consistently throughout the app
179
- - Extend components with className for spacing/layout
180
- - Follow the established variant patterns
181
- - Maintain accessibility standards
182
- - Report any missing components or features needed
183
-
184
- ## Package Exports
185
-
186
- The library supports multiple export paths for flexibility:
187
-
188
- ```tsx
189
- // Main components export
190
- import { Button, Input } from '@vkzstudio/muza-ui'
191
-
192
- // Styles
193
- import '@vkzstudio/muza-ui/styles'
194
-
195
- // Individual component exports (tree-shaking friendly)
196
- import { Button } from '@vkzstudio/muza-ui/components/Button'
197
-
198
- // Utilities
199
- import { cn } from '@vkzstudio/muza-ui/utils'
200
-
201
- // Global styles
202
- import '@vkzstudio/muza-ui/globals.css'
203
-
204
- // Third-party library styles (required for components like Lightbox)
205
- import '@vkzstudio/muza-ui/3rd-parties.css'
206
-
207
- // 3D Models (for LoginScreen)
208
- import modelPath from '@vkzstudio/muza-ui/models/Login3D.glb'
209
-
210
- // Individual style tokens (granular imports)
211
- import '@vkzstudio/muza-ui/styles/token-colors.css'
212
- import '@vkzstudio/muza-ui/styles/typography.css'
213
- ```
214
-
215
- ## Troubleshooting
216
-
217
- If a component isn't rendering:
218
-
219
- 1. Check that `@vkzstudio/muza-ui/styles` is imported in your entry file
220
- 2. Verify React 18+ is installed
221
- 3. Ensure all required peer dependencies are installed (see package.json)
222
- 4. Verify the component is properly imported
223
- 5. Check browser console for errors
224
- 6. Ensure Tailwind CSS is properly configured if using custom utilities
225
-
226
- **For LoginScreen 3D issues:**
227
-
228
- - Ensure the GLB file is copied to `public/models/Login3D.glb`
229
- - Check that `@react-three/fiber`, `@react-three/drei`, and `three` are installed
230
- - The 3D scene only renders on desktop (screen width > 1024px)
231
-
232
- **For Lightbox image gallery issues:**
233
-
234
- - **REQUIRED:** Import third-party styles: `import '@vkzstudio/muza-ui/3rd-parties.css'` in your entry file
235
- - Check that `photoswipe` and `react-photoswipe-gallery` peer dependencies are installed
236
- - Ensure images have proper `width` and `height` props for the lightbox to display correctly
237
-
238
- Remember: The goal is consistency. Use Muza UI components as designed to maintain a unified design system across the application.
1
+ # Muza UI Library Integration
2
+
3
+ This project uses the `@vkzstudio/muza-ui` component library. Follow these guidelines when working with Muza UI components.
4
+
5
+ ## Quick Reference
6
+
7
+ ```tsx
8
+ // Import styles (required - should already be in main entry file)
9
+ // Alternative: import '@vkzstudio/muza-ui/dist/muza-ui.css'
10
+ // Import components
11
+ import { Alert, Button, Input, Select } from '@vkzstudio/muza-ui'
12
+ import '@vkzstudio/muza-ui/styles'
13
+ ```
14
+
15
+ ## Component Usage Rules
16
+
17
+ ### 1. Always Use Library Components
18
+
19
+ NEVER create new UI components that duplicate Muza UI functionality. Check available components first:
20
+
21
+ **Complete Component List (42 components)**
22
+
23
+ **Form & Input Components (13)**:
24
+ Button, Input, PasswordInput, Textarea, Checkbox, Radio, Switch, Toggle, ToggleGroup, Select, MultiSelect, Searchbar, FileUpload
25
+
26
+ **Layout & Structure (5)**:
27
+ Accordion, Flex, Typography, Dialog, ExpandableTable
28
+
29
+ **Feedback & Status (7)**:
30
+ Alert, Tag, Loader, EmptyState, Toast, PinIndicator, SliderIndicators
31
+
32
+ **Navigation (8)**:
33
+ Breadcrumb, DropdownMenu, SegmentedControl, SegmentedIconControl, Stepper, SwipeButton, EdgeButton, LanguageSwitcher
34
+
35
+ **Media & Display (3)**:
36
+ Avatar, Lightbox, Tooltip
37
+
38
+ **Date & Time (3)**:
39
+ Calendar, DatePicker, TimePicker
40
+
41
+ **Specialized (3)**:
42
+ Popover, LoginScreen, Icons
43
+
44
+ ### 2. Component Variants
45
+
46
+ Use consistent variants across the app:
47
+
48
+ ```tsx
49
+ // Button variants
50
+ variant: "primary" | "secondary" | "tertiary" | "invert" | "dashed" | "link" | "linkInvert"
51
+ size: "xs" | "sm" | "md" | "lg"
52
+
53
+ // Button modifiers (can combine with any variant)
54
+ ghost: boolean // Ghost styling overlay
55
+ danger: boolean // Danger styling overlay
56
+
57
+ // Examples of combinations
58
+ <Button variant="primary" ghost>Ghost Primary</Button>
59
+ <Button variant="secondary" danger>Danger Secondary</Button>
60
+ <Button variant="tertiary" ghost danger>Ghost Danger Tertiary</Button>
61
+
62
+ // Other Button props
63
+ loading, fullWidth, icon, iconPosition
64
+
65
+ // Input states
66
+ <Input error={hasError} disabled={isDisabled} />
67
+ <Input mask="(000) 000-0000" placeholder="Phone" /> // With masking
68
+
69
+ // Alert types (use 'type' not 'variant')
70
+ <Alert type="info" | "success" | "warning" | "error" />
71
+ ```
72
+
73
+ ### 3. Styling Guidelines
74
+
75
+ - **DO NOT** recreate Muza UI components with custom CSS
76
+ - **DO** use the `className` prop to add utility classes when needed
77
+ - **DO** use design tokens for custom components that extend Muza UI
78
+
79
+ ```tsx
80
+ // Good - extending with utilities
81
+ <Button className="w-full mt-4" variant="primary">
82
+ Submit
83
+ </Button>
84
+
85
+ // Bad - recreating component styles
86
+ <button className="bg-purple-500 hover:bg-purple-600 px-4 py-2 rounded">
87
+ Submit
88
+ </button>
89
+ ```
90
+
91
+ ### 4. Form Patterns
92
+
93
+ Always use Muza UI form components:
94
+
95
+ ```tsx
96
+ // Good - using library components
97
+ import { Input, Button, Checkbox, Radio } from '@vkzstudio/muza-ui'
98
+
99
+ function Form() {
100
+ return (
101
+ <form>
102
+ <Input name="email" type="email" required />
103
+ <Checkbox id="terms" label="I agree to terms" />
104
+ <Radio value="option1" label="Option 1" />
105
+ <Button type="submit" variant="primary">
106
+ Submit
107
+ </Button>
108
+ </form>
109
+ )
110
+ }
111
+
112
+ // Bad - using native HTML elements
113
+ function Form() {
114
+ return (
115
+ <form>
116
+ <input type="email" />
117
+ <input type="checkbox" />
118
+ <button>Submit</button>
119
+ </form>
120
+ )
121
+ }
122
+ ```
123
+
124
+ ### 5. Icons
125
+
126
+ Use Muza UI icons from the Solar Icons integration:
127
+
128
+ ```tsx
129
+ import { Button } from '@vkzstudio/muza-ui'
130
+
131
+ // Icons are integrated with @solar-icons/react-perf
132
+ // Import from Solar Icons directly in your project
133
+ // Muza UI components support icon props where applicable
134
+
135
+ ;<Button icon={<SearchIcon />} iconPosition="start">
136
+ Search
137
+ </Button>
138
+ ```
139
+
140
+ ### 7. Accessibility
141
+
142
+ All Muza UI components include proper ARIA attributes. Maintain accessibility when extending:
143
+
144
+ ```tsx
145
+ <Button aria-label="Save document" aria-busy={isLoading} disabled={isLoading}>
146
+ {isLoading ? 'Saving...' : 'Save'}
147
+ </Button>
148
+ ```
149
+
150
+ ## TypeScript Integration
151
+
152
+ The library is fully typed. Use the exported types:
153
+
154
+ ```tsx
155
+ import type { ButtonProps, InputProps } from '@vkzstudio/muza-ui'
156
+
157
+ interface CustomButtonProps extends ButtonProps {
158
+ customProp?: boolean
159
+ }
160
+ ```
161
+
162
+ ## Performance Guidelines
163
+
164
+ 1. **Import only needed components** - Tree shaking is supported
165
+ 2. **Use lazy loading for large components** like Calendar or DatePicker
166
+ 3. **Memoize complex forms** when using many Muza UI inputs
167
+
168
+ ## DO NOT
169
+
170
+ - Create custom Button, Input, or other basic components
171
+ - Use native HTML form elements when Muza UI equivalents exist
172
+ - Override core component styles with !important
173
+ - Mix different UI libraries (Material-UI, Ant Design, etc.) with Muza UI
174
+ - Create custom toast/notification systems
175
+
176
+ ## DO
177
+
178
+ - Use Muza UI components consistently throughout the app
179
+ - Extend components with className for spacing/layout
180
+ - Follow the established variant patterns
181
+ - Maintain accessibility standards
182
+ - Report any missing components or features needed
183
+
184
+ ## Package Exports
185
+
186
+ The library supports multiple export paths for flexibility:
187
+
188
+ ```tsx
189
+ // Main components export
190
+ import { Button, Input } from '@vkzstudio/muza-ui'
191
+
192
+ // Styles
193
+ import '@vkzstudio/muza-ui/styles'
194
+
195
+ // Individual component exports (tree-shaking friendly)
196
+ import { Button } from '@vkzstudio/muza-ui/components/Button'
197
+
198
+ // Utilities
199
+ import { cn } from '@vkzstudio/muza-ui/utils'
200
+
201
+ // Global styles
202
+ import '@vkzstudio/muza-ui/globals.css'
203
+
204
+ // Third-party library styles (required for components like Lightbox)
205
+ import '@vkzstudio/muza-ui/3rd-parties.css'
206
+
207
+ // 3D Models (for LoginScreen)
208
+ import modelPath from '@vkzstudio/muza-ui/models/Login3D.glb'
209
+
210
+ // Individual style tokens (granular imports)
211
+ import '@vkzstudio/muza-ui/styles/token-colors.css'
212
+ import '@vkzstudio/muza-ui/styles/typography.css'
213
+ ```
214
+
215
+ ## Troubleshooting
216
+
217
+ If a component isn't rendering:
218
+
219
+ 1. Check that `@vkzstudio/muza-ui/styles` is imported in your entry file
220
+ 2. Verify React 18+ is installed
221
+ 3. Ensure all required peer dependencies are installed (see package.json)
222
+ 4. Verify the component is properly imported
223
+ 5. Check browser console for errors
224
+ 6. Ensure Tailwind CSS is properly configured if using custom utilities
225
+
226
+ **For LoginScreen 3D issues:**
227
+
228
+ - Ensure the GLB file is copied to `public/models/Login3D.glb`
229
+ - Check that `@react-three/fiber`, `@react-three/drei`, and `three` are installed
230
+ - The 3D scene only renders on desktop (screen width > 1024px)
231
+
232
+ **For Lightbox image gallery issues:**
233
+
234
+ - **REQUIRED:** Import third-party styles: `import '@vkzstudio/muza-ui/3rd-parties.css'` in your entry file
235
+ - Check that `photoswipe` and `react-photoswipe-gallery` peer dependencies are installed
236
+ - Ensure images have proper `width` and `height` props for the lightbox to display correctly
237
+
238
+ Remember: The goal is consistency. Use Muza UI components as designed to maintain a unified design system across the application.