@pantheon-systems/pds-toolkit-react 2.0.0-alpha.8 → 2.0.0-alpha.9
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/dist/components/Drawer/Drawer.d.ts +58 -0
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/panels/Panel/Panel.d.ts +1 -18
- package/dist/css/component-css/pds-checkbox.css +1 -1
- package/dist/css/component-css/pds-drawer.css +1 -0
- package/dist/css/component-css/pds-index.css +11 -9
- package/dist/css/component-css/pds-modal.css +1 -1
- package/dist/css/component-css/pds-panel.css +1 -1
- package/dist/css/component-css/pds-radio-group.css +1 -1
- package/dist/css/component-css/pds-side-nav-global.css +7 -5
- package/dist/css/pds-components.css +11 -9
- package/dist/css/pds-core.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +2593 -1322
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tailwind/README.md +9 -0
- package/tailwind/v3/preset.cjs +20 -0
- package/tailwind/v4/theme.css +19 -0
package/package.json
CHANGED
package/tailwind/README.md
CHANGED
|
@@ -178,6 +178,15 @@ Keys: `narrow` (1024px), `standard` (1200px), `wide` (1440px), `x-wide` (1600px)
|
|
|
178
178
|
|
|
179
179
|
## Important caveats
|
|
180
180
|
|
|
181
|
+
### Borders require an explicit border-style
|
|
182
|
+
|
|
183
|
+
The PDS preset resets `border-style` to `none` on all elements so that borders are fully opt-in. This prevents phantom borders on elements that pick up a non-zero `border-width` from PDS components, inheritance, or browser defaults. When adding borders with Tailwind, always include a border-style class (`border-solid`, `border-dashed`, or `border-dotted`):
|
|
184
|
+
|
|
185
|
+
```html
|
|
186
|
+
<div class="border border-solid border-border-default">...</div>
|
|
187
|
+
<div class="border-b border-solid border-border-separator">Divider</div>
|
|
188
|
+
```
|
|
189
|
+
|
|
181
190
|
### Opacity modifiers are not supported
|
|
182
191
|
|
|
183
192
|
Tailwind's opacity modifier syntax (`bg-bg-default/50`) does not work with CSS variable color references. This is a known Tailwind limitation — the compiler cannot decompose a CSS variable into RGB channels. Avoid using opacity modifiers with PDS colors.
|
package/tailwind/v3/preset.cjs
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
* };
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
+
const plugin = require('tailwindcss/plugin');
|
|
21
|
+
|
|
20
22
|
/** @type {import('tailwindcss').Config} */
|
|
21
23
|
module.exports = {
|
|
22
24
|
corePlugins: {
|
|
@@ -24,6 +26,22 @@ module.exports = {
|
|
|
24
26
|
// Enabling preflight alongside PDS will cause style conflicts.
|
|
25
27
|
preflight: false,
|
|
26
28
|
},
|
|
29
|
+
plugins: [
|
|
30
|
+
// Reset border-style to none so borders are fully opt-in.
|
|
31
|
+
// Without this, any element that picks up a non-zero border-width
|
|
32
|
+
// (from PDS components, inheritance, or browser defaults) gets a
|
|
33
|
+
// visible border even without explicit border classes.
|
|
34
|
+
// Always include border-solid (or border-dashed, etc.) when adding borders.
|
|
35
|
+
plugin(function ({ addBase }) {
|
|
36
|
+
addBase({
|
|
37
|
+
'*, ::before, ::after': {
|
|
38
|
+
borderWidth: '0',
|
|
39
|
+
borderStyle: 'none',
|
|
40
|
+
borderColor: 'var(--pds-color-border-default)',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
27
45
|
theme: {
|
|
28
46
|
// ─── Colors ──────────────────────────────────────────────────────────────
|
|
29
47
|
// All values reference PDS CSS custom properties so dark mode and token
|
|
@@ -199,11 +217,13 @@ module.exports = {
|
|
|
199
217
|
|
|
200
218
|
// ─── Border ──────────────────────────────────────────────────────────────
|
|
201
219
|
borderRadius: {
|
|
220
|
+
none: '0px',
|
|
202
221
|
DEFAULT: 'var(--pds-border-radius-default)',
|
|
203
222
|
button: 'var(--pds-border-radius-button)',
|
|
204
223
|
input: 'var(--pds-border-radius-input)',
|
|
205
224
|
container: 'var(--pds-border-radius-container)',
|
|
206
225
|
bar: 'var(--pds-border-radius-bar)',
|
|
226
|
+
full: '9999px',
|
|
207
227
|
},
|
|
208
228
|
borderWidth: {
|
|
209
229
|
0: '0px',
|
package/tailwind/v4/theme.css
CHANGED
|
@@ -18,6 +18,23 @@
|
|
|
18
18
|
* import '@pantheon-systems/pds-toolkit-react/css/pds-core.css';
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
/*
|
|
22
|
+
* Reset border-style to none so borders are fully opt-in.
|
|
23
|
+
* Without this, any element that picks up a non-zero border-width
|
|
24
|
+
* (from PDS components, inheritance, or browser defaults) gets a
|
|
25
|
+
* visible border even without explicit border classes.
|
|
26
|
+
* Always include border-solid (or border-dashed, etc.) when adding borders.
|
|
27
|
+
*/
|
|
28
|
+
@layer base {
|
|
29
|
+
*,
|
|
30
|
+
::before,
|
|
31
|
+
::after {
|
|
32
|
+
border-color: var(--pds-color-border-default);
|
|
33
|
+
border-style: none;
|
|
34
|
+
border-width: 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
21
38
|
@theme {
|
|
22
39
|
/* ── Reset Tailwind defaults we are replacing ──────────────────────────── */
|
|
23
40
|
--color-*: initial;
|
|
@@ -186,11 +203,13 @@
|
|
|
186
203
|
--tracking-xl: var(--pds-typography-ls-xl);
|
|
187
204
|
|
|
188
205
|
/* ── Border ────────────────────────────────────────────────────────────── */
|
|
206
|
+
--radius-none: 0px;
|
|
189
207
|
--radius-DEFAULT: var(--pds-border-radius-default);
|
|
190
208
|
--radius-button: var(--pds-border-radius-button);
|
|
191
209
|
--radius-input: var(--pds-border-radius-input);
|
|
192
210
|
--radius-container: var(--pds-border-radius-container);
|
|
193
211
|
--radius-bar: var(--pds-border-radius-bar);
|
|
212
|
+
--radius-full: 9999px;
|
|
194
213
|
|
|
195
214
|
--border-DEFAULT: var(--pds-border-width-default);
|
|
196
215
|
--border-thicker: var(--pds-border-width-thicker);
|