@toife/vue 3.1.2 → 3.1.4

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.
Files changed (112) hide show
  1. package/package.json +1 -1
  2. package/src/components/action/action.html +1 -1
  3. package/src/components/app/app.type.ts +6 -0
  4. package/src/components/app/app.vue +7 -1
  5. package/src/components/avatar/avatar.scss +3 -2
  6. package/src/components/button/button.scss +9 -6
  7. package/src/components/button/button.type.ts +3 -1
  8. package/src/components/card/card/card.scss +3 -1
  9. package/src/components/checkbox/checkbox.scss +9 -14
  10. package/src/components/checkbox/checkbox.type.ts +4 -0
  11. package/src/components/checkbox/checkbox.vue +2 -0
  12. package/src/components/decision-modal/decision-modal.scss +3 -1
  13. package/src/components/divider/divider.type.ts +2 -2
  14. package/src/components/divider/divider.vue +2 -2
  15. package/src/components/divider/index.ts +1 -1
  16. package/src/components/dropdown/dropdown.scss +5 -2
  17. package/src/components/dropdown/dropdown.type.ts +4 -1
  18. package/src/components/dropdown/dropdown.vue +4 -0
  19. package/src/components/field/field.type.ts +2 -2
  20. package/src/components/field/outline/outline.scss +9 -8
  21. package/src/components/form-group/form-group.type.ts +2 -2
  22. package/src/components/form-group/form-group.vue +2 -2
  23. package/src/components/gesture-indicator/gesture-indicator.scss +3 -1
  24. package/src/components/index.ts +1 -0
  25. package/src/components/layout/flex/flex.scss +0 -2
  26. package/src/components/layout/flex/flex.type.ts +3 -1
  27. package/src/components/layout/flex-item/flex-item.html +1 -0
  28. package/src/components/layout/flex-item/flex-item.scss +48 -0
  29. package/src/components/layout/flex-item/flex-item.type.ts +11 -0
  30. package/src/components/layout/flex-item/flex-item.vue +27 -0
  31. package/src/components/layout/flex-item/index.ts +2 -0
  32. package/src/components/layout/grid/grid.scss +0 -2
  33. package/src/components/layout/grid/grid.type.ts +1 -1
  34. package/src/components/layout/grid-item/grid-item.html +1 -0
  35. package/src/components/layout/grid-item/grid-item.scss +49 -0
  36. package/src/components/layout/grid-item/grid-item.type.ts +14 -0
  37. package/src/components/layout/grid-item/grid-item.vue +27 -0
  38. package/src/components/layout/grid-item/index.ts +2 -0
  39. package/src/components/layout/index.ts +2 -1
  40. package/src/components/modal/modal.scss +3 -1
  41. package/src/components/radio/radio/radio.scss +7 -5
  42. package/src/components/radio/radio/radio.type.ts +4 -0
  43. package/src/components/radio/radio/radio.vue +2 -0
  44. package/src/components/radio/radio-group/index.ts +1 -1
  45. package/src/components/radio/radio-group/radio-group.type.ts +2 -2
  46. package/src/components/radio/radio-group/radio-group.vue +2 -2
  47. package/src/components/refresher/refresher.html +4 -4
  48. package/src/components/refresher/refresher.scss +10 -4
  49. package/src/components/refresher/refresher.vue +3 -3
  50. package/src/components/skeleton/skeleton.scss +3 -1
  51. package/src/components/slide-range/index.ts +2 -0
  52. package/src/components/slide-range/slide-range.html +20 -0
  53. package/src/components/slide-range/slide-range.scss +161 -0
  54. package/src/components/slide-range/slide-range.type.ts +16 -0
  55. package/src/components/slide-range/slide-range.vue +229 -0
  56. package/src/components/switch/switch.scss +11 -22
  57. package/src/components/switch/switch.type.ts +5 -0
  58. package/src/components/switch/switch.vue +2 -0
  59. package/src/components/tabs/tabs/tabs.scss +135 -95
  60. package/src/components/tabs/tabs/tabs.type.ts +0 -1
  61. package/src/components/tabs/tabs/tabs.vue +6 -10
  62. package/src/components/toast/toast-content/toast-content.scss +3 -2
  63. package/src/components/toolbar/toolbar.html +1 -3
  64. package/src/components/toolbar/toolbar.scss +25 -40
  65. package/src/components/toolbar/toolbar.type.ts +2 -2
  66. package/src/components/toolbar/toolbar.vue +6 -6
  67. package/src/factory.ts +6 -2
  68. package/src/index.ts +1 -1
  69. package/src/components/action/action.md +0 -115
  70. package/src/components/app/app.md +0 -77
  71. package/src/components/avatar/avatar.md +0 -64
  72. package/src/components/button/button.md +0 -66
  73. package/src/components/cable/cable.md +0 -57
  74. package/src/components/card/card/card.md +0 -57
  75. package/src/components/card/card-body/card-body.md +0 -34
  76. package/src/components/card/card-footer/card-footer.md +0 -42
  77. package/src/components/card/card-header/card-header.md +0 -44
  78. package/src/components/checkbox/checkbox.md +0 -60
  79. package/src/components/collapse/collapse.md +0 -59
  80. package/src/components/container/container.md +0 -38
  81. package/src/components/decision-modal/decision-modal.md +0 -79
  82. package/src/components/divider/divider.md +0 -42
  83. package/src/components/field/field.md +0 -68
  84. package/src/components/field/outline/outline-field.md +0 -44
  85. package/src/components/form-group/form-group.md +0 -41
  86. package/src/components/gesture-indicator/gesture-indicator.md +0 -42
  87. package/src/components/image/image.md +0 -41
  88. package/src/components/layout/cell/cell.html +0 -1
  89. package/src/components/layout/cell/cell.md +0 -47
  90. package/src/components/layout/cell/cell.scss +0 -54
  91. package/src/components/layout/cell/cell.type.ts +0 -19
  92. package/src/components/layout/cell/cell.vue +0 -35
  93. package/src/components/layout/cell/index.ts +0 -2
  94. package/src/components/layout/grid/grid.md +0 -50
  95. package/src/components/modal/modal.md +0 -65
  96. package/src/components/page/page.md +0 -39
  97. package/src/components/present/present.md +0 -60
  98. package/src/components/radio/radio/radio.md +0 -53
  99. package/src/components/radio/radio-group/radio-group.md +0 -62
  100. package/src/components/refresher/refresher.md +0 -53
  101. package/src/components/route/route-navigator/route-navigator.md +0 -50
  102. package/src/components/route/route-outlet/route-outlet.md +0 -30
  103. package/src/components/route/route-provider/route-provider.md +0 -46
  104. package/src/components/route/route-wrapper/route-wrapper.md +0 -45
  105. package/src/components/segmented-field/segmented-field.md +0 -58
  106. package/src/components/skeleton/skeleton.md +0 -47
  107. package/src/components/switch/switch.md +0 -57
  108. package/src/components/tabs/tab/tab.md +0 -52
  109. package/src/components/tabs/tabs/tabs.md +0 -59
  110. package/src/components/toast/toast/toast.md +0 -56
  111. package/src/components/toast/toast-content/toast-content.md +0 -41
  112. package/src/components/toolbar/toolbar.md +0 -57
@@ -10,7 +10,8 @@ $toast-border-color: sass.fn-naming-var("toast", "border-color");
10
10
 
11
11
  $space-x: sass.fn-naming-var("spacing", "x");
12
12
  $transition-duration: sass.fn-naming-var("motion", "duration");
13
- $border-radius: sass.fn-naming-var("border-radius");
13
+ $radius-ratio: sass.fn-naming-var("radius-ratio");
14
+ $radius-size: sass.fn-naming-var("radius-size");
14
15
  $border-width: sass.fn-naming-var("stroke", "width");
15
16
  $max-height: sass.fn-naming-var("overlay", "max-height");
16
17
 
@@ -33,7 +34,7 @@ $max-height: sass.fn-naming-var("overlay", "max-height");
33
34
  max-height: #{$max-height};
34
35
  max-width: 100%;
35
36
  padding: calc(#{$space-x} * 2) calc(#{$space-x} * 4);
36
- border-radius: #{$border-radius};
37
+ border-radius: calc(min(#{$radius-size}, #{$max-height}) * #{$radius-ratio});
37
38
 
38
39
  &.closing {
39
40
  opacity: 0;
@@ -1,5 +1,3 @@
1
1
  <div v-bind="toolbarAttrs">
2
- <div>
3
- <slot />
4
- </div>
2
+ <slot />
5
3
  </div>
@@ -4,16 +4,21 @@
4
4
  $toolbar: sass.fn-naming-prefix("toolbar");
5
5
 
6
6
  // Property name - layer: toolbar
7
- $toolbar-size: sass.fn-naming-var("toolbar", "size");
8
7
  $toolbar-background-color: sass.fn-naming-var("toolbar", "background-color");
8
+ $toolbar-color: sass.fn-naming-var("toolbar", "color");
9
+ $toolbar-border-color: sass.fn-naming-var("toolbar", "border-color");
9
10
  $safe-area-right: sass.fn-naming-var("safe-area", "right");
10
11
  $safe-area-left: sass.fn-naming-var("safe-area", "left");
11
12
  $safe-area-bottom: sass.fn-naming-var("safe-area", "bottom");
12
13
  $safe-area-top: sass.fn-naming-var("safe-area", "top");
13
14
  $transition-duration: sass.fn-naming-var("motion", "duration");
14
15
 
16
+ $border-width: sass.fn-naming-var("stroke", "width");
17
+ $border: #{$border-width} solid rgb(#{$toolbar-border-color});
18
+
15
19
  .#{$toolbar} {
16
20
  background-color: rgb(#{$toolbar-background-color});
21
+ color: rgb(#{$toolbar-color});
17
22
  transition:
18
23
  box-shadow #{$transition-duration} ease,
19
24
  border-color #{$transition-duration} ease,
@@ -21,45 +26,7 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
21
26
  color #{$transition-duration} ease,
22
27
  border-radius #{$transition-duration} ease;
23
28
 
24
- > div {
25
- align-items: center;
26
- display: flex;
27
- position: relative;
28
-
29
- > * {
30
- flex: 1;
31
- }
32
- }
33
-
34
- &.bottom,
35
- &.top {
36
- > div {
37
- flex-direction: row;
38
- height: #{$toolbar-size};
39
- max-height: #{$toolbar-size};
40
- width: 100%;
41
-
42
- > * {
43
- height: 100%;
44
- }
45
- }
46
- }
47
-
48
- &.left,
49
- &.right {
50
- > div {
51
- flex-direction: column;
52
- width: #{$toolbar-size};
53
- max-width: #{$toolbar-size};
54
- height: 100%;
55
-
56
- > * {
57
- width: 100%;
58
- }
59
- }
60
- }
61
-
62
- &.with-safe-area {
29
+ &.safe {
63
30
  &.right {
64
31
  padding-right: #{$safe-area-right};
65
32
  }
@@ -76,4 +43,22 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
76
43
  padding-top: #{$safe-area-top};
77
44
  }
78
45
  }
46
+
47
+ &.divider {
48
+ &.bottom {
49
+ border-top: #{$border};
50
+ }
51
+
52
+ &.top {
53
+ border-bottom: #{$border};
54
+ }
55
+
56
+ &.left {
57
+ border-right: #{$border};
58
+ }
59
+
60
+ &.right {
61
+ border-left: #{$border};
62
+ }
63
+ }
79
64
  }
@@ -1,7 +1,7 @@
1
1
  // Type definitions
2
2
  export type ToolbarProps = {
3
3
  placement?: string | null;
4
- safeArea?: boolean;
5
- size?: string | number;
4
+ safe?: boolean;
6
5
  role?: string;
6
+ divider?: boolean;
7
7
  };
@@ -12,8 +12,8 @@ import { CABLE_PROVIDER_STATE_KEY } from "../cable";
12
12
  // ----------------------------------------------------------------------------
13
13
  const props = withDefaults(defineProps<ToolbarProps>(), {
14
14
  placement: null,
15
- safeArea: true,
16
- size: "50px",
15
+ safe: true,
16
+ divider: undefined,
17
17
  });
18
18
  const cable = inject<CableProviderState>(CABLE_PROVIDER_STATE_KEY);
19
19
  const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
@@ -23,6 +23,8 @@ const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
23
23
  const toolbarAttrs = computed(() => {
24
24
  const role = props.role || appState?.role.value || "";
25
25
  const placement = props.placement || cable?.placement.value || "";
26
+ const divider = (props?.divider !== undefined ? props.divider : appState?.divider.value) ?? false;
27
+
26
28
  return {
27
29
  class: [
28
30
  withPrefix(["layer", "toolbar"]),
@@ -30,12 +32,10 @@ const toolbarAttrs = computed(() => {
30
32
  withPrefix("toolbar"),
31
33
  placement,
32
34
  {
33
- "with-safe-area": props.safeArea,
35
+ safe: props.safe,
36
+ divider: divider.value,
34
37
  },
35
38
  ],
36
- style: {
37
- [property(["toolbar", "size"])]: props.size + (typeof props.size === "number" ? "px" : ""),
38
- },
39
39
  };
40
40
  });
41
41
  </script>
package/src/factory.ts CHANGED
@@ -16,10 +16,11 @@ import {
16
16
  Dropdown,
17
17
  Field,
18
18
  Flex,
19
+ FlexItem,
19
20
  FormGroup,
20
21
  GestureIndicator,
21
22
  Grid,
22
- Cell,
23
+ GridItem,
23
24
  Image,
24
25
  Modal,
25
26
  Page,
@@ -33,6 +34,7 @@ import {
33
34
  RouteOutlet,
34
35
  SegmentedField,
35
36
  Select,
37
+ SlideRange,
36
38
  Skeleton,
37
39
  Switch,
38
40
  Tab,
@@ -67,10 +69,11 @@ export const createToife = (options?: CreateToifeOptions) => {
67
69
  app.component(prefix + "dropdown", Dropdown);
68
70
  app.component(prefix + "field", Field);
69
71
  app.component(prefix + "flex", Flex);
72
+ app.component(prefix + "flex-item", FlexItem);
70
73
  app.component(prefix + "form-group", FormGroup);
71
74
  app.component(prefix + "gesture-indicator", GestureIndicator);
72
75
  app.component(prefix + "grid", Grid);
73
- app.component(prefix + "cell", Cell);
76
+ app.component(prefix + "grid-item", GridItem);
74
77
  app.component(prefix + "image", Image);
75
78
  app.component(prefix + "modal", Modal);
76
79
  app.component(prefix + "page", Page);
@@ -82,6 +85,7 @@ export const createToife = (options?: CreateToifeOptions) => {
82
85
  app.component(prefix + "route-outlet", RouteOutlet);
83
86
  app.component(prefix + "segmented-field", SegmentedField);
84
87
  app.component(prefix + "select", Select);
88
+ app.component(prefix + "slide-range", SlideRange);
85
89
  app.component(prefix + "skeleton", Skeleton);
86
90
  app.component(prefix + "switch", Switch);
87
91
  app.component(prefix + "tab", Tab);
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference path="./env.d.ts" />
2
2
  export * from "./factory";
3
- export * as utils from "./utils";
3
+ export * from "./utils";
4
4
  export * from "./components";
@@ -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`