@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,65 +0,0 @@
|
|
|
1
|
-
# `<t-modal>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Modal content inside `Present`, integrated with `@toife/gesture` for swipe-to-dismiss along `placement` (except `center`). Optional fullscreen and gesture indicator.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------------------ |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `@toife/gesture`; `t-app` for theme. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-modal :visible="open" placement="bottom" @close="() => (open = false)">
|
|
20
|
-
<p>Content</p>
|
|
21
|
-
</t-modal>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Props
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Description |
|
|
27
|
-
| ----------------- | -------------------------------------- | ----------- | -------------------------------------------- |
|
|
28
|
-
| `visible` | `boolean` | `false` | Visibility. |
|
|
29
|
-
| `placement` | `PresentPlacement` | `"bottom"` | Position + gesture direction. |
|
|
30
|
-
| `backdrop` | `"display" \| "none" \| "transparent"` | `"display"` | Backdrop. |
|
|
31
|
-
| `keepalive` | `boolean` | `true` | Keep DOM when closed (`Present`). |
|
|
32
|
-
| `gesture` | `boolean` | `true` | Enable swipe to close. |
|
|
33
|
-
| `fullscreen` | `boolean` | `false` | Full-screen panel. |
|
|
34
|
-
| `indicator` | `boolean` | `true` | Show `GestureIndicator` (when not `center`). |
|
|
35
|
-
| `duration` | `number` | `200` | `Present` transition (ms). |
|
|
36
|
-
| `bounce` | `number \| string` | `0` | `Present` bounce. |
|
|
37
|
-
| `role` / `shape` | `string` | — | Theme. |
|
|
38
|
-
| `class` / `style` | `unknown` | — | Passed to `Present` / root. |
|
|
39
|
-
|
|
40
|
-
**Type source:** `src/components/modal/modal.type.ts`
|
|
41
|
-
|
|
42
|
-
## Events (emits)
|
|
43
|
-
|
|
44
|
-
| Event | Payload | Description |
|
|
45
|
-
| ------- | --------------- | ----------------------------------------------------- |
|
|
46
|
-
| `close` | `type?: string` | From `Present` or gesture (`backdrop`, `gesture`, …). |
|
|
47
|
-
|
|
48
|
-
## Slots
|
|
49
|
-
|
|
50
|
-
| Slot | Description |
|
|
51
|
-
| --------- | ----------- |
|
|
52
|
-
| `default` | Modal body. |
|
|
53
|
-
|
|
54
|
-
## Expose
|
|
55
|
-
|
|
56
|
-
Nothing public (internal refs to `Present` / gesture).
|
|
57
|
-
|
|
58
|
-
## Accessibility (a11y)
|
|
59
|
-
|
|
60
|
-
Add focus trap / `aria-modal` at the app layer if you need strict WCAG compliance.
|
|
61
|
-
|
|
62
|
-
## See also
|
|
63
|
-
|
|
64
|
-
- Source: `src/components/modal`
|
|
65
|
-
- [present.md](../../present/present.md)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# `<t-page>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Simple page wrapper with the themed `page` class.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ----- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | None. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-app>
|
|
20
|
-
<t-page>
|
|
21
|
-
<t-toolbar />
|
|
22
|
-
<t-container>Content</t-container>
|
|
23
|
-
</t-page>
|
|
24
|
-
</t-app>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Props
|
|
28
|
-
|
|
29
|
-
_None._
|
|
30
|
-
|
|
31
|
-
## Slots
|
|
32
|
-
|
|
33
|
-
| Slot | Description |
|
|
34
|
-
| --------- | --------------- |
|
|
35
|
-
| `default` | Page structure. |
|
|
36
|
-
|
|
37
|
-
## See also
|
|
38
|
-
|
|
39
|
-
- Source: `src/components/page`
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# `Present` _(named export; not in default `createToife`)_
|
|
2
|
-
|
|
3
|
-
> **Not** registered by `createToife()` — import: `import { Present } from "@toife/vue"` and register globally yourself if needed.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Overlay layer: backdrop + animated panel, stacking z-index via `usePresent`. Used internally by `Modal`, `Action`, `DecisionModal`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ----- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | None. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<Present :visible="show" placement="bottom" backdrop="display" @close="onClose">
|
|
20
|
-
<div>Content</div>
|
|
21
|
-
</Present>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Props
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Description |
|
|
27
|
-
| ----------------- | -------------------------------------- | ----------- | ----------------------------------- |
|
|
28
|
-
| `visible` | `boolean` | `false` | Open/close (with `duration` delay). |
|
|
29
|
-
| `backdrop` | `"display" \| "none" \| "transparent"` | `"display"` | Backdrop. |
|
|
30
|
-
| `placement` | `PresentPlacement` | `"bottom"` | Animation direction. |
|
|
31
|
-
| `keepalive` | `boolean` | `false` | Keep DOM when closed. |
|
|
32
|
-
| `duration` | `number` | `200` | ms. |
|
|
33
|
-
| `bounce` | `number \| string \| boolean` | `false` | Open bounce. |
|
|
34
|
-
| `class` / `style` | `unknown` | — | Panel. |
|
|
35
|
-
|
|
36
|
-
**Type source:** `src/components/present/present.type.ts`
|
|
37
|
-
|
|
38
|
-
## Events (emits)
|
|
39
|
-
|
|
40
|
-
| Event | Payload | Description |
|
|
41
|
-
| ------- | --------------- | ------------------------------------------- |
|
|
42
|
-
| `close` | `type?: string` | e.g. `'backdrop'` when backdrop is clicked. |
|
|
43
|
-
|
|
44
|
-
## Slots
|
|
45
|
-
|
|
46
|
-
| Slot | Description |
|
|
47
|
-
| --------- | -------------- |
|
|
48
|
-
| `default` | Panel content. |
|
|
49
|
-
|
|
50
|
-
## Expose (template ref)
|
|
51
|
-
|
|
52
|
-
| API | Description |
|
|
53
|
-
| -------------------------------- | ------------------------------------------------- |
|
|
54
|
-
| `render(options: RenderOptions)` | Update transition styles (translate, opacity, …). |
|
|
55
|
-
| `open()` / `close()` | Manual animation control. |
|
|
56
|
-
|
|
57
|
-
## See also
|
|
58
|
-
|
|
59
|
-
- Source: `src/components/present`
|
|
60
|
-
- `present.composable.ts` — `usePresent` (z-index stack)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# `<t-radio>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Single choice in a group — **must** be used inside `t-radio-group` so selection updates via inject.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | -------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Parent `t-radio-group` required. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-radio-group v-model="x">
|
|
20
|
-
<t-radio value="1">One</t-radio>
|
|
21
|
-
</t-radio-group>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Props
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Description |
|
|
27
|
-
| ---------- | ------------------ | ------------ | ------------------------- |
|
|
28
|
-
| `value` | `string \| number` | _(required)_ | Value when selected. |
|
|
29
|
-
| `role` | `string` | — | Overrides group/app role. |
|
|
30
|
-
| `variant` | `RadioVariant` | — | Overrides group variant. |
|
|
31
|
-
| `disabled` | `boolean` | `false` | Or from group. |
|
|
32
|
-
| `readonly` | `boolean` | `false` | Or from group. |
|
|
33
|
-
| `shadow` | `boolean` | — | Group/app default. |
|
|
34
|
-
|
|
35
|
-
**Type source:** `src/components/radio/radio/radio.type.ts`
|
|
36
|
-
|
|
37
|
-
## Events (emits)
|
|
38
|
-
|
|
39
|
-
_None_ — selection goes through the group’s `setValue`.
|
|
40
|
-
|
|
41
|
-
## Slots
|
|
42
|
-
|
|
43
|
-
| Slot | Description |
|
|
44
|
-
| --------- | ----------- |
|
|
45
|
-
| `default` | Label. |
|
|
46
|
-
|
|
47
|
-
## Accessibility (a11y)
|
|
48
|
-
|
|
49
|
-
`tabindex` 0/-1; Space/Enter selects. Consider `role="radiogroup"` on the container in your app if needed.
|
|
50
|
-
|
|
51
|
-
## See also
|
|
52
|
-
|
|
53
|
-
- Source: `src/components/radio/radio`
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# `<t-radio-group>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Radio group with shared `v-model`; provides variant/readonly/disabled/shadow to child `t-radio` via provide/inject.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------------------ |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Wrap one or more `t-radio` children. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-radio-group v-model="choice" direction="vertical">
|
|
20
|
-
<t-radio value="a">A</t-radio>
|
|
21
|
-
<t-radio value="b">B</t-radio>
|
|
22
|
-
</t-radio-group>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Default | Description |
|
|
28
|
-
| ------------ | ---------------------------- | ------------ | ------------------------------------- |
|
|
29
|
-
| `modelValue` | `string \| number` | — | Selected value (`v-model`). |
|
|
30
|
-
| `role` | `string` | — | Theme; default from app. |
|
|
31
|
-
| `variant` | `RadioVariant` | `"fill"` | Default for radios unless overridden. |
|
|
32
|
-
| `disabled` | `boolean` | `false` | Whole group. |
|
|
33
|
-
| `readonly` | `boolean` | `false` | |
|
|
34
|
-
| `shadow` | `boolean` | — | Default from app. |
|
|
35
|
-
| `direction` | `"horizontal" \| "vertical"` | `"vertical"` | Flex layout. |
|
|
36
|
-
|
|
37
|
-
**Type source:** `src/components/radio/radio-group/radio-group.type.ts`
|
|
38
|
-
|
|
39
|
-
## Events (emits)
|
|
40
|
-
|
|
41
|
-
| Event | Payload | Description |
|
|
42
|
-
| ------------------- | ------------------ | ------------------------------- |
|
|
43
|
-
| `update:modelValue` | `string \| number` | When a child radio is selected. |
|
|
44
|
-
|
|
45
|
-
## Slots
|
|
46
|
-
|
|
47
|
-
| Slot | Description |
|
|
48
|
-
| --------- | ------------------- |
|
|
49
|
-
| `default` | `t-radio` children. |
|
|
50
|
-
|
|
51
|
-
## `v-model`
|
|
52
|
-
|
|
53
|
-
`modelValue` / `update:modelValue`.
|
|
54
|
-
|
|
55
|
-
## Provide / inject
|
|
56
|
-
|
|
57
|
-
`RADIO_GROUP_PROVIDER_STATE_KEY`: `modelValue`, `role`, `variant`, `disabled`, `readonly`, `shadow`, `setValue`.
|
|
58
|
-
|
|
59
|
-
## See also
|
|
60
|
-
|
|
61
|
-
- Source: `src/components/radio/radio-group`
|
|
62
|
-
- [radio.md](../radio/radio.md)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# `<t-refresher>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Pull-to-refresh using `@toife/gesture` on the scroll container; two variants control when refresh fires (`max` vs `up`).
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ----------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `@toife/gesture`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-refresher variant="up" :threshold="120" @refresh="(done) => load().finally(done)">
|
|
20
|
-
<template #icon="{ offset, refreshing }">…</template>
|
|
21
|
-
<div class="scroll-area">…</div>
|
|
22
|
-
</t-refresher>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Default | Description |
|
|
28
|
-
| ----------- | --------------- | ------- | ---------------------------------------------------------------------------------------- |
|
|
29
|
-
| `threshold` | `number` | `120` | Pull threshold (px) depending on `variant`. |
|
|
30
|
-
| `variant` | `"max" \| "up"` | `"max"` | `max`: fire during `move` when threshold reached; `up`: fire on `up` when threshold met. |
|
|
31
|
-
| `offset` | `number` | — | Override displayed offset (default `moveOffset / 2`). |
|
|
32
|
-
|
|
33
|
-
**Type source:** `src/components/refresher/refresher.type.ts`
|
|
34
|
-
|
|
35
|
-
## Events (emits)
|
|
36
|
-
|
|
37
|
-
| Event | Payload | Description |
|
|
38
|
-
| --------- | ------------------- | ------------------------------------------------- |
|
|
39
|
-
| `refresh` | `close: () => void` | Call `close()` when refresh finishes to reset UI. |
|
|
40
|
-
| `move` | `offset: number` | While pulling. |
|
|
41
|
-
| `cancel` | — | Pull cancelled. |
|
|
42
|
-
| `start` | — | Gesture started. |
|
|
43
|
-
|
|
44
|
-
## Slots
|
|
45
|
-
|
|
46
|
-
| Slot | Slot props | Description |
|
|
47
|
-
| --------- | ------------------------ | ----------------------------------------- |
|
|
48
|
-
| `icon` | `{ offset, refreshing }` | Indicator above the scroll area. |
|
|
49
|
-
| `default` | — | Scroll region (internal ref for gesture). |
|
|
50
|
-
|
|
51
|
-
## See also
|
|
52
|
-
|
|
53
|
-
- Source: `src/components/refresher`
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# `<t-route-navigator>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Displays a stack of screens with transitions and optional edge swipe to `router.back()` when `variant="swipe"`. Listens to `stack` from `RouteProvider`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ------------ | ------------------------------------------------------------------------ |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| `vue-router` | **Required** |
|
|
15
|
-
| Other | `@toife/gesture`; `RouteProvider` ancestor (usually via `RouteWrapper`). |
|
|
16
|
-
|
|
17
|
-
## Basic usage
|
|
18
|
-
|
|
19
|
-
```vue
|
|
20
|
-
<t-route-wrapper>
|
|
21
|
-
<t-route-navigator variant="swipe" direction="right" />
|
|
22
|
-
</t-route-wrapper>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Default | Description |
|
|
28
|
-
| ----------- | ------------------- | --------- | ----------------------------------------- |
|
|
29
|
-
| `direction` | `"left" \| "right"` | `"right"` | Gesture / animation direction. |
|
|
30
|
-
| `variant` | `"none" \| "swipe"` | `"none"` | Enables swipe navigation when not `none`. |
|
|
31
|
-
| `keepalive` | `boolean` | `false` | Reserved for stack/DOM retention. |
|
|
32
|
-
|
|
33
|
-
**Type source:** `src/components/route/route-navigator/route-navigator.type.ts`
|
|
34
|
-
|
|
35
|
-
## Events (emits)
|
|
36
|
-
|
|
37
|
-
_None._
|
|
38
|
-
|
|
39
|
-
## Slots
|
|
40
|
-
|
|
41
|
-
_None_ — fixed structure: stack loop → `RouteProvider` + `RouteOutlet`.
|
|
42
|
-
|
|
43
|
-
## Special behavior
|
|
44
|
-
|
|
45
|
-
- Swipe along `direction`: preview transform; release past ~60% width → `goBack()`.
|
|
46
|
-
- `fast` swipe calls `router.back()`.
|
|
47
|
-
|
|
48
|
-
## See also
|
|
49
|
-
|
|
50
|
-
- Source: `src/components/route/route-navigator`
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# `<t-route-outlet>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Resolves and renders a route component (sync or async dynamic import).
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Used inside `RouteNavigator` with `component` from the stack. |
|
|
15
|
-
|
|
16
|
-
## Props
|
|
17
|
-
|
|
18
|
-
| Prop | Type | Description |
|
|
19
|
-
| ----------- | --------- | ---------------------------------------------------------- |
|
|
20
|
-
| `component` | `unknown` | Route component (may be `{ default: () => import(...) }`). |
|
|
21
|
-
|
|
22
|
-
_(Inline type in `route-outlet.vue`.)_
|
|
23
|
-
|
|
24
|
-
## Slots
|
|
25
|
-
|
|
26
|
-
_None_ — renders `<component :is="…">`.
|
|
27
|
-
|
|
28
|
-
## See also
|
|
29
|
-
|
|
30
|
-
- Source: `src/components/route/route-outlet`
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# `<t-route-provider>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Provides `stack` (`RouteStack[]`) to `RouteNavigator` / children via inject.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------------------------------------------ |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Usually created by `RouteWrapper` or `RouteNavigator`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<!-- Rarely used directly; RouteNavigator wraps children -->
|
|
20
|
-
<t-route-provider :stack="myStack">
|
|
21
|
-
<slot />
|
|
22
|
-
</t-route-provider>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Description |
|
|
28
|
-
| ------- | -------------- | ---------------------------------- |
|
|
29
|
-
| `stack` | `RouteStack[]` | Route stack (see `route.type.ts`). |
|
|
30
|
-
|
|
31
|
-
**Type source:** `src/components/route/route-provider/route-provider.type.ts`
|
|
32
|
-
|
|
33
|
-
## Slots
|
|
34
|
-
|
|
35
|
-
| Slot | Description |
|
|
36
|
-
| --------- | ------------------------------------- |
|
|
37
|
-
| `default` | Children (often outlet or navigator). |
|
|
38
|
-
|
|
39
|
-
## Provide / inject
|
|
40
|
-
|
|
41
|
-
`ROUTE_PROVIDER_STATE_KEY` → `{ stack }` (computed).
|
|
42
|
-
|
|
43
|
-
## See also
|
|
44
|
-
|
|
45
|
-
- Source: `src/components/route/route-provider`
|
|
46
|
-
- `src/components/route/route.type.ts`
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# `<t-route-wrapper>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Syncs the route stack with `vue-router` and wraps content in `RouteProvider` — main entry for stack-based navigation (with `RouteNavigator`).
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ------------ | ---------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| `vue-router` | **Required** — `useRoute` / `useRouter`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-route-wrapper home-route-name="home">
|
|
20
|
-
<t-route-navigator />
|
|
21
|
-
</t-route-wrapper>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Props
|
|
25
|
-
|
|
26
|
-
| Prop | Type | Default | Description |
|
|
27
|
-
| --------------- | -------- | -------- | ---------------------------------------------- |
|
|
28
|
-
| `homeRouteName` | `string` | `"home"` | Name of the root route used to seed the stack. |
|
|
29
|
-
|
|
30
|
-
**Type source:** `src/components/route/route-wrapper/route-wrapper.type.ts`
|
|
31
|
-
|
|
32
|
-
## Slots
|
|
33
|
-
|
|
34
|
-
| Slot | Description |
|
|
35
|
-
| --------- | ---------------------------------- |
|
|
36
|
-
| `default` | Child tree (navigator, layout, …). |
|
|
37
|
-
|
|
38
|
-
## Provide / inject
|
|
39
|
-
|
|
40
|
-
Renders `RouteProvider` with `stack` from `useRouteWrapper`.
|
|
41
|
-
|
|
42
|
-
## See also
|
|
43
|
-
|
|
44
|
-
- Source: `src/components/route/route-wrapper`
|
|
45
|
-
- [route-provider.md](../route-provider/route-provider.md), [route-navigator.md](../route-navigator/route-navigator.md)
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# `<t-segmented-field>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
OTP-style segmented input: each segment is a `t-field`; coordinates focus and `v-model` as a character array.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ---------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended; depends on `Field`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-segmented-field v-model="otp" :length="6" @complete="submit" />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| ----------------------- | ---------- | ------------------------ | --------------------------------------------- |
|
|
26
|
-
| `modelValue` | `string[]` | — | Character array (`v-model`). |
|
|
27
|
-
| `value` | `string[]` | — | May be used instead of `modelValue` when set. |
|
|
28
|
-
| `length` | `number` | `6` | Number of segments. |
|
|
29
|
-
| `variant` / `size` | — | Passed to inner `Field`. |
|
|
30
|
-
| `disabled` / `readonly` | `boolean` | `false` | |
|
|
31
|
-
| `type` | `string` | `"text"` | Field input type. |
|
|
32
|
-
| `role` / `shape` | `string` | — | Theme. |
|
|
33
|
-
| `shadow` | `boolean` | — | Default from app. |
|
|
34
|
-
| `message` / `help` | `string` | `""` | Message / help. |
|
|
35
|
-
| `pattern` | `string[]` | `[]` | Reserved for per-cell validation. |
|
|
36
|
-
|
|
37
|
-
**Type source:** `src/components/segmented-field/segmented-field.type.ts`
|
|
38
|
-
|
|
39
|
-
## Events (emits)
|
|
40
|
-
|
|
41
|
-
| Event | Payload | Description |
|
|
42
|
-
| ------------------- | ------------ | ------------------------------------ |
|
|
43
|
-
| `update:modelValue` | `string[]` | Value update. |
|
|
44
|
-
| `complete` | `string[]` | When `length` characters are filled. |
|
|
45
|
-
| `focus` / `blur` | `FocusEvent` | From inner fields. |
|
|
46
|
-
| `input` | `string[]` | On each change. |
|
|
47
|
-
|
|
48
|
-
## Slots
|
|
49
|
-
|
|
50
|
-
_None_ — layout is fixed with repeated `Field`.
|
|
51
|
-
|
|
52
|
-
## `v-model`
|
|
53
|
-
|
|
54
|
-
`modelValue` / `update:modelValue` (`string[]`).
|
|
55
|
-
|
|
56
|
-
## See also
|
|
57
|
-
|
|
58
|
-
- Source: `src/components/segmented-field`
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# `<t-skeleton>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Loading placeholder block with configurable size (CSS variables), themed from app.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ----------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` for `role` / `shape`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-skeleton width="100%" height="12px" />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| -------- | ------------------ | -------- | -------------------- |
|
|
26
|
-
| `width` | `string \| number` | `"100%"` | Width (number = px). |
|
|
27
|
-
| `height` | `string \| number` | `"1rem"` | Height. |
|
|
28
|
-
| `role` | `string` | — | Theme. |
|
|
29
|
-
| `shape` | `string` | — | Shape. |
|
|
30
|
-
|
|
31
|
-
**Type source:** `src/components/skeleton/skeleton.type.ts`
|
|
32
|
-
|
|
33
|
-
## Events (emits)
|
|
34
|
-
|
|
35
|
-
_None._
|
|
36
|
-
|
|
37
|
-
## Slots
|
|
38
|
-
|
|
39
|
-
_None._
|
|
40
|
-
|
|
41
|
-
## Style / class notes
|
|
42
|
-
|
|
43
|
-
Variables `--<prefix>-skeleton-width`, `--<prefix>-skeleton-height` via `property(["skeleton","width"])` / `height`.
|
|
44
|
-
|
|
45
|
-
## See also
|
|
46
|
-
|
|
47
|
-
- Source: `src/components/skeleton`
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# `<t-switch>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Boolean toggle with `v-model`, keyboard support, and basic ARIA.
|
|
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-switch v-model="on">Notifications</t-switch>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| ------------ | --------- | ------- | --------------------- |
|
|
26
|
-
| `modelValue` | `boolean` | `false` | On state. |
|
|
27
|
-
| `role` | `string` | — | Theme when on. |
|
|
28
|
-
| `shape` | `string` | — | Shape. |
|
|
29
|
-
| `disabled` | `boolean` | — | _(optional in types)_ |
|
|
30
|
-
| `readonly` | `boolean` | `false` | Read-only. |
|
|
31
|
-
| `shadow` | `boolean` | — | Default from app. |
|
|
32
|
-
|
|
33
|
-
**Type source:** `src/components/switch/switch.type.ts`
|
|
34
|
-
|
|
35
|
-
## Events (emits)
|
|
36
|
-
|
|
37
|
-
| Event | Payload | Description |
|
|
38
|
-
| ------------------- | --------- | ------------- |
|
|
39
|
-
| `update:modelValue` | `boolean` | Toggle state. |
|
|
40
|
-
|
|
41
|
-
## Slots
|
|
42
|
-
|
|
43
|
-
| Slot | Description |
|
|
44
|
-
| --------- | ----------------------- |
|
|
45
|
-
| `default` | Label beside the track. |
|
|
46
|
-
|
|
47
|
-
## `v-model`
|
|
48
|
-
|
|
49
|
-
`modelValue` / `update:modelValue`.
|
|
50
|
-
|
|
51
|
-
## Accessibility (a11y)
|
|
52
|
-
|
|
53
|
-
`role="switch"`, `aria-checked`, Space/Enter.
|
|
54
|
-
|
|
55
|
-
## See also
|
|
56
|
-
|
|
57
|
-
- Source: `src/components/switch`
|