@umbra.ui/core 0.4.6 → 0.5.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/components/inputs/InputCard/InputCard.vue +46 -9
- package/dist/components/inputs/InputCryptoAddress/InputCryptoAddress.vue +23 -4
- package/dist/components/inputs/InputEmail/InputEmail.vue +14 -7
- package/dist/components/inputs/InputNumber/InputNumber.vue +36 -3
- package/dist/components/inputs/InputPhone/InputPhone.vue +36 -3
- package/dist/components/inputs/InputSecure/InputSecure.vue +27 -3
- package/dist/components/pickers/CollectionPicker/CollectionPicker.vue +31 -9
- package/dist/components/pickers/CollectionPicker/README.md +50 -0
- package/dist/components/pickers/ColorPicker/ColorPicker.vue +27 -4
- package/dist/components/pickers/ColorPicker/README.md +50 -0
- package/dist/components/pickers/IconPicker/IconPicker.vue +53 -26
- package/dist/components/pickers/IconPicker/README.md +43 -0
- package/package.json +5 -4
- package/src/components/inputs/InputCard/InputCard.vue +46 -9
- package/src/components/inputs/InputCryptoAddress/InputCryptoAddress.vue +23 -4
- package/src/components/inputs/InputEmail/InputEmail.vue +14 -7
- package/src/components/inputs/InputNumber/InputNumber.vue +36 -3
- package/src/components/inputs/InputPhone/InputPhone.vue +36 -3
- package/src/components/inputs/InputSecure/InputSecure.vue +27 -3
- package/src/components/pickers/CollectionPicker/CollectionPicker.vue +31 -9
- package/src/components/pickers/CollectionPicker/README.md +50 -0
- package/src/components/pickers/ColorPicker/ColorPicker.vue +27 -4
- package/src/components/pickers/ColorPicker/README.md +50 -0
- package/src/components/pickers/IconPicker/IconPicker.vue +53 -26
- package/src/components/pickers/IconPicker/README.md +43 -0
- package/src/skills/README.md +108 -0
- package/src/skills/umbra.ui-colors-application/SKILL.md +102 -0
- package/src/skills/umbra.ui-colors-application/reference.md +178 -0
- package/src/skills/umbra.ui-control-button/SKILL.md +34 -0
- package/src/skills/umbra.ui-control-checkbox/SKILL.md +34 -0
- package/src/skills/umbra.ui-control-dropdown/SKILL.md +34 -0
- package/src/skills/umbra.ui-control-icon-button/SKILL.md +33 -0
- package/src/skills/umbra.ui-control-inline-dropdown/SKILL.md +32 -0
- package/src/skills/umbra.ui-control-radio/SKILL.md +33 -0
- package/src/skills/umbra.ui-control-range-slider/SKILL.md +33 -0
- package/src/skills/umbra.ui-control-segmented-control/SKILL.md +33 -0
- package/src/skills/umbra.ui-control-slider/SKILL.md +33 -0
- package/src/skills/umbra.ui-control-stepper/SKILL.md +33 -0
- package/src/skills/umbra.ui-control-switch/SKILL.md +33 -0
- package/src/skills/umbra.ui-dialog-alert/SKILL.md +34 -0
- package/src/skills/umbra.ui-dialog-toast/SKILL.md +35 -0
- package/src/skills/umbra.ui-indicator-progress-bar/SKILL.md +33 -0
- package/src/skills/umbra.ui-indicator-tooltip/SKILL.md +33 -0
- package/src/skills/umbra.ui-input-card/SKILL.md +42 -0
- package/src/skills/umbra.ui-input-card/reference.md +36 -0
- package/src/skills/umbra.ui-input-crypto-address/SKILL.md +40 -0
- package/src/skills/umbra.ui-input-crypto-address/reference.md +40 -0
- package/src/skills/umbra.ui-input-email/SKILL.md +45 -0
- package/src/skills/umbra.ui-input-number/SKILL.md +39 -0
- package/src/skills/umbra.ui-input-otp/SKILL.md +44 -0
- package/src/skills/umbra.ui-input-phone/SKILL.md +45 -0
- package/src/skills/umbra.ui-input-phone/reference.md +35 -0
- package/src/skills/umbra.ui-input-search/SKILL.md +43 -0
- package/src/skills/umbra.ui-input-search/reference.md +45 -0
- package/src/skills/umbra.ui-input-secure/SKILL.md +43 -0
- package/src/skills/umbra.ui-input-secure/reference.md +44 -0
- package/src/skills/umbra.ui-input-string-capture/SKILL.md +41 -0
- package/src/skills/umbra.ui-input-tags/SKILL.md +46 -0
- package/src/skills/umbra.ui-input-tags/reference.md +44 -0
- package/src/skills/umbra.ui-input-text/SKILL.md +46 -0
- package/src/skills/umbra.ui-menu-action-menu/SKILL.md +34 -0
- package/src/skills/umbra.ui-model-popover/SKILL.md +35 -0
- package/src/skills/umbra.ui-model-sheet/SKILL.md +35 -0
- package/src/skills/umbra.ui-model-sidebar/SKILL.md +35 -0
- package/src/skills/umbra.ui-picker-collection/SKILL.md +36 -0
- package/src/skills/umbra.ui-picker-collection/reference.md +34 -0
- package/src/skills/umbra.ui-picker-color/SKILL.md +36 -0
- package/src/skills/umbra.ui-picker-color/reference.md +34 -0
- package/src/skills/umbra.ui-picker-date/SKILL.md +36 -0
- package/src/skills/umbra.ui-picker-date/reference.md +26 -0
- package/src/skills/umbra.ui-picker-file/SKILL.md +42 -0
- package/src/skills/umbra.ui-picker-file/reference.md +39 -0
- package/src/skills/umbra.ui-picker-icon/SKILL.md +36 -0
- package/src/skills/umbra.ui-picker-icon/reference.md +28 -0
|
@@ -64,6 +64,48 @@ const handleIconChange = (icon: IconKey) => {
|
|
|
64
64
|
</style>
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
## Custom Label Slot
|
|
68
|
+
|
|
69
|
+
When you provide a custom `label` slot, the default trigger icon/chevron visuals
|
|
70
|
+
are removed so you can fully control the trigger UI and animation.
|
|
71
|
+
|
|
72
|
+
```vue
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import { computed, ref } from "vue";
|
|
75
|
+
import { IconPicker } from "@umbra-ui/core";
|
|
76
|
+
import type { IconKey } from "@umbra-ui/icons";
|
|
77
|
+
|
|
78
|
+
const selectedIcon = ref<IconKey>("home");
|
|
79
|
+
const triggerText = computed(() => `Icon: ${selectedIcon.value}`);
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<IconPicker v-model:icon="selectedIcon">
|
|
84
|
+
<template #label>
|
|
85
|
+
<span class="icon-chip">{{ triggerText }}</span>
|
|
86
|
+
</template>
|
|
87
|
+
</IconPicker>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<style module>
|
|
91
|
+
.icon-chip {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
padding: 0.353rem 0.529rem;
|
|
95
|
+
border-radius: 0.471rem;
|
|
96
|
+
background: var(--background-subtle, #f3f4f6);
|
|
97
|
+
color: var(--text-primary, #111827);
|
|
98
|
+
border: 1px solid var(--border-soft, #d1d5db);
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Hiding the Label
|
|
104
|
+
|
|
105
|
+
```vue
|
|
106
|
+
<IconPicker v-model:icon="selectedIcon" :label="false" />
|
|
107
|
+
```
|
|
108
|
+
|
|
67
109
|
## Props
|
|
68
110
|
|
|
69
111
|
| Prop Name | Type | Required | Default | Description |
|
|
@@ -71,6 +113,7 @@ const handleIconChange = (icon: IconKey) => {
|
|
|
71
113
|
| `icon` | `string` | Yes | `""` | Currently selected icon key |
|
|
72
114
|
| `pickerOffsetX` | `number` | No | `0` | Horizontal offset for picker positioning |
|
|
73
115
|
| `preventPopup` | `boolean` | No | `false` | Whether to prevent the popup from opening |
|
|
116
|
+
| `label` | `boolean` | No | `true` | Show or hide the trigger label/slot |
|
|
74
117
|
| `iconList` | `IconKey[]` | No | `undefined` | Custom list of available icons |
|
|
75
118
|
| `iconSize` | `number` | No | `18` | Size of the displayed icon |
|
|
76
119
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Umbra Component Skills Index
|
|
2
|
+
|
|
3
|
+
This directory contains AI-agent skill guides for Umbra input and control components.
|
|
4
|
+
|
|
5
|
+
## Quick Usage Pattern
|
|
6
|
+
1. Pick the skill matching the input family.
|
|
7
|
+
2. Read `SKILL.md` for implementation flow and developer questions.
|
|
8
|
+
3. Read `reference.md` when available for props/events/pitfalls.
|
|
9
|
+
|
|
10
|
+
## Input Skills
|
|
11
|
+
- `umbra.ui-input-text`
|
|
12
|
+
- `SKILL.md`
|
|
13
|
+
- `umbra.ui-input-phone`
|
|
14
|
+
- `SKILL.md`
|
|
15
|
+
- `reference.md`
|
|
16
|
+
- `umbra.ui-input-number`
|
|
17
|
+
- `SKILL.md`
|
|
18
|
+
- `umbra.ui-input-email`
|
|
19
|
+
- `SKILL.md`
|
|
20
|
+
- `umbra.ui-input-card`
|
|
21
|
+
- `SKILL.md`
|
|
22
|
+
- `reference.md`
|
|
23
|
+
- `umbra.ui-input-secure`
|
|
24
|
+
- `SKILL.md`
|
|
25
|
+
- `reference.md`
|
|
26
|
+
- `umbra.ui-input-crypto-address`
|
|
27
|
+
- `SKILL.md`
|
|
28
|
+
- `reference.md`
|
|
29
|
+
- `umbra.ui-input-otp`
|
|
30
|
+
- `SKILL.md`
|
|
31
|
+
- `umbra.ui-input-tags`
|
|
32
|
+
- `SKILL.md`
|
|
33
|
+
- `reference.md`
|
|
34
|
+
- `umbra.ui-input-string-capture`
|
|
35
|
+
- `SKILL.md`
|
|
36
|
+
- `umbra.ui-input-search`
|
|
37
|
+
- `SKILL.md`
|
|
38
|
+
- `reference.md`
|
|
39
|
+
|
|
40
|
+
## Control Skills
|
|
41
|
+
- `umbra.ui-control-button`
|
|
42
|
+
- `SKILL.md`
|
|
43
|
+
- `umbra.ui-control-checkbox`
|
|
44
|
+
- `SKILL.md`
|
|
45
|
+
- `umbra.ui-control-dropdown`
|
|
46
|
+
- `SKILL.md`
|
|
47
|
+
- `umbra.ui-control-icon-button`
|
|
48
|
+
- `SKILL.md`
|
|
49
|
+
- `umbra.ui-control-inline-dropdown`
|
|
50
|
+
- `SKILL.md`
|
|
51
|
+
- `umbra.ui-control-radio`
|
|
52
|
+
- `SKILL.md`
|
|
53
|
+
- `umbra.ui-control-range-slider`
|
|
54
|
+
- `SKILL.md`
|
|
55
|
+
- `umbra.ui-control-segmented-control`
|
|
56
|
+
- `SKILL.md`
|
|
57
|
+
- `umbra.ui-control-slider`
|
|
58
|
+
- `SKILL.md`
|
|
59
|
+
- `umbra.ui-control-stepper`
|
|
60
|
+
- `SKILL.md`
|
|
61
|
+
- `umbra.ui-control-switch`
|
|
62
|
+
- `SKILL.md`
|
|
63
|
+
|
|
64
|
+
## Model Skills
|
|
65
|
+
- `umbra.ui-model-popover`
|
|
66
|
+
- `SKILL.md`
|
|
67
|
+
- `umbra.ui-model-sheet`
|
|
68
|
+
- `SKILL.md`
|
|
69
|
+
- `umbra.ui-model-sidebar`
|
|
70
|
+
- `SKILL.md`
|
|
71
|
+
|
|
72
|
+
## Menu Skills
|
|
73
|
+
- `umbra.ui-menu-action-menu`
|
|
74
|
+
- `SKILL.md`
|
|
75
|
+
|
|
76
|
+
## Dialog Skills
|
|
77
|
+
- `umbra.ui-dialog-alert`
|
|
78
|
+
- `SKILL.md`
|
|
79
|
+
- `umbra.ui-dialog-toast`
|
|
80
|
+
- `SKILL.md`
|
|
81
|
+
|
|
82
|
+
## Indicator Skills
|
|
83
|
+
- `umbra.ui-indicator-progress-bar`
|
|
84
|
+
- `SKILL.md`
|
|
85
|
+
- `umbra.ui-indicator-tooltip`
|
|
86
|
+
- `SKILL.md`
|
|
87
|
+
|
|
88
|
+
## Picker Skills
|
|
89
|
+
- `umbra.ui-picker-date`
|
|
90
|
+
- `SKILL.md`
|
|
91
|
+
- `reference.md`
|
|
92
|
+
- `umbra.ui-picker-collection`
|
|
93
|
+
- `SKILL.md`
|
|
94
|
+
- `reference.md`
|
|
95
|
+
- `umbra.ui-picker-color`
|
|
96
|
+
- `SKILL.md`
|
|
97
|
+
- `reference.md`
|
|
98
|
+
- `umbra.ui-picker-icon`
|
|
99
|
+
- `SKILL.md`
|
|
100
|
+
- `reference.md`
|
|
101
|
+
- `umbra.ui-picker-file`
|
|
102
|
+
- `SKILL.md`
|
|
103
|
+
- `reference.md`
|
|
104
|
+
|
|
105
|
+
## Authoring Notes
|
|
106
|
+
- Keep skill names flat and stable (`umbra.ui-input-*`, `umbra.ui-control-*`, `umbra.ui-model-*`, `umbra.ui-menu-*`, `umbra.ui-dialog-*`, `umbra.ui-indicator-*`, `umbra.ui-picker-*`).
|
|
107
|
+
- Prefer concrete implementation checklists over generic guidance.
|
|
108
|
+
- Add `reference.md` for families with multiple components or complex contracts.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Umbra Skill: Apply Color System To Components
|
|
2
|
+
|
|
3
|
+
Use this skill when converting a Vue component's colors to the Umbra color system from `@umbra.ui/colors`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
|
|
7
|
+
- A component uses hardcoded colors (`#hex`, `rgb`, `hsl`) and needs tokenization.
|
|
8
|
+
- A component needs light/dark theme parity.
|
|
9
|
+
- A component needs semantic color roles (text, border, surface, status, accent).
|
|
10
|
+
- A component must align with `packages/colors/README.md` scale and pairing guidance.
|
|
11
|
+
|
|
12
|
+
## Required Context Checklist
|
|
13
|
+
|
|
14
|
+
- Target component file path(s) and scope (single file vs full feature area).
|
|
15
|
+
- Whether to use semantic CSS tokens (`--text-1`, `--border-2`, etc.) or raw scale tokens.
|
|
16
|
+
- Theme requirement: light only, dark only, or both.
|
|
17
|
+
- Brand/accent palette selection.
|
|
18
|
+
- **Gray palette selection** (`gray`, `mauve`, `slate`, `sage`, `olive`, `sand`).
|
|
19
|
+
- Required interaction states (default, hover, active, selected, disabled, focus, error).
|
|
20
|
+
- Contrast constraints (WCAG/APCA expectations, design QA requirements).
|
|
21
|
+
- Any do-not-change visual constraints from design/product.
|
|
22
|
+
|
|
23
|
+
## Ask Developer If Missing
|
|
24
|
+
|
|
25
|
+
- "Which gray palette do you want for this component (`gray`, `mauve`, `slate`, `sage`, `olive`, or `sand`)?"
|
|
26
|
+
- "Should this component use semantic tokens first (`--text-1`, `--background-1`, etc.), or explicit family tokens (like `--blue-9`)?"
|
|
27
|
+
- "What accent family should represent primary actions in this component?"
|
|
28
|
+
- "Do we need both light and dark theming now, or only one mode?"
|
|
29
|
+
- "Which status families should we use for `error`, `success`, `warning`, and `info`?"
|
|
30
|
+
- "Are there any visual elements that must keep exact legacy color values?"
|
|
31
|
+
- "What are the required states to style (hover, active, focus, disabled, selected, invalid)?"
|
|
32
|
+
- "Do you want this conversion to include nearby child elements for consistency, or keep it strictly scoped?"
|
|
33
|
+
|
|
34
|
+
## Conversion Workflow
|
|
35
|
+
|
|
36
|
+
1. Inventory all current color usages in template/style/script (including inline styles and computed class/style bindings).
|
|
37
|
+
2. Classify each usage into a role:
|
|
38
|
+
- surface/background
|
|
39
|
+
- control/background-interactive
|
|
40
|
+
- border/separator/focus ring
|
|
41
|
+
- text/icon
|
|
42
|
+
- semantic status (error/success/warning/info)
|
|
43
|
+
3. Replace raw values with token references:
|
|
44
|
+
- Prefer semantic aliases for reusable UI meaning.
|
|
45
|
+
- Use raw family scale steps for brand accents and highly specific visual treatments.
|
|
46
|
+
4. Map states to nearby scale steps consistently:
|
|
47
|
+
- surface: `1-5`
|
|
48
|
+
- borders: `6-8`
|
|
49
|
+
- solids/fills: `9-10`
|
|
50
|
+
- text/icon: `11-12`
|
|
51
|
+
5. Ensure light/dark token parity with the same role mapping in both themes.
|
|
52
|
+
6. Validate contrast and state clarity (especially disabled, focus, and invalid).
|
|
53
|
+
7. Keep naming readable and role-driven (`textPrimary`, `surfaceInteractiveHover`, etc.).
|
|
54
|
+
|
|
55
|
+
## Practical Mapping Guidance
|
|
56
|
+
|
|
57
|
+
- Text:
|
|
58
|
+
- Primary text -> `--text-1` (or `family12`)
|
|
59
|
+
- Secondary text -> `--text-2` (or `family11`)
|
|
60
|
+
- Surfaces:
|
|
61
|
+
- App/card baseline -> `--background-1`
|
|
62
|
+
- Subtle nested areas -> `--background-2`
|
|
63
|
+
- Interactive hover/active -> family `4/5` or control aliases
|
|
64
|
+
- Borders:
|
|
65
|
+
- Subtle separators -> `--border-3` or family `6`
|
|
66
|
+
- Interactive border -> `--border-2` / family `7`
|
|
67
|
+
- Focus ring -> family `8` (or accent `8`)
|
|
68
|
+
- Solids:
|
|
69
|
+
- Primary fills -> family `9`
|
|
70
|
+
- Hovered primary fills -> family `10`
|
|
71
|
+
- Semantic states:
|
|
72
|
+
- Error -> `--error` or chosen error family
|
|
73
|
+
- Success -> `--success` or chosen success family
|
|
74
|
+
- Warning -> `--warning` or chosen warning family
|
|
75
|
+
- Info -> `--info` or chosen info family
|
|
76
|
+
|
|
77
|
+
## Rules Of Thumb
|
|
78
|
+
|
|
79
|
+
- Do not preserve ad-hoc one-off colors unless explicitly requested.
|
|
80
|
+
- Prefer role consistency over visual matching every old hex exactly.
|
|
81
|
+
- Avoid mixing many saturated families in one component without intent.
|
|
82
|
+
- If the component is mostly utility UI, neutral tokens should dominate.
|
|
83
|
+
- If a solid fill uses step `9/10`, verify foreground text color choice is readable.
|
|
84
|
+
|
|
85
|
+
## Validation And Edge Cases
|
|
86
|
+
|
|
87
|
+
- Hover/active/focus/disabled are all visibly distinct.
|
|
88
|
+
- Invalid and success states remain obvious in both themes.
|
|
89
|
+
- Token usage is consistent between CSS modules, scoped styles, and inline style bindings.
|
|
90
|
+
- No leftover hardcoded color literals remain unless documented as intentional.
|
|
91
|
+
- Existing component behavior is unchanged (color migration only).
|
|
92
|
+
|
|
93
|
+
## Definition Of Done
|
|
94
|
+
|
|
95
|
+
- All target color values are tokenized with Umbra color principles.
|
|
96
|
+
- Gray palette and accent/status decisions are confirmed with the developer.
|
|
97
|
+
- Theme behavior (light/dark as required) is complete and consistent.
|
|
98
|
+
- Semantic/role mapping is explicit and maintainable for future edits.
|
|
99
|
+
|
|
100
|
+
## Additional Resources
|
|
101
|
+
|
|
102
|
+
- For a component-by-component token matrix and ready-made recipes, see [reference.md](reference.md).
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Umbra Colors Application Reference
|
|
2
|
+
|
|
3
|
+
Use this document with `SKILL.md` to make color conversion decisions quickly and consistently.
|
|
4
|
+
|
|
5
|
+
## Decision Matrix
|
|
6
|
+
|
|
7
|
+
Use this as the default mapping unless the developer requests a specific deviation.
|
|
8
|
+
|
|
9
|
+
| UI role | Preferred semantic token | Raw fallback pattern |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| App/page background | `--background-1` | `neutral1` or `neutral2` |
|
|
12
|
+
| Nested/subtle surface | `--background-2` | `neutral2` or family `2` |
|
|
13
|
+
| Default interactive surface | `--control-3` | family `3` |
|
|
14
|
+
| Hover interactive surface | `--control-2` | family `4` |
|
|
15
|
+
| Active/selected interactive surface | `--control-1` | family `5` |
|
|
16
|
+
| Subtle border/separator | `--border-3` | family `6` |
|
|
17
|
+
| Control border | `--border-2` | family `7` |
|
|
18
|
+
| Focus ring / strong border | `--border-1` | family `8` or accent `8` |
|
|
19
|
+
| High emphasis solid | n/a | family `9` |
|
|
20
|
+
| High emphasis solid hover | n/a | family `10` |
|
|
21
|
+
| Primary text | `--text-1` | neutral `12` |
|
|
22
|
+
| Secondary text | `--text-2` | neutral `11` |
|
|
23
|
+
| Tertiary text/meta | `--text-3` | neutral `10` |
|
|
24
|
+
| Link text | `--link` | info family `11` |
|
|
25
|
+
| Error state | `--error` | error family `9-11` |
|
|
26
|
+
| Success state | `--success` | success family `9-11` |
|
|
27
|
+
| Warning state | `--warning` | warning family `9-11` |
|
|
28
|
+
| Info state | `--info` | info family `9-11` |
|
|
29
|
+
|
|
30
|
+
## Component Recipes
|
|
31
|
+
|
|
32
|
+
## Input (text-like controls)
|
|
33
|
+
|
|
34
|
+
Recommended baseline:
|
|
35
|
+
|
|
36
|
+
- Container background: `--background-1` (or neutral `1/2`)
|
|
37
|
+
- Border: `--border-2`
|
|
38
|
+
- Text: `--text-1`
|
|
39
|
+
- Placeholder/meta: `--text-3`
|
|
40
|
+
- Hover border: `--border-1` or neutral `8`
|
|
41
|
+
- Focus ring: accent `8` (or semantic focus token if project defines one)
|
|
42
|
+
- Invalid:
|
|
43
|
+
- border/ring: `--error` or error family `8/9`
|
|
44
|
+
- helper text: error family `11`
|
|
45
|
+
- Disabled:
|
|
46
|
+
- surface shift toward `--background-2`
|
|
47
|
+
- text shift to `--text-3`
|
|
48
|
+
|
|
49
|
+
## Button
|
|
50
|
+
|
|
51
|
+
### Primary button
|
|
52
|
+
- Background: accent `9`
|
|
53
|
+
- Hover: accent `10`
|
|
54
|
+
- Text: choose readable foreground (often white for most accent families)
|
|
55
|
+
- Focus ring: accent `8` or alpha accent ring token
|
|
56
|
+
- Disabled:
|
|
57
|
+
- background toward neutral `4/5`
|
|
58
|
+
- text toward neutral `10/11`
|
|
59
|
+
|
|
60
|
+
### Secondary/ghost button
|
|
61
|
+
- Background rest: transparent or family `3`
|
|
62
|
+
- Hover: family `4`
|
|
63
|
+
- Active: family `5`
|
|
64
|
+
- Border: family `7`
|
|
65
|
+
- Text/icon: family `11/12` or semantic text tokens
|
|
66
|
+
|
|
67
|
+
## Alert / callout
|
|
68
|
+
|
|
69
|
+
For each intent (`error`, `success`, `warning`, `info`):
|
|
70
|
+
|
|
71
|
+
- Background tint: family `3` (or `2` for subtler variant)
|
|
72
|
+
- Border: family `6/7`
|
|
73
|
+
- Title text/icon: family `11/12`
|
|
74
|
+
- Body text: `--text-1` or family `11`
|
|
75
|
+
|
|
76
|
+
Keep intent colors mostly on icon/title/border; avoid overwhelming full-body saturation.
|
|
77
|
+
|
|
78
|
+
## Table row / list item
|
|
79
|
+
|
|
80
|
+
- Base row: transparent or `--background-1`
|
|
81
|
+
- Zebra stripe (optional): `--background-2`
|
|
82
|
+
- Hover row: family `3` or `--control-3`
|
|
83
|
+
- Selected row: family `4/5` (same family as related accent if selection is semantic)
|
|
84
|
+
- Row divider: `--border-3`
|
|
85
|
+
- Primary text: `--text-1`
|
|
86
|
+
- Secondary text: `--text-2`
|
|
87
|
+
|
|
88
|
+
## Selected state (generic pattern)
|
|
89
|
+
|
|
90
|
+
For chips, menu items, segmented items, tabs:
|
|
91
|
+
|
|
92
|
+
- Rest selected bg: family `5`
|
|
93
|
+
- Hover selected bg: family `6` or stronger nearby tone
|
|
94
|
+
- Selected border: family `7/8`
|
|
95
|
+
- Selected label/icon: family `11/12`
|
|
96
|
+
|
|
97
|
+
Use one family consistently for selected-state visuals inside one control.
|
|
98
|
+
|
|
99
|
+
## Theme And Palette Guidance
|
|
100
|
+
|
|
101
|
+
## Conversion Prompt Template
|
|
102
|
+
|
|
103
|
+
Use this exact message when project context is missing before converting a component:
|
|
104
|
+
|
|
105
|
+
```md
|
|
106
|
+
Before I convert colors in `[component-path]`, please confirm:
|
|
107
|
+
|
|
108
|
+
1) Gray palette:
|
|
109
|
+
- Which neutral family should I use: `gray`, `mauve`, `slate`, `sage`, `olive`, or `sand`?
|
|
110
|
+
|
|
111
|
+
2) Accent and semantic families:
|
|
112
|
+
- Primary accent family:
|
|
113
|
+
- Error family:
|
|
114
|
+
- Success family:
|
|
115
|
+
- Warning family:
|
|
116
|
+
- Info family:
|
|
117
|
+
|
|
118
|
+
3) Token strategy:
|
|
119
|
+
- Prefer semantic tokens first (`--text-1`, `--background-1`, etc.), or allow direct family tokens (`--blue-9`, etc.) where useful?
|
|
120
|
+
|
|
121
|
+
4) Theme scope:
|
|
122
|
+
- Light only, dark only, or both?
|
|
123
|
+
|
|
124
|
+
5) Required states:
|
|
125
|
+
- Which states must be implemented: hover, active, focus, disabled, selected, invalid?
|
|
126
|
+
|
|
127
|
+
6) Constraints:
|
|
128
|
+
- Any colors/elements that must remain visually unchanged?
|
|
129
|
+
- Should I keep conversion strictly to this file, or include adjacent child elements for consistency?
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If the developer does not specify:
|
|
133
|
+
|
|
134
|
+
- Use `gray` for neutral family.
|
|
135
|
+
- Use semantic tokens for shared UI roles.
|
|
136
|
+
- Implement both light and dark where supported.
|
|
137
|
+
- Include at least: hover, focus, disabled, and invalid states for interactive controls.
|
|
138
|
+
|
|
139
|
+
## Gray palette selection
|
|
140
|
+
|
|
141
|
+
Ask developer first if not provided:
|
|
142
|
+
|
|
143
|
+
- `gray`: pure neutral, minimal hue bias
|
|
144
|
+
- `mauve`: purple-cool neutral
|
|
145
|
+
- `slate`: blue-cool neutral
|
|
146
|
+
- `sage`: green neutral
|
|
147
|
+
- `olive`: yellow-green neutral
|
|
148
|
+
- `sand`: warm neutral
|
|
149
|
+
|
|
150
|
+
Safe default when unsure: `gray`.
|
|
151
|
+
|
|
152
|
+
## Accent text-on-solid guidance
|
|
153
|
+
|
|
154
|
+
For step `9/10` solids:
|
|
155
|
+
|
|
156
|
+
- Usually light text works for most saturated families.
|
|
157
|
+
- `sky`, `mint`, `lime`, `yellow`, and `amber` often need dark foreground text.
|
|
158
|
+
|
|
159
|
+
Always verify readability in both light and dark themes.
|
|
160
|
+
|
|
161
|
+
## State Contrast Checklist
|
|
162
|
+
|
|
163
|
+
Before finalizing color conversion, verify:
|
|
164
|
+
|
|
165
|
+
- Default vs hover is visible.
|
|
166
|
+
- Hover vs active is visible.
|
|
167
|
+
- Focus ring is visible over nearby surfaces.
|
|
168
|
+
- Disabled is clearly non-interactive but still readable.
|
|
169
|
+
- Invalid and success are distinct from normal state.
|
|
170
|
+
- Selected and focused are distinguishable when both can occur.
|
|
171
|
+
|
|
172
|
+
## Anti-Patterns
|
|
173
|
+
|
|
174
|
+
- Keeping arbitrary legacy hex values "just because they look close."
|
|
175
|
+
- Mixing multiple accent families in one small control without semantic reason.
|
|
176
|
+
- Using high-saturation step `9` for large backgrounds where subtle surfaces are expected.
|
|
177
|
+
- Using `11/12` text values from unrelated families when semantic text tokens are available.
|
|
178
|
+
- Styling only light mode and leaving dark mode inconsistent.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Umbra Skill: Button
|
|
2
|
+
|
|
3
|
+
Use this skill for action buttons built with Umbra `Button`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Primary/secondary user actions (submit, continue, cancel, delete).
|
|
7
|
+
- Calls to backend actions where disabled/active state matters.
|
|
8
|
+
- Buttons that need consistent visual variants across the app.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Action intent and click handler.
|
|
12
|
+
- Visual variant: `buttonType`, `buttonStyle`, `buttonSize`.
|
|
13
|
+
- Interaction state: `normal`, `active`, or `disabled`.
|
|
14
|
+
- Title text and optional tooltip.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "What action does this button trigger?"
|
|
18
|
+
- "Which variant should this use (type/style/size)?"
|
|
19
|
+
- "When should it be disabled or show active state?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `Button` from `@umbra-ui/core`.
|
|
23
|
+
2. Render with `title`, variant props, and state.
|
|
24
|
+
3. Wire `@click` to domain action.
|
|
25
|
+
4. If state is controlled externally, also handle `@update:state`.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Disabled state must block unintended actions.
|
|
29
|
+
- Destructive actions should use warning/danger style.
|
|
30
|
+
- Ensure tooltip copy is clear for icon-like or ambiguous labels.
|
|
31
|
+
|
|
32
|
+
## Definition Of Done
|
|
33
|
+
- Variant and state match UI requirements.
|
|
34
|
+
- Click behavior and disabled rules work correctly.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Umbra Skill: Checkbox
|
|
2
|
+
|
|
3
|
+
Use this skill for boolean or multi-select toggle inputs with Umbra `Checkbox`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Single true/false settings.
|
|
7
|
+
- Checklist UIs where multiple selections are allowed.
|
|
8
|
+
- Compact selection controls in forms and list rows.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Checked source of truth (`isChecked` binding).
|
|
12
|
+
- Visual mode: `checkboxType` (`circle`, `square`, `plain`).
|
|
13
|
+
- Size requirements and accessibility label context.
|
|
14
|
+
- Update pathway from UI to model/store.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "Is this single boolean or part of a checklist?"
|
|
18
|
+
- "Which checkbox style should be used?"
|
|
19
|
+
- "What model field should receive `update:isChecked`?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `Checkbox`.
|
|
23
|
+
2. Bind checked state via `:is-checked`.
|
|
24
|
+
3. Handle `@update:is-checked` to persist change.
|
|
25
|
+
4. Pair with visible label text nearby for clarity.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Ensure event names use correct casing in Vue templates.
|
|
29
|
+
- Checkbox interaction should remain stable in dynamic lists.
|
|
30
|
+
- Verify size and hit target are usable on touch devices.
|
|
31
|
+
|
|
32
|
+
## Definition Of Done
|
|
33
|
+
- Checked state is fully controlled by parent state.
|
|
34
|
+
- Style/size match design and state updates persist.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Umbra Skill: Dropdown
|
|
2
|
+
|
|
3
|
+
Use this skill for single-selection lists using Umbra `Dropdown`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Selection from predefined options with optional subtitles.
|
|
7
|
+
- Forms where selected item is an object (`DropdownItem`).
|
|
8
|
+
- Flows requiring keyboard-accessible select behavior.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- `items: DropdownItem[]` source and option IDs.
|
|
12
|
+
- Selected value shape (`DropdownItem | null`) and persistence.
|
|
13
|
+
- Placeholder copy and disabled-item policy.
|
|
14
|
+
- Overlay behavior (`showOverlay`) for page context.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "What is the exact option list and selected value type?"
|
|
18
|
+
- "Should any options be disabled?"
|
|
19
|
+
- "Do we need outside overlay while open?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `Dropdown` and `DropdownItem`.
|
|
23
|
+
2. Define `items` and `selectedItem`.
|
|
24
|
+
3. Render with `v-model` and `placeholder`.
|
|
25
|
+
4. Handle `@change` for side effects.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Use stable IDs for option identity.
|
|
29
|
+
- Handle `null` selection where field is optional.
|
|
30
|
+
- Verify keyboard flow: open, navigate, select, escape.
|
|
31
|
+
|
|
32
|
+
## Definition Of Done
|
|
33
|
+
- Dropdown selection updates model correctly.
|
|
34
|
+
- Disabled/placeholder behavior and keyboard UX work as expected.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Umbra Skill: IconButton
|
|
2
|
+
|
|
3
|
+
Use this skill for icon-only actions with Umbra `IconButton`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Toolbar actions, compact controls, and action menus.
|
|
7
|
+
- Repeated actions where iconography is recognizable.
|
|
8
|
+
- UI requiring small footprint with optional tooltip.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Icon key (`iconName`) and semantic meaning.
|
|
12
|
+
- Visual variant: `buttonType`, `buttonStyle`, size.
|
|
13
|
+
- State rules (`normal`, `active`, `disabled`).
|
|
14
|
+
- Tooltip content for accessibility/clarity.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "Which icon should represent this action?"
|
|
18
|
+
- "Should the button show active/pressed state?"
|
|
19
|
+
- "Is tooltip text required for discoverability?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `IconButton`.
|
|
23
|
+
2. Set `icon-name` and desired variant props.
|
|
24
|
+
3. Wire `@click` to action and optional `@update:state`.
|
|
25
|
+
4. Add `tooltip` for ambiguous icons.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Confirm icon exists in `@umbra-ui/icons`.
|
|
29
|
+
- Disabled state must block action dispatch.
|
|
30
|
+
- Ensure icon-only controls still have contextual label nearby or tooltip.
|
|
31
|
+
|
|
32
|
+
## Definition Of Done
|
|
33
|
+
- Icon button renders correct icon/variant and triggers expected action.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Umbra Skill: InlineDropdown
|
|
2
|
+
|
|
3
|
+
Use this skill for compact inline selection with Umbra `InlineDropdown`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Space-constrained selectors embedded in rows/cards.
|
|
7
|
+
- Lightweight option switching without full popover complexity.
|
|
8
|
+
- Inline editing surfaces where value changes are frequent.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- `items` list shape (`{ id, title }[]`).
|
|
12
|
+
- Bound selected item (`modelValue`) and nullable behavior.
|
|
13
|
+
- Placeholder copy for empty selection.
|
|
14
|
+
- Side-effect handling on item selection.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "What item list should this component display?"
|
|
18
|
+
- "Can selection be empty, or must one item always be selected?"
|
|
19
|
+
- "Should we react to `itemSelected` for analytics/workflow?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `InlineDropdown`.
|
|
23
|
+
2. Define `items` and selected state.
|
|
24
|
+
3. Bind with `v-model`.
|
|
25
|
+
4. Use `@itemSelected` when selection triggers additional actions.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Keep selected item object identity stable when items refresh.
|
|
29
|
+
- Handle stale selections if option list changes dynamically.
|
|
30
|
+
|
|
31
|
+
## Definition Of Done
|
|
32
|
+
- Selection updates reliably and inline UX remains compact and clear.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Umbra Skill: Radio
|
|
2
|
+
|
|
3
|
+
Use this skill for mutually-exclusive option groups with Umbra `Radio`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Exactly one option must be selected from a set.
|
|
7
|
+
- Settings/forms with clear single-choice decisions.
|
|
8
|
+
- Layouts needing horizontal or vertical radio groups.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- `items: ControlItem[]` definitions (title/subtitle/disabled).
|
|
12
|
+
- Selected index source of truth.
|
|
13
|
+
- Layout choice (`horizontal` or `vertical`).
|
|
14
|
+
- Desired visual type via `checkboxType`.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "What are the available options and default selection?"
|
|
18
|
+
- "Should options display horizontal or vertical?"
|
|
19
|
+
- "Any options disabled by permission/state?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `Radio`.
|
|
23
|
+
2. Define options and `selectedIndex`.
|
|
24
|
+
3. Render with `:items`, `:selected-index`, and layout/type props.
|
|
25
|
+
4. Handle `@click` to persist selected index.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Ensure selected index stays in bounds when options change.
|
|
29
|
+
- Disabled options should not be selectable.
|
|
30
|
+
- Persist index to domain model when leaving the view.
|
|
31
|
+
|
|
32
|
+
## Definition Of Done
|
|
33
|
+
- One-and-only-one selection works and maps correctly to business state.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Umbra Skill: RangeSlider
|
|
2
|
+
|
|
3
|
+
Use this skill for dual-thumb range selection with Umbra `RangeSlider`.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- Price/age/time filters requiring min/max bounds.
|
|
7
|
+
- Configs where users choose an allowed interval.
|
|
8
|
+
- Range UIs with optional ticks/labels.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Absolute `min`/`max` bounds.
|
|
12
|
+
- Controlled values: `minValue` and `maxValue`.
|
|
13
|
+
- `sliderStyle`, tick interval, and label display expectations.
|
|
14
|
+
- Persistence target for selected range.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "What min/max bounds should be enforced?"
|
|
18
|
+
- "Should ticks or tick labels be shown?"
|
|
19
|
+
- "What should happen when range updates?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `RangeSlider`.
|
|
23
|
+
2. Maintain parent-controlled `minValue` and `maxValue`.
|
|
24
|
+
3. Render with bounds and style props.
|
|
25
|
+
4. Handle `@update:min-value` and `@update:max-value`.
|
|
26
|
+
|
|
27
|
+
## Validation And Edge Cases
|
|
28
|
+
- Ensure `minValue <= maxValue` at all times.
|
|
29
|
+
- Clamp external values to bounds before passing to component.
|
|
30
|
+
- Verify behavior on touch and mouse.
|
|
31
|
+
|
|
32
|
+
## Definition Of Done
|
|
33
|
+
- Range updates are stable, bounded, and persisted correctly.
|