@toife/vue 3.0.7 → 3.1.3

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 (79) hide show
  1. package/README.md +4 -2
  2. package/package.json +4 -7
  3. package/src/components/action/action.html +1 -1
  4. package/src/components/action/action.scss +1 -1
  5. package/src/components/app/app.scss +1 -1
  6. package/src/components/avatar/avatar.scss +1 -1
  7. package/src/components/button/button.scss +1 -1
  8. package/src/components/cable/cable.scss +1 -1
  9. package/src/components/card/card/card.scss +1 -1
  10. package/src/components/card/card-body/card-body.scss +1 -1
  11. package/src/components/card/card-footer/card-footer.scss +1 -1
  12. package/src/components/card/card-header/card-header.scss +1 -1
  13. package/src/components/checkbox/checkbox.scss +1 -1
  14. package/src/components/collapse/collapse.scss +1 -1
  15. package/src/components/container/container.scss +1 -1
  16. package/src/components/decision-modal/decision-modal.scss +6 -1
  17. package/src/components/divider/divider.md +6 -6
  18. package/src/components/divider/divider.scss +1 -1
  19. package/src/components/divider/divider.type.ts +2 -2
  20. package/src/components/divider/divider.vue +2 -2
  21. package/src/components/divider/index.ts +1 -1
  22. package/src/components/dropdown/dropdown.scss +4 -10
  23. package/src/components/field/outline/outline.html +13 -13
  24. package/src/components/field/outline/outline.scss +97 -36
  25. package/src/components/field/outline/outline.vue +59 -16
  26. package/src/components/form-group/form-group.md +4 -4
  27. package/src/components/form-group/form-group.scss +1 -1
  28. package/src/components/form-group/form-group.type.ts +2 -2
  29. package/src/components/form-group/form-group.vue +2 -2
  30. package/src/components/gesture-indicator/gesture-indicator.scss +1 -1
  31. package/src/components/index.ts +1 -0
  32. package/src/components/layout/cell/cell.html +1 -0
  33. package/src/components/layout/cell/cell.md +47 -0
  34. package/src/components/layout/cell/cell.scss +54 -0
  35. package/src/components/layout/cell/cell.type.ts +19 -0
  36. package/src/components/layout/cell/cell.vue +35 -0
  37. package/src/components/layout/cell/index.ts +2 -0
  38. package/src/components/layout/flex/flex.html +1 -0
  39. package/src/components/layout/flex/flex.scss +59 -0
  40. package/src/components/layout/flex/flex.type.ts +15 -0
  41. package/src/components/layout/flex/flex.vue +34 -0
  42. package/src/components/layout/flex/index.ts +2 -0
  43. package/src/components/layout/grid/grid.html +1 -0
  44. package/src/components/layout/grid/grid.md +50 -0
  45. package/src/components/layout/grid/grid.scss +53 -0
  46. package/src/components/layout/grid/grid.type.ts +12 -0
  47. package/src/components/layout/grid/grid.vue +32 -0
  48. package/src/components/layout/grid/index.ts +2 -0
  49. package/src/components/layout/index.ts +3 -0
  50. package/src/components/modal/modal.scss +1 -1
  51. package/src/components/page/page.scss +1 -1
  52. package/src/components/present/present.scss +1 -1
  53. package/src/components/radio/radio/radio.scss +1 -1
  54. package/src/components/radio/radio-group/index.ts +1 -1
  55. package/src/components/radio/radio-group/radio-group.md +10 -10
  56. package/src/components/radio/radio-group/radio-group.scss +1 -1
  57. package/src/components/radio/radio-group/radio-group.type.ts +2 -2
  58. package/src/components/radio/radio-group/radio-group.vue +2 -2
  59. package/src/components/refresher/refresher.scss +1 -1
  60. package/src/components/route/route-navigator/route-navigator.scss +5 -5
  61. package/src/components/route/route-navigator/route-navigator.vue +26 -20
  62. package/src/components/segmented-field/segmented-field.scss +1 -1
  63. package/src/components/select/index.ts +1 -1
  64. package/src/components/select/select.html +9 -6
  65. package/src/components/select/select.scss +82 -11
  66. package/src/components/select/select.type.ts +14 -1
  67. package/src/components/select/select.vue +38 -8
  68. package/src/components/skeleton/skeleton.scss +1 -1
  69. package/src/components/switch/switch.scss +1 -1
  70. package/src/components/tabs/tabs/tabs.scss +6 -6
  71. package/src/components/toast/toast/toast.scss +1 -1
  72. package/src/components/toast/toast-content/toast-content.scss +1 -1
  73. package/src/components/toolbar/toolbar.html +1 -3
  74. package/src/components/toolbar/toolbar.md +5 -8
  75. package/src/components/toolbar/toolbar.scss +25 -40
  76. package/src/components/toolbar/toolbar.type.ts +1 -1
  77. package/src/components/toolbar/toolbar.vue +4 -4
  78. package/src/factory.ts +6 -0
  79. package/src/utils/style/index.ts +1 -1
@@ -1,19 +1,24 @@
1
- @use "@toife/sass-layer-generator" as sass;
1
+ @use "@toife/sass-layer" as sass;
2
2
 
3
3
  // Class name
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,44 +26,6 @@ $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
29
  &.with-safe-area {
63
30
  &.right {
64
31
  padding-right: #{$safe-area-right};
@@ -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
  }
@@ -2,6 +2,6 @@
2
2
  export type ToolbarProps = {
3
3
  placement?: string | null;
4
4
  safeArea?: boolean;
5
- size?: string | number;
6
5
  role?: string;
6
+ divider?: boolean;
7
7
  };
@@ -13,7 +13,7 @@ import { CABLE_PROVIDER_STATE_KEY } from "../cable";
13
13
  const props = withDefaults(defineProps<ToolbarProps>(), {
14
14
  placement: null,
15
15
  safeArea: true,
16
- size: "50px",
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"]),
@@ -31,11 +33,9 @@ const toolbarAttrs = computed(() => {
31
33
  placement,
32
34
  {
33
35
  "with-safe-area": props.safeArea,
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
@@ -15,8 +15,11 @@ import {
15
15
  Divider,
16
16
  Dropdown,
17
17
  Field,
18
+ Flex,
18
19
  FormGroup,
19
20
  GestureIndicator,
21
+ Grid,
22
+ Cell,
20
23
  Image,
21
24
  Modal,
22
25
  Page,
@@ -63,8 +66,11 @@ export const createToife = (options?: CreateToifeOptions) => {
63
66
  app.component(prefix + "divider", Divider);
64
67
  app.component(prefix + "dropdown", Dropdown);
65
68
  app.component(prefix + "field", Field);
69
+ app.component(prefix + "flex", Flex);
66
70
  app.component(prefix + "form-group", FormGroup);
67
71
  app.component(prefix + "gesture-indicator", GestureIndicator);
72
+ app.component(prefix + "grid", Grid);
73
+ app.component(prefix + "cell", Cell);
68
74
  app.component(prefix + "image", Image);
69
75
  app.component(prefix + "modal", Modal);
70
76
  app.component(prefix + "page", Page);
@@ -39,7 +39,7 @@ export const withPrefix = (name: string | string[]) => {
39
39
  names = [p, ...names];
40
40
  }
41
41
 
42
- return names.join(s);
42
+ return names.filter((item) => item !== undefined && item !== null && item !== "").join(s);
43
43
  };
44
44
 
45
45
  /**