@papillonbits/css 1.10.0 → 1.13.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/LICENSE +1 -1
- package/README.md +173 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1 +1,173 @@
|
|
|
1
|
-
|
|
1
|
+
# @papillonbits/css
|
|
2
|
+
|
|
3
|
+
Comprehensive CSS architecture built on SCSS with design primitives, component styles, and utility classes.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@papillonbits/css)
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
A modular CSS library providing a complete styling foundation for modern web applications. Built with SCSS and following BEM-inspired naming conventions.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @papillonbits/css
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```scss
|
|
20
|
+
// Import all styles
|
|
21
|
+
@import '@papillonbits/css';
|
|
22
|
+
|
|
23
|
+
// Or import specific modules
|
|
24
|
+
@import '@papillonbits/css/src/primer/base/index.scss';
|
|
25
|
+
@import '@papillonbits/css/src/primer/buttons/index.scss';
|
|
26
|
+
@import '@papillonbits/css/src/primer/utilities/index.scss';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## CSS Modules
|
|
30
|
+
|
|
31
|
+
### Core & Foundation
|
|
32
|
+
- **base** - CSS resets and base styles
|
|
33
|
+
- **core** - Core CSS primitives and foundations
|
|
34
|
+
- **primitives** - Design tokens (colors, spacing, typography)
|
|
35
|
+
- **support** - Support utilities and mixins
|
|
36
|
+
|
|
37
|
+
### Components
|
|
38
|
+
- **autocomplete** - Autocomplete input styling
|
|
39
|
+
- **avatars** - Avatar and profile image styles
|
|
40
|
+
- **box** - Box component styles
|
|
41
|
+
- **branch-name** - Git branch display styling
|
|
42
|
+
- **buttons** - Button styles with variants and states
|
|
43
|
+
- **forms** - Form element styling (inputs, checkboxes, radios)
|
|
44
|
+
- **header** - Header component styles
|
|
45
|
+
- **labels** - Label and tag styles
|
|
46
|
+
- **loaders** - Loading spinner and indicator styles
|
|
47
|
+
- **navigation** - Navigation menu and nav bar styles
|
|
48
|
+
- **pagination** - Pagination control styles
|
|
49
|
+
- **select-menu** - Advanced select menu styling
|
|
50
|
+
- **toasts** - Toast notification styles
|
|
51
|
+
- **tooltips** - Tooltip and popover styles
|
|
52
|
+
|
|
53
|
+
### Layout
|
|
54
|
+
- **layout** - Layout utilities and grid systems
|
|
55
|
+
- **truncate** - Text truncation utilities
|
|
56
|
+
- **table-object** - Table styling and data display
|
|
57
|
+
|
|
58
|
+
### Theme & Modes
|
|
59
|
+
- **color-modes** - Dark mode and theme switching support
|
|
60
|
+
|
|
61
|
+
### Content
|
|
62
|
+
- **markdown** - Styled markdown content
|
|
63
|
+
- **marketing** - Marketing page styles
|
|
64
|
+
- **product** - Product-specific styles
|
|
65
|
+
|
|
66
|
+
### Utilities
|
|
67
|
+
- **utilities** - CSS utility classes for common patterns
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
- **Modular Architecture** - Import only what you need
|
|
72
|
+
- **Design Tokens** - Consistent spacing, colors, and typography from @primer/primitives
|
|
73
|
+
- **Dark Mode Support** - Built-in color mode switching
|
|
74
|
+
- **Responsive** - Mobile-first responsive design
|
|
75
|
+
- **Browser Compatibility** - Autoprefixer for vendor prefixes
|
|
76
|
+
- **SCSS Powered** - Variables, mixins, and nesting
|
|
77
|
+
|
|
78
|
+
## CSS Architecture Principles
|
|
79
|
+
|
|
80
|
+
The CSS follows a structured architecture:
|
|
81
|
+
|
|
82
|
+
1. **Primitives** - Design tokens and variables
|
|
83
|
+
2. **Base** - Reset and foundational styles
|
|
84
|
+
3. **Components** - Component-specific styles
|
|
85
|
+
4. **Utilities** - Single-purpose utility classes
|
|
86
|
+
5. **Layouts** - Page and section layouts
|
|
87
|
+
|
|
88
|
+
## Build Process
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Build the CSS package
|
|
92
|
+
npm run build
|
|
93
|
+
|
|
94
|
+
# Build for different environments
|
|
95
|
+
npm run build-test
|
|
96
|
+
npm run build-acceptance
|
|
97
|
+
npm run build-release
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The build process:
|
|
101
|
+
1. Copies SCSS files from `src/` to `build/`
|
|
102
|
+
2. Preserves directory structure
|
|
103
|
+
3. Transpiles with Babel for consistent module resolution
|
|
104
|
+
|
|
105
|
+
## Scripts
|
|
106
|
+
|
|
107
|
+
- `clean-up` - Remove build artifacts and dependencies
|
|
108
|
+
- `install-packages` - Install dependencies
|
|
109
|
+
- `build` - Build the package
|
|
110
|
+
|
|
111
|
+
## Entry Point
|
|
112
|
+
|
|
113
|
+
The main entry point is `build/index.scss` which imports all CSS modules.
|
|
114
|
+
|
|
115
|
+
## Dependencies
|
|
116
|
+
|
|
117
|
+
This package depends on:
|
|
118
|
+
- **@primer/primitives** - Design tokens and primitives
|
|
119
|
+
- **SCSS/Sass** - For processing SCSS files
|
|
120
|
+
|
|
121
|
+
## Browser Support
|
|
122
|
+
|
|
123
|
+
Supports modern browsers with autoprefixer:
|
|
124
|
+
- Chrome (latest)
|
|
125
|
+
- Firefox (latest)
|
|
126
|
+
- Safari (latest)
|
|
127
|
+
- Edge (latest)
|
|
128
|
+
|
|
129
|
+
## Customization
|
|
130
|
+
|
|
131
|
+
Override SCSS variables to customize the design:
|
|
132
|
+
|
|
133
|
+
```scss
|
|
134
|
+
// Override primitives before import
|
|
135
|
+
$color-primary: #0366d6;
|
|
136
|
+
$spacing-base: 8px;
|
|
137
|
+
|
|
138
|
+
@import '@papillonbits/css';
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## PostCSS Configuration
|
|
142
|
+
|
|
143
|
+
The project uses PostCSS with:
|
|
144
|
+
- **postcss-preset-env** - Modern CSS features
|
|
145
|
+
- **postcss-nested** - Nested rule support
|
|
146
|
+
- **autoprefixer** - Vendor prefixes
|
|
147
|
+
|
|
148
|
+
## Linting
|
|
149
|
+
|
|
150
|
+
SCSS files are linted with Stylelint:
|
|
151
|
+
- **stylelint-config-standard** - Standard rules
|
|
152
|
+
- **stylelint-scss** - SCSS-specific rules
|
|
153
|
+
- **stylelint-prettier** - Prettier integration
|
|
154
|
+
- **stylelint-order** - Property ordering
|
|
155
|
+
|
|
156
|
+
## Documentation
|
|
157
|
+
|
|
158
|
+
For visual examples and component styles, see the [Storybook documentation](https://github.com/papillonbits/papillonbits).
|
|
159
|
+
|
|
160
|
+
## Links
|
|
161
|
+
|
|
162
|
+
- [Homepage](https://github.com/papillonbits/papillonbits/tree/master/packages/css)
|
|
163
|
+
- [Repository](https://github.com/papillonbits/papillonbits)
|
|
164
|
+
|
|
165
|
+
## Related Packages
|
|
166
|
+
|
|
167
|
+
- [@papillonbits/components](../components) - React components
|
|
168
|
+
- [@papillonbits/library](../library) - Utility functions
|
|
169
|
+
- [@papillonbits/setup](../setup) - Build configuration
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
See root LICENSE file for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonbits/css",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Papillon Bits CSS",
|
|
5
5
|
"homepage": "https://github.com/papillonbits/papillonbits/tree/master/packages/css",
|
|
6
6
|
"repository": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"build-acceptance": "npm run build",
|
|
24
24
|
"build-release": "npm run build"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "dac9692229827ceb3066693345a48e88baf159b6"
|
|
27
27
|
}
|