@toife/vue 3.1.3 → 3.1.5
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/README.md +1 -1
- package/package.json +1 -1
- package/src/components/action/action.scss +1 -1
- package/src/components/action/action.vue +5 -5
- package/src/components/app/app.scss +2 -2
- package/src/components/app/app.type.ts +6 -0
- package/src/components/app/app.vue +8 -2
- package/src/components/avatar/avatar.scss +6 -4
- package/src/components/avatar/avatar.vue +6 -6
- package/src/components/button/button.scss +19 -16
- package/src/components/button/button.type.ts +3 -1
- package/src/components/button/button.vue +7 -7
- package/src/components/cable/cable.vue +2 -2
- package/src/components/card/card/card.scss +5 -3
- package/src/components/card/card/card.vue +5 -5
- package/src/components/card/card-body/card-body.scss +2 -2
- package/src/components/card/card-body/card-body.vue +2 -2
- package/src/components/card/card-footer/card-footer.scss +3 -3
- package/src/components/card/card-footer/card-footer.vue +2 -2
- package/src/components/card/card-header/card-header.scss +3 -3
- package/src/components/card/card-header/card-header.vue +2 -2
- package/src/components/checkbox/checkbox.html +1 -1
- package/src/components/checkbox/checkbox.scss +27 -27
- package/src/components/checkbox/checkbox.type.ts +4 -0
- package/src/components/checkbox/checkbox.vue +8 -6
- package/src/components/collapse/collapse.html +1 -1
- package/src/components/collapse/collapse.scss +2 -2
- package/src/components/collapse/collapse.vue +9 -9
- package/src/components/container/container.vue +2 -2
- package/src/components/decision-modal/decision-modal.scss +12 -10
- package/src/components/decision-modal/decision-modal.vue +8 -8
- package/src/components/divider/divider.scss +2 -2
- package/src/components/divider/divider.vue +4 -4
- package/src/components/dropdown/dropdown.scss +8 -5
- package/src/components/dropdown/dropdown.type.ts +4 -1
- package/src/components/dropdown/dropdown.vue +8 -6
- package/src/components/field/field.type.ts +4 -4
- package/src/components/field/outline/outline.scss +24 -21
- package/src/components/field/outline/outline.vue +26 -18
- package/src/components/form-group/form-group.vue +2 -2
- package/src/components/gesture-indicator/gesture-indicator.scss +4 -2
- package/src/components/gesture-indicator/gesture-indicator.vue +4 -4
- package/src/components/image/image.vue +12 -5
- package/src/components/index.ts +1 -0
- package/src/components/layout/flex/flex.scss +0 -2
- package/src/components/layout/flex/flex.vue +8 -8
- package/src/components/layout/flex-item/flex-item.html +1 -0
- package/src/components/layout/flex-item/flex-item.scss +48 -0
- package/src/components/layout/flex-item/flex-item.type.ts +11 -0
- package/src/components/layout/flex-item/flex-item.vue +27 -0
- package/src/components/layout/flex-item/index.ts +2 -0
- package/src/components/layout/grid/grid.scss +0 -2
- package/src/components/layout/grid/grid.vue +6 -6
- package/src/components/layout/grid-item/grid-item.html +1 -0
- package/src/components/layout/grid-item/grid-item.scss +49 -0
- package/src/components/layout/grid-item/grid-item.type.ts +14 -0
- package/src/components/layout/grid-item/grid-item.vue +27 -0
- package/src/components/layout/grid-item/index.ts +2 -0
- package/src/components/layout/index.ts +2 -1
- package/src/components/modal/modal.scss +4 -2
- package/src/components/modal/modal.vue +68 -5
- package/src/components/page/page.vue +2 -2
- package/src/components/present/present.scss +3 -3
- package/src/components/present/present.vue +14 -14
- package/src/components/radio/radio/radio.html +1 -1
- package/src/components/radio/radio/radio.scss +25 -18
- package/src/components/radio/radio/radio.type.ts +4 -0
- package/src/components/radio/radio/radio.vue +7 -5
- package/src/components/radio/radio-group/radio-group.vue +2 -2
- package/src/components/refresher/refresher.html +1 -4
- package/src/components/refresher/refresher.scss +8 -26
- package/src/components/refresher/refresher.vue +2 -16
- package/src/components/route/route-navigator/route-navigator.scss +2 -2
- package/src/components/route/route-navigator/route-navigator.vue +10 -13
- package/src/components/route/route-wrapper/route-wrapper.composable.ts +5 -15
- package/src/components/route/route-wrapper/route-wrapper.type.ts +0 -4
- package/src/components/route/route-wrapper/route-wrapper.vue +4 -12
- package/src/components/route/route.type.ts +0 -1
- package/src/components/segmented-field/segmented-field.html +1 -1
- package/src/components/segmented-field/segmented-field.scss +2 -2
- package/src/components/segmented-field/segmented-field.vue +8 -8
- package/src/components/select/select.html +2 -2
- package/src/components/select/select.scss +10 -10
- package/src/components/select/select.vue +10 -10
- package/src/components/skeleton/skeleton.scss +3 -1
- package/src/components/skeleton/skeleton.vue +7 -7
- package/src/components/slide-range/index.ts +2 -0
- package/src/components/slide-range/slide-range.html +19 -0
- package/src/components/slide-range/slide-range.scss +161 -0
- package/src/components/slide-range/slide-range.type.ts +16 -0
- package/src/components/slide-range/slide-range.vue +229 -0
- package/src/components/switch/switch.html +1 -1
- package/src/components/switch/switch.scss +29 -38
- package/src/components/switch/switch.type.ts +6 -0
- package/src/components/switch/switch.vue +24 -8
- package/src/components/tabs/tab/tab.html +1 -1
- package/src/components/tabs/tab/tab.scss +13 -0
- package/src/components/tabs/tab/tab.vue +4 -2
- package/src/components/tabs/tabs/index.ts +1 -0
- package/src/components/tabs/tabs/tabs.scss +194 -122
- package/src/components/tabs/tabs/tabs.type.ts +5 -2
- package/src/components/tabs/tabs/tabs.vue +47 -27
- package/src/components/toast/toast/toast.vue +2 -2
- package/src/components/toast/toast-content/toast-content.scss +6 -5
- package/src/components/toast/toast-content/toast-content.vue +5 -5
- package/src/components/toolbar/toolbar.scss +4 -4
- package/src/components/toolbar/toolbar.type.ts +1 -1
- package/src/components/toolbar/toolbar.vue +7 -7
- package/src/factory.ts +108 -50
- package/src/index.ts +1 -1
- package/src/type.ts +2 -1
- package/src/utils/style/index.ts +9 -9
- package/src/utils/style.md +9 -9
- package/src/components/action/action.md +0 -115
- package/src/components/app/app.md +0 -77
- package/src/components/avatar/avatar.md +0 -64
- package/src/components/button/button.md +0 -66
- package/src/components/cable/cable.md +0 -57
- package/src/components/card/card/card.md +0 -57
- package/src/components/card/card-body/card-body.md +0 -34
- package/src/components/card/card-footer/card-footer.md +0 -42
- package/src/components/card/card-header/card-header.md +0 -44
- package/src/components/checkbox/checkbox.md +0 -60
- package/src/components/collapse/collapse.md +0 -59
- package/src/components/container/container.md +0 -38
- package/src/components/decision-modal/decision-modal.md +0 -79
- package/src/components/divider/divider.md +0 -42
- package/src/components/field/field.md +0 -68
- package/src/components/field/outline/outline-field.md +0 -44
- package/src/components/form-group/form-group.md +0 -41
- package/src/components/gesture-indicator/gesture-indicator.md +0 -42
- package/src/components/image/image.md +0 -41
- package/src/components/layout/cell/cell.html +0 -1
- package/src/components/layout/cell/cell.md +0 -47
- package/src/components/layout/cell/cell.scss +0 -54
- package/src/components/layout/cell/cell.type.ts +0 -19
- package/src/components/layout/cell/cell.vue +0 -35
- package/src/components/layout/cell/index.ts +0 -2
- package/src/components/layout/grid/grid.md +0 -50
- package/src/components/modal/modal.md +0 -65
- package/src/components/page/page.md +0 -39
- package/src/components/present/present.md +0 -60
- package/src/components/radio/radio/radio.md +0 -53
- package/src/components/radio/radio-group/radio-group.md +0 -62
- package/src/components/refresher/refresher.md +0 -53
- package/src/components/route/route-navigator/route-navigator.md +0 -50
- package/src/components/route/route-outlet/route-outlet.md +0 -30
- package/src/components/route/route-provider/route-provider.md +0 -46
- package/src/components/route/route-wrapper/route-wrapper.md +0 -45
- package/src/components/segmented-field/segmented-field.md +0 -58
- package/src/components/skeleton/skeleton.md +0 -47
- package/src/components/switch/switch.md +0 -57
- package/src/components/tabs/tab/tab.md +0 -52
- package/src/components/tabs/tabs/tabs.md +0 -59
- package/src/components/toast/toast/toast.md +0 -56
- package/src/components/toast/toast-content/toast-content.md +0 -41
- package/src/components/toolbar/toolbar.md +0 -54
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# `<t-action>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Action sheet: groups of buttons rendered inside `Present`, typically for quick choices or secondary menus. Control via props or the `useAction()` composable wired by `t-app`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ----------------------------------------------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Prefer `t-app` for theme/context (`inject`). Depends on `Present`, `FormGroup`, `Button`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<template>
|
|
20
|
-
<t-action
|
|
21
|
-
:visible="show"
|
|
22
|
-
:actions="[[{ text: 'Confirm', variant: 'fill', handler: onOk }]]"
|
|
23
|
-
placement="bottom"
|
|
24
|
-
@close="show = false"
|
|
25
|
-
@choose="onChoose"
|
|
26
|
-
/>
|
|
27
|
-
</template>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Or open via `useAction()` (wired by `t-app`):
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
import { useAction } from "@toife/vue";
|
|
34
|
-
|
|
35
|
-
const action = useAction();
|
|
36
|
-
action.open({
|
|
37
|
-
actions: [[{ text: "OK", handler: () => {} }]],
|
|
38
|
-
onClose: () => {},
|
|
39
|
-
onChoose: (btn) => {},
|
|
40
|
-
});
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Props
|
|
44
|
-
|
|
45
|
-
| Prop | Type | Default | Description |
|
|
46
|
-
| ----------- | ----------------------- | ------------ | -------------------------------------------------------------- |
|
|
47
|
-
| `visible` | `boolean` | `false` | Show the action layer. |
|
|
48
|
-
| `dismiss` | `string[]` | — | `Present` close reasons that emit `close` (e.g. `'backdrop'`). |
|
|
49
|
-
| `actions` | `Array<ActionButton[]>` | _(required)_ | Rows of button groups; each row is an array of buttons. |
|
|
50
|
-
| `role` | `string` | — | Theme role override; default from `t-app`. |
|
|
51
|
-
| `shape` | `string` | — | Shape override; default from `t-app`. |
|
|
52
|
-
| `divider` | `boolean` | — | Divider; default from `t-app`. |
|
|
53
|
-
| `shadow` | `boolean` | — | Shadow; default from `t-app`. |
|
|
54
|
-
| `placement` | `PresentPlacement` | `"bottom"` | `Present` placement (`top`, `bottom`, …). |
|
|
55
|
-
|
|
56
|
-
**Type source:** `src/components/action/action.type.ts`
|
|
57
|
-
|
|
58
|
-
`ActionButton`: `text`, `role`, `variant`, `shadow`, `handler`, `data`.
|
|
59
|
-
|
|
60
|
-
## Events (emits)
|
|
61
|
-
|
|
62
|
-
| Event | Payload | Description |
|
|
63
|
-
| -------- | ------------------- | --------------------------------------------------------- |
|
|
64
|
-
| `close` | `type?: string` | When `dismiss` matches the close reason. |
|
|
65
|
-
| `choose` | `btn: ActionButton` | After a button is chosen (after that button’s `handler`). |
|
|
66
|
-
|
|
67
|
-
## Slots
|
|
68
|
-
|
|
69
|
-
| Slot | Slot props | Description |
|
|
70
|
-
| ------ | ---------- | -------------------------------------------- |
|
|
71
|
-
| `body` | — | Replaces the default button layout entirely. |
|
|
72
|
-
|
|
73
|
-
## `v-model`
|
|
74
|
-
|
|
75
|
-
No `v-model` support.
|
|
76
|
-
|
|
77
|
-
## Provide / inject / context
|
|
78
|
-
|
|
79
|
-
Injects `APP_PROVIDER_STATE_KEY` from `t-app` for `divider`, `shadow`, `shape`, `role` when props are omitted.
|
|
80
|
-
|
|
81
|
-
## Expose (template ref)
|
|
82
|
-
|
|
83
|
-
Nothing exposed.
|
|
84
|
-
|
|
85
|
-
## Special behavior
|
|
86
|
-
|
|
87
|
-
- Backdrop close: if the payload is not in `dismiss`, a short `pop` animation runs instead of emitting `close`.
|
|
88
|
-
|
|
89
|
-
## Accessibility (a11y)
|
|
90
|
-
|
|
91
|
-
Inherits from `Present` (backdrop, focus). Buttons use inner `Button`.
|
|
92
|
-
|
|
93
|
-
## Style / class notes
|
|
94
|
-
|
|
95
|
-
BEM-style classes via `withPrefix`: `action`, `layer`, `surface`, `role`, `shape`, placement, `pop`, `divider`, `shadow`.
|
|
96
|
-
|
|
97
|
-
## Advanced example
|
|
98
|
-
|
|
99
|
-
```vue
|
|
100
|
-
<t-action
|
|
101
|
-
:visible="open"
|
|
102
|
-
:dismiss="['backdrop']"
|
|
103
|
-
:actions="[
|
|
104
|
-
[{ text: 'Cancel', variant: 'text', handler: cancel }],
|
|
105
|
-
[{ text: 'Delete', variant: 'fill', role: 'danger', handler: remove }],
|
|
106
|
-
]"
|
|
107
|
-
placement="bottom"
|
|
108
|
-
@close="(t) => console.log(t)"
|
|
109
|
-
/>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## See also
|
|
113
|
-
|
|
114
|
-
- Source: `src/components/action`
|
|
115
|
-
- Composable: `action.composable.ts` (`useAction`)
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# `<t-app>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Library root layout: provides theme/context (`provide`) for descendants, mounts multiple `Toast` regions by placement, and hosts `Action` / `DecisionModal` when using `useAction` / `useDecisionModal`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | -------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Router not required. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<template>
|
|
20
|
-
<t-app>
|
|
21
|
-
<t-page>App content</t-page>
|
|
22
|
-
</t-app>
|
|
23
|
-
</template>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
| Prop | Type | Default | Description |
|
|
29
|
-
| ----------- | ------------------- | -------- | ------------------------------------------------ |
|
|
30
|
-
| `shape` | `string` | `"pill"` | Default shape for children (buttons, fields, …). |
|
|
31
|
-
| `divider` | `boolean` | `false` | Default divider flag. |
|
|
32
|
-
| `role` | `string` | `"mode"` | Default theme role. |
|
|
33
|
-
| `shadow` | `boolean` | `false` | Default shadow. |
|
|
34
|
-
| `triple` | `boolean` | `false` | Layout flag (provided to children). |
|
|
35
|
-
| `direction` | `"left" \| "right"` | `"left"` | Direction (fields, …). |
|
|
36
|
-
|
|
37
|
-
**Type source:** `src/components/app/app.type.ts`
|
|
38
|
-
|
|
39
|
-
## Events (emits)
|
|
40
|
-
|
|
41
|
-
_No public emits._
|
|
42
|
-
|
|
43
|
-
## Slots
|
|
44
|
-
|
|
45
|
-
| Slot | Description |
|
|
46
|
-
| --------- | ----------------------------------------------------- |
|
|
47
|
-
| `default` | Main app content. |
|
|
48
|
-
| `global` | Extra slot (after default, before internal overlays). |
|
|
49
|
-
|
|
50
|
-
## `v-model`
|
|
51
|
-
|
|
52
|
-
No.
|
|
53
|
-
|
|
54
|
-
## Provide / inject / context
|
|
55
|
-
|
|
56
|
-
`provide(APP_PROVIDER_STATE_KEY)`: `{ shape, divider, role, shadow, triple, direction }` — children inject for consistent theming.
|
|
57
|
-
|
|
58
|
-
## Expose
|
|
59
|
-
|
|
60
|
-
Nothing.
|
|
61
|
-
|
|
62
|
-
## Special behavior
|
|
63
|
-
|
|
64
|
-
- Renders several `Toast` instances with fixed placements (top/bottom × start/center/end).
|
|
65
|
-
- When `useAction()` / `useDecisionModal()` has `data`, renders the matching `Action` / `DecisionModal`.
|
|
66
|
-
|
|
67
|
-
## Accessibility (a11y)
|
|
68
|
-
|
|
69
|
-
Wrapper only; no special root role.
|
|
70
|
-
|
|
71
|
-
## Style / class notes
|
|
72
|
-
|
|
73
|
-
Classes: `layer`, `base`, `shape`, `app`.
|
|
74
|
-
|
|
75
|
-
## See also
|
|
76
|
-
|
|
77
|
-
- Source: `src/components/app`
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# `<t-avatar>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Displays an avatar image as a CSS `background-image` inside a themed frame (shape/role from app when omitted).
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended for default `role` / `shape`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-avatar src="/user.png" size="40px" />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| ------- | ------------------ | -------- | ------------------------------------- |
|
|
26
|
-
| `shape` | `string` | — | Shape override; default from `t-app`. |
|
|
27
|
-
| `size` | `string \| number` | `"22px"` | Size (number is treated as px). |
|
|
28
|
-
| `src` | `string` | `""` | Image URL for background. |
|
|
29
|
-
|
|
30
|
-
**Type source:** `src/components/avatar/avatar.type.ts`
|
|
31
|
-
|
|
32
|
-
## Events (emits)
|
|
33
|
-
|
|
34
|
-
_None._
|
|
35
|
-
|
|
36
|
-
## Slots
|
|
37
|
-
|
|
38
|
-
| Slot | Description |
|
|
39
|
-
| --------- | ------------------------------ |
|
|
40
|
-
| `default` | Optional inner content (rare). |
|
|
41
|
-
|
|
42
|
-
## `v-model`
|
|
43
|
-
|
|
44
|
-
No.
|
|
45
|
-
|
|
46
|
-
## Provide / inject
|
|
47
|
-
|
|
48
|
-
Injects `AppProviderState` for `role` / `shape`.
|
|
49
|
-
|
|
50
|
-
## Expose
|
|
51
|
-
|
|
52
|
-
Nothing.
|
|
53
|
-
|
|
54
|
-
## Accessibility (a11y)
|
|
55
|
-
|
|
56
|
-
Decorative background image — add `aria-label` on a parent if a name must be announced.
|
|
57
|
-
|
|
58
|
-
## Style / class notes
|
|
59
|
-
|
|
60
|
-
CSS variable `--<prefix>-width` via `property("width")`.
|
|
61
|
-
|
|
62
|
-
## See also
|
|
63
|
-
|
|
64
|
-
- Source: `src/components/avatar`
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# `<t-button>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Button with variants, sizes, loading state, and theming from `t-app`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ---------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended for `shape` / `role` / `shadow`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-button variant="fill" @click="save">Save</t-button>
|
|
20
|
-
<t-button loading>Loading</t-button>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| Prop | Type | Default | Description |
|
|
26
|
-
| --------- | ---------------------------------- | ------------ | ---------------------------------------- |
|
|
27
|
-
| `role` | `string` | — | Theme role; default from app. |
|
|
28
|
-
| `size` | `"small" \| "standard" \| "large"` | `"standard"` | Size. |
|
|
29
|
-
| `shape` | `string` | — | Shape; default from app. |
|
|
30
|
-
| `block` | `boolean` | `false` | Full-width button. |
|
|
31
|
-
| `loading` | `boolean` | `false` | Hides label, shows `loading` slot. |
|
|
32
|
-
| `variant` | `ButtonVariant` | `"fill"` | `fill` \| `outline` \| `text` \| `link`. |
|
|
33
|
-
| `shadow` | `boolean` | — | Default from app if unset. |
|
|
34
|
-
|
|
35
|
-
**Type source:** `src/components/button/button.type.ts`
|
|
36
|
-
|
|
37
|
-
## Events (emits)
|
|
38
|
-
|
|
39
|
-
_No declared emits_ — use native DOM listeners (`@click`).
|
|
40
|
-
|
|
41
|
-
## Slots
|
|
42
|
-
|
|
43
|
-
| Slot | Description |
|
|
44
|
-
| --------- | ------------------------------------- |
|
|
45
|
-
| `default` | Button label (hidden when `loading`). |
|
|
46
|
-
| `loading` | Content when `loading`. |
|
|
47
|
-
|
|
48
|
-
## `v-model`
|
|
49
|
-
|
|
50
|
-
No.
|
|
51
|
-
|
|
52
|
-
## Provide / inject
|
|
53
|
-
|
|
54
|
-
Injects theme from `t-app`.
|
|
55
|
-
|
|
56
|
-
## Expose
|
|
57
|
-
|
|
58
|
-
Nothing.
|
|
59
|
-
|
|
60
|
-
## Accessibility (a11y)
|
|
61
|
-
|
|
62
|
-
Native `<button>`; focus/blur styling handled internally.
|
|
63
|
-
|
|
64
|
-
## See also
|
|
65
|
-
|
|
66
|
-
- Source: `src/components/button`
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# `<t-cable>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Layout region for dock-style UI; provides `placement` to descendants (e.g. `Toolbar`) via inject.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ---------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Toolbar is often placed inside to inherit placement. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-cable placement="bottom">
|
|
20
|
-
<t-toolbar><t-button>Home</t-button></t-toolbar>
|
|
21
|
-
</t-cable>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Props
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Description |
|
|
27
|
-
| ----------- | --------- | ---------- | --------------------------------------- |
|
|
28
|
-
| `keyboard` | `boolean` | `false` | Reserved for keyboard-related behavior. |
|
|
29
|
-
| `placement` | `string` | `"bottom"` | Cable placement (class on root). |
|
|
30
|
-
|
|
31
|
-
**Type source:** `src/components/cable/cable.type.ts`
|
|
32
|
-
|
|
33
|
-
## Events (emits)
|
|
34
|
-
|
|
35
|
-
_None._
|
|
36
|
-
|
|
37
|
-
## Slots
|
|
38
|
-
|
|
39
|
-
| Slot | Description |
|
|
40
|
-
| --------- | ------------------------------ |
|
|
41
|
-
| `default` | Content (toolbar, buttons, …). |
|
|
42
|
-
|
|
43
|
-
## Provide / inject
|
|
44
|
-
|
|
45
|
-
`provide(CABLE_PROVIDER_STATE_KEY)`: `{ placement }` — `Toolbar` injects it for placement classes.
|
|
46
|
-
|
|
47
|
-
## Expose
|
|
48
|
-
|
|
49
|
-
Nothing.
|
|
50
|
-
|
|
51
|
-
## Style / class notes
|
|
52
|
-
|
|
53
|
-
Classes: `layer`, `base`, `cable`, plus placement.
|
|
54
|
-
|
|
55
|
-
## See also
|
|
56
|
-
|
|
57
|
-
- Source: `src/components/cable`
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# `<t-card>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Card surface with optional divider; provides context for `CardHeader` / `CardBody` / `CardFooter`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | -------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-card>
|
|
20
|
-
<t-card-header>Title</t-card-header>
|
|
21
|
-
<t-card-body>Content</t-card-body>
|
|
22
|
-
<t-card-footer>Footer</t-card-footer>
|
|
23
|
-
</t-card>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
| Prop | Type | Default | Description |
|
|
29
|
-
| --------- | --------- | ------- | ----------------------------------- |
|
|
30
|
-
| `role` | `string` | — | Default from app. |
|
|
31
|
-
| `shape` | `string` | — | Default from app. |
|
|
32
|
-
| `divider` | `boolean` | — | Section dividers; default from app. |
|
|
33
|
-
|
|
34
|
-
**Type source:** `src/components/card/card/card.type.ts`
|
|
35
|
-
|
|
36
|
-
## Events (emits)
|
|
37
|
-
|
|
38
|
-
_None._
|
|
39
|
-
|
|
40
|
-
## Slots
|
|
41
|
-
|
|
42
|
-
| Slot | Description |
|
|
43
|
-
| --------- | ----------------- |
|
|
44
|
-
| `default` | Entire card body. |
|
|
45
|
-
|
|
46
|
-
## Provide / inject
|
|
47
|
-
|
|
48
|
-
`provide(CARD_PROVIDER_STATE_KEY)`: `{ role, shape, divider }` for header/footer.
|
|
49
|
-
|
|
50
|
-
## Expose
|
|
51
|
-
|
|
52
|
-
Nothing.
|
|
53
|
-
|
|
54
|
-
## See also
|
|
55
|
-
|
|
56
|
-
- Source: `src/components/card/card`
|
|
57
|
-
- [card-header.md](../card-header/card-header.md), [card-body.md](../card-body/card-body.md), [card-footer.md](../card-footer/card-footer.md)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# `<t-card-body>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Main content region of a card.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------ |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Usually inside `t-card`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-card-body>Main content</t-card-body>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
_None._
|
|
25
|
-
|
|
26
|
-
## Slots
|
|
27
|
-
|
|
28
|
-
| Slot | Description |
|
|
29
|
-
| --------- | ----------- |
|
|
30
|
-
| `default` | Content. |
|
|
31
|
-
|
|
32
|
-
## See also
|
|
33
|
-
|
|
34
|
-
- Source: `src/components/card/card-body`
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# `<t-card-footer>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Card footer region; divider follows `t-card` context.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | --------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Should be inside `t-card` for correct inject. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-card>
|
|
20
|
-
<t-card-footer>
|
|
21
|
-
<t-button>OK</t-button>
|
|
22
|
-
</t-card-footer>
|
|
23
|
-
</t-card>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
_None._
|
|
29
|
-
|
|
30
|
-
## Slots
|
|
31
|
-
|
|
32
|
-
| Slot | Description |
|
|
33
|
-
| --------- | --------------- |
|
|
34
|
-
| `default` | Footer content. |
|
|
35
|
-
|
|
36
|
-
## Provide / inject
|
|
37
|
-
|
|
38
|
-
Injects `CardProviderState` from `t-card`.
|
|
39
|
-
|
|
40
|
-
## See also
|
|
41
|
-
|
|
42
|
-
- Source: `src/components/card/card-footer`
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# `<t-card-header>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Card header region; divider follows context from `t-card`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------------------------------------------ |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Must be inside `t-card` (injects `CARD_PROVIDER_STATE_KEY`). |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-card>
|
|
20
|
-
<t-card-header>Title</t-card-header>
|
|
21
|
-
</t-card>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Props
|
|
25
|
-
|
|
26
|
-
_No own props._
|
|
27
|
-
|
|
28
|
-
## Events (emits)
|
|
29
|
-
|
|
30
|
-
_None._
|
|
31
|
-
|
|
32
|
-
## Slots
|
|
33
|
-
|
|
34
|
-
| Slot | Description |
|
|
35
|
-
| --------- | --------------- |
|
|
36
|
-
| `default` | Header content. |
|
|
37
|
-
|
|
38
|
-
## Provide / inject
|
|
39
|
-
|
|
40
|
-
Injects `CardProviderState` from `t-card`.
|
|
41
|
-
|
|
42
|
-
## See also
|
|
43
|
-
|
|
44
|
-
- Source: `src/components/card/card-header`
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# `<t-checkbox>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Custom boolean checkbox (not a native `<input type="checkbox">`), with `v-model` and readonly/disabled states.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | -------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-checkbox v-model="checked">I agree</t-checkbox>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| ------------ | --------------------- | -------- | ------------------------ |
|
|
26
|
-
| `modelValue` | `boolean` | `false` | Value (`v-model`). |
|
|
27
|
-
| `role` | `string` | — | Theme; default from app. |
|
|
28
|
-
| `shape` | `string` | — | Shape; default from app. |
|
|
29
|
-
| `variant` | `"fill" \| "outline"` | `"fill"` | Visual variant. |
|
|
30
|
-
| `readonly` | `boolean` | `false` | Read-only. |
|
|
31
|
-
| `disabled` | `boolean` | `false` | Disabled. |
|
|
32
|
-
| `shadow` | `boolean` | — | Default from app. |
|
|
33
|
-
|
|
34
|
-
**Type source:** `src/components/checkbox/checkbox.type.ts`
|
|
35
|
-
|
|
36
|
-
## Events (emits)
|
|
37
|
-
|
|
38
|
-
| Event | Payload | Description |
|
|
39
|
-
| ------------------- | --------- | ------------------------------------- |
|
|
40
|
-
| `update:modelValue` | `boolean` | Updates `v-model`. |
|
|
41
|
-
| `focus` | — | When focused (not disabled/readonly). |
|
|
42
|
-
| `blur` | — | When blurred. |
|
|
43
|
-
|
|
44
|
-
## Slots
|
|
45
|
-
|
|
46
|
-
| Slot | Description |
|
|
47
|
-
| --------- | ----------------------- |
|
|
48
|
-
| `default` | Label next to the icon. |
|
|
49
|
-
|
|
50
|
-
## `v-model`
|
|
51
|
-
|
|
52
|
-
`modelValue` / `update:modelValue`.
|
|
53
|
-
|
|
54
|
-
## Accessibility (a11y)
|
|
55
|
-
|
|
56
|
-
`role="checkbox"`, `aria-checked`, `tabindex` 0 or -1; Space/Enter toggles.
|
|
57
|
-
|
|
58
|
-
## See also
|
|
59
|
-
|
|
60
|
-
- Source: `src/components/checkbox`
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# `<t-collapse>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Expand/collapse panel with height animation; separate slots for trigger and content.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | -------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-collapse v-model="open">
|
|
20
|
-
<template #trigger>Expand</template>
|
|
21
|
-
<p>Hidden content</p>
|
|
22
|
-
</t-collapse>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Default | Description |
|
|
28
|
-
| ------------ | --------- | ------- | -------------------------------------------------- |
|
|
29
|
-
| `modelValue` | `boolean` | `false` | Open (`true`) / closed. |
|
|
30
|
-
| `duration` | `number` | — | Transition duration (ms), mapped to CSS variables. |
|
|
31
|
-
| `role` | `string` | — | Theme role. |
|
|
32
|
-
| `disabled` | `boolean` | `false` | Disables toggling. |
|
|
33
|
-
|
|
34
|
-
**Type source:** `src/components/collapse/collapse.type.ts`
|
|
35
|
-
|
|
36
|
-
## Events (emits)
|
|
37
|
-
|
|
38
|
-
| Event | Payload | Description |
|
|
39
|
-
| ------------------- | --------- | ------------- |
|
|
40
|
-
| `update:modelValue` | `boolean` | After toggle. |
|
|
41
|
-
|
|
42
|
-
## Slots
|
|
43
|
-
|
|
44
|
-
| Slot | Description |
|
|
45
|
-
| --------- | ----------------------------------- |
|
|
46
|
-
| `trigger` | Clickable header (`role="button"`). |
|
|
47
|
-
| `default` | Collapsible content. |
|
|
48
|
-
|
|
49
|
-
## `v-model`
|
|
50
|
-
|
|
51
|
-
`modelValue` / `update:modelValue`.
|
|
52
|
-
|
|
53
|
-
## Accessibility (a11y)
|
|
54
|
-
|
|
55
|
-
Trigger: `role="button"`, `aria-expanded`, `aria-disabled`; Enter/Space toggles.
|
|
56
|
-
|
|
57
|
-
## See also
|
|
58
|
-
|
|
59
|
-
- Source: `src/components/collapse`
|