@kenpan/zds-r8f3v1 0.2.0 → 0.3.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.
Files changed (113) hide show
  1. package/dist/_virtual/index.js +5 -3
  2. package/dist/_virtual/index.js.map +1 -1
  3. package/dist/_virtual/index2.js +3 -2
  4. package/dist/_virtual/index2.js.map +1 -1
  5. package/dist/_virtual/index3.js +2 -2
  6. package/dist/_virtual/index5.js +2 -5
  7. package/dist/_virtual/index5.js.map +1 -1
  8. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/AppBar/AppBar.js +1 -1
  9. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Autocomplete/Autocomplete.js +1 -1
  10. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Avatar/Avatar.js +1 -1
  11. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Backdrop/Backdrop.js +1 -1
  12. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Box/Box.js +1 -1
  13. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Button/Button.js +1 -1
  14. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ButtonBase/ButtonBase.js +1 -1
  15. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ButtonBase/Ripple.js +1 -1
  16. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ButtonBase/TouchRipple.js +1 -1
  17. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Checkbox/Checkbox.js +1 -1
  18. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Chip/Chip.js +1 -1
  19. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/CircularProgress/CircularProgress.js +1 -1
  20. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ClickAwayListener/ClickAwayListener.js +1 -1
  21. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Collapse/Collapse.js +1 -1
  22. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/DefaultPropsProvider/DefaultPropsProvider.js +1 -1
  23. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Dialog/Dialog.js +1 -1
  24. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Divider/Divider.js +1 -1
  25. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Drawer/Drawer.js +1 -1
  26. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Fade/Fade.js +1 -1
  27. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/FilledInput/FilledInput.js +1 -1
  28. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/FormControl/FormControl.js +1 -1
  29. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/FormGroup/FormGroup.js +1 -1
  30. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/FormHelperText/FormHelperText.js +1 -1
  31. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/FormLabel/FormLabel.js +1 -1
  32. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/GlobalStyles/GlobalStyles.js +1 -1
  33. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Grow/Grow.js +1 -1
  34. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/IconButton/IconButton.js +1 -1
  35. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Input/Input.js +1 -1
  36. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/InputAdornment/InputAdornment.js +1 -1
  37. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/InputBase/InputBase.js +1 -1
  38. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/InputLabel/InputLabel.js +1 -1
  39. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/LinearProgress/LinearProgress.js +1 -1
  40. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/List/List.js +1 -1
  41. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ListItemButton/ListItemButton.js +1 -1
  42. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js +1 -1
  43. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ListItemText/ListItemText.js +1 -1
  44. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/ListSubheader/ListSubheader.js +1 -1
  45. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Menu/Menu.js +2 -2
  46. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/MenuItem/MenuItem.js +1 -1
  47. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/MenuList/MenuList.js +2 -2
  48. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Modal/Modal.js +1 -1
  49. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/NativeSelect/NativeSelectInput.js +1 -1
  50. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/OutlinedInput/NotchedOutline.js +1 -1
  51. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/OutlinedInput/OutlinedInput.js +1 -1
  52. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Paper/Paper.js +1 -1
  53. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Popover/Popover.js +1 -1
  54. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Popper/BasePopper.js +1 -1
  55. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Popper/Popper.js +1 -1
  56. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Portal/Portal.js +1 -1
  57. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Radio/Radio.js +1 -1
  58. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Radio/RadioButtonIcon.js +1 -1
  59. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/RadioGroup/RadioGroup.js +1 -1
  60. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Select/Select.js +1 -1
  61. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Select/SelectInput.js +2 -2
  62. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Skeleton/Skeleton.js +1 -1
  63. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Slide/Slide.js +1 -1
  64. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Slider/Slider.js +1 -1
  65. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Slider/SliderValueLabel.js +1 -1
  66. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Snackbar/Snackbar.js +1 -1
  67. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/SnackbarContent/SnackbarContent.js +1 -1
  68. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Stack/Stack.js +1 -1
  69. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Step/Step.js +1 -1
  70. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/StepConnector/StepConnector.js +1 -1
  71. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/StepIcon/StepIcon.js +1 -1
  72. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/StepLabel/StepLabel.js +1 -1
  73. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Stepper/Stepper.js +1 -1
  74. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/SvgIcon/SvgIcon.js +1 -1
  75. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Switch/Switch.js +1 -1
  76. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Tab/Tab.js +1 -1
  77. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/TabScrollButton/TabScrollButton.js +1 -1
  78. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Tabs/ScrollbarSize.js +1 -1
  79. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Tabs/Tabs.js +2 -2
  80. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/TextField/TextField.js +1 -1
  81. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/TextareaAutosize/TextareaAutosize.js +1 -1
  82. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Toolbar/Toolbar.js +1 -1
  83. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Tooltip/Tooltip.js +1 -1
  84. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Typography/Typography.js +1 -1
  85. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/Unstable_TrapFocus/FocusTrap.js +1 -1
  86. package/dist/packages/zenith-ui/node_modules/@mui/material/esm/internal/SwitchBase.js +1 -1
  87. package/dist/packages/zenith-ui/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js +1 -1
  88. package/dist/packages/zenith-ui/node_modules/@mui/system/esm/RtlProvider/index.js +1 -1
  89. package/dist/packages/zenith-ui/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js +1 -1
  90. package/dist/packages/zenith-ui/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +1 -1
  91. package/dist/packages/zenith-ui/node_modules/@mui/utils/esm/elementAcceptingRef/elementAcceptingRef.js +1 -1
  92. package/dist/packages/zenith-ui/node_modules/@mui/utils/esm/elementTypeAcceptingRef/elementTypeAcceptingRef.js +1 -1
  93. package/dist/packages/zenith-ui/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js +1 -1
  94. package/dist/packages/zenith-ui/node_modules/@mui/utils/esm/refType/refType.js +1 -1
  95. package/dist/packages/zenith-ui/node_modules/prop-types/index.js +1 -1
  96. package/dist/packages/zenith-ui/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  97. package/dist/packages/zenith-ui/node_modules/react-is/index.js +1 -1
  98. package/dist/packages/zenith-ui/node_modules/react-transition-group/esm/Transition.js +1 -1
  99. package/dist/packages/zenith-ui/node_modules/react-transition-group/esm/TransitionGroup.js +1 -1
  100. package/dist/packages/zenith-ui/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
  101. package/guidelines/Guidelines.md +67 -0
  102. package/guidelines/components/button.md +127 -43
  103. package/guidelines/components/dialog.md +164 -87
  104. package/guidelines/components/forms.md +239 -77
  105. package/guidelines/components/table.md +221 -87
  106. package/guidelines/design-tokens/colors.md +181 -0
  107. package/guidelines/design-tokens/spacing.md +135 -0
  108. package/guidelines/design-tokens/typography.md +146 -0
  109. package/guidelines/overview-components.md +136 -0
  110. package/guidelines/overview-icons.md +144 -0
  111. package/package.json +1 -1
  112. package/guidelines/overview.md +0 -81
  113. package/guidelines/tokens.md +0 -149
@@ -0,0 +1,146 @@
1
+ # ZDS Typography Design Tokens
2
+
3
+ ZDS uses a comprehensive typography system based on the Inter font family with consistent sizing, weights, and line heights.
4
+
5
+ ## Font Family
6
+
7
+ ```tsx
8
+ theme.typography.fontFamily // 'Inter', -apple-system, sans-serif
9
+ ```
10
+
11
+ ## Typography Scale
12
+
13
+ ZDS provides typography variants organized by purpose and size:
14
+
15
+ ### Display Text
16
+ For large headlines and hero sections.
17
+
18
+ | Variant | Font Size | Line Height | Weight | Usage |
19
+ |---------|-----------|-------------|--------|-------|
20
+ | `display-2xl` | 72px | 90px | 600 | Hero headlines |
21
+ | `display-xl` | 60px | 72px | 600 | Page titles |
22
+ | `display-lg` | 48px | 60px | 600 | Section headers |
23
+ | `display-md` | 36px | 44px | 600 | Card headers |
24
+ | `display-sm` | 30px | 38px | 600 | Subsections |
25
+ | `display-xs` | 24px | 32px | 600 | Small headers |
26
+
27
+ ### Text (Body)
28
+ For body text and UI elements.
29
+
30
+ | Variant | Font Size | Line Height | Weight | Usage |
31
+ |---------|-----------|-------------|--------|-------|
32
+ | `text-xl` | 20px | 30px | 400/500 | Large body text |
33
+ | `text-lg` | 18px | 28px | 400/500 | Body text |
34
+ | `text-md` | 16px | 24px | 400/500 | **Default body** |
35
+ | `text-sm` | 14px | 20px | 400/500 | Small text, labels |
36
+ | `text-xs` | 12px | 18px | 400/500 | Captions, badges |
37
+
38
+ ### Weight Variants
39
+
40
+ Each text size has regular and medium variants:
41
+ - `text-sm` (400 weight) - Regular
42
+ - `text-sm-medium` (500 weight) - Medium/emphasized
43
+
44
+ ## Usage Examples
45
+
46
+ ### Using Typography Variants
47
+
48
+ ```tsx
49
+ import Typography from '@mui/material/Typography'
50
+
51
+ // Display text
52
+ <Typography variant="display-lg">Welcome</Typography>
53
+
54
+ // Body text with custom weight
55
+ <Typography sx={(theme) => ({
56
+ fontSize: theme.typography['text-sm-medium'].fontSize,
57
+ fontWeight: theme.typography['text-sm-medium'].fontWeight,
58
+ lineHeight: theme.typography['text-sm-medium'].lineHeight,
59
+ })}>
60
+ Label Text
61
+ </Typography>
62
+ ```
63
+
64
+ ### Common Text Styles
65
+
66
+ ```tsx
67
+ // Page title
68
+ <Typography
69
+ variant="h1"
70
+ sx={(theme) => ({
71
+ fontSize: 30,
72
+ fontWeight: 600,
73
+ lineHeight: '38px',
74
+ })}
75
+ >
76
+ Page Title
77
+ </Typography>
78
+
79
+ // Body text
80
+ <Typography
81
+ sx={(theme) => ({
82
+ fontSize: 14,
83
+ fontWeight: 400,
84
+ lineHeight: '20px',
85
+ color: theme.palette.ds?.onsurface ?? '#364152',
86
+ })}
87
+ >
88
+ Body content here
89
+ </Typography>
90
+
91
+ // Caption/small text
92
+ <Typography
93
+ sx={(theme) => ({
94
+ fontSize: 12,
95
+ fontWeight: 400,
96
+ lineHeight: '18px',
97
+ color: theme.palette.ds?.onsurfacevariant ?? '#697586',
98
+ })}
99
+ >
100
+ Caption text
101
+ </Typography>
102
+ ```
103
+
104
+ ## Font Weights
105
+
106
+ | Weight | Value | Usage |
107
+ |--------|-------|-------|
108
+ | Regular | 400 | Body text |
109
+ | Medium | 500 | Labels, emphasized text |
110
+ | Semibold | 600 | Headings, buttons |
111
+ | Bold | 700 | Strong emphasis |
112
+
113
+ ## Line Heights
114
+
115
+ ZDS uses consistent line height ratios:
116
+
117
+ | Text Size | Line Height | Ratio |
118
+ |-----------|-------------|-------|
119
+ | 12px | 18px | 1.5 |
120
+ | 14px | 20px | 1.43 |
121
+ | 16px | 24px | 1.5 |
122
+ | 18px | 28px | 1.56 |
123
+ | 20px | 30px | 1.5 |
124
+ | 24px | 32px | 1.33 |
125
+
126
+ ## Best Practices
127
+
128
+ 1. **Use text-sm for UI elements**: Buttons, labels, table cells use 14px
129
+ 2. **Use text-md for body content**: Main content uses 16px
130
+ 3. **Use text-xs sparingly**: Only for badges, captions, metadata
131
+ 4. **Maintain hierarchy**: Use different sizes to create visual hierarchy
132
+ 5. **Consistent weights**: Use 400 for body, 500 for labels, 600 for headings
133
+ 6. **Don't mix fonts**: Stick to Inter for all UI text
134
+
135
+ ## Recommended Text Sizes
136
+
137
+ | Element | Size | Weight |
138
+ |---------|------|--------|
139
+ | Page title | 30px | 600 |
140
+ | Section header | 18-20px | 600 |
141
+ | Card title | 16px | 600 |
142
+ | Body text | 14-16px | 400 |
143
+ | Button text | 14px | 500 |
144
+ | Label | 14px | 500 |
145
+ | Caption | 12px | 400 |
146
+ | Badge | 12px | 500 |
@@ -0,0 +1,136 @@
1
+ # ZDS Components Overview
2
+
3
+ Always prefer components from the ZDS package (imported from `@kenpan/zds-r8f3v1`) if they are available. Each component has a guidelines file that contains helpful examples and additional context.
4
+
5
+ ## Available Components
6
+
7
+ | Component | Overview | Guidelines file |
8
+ |-----------|----------|-----------------|
9
+ | Button | Primary action button with multiple variants | [button.md](components/button.md) |
10
+ | Card | Container component with header support | - |
11
+ | Badge | Status indicators and labels | - |
12
+ | Tag | Removable labels with icons and avatars | - |
13
+ | Tooltip | Contextual information on hover | - |
14
+ | Alert | Feedback messages with different intents | - |
15
+ | Toast | Notification messages | - |
16
+ | Dialog | Modal dialogs | [dialog.md](components/dialog.md) |
17
+ | Table | Data grid with sorting and pagination | [table.md](components/table.md) |
18
+ | InputField | Text input with label and validation | [forms.md](components/forms.md) |
19
+ | Checkbox | Checkbox with label and description | [forms.md](components/forms.md) |
20
+ | Radio | Radio button groups | [forms.md](components/forms.md) |
21
+ | Switch | Toggle switches | [forms.md](components/forms.md) |
22
+ | Slider | Range sliders | [forms.md](components/forms.md) |
23
+
24
+ ## General Component Usage and Best Practices
25
+
26
+ ### Import Pattern
27
+
28
+ ```tsx
29
+ // Import components from the main package
30
+ import { Button, Card, Alert, Badge, Tag } from '@kenpan/zds-r8f3v1'
31
+
32
+ // Import theme separately
33
+ import { theme } from '@kenpan/zds-r8f3v1/theme'
34
+
35
+ // Import icons separately
36
+ import { ChevronDownIcon, PlusIcon, SearchSmIcon } from '@kenpan/zds-r8f3v1/icons'
37
+ ```
38
+
39
+ ### Theme Provider Required
40
+
41
+ **IMPORTANT:** All ZDS components must be wrapped in a ThemeProvider with the ZDS theme:
42
+
43
+ ```tsx
44
+ import { ThemeProvider } from '@mui/material/styles'
45
+ import { theme } from '@kenpan/zds-r8f3v1/theme'
46
+
47
+ function App() {
48
+ return (
49
+ <ThemeProvider theme={theme}>
50
+ {/* Your components here */}
51
+ </ThemeProvider>
52
+ )
53
+ }
54
+ ```
55
+
56
+ ### Common Props
57
+
58
+ Most ZDS components accept these common props:
59
+ - `disabled`: Boolean to disable the component
60
+ - `sx`: MUI sx prop for additional styling (use sparingly)
61
+ - `className`: String for additional CSS classes (avoid when possible)
62
+ - `data-*`: data attributes are always allowed
63
+
64
+ ### Sizing
65
+
66
+ Most components support a `size` prop:
67
+ - `"sm"` or `"small"` - Compact size
68
+ - `"md"` or `"medium"` - Default size (recommended)
69
+ - `"lg"` or `"large"` - Larger size
70
+
71
+ ### Color/Intent Props
72
+
73
+ Many components support color or intent props:
74
+ - `"primary"` - Primary brand color (blue)
75
+ - `"secondary"` - Secondary color
76
+ - `"success"` - Success state (green)
77
+ - `"warning"` - Warning state (yellow/orange)
78
+ - `"error"` - Error state (red)
79
+ - `"info"` - Informational state (blue)
80
+ - `"gray"` or `"neutral"` - Neutral/gray
81
+
82
+ ### Controlled vs Uncontrolled
83
+
84
+ - **Controlled**: Component receives `value` and `onChange` props, parent manages state
85
+ - **Uncontrolled**: Component manages own state, use `defaultValue` for initial value
86
+ - Prefer controlled for most cases in modern React
87
+
88
+ ## Component Categories
89
+
90
+ ### Base Components
91
+ - **Button**: Primary action button with multiple variants (primary, secondary, tertiary, link)
92
+ - **Card**: Container component with optional CardHeader
93
+ - **Badge**: Status indicators with color variants
94
+ - **Tag**: Removable labels with dot/avatar/country icons
95
+ - **Tooltip**: Hover tooltips with dark/light themes
96
+
97
+ ### Form Components
98
+ - **InputField**: Text inputs with label, hint, and validation
99
+ - **InputNumber**: Numeric inputs with increment/decrement
100
+ - **InputSearch**: Search input with clear button
101
+ - **InputDropdown**: Dropdown select with search
102
+ - **Checkbox**: Checkboxes with label and description
103
+ - **Radio**: Radio button groups
104
+ - **Switch**: Toggle switches
105
+ - **Slider**: Range sliders
106
+
107
+ ### Feedback Components
108
+ - **Alert**: Inline feedback messages (info, success, warning, error)
109
+ - **Toast**: Floating notifications
110
+ - **EmptyState**: Empty content placeholders with illustrations
111
+ - **Skeleton**: Loading placeholders
112
+
113
+ ### Layout Components
114
+ - **PageHeader**: Page title with breadcrumbs and actions
115
+ - **SectionHeader**: Section titles
116
+ - **ContentDivider**: Horizontal dividers
117
+ - **Card**: Content containers
118
+
119
+ ### Navigation Components
120
+ - **HeaderNavigation**: Top navigation bar
121
+ - **SidebarNavigation**: Vertical sidebar
122
+ - **Breadcrumbs**: Hierarchical navigation
123
+ - **HorizontalTabs**: Tab navigation
124
+ - **SlideoutMenu**: Slide-out panels
125
+
126
+ ### Overlay Components
127
+ - **Dialog**: Modal dialogs with header and footer
128
+ - **Popover**: Contextual overlays
129
+ - **BackgroundOverlay**: Backdrop dimmer
130
+
131
+ ### Data Display
132
+ - **Table**: Data grids with sorting, pagination
133
+ - **Scorecard**: Metric cards with trends
134
+ - **DonutChart**: Circular charts
135
+ - **ActivityFeed**: Activity timelines
136
+ - **Accordion**: Collapsible sections
@@ -0,0 +1,144 @@
1
+ # ZDS Icons Overview
2
+
3
+ ZDS provides 1,194 pre-built React icon components. All icons are available as individual React components that can be imported from `@kenpan/zds-r8f3v1/icons`.
4
+
5
+ ## Icon Import Pattern
6
+
7
+ ```tsx
8
+ import {
9
+ ChevronDownIcon,
10
+ ChevronRightIcon,
11
+ PlusIcon,
12
+ SearchSmIcon,
13
+ XCloseIcon,
14
+ CheckIcon,
15
+ AlertCircleIcon,
16
+ HelpCircleIcon
17
+ } from '@kenpan/zds-r8f3v1/icons'
18
+ ```
19
+
20
+ ## Icon Usage
21
+
22
+ ### Basic Usage
23
+
24
+ ```tsx
25
+ import { PlusIcon, SearchSmIcon } from '@kenpan/zds-r8f3v1/icons'
26
+
27
+ // Icons accept size prop (default: 24)
28
+ <PlusIcon size={24} />
29
+ <SearchSmIcon size={16} />
30
+
31
+ // Icons inherit currentColor for fill
32
+ <div style={{ color: '#376BFD' }}>
33
+ <PlusIcon /> {/* Will be blue */}
34
+ </div>
35
+ ```
36
+
37
+ ### With Icon Component Wrapper
38
+
39
+ For dynamic icon loading or when you need the icon name as a string:
40
+
41
+ ```tsx
42
+ import { Icon } from '@kenpan/zds-r8f3v1'
43
+
44
+ // Use name or iconId prop
45
+ <Icon name="Plus" size={24} />
46
+ <Icon iconId="ChevronDown" size={16} color="#376BFD" />
47
+ <Icon name="Search" rotate={90} />
48
+ ```
49
+
50
+ ### Icon Props
51
+
52
+ All icon components accept these props:
53
+
54
+ | Prop | Type | Default | Description |
55
+ |------|------|---------|-------------|
56
+ | `size` | `number \| string` | `24` | Width and height of the icon |
57
+ | `color` | `string` | `currentColor` | Fill color (inherits from parent) |
58
+ | Standard SVG props | - | - | All standard SVG props are supported |
59
+
60
+ ## Common Icons
61
+
62
+ ### Navigation Icons
63
+ - `ChevronDownIcon`, `ChevronUpIcon`, `ChevronLeftIcon`, `ChevronRightIcon`
64
+ - `ChevronDownDoubleIcon`, `ChevronUpDoubleIcon`
65
+ - `ArrowLeftIcon`, `ArrowRightIcon`, `ArrowUpIcon`, `ArrowDownIcon`
66
+ - `MenuOneIcon`, `DotsVerticalIcon`, `DotsHorizontalIcon`
67
+
68
+ ### Action Icons
69
+ - `PlusIcon`, `MinusIcon`
70
+ - `XCloseIcon`, `CheckIcon`
71
+ - `EditOneIcon`, `TrashOneIcon`
72
+ - `CopyThreeIcon`, `DownloadOneIcon`, `UploadOneIcon`
73
+ - `SearchSmIcon`, `SearchMdIcon`, `SearchLgIcon`
74
+ - `RefreshCwOneIcon`, `RefreshCcwOneIcon`
75
+
76
+ ### Status Icons
77
+ - `CheckCircleIcon` - Success
78
+ - `AlertCircleIcon` - Warning/Error
79
+ - `InfoCircleIcon` - Information
80
+ - `HelpCircleIcon` - Help
81
+ - `AlertTriangleIcon` - Warning
82
+
83
+ ### UI Icons
84
+ - `HomeLineIcon`, `Home01Icon`
85
+ - `SettingsOneIcon`, `SettingsTwoIcon`
86
+ - `UserOneIcon`, `UsersOneIcon`
87
+ - `BellOneIcon`, `MailOneIcon`
88
+ - `CalendarIcon`, `ClockIcon`
89
+ - `FilterFunnelOneIcon`, `SortAscAZIcon`, `SortDescAZIcon`
90
+ - `EyeIcon`, `EyeOffIcon`
91
+ - `LockOneIcon`, `LockUnlockedOneIcon`
92
+
93
+ ### File/Document Icons
94
+ - `FileOneIcon`, `FolderIcon`
95
+ - `ClipboardIcon`, `DocumentIcon`
96
+ - `ImageOneIcon`, `VideoRecorderIcon`
97
+
98
+ ### Commerce Icons
99
+ - `ShoppingCartOneIcon`, `ShoppingBagOneIcon`
100
+ - `CreditCardOneIcon`, `BankIcon`
101
+ - `ReceiptIcon`, `TagOneIcon`
102
+
103
+ ## Icon Naming Convention
104
+
105
+ Icons follow a consistent naming pattern:
106
+ - Base name in PascalCase: `Plus`, `Search`, `Chevron`
107
+ - Direction suffix if applicable: `Up`, `Down`, `Left`, `Right`
108
+ - Numeric variant suffix: `One`, `Two`, `Three` (for alternative designs)
109
+ - Size suffix for search icons: `Sm`, `Md`, `Lg`
110
+ - All end with `Icon`: `PlusIcon`, `ChevronDownIcon`, `SearchSmIcon`
111
+
112
+ ## Finding Icons
113
+
114
+ **IMPORTANT:** Always verify an icon exists before using it. Check the available icons by:
115
+
116
+ 1. Looking in `node_modules/@kenpan/zds-r8f3v1/dist/icons/`
117
+ 2. Using IDE autocomplete when importing from `@kenpan/zds-r8f3v1/icons`
118
+
119
+ ## Icon with Components
120
+
121
+ Many ZDS components accept icon props:
122
+
123
+ ```tsx
124
+ import { Button, Alert, Badge } from '@kenpan/zds-r8f3v1'
125
+ import { PlusIcon, AlertCircleIcon } from '@kenpan/zds-r8f3v1/icons'
126
+
127
+ // Button with icon
128
+ <Button variant="primary" iconLeading={<PlusIcon size={20} />}>
129
+ Add Item
130
+ </Button>
131
+
132
+ // Alert with custom icon
133
+ <Alert color="warning" icon={<AlertCircleIcon />}>
134
+ Please review your input
135
+ </Alert>
136
+ ```
137
+
138
+ ## Best Practices
139
+
140
+ 1. **Use semantic icons**: Choose icons that clearly represent the action or content
141
+ 2. **Consistent sizing**: Use 16px for compact UI, 20px for buttons, 24px for standalone
142
+ 3. **Inherit color**: Let icons inherit color from parent elements when possible
143
+ 4. **Don't modify strokeWidth**: This will break the visual consistency
144
+ 5. **Verify existence**: Always confirm an icon exists before using it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenpan/zds-r8f3v1",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "React component library built with MUI and TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,81 +0,0 @@
1
- # ZDS - Design System Overview
2
-
3
- ZDS is a comprehensive React component library built with MUI (Material-UI) and TypeScript. It provides production-ready components with consistent styling, accessibility, and theming support.
4
-
5
- ## Getting Started
6
-
7
- ### Installation
8
-
9
- ```bash
10
- npm install @kenpan/zds-r8f3v1 @mui/material @emotion/react @emotion/styled
11
- ```
12
-
13
- ### Basic Setup
14
-
15
- Wrap your application with the theme provider:
16
-
17
- ```tsx
18
- import { ThemeProvider } from '@mui/material/styles'
19
- import { theme } from '@kenpan/zds-r8f3v1/theme'
20
-
21
- function App() {
22
- return (
23
- <ThemeProvider theme={theme}>
24
- {/* Your app content */}
25
- </ThemeProvider>
26
- )
27
- }
28
- ```
29
-
30
- ## Component Categories
31
-
32
- ### Base Components
33
- - **Button** - Primary action button with multiple variants (primary, secondary, tertiary, link)
34
- - **Card** - Container component with header support
35
- - **Badge** - Status indicators and labels
36
- - **Tag** - Removable labels with icons and avatars
37
- - **Tooltip** - Contextual information on hover
38
-
39
- ### Form Components
40
- - **InputField** - Text input with label and validation
41
- - **Checkbox** - Checkbox with label and description
42
- - **Radio** - Radio button groups
43
- - **Switch** - Toggle switches
44
- - **Slider** - Range sliders
45
- - **DatePicker** - Date selection component
46
-
47
- ### Layout Components
48
- - **PageHeader** - Page title with breadcrumbs and actions
49
- - **SectionHeader** - Section titles and labels
50
- - **FooterNavigation** - Footer with navigation links
51
-
52
- ### Navigation Components
53
- - **HeaderNavigation** - Top navigation bar
54
- - **SidebarNavigation** - Vertical sidebar navigation
55
- - **Breadcrumbs** - Hierarchical navigation
56
- - **HorizontalTabs** - Tab navigation
57
- - **SlideoutMenu** - Slide-out panel
58
-
59
- ### Overlay Components
60
- - **Dialog** - Modal dialogs
61
- - **Popover** - Contextual overlays
62
- - **Toast** - Notification messages
63
- - **BackgroundOverlay** - Backdrop dimmer
64
-
65
- ### Data Display Components
66
- - **Table** - Data grid with sorting and pagination
67
- - **Skeleton** - Loading placeholders
68
- - **EmptyState** - Empty content placeholders
69
- - **ProgressIndicator** - Progress bars and spinners
70
- - **Scorecard** - Metric cards with trends
71
-
72
- ## Design Tokens
73
-
74
- The theme includes comprehensive design tokens:
75
-
76
- - **Colors**: Primary, secondary, success, error, warning scales
77
- - **Typography**: Font sizes, weights, line heights
78
- - **Spacing**: Consistent spacing scale
79
- - **Shadows**: Elevation shadows
80
- - **Border Radius**: Rounded corners
81
- - **Focus Rings**: Accessibility focus states
@@ -1,149 +0,0 @@
1
- # Design Tokens
2
-
3
- ZDS uses a comprehensive design token system for consistent styling across all components.
4
-
5
- ## Colors
6
-
7
- ### Primary Colors
8
- Use primary colors for main actions and brand elements.
9
-
10
- ```tsx
11
- // Access via theme
12
- theme.palette.primary.main // Primary color
13
- theme.palette.primary.light // Lighter variant
14
- theme.palette.primary.dark // Darker variant
15
-
16
- // Access color scales
17
- theme.palette.primaryScale[100] // Lightest
18
- theme.palette.primaryScale[500] // Default
19
- theme.palette.primaryScale[900] // Darkest
20
- ```
21
-
22
- ### Semantic Colors
23
-
24
- ```tsx
25
- // Success - Positive actions and states
26
- theme.palette.success.main
27
-
28
- // Error - Errors, destructive actions
29
- theme.palette.error.main
30
-
31
- // Warning - Caution states
32
- theme.palette.warning.main
33
-
34
- // Gray - Neutral elements
35
- theme.palette.gray[100] // Backgrounds
36
- theme.palette.gray[500] // Borders
37
- theme.palette.gray[900] // Text
38
- ```
39
-
40
- ### Design System Colors
41
-
42
- ```tsx
43
- // Surface colors
44
- theme.palette.ds.surface // Default surface
45
- theme.palette.ds.surfacecontainer // Container background
46
- theme.palette.ds.onsurface // Text on surface
47
-
48
- // Primary semantic
49
- theme.palette.ds.primary.DEFAULT // Primary action color
50
- theme.palette.ds.onprimary // Text on primary
51
- ```
52
-
53
- ## Typography
54
-
55
- ### Font Sizes
56
-
57
- ```tsx
58
- theme.typography.xs // 12px - Caption, labels
59
- theme.typography.sm // 14px - Body small
60
- theme.typography.md // 16px - Body default
61
- theme.typography.lg // 18px - Subtitle
62
- theme.typography.xl // 20px - Title
63
- theme.typography.2xl // 24px - Heading
64
- theme.typography.3xl // 30px - Large heading
65
- ```
66
-
67
- ### Font Weights
68
-
69
- ```tsx
70
- theme.typography.fontWeightRegular // 400
71
- theme.typography.fontWeightMedium // 500
72
- theme.typography.fontWeightSemiBold // 600
73
- theme.typography.fontWeightBold // 700
74
- ```
75
-
76
- ## Spacing
77
-
78
- ZDS uses an 8px spacing scale.
79
-
80
- ```tsx
81
- theme.spacing(0.5) // 4px
82
- theme.spacing(1) // 8px
83
- theme.spacing(2) // 16px
84
- theme.spacing(3) // 24px
85
- theme.spacing(4) // 32px
86
- theme.spacing(6) // 48px
87
- theme.spacing(8) // 64px
88
- ```
89
-
90
- ## Shadows
91
-
92
- ```tsx
93
- theme.shadows[0] // No shadow
94
- theme.shadows[1] // Subtle shadow (buttons, cards)
95
- theme.shadows[2] // Medium shadow (dropdowns)
96
- theme.shadows[3] // Elevated shadow (modals)
97
- ```
98
-
99
- ## Focus Rings
100
-
101
- For accessibility, use focus rings on interactive elements.
102
-
103
- ```tsx
104
- theme.focusRings.primary[100] // Primary focus ring
105
- theme.focusRings.error[100] // Error/destructive focus
106
- theme.focusRings.gray[100] // Neutral focus
107
- ```
108
-
109
- ## Breakpoints
110
-
111
- ```tsx
112
- theme.breakpoints.values.xs // 0
113
- theme.breakpoints.values.sm // 640px
114
- theme.breakpoints.values.md // 768px
115
- theme.breakpoints.values.lg // 1024px
116
- theme.breakpoints.values.xl // 1280px
117
- theme.breakpoints.values.2xl // 1536px
118
- ```
119
-
120
- ## Using Tokens in Components
121
-
122
- ```tsx
123
- import { useTheme } from '@mui/material/styles'
124
- import { Box, Typography } from '@mui/material'
125
-
126
- function MyComponent() {
127
- const theme = useTheme()
128
-
129
- return (
130
- <Box
131
- sx={{
132
- backgroundColor: theme.palette.ds.surfacecontainer,
133
- padding: theme.spacing(3),
134
- borderRadius: '12px',
135
- boxShadow: theme.shadows[1],
136
- }}
137
- >
138
- <Typography
139
- sx={{
140
- color: theme.palette.ds.onsurface,
141
- fontWeight: theme.typography.fontWeightSemiBold,
142
- }}
143
- >
144
- Card Title
145
- </Typography>
146
- </Box>
147
- )
148
- }
149
- ```