@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,38 +0,0 @@
|
|
|
1
|
-
# `<t-container>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Base layout block (`layer` + `container`) wrapping page content.
|
|
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-page>
|
|
20
|
-
<t-container>
|
|
21
|
-
<p>Content</p>
|
|
22
|
-
</t-container>
|
|
23
|
-
</t-page>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
_No props._
|
|
29
|
-
|
|
30
|
-
## Slots
|
|
31
|
-
|
|
32
|
-
| Slot | Description |
|
|
33
|
-
| --------- | ----------- |
|
|
34
|
-
| `default` | Content. |
|
|
35
|
-
|
|
36
|
-
## See also
|
|
37
|
-
|
|
38
|
-
- Source: `src/components/container`
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# `<t-decision-modal>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Confirmation dialog (title, message, actions) inside `Present`. Often driven with `useDecisionModal()` from `t-app`.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ---------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` recommended; depends on `Present`, `Button`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-decision-modal
|
|
20
|
-
:visible="show"
|
|
21
|
-
title="Confirm"
|
|
22
|
-
message="Are you sure?"
|
|
23
|
-
:actions="[
|
|
24
|
-
{ text: 'Cancel', variant: 'text', handler: () => (show = false) },
|
|
25
|
-
{ text: 'Delete', variant: 'fill', handler: onDelete },
|
|
26
|
-
]"
|
|
27
|
-
:dismiss="['backdrop']"
|
|
28
|
-
@close="show = false"
|
|
29
|
-
/>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Composable:
|
|
33
|
-
|
|
34
|
-
```ts
|
|
35
|
-
const modal = useDecisionModal();
|
|
36
|
-
modal.open({
|
|
37
|
-
message: "…",
|
|
38
|
-
actions: […],
|
|
39
|
-
onClose: () => {},
|
|
40
|
-
onChoose: (btn) => {},
|
|
41
|
-
});
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Props
|
|
45
|
-
|
|
46
|
-
| Prop | Type | Default | Description |
|
|
47
|
-
| ----------- | ----------------------- | ------------ | ---------------------------------- |
|
|
48
|
-
| `visible` | `boolean` | `false` | Visibility. |
|
|
49
|
-
| `title` | `string` | — | Title (`header` slot overrides). |
|
|
50
|
-
| `message` | `string` | _(required)_ | Main copy (`body` slot overrides). |
|
|
51
|
-
| `actions` | `DecisionModalButton[]` | _(required)_ | Footer buttons. |
|
|
52
|
-
| `dismiss` | `string[]` | — | Close reasons that emit `close`. |
|
|
53
|
-
| `placement` | `string` | `"center"` | `Present` placement. |
|
|
54
|
-
| `role` | `string` | — | Theme. |
|
|
55
|
-
| `shape` | `string` | — | Shape. |
|
|
56
|
-
| `divider` | `boolean` | — | Divider; default from app. |
|
|
57
|
-
| `flow` | `"row" \| "column"` | `"row"` | Footer button layout. |
|
|
58
|
-
|
|
59
|
-
**Type source:** `src/components/decision-modal/decision-modal.type.ts`
|
|
60
|
-
|
|
61
|
-
## Events (emits)
|
|
62
|
-
|
|
63
|
-
| Event | Payload | Description |
|
|
64
|
-
| -------- | -------------------------- | -------------------------------- |
|
|
65
|
-
| `close` | `type?: string` | Valid dismiss (per `dismiss`). |
|
|
66
|
-
| `choose` | `btn: DecisionModalButton` | Button chosen (after `handler`). |
|
|
67
|
-
|
|
68
|
-
## Slots
|
|
69
|
-
|
|
70
|
-
| Slot | Description |
|
|
71
|
-
| -------- | ---------------------------------------- |
|
|
72
|
-
| `header` | Replaces header (default shows `title`). |
|
|
73
|
-
| `body` | Replaces `message`. |
|
|
74
|
-
| `footer` | Replaces default button row. |
|
|
75
|
-
|
|
76
|
-
## See also
|
|
77
|
-
|
|
78
|
-
- Source: `src/components/decision-modal`
|
|
79
|
-
- `decision-modal.composable.ts`
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# `<t-divider>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Horizontal or vertical divider line following theme.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` for `role`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-divider direction="horizontal" />
|
|
20
|
-
<t-divider direction="vertical" />
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| Prop | Type | Default | Description |
|
|
26
|
-
| ----------- | ---------------------------- | -------------- | ------------------------------- |
|
|
27
|
-
| `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Divider direction. |
|
|
28
|
-
| `role` | `string` | — | Theme stroke; default from app. |
|
|
29
|
-
|
|
30
|
-
**Type source:** `src/components/divider/divider.type.ts`
|
|
31
|
-
|
|
32
|
-
## Events (emits)
|
|
33
|
-
|
|
34
|
-
_None._
|
|
35
|
-
|
|
36
|
-
## Slots
|
|
37
|
-
|
|
38
|
-
_None._
|
|
39
|
-
|
|
40
|
-
## See also
|
|
41
|
-
|
|
42
|
-
- Source: `src/components/divider`
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# `<t-field>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Text input field. The current implementation only renders `OutlineField` when `variant === 'outline'`. Supports `v-model`, validation message, help text, and many input options.
|
|
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-field v-model="text" placeholder="Type…" />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| ----------------------- | ------------------ | ------------ | ----------------------------------------------------------------- |
|
|
26
|
-
| `modelValue` | `string` | `""` | Value (`v-model`). |
|
|
27
|
-
| `name` | `string` | — | Input `name`. |
|
|
28
|
-
| `variant` | `FieldVariant` | `"outline"` | Only `outline` is wired in the current UI. |
|
|
29
|
-
| `role` / `shape` | `string` | — | Theme; default from app. |
|
|
30
|
-
| `size` | `FieldSize` | `"standard"` | Field size. |
|
|
31
|
-
| `shadow` | `boolean` | — | Default from app. |
|
|
32
|
-
| `direction` | `AppDirection` | — | Default from app or `left`. |
|
|
33
|
-
| `id` | `string` | — | Element id. |
|
|
34
|
-
| `value` | `string` | — | May mirror model (`OutlineField` uses `value \|\| modelValue`). |
|
|
35
|
-
| `placeholder` | `string` | `""` | Placeholder. |
|
|
36
|
-
| `disabled` / `readonly` | `boolean` | `false` | |
|
|
37
|
-
| `autocomplete` | `string` | — | |
|
|
38
|
-
| `maxLength` | `number \| string` | — | |
|
|
39
|
-
| `tabindex` | `number \| string` | — | |
|
|
40
|
-
| `type` | `FieldType` | `"text"` | `text`, `number`, `email`, `password`, `tel`, `url`, `paragraph`. |
|
|
41
|
-
| `line` / `maxLine` | `number \| string` | `1` / — | Lines (paragraph). |
|
|
42
|
-
| `message` | `string` | `""` | Validation / warning message. |
|
|
43
|
-
| `help` | `string` | `""` | Help hint. |
|
|
44
|
-
|
|
45
|
-
**Type source:** `src/components/field/field.type.ts`
|
|
46
|
-
|
|
47
|
-
## Events (emits)
|
|
48
|
-
|
|
49
|
-
| Event | Payload | Description |
|
|
50
|
-
| ------------------- | ------------ | ------------- |
|
|
51
|
-
| `update:modelValue` | `string` | Model update. |
|
|
52
|
-
| `focus` | `FocusEvent` | |
|
|
53
|
-
| `blur` | `FocusEvent` | |
|
|
54
|
-
| `input` | `Event` | |
|
|
55
|
-
| `beforeinput` | `Event` | |
|
|
56
|
-
|
|
57
|
-
## Slots
|
|
58
|
-
|
|
59
|
-
_None_ — content is owned by `OutlineField` (which may expose a default slot in the implementation).
|
|
60
|
-
|
|
61
|
-
## `v-model`
|
|
62
|
-
|
|
63
|
-
`modelValue` / `update:modelValue`.
|
|
64
|
-
|
|
65
|
-
## See also
|
|
66
|
-
|
|
67
|
-
- Source: `src/components/field`
|
|
68
|
-
- [outline-field.md](./outline/outline-field.md) — implementation detail when `variant="outline"`
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# `OutlineField`
|
|
2
|
-
|
|
3
|
-
> **Not** registered by `createToife()` — named import: `import { OutlineField } from "@toife/vue"` or register manually: `app.component("t-outline-field", OutlineField)`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Outline field implementation (contenteditable or password `<input>`), used internally by `t-field` when `variant === 'outline'`. Import directly if you need it without the `Field` wrapper.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | --------------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | Same `FieldProps` / `FieldEmit` as `field.type.ts`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
import { OutlineField } from "@toife/vue";
|
|
21
|
-
</script>
|
|
22
|
-
<template>
|
|
23
|
-
<OutlineField v-model="x" variant="outline" type="text" />
|
|
24
|
-
</template>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Props / events
|
|
28
|
-
|
|
29
|
-
Same as `FieldProps` / `FieldEmit` — see [field.md](../field.md) and `field.type.ts`.
|
|
30
|
-
|
|
31
|
-
## Slots
|
|
32
|
-
|
|
33
|
-
| Slot | Description |
|
|
34
|
-
| --------- | ------------------------------------------------------- |
|
|
35
|
-
| `default` | Extra content after help (see `outline.html` template). |
|
|
36
|
-
|
|
37
|
-
## Behavior notes
|
|
38
|
-
|
|
39
|
-
- When `type !== 'password'`: contenteditable region with `v-text` and caret handling.
|
|
40
|
-
- When `password`: native `<input type="password">`.
|
|
41
|
-
|
|
42
|
-
## See also
|
|
43
|
-
|
|
44
|
-
- Source: `src/components/field/outline`
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# `<t-form-group>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Groups controls in a horizontal or vertical flex layout; used by `Action` to stack button rows.
|
|
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-form-group direction="vertical">
|
|
20
|
-
<t-button>A</t-button>
|
|
21
|
-
<t-button>B</t-button>
|
|
22
|
-
</t-form-group>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Default | Description |
|
|
28
|
-
| ----------- | ---------------------------- | -------------- | ------------ |
|
|
29
|
-
| `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Layout axis. |
|
|
30
|
-
|
|
31
|
-
**Type source:** `src/components/form-group/form-group.type.ts`
|
|
32
|
-
|
|
33
|
-
## Slots
|
|
34
|
-
|
|
35
|
-
| Slot | Description |
|
|
36
|
-
| --------- | --------------- |
|
|
37
|
-
| `default` | Child controls. |
|
|
38
|
-
|
|
39
|
-
## See also
|
|
40
|
-
|
|
41
|
-
- Source: `src/components/form-group`
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# `<t-gesture-indicator>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Small visual stroke hint for swipe placement; usually rendered inside `Modal` when swipe-to-dismiss is enabled.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ----- | ------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Other | `t-app` for `role`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<!-- Rarely used standalone; Modal renders it when gesture + indicator -->
|
|
20
|
-
<t-gesture-indicator placement="bottom" />
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
| Prop | Type | Default | Description |
|
|
26
|
-
| ----------- | -------- | ---------- | --------------------------------------- |
|
|
27
|
-
| `placement` | `string` | `"bottom"` | Placement class (e.g. `bottom`, `top`). |
|
|
28
|
-
|
|
29
|
-
**Type source:** `src/components/gesture-indicator/gesture-indicator.type.ts`
|
|
30
|
-
|
|
31
|
-
## Events (emits)
|
|
32
|
-
|
|
33
|
-
_None._
|
|
34
|
-
|
|
35
|
-
## Slots
|
|
36
|
-
|
|
37
|
-
_None_ — decorative empty element.
|
|
38
|
-
|
|
39
|
-
## See also
|
|
40
|
-
|
|
41
|
-
- Source: `src/components/gesture-indicator`
|
|
42
|
-
- [modal.md](../../modal/modal.md)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# `<t-image>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
`<img>` with fallback to `defaultSrc` on load error.
|
|
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-image src="/a.webp" default-src="/placeholder.png" />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| ------------ | -------- | ------- | -------------------------------------- |
|
|
26
|
-
| `src` | `string` | — | Primary image URL (assigned on mount). |
|
|
27
|
-
| `defaultSrc` | `string` | — | Fallback URL on `@error`. |
|
|
28
|
-
|
|
29
|
-
**Type source:** `src/components/image/image.type.ts`
|
|
30
|
-
|
|
31
|
-
## Events (emits)
|
|
32
|
-
|
|
33
|
-
_None declared_ — internal `@error` handler.
|
|
34
|
-
|
|
35
|
-
## Slots
|
|
36
|
-
|
|
37
|
-
_None._
|
|
38
|
-
|
|
39
|
-
## See also
|
|
40
|
-
|
|
41
|
-
- Source: `src/components/image`
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div v-bind="cellAttrs"><slot /></div>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# `<t-grid-item>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
Cell inside `<t-grid>`. Placement uses `grid-column` / `grid-row` via props or raw CSS strings.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ------ | ---------------------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| Parent | `<t-grid>` (or any `display: grid` container). |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-grid :columns="3">
|
|
20
|
-
<t-grid-item :column-span="2">Wide</t-grid-item>
|
|
21
|
-
<t-grid-item>Narrow</t-grid-item>
|
|
22
|
-
</t-grid>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
| Prop | Type | Description |
|
|
28
|
-
| ------------- | -------- | --------------------------------------------- |
|
|
29
|
-
| `column` | `string` | Raw `grid-column` (overrides span/start/end). |
|
|
30
|
-
| `row` | `string` | Raw `grid-row`. |
|
|
31
|
-
| `columnSpan` | `number` | `span n` on the column axis. |
|
|
32
|
-
| `rowSpan` | `number` | `span n` on the row axis. |
|
|
33
|
-
| `columnStart` | `number` | Grid line start (column). |
|
|
34
|
-
| `columnEnd` | `number` | Grid line end (column). |
|
|
35
|
-
| `rowStart` | `number` | Grid line start (row). |
|
|
36
|
-
| `rowEnd` | `number` | Grid line end (row). |
|
|
37
|
-
|
|
38
|
-
## Slots
|
|
39
|
-
|
|
40
|
-
| Slot | Description |
|
|
41
|
-
| --------- | ------------- |
|
|
42
|
-
| `default` | Cell content. |
|
|
43
|
-
|
|
44
|
-
## See also
|
|
45
|
-
|
|
46
|
-
- Source: `src/components/grid/grid-item`
|
|
47
|
-
- `<t-grid>`
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
@use "sass:list";
|
|
4
|
-
|
|
5
|
-
// Class name
|
|
6
|
-
$cell: sass.fn-naming-prefix("cell");
|
|
7
|
-
|
|
8
|
-
// Base tokens (breakpoint "")
|
|
9
|
-
$cell-row: sass.fn-naming-var("cell", "row");
|
|
10
|
-
$cell-column: sass.fn-naming-var("cell", "column");
|
|
11
|
-
$cell-justify: sass.fn-naming-var("cell", "justify");
|
|
12
|
-
$cell-align: sass.fn-naming-var("cell", "align");
|
|
13
|
-
$cell-grow: sass.fn-naming-var("cell", "grow");
|
|
14
|
-
$cell-shrink: sass.fn-naming-var("cell", "shrink");
|
|
15
|
-
$cell-basis: sass.fn-naming-var("cell", "basis");
|
|
16
|
-
$cell-order: sass.fn-naming-var("cell", "order");
|
|
17
|
-
|
|
18
|
-
.#{$cell} {
|
|
19
|
-
display: grid;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
min-width: 0;
|
|
22
|
-
grid-column: #{$cell-column};
|
|
23
|
-
grid-row: #{$cell-row};
|
|
24
|
-
justify-self: #{$cell-justify};
|
|
25
|
-
align-self: #{$cell-align};
|
|
26
|
-
flex-grow: #{$cell-grow};
|
|
27
|
-
flex-shrink: #{$cell-shrink};
|
|
28
|
-
flex-basis: #{$cell-basis};
|
|
29
|
-
order: #{$cell-order};
|
|
30
|
-
|
|
31
|
-
$bp-names: map.keys(sass.$breakpoints);
|
|
32
|
-
$bp-count: list.length($bp-names);
|
|
33
|
-
|
|
34
|
-
@for $i from 1 through $bp-count {
|
|
35
|
-
$bp-name: list.nth($bp-names, $i);
|
|
36
|
-
$bp-min: map.get(sass.$breakpoints, $bp-name);
|
|
37
|
-
|
|
38
|
-
@media (min-width: $bp-min) {
|
|
39
|
-
grid-column: #{sass.fn-naming-cascade-dvar(("cell", "column"), $bp-names, $i, $cell-column)};
|
|
40
|
-
grid-row: #{sass.fn-naming-cascade-dvar(("cell", "row"), $bp-names, $i, $cell-row)};
|
|
41
|
-
justify-self: #{sass.fn-naming-cascade-dvar(
|
|
42
|
-
("cell", "justify"),
|
|
43
|
-
$bp-names,
|
|
44
|
-
$i,
|
|
45
|
-
$cell-justify
|
|
46
|
-
)};
|
|
47
|
-
align-self: #{sass.fn-naming-cascade-dvar(("cell", "align"), $bp-names, $i, $cell-align)};
|
|
48
|
-
flex-grow: #{sass.fn-naming-cascade-dvar(("cell", "grow"), $bp-names, $i, $cell-grow)};
|
|
49
|
-
flex-shrink: #{sass.fn-naming-cascade-dvar(("cell", "shrink"), $bp-names, $i, $cell-shrink)};
|
|
50
|
-
flex-basis: #{sass.fn-naming-cascade-dvar(("cell", "basis"), $bp-names, $i, $cell-basis)};
|
|
51
|
-
order: #{sass.fn-naming-cascade-dvar(("cell", "order"), $bp-names, $i, $cell-order)};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type CellJustify = "start" | "end" | "center" | "stretch";
|
|
2
|
-
export type CellAlign = "start" | "end" | "center" | "stretch";
|
|
3
|
-
|
|
4
|
-
export type CellOption = {
|
|
5
|
-
breakpoint?: string;
|
|
6
|
-
row?: number;
|
|
7
|
-
column?: number;
|
|
8
|
-
justify?: CellJustify;
|
|
9
|
-
align?: CellAlign;
|
|
10
|
-
grow?: number;
|
|
11
|
-
shrink?: number;
|
|
12
|
-
basis?: string;
|
|
13
|
-
order?: number;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// Type definitions
|
|
17
|
-
export type CellProps = {
|
|
18
|
-
options?: CellOption[];
|
|
19
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<style lang="scss" src="./cell.scss" scoped></style>
|
|
2
|
-
<template src="./cell.html"></template>
|
|
3
|
-
<script lang="ts" setup>
|
|
4
|
-
import { computed } from "vue";
|
|
5
|
-
import { withPrefix, property } from "../../../utils";
|
|
6
|
-
import type { CellProps } from "./cell.type";
|
|
7
|
-
|
|
8
|
-
// Component setup (props, emits, injects)
|
|
9
|
-
// ----------------------------------------------------------------------------
|
|
10
|
-
const props = withDefaults(defineProps<CellProps>(), {
|
|
11
|
-
options: () => [],
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// Computed properties
|
|
15
|
-
// ----------------------------------------------------------------------------
|
|
16
|
-
const cellAttrs = computed(() => {
|
|
17
|
-
const style = props.options.map((option) => {
|
|
18
|
-
return {
|
|
19
|
-
[property(["cell", "row", option?.breakpoint || ""])]: option.row,
|
|
20
|
-
[property(["cell", "column", option?.breakpoint || ""])]: option.column,
|
|
21
|
-
[property(["cell", "justify", option?.breakpoint || ""])]: option.justify,
|
|
22
|
-
[property(["cell", "align", option?.breakpoint || ""])]: option.align,
|
|
23
|
-
[property(["cell", "flex-grow", option?.breakpoint || ""])]: option.grow,
|
|
24
|
-
[property(["cell", "flex-shrink", option?.breakpoint || ""])]: option.shrink,
|
|
25
|
-
[property(["cell", "flex-basis", option?.breakpoint || ""])]: option.basis,
|
|
26
|
-
[property(["cell", "order", option?.breakpoint || ""])]: option.order,
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
class: [withPrefix("cell")],
|
|
32
|
-
style,
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# `<t-grid>`
|
|
2
|
-
|
|
3
|
-
> Default prefix is `t-` — change via `createToife({ prefix: "..." })`.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
CSS Grid wrapper with theme-based default gap. Use with `<t-grid-item>` for placement.
|
|
8
|
-
|
|
9
|
-
## Requirements / dependencies
|
|
10
|
-
|
|
11
|
-
| Item | Notes |
|
|
12
|
-
| ------------------- | ------------------------------- |
|
|
13
|
-
| Vue | ^3.5 |
|
|
14
|
-
| `@toife/sass-layer` | Theme tokens for default `gap`. |
|
|
15
|
-
|
|
16
|
-
## Basic usage
|
|
17
|
-
|
|
18
|
-
```vue
|
|
19
|
-
<t-grid :columns="3">
|
|
20
|
-
<t-grid-item>One</t-grid-item>
|
|
21
|
-
<t-grid-item>Two</t-grid-item>
|
|
22
|
-
<t-grid-item>Three</t-grid-item>
|
|
23
|
-
</t-grid>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Props
|
|
27
|
-
|
|
28
|
-
| Prop | Type | Default | Description |
|
|
29
|
-
| ---------------- | ------------------ | ------- | --------------------------------------------------------------- |
|
|
30
|
-
| `columns` | `number \| string` | `1` | Column count (`repeat(n, 1fr)`) or raw `grid-template-columns`. |
|
|
31
|
-
| `rows` | `number \| string` | — | `grid-template-rows`. |
|
|
32
|
-
| `gap` | `string` | — | Sets `gap` (overrides SCSS default when non-empty). |
|
|
33
|
-
| `columnGap` | `string` | — | `column-gap`. |
|
|
34
|
-
| `rowGap` | `string` | — | `row-gap`. |
|
|
35
|
-
| `alignItems` | `string` | — | `align-items`. |
|
|
36
|
-
| `justifyItems` | `string` | — | `justify-items`. |
|
|
37
|
-
| `alignContent` | `string` | — | `align-content`. |
|
|
38
|
-
| `justifyContent` | `string` | — | `justify-content`. |
|
|
39
|
-
| `autoFlow` | `string` | — | `grid-auto-flow`. |
|
|
40
|
-
|
|
41
|
-
## Slots
|
|
42
|
-
|
|
43
|
-
| Slot | Description |
|
|
44
|
-
| --------- | ----------- |
|
|
45
|
-
| `default` | Grid cells. |
|
|
46
|
-
|
|
47
|
-
## See also
|
|
48
|
-
|
|
49
|
-
- Source: `src/components/grid/grid`
|
|
50
|
-
- `<t-grid-item>`
|