Skip to content

Commit dddc226

Browse files
authored
Merge pull request #630 from Perdolique/feat/packing-list-shell
Add packing list shell
2 parents 4231b32 + 9cdd8b6 commit dddc226

61 files changed

Lines changed: 5305 additions & 1910 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/vue-components/SKILL.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ description: Vue component conventions and patterns for the Perd project. Use wh
55

66
# Vue Component Conventions
77

8+
## Web Baseline 2025
9+
10+
The project targets **Baseline 2025** across all web technologies. Freely use modern HTML elements (like native `<dialog>`, `popover`, etc.), modern JS browser APIs, and modern CSS. We do not chase legacy browser support. Always choose modern native features over polyfills, fallbacks, or compatibility workarounds when they simplify the component structure.
11+
812
## Component Structure
913

1014
Use the standard order: `<template>`, `<script>`, `<style>`.
@@ -84,9 +88,11 @@ const emit = defineEmits<Emits>()
8488
Use `useTemplateRef` (Vue 3.5+), not the old `ref()` + template `ref=""` pattern:
8589

8690
```ts
87-
const dialogRef = useTemplateRef<HTMLDialogElement>('dialog')
91+
const dialogRef = useTemplateRef('dialog')
8892
```
8993

94+
Do not add an explicit generic to `useTemplateRef` when Vue can infer the type from a static template `ref` on a native element or component. Add a generic only when inference is unavailable or incorrect.
95+
9096
### Models
9197

9298
Use `defineModel` for two-way binding:
@@ -218,18 +224,32 @@ Use full, readable names for component prop values and CSS/state variants. Prefe
218224

219225
Style owned markup through explicit classes on the element being styled. Avoid nested tag selectors such as `& em`, `& span`, or `& strong` when the element can be given its own class.
220226

221-
### CSS Features (Baseline 2025)
227+
When an element changes style based on an ancestor component state, keep that state rule nested under the element's own class instead of writing a separate ancestor-to-descendant selector. Prefer this:
228+
229+
```css
230+
.name {
231+
.component:hover &,
232+
.component:focus-visible & {
233+
color: var(--color-text-primary);
234+
}
235+
}
236+
```
237+
238+
Do not write the same rule as a separate selector such as `.component:hover .name` or `.component:focus-visible .name`. In this codebase, selector ownership should stay with the class being styled.
239+
240+
### Modern CSS Features
222241

223-
The project targets modern browsers only. Use these freely:
242+
Leverage our Web Baseline 2025 and use these CSS features freely:
224243

225244
- **Native CSS nesting** — no preprocessors
245+
- **Modern CSS features and selectors** when they simplify the component without adding unnecessary complexity
226246
- **`oklch()` color function** with `prefers-color-scheme` for light/dark themes
227247
- **`@starting-style`** + `allow-discrete` for animating `display: none` transitions
228248
- **Range media queries**`@media (width >= 768px)`, never `@media screen and (min-width: 768px)`
229249
- **`@layer`** for CSS organization (reset, colors, spacings, sizes, transitions, typography)
230250
- **CSS custom properties** for all design tokens (`--spacing-*`, `--color-*`, `--font-size-*`, etc.)
231251

232-
Prefer native CSS features that are already part of the supported browser baseline over legacy compatibility workarounds.
252+
Prefer native CSS features over legacy compatibility workarounds.
233253

234254
### Responsive Rules
235255

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pnpm run lint:markdown
2-
pnpm run lint:oxlint
2+
pnpm run lint:oxlint:agent
33
pnpm run test:typecheck
4-
pnpm run test:unit:ci
4+
pnpm run test:unit:agent
55
pnpm run build
66
pnpm run test:e2e:ci

.oxlintrc.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@
6464
"rules": {
6565
"import/no-default-export": "off"
6666
}
67+
}, {
68+
// Vue files
69+
"files": [
70+
"**/*.vue"
71+
],
72+
73+
"rules": {
74+
"vitest/require-hook": "off"
75+
}
6776
}, {
6877
// Nuxt-specific overrides for Vue files
6978
"files": [

AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
- Keep reference-data slugs as canonical lowercase URL tokens using only `a-z`, `0-9`, and single hyphens; `name` values stay English display strings.
1414
- Keep `equipment_items` brand/category foreign keys non-cascading (`restrict`) so reference-data deletion cannot silently remove catalog or inventory records.
1515

16+
## Web Baseline 2025
17+
18+
- The project targets **Baseline 2025** across all web technologies, including CSS, HTML, and JS browser APIs.
19+
- We do not chase legacy browser support. Always choose modern native features over polyfills, fallbacks, or compatibility workarounds when they simplify the code.
20+
1621
## Frontend and UX guardrails
1722

1823
- For UI work, `new-design-assets/` is the source of truth for layout, component appearance, color tokens, typography, spacing, and interaction patterns.
@@ -36,5 +41,5 @@
3641
## Verification
3742

3843
- Markdown changes: `pnpm run lint:markdown`.
39-
- TypeScript or Vue changes: `pnpm run test:typecheck`, `pnpm run test:unit:agent`, `pnpm run lint:oxlint`, `pnpm run build`, and `pnpm run test:e2e:ci`.
44+
- TypeScript or Vue changes: `pnpm run test:typecheck`, `pnpm run test:unit:agent`, `pnpm run lint:oxlint:agent`, `pnpm run build`, and `pnpm run test:e2e:ci`.
4045
- Run applicable checks in parallel where practical.

app/components/PerdButton.vue

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,42 @@
149149
transform: translateY(1px);
150150
}
151151
}
152-
}
153152
154-
.component:disabled,
155-
.component:disabled:focus-visible,
156-
.component:disabled:hover,
157-
.component:disabled:active {
158-
cursor: not-allowed;
159-
transform: none;
160-
color: var(--color-text-muted);
161-
background: var(--color-surface-subtle);
162-
border-color: transparent;
163-
outline-color: transparent;
153+
&:disabled {
154+
cursor: not-allowed;
155+
transform: none;
156+
color: var(--color-text-muted);
157+
background: var(--color-surface-subtle);
158+
border-color: transparent;
159+
outline-color: transparent;
160+
161+
&:focus-visible {
162+
cursor: not-allowed;
163+
transform: none;
164+
color: var(--color-text-muted);
165+
background: var(--color-surface-subtle);
166+
border-color: transparent;
167+
outline-color: transparent;
168+
}
169+
170+
&:hover {
171+
cursor: not-allowed;
172+
transform: none;
173+
color: var(--color-text-muted);
174+
background: var(--color-surface-subtle);
175+
border-color: transparent;
176+
outline-color: transparent;
177+
}
178+
179+
&:active {
180+
cursor: not-allowed;
181+
transform: none;
182+
color: var(--color-text-muted);
183+
background: var(--color-surface-subtle);
184+
border-color: transparent;
185+
outline-color: transparent;
186+
}
187+
}
164188
}
165189
166190
.icon {
@@ -169,8 +193,10 @@
169193
}
170194
171195
@media (prefers-reduced-motion: reduce) {
172-
.component:active {
173-
transform: none;
196+
.component {
197+
&:active {
198+
transform: none;
199+
}
174200
}
175201
}
176202
</style>

app/components/PerdLink.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
cursor: pointer;
1818
font-weight: var(--font-weight-medium);
1919
20-
&:hover,
20+
&:hover {
21+
text-decoration: underline;
22+
color: var(--color-accent-hover);
23+
}
24+
2125
&:focus-visible {
2226
text-decoration: underline;
2327
color: var(--color-accent-hover);

app/components/UserAvatar.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template>
2-
<span :class="[$style.component, size]" aria-hidden="true">
3-
<span :class="$style.initial">
2+
<div :class="[$style.component, size]" aria-hidden="true">
3+
<div :class="$style.initial">
44
{{ initial }}
5-
</span>
6-
</span>
5+
</div>
6+
</div>
77
</template>
88

99
<script lang="ts" setup>
@@ -43,7 +43,6 @@
4343
}
4444
4545
.initial {
46-
display: block;
4746
line-height: 1;
4847
transform: translateY(0.02em);
4948
}

app/components/catalog/CatalogItemOwnershipCard.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,25 +118,25 @@
118118
font-size: 1rem;
119119
}
120120
121-
.text,
122-
.inlineMessage,
123-
.errorMessage {
121+
.text {
124122
margin: 0;
123+
color: var(--color-text-tertiary);
125124
}
126125
127-
.text,
128126
.inlineMessage {
127+
margin: 0;
129128
color: var(--color-text-tertiary);
130129
}
131130
131+
.errorMessage {
132+
margin: 0;
133+
color: var(--color-danger);
134+
}
135+
132136
.actions {
133137
display: flex;
134138
flex-wrap: wrap;
135139
gap: var(--spacing-12);
136140
align-items: center;
137141
}
138-
139-
.errorMessage {
140-
color: var(--color-danger);
141-
}
142142
</style>

app/components/catalog/CatalogItemPropertiesCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
}
7575
7676
.label {
77-
margin: 0;
7877
color: var(--color-text-muted);
7978
font-size: var(--font-size-12);
8079
text-transform: uppercase;

0 commit comments

Comments
 (0)