@punica/components-mcp 0.10.2 → 0.11.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/dist/bundled.json +1 -1
- package/dist/custom-elements.json +2484 -2428
- package/dist/guide.md +16 -0
- package/dist/tokens.css +1 -0
- package/package.json +1 -1
package/dist/guide.md
CHANGED
|
@@ -114,6 +114,22 @@ it. To let a button lay out like its container, keep the box and pass the
|
|
|
114
114
|
layout on: `::part(base) { all: unset; display: inherit; }`. Parts that only
|
|
115
115
|
hold text, such as `label`, may take `display: contents`.
|
|
116
116
|
|
|
117
|
+
### A page's own defaults
|
|
118
|
+
|
|
119
|
+
An element's defaults are the library's: a button is filled, primary and
|
|
120
|
+
medium. A page whose buttons are something else says so once, before it draws:
|
|
121
|
+
|
|
122
|
+
```js
|
|
123
|
+
import { configure } from '@punica/components';
|
|
124
|
+
configure({ 'punica-button': { variant: 'outlined', size: 'small', color: 'neutral' } });
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Every `<punica-button>` written with no attributes then takes those values the
|
|
128
|
+
first time it connects; an attribute in the markup or a property set from
|
|
129
|
+
script still wins, and `null` takes a default away. With the global script it
|
|
130
|
+
is `Punica.configure(...)`. In such a page, write the bare tag and let the page
|
|
131
|
+
decide: do not repeat its defaults on every element.
|
|
132
|
+
|
|
117
133
|
## Frameworks
|
|
118
134
|
|
|
119
135
|
- **React 19**: props that name a property are set as properties; listen
|
package/dist/tokens.css
CHANGED