@bridge-ui/vue 0.12.0 → 0.14.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/ai/skills/bridge-ui-components/SKILL.md +2 -1
- package/ai/skills/bridge-ui-forms/SKILL.md +3 -3
- package/dist/Adapters/Examples/date-moment.js +31 -31
- package/dist/Adapters/Examples/i18n-dictionary.js +14 -0
- package/dist/Adapters/Examples/icon-fontawesome.js +24 -22
- package/dist/Adapters/Examples/icon-heroicons.js +47 -45
- package/dist/Adapters/Examples/icon-lucide.js +13 -11
- package/dist/Adapters/Examples/icon-phosphor.js +49 -47
- package/dist/Adapters/Examples/icon-tabler.js +13 -11
- package/dist/Adapters/Examples/rich-text-tiptap.js +34 -41
- package/dist/Components/BaseField/composables/useBaseField.d.ts +3 -3
- package/dist/Components/BaseField/composables/useBaseField.js +7 -7
- package/dist/Components/Calendar/Calendar.vue.d.ts +14 -6
- package/dist/Components/Calendar/Calendar.vue_vue_type_script_setup_true_lang.js +78 -74
- package/dist/Components/Calendar/calendar.types.d.ts +12 -7
- package/dist/Components/Calendar/composables/useCalendar.d.ts +5 -9
- package/dist/Components/Calendar/composables/useCalendar.js +144 -143
- package/dist/Components/CalendarDate/CalendarDate.vue.d.ts +14 -6
- package/dist/Components/CalendarDate/CalendarDate.vue_vue_type_script_setup_true_lang.js +20 -16
- package/dist/Components/CalendarDate/calendarDate.types.d.ts +13 -8
- package/dist/Components/CalendarDate/composables/useCalendarDate.d.ts +4 -8
- package/dist/Components/CalendarDate/composables/useCalendarDate.js +105 -105
- package/dist/Components/CalendarMonth/CalendarMonth.vue.d.ts +9 -2
- package/dist/Components/CalendarMonth/CalendarMonth.vue_vue_type_script_setup_true_lang.js +19 -12
- package/dist/Components/CalendarMonth/calendarMonth.types.d.ts +14 -8
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +4 -7
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.js +92 -89
- package/dist/Components/CalendarRange/CalendarRange.vue.d.ts +14 -6
- package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +109 -105
- package/dist/Components/CalendarRange/calendarRange.types.d.ts +12 -7
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +5 -9
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +181 -154
- package/dist/Components/CalendarYear/CalendarYear.vue.d.ts +9 -2
- package/dist/Components/CalendarYear/CalendarYear.vue_vue_type_script_setup_true_lang.js +20 -13
- package/dist/Components/CalendarYear/calendarYear.types.d.ts +12 -6
- package/dist/Components/CalendarYear/composables/useCalendarYear.d.ts +4 -7
- package/dist/Components/CalendarYear/composables/useCalendarYear.js +91 -88
- package/dist/Components/Carousel/Carousel.js +5 -0
- package/dist/Components/Carousel/Carousel.vue.d.ts +22 -0
- package/dist/Components/Carousel/Carousel.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/Carousel/carousel.types.d.ts +236 -0
- package/dist/Components/Carousel/carouselInjectionKey.d.ts +48 -0
- package/dist/Components/Carousel/carouselInjectionKey.js +4 -0
- package/dist/Components/Carousel/composables/useCarousel.d.ts +91 -0
- package/dist/Components/Carousel/composables/useCarousel.js +331 -0
- package/dist/Components/Carousel/index.d.ts +4 -0
- package/dist/Components/Carousel/index.js +4 -0
- package/dist/Components/CarouselSlide/CarouselSlide.js +5 -0
- package/dist/Components/CarouselSlide/CarouselSlide.vue.d.ts +11 -0
- package/dist/Components/CarouselSlide/CarouselSlide.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/CarouselSlide/carouselSlide.types.d.ts +40 -0
- package/dist/Components/CarouselSlide/composables/useCarouselSlide.d.ts +205 -0
- package/dist/Components/CarouselSlide/composables/useCarouselSlide.js +79 -0
- package/dist/Components/CarouselSlide/index.d.ts +3 -0
- package/dist/Components/CarouselSlide/index.js +3 -0
- package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/ColorPicker/ColorPicker.vue.d.ts +9 -2
- package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +48 -44
- package/dist/Components/ColorPicker/colorPicker.types.d.ts +12 -7
- package/dist/Components/ColorPicker/composables/useColorPicker.d.ts +3 -3
- package/dist/Components/ColorPicker/composables/useColorPicker.js +150 -150
- package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/DatePicker/DatePicker.vue.d.ts +12 -4
- package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +55 -51
- package/dist/Components/DatePicker/composables/useDatePicker.d.ts +3 -3
- package/dist/Components/DatePicker/composables/useDatePicker.js +52 -25
- package/dist/Components/DatePicker/datePicker.types.d.ts +12 -7
- package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/DateRangePicker/DateRangePicker.vue.d.ts +12 -4
- package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +54 -50
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.d.ts +3 -3
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +26 -26
- package/dist/Components/DateRangePicker/dateRangePicker.types.d.ts +12 -7
- package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/DateTimePicker/DateTimePicker.vue.d.ts +9 -2
- package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +82 -78
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.d.ts +3 -3
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +64 -63
- package/dist/Components/DateTimePicker/dateTimePicker.types.d.ts +12 -7
- package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +12 -4
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +110 -106
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.d.ts +3 -3
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +71 -70
- package/dist/Components/DateTimeRangePicker/dateTimeRangePicker.types.d.ts +12 -7
- package/dist/Components/FileUpload/FileUpload.vue.d.ts +22 -24
- package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +101 -92
- package/dist/Components/FileUpload/composables/useFileUpload.d.ts +66 -16
- package/dist/Components/FileUpload/composables/useFileUpload.js +182 -157
- package/dist/Components/FileUpload/fileUpload.types.d.ts +113 -23
- package/dist/Components/FileUpload/fileUploadInjectionKey.d.ts +61 -0
- package/dist/Components/FileUpload/fileUploadInjectionKey.js +4 -0
- package/dist/Components/FileUpload/index.d.ts +1 -1
- package/dist/Components/FileUploadItem/FileUploadItem.js +5 -0
- package/dist/Components/FileUploadItem/FileUploadItem.vue.d.ts +12 -0
- package/dist/Components/FileUploadItem/FileUploadItem.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/Components/FileUploadItem/composables/useFileUploadItem.d.ts +1153 -0
- package/dist/Components/FileUploadItem/composables/useFileUploadItem.js +94 -0
- package/dist/Components/FileUploadItem/fileUploadItem.types.d.ts +20 -0
- package/dist/Components/FileUploadItem/index.d.ts +3 -0
- package/dist/Components/FileUploadItem/index.js +3 -0
- package/dist/Components/Pagination/composables/usePagination.d.ts +1 -1
- package/dist/Components/Rating/Rating.js +5 -0
- package/dist/Components/Rating/Rating.vue.d.ts +20 -0
- package/dist/Components/Rating/Rating.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Components/Rating/composables/useRating.d.ts +112 -0
- package/dist/Components/Rating/composables/useRating.js +190 -0
- package/dist/Components/Rating/index.d.ts +4 -0
- package/dist/Components/Rating/index.js +3 -0
- package/dist/Components/Rating/rating.types.d.ts +107 -0
- package/dist/Components/Sidebar/composables/useSidebar.js +1 -1
- package/dist/Components/Sidebar/composables/useSidebarTrigger.d.ts +1 -1
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/TimePanel/TimePanel.vue.d.ts +10 -2
- package/dist/Components/TimePanel/TimePanel.vue_vue_type_script_setup_true_lang.js +37 -34
- package/dist/Components/TimePanel/composables/useTimePanel.d.ts +5 -5
- package/dist/Components/TimePanel/composables/useTimePanel.js +108 -109
- package/dist/Components/TimePanel/timePanel.types.d.ts +10 -4
- package/dist/Components/TimePicker/TimePicker.vue.d.ts +10 -2
- package/dist/Components/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +46 -42
- package/dist/Components/TimePicker/composables/useTimePicker.d.ts +3 -3
- package/dist/Components/TimePicker/composables/useTimePicker.js +36 -36
- package/dist/Components/TimePicker/timePicker.types.d.ts +12 -7
- package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/TimeRangePicker/TimeRangePicker.vue.d.ts +12 -4
- package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +72 -68
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.d.ts +4 -4
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +87 -87
- package/dist/Components/TimeRangePicker/timeRangePicker.types.d.ts +12 -7
- package/dist/augments.d.ts +10 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +117 -109
- package/docs/README.md +2 -0
- package/docs/components/BaseField.md +3 -3
- package/docs/components/Calendar.md +0 -1
- package/docs/components/CalendarDate.md +0 -1
- package/docs/components/CalendarMonth.md +0 -1
- package/docs/components/CalendarRange.md +0 -1
- package/docs/components/CalendarYear.md +0 -1
- package/docs/components/Carousel.md +113 -0
- package/docs/components/ColorPicker.md +13 -14
- package/docs/components/DatePicker.md +0 -1
- package/docs/components/DateRangePicker.md +0 -1
- package/docs/components/DateTimePicker.md +0 -1
- package/docs/components/DateTimeRangePicker.md +0 -1
- package/docs/components/FileUpload.md +83 -8
- package/docs/components/Rating.md +86 -0
- package/docs/components/RichTextEditor.md +3 -3
- package/docs/components/TimePanel.md +0 -1
- package/docs/components/TimePicker.md +0 -1
- package/docs/components/TimeRangePicker.md +0 -1
- package/package.json +2 -12
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# BaseField
|
|
2
2
|
|
|
3
|
-
> Building block for composite field chrome. Prefer `OtpField` / `Slider` in apps; BaseField remains exported for advanced composition. Theme shared chrome via `components.BaseField`.
|
|
3
|
+
> Building block for composite field chrome. Prefer `OtpField` / `Rating` / `Slider` in apps; BaseField remains exported for advanced composition. Theme shared chrome via `components.BaseField`.
|
|
4
4
|
|
|
5
5
|
Shared vertical field chrome (label, corner, start/end slots, description,
|
|
6
|
-
error message) for OtpField, Slider, and similar controls.
|
|
6
|
+
error message) for OtpField, Rating, Slider, and similar controls.
|
|
7
7
|
|
|
8
8
|
Control tokens stay on the parent (`tokens.size`, …).
|
|
9
9
|
|
|
@@ -124,4 +124,4 @@ const field = useBaseField(() => ({
|
|
|
124
124
|
|
|
125
125
|
## Related components
|
|
126
126
|
|
|
127
|
-
OtpField, Slider, Label
|
|
127
|
+
OtpField, Rating, Slider, Label
|
|
@@ -75,7 +75,6 @@ import { Calendar } from "@bridge-ui/vue/Components/Calendar";
|
|
|
75
75
|
| `slots` | `CalendarDateSlots` | — | Named slots forwarded to `CalendarDate` (`day`). |
|
|
76
76
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week (`0` = Sunday). |
|
|
77
77
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
78
|
-
| `value` | `DatePickerModel` | — | Controlled selection model. |
|
|
79
78
|
| `view` | `CalendarView` | — | Controlled panel view. Pair with `view-change`. |
|
|
80
79
|
| `viewDate` | `Date` | — | Controlled displayed month. Pair with `view-date-change`. |
|
|
81
80
|
|
|
@@ -48,7 +48,6 @@ import { CalendarDate } from "@bridge-ui/vue/Components/CalendarDate";
|
|
|
48
48
|
| `slots` | `{ day?: … }` | — | Named slots (`day`). |
|
|
49
49
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week. |
|
|
50
50
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
51
|
-
| `value` | `DatePickerModel` | — | Controlled selection model. |
|
|
52
51
|
| `viewDate` | `Date` | — | Month currently displayed in the grid. |
|
|
53
52
|
|
|
54
53
|
### v-model
|
|
@@ -37,7 +37,6 @@ import { CalendarMonth } from "@bridge-ui/vue/Components/CalendarMonth";
|
|
|
37
37
|
| `rounded` | `CalendarRounded` | `"md"` | Border radius of month tiles. |
|
|
38
38
|
| `selection` | `DatePickerModel` | — | Date model used to highlight tiles on the commit panel. |
|
|
39
39
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
40
|
-
| `value` | `number` | — | Selected month (`0`–`11`). |
|
|
41
40
|
| `year` | `number` | current year | Year context for min/max month disabling. |
|
|
42
41
|
|
|
43
42
|
### v-model
|
|
@@ -66,7 +66,6 @@ import { CalendarRange } from "@bridge-ui/vue/Components/CalendarRange";
|
|
|
66
66
|
| `slots` | `CalendarRangeSlots` | — | Named slots (`day`, optional `startAside` / `endAside`). |
|
|
67
67
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week. |
|
|
68
68
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
69
|
-
| `value` | `DateRangeValue \| null` | — | Controlled range value (`[start, end]`). |
|
|
70
69
|
| `viewDate` | `Date` | — | Controlled start (left) displayed month. |
|
|
71
70
|
|
|
72
71
|
### v-model
|
|
@@ -38,7 +38,6 @@ import { CalendarYear } from "@bridge-ui/vue/Components/CalendarYear";
|
|
|
38
38
|
| `selection` | `DatePickerModel` | — | Date model used to highlight tiles on the commit panel. |
|
|
39
39
|
| `startYear` | `number` | — | First year of the visible page. |
|
|
40
40
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
41
|
-
| `value` | `number` | — | Selected year. |
|
|
42
41
|
|
|
43
42
|
### v-model
|
|
44
43
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Carousel
|
|
2
|
+
|
|
3
|
+
Slideshow region. Previous and next sit beside the viewport (above and below when vertical), with optional dot indicators, keyboard, and swipe. Slide content stays in the app (`CarouselSlide`).
|
|
4
|
+
|
|
5
|
+
One slide fills the viewport by default. `slidesPerView` shows more than one, including a fraction that peeks the next slide. `orientation` switches the scroll axis. `gap` is the space between slides, in px.
|
|
6
|
+
|
|
7
|
+
Auto-advance pauses while the pointer is over the carousel, while focus is inside it, and when the user prefers reduced motion.
|
|
8
|
+
|
|
9
|
+
## Import
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { Carousel } from "@bridge-ui/vue/Components/Carousel";
|
|
13
|
+
import { CarouselSlide } from "@bridge-ui/vue/Components/CarouselSlide";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
### Usage
|
|
19
|
+
|
|
20
|
+
```vue
|
|
21
|
+
<Carousel aria-label="Product photos">
|
|
22
|
+
<CarouselSlide>
|
|
23
|
+
<img alt="Front" src="/photos/1.jpg" />
|
|
24
|
+
</CarouselSlide>
|
|
25
|
+
<CarouselSlide>
|
|
26
|
+
<img alt="Side" src="/photos/2.jpg" />
|
|
27
|
+
</CarouselSlide>
|
|
28
|
+
</Carousel>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Controlled index
|
|
32
|
+
|
|
33
|
+
```vue
|
|
34
|
+
<Carousel loop v-model:index="index" aria-label="Highlights">
|
|
35
|
+
<CarouselSlide v-for="slide in slides" :key="slide.id">
|
|
36
|
+
{{ slide.content }}
|
|
37
|
+
</CarouselSlide>
|
|
38
|
+
</Carousel>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Auto-play
|
|
42
|
+
|
|
43
|
+
`auto-play` accepts `true` (5 seconds) or an interval in milliseconds.
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<Carousel loop :auto-play="4000" aria-label="Highlights">
|
|
47
|
+
<CarouselSlide>One</CarouselSlide>
|
|
48
|
+
<CarouselSlide>Two</CarouselSlide>
|
|
49
|
+
</Carousel>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Without indicators
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<Carousel aria-label="Photos" :indicators="false">
|
|
56
|
+
<CarouselSlide>One</CarouselSlide>
|
|
57
|
+
<CarouselSlide>Two</CarouselSlide>
|
|
58
|
+
</Carousel>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Slots
|
|
62
|
+
|
|
63
|
+
```vue
|
|
64
|
+
<Carousel aria-label="Photos">
|
|
65
|
+
<CarouselSlide>One</CarouselSlide>
|
|
66
|
+
<CarouselSlide>Two</CarouselSlide>
|
|
67
|
+
|
|
68
|
+
<template #prev>Back</template>
|
|
69
|
+
<template #next>Forward</template>
|
|
70
|
+
</Carousel>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Several slides
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<Carousel :gap="16" :slides-per-view="3" aria-label="Products">
|
|
77
|
+
<CarouselSlide>One</CarouselSlide>
|
|
78
|
+
<CarouselSlide>Two</CarouselSlide>
|
|
79
|
+
<CarouselSlide>Three</CarouselSlide>
|
|
80
|
+
</Carousel>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each dot is a snap, not a slide. Five slides with `:slides-per-view="3"` show three dots. When every slide fits, the dots stay hidden.
|
|
84
|
+
|
|
85
|
+
### Vertical
|
|
86
|
+
|
|
87
|
+
Set a height on the region when the slides should not use the default viewport height.
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<Carousel class="h-96" aria-label="Stories" orientation="vertical">
|
|
91
|
+
<CarouselSlide>One</CarouselSlide>
|
|
92
|
+
<CarouselSlide>Two</CarouselSlide>
|
|
93
|
+
</Carousel>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Right to left
|
|
97
|
+
|
|
98
|
+
`dir="rtl"` flips the horizontal axis: arrow keys, swipe, and the track. The chevrons rotate with the direction.
|
|
99
|
+
|
|
100
|
+
```vue
|
|
101
|
+
<Carousel loop dir="rtl" aria-label="Photos">
|
|
102
|
+
<CarouselSlide>One</CarouselSlide>
|
|
103
|
+
<CarouselSlide>Two</CarouselSlide>
|
|
104
|
+
</Carousel>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Keyboard and touch
|
|
108
|
+
|
|
109
|
+
- Horizontal: `ArrowLeft` / `ArrowRight`. Vertical: `ArrowUp` / `ArrowDown`. `dir="rtl"` swaps the horizontal arrows
|
|
110
|
+
- `Home` / `End` jump to the first and last snap
|
|
111
|
+
- A swipe along the scroll axis moves one snap. The cross-axis is left to the page
|
|
112
|
+
- `loop` wraps the ends. Without it, the edge control is disabled
|
|
113
|
+
- With `slidesPerView` above `1`, next stops once the last slides fill the viewport
|
|
@@ -15,23 +15,16 @@ import { ColorPicker } from "@bridge-ui/vue/Components/ColorPicker";
|
|
|
15
15
|
```vue
|
|
16
16
|
<ColorPicker />
|
|
17
17
|
|
|
18
|
-
<ColorPicker
|
|
18
|
+
<ColorPicker v-model="color" />
|
|
19
19
|
|
|
20
|
-
<ColorPicker
|
|
21
|
-
alpha
|
|
22
|
-
show-footer
|
|
23
|
-
format="rgba"
|
|
24
|
-
:value="color"
|
|
25
|
-
v-on:change="color = $event"
|
|
26
|
-
/>
|
|
20
|
+
<ColorPicker alpha show-footer format="rgba" v-model="color" />
|
|
27
21
|
```
|
|
28
22
|
|
|
29
23
|
### Preset swatches
|
|
30
24
|
|
|
31
25
|
```vue
|
|
32
26
|
<ColorPicker
|
|
33
|
-
|
|
34
|
-
v-on:change="color = $event"
|
|
27
|
+
v-model="color"
|
|
35
28
|
:swatches="['#0f766e', '#2563eb', '#dc2626', '#000000']"
|
|
36
29
|
/>
|
|
37
30
|
```
|
|
@@ -39,11 +32,11 @@ import { ColorPicker } from "@bridge-ui/vue/Components/ColorPicker";
|
|
|
39
32
|
### Output format
|
|
40
33
|
|
|
41
34
|
```vue
|
|
42
|
-
<ColorPicker format="hex"
|
|
35
|
+
<ColorPicker format="hex" v-model="color" />
|
|
43
36
|
|
|
44
|
-
<ColorPicker format="rgb"
|
|
37
|
+
<ColorPicker format="rgb" v-model="color" />
|
|
45
38
|
|
|
46
|
-
<ColorPicker format="rgba"
|
|
39
|
+
<ColorPicker format="rgba" v-model="color" />
|
|
47
40
|
```
|
|
48
41
|
|
|
49
42
|
## Props
|
|
@@ -61,7 +54,13 @@ import { ColorPicker } from "@bridge-ui/vue/Components/ColorPicker";
|
|
|
61
54
|
| `rounded` | `ColorPickerRounded` | `"md"` | Border radius of the picker shell and swatches. |
|
|
62
55
|
| `showFooter` | `boolean` | `false` | Shows Cancel / Apply. Selection is draft until Apply. |
|
|
63
56
|
| `swatches` | `string[]` | — | Preset colors shown below the sliders. |
|
|
64
|
-
|
|
57
|
+
|
|
58
|
+
### v-model
|
|
59
|
+
|
|
60
|
+
| Prop / Event | Type | Default | Description |
|
|
61
|
+
| ------------------- | --------------------------------- | ------- | ------------------------------------- |
|
|
62
|
+
| `modelValue` | `string \| null` | — | Bound with `v-model`. |
|
|
63
|
+
| `update:modelValue` | `(value: string \| null) => void` | — | Emitted when `v-model` should update. |
|
|
65
64
|
|
|
66
65
|
Picker tokens live on `components.ColorPicker` (`rounded`, `size`).
|
|
67
66
|
|
|
@@ -76,7 +76,6 @@ Call `apply()` to commit and close the overlay, or `cancel()` to discard and clo
|
|
|
76
76
|
| `slots` | `DatePickerSlots` | — | Named slots (`day` on the calendar, `footer` for Cancel / Apply). |
|
|
77
77
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week. |
|
|
78
78
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
79
|
-
| `value` | `DatePickerModel` | — | Controlled value. |
|
|
80
79
|
|
|
81
80
|
### v-model
|
|
82
81
|
|
|
@@ -55,7 +55,6 @@ import { DateRangePicker } from "@bridge-ui/vue/Components/DateRangePicker";
|
|
|
55
55
|
| `slots` | `DateRangePickerSlots` | — | Named slots (`day` on the calendars, `footer` for Cancel / Apply). |
|
|
56
56
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week. |
|
|
57
57
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
58
|
-
| `value` | `DateRangeValue \| null` | — | Controlled value (`[start, end]`). |
|
|
59
58
|
|
|
60
59
|
### v-model
|
|
61
60
|
|
|
@@ -54,7 +54,6 @@ import { DateTimePicker } from "@bridge-ui/vue/Components/DateTimePicker";
|
|
|
54
54
|
| `slots` | `DateTimePickerSlots` | — | Named slots (`day` on the calendar, `footer` for Cancel / Apply). |
|
|
55
55
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week. |
|
|
56
56
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
57
|
-
| `value` | `Date \| null` | — | Controlled date-time value. |
|
|
58
57
|
|
|
59
58
|
### v-model
|
|
60
59
|
|
|
@@ -54,7 +54,6 @@ import { DateTimeRangePicker } from "@bridge-ui/vue/Components/DateTimeRangePick
|
|
|
54
54
|
| `slots` | `DateTimeRangePickerSlots` | — | Named slots (`day` on the calendars, `footer` for Cancel / Apply). |
|
|
55
55
|
| `startOfWeek` | `StartOfWeek` | `0` | First day of the week. |
|
|
56
56
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
57
|
-
| `value` | `DateRangeValue \| null` | — | Controlled value (`[start, end]` date-times). |
|
|
58
57
|
|
|
59
58
|
### v-model
|
|
60
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FileUpload
|
|
2
2
|
|
|
3
|
-
File selection with an optional drag-and-drop surface (`variant="dropzone"`).
|
|
3
|
+
File selection with an optional drag-and-drop surface (`variant="dropzone"`). Without `multiple`, `v-model` is one item or `null`. With `multiple`, it is a list. Each item is a browser `File`, or `{ name, size?, type?, url?, file?, state?, progress?, description? }`. Bridge does not upload. Write `state` on the object when your app is uploading.
|
|
4
4
|
|
|
5
5
|
Selected files always render as the same attachment-style cards whether you pick one file or many — there is no FormField input shell for the single-file case. Optional `label` / `description` / `error` sit above or below as flat chrome.
|
|
6
6
|
|
|
@@ -8,6 +8,7 @@ Selected files always render as the same attachment-style cards whether you pick
|
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
import { FileUpload } from "@bridge-ui/vue/Components/FileUpload";
|
|
11
|
+
import { FileUploadItem } from "@bridge-ui/vue/Components/FileUploadItem";
|
|
11
12
|
```
|
|
12
13
|
|
|
13
14
|
## Examples
|
|
@@ -16,7 +17,7 @@ import { FileUpload } from "@bridge-ui/vue/Components/FileUpload";
|
|
|
16
17
|
|
|
17
18
|
```vue
|
|
18
19
|
<FileUpload
|
|
19
|
-
v-model="
|
|
20
|
+
v-model="file"
|
|
20
21
|
label="Attachments"
|
|
21
22
|
accept="image/*,.pdf"
|
|
22
23
|
description="PDF or images up to 5 MB."
|
|
@@ -28,11 +29,13 @@ import { FileUpload } from "@bridge-ui/vue/Components/FileUpload";
|
|
|
28
29
|
Once a file is chosen, the trigger hides and the selection shows as one attachment card (media, name, type · size, remove).
|
|
29
30
|
|
|
30
31
|
```vue
|
|
31
|
-
<FileUpload v-model="
|
|
32
|
+
<FileUpload v-model="file" />
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
### Color
|
|
35
36
|
|
|
37
|
+
`color` styles the trigger, the remove button, and the dropzone highlight while a file is dragged over it. A registry default applies when the prop is omitted.
|
|
38
|
+
|
|
36
39
|
```vue
|
|
37
40
|
<FileUpload color="secondary" label="Attachments" />
|
|
38
41
|
```
|
|
@@ -94,6 +97,75 @@ createBridgeUI({
|
|
|
94
97
|
/>
|
|
95
98
|
```
|
|
96
99
|
|
|
100
|
+
### Value
|
|
101
|
+
|
|
102
|
+
Without `multiple`, `v-model` is `null | FileUploadValue`. With `multiple`, it is `FileUploadValue[]`. `accept` and `maxSize` apply only to a `File` that was just picked or dropped. Remote items still count toward `maxFiles`. `remove` emits the item and its index.
|
|
103
|
+
|
|
104
|
+
```vue
|
|
105
|
+
<FileUpload multiple v-model="attachments" />
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### List slot
|
|
109
|
+
|
|
110
|
+
When the `list` slot is set, FileUpload does not render the default list. `items` follows the model order. Write the reordered array back to `v-model`. Use `FileUploadItem` to keep the default card. `start` sits before the file media (a drag handle). `end` replaces the remove button.
|
|
111
|
+
|
|
112
|
+
The `start` and `end` slots on `FileUpload` do the same thing for the default list.
|
|
113
|
+
|
|
114
|
+
```vue
|
|
115
|
+
<FileUpload multiple v-model="attachments">
|
|
116
|
+
<template #list="{ items }">
|
|
117
|
+
<ul>
|
|
118
|
+
<FileUploadItem v-for="item in items" v-bind="item" :key="item.index">
|
|
119
|
+
<template #start>
|
|
120
|
+
<span aria-hidden="true">⋮⋮</span>
|
|
121
|
+
</template>
|
|
122
|
+
|
|
123
|
+
<template #end>
|
|
124
|
+
<button type="button" v-on:click="item.remove">Remove</button>
|
|
125
|
+
</template>
|
|
126
|
+
</FileUploadItem>
|
|
127
|
+
</ul>
|
|
128
|
+
</template>
|
|
129
|
+
</FileUpload>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Size
|
|
133
|
+
|
|
134
|
+
`xs` hides the default type · size line. `sm`, `md`, and `lg` keep it and scale the card and the dropzone. `md` is the default.
|
|
135
|
+
|
|
136
|
+
```vue
|
|
137
|
+
<FileUpload size="xs" label="Attachments" />
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Orientation
|
|
141
|
+
|
|
142
|
+
`horizontal` places the media beside the name and stacks cards. `vertical` puts the media above the name and lays cards in a row. A card can override the field with its own `orientation` inside the `list` slot.
|
|
143
|
+
|
|
144
|
+
```vue
|
|
145
|
+
<FileUpload multiple v-model="files" orientation="vertical" />
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Upload state
|
|
149
|
+
|
|
150
|
+
Leave `state` unset for the type · size card. Set it on the attachment object while your app uploads. `description` on the attachment, or on `FileUploadItem`, replaces that line — including state copy such as "Uploading" or "Upload failed. Try again." `null` or `""` hides the line at every size, including `xs` while `state` is set. `progress` (0–100) is shown for `uploading`. Listen for `retry` to show a retry button when `state` is `error`.
|
|
151
|
+
|
|
152
|
+
| `state` | Meta line |
|
|
153
|
+
| ------------ | ------------------------- |
|
|
154
|
+
| `idle` | Ready to upload |
|
|
155
|
+
| `uploading` | Uploading · 64% |
|
|
156
|
+
| `processing` | Processing document |
|
|
157
|
+
| `error` | Upload failed. Try again. |
|
|
158
|
+
| `done` | Uploaded · 1.8 MB |
|
|
159
|
+
|
|
160
|
+
```vue
|
|
161
|
+
<FileUpload
|
|
162
|
+
v-on:retry="retryUpload"
|
|
163
|
+
:model-value="{ name: 'report.pdf', progress: 64, state: 'uploading' }"
|
|
164
|
+
/>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
A local `File` cannot carry `state`. Replace it with `{ file, name, size, type, state: "uploading", progress: 0 }` while the upload runs.
|
|
168
|
+
|
|
97
169
|
### customProps
|
|
98
170
|
|
|
99
171
|
```vue
|
|
@@ -111,11 +183,14 @@ createBridgeUI({
|
|
|
111
183
|
|
|
112
184
|
### v-model
|
|
113
185
|
|
|
114
|
-
| Prop / Event | Type
|
|
115
|
-
| ------------------- |
|
|
116
|
-
| `modelValue` | `
|
|
117
|
-
| `update:modelValue` | `(
|
|
118
|
-
| `remove` | `(
|
|
186
|
+
| Prop / Event | Type | Default | Description |
|
|
187
|
+
| ------------------- | ------------------------------------------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
188
|
+
| `modelValue` | `null \| FileUploadValue` or `FileUploadValue[]` | — | One item when `multiple` is false, a list when it is true. A `File` or `{ name, size?, type?, url?, file?, state?, progress?, description? }`. |
|
|
189
|
+
| `update:modelValue` | `(value) => void` | — | Emitted when `v-model` should update. Listen with `v-on:update:model-value`. |
|
|
190
|
+
| `remove` | `(value, index) => void` | — | Emitted with the removed item and its index. |
|
|
191
|
+
| `retry` | `(value, index) => void` | — | Emitted from the retry button when `state` is `error`. |
|
|
192
|
+
| `orientation` | `"horizontal" \| "vertical"` | `horizontal` | Media beside the name, or stacked above it. |
|
|
193
|
+
| `size` | `"xs" \| "sm" \| "md" \| "lg"` | `md` | `xs` hides the default type · size line. |
|
|
119
194
|
|
|
120
195
|
## Related components
|
|
121
196
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Rating
|
|
2
|
+
|
|
3
|
+
Star rating field. Extends BaseField props. The value is a number from above 0 through `max`, or `null` when empty. A fraction fills the next item by that amount: `1.5` fills the first item and half of the second. `step` sets how fine a click or arrow key can be. Choosing the current value again clears it.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { Rating } from "@bridge-ui/vue/Components/Rating";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Usage
|
|
14
|
+
|
|
15
|
+
```vue
|
|
16
|
+
<Rating label="Quality" />
|
|
17
|
+
|
|
18
|
+
<Rating name="score" v-model="score" label="Quality" />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Read-only and scale
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<Rating readonly :max="5" label="Quality" :model-value="4" />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Fractional value
|
|
28
|
+
|
|
29
|
+
```vue
|
|
30
|
+
<Rating readonly label="Quality" :model-value="1.5" />
|
|
31
|
+
|
|
32
|
+
<Rating :step="0.5" label="Quality" />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Required and error
|
|
36
|
+
|
|
37
|
+
```vue
|
|
38
|
+
<Rating required label="Quality" />
|
|
39
|
+
|
|
40
|
+
<Rating error label="Quality" error-message="Choose a score." />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### customProps
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<Rating
|
|
47
|
+
label="Quality"
|
|
48
|
+
:custom-props="{
|
|
49
|
+
input: { id: 'score' },
|
|
50
|
+
item: { 'data-testid': 'rating-item' },
|
|
51
|
+
}"
|
|
52
|
+
/>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Props
|
|
56
|
+
|
|
57
|
+
### Rating-specific
|
|
58
|
+
|
|
59
|
+
| Prop | Type | Default | Description |
|
|
60
|
+
| ------------- | ------------------- | --------- | ---------------------------------------------------------------------- |
|
|
61
|
+
| `classes` | `RatingClasses` | — | Classes for the field chrome and the rating parts. |
|
|
62
|
+
| `color` | `RatingColor` | "primary" | The color applied to selected icons. |
|
|
63
|
+
| `customProps` | `RatingCustomProps` | — | Extra props for internal parts. |
|
|
64
|
+
| `icon` | `IconSource` | "star" | Icon used for every item. |
|
|
65
|
+
| `max` | `number` | `5` | Number of items. The value runs from above 0 through `max`. |
|
|
66
|
+
| `name` | `string` | — | The `name` of the hidden input submitted with the form. |
|
|
67
|
+
| `size` | `RatingSize` | "md" | Size of the icons and of the field label (`2xs` … `2xl`). |
|
|
68
|
+
| `slots` | `RatingSlots` | — | Chrome slots. |
|
|
69
|
+
| `step` | `number` | `1` | Increment for pointer and keyboard selection. `0.5` selects each half. |
|
|
70
|
+
|
|
71
|
+
### Binding
|
|
72
|
+
|
|
73
|
+
| Prop | Type | Default | Description |
|
|
74
|
+
| -------------- | ---------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
|
|
75
|
+
| `defaultValue` | `number \| null` | — | Initial value for uncontrolled usage. |
|
|
76
|
+
| `modelValue` | `number \| null` | — | Selected value. `null` clears the rating. A fraction fills the next item partway (`1.5` fills item 2 halfway). |
|
|
77
|
+
|
|
78
|
+
Hover previews the value under the pointer. Arrow keys move by `step` (horizontal arrows follow direction). Home selects the first step. End selects `max`. A move at or below the first step clears the rating.
|
|
79
|
+
|
|
80
|
+
### Inherited from BaseField
|
|
81
|
+
|
|
82
|
+
See [BaseField](./BaseField.md). `readonly` and `disabled` block changes.
|
|
83
|
+
|
|
84
|
+
## Related components
|
|
85
|
+
|
|
86
|
+
BaseField, Slider
|
|
@@ -27,9 +27,9 @@ const richText = createTiptapRichTextAdapter();
|
|
|
27
27
|
</BridgeUIProvider>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
| Adapter | Peer(s)
|
|
31
|
-
| ------------------------------------ |
|
|
32
|
-
| `Adapters/Examples/rich-text-tiptap` | `@tiptap/core`, `@tiptap/pm`, `@tiptap/starter-kit`, `@tiptap/extension-placeholder
|
|
30
|
+
| Adapter | Peer(s) | Notes |
|
|
31
|
+
| ------------------------------------ | ------------------------------------------------------------------------------------ | --------------------------------- |
|
|
32
|
+
| `Adapters/Examples/rich-text-tiptap` | `@tiptap/core`, `@tiptap/pm`, `@tiptap/starter-kit`, `@tiptap/extension-placeholder` | Shipped example; ProseMirror JSON |
|
|
33
33
|
|
|
34
34
|
Custom engines can implement `RichTextEditorAdapter` and pass them via `global.richText`.
|
|
35
35
|
|
|
@@ -37,7 +37,6 @@ import { TimePanel } from "@bridge-ui/vue/Components/TimePanel";
|
|
|
37
37
|
| `rounded` | `CalendarRounded` | `"md"` | Border radius of time tiles. |
|
|
38
38
|
| `showSeconds` | `boolean` | `false` | Shows seconds in the panel and formatted value. |
|
|
39
39
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
40
|
-
| `value` | `Date \| null` | — | Selected time (`Date` wall clock). |
|
|
41
40
|
|
|
42
41
|
### v-model
|
|
43
42
|
|
|
@@ -42,7 +42,6 @@ import { TimePicker } from "@bridge-ui/vue/Components/TimePicker";
|
|
|
42
42
|
| `showSeconds` | `boolean` | `false` | Shows seconds in the panel and formatted value. |
|
|
43
43
|
| `slots` | `TimePickerSlots` | — | Named slots (`footer` for Cancel / Apply). |
|
|
44
44
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
45
|
-
| `value` | `Date \| null` | — | Controlled value. |
|
|
46
45
|
|
|
47
46
|
### v-model
|
|
48
47
|
|
|
@@ -44,7 +44,6 @@ import { TimeRangePicker } from "@bridge-ui/vue/Components/TimeRangePicker";
|
|
|
44
44
|
| `slots` | `TimeRangePickerSlots` | — | Named slots (`footer` for Cancel / Apply). |
|
|
45
45
|
| `startTitle` | `string` | `"Start time"` | Label above the start time panel. |
|
|
46
46
|
| `timeZone` | `string` | — | IANA time zone. |
|
|
47
|
-
| `value` | `TimeRangeValue \| null` | — | Controlled value (`[start, end]`). |
|
|
48
47
|
|
|
49
48
|
### v-model
|
|
50
49
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"author": "BridgeUI",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "@bridge-ui/vue",
|
|
@@ -97,9 +97,7 @@
|
|
|
97
97
|
"@tabler/icons-vue": "^3.0.0",
|
|
98
98
|
"@tanstack/vue-table": "^9.2.0",
|
|
99
99
|
"@tiptap/core": "^3.0.0",
|
|
100
|
-
"@tiptap/extension-link": "^3.0.0",
|
|
101
100
|
"@tiptap/extension-placeholder": "^3.0.0",
|
|
102
|
-
"@tiptap/extension-underline": "^3.0.0",
|
|
103
101
|
"@tiptap/pm": "^3.0.0",
|
|
104
102
|
"@tiptap/starter-kit": "^3.0.0",
|
|
105
103
|
"date-fns": "^4.0.0",
|
|
@@ -147,12 +145,6 @@
|
|
|
147
145
|
"@tiptap/extension-placeholder": {
|
|
148
146
|
"optional": true
|
|
149
147
|
},
|
|
150
|
-
"@tiptap/extension-underline": {
|
|
151
|
-
"optional": true
|
|
152
|
-
},
|
|
153
|
-
"@tiptap/extension-link": {
|
|
154
|
-
"optional": true
|
|
155
|
-
},
|
|
156
148
|
"date-fns": {
|
|
157
149
|
"optional": true
|
|
158
150
|
},
|
|
@@ -173,7 +165,7 @@
|
|
|
173
165
|
}
|
|
174
166
|
},
|
|
175
167
|
"dependencies": {
|
|
176
|
-
"@bridge-ui/core": "^0.
|
|
168
|
+
"@bridge-ui/core": "^0.14.0",
|
|
177
169
|
"@tailwindcss/typography": "^0.5.20",
|
|
178
170
|
"clsx": "^2.1.1",
|
|
179
171
|
"es-toolkit": "^1.52.0",
|
|
@@ -201,9 +193,7 @@
|
|
|
201
193
|
"@tailwindcss/vite": "^4.3.3",
|
|
202
194
|
"@tanstack/vue-table": "^9.2.4",
|
|
203
195
|
"@tiptap/core": "^3.31.3",
|
|
204
|
-
"@tiptap/extension-link": "^3.31.3",
|
|
205
196
|
"@tiptap/extension-placeholder": "^3.31.3",
|
|
206
|
-
"@tiptap/extension-underline": "^3.31.3",
|
|
207
197
|
"@tiptap/pm": "^3.31.3",
|
|
208
198
|
"@tiptap/starter-kit": "^3.31.3",
|
|
209
199
|
"@types/luxon": "^3.7.5",
|