@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Umbra Skill: DatePicker
|
|
2
|
+
|
|
3
|
+
Use this skill for date selection with compact/full calendar views and optional custom trigger labels.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- You need a single-date picker bound to a `Date` model.
|
|
7
|
+
- You need a popover calendar with smart positioning.
|
|
8
|
+
- You want custom trigger visuals via the `label` slot.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Bound date state location (`v-model:date`) and submit behavior.
|
|
12
|
+
- Timezone/display expectations (local date formatting).
|
|
13
|
+
- Whether to keep default label UI or provide a custom `#label` slot.
|
|
14
|
+
- Validation rules that remain in parent (min/max/business constraints).
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "Should selected dates be interpreted in local time or normalized before submit?"
|
|
18
|
+
- "Do we need a custom trigger label design or default DatePicker label?"
|
|
19
|
+
- "What date constraints should the parent enforce?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `DatePicker`.
|
|
23
|
+
2. Bind `v-model:date` to a `ref<Date>`.
|
|
24
|
+
3. Optionally handle `@update:date` for side effects.
|
|
25
|
+
4. For custom trigger UI, provide `#label` (or set `:label="false"` to hide).
|
|
26
|
+
5. Keep business validation in parent and surface errors separately.
|
|
27
|
+
|
|
28
|
+
## Validation And Edge Cases
|
|
29
|
+
- Ensure parent can handle timezone-sensitive dates consistently.
|
|
30
|
+
- Avoid mutating shared `Date` instances unexpectedly in parent logic.
|
|
31
|
+
- Verify open/close and selection behavior with keyboard and pointer.
|
|
32
|
+
|
|
33
|
+
## Definition Of Done
|
|
34
|
+
- Date selection updates parent state reliably via `v-model:date`.
|
|
35
|
+
- Trigger behavior matches design (default/custom/hidden label).
|
|
36
|
+
- Parent validation and submit flow handle invalid ranges gracefully.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Reference: DatePicker
|
|
2
|
+
|
|
3
|
+
Source of truth:
|
|
4
|
+
- `packages/core/src/components/pickers/DatePicker/DatePicker.vue`
|
|
5
|
+
- `packages/core/src/components/pickers/DatePicker/README.md`
|
|
6
|
+
|
|
7
|
+
## Public Props
|
|
8
|
+
- `date: Date`
|
|
9
|
+
- `label?: boolean` (default `true`)
|
|
10
|
+
|
|
11
|
+
## Slots
|
|
12
|
+
- `label` -> custom trigger content (default label rendering is fallback)
|
|
13
|
+
|
|
14
|
+
## Emitted Events
|
|
15
|
+
- `update:date` -> selected `Date`
|
|
16
|
+
|
|
17
|
+
## Integration Notes
|
|
18
|
+
- Custom trigger styling can target:
|
|
19
|
+
- `data-date-picker-button`
|
|
20
|
+
- `data-date-picker-open="true|false"`
|
|
21
|
+
- Parent should own min/max/business validation rules.
|
|
22
|
+
|
|
23
|
+
## Agent Verification Checklist
|
|
24
|
+
- `v-model:date` updates on day selection.
|
|
25
|
+
- Custom `#label` renders and default trigger visuals are not forced.
|
|
26
|
+
- `:label="false"` hides trigger label content.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Umbra Skill: FilePicker
|
|
2
|
+
|
|
3
|
+
Use this skill for drag-and-drop file selection with validation, optional directory traversal, and customizable overlay states.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- You need drag-and-drop plus click-to-upload file intake.
|
|
7
|
+
- You need file type/size/count constraints at input time.
|
|
8
|
+
- You need custom empty/overlay/processing UI using slots.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Accepted file types and max file size/count constraints.
|
|
12
|
+
- Whether uploads append or replace existing selections.
|
|
13
|
+
- Whether directory traversal is allowed (`recursive`).
|
|
14
|
+
- Error handling strategy for `error` payloads.
|
|
15
|
+
- Whether parent needs programmatic controls via `defineExpose`.
|
|
16
|
+
|
|
17
|
+
## Ask Developer If Missing
|
|
18
|
+
- "What exact file-type constraints and max sizes should apply?"
|
|
19
|
+
- "Should newly dropped files append or replace current files?"
|
|
20
|
+
- "Do we allow dropping folders recursively?"
|
|
21
|
+
- "What should happen with validation failures in UI?"
|
|
22
|
+
|
|
23
|
+
## Implementation Recipe
|
|
24
|
+
1. Import `FilePicker` and bind `v-model:files`.
|
|
25
|
+
2. Configure `accept`, `maxSize`, `maxFiles`, `multiple`, `appendFiles`.
|
|
26
|
+
3. Handle:
|
|
27
|
+
- `@update:files` for state sync
|
|
28
|
+
- `@error` for validation messages
|
|
29
|
+
- `@drop` for incremental side effects
|
|
30
|
+
4. Add optional slots (`default`, `overlay`, `processing`) as needed.
|
|
31
|
+
5. Use `ref` + exposed methods for programmatic open/clear when required.
|
|
32
|
+
|
|
33
|
+
## Validation And Edge Cases
|
|
34
|
+
- Confirm extension + MIME matching is correct for your accept list.
|
|
35
|
+
- Handle single-file mode (`multiple=false`) and replacement semantics.
|
|
36
|
+
- Guard against large batch drops and folder recursion depth expectations.
|
|
37
|
+
- Ensure disabled state blocks interaction and visual state changes.
|
|
38
|
+
|
|
39
|
+
## Definition Of Done
|
|
40
|
+
- File selection flow works for drag-drop and dialog.
|
|
41
|
+
- Validation errors surface clearly and deterministically.
|
|
42
|
+
- Parent receives correct file arrays and reacts to updates reliably.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Reference: FilePicker
|
|
2
|
+
|
|
3
|
+
Source of truth:
|
|
4
|
+
- `packages/core/src/components/pickers/FilePicker/FilePicker.vue`
|
|
5
|
+
- `packages/core/src/components/pickers/FilePicker/README.md`
|
|
6
|
+
|
|
7
|
+
## Public Props
|
|
8
|
+
- `accept?: string | string[]` (default `"*/*"`)
|
|
9
|
+
- `multiple?: boolean` (default `true`)
|
|
10
|
+
- `disabled?: boolean` (default `false`)
|
|
11
|
+
- `maxSize?: number` (default `Infinity`)
|
|
12
|
+
- `maxFiles?: number` (default `Infinity`)
|
|
13
|
+
- `recursive?: boolean` (default `true`)
|
|
14
|
+
- `appendFiles?: boolean` (default `true`)
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
- `update:files` -> `File[]`
|
|
18
|
+
- `error` -> `FileError[]`
|
|
19
|
+
- `drop` -> newly dropped `File[]`
|
|
20
|
+
|
|
21
|
+
## Slots
|
|
22
|
+
- default slot -> idle dropzone content
|
|
23
|
+
- `overlay` -> drag-over overlay UI
|
|
24
|
+
- `processing` -> while files are being processed
|
|
25
|
+
|
|
26
|
+
## Exposed Methods/State
|
|
27
|
+
- `openFileDialog()`
|
|
28
|
+
- `clearFiles()`
|
|
29
|
+
- `files` (reactive files ref)
|
|
30
|
+
- `errors` (reactive errors ref)
|
|
31
|
+
|
|
32
|
+
## Types
|
|
33
|
+
- `FileError`: `{ file: string; error: string }`
|
|
34
|
+
- `DropState`: `{ isDragging: boolean; isProcessing: boolean; dragCount: number }`
|
|
35
|
+
|
|
36
|
+
## Agent Verification Checklist
|
|
37
|
+
- Accepted/rejected file behavior matches `accept`, `maxSize`, `maxFiles`.
|
|
38
|
+
- `appendFiles` vs replace behavior is correct for product flow.
|
|
39
|
+
- `error` payloads are surfaced in UI and are actionable.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Umbra Skill: IconPicker
|
|
2
|
+
|
|
3
|
+
Use this skill for selecting icon keys from `@umbra.ui/icons` with optional custom trigger rendering.
|
|
4
|
+
|
|
5
|
+
## When To Use
|
|
6
|
+
- You need to store an icon key (`IconKey`/string) from Umbra icons.
|
|
7
|
+
- You need optional custom icon subsets (`iconList`).
|
|
8
|
+
- You need custom trigger UI through the `label` slot.
|
|
9
|
+
|
|
10
|
+
## Required Context Checklist
|
|
11
|
+
- Selected icon state and storage format.
|
|
12
|
+
- Whether to use default icon catalog or constrained `iconList`.
|
|
13
|
+
- Whether popup must be disabled (`preventPopup`).
|
|
14
|
+
- Trigger style choice: default icon trigger vs custom `#label`.
|
|
15
|
+
|
|
16
|
+
## Ask Developer If Missing
|
|
17
|
+
- "Do you want all icons or a curated icon subset?"
|
|
18
|
+
- "Should icon picker be interactive or display-only (`preventPopup`)?"
|
|
19
|
+
- "Do you need custom trigger styling via `#label`?"
|
|
20
|
+
|
|
21
|
+
## Implementation Recipe
|
|
22
|
+
1. Import `IconPicker`.
|
|
23
|
+
2. Bind `v-model:icon` to `ref<IconKey | string>`.
|
|
24
|
+
3. Provide `:icon-list` when domain-specific icon choices are needed.
|
|
25
|
+
4. Handle `@update:icon` for side effects.
|
|
26
|
+
5. Provide `#label` if trigger visuals must be fully custom.
|
|
27
|
+
|
|
28
|
+
## Validation And Edge Cases
|
|
29
|
+
- Ensure icon keys passed in `iconList` exist in `@umbra.ui/icons`.
|
|
30
|
+
- Handle empty/unknown icon values gracefully in parent model.
|
|
31
|
+
- Verify constrained lists still include currently selected value.
|
|
32
|
+
|
|
33
|
+
## Definition Of Done
|
|
34
|
+
- Selection emits and model binding are stable.
|
|
35
|
+
- Curated icon list behavior is correct.
|
|
36
|
+
- Trigger behavior matches requirements (default/custom/hidden label).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Reference: IconPicker
|
|
2
|
+
|
|
3
|
+
Source of truth:
|
|
4
|
+
- `packages/core/src/components/pickers/IconPicker/IconPicker.vue`
|
|
5
|
+
- `packages/core/src/components/pickers/IconPicker/README.md`
|
|
6
|
+
|
|
7
|
+
## Public Props
|
|
8
|
+
- `icon: string`
|
|
9
|
+
- `pickerOffsetX: number` (default `0`)
|
|
10
|
+
- `preventPopup: boolean` (default `false`)
|
|
11
|
+
- `label?: boolean` (default `true`)
|
|
12
|
+
- `iconList?: IconKey[]`
|
|
13
|
+
- `iconSize?: number` (default `18`)
|
|
14
|
+
|
|
15
|
+
## Slots
|
|
16
|
+
- `label` -> custom trigger content
|
|
17
|
+
|
|
18
|
+
## Events
|
|
19
|
+
- `update:icon` -> selected icon key (`string`)
|
|
20
|
+
|
|
21
|
+
## Integration Notes
|
|
22
|
+
- Default icon list excludes animated keys (`*anim*`).
|
|
23
|
+
- `iconList` overrides the default list and should contain valid keys.
|
|
24
|
+
|
|
25
|
+
## Agent Verification Checklist
|
|
26
|
+
- `v-model:icon` updates to selected icon key.
|
|
27
|
+
- Custom `iconList` limits choices as expected.
|
|
28
|
+
- Custom `#label` and `:label="false"` work correctly.
|