@nexdom/uimed-vue 2.0.0-beta.24 → 2.0.0-beta.25
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/AGENTS.md +2 -2
- package/dist/components.d.ts +11 -1
- package/dist/components.js +6 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -151,7 +151,7 @@ Use an existing component (e.g. `button`) as the reference, and deliver all of t
|
|
|
151
151
|
|
|
152
152
|
1. `src/components/<name>/<name>.vue` (following the pattern in [Code conventions](#code-conventions)), `types.ts` and `__tests__/<name>.test.ts`.
|
|
153
153
|
2. The `U`-prefixed export in `src/components/index.ts`.
|
|
154
|
-
3. A usage guide at `docs/guide/components/<name>.md`, with `<demo>` examples (and a `<playground>` section when the component has configurable props), and an API reference at `docs/api/components/<name>.md` (props, events and slots tables). Both in Portuguese.
|
|
154
|
+
3. A usage guide at `docs/guide/components/<name>.md`, with `<demo>` examples (and a `<playground>` section when the component has configurable props), and an API reference at `docs/api/components/<name>.md` (props, events and slots tables). Both in Portuguese. In a demo's template inside a `.md` file, don't put an attribute with a template literal after one with an arrow function in the same tag: the Markdown type-check (`vue-tsc`) reads the `>` of `=>` as the end of the tag and fails with `TS1003`. Order the attributes so the template literal comes first.
|
|
155
155
|
4. Both pages registered in the sidebar at `docs/.vitepress/config.ts`.
|
|
156
156
|
5. `e2e/components/<name>.spec.ts` covering the guide's interactive examples and a "UI consistency" screenshot check (plus accessible snapshots where relevant). Commit the generated files under `__snapshots__`/`__screenshot__`.
|
|
157
157
|
6. The full CI sequence passing locally.
|
|
@@ -173,7 +173,7 @@ Use an existing composable (e.g. `use-toast`) as the reference, and deliver in t
|
|
|
173
173
|
- A new component/composable must be listed in its guide page (`docs/guide/…`), its API page (`docs/api/…`), both sidebars in `docs/.vitepress/config.ts`, the guide index table (`docs/guide/index.md`) and the API index list (`docs/api/index.md`).
|
|
174
174
|
- Never write CSS or `<style>` blocks, and expose styling to consumers only through props.
|
|
175
175
|
- Adjustments that Vuetify exposes as Sass variables (e.g. a font family or a line height) go in `src/styles/settings.scss`, which `vitePluginUimed()` compiles into Vuetify's stylesheets in the apps. That file only configures variables: still no CSS rules.
|
|
176
|
-
- Don't add spacing to Vuetify components: no padding or margin utility classes (`pa-*`, `pt-6`, `px-4`, `ma-2`, ...) and no spacing props overriding the defaults. Vuetify already applies Material Design 3 spacing, and overriding it breaks what it handles on its own, such as button paddings and the scrollbar of scrollable content. If the default spacing looks wrong, stop and ask instead of adjusting it.
|
|
176
|
+
- Don't add spacing to Vuetify components: no padding or margin utility classes (`pa-*`, `pt-6`, `px-4`, `ma-2`, ...) and no spacing props overriding the defaults. Vuetify already applies Material Design 3 spacing, and overriding it breaks what it handles on its own, such as button paddings and the scrollbar of scrollable content. If the default spacing looks wrong, stop and ask instead of adjusting it. The one accepted layout margin is `mt-auto` on `v-card-actions` (as in `USection`), which pushes the actions to the bottom of a full-height card without setting any spacing value.
|
|
177
177
|
- Prefer a Vuetify component's own props to building its parts by hand (e.g. `title`/`text` on `v-card` instead of `v-card-item` > `v-card-title` > `v-card-text`). A non-spacing utility class is acceptable only when no prop covers the need (e.g. `text-wrap` on a card title), with a comment saying why.
|
|
178
178
|
- Keep components thin: a component wires props, slots and events to Vuetify. Logic beyond that (focus management, queues, DOM lookups, comparisons) goes into an internal composable with its own unit tests.
|
|
179
179
|
- Path aliases: `@/*` → `src/*`, `@e2e/*` → `e2e/*`.
|
package/dist/components.d.ts
CHANGED
|
@@ -1289,6 +1289,12 @@ type DataSetItemProps = {
|
|
|
1289
1289
|
* @default "primary"
|
|
1290
1290
|
*/
|
|
1291
1291
|
variant?: SectionVariant;
|
|
1292
|
+
/**
|
|
1293
|
+
* Actions of the record, like "Editar" and "Excluir", displayed at the
|
|
1294
|
+
* bottom of its card, just like on `USection`. When undefined or empty, no
|
|
1295
|
+
* actions area is rendered.
|
|
1296
|
+
*/
|
|
1297
|
+
actions?: SectionAction[];
|
|
1292
1298
|
/**
|
|
1293
1299
|
* Component id to use on automated tests.
|
|
1294
1300
|
*/
|
|
@@ -1316,7 +1322,11 @@ type DataSetItemSlots = {
|
|
|
1316
1322
|
* <template>
|
|
1317
1323
|
* <u-data-set :items="patients">
|
|
1318
1324
|
* <template #default="{ item }">
|
|
1319
|
-
* <u-data-set-item
|
|
1325
|
+
* <u-data-set-item
|
|
1326
|
+
* :title="item.name"
|
|
1327
|
+
* subtitle="Beneficiário"
|
|
1328
|
+
* :actions="[{ label: 'Editar', variant: 'secondary', onClick: () => edit(item) }]"
|
|
1329
|
+
* >
|
|
1320
1330
|
* <u-table :headers="['Plano', 'Idade']" :items="[[item.plan, item.age]]" vertical />
|
|
1321
1331
|
* </u-data-set-item>
|
|
1322
1332
|
* </template>
|
package/dist/components.js
CHANGED
|
@@ -2253,6 +2253,10 @@ var data_set_item_default = /* @__PURE__ */ defineComponent({
|
|
|
2253
2253
|
type: String,
|
|
2254
2254
|
required: false
|
|
2255
2255
|
},
|
|
2256
|
+
actions: {
|
|
2257
|
+
type: Array,
|
|
2258
|
+
required: false
|
|
2259
|
+
},
|
|
2256
2260
|
dataTestid: {
|
|
2257
2261
|
type: String,
|
|
2258
2262
|
required: false
|
|
@@ -2266,6 +2270,7 @@ var data_set_item_default = /* @__PURE__ */ defineComponent({
|
|
|
2266
2270
|
title: props.title,
|
|
2267
2271
|
subtitle: props.subtitle,
|
|
2268
2272
|
variant: props.variant,
|
|
2273
|
+
actions: props.actions,
|
|
2269
2274
|
"data-testid": props.dataTestid,
|
|
2270
2275
|
"full-height": ""
|
|
2271
2276
|
}, {
|
|
@@ -2278,6 +2283,7 @@ var data_set_item_default = /* @__PURE__ */ defineComponent({
|
|
|
2278
2283
|
"title",
|
|
2279
2284
|
"subtitle",
|
|
2280
2285
|
"variant",
|
|
2286
|
+
"actions",
|
|
2281
2287
|
"data-testid"
|
|
2282
2288
|
]);
|
|
2283
2289
|
};
|