@bridge-ui/vue 0.11.0 → 0.12.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/Adapters/Examples/icon-fontawesome.js +52 -40
- package/dist/Adapters/Examples/icon-heroicons.js +43 -31
- package/dist/Adapters/Examples/icon-lucide.js +46 -34
- package/dist/Adapters/Examples/icon-phosphor.js +36 -24
- package/dist/Adapters/Examples/icon-tabler.js +44 -32
- package/dist/Adapters/Examples/rich-text-tiptap.d.ts +5 -0
- package/dist/Adapters/Examples/rich-text-tiptap.js +138 -0
- package/dist/Adapters/RichText/index.d.ts +1 -0
- package/dist/Adapters/RichText/index.js +2 -0
- package/dist/Adapters/RichText/mockRichTextAdapter.d.ts +5 -0
- package/dist/Adapters/RichText/useRichTextAdapter.d.ts +12 -0
- package/dist/Adapters/RichText/useRichTextAdapter.js +13 -0
- package/dist/Adapters/index.d.ts +1 -0
- package/dist/Adapters/index.js +2 -1
- package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +6 -6
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +2 -2
- package/dist/Components/Breadcrumb/Breadcrumb.vue.d.ts +17 -10
- package/dist/Components/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/Components/Breadcrumb/breadcrumb.types.d.ts +22 -4
- package/dist/Components/Breadcrumb/breadcrumbInjectionKey.d.ts +5 -1
- package/dist/Components/Breadcrumb/composables/useBreadcrumb.d.ts +6 -5
- package/dist/Components/Breadcrumb/composables/useBreadcrumb.js +2 -0
- package/dist/Components/BreadcrumbItem/BreadcrumbItem.vue.d.ts +17 -11
- package/dist/Components/BreadcrumbItem/BreadcrumbItem.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/Components/BreadcrumbItem/breadcrumbItem.types.d.ts +21 -3
- package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.d.ts +10 -6
- package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.js +65 -59
- package/dist/Components/Button/Button.vue.d.ts +17 -8
- package/dist/Components/Button/Button.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/Components/Button/button.types.d.ts +22 -5
- package/dist/Components/Button/composables/useButton.d.ts +198 -8
- package/dist/Components/Button/composables/useButton.js +101 -86
- package/dist/Components/ColorPicker/composables/useColorPicker.js +1 -1
- package/dist/Components/DataTable/DataTable.vue.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.js +288 -282
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +2 -2
- package/dist/Components/FileUpload/FileUpload.js +5 -0
- package/dist/Components/FileUpload/FileUpload.vue.d.ts +28 -0
- package/dist/Components/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/Components/FileUpload/composables/useFileUpload.d.ts +70 -0
- package/dist/Components/FileUpload/composables/useFileUpload.js +210 -0
- package/dist/Components/FileUpload/fileUpload.types.d.ts +306 -0
- package/dist/Components/FileUpload/index.d.ts +3 -0
- package/dist/Components/FileUpload/index.js +3 -0
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/Link/Link.vue.d.ts +17 -8
- package/dist/Components/Link/Link.vue_vue_type_script_setup_true_lang.js +30 -25
- package/dist/Components/Link/composables/useLink.d.ts +8 -6
- package/dist/Components/Link/composables/useLink.js +52 -45
- package/dist/Components/Link/link.types.d.ts +21 -4
- package/dist/Components/ListItem/ListItem.vue.d.ts +17 -15
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/Components/ListItem/composables/useListItem.d.ts +7 -6
- package/dist/Components/ListItem/composables/useListItem.js +108 -105
- package/dist/Components/ListItem/listItem.types.d.ts +19 -3
- package/dist/Components/Listbox/composables/useListbox.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.js +6 -6
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/Modal/composables/useModal.js +2 -2
- package/dist/Components/RichTextEditor/RichTextEditor.js +5 -0
- package/dist/Components/RichTextEditor/RichTextEditor.vue.d.ts +23 -0
- package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +488 -0
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +226 -0
- package/dist/Components/RichTextEditor/index.d.ts +3 -0
- package/dist/Components/RichTextEditor/index.js +3 -0
- package/dist/Components/RichTextEditor/richTextEditor.types.d.ts +103 -0
- package/dist/Components/Select/composables/useSelect.js +2 -2
- package/dist/Components/Sidebar/SidebarListItem.vue.d.ts +17 -9
- package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/Components/Sidebar/composables/useSidebarListItem.js +1 -1
- package/dist/Components/Sidebar/sidebar.types.d.ts +2 -1
- package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
- package/dist/Components/Textarea/composables/useTextarea.js +1 -1
- package/dist/Components/Tooltip/composables/useTooltip.js +3 -3
- package/dist/Utils/linkAs.d.ts +29 -0
- package/dist/Utils/linkAs.js +18 -0
- package/dist/augments.d.ts +10 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +175 -170
- package/dist/theme.css +3 -0
- package/docs/README.md +3 -0
- package/docs/components/Breadcrumb.md +16 -0
- package/docs/components/BridgeUIProvider.md +18 -1
- package/docs/components/Button.md +31 -19
- package/docs/components/DataTable.md +1 -1
- package/docs/components/FileUpload.md +122 -0
- package/docs/components/Link.md +28 -12
- package/docs/components/List.md +21 -19
- package/docs/components/RichTextEditor.md +88 -0
- package/docs/components/Sidebar.md +1 -1
- package/package.json +54 -18
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# FileUpload
|
|
2
|
+
|
|
3
|
+
File selection with an optional drag-and-drop surface (`variant="dropzone"`). Bind with `v-model` as `File[]` — Bridge does not upload to a server.
|
|
4
|
+
|
|
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
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { FileUpload } from "@bridge-ui/vue/Components/FileUpload";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
### Usage
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<FileUpload
|
|
19
|
+
v-model="files"
|
|
20
|
+
label="Attachments"
|
|
21
|
+
accept="image/*,.pdf"
|
|
22
|
+
description="PDF or images up to 5 MB."
|
|
23
|
+
/>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Single file card
|
|
27
|
+
|
|
28
|
+
Once a file is chosen, the trigger hides and the selection shows as one attachment card (media, name, type · size, remove).
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<FileUpload v-model="files" />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Color
|
|
35
|
+
|
|
36
|
+
```vue
|
|
37
|
+
<FileUpload color="secondary" label="Attachments" />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Theme default via registry:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
createBridgeUI({
|
|
44
|
+
components: {
|
|
45
|
+
FileUpload: {
|
|
46
|
+
defaultProps: { color: "secondary" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Rounded
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<FileUpload rounded="xl" label="Attachments" />
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Shared with other form controls via `global.formDefaults`:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
createBridgeUI({
|
|
62
|
+
global: {
|
|
63
|
+
formDefaults: { size: "lg", rounded: "md" },
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Dropzone
|
|
69
|
+
|
|
70
|
+
```vue
|
|
71
|
+
<FileUpload
|
|
72
|
+
multiple
|
|
73
|
+
v-model="files"
|
|
74
|
+
accept="image/*"
|
|
75
|
+
variant="dropzone"
|
|
76
|
+
title="Drop images here"
|
|
77
|
+
description="or click to browse"
|
|
78
|
+
/>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Multiple
|
|
82
|
+
|
|
83
|
+
```vue
|
|
84
|
+
<FileUpload multiple v-model="files" :max-files="5" button-label="Add files" />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Validation
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<FileUpload
|
|
91
|
+
accept="image/*"
|
|
92
|
+
:max-size="5 * 1024 * 1024"
|
|
93
|
+
description="Images up to 5 MB."
|
|
94
|
+
/>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### customProps
|
|
98
|
+
|
|
99
|
+
```vue
|
|
100
|
+
<FileUpload
|
|
101
|
+
variant="dropzone"
|
|
102
|
+
title="Drop files"
|
|
103
|
+
:custom-props="{
|
|
104
|
+
list: { id: 'uploads' },
|
|
105
|
+
dropzone: { 'data-testid': 'dropzone' },
|
|
106
|
+
}"
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Props
|
|
111
|
+
|
|
112
|
+
### v-model
|
|
113
|
+
|
|
114
|
+
| Prop / Event | Type | Default | Description |
|
|
115
|
+
| ------------------- | ------------------------- | ------- | ---------------------------------------------------------------------------- |
|
|
116
|
+
| `modelValue` | `File[]` | — | Bound with `v-model`. |
|
|
117
|
+
| `update:modelValue` | `(files: File[]) => void` | — | Emitted when `v-model` should update. Listen with `v-on:update:model-value`. |
|
|
118
|
+
| `remove` | `(file, index) => void` | — | Emitted when a file is removed from the list. |
|
|
119
|
+
|
|
120
|
+
## Related components
|
|
121
|
+
|
|
122
|
+
Button, EmptyState
|
package/docs/components/Link.md
CHANGED
|
@@ -36,6 +36,20 @@ import { Link } from "@bridge-ui/vue/Components/Link";
|
|
|
36
36
|
</Link>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
### Router link
|
|
40
|
+
|
|
41
|
+
`link-as` replaces the `<a>`. `href` is forwarded, and when `link-as` is set it also accepts that component's `href`. `link-props` is checked against `link-as` and forwarded to it (`method`, `replace`, `prefetch`, and so on). The component handles the click.
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<Link
|
|
45
|
+
href="/logout"
|
|
46
|
+
:link-as="AppLink"
|
|
47
|
+
:link-props="{ method: 'post', replace: true }"
|
|
48
|
+
>
|
|
49
|
+
Logout
|
|
50
|
+
</Link>
|
|
51
|
+
```
|
|
52
|
+
|
|
39
53
|
### customProps
|
|
40
54
|
|
|
41
55
|
```vue
|
|
@@ -53,18 +67,20 @@ import { Link } from "@bridge-ui/vue/Components/Link";
|
|
|
53
67
|
|
|
54
68
|
## Props
|
|
55
69
|
|
|
56
|
-
| Prop | Type
|
|
57
|
-
| ------------- |
|
|
58
|
-
| `classes` | `LinkClasses`
|
|
59
|
-
| `color` | `LinkColor`
|
|
60
|
-
| `customProps` | `LinkCustomProps`
|
|
61
|
-
| `disabled` | `boolean`
|
|
62
|
-
| `external` | `boolean`
|
|
63
|
-
| `href` | `string`
|
|
64
|
-
| `leftIcon` | `LucideIcon`
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
70
|
+
| Prop | Type | Default | Description |
|
|
71
|
+
| ------------- | --------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
72
|
+
| `classes` | `LinkClasses` | — | The classes to apply to the link. |
|
|
73
|
+
| `color` | `LinkColor` | "primary" | The color to apply to the link. |
|
|
74
|
+
| `customProps` | `LinkCustomProps` | — | Extra props for internal parts (`leftIcon`, `rightIcon`, etc.). Root HTML attributes stay on the component top level. |
|
|
75
|
+
| `disabled` | `boolean` | `false` | Whether the link is disabled. |
|
|
76
|
+
| `external` | `boolean` | `false` | Whether the link opens in a new tab. |
|
|
77
|
+
| `href` | `string` | — | The URL the link points to. When `linkAs` is set, this also accepts that component's `href`. |
|
|
78
|
+
| `leftIcon` | `LucideIcon` | — | The icon to display before the link text. |
|
|
79
|
+
| `linkAs` | `string \| Component` | — | Component rendered in place of the navigating `<a>`. Receives `href`, `linkProps`, and the anchor attributes. Ignored while disabled. |
|
|
80
|
+
| `linkProps` | props of `linkAs` | — | Props forwarded to `linkAs`. Checked against that component. Ignored while `linkAs` is not rendered. |
|
|
81
|
+
| `rightIcon` | `LucideIcon` | — | The icon to display after the link text. |
|
|
82
|
+
| `size` | `LinkSize` | "md" | The size of the link. |
|
|
83
|
+
| `underline` | `LinkUnderline` | "hover" | The underline behavior of the link. |
|
|
68
84
|
|
|
69
85
|
## Related components
|
|
70
86
|
|
package/docs/components/List.md
CHANGED
|
@@ -83,7 +83,7 @@ Selected rows show a check icon by default. Customize it with `selectedIcon` on
|
|
|
83
83
|
|
|
84
84
|
### Link
|
|
85
85
|
|
|
86
|
-
Set `href` to render the row as an anchor. The browser shows the URL on hover, and middle-click opens a new tab. `target` and `rel` are forwarded to that anchor. A disabled item keeps the styles but drops the URL.
|
|
86
|
+
Set `href` to render the row as an anchor. The browser shows the URL on hover, and middle-click opens a new tab. `target` and `rel` are forwarded to that anchor. `link-as` replaces that anchor. `link-props` is checked against `link-as` and forwarded to it. A disabled item keeps the styles but drops the URL.
|
|
87
87
|
|
|
88
88
|
```vue
|
|
89
89
|
<List>
|
|
@@ -147,24 +147,26 @@ With the default `as="li"`, sticky styles apply on the section root. The list (o
|
|
|
147
147
|
|
|
148
148
|
## Props (`ListItem`)
|
|
149
149
|
|
|
150
|
-
| Prop | Type | Default | Description
|
|
151
|
-
| -------------- | ------------------------------------ | -------- |
|
|
152
|
-
| `as` | `"div" \| "li"` | "li" | The element to render as.
|
|
153
|
-
| `classes` | `ListItemClasses` | — | The classes to apply to the item.
|
|
154
|
-
| `customProps` | `ListItemCustomProps` | — | Props forwarded to each item part.
|
|
155
|
-
| `dense` | `boolean` | — | Compact vertical padding. Inherits `dense` from parent `List` when omitted.
|
|
156
|
-
| `disabled` | `boolean` | `false` | When true, the item is not interactive and appears muted.
|
|
157
|
-
| `divider` | `boolean` | `false` | When true, renders a bottom divider on the item.
|
|
158
|
-
| `href` | `string` | — | URL for the interactive wrapper. Renders an anchor so hover shows the address and middle-click opens a new tab.
|
|
159
|
-
| `interactive` | `boolean` | `false` | When true, applies hover/focus styles and `tabIndex={0}` on the inner wrapper. Implied when `href` is set.
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
163
|
-
| `
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
166
|
-
| `
|
|
167
|
-
| `
|
|
150
|
+
| Prop | Type | Default | Description |
|
|
151
|
+
| -------------- | ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
152
|
+
| `as` | `"div" \| "li"` | "li" | The element to render as. |
|
|
153
|
+
| `classes` | `ListItemClasses` | — | The classes to apply to the item. |
|
|
154
|
+
| `customProps` | `ListItemCustomProps` | — | Props forwarded to each item part. |
|
|
155
|
+
| `dense` | `boolean` | — | Compact vertical padding. Inherits `dense` from parent `List` when omitted. |
|
|
156
|
+
| `disabled` | `boolean` | `false` | When true, the item is not interactive and appears muted. |
|
|
157
|
+
| `divider` | `boolean` | `false` | When true, renders a bottom divider on the item. |
|
|
158
|
+
| `href` | `string` | — | URL for the interactive wrapper. Renders an anchor so hover shows the address and middle-click opens a new tab. |
|
|
159
|
+
| `interactive` | `boolean` | `false` | When true, applies hover/focus styles and `tabIndex={0}` on the inner wrapper. Implied when `href` is set. |
|
|
160
|
+
| `linkAs` | `string \| Component` | — | Component rendered in place of the interactive `<a>`. The root stays `as` (`li` or `div`). Ignored while disabled. |
|
|
161
|
+
| `linkProps` | props of `linkAs` | — | Props forwarded to `linkAs`. Checked against that component. Ignored while `linkAs` is not rendered. |
|
|
162
|
+
| `primary` | `string` | — | Primary label text. |
|
|
163
|
+
| `rel` | `string` | — | Relationship of the linked URL. Forwarded to the anchor when `href` is set. |
|
|
164
|
+
| `role` | `"button" \| "menuitem" \| "option"` | "button" | ARIA role for the interactive wrapper. Omitted when `href` is set. |
|
|
165
|
+
| `secondary` | `string` | — | Secondary/description text below the primary line. |
|
|
166
|
+
| `selected` | `boolean` | `false` | When true, highlights the item as selected. |
|
|
167
|
+
| `selectedIcon` | `null \| LucideIcon` | `Check` | Icon shown when `selected` is true. Use `null` to hide it. Replaced by `#end`. |
|
|
168
|
+
| `target` | `string` | — | Where to open the URL. Forwarded to the anchor when `href` is set. |
|
|
169
|
+
| `value` | `ListboxValue` | — | When set inside a `Select` / `Listbox`, registers this row as a selectable option. |
|
|
168
170
|
|
|
169
171
|
## Props (`ListSection`)
|
|
170
172
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# RichTextEditor
|
|
2
|
+
|
|
3
|
+
Formatted text input with FormField chrome and a pluggable editing engine. Bridge owns the toolbar, tokens, and a11y; the document engine comes from `global.richText` (no native default).
|
|
4
|
+
|
|
5
|
+
Sanitize HTML before rendering it outside the editor — XSS prevention stays in the app.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { RichTextEditor } from "@bridge-ui/vue/Components/RichTextEditor";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Adapter
|
|
14
|
+
|
|
15
|
+
Provide `global.richText` on `BridgeUIProvider`. Ready adapter:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { BridgeUIProvider } from "@bridge-ui/vue";
|
|
19
|
+
import { createTiptapRichTextAdapter } from "@bridge-ui/vue/Adapters/Examples/rich-text-tiptap";
|
|
20
|
+
|
|
21
|
+
const richText = createTiptapRichTextAdapter();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<BridgeUIProvider :global="{ richText }">
|
|
26
|
+
<App />
|
|
27
|
+
</BridgeUIProvider>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Adapter | Peer(s) | Notes |
|
|
31
|
+
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
|
|
32
|
+
| `Adapters/Examples/rich-text-tiptap` | `@tiptap/core`, `@tiptap/pm`, `@tiptap/starter-kit`, `@tiptap/extension-placeholder`, `@tiptap/extension-underline`, `@tiptap/extension-link` | Shipped example; ProseMirror JSON |
|
|
33
|
+
|
|
34
|
+
Custom engines can implement `RichTextEditorAdapter` and pass them via `global.richText`.
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
### Usage
|
|
39
|
+
|
|
40
|
+
```vue
|
|
41
|
+
<RichTextEditor
|
|
42
|
+
v-model="html"
|
|
43
|
+
label="Description"
|
|
44
|
+
placeholder="Write a short description…"
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Limited tools
|
|
49
|
+
|
|
50
|
+
```vue
|
|
51
|
+
<RichTextEditor
|
|
52
|
+
v-model="html"
|
|
53
|
+
label="Comment"
|
|
54
|
+
:tools="['bold', 'italic', 'link', 'bulletList']"
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### JSON document
|
|
59
|
+
|
|
60
|
+
```vue
|
|
61
|
+
<RichTextEditor label="Body" format="json" v-model="doc" />
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`v-model` is a JSON object when `format="json"` (not a stringified blob).
|
|
65
|
+
|
|
66
|
+
### Read-only
|
|
67
|
+
|
|
68
|
+
```vue
|
|
69
|
+
<RichTextEditor read-only v-model="html" label="Preview" />
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Props
|
|
73
|
+
|
|
74
|
+
### RichTextEditor-specific
|
|
75
|
+
|
|
76
|
+
| Prop | Type | Default | Description |
|
|
77
|
+
| -------------- | --------------------------- | ----------------- | ------------------------------------------------------ |
|
|
78
|
+
| `format` | `"html" \| "json"` | `"html"` | Controlled value shape. |
|
|
79
|
+
| `defaultValue` | `string \| RichTextJSON` | — | Initial value when `v-model` is not bound. |
|
|
80
|
+
| `modelValue` | `string \| RichTextJSON` | — | Bound with `v-model`. |
|
|
81
|
+
| `placeholder` | `string` | — | Empty-state hint in the content area. |
|
|
82
|
+
| `readOnly` | `boolean` | `false` | View-only surface; hides the toolbar. |
|
|
83
|
+
| `tools` | `RichTextTool[]` | all default tools | Which toolbar actions to show. |
|
|
84
|
+
| `customProps` | `RichTextEditorCustomProps` | — | Extra props for `content`, `toolbar`, `toolbarButton`. |
|
|
85
|
+
|
|
86
|
+
### Inherited from FormField
|
|
87
|
+
|
|
88
|
+
Flat FormField props (`label`, `description`, `error`, `errorMessage`, `size`, `color`, `rounded`, `variant`, …).
|
|
@@ -260,7 +260,7 @@ Same as `List`, plus `icon-only`. Sets `icon-only` when the icon rail is collaps
|
|
|
260
260
|
|
|
261
261
|
## Props (`SidebarListItem`)
|
|
262
262
|
|
|
263
|
-
Same as `ListItem` (including `href`), plus `tooltip` / `tooltip-placement`. Applies compact nav chrome. Tooltips only show while the icon rail is collapsed (`primary`, or `tooltip` to override). A collapsed link keeps `href` on the anchor.
|
|
263
|
+
Same as `ListItem` (including `href`, `link-as`, and `link-props`), plus `tooltip` / `tooltip-placement`. Applies compact nav chrome. Tooltips only show while the icon rail is collapsed (`primary`, or `tooltip` to override). A collapsed link keeps `href` on the anchor. `link-as` replaces that anchor and leaves the row root as `li` or `div`.
|
|
264
264
|
|
|
265
265
|
## `useSidebar`
|
|
266
266
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"author": "BridgeUI",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "@bridge-ui/vue",
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"import": "./dist/Adapters/I18n/index.js",
|
|
55
55
|
"types": "./dist/Adapters/I18n/index.d.ts"
|
|
56
56
|
},
|
|
57
|
+
"./Adapters/RichText": {
|
|
58
|
+
"import": "./dist/Adapters/RichText/index.js",
|
|
59
|
+
"types": "./dist/Adapters/RichText/index.d.ts"
|
|
60
|
+
},
|
|
57
61
|
"./Adapters/Examples/*": {
|
|
58
62
|
"import": "./dist/Adapters/Examples/*.js",
|
|
59
63
|
"types": "./dist/Adapters/Examples/*.d.ts"
|
|
@@ -91,7 +95,13 @@
|
|
|
91
95
|
"@lucide/vue": "^0.400.0 || ^1.0.0",
|
|
92
96
|
"@phosphor-icons/vue": "^2.2.0",
|
|
93
97
|
"@tabler/icons-vue": "^3.0.0",
|
|
94
|
-
"@tanstack/vue-table": "^
|
|
98
|
+
"@tanstack/vue-table": "^9.2.0",
|
|
99
|
+
"@tiptap/core": "^3.0.0",
|
|
100
|
+
"@tiptap/extension-link": "^3.0.0",
|
|
101
|
+
"@tiptap/extension-placeholder": "^3.0.0",
|
|
102
|
+
"@tiptap/extension-underline": "^3.0.0",
|
|
103
|
+
"@tiptap/pm": "^3.0.0",
|
|
104
|
+
"@tiptap/starter-kit": "^3.0.0",
|
|
95
105
|
"date-fns": "^4.0.0",
|
|
96
106
|
"dayjs": "^1.11.0",
|
|
97
107
|
"luxon": "^3.0.0",
|
|
@@ -125,6 +135,24 @@
|
|
|
125
135
|
"@tanstack/vue-table": {
|
|
126
136
|
"optional": true
|
|
127
137
|
},
|
|
138
|
+
"@tiptap/core": {
|
|
139
|
+
"optional": true
|
|
140
|
+
},
|
|
141
|
+
"@tiptap/pm": {
|
|
142
|
+
"optional": true
|
|
143
|
+
},
|
|
144
|
+
"@tiptap/starter-kit": {
|
|
145
|
+
"optional": true
|
|
146
|
+
},
|
|
147
|
+
"@tiptap/extension-placeholder": {
|
|
148
|
+
"optional": true
|
|
149
|
+
},
|
|
150
|
+
"@tiptap/extension-underline": {
|
|
151
|
+
"optional": true
|
|
152
|
+
},
|
|
153
|
+
"@tiptap/extension-link": {
|
|
154
|
+
"optional": true
|
|
155
|
+
},
|
|
128
156
|
"date-fns": {
|
|
129
157
|
"optional": true
|
|
130
158
|
},
|
|
@@ -145,10 +173,11 @@
|
|
|
145
173
|
}
|
|
146
174
|
},
|
|
147
175
|
"dependencies": {
|
|
148
|
-
"@bridge-ui/core": "^0.
|
|
176
|
+
"@bridge-ui/core": "^0.12.0",
|
|
177
|
+
"@tailwindcss/typography": "^0.5.20",
|
|
149
178
|
"clsx": "^2.1.1",
|
|
150
|
-
"es-toolkit": "^1.
|
|
151
|
-
"tailwind-merge": "^3.
|
|
179
|
+
"es-toolkit": "^1.52.0",
|
|
180
|
+
"tailwind-merge": "^3.7.0"
|
|
152
181
|
},
|
|
153
182
|
"scripts": {
|
|
154
183
|
"build": "vite build && cp src/theme.css dist/theme.css",
|
|
@@ -164,25 +193,32 @@
|
|
|
164
193
|
"@fortawesome/free-solid-svg-icons": "^7.3.1",
|
|
165
194
|
"@fortawesome/vue-fontawesome": "^3.3.3",
|
|
166
195
|
"@heroicons/vue": "^2.2.0",
|
|
167
|
-
"@
|
|
196
|
+
"@inertiajs/vue3": "^3.7.1",
|
|
197
|
+
"@lucide/vue": "^1.48.0",
|
|
168
198
|
"@phosphor-icons/vue": "^2.2.1",
|
|
169
|
-
"@tabler/icons-vue": "^3.
|
|
199
|
+
"@tabler/icons-vue": "^3.48.0",
|
|
170
200
|
"@tailwindcss/cli": "^4.3.3",
|
|
171
201
|
"@tailwindcss/vite": "^4.3.3",
|
|
172
|
-
"@tanstack/vue-table": "^
|
|
173
|
-
"@
|
|
174
|
-
"@
|
|
175
|
-
"@
|
|
176
|
-
"@
|
|
202
|
+
"@tanstack/vue-table": "^9.2.4",
|
|
203
|
+
"@tiptap/core": "^3.31.3",
|
|
204
|
+
"@tiptap/extension-link": "^3.31.3",
|
|
205
|
+
"@tiptap/extension-placeholder": "^3.31.3",
|
|
206
|
+
"@tiptap/extension-underline": "^3.31.3",
|
|
207
|
+
"@tiptap/pm": "^3.31.3",
|
|
208
|
+
"@tiptap/starter-kit": "^3.31.3",
|
|
209
|
+
"@types/luxon": "^3.7.5",
|
|
210
|
+
"@types/node": "^26.6.2",
|
|
211
|
+
"@vue/language-core": "^3.3.11",
|
|
212
|
+
"@vue/test-utils": "^2.5.1",
|
|
177
213
|
"date-fns": "^4.4.0",
|
|
178
|
-
"dayjs": "^1.11.
|
|
214
|
+
"dayjs": "^1.11.23",
|
|
179
215
|
"luxon": "^3.7.2",
|
|
180
|
-
"moment": "^2.
|
|
181
|
-
"moment-timezone": "^0.6.
|
|
216
|
+
"moment": "^2.31.0",
|
|
217
|
+
"moment-timezone": "^0.6.4",
|
|
182
218
|
"tailwindcss": "^4.3.3",
|
|
183
219
|
"typescript": "^6.0.3",
|
|
184
|
-
"vue": "^3.5.
|
|
185
|
-
"vue-i18n": "^11.4.
|
|
186
|
-
"vue-tsc": "^3.3.
|
|
220
|
+
"vue": "^3.5.43",
|
|
221
|
+
"vue-i18n": "^11.4.12",
|
|
222
|
+
"vue-tsc": "^3.3.11"
|
|
187
223
|
}
|
|
188
224
|
}
|