@ivds/core 0.1.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.
- package/CHANGELOG.md +45 -0
- package/README.md +215 -0
- package/lib/all.css +6802 -0
- package/lib/all.min.css +1 -0
- package/lib/base/base.css +215 -0
- package/lib/base/base.min.css +1 -0
- package/lib/components/_breadcrumb-mixins.scss +173 -0
- package/lib/components/_button-mixin.scss +120 -0
- package/lib/components/_card-mixin.scss +196 -0
- package/lib/components/_checkbox-mixin.scss +208 -0
- package/lib/components/_footer-mixin.scss +385 -0
- package/lib/components/_header-mixin.scss +275 -0
- package/lib/components/_navigation-mixins.scss +270 -0
- package/lib/components/_notification-mixin.scss +239 -0
- package/lib/components/_pagination-mixins.scss +280 -0
- package/lib/components/_radio-button-mixin.scss +207 -0
- package/lib/components/_tag-mixin.scss +261 -0
- package/lib/components/_text-input-mixin.scss +203 -0
- package/lib/components/all.css +3005 -0
- package/lib/components/all.min.css +1 -0
- package/lib/components/breadcrumb/breadcrumb.css +141 -0
- package/lib/components/breadcrumb/breadcrumb.min.css +1 -0
- package/lib/components/button/button.css +221 -0
- package/lib/components/button/button.min.css +1 -0
- package/lib/components/card/card.css +236 -0
- package/lib/components/card/card.min.css +1 -0
- package/lib/components/checkbox/checkbox.css +305 -0
- package/lib/components/checkbox/checkbox.min.css +1 -0
- package/lib/components/footer/footer.css +466 -0
- package/lib/components/footer/footer.min.css +1 -0
- package/lib/components/header/header.css +274 -0
- package/lib/components/header/header.min.css +1 -0
- package/lib/components/navigation/navigation.css +214 -0
- package/lib/components/navigation/navigation.min.css +1 -0
- package/lib/components/notification/notification.css +253 -0
- package/lib/components/notification/notification.min.css +1 -0
- package/lib/components/pagination/pagination.css +221 -0
- package/lib/components/pagination/pagination.min.css +1 -0
- package/lib/components/radio-button/radio-button.css +326 -0
- package/lib/components/radio-button/radio-button.min.css +1 -0
- package/lib/components/tag/tag.css +367 -0
- package/lib/components/tag/tag.min.css +1 -0
- package/lib/components/text-input/text-input.css +243 -0
- package/lib/components/text-input/text-input.min.css +1 -0
- package/lib/icons/icon-arrow-left.css +139 -0
- package/lib/icons/icon-arrow-left.min.css +1 -0
- package/lib/icons/icon-arrow-right.css +139 -0
- package/lib/icons/icon-arrow-right.min.css +1 -0
- package/lib/icons/icon-check.css +139 -0
- package/lib/icons/icon-check.min.css +1 -0
- package/lib/icons/icon-close.css +140 -0
- package/lib/icons/icon-close.min.css +1 -0
- package/lib/icons/icon-error.css +140 -0
- package/lib/icons/icon-error.min.css +1 -0
- package/lib/icons/icon-info.css +140 -0
- package/lib/icons/icon-info.min.css +1 -0
- package/lib/icons/icon-success.css +139 -0
- package/lib/icons/icon-success.min.css +1 -0
- package/lib/icons/icon-warning.css +139 -0
- package/lib/icons/icon-warning.min.css +1 -0
- package/lib/icons/icons.css +1158 -0
- package/lib/icons/icons.min.css +1 -0
- package/lib/utils/_flex.scss +200 -0
- package/lib/utils/_grid.scss +211 -0
- package/lib/utils/_layout.scss +253 -0
- package/lib/utils/_spacing.scss +260 -0
- package/lib/utils/_typography.scss +111 -0
- package/lib/utils/utils.css +2434 -0
- package/lib/utils/utils.min.css +1 -0
- package/lib/utils-only.css +2801 -0
- package/lib/utils-only.min.css +1 -0
- package/lib/variables/variables.css +2 -0
- package/lib/variables/variables.min.css +0 -0
- package/package.json +194 -0
- package/src/__tests__/example.test.scss +12 -0
- package/src/accessibility.stories.js +416 -0
- package/src/all.scss +9 -0
- package/src/base/_layout.scss +97 -0
- package/src/base/_reset.scss +85 -0
- package/src/base/_typography.scss +105 -0
- package/src/base/base.scss +6 -0
- package/src/components/all.scss +22 -0
- package/src/components/breadcrumb/_breadcrumb-mixins.scss +173 -0
- package/src/components/breadcrumb/breadcrumb.scss +68 -0
- package/src/components/breadcrumb/breadcrumb.stories.js +483 -0
- package/src/components/button/__tests__/button-mixins.test.scss +35 -0
- package/src/components/button/_button-mixin.scss +120 -0
- package/src/components/button/button.scss +126 -0
- package/src/components/button/button.stories.js +364 -0
- package/src/components/card/__tests__/card-mixins.test.scss +36 -0
- package/src/components/card/_card-mixin.scss +196 -0
- package/src/components/card/card.scss +193 -0
- package/src/components/card/card.stories.js +635 -0
- package/src/components/checkbox/_checkbox-mixin.scss +208 -0
- package/src/components/checkbox/checkbox.scss +141 -0
- package/src/components/checkbox/checkbox.stories.js +303 -0
- package/src/components/footer/_footer-mixin.scss +385 -0
- package/src/components/footer/footer.scss +86 -0
- package/src/components/footer/footer.stories.js +740 -0
- package/src/components/header/_header-mixin.scss +275 -0
- package/src/components/header/header.scss +84 -0
- package/src/components/header/header.stories.js +450 -0
- package/src/components/navigation/_navigation-mixins.scss +270 -0
- package/src/components/navigation/navigation.scss +64 -0
- package/src/components/navigation/navigation.stories.js +410 -0
- package/src/components/notification/_notification-mixin.scss +239 -0
- package/src/components/notification/notification.scss +118 -0
- package/src/components/notification/notification.stories.js +378 -0
- package/src/components/overview.stories.js +473 -0
- package/src/components/pagination/_pagination-mixins.scss +280 -0
- package/src/components/pagination/pagination.scss +76 -0
- package/src/components/pagination/pagination.stories.js +729 -0
- package/src/components/radio-button/_radio-button-mixin.scss +207 -0
- package/src/components/radio-button/radio-button.scss +178 -0
- package/src/components/radio-button/radio-button.stories.js +379 -0
- package/src/components/tag/_tag-mixin.scss +261 -0
- package/src/components/tag/tag.scss +244 -0
- package/src/components/tag/tag.stories.js +482 -0
- package/src/components/text-input/_text-input-mixin.scss +203 -0
- package/src/components/text-input/text-input.scss +150 -0
- package/src/components/text-input/text-input.stories.js +723 -0
- package/src/icons/_icon.scss +121 -0
- package/src/icons/icon-arrow-left.scss +23 -0
- package/src/icons/icon-arrow-right.scss +23 -0
- package/src/icons/icon-check.scss +23 -0
- package/src/icons/icon-close.scss +24 -0
- package/src/icons/icon-error.scss +24 -0
- package/src/icons/icon-info.scss +24 -0
- package/src/icons/icon-success.scss +23 -0
- package/src/icons/icon-warning.scss +23 -0
- package/src/icons/icons.scss +12 -0
- package/src/icons/icons.stories.js +249 -0
- package/src/icons/svg/arrow-left.svg +3 -0
- package/src/icons/svg/arrow-right.svg +3 -0
- package/src/icons/svg/check.svg +3 -0
- package/src/icons/svg/close.svg +4 -0
- package/src/icons/svg/error.svg +5 -0
- package/src/icons/svg/info.svg +5 -0
- package/src/icons/svg/success.svg +4 -0
- package/src/icons/svg/warning.svg +5 -0
- package/src/utils/__tests__/utilities.test.scss +37 -0
- package/src/utils/_flex.scss +200 -0
- package/src/utils/_grid.scss +211 -0
- package/src/utils/_layout.scss +253 -0
- package/src/utils/_spacing.scss +260 -0
- package/src/utils/_typography.scss +111 -0
- package/src/utils/utils.scss +8 -0
- package/src/variables/_borders.scss +15 -0
- package/src/variables/_breakpoints.scss +11 -0
- package/src/variables/_colors.scss +97 -0
- package/src/variables/_shadows.scss +14 -0
- package/src/variables/_spacing.scss +24 -0
- package/src/variables/_typography.scss +47 -0
- package/src/variables/variables.scss +9 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `@ivds/core` package will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial project structure and build system
|
|
12
|
+
- Base styles (reset, typography, layout)
|
|
13
|
+
- Utility classes (spacing, typography, layout, grid, flexbox)
|
|
14
|
+
- Icon system with base styling
|
|
15
|
+
- Design token integration structure
|
|
16
|
+
- PostCSS build pipeline with SCSS support
|
|
17
|
+
- Stylelint configuration with BEM methodology
|
|
18
|
+
- Jest testing setup for SCSS
|
|
19
|
+
- Storybook configuration for component documentation
|
|
20
|
+
- Production-ready build scripts and size monitoring
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- N/A
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
- N/A
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
- N/A
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- N/A
|
|
33
|
+
|
|
34
|
+
### Security
|
|
35
|
+
- N/A
|
|
36
|
+
|
|
37
|
+
## [0.1.0] - TBD
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- Initial release of IVDS Core package
|
|
41
|
+
- Complete CSS-only component library
|
|
42
|
+
- Design system foundation styles
|
|
43
|
+
- Comprehensive utility class system
|
|
44
|
+
- Icon library with essential icons
|
|
45
|
+
- Full build and development toolchain
|
package/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# @ivds/core
|
|
2
|
+
|
|
3
|
+
Core styles for the Ivoire Design System (IVDS). This package provides CSS-only component styles and utilities that consume design tokens from `@ivds/design-tokens`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ivds/core @ivds/design-tokens
|
|
9
|
+
# or
|
|
10
|
+
yarn add @ivds/core @ivds/design-tokens
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Complete Bundle
|
|
16
|
+
|
|
17
|
+
Import all IVDS Core styles:
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
@import '@ivds/core';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or use the CSS file directly:
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<link rel="stylesheet" href="node_modules/@ivds/core/lib/all.css">
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Selective Imports
|
|
30
|
+
|
|
31
|
+
Import only what you need:
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
/* Base styles */
|
|
35
|
+
@import '@ivds/core/base';
|
|
36
|
+
|
|
37
|
+
/* Utilities only */
|
|
38
|
+
@import '@ivds/core/utils';
|
|
39
|
+
|
|
40
|
+
/* Specific components */
|
|
41
|
+
@import '@ivds/core/components/button';
|
|
42
|
+
@import '@ivds/core/components/card';
|
|
43
|
+
|
|
44
|
+
/* Icons */
|
|
45
|
+
@import '@ivds/core/icons';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### HTML Usage
|
|
49
|
+
|
|
50
|
+
Use IVDS components with CSS classes:
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<!-- Button component -->
|
|
54
|
+
<button class="ivds-button ivds-button--primary">
|
|
55
|
+
Primary Button
|
|
56
|
+
</button>
|
|
57
|
+
|
|
58
|
+
<!-- Card component -->
|
|
59
|
+
<div class="ivds-card">
|
|
60
|
+
<div class="ivds-card__header">
|
|
61
|
+
<h3 class="ivds-card__title">Card Title</h3>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="ivds-card__body">
|
|
64
|
+
<p class="ivds-card__content">Card content goes here.</p>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Utility classes -->
|
|
69
|
+
<div class="ivds-flex ivds-flex--justify-between ivds-p-4">
|
|
70
|
+
<span>Left content</span>
|
|
71
|
+
<span>Right content</span>
|
|
72
|
+
</div>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Available Components
|
|
76
|
+
|
|
77
|
+
- **Form Components**: Button, Text Input, Checkbox, Radio Button
|
|
78
|
+
- **Layout Components**: Card, Notification, Tag
|
|
79
|
+
- **Navigation Components**: Breadcrumb, Navigation, Pagination
|
|
80
|
+
- **Structural Components**: Header, Footer
|
|
81
|
+
- **Utilities**: Spacing, Typography, Layout, Grid, Flexbox
|
|
82
|
+
- **Icons**: Essential icon set with base styling
|
|
83
|
+
|
|
84
|
+
## Customization
|
|
85
|
+
|
|
86
|
+
IVDS Core uses CSS custom properties from `@ivds/design-tokens`. You can customize the design system by overriding these properties:
|
|
87
|
+
|
|
88
|
+
```css
|
|
89
|
+
:root {
|
|
90
|
+
--color-brand-primary-500: #your-brand-color;
|
|
91
|
+
--fontFamily-sans: 'Your Font', system-ui, sans-serif;
|
|
92
|
+
--spacing-4: 1.5rem; /* Custom spacing */
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Framework Integration
|
|
97
|
+
|
|
98
|
+
### CSS Modules
|
|
99
|
+
|
|
100
|
+
```javascript
|
|
101
|
+
import styles from '@ivds/core/components/button.css';
|
|
102
|
+
|
|
103
|
+
function Button({ children, variant = 'primary' }) {
|
|
104
|
+
return (
|
|
105
|
+
<button className={`ivds-button ivds-button--${variant}`}>
|
|
106
|
+
{children}
|
|
107
|
+
</button>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Styled Components
|
|
113
|
+
|
|
114
|
+
```javascript
|
|
115
|
+
import styled from 'styled-components';
|
|
116
|
+
import '@ivds/core/components/button';
|
|
117
|
+
|
|
118
|
+
const StyledButton = styled.button.attrs({
|
|
119
|
+
className: 'ivds-button ivds-button--primary'
|
|
120
|
+
})`
|
|
121
|
+
/* Additional custom styles */
|
|
122
|
+
`;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Vue.js
|
|
126
|
+
|
|
127
|
+
```vue
|
|
128
|
+
<template>
|
|
129
|
+
<button :class="buttonClasses">
|
|
130
|
+
<slot />
|
|
131
|
+
</button>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<script>
|
|
135
|
+
import '@ivds/core/components/button';
|
|
136
|
+
|
|
137
|
+
export default {
|
|
138
|
+
props: {
|
|
139
|
+
variant: {
|
|
140
|
+
type: String,
|
|
141
|
+
default: 'primary'
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
computed: {
|
|
145
|
+
buttonClasses() {
|
|
146
|
+
return `ivds-button ivds-button--${this.variant}`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
</script>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Browser Support
|
|
154
|
+
|
|
155
|
+
- Chrome 88+
|
|
156
|
+
- Firefox 85+
|
|
157
|
+
- Safari 14+
|
|
158
|
+
- Edge 88+
|
|
159
|
+
|
|
160
|
+
Legacy browser support available with CSS custom property fallbacks.
|
|
161
|
+
|
|
162
|
+
## Documentation
|
|
163
|
+
|
|
164
|
+
- [Storybook Documentation](https://ivds.github.io/design-system/core)
|
|
165
|
+
- [Design System Guidelines](https://ivds.github.io/design-system)
|
|
166
|
+
- [Component Examples](https://ivds.github.io/design-system/core/examples)
|
|
167
|
+
|
|
168
|
+
## Build System
|
|
169
|
+
|
|
170
|
+
The package uses a modern build system with:
|
|
171
|
+
|
|
172
|
+
- **PostCSS** with SCSS support for compilation
|
|
173
|
+
- **Stylelint** for code quality and BEM methodology enforcement
|
|
174
|
+
- **Jest** for SCSS unit testing
|
|
175
|
+
- **Storybook** for component documentation
|
|
176
|
+
- **Bundle size monitoring** to ensure optimal performance
|
|
177
|
+
|
|
178
|
+
### Build Commands
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Development build
|
|
182
|
+
yarn build
|
|
183
|
+
|
|
184
|
+
# Production build (optimized, warnings suppressed)
|
|
185
|
+
yarn build:prod
|
|
186
|
+
|
|
187
|
+
# Watch mode for development
|
|
188
|
+
yarn test:watch
|
|
189
|
+
|
|
190
|
+
# Check bundle sizes
|
|
191
|
+
yarn size
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Bundle Sizes
|
|
195
|
+
|
|
196
|
+
- Main bundle: `all.css` (target: <50kB)
|
|
197
|
+
- Minified bundle: `all.min.css` (target: <25kB)
|
|
198
|
+
- Individual components available for selective imports
|
|
199
|
+
|
|
200
|
+
## Performance
|
|
201
|
+
|
|
202
|
+
IVDS Core is optimized for production use:
|
|
203
|
+
|
|
204
|
+
- Minimal CSS output with dead code elimination
|
|
205
|
+
- Gzip-friendly compression (typically 70%+ reduction)
|
|
206
|
+
- Tree-shakeable imports for optimal bundle sizes
|
|
207
|
+
- Modern CSS features with fallbacks for older browsers
|
|
208
|
+
|
|
209
|
+
## Contributing
|
|
210
|
+
|
|
211
|
+
See [DEVELOPMENT.md](./DEVELOPMENT.md) for development setup and contribution guidelines.
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
MIT License - see [LICENSE](../../LICENSE) for details.
|