@toife/vue 3.1.4 → 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.
Files changed (92) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/components/action/action.scss +1 -1
  4. package/src/components/action/action.vue +5 -5
  5. package/src/components/app/app.scss +2 -2
  6. package/src/components/app/app.vue +5 -5
  7. package/src/components/avatar/avatar.scss +3 -2
  8. package/src/components/avatar/avatar.vue +6 -6
  9. package/src/components/button/button.scss +13 -13
  10. package/src/components/button/button.vue +7 -7
  11. package/src/components/cable/cable.vue +2 -2
  12. package/src/components/card/card/card.scss +2 -2
  13. package/src/components/card/card/card.vue +5 -5
  14. package/src/components/card/card-body/card-body.scss +2 -2
  15. package/src/components/card/card-body/card-body.vue +2 -2
  16. package/src/components/card/card-footer/card-footer.scss +3 -3
  17. package/src/components/card/card-footer/card-footer.vue +2 -2
  18. package/src/components/card/card-header/card-header.scss +3 -3
  19. package/src/components/card/card-header/card-header.vue +2 -2
  20. package/src/components/checkbox/checkbox.html +1 -1
  21. package/src/components/checkbox/checkbox.scss +18 -13
  22. package/src/components/checkbox/checkbox.vue +7 -7
  23. package/src/components/collapse/collapse.html +1 -1
  24. package/src/components/collapse/collapse.scss +2 -2
  25. package/src/components/collapse/collapse.vue +9 -9
  26. package/src/components/container/container.vue +2 -2
  27. package/src/components/decision-modal/decision-modal.scss +9 -9
  28. package/src/components/decision-modal/decision-modal.vue +8 -8
  29. package/src/components/divider/divider.scss +2 -2
  30. package/src/components/divider/divider.vue +4 -4
  31. package/src/components/dropdown/dropdown.scss +3 -3
  32. package/src/components/dropdown/dropdown.vue +7 -9
  33. package/src/components/field/field.type.ts +2 -2
  34. package/src/components/field/outline/outline.scss +15 -13
  35. package/src/components/field/outline/outline.vue +26 -18
  36. package/src/components/form-group/form-group.vue +2 -2
  37. package/src/components/gesture-indicator/gesture-indicator.scss +1 -1
  38. package/src/components/gesture-indicator/gesture-indicator.vue +4 -4
  39. package/src/components/image/image.vue +12 -5
  40. package/src/components/layout/flex/flex.vue +8 -8
  41. package/src/components/layout/flex-item/flex-item.vue +6 -6
  42. package/src/components/layout/grid/grid.vue +6 -6
  43. package/src/components/layout/grid-item/grid-item.vue +6 -6
  44. package/src/components/modal/modal.scss +1 -1
  45. package/src/components/modal/modal.vue +68 -5
  46. package/src/components/page/page.vue +2 -2
  47. package/src/components/present/present.scss +3 -3
  48. package/src/components/present/present.vue +14 -14
  49. package/src/components/radio/radio/radio.html +1 -1
  50. package/src/components/radio/radio/radio.scss +18 -13
  51. package/src/components/radio/radio/radio.type.ts +1 -1
  52. package/src/components/radio/radio/radio.vue +6 -6
  53. package/src/components/radio/radio-group/radio-group.vue +2 -2
  54. package/src/components/refresher/refresher.html +0 -3
  55. package/src/components/refresher/refresher.scss +1 -25
  56. package/src/components/refresher/refresher.vue +2 -16
  57. package/src/components/route/route-navigator/route-navigator.scss +2 -2
  58. package/src/components/route/route-navigator/route-navigator.vue +10 -13
  59. package/src/components/route/route-wrapper/route-wrapper.composable.ts +5 -15
  60. package/src/components/route/route-wrapper/route-wrapper.type.ts +0 -4
  61. package/src/components/route/route-wrapper/route-wrapper.vue +4 -12
  62. package/src/components/route/route.type.ts +0 -1
  63. package/src/components/segmented-field/segmented-field.html +1 -1
  64. package/src/components/segmented-field/segmented-field.scss +2 -2
  65. package/src/components/segmented-field/segmented-field.vue +8 -8
  66. package/src/components/select/select.html +2 -2
  67. package/src/components/select/select.scss +10 -10
  68. package/src/components/select/select.vue +10 -10
  69. package/src/components/skeleton/skeleton.vue +7 -7
  70. package/src/components/slide-range/slide-range.html +3 -4
  71. package/src/components/slide-range/slide-range.scss +10 -10
  72. package/src/components/slide-range/slide-range.vue +16 -16
  73. package/src/components/switch/switch.html +1 -1
  74. package/src/components/switch/switch.scss +22 -20
  75. package/src/components/switch/switch.type.ts +1 -0
  76. package/src/components/switch/switch.vue +23 -9
  77. package/src/components/tabs/tab/tab.html +1 -1
  78. package/src/components/tabs/tab/tab.scss +13 -0
  79. package/src/components/tabs/tab/tab.vue +4 -2
  80. package/src/components/tabs/tabs/index.ts +1 -0
  81. package/src/components/tabs/tabs/tabs.scss +81 -49
  82. package/src/components/tabs/tabs/tabs.type.ts +5 -1
  83. package/src/components/tabs/tabs/tabs.vue +47 -23
  84. package/src/components/toast/toast/toast.vue +2 -2
  85. package/src/components/toast/toast-content/toast-content.scss +3 -3
  86. package/src/components/toast/toast-content/toast-content.vue +5 -5
  87. package/src/components/toolbar/toolbar.scss +3 -3
  88. package/src/components/toolbar/toolbar.vue +5 -5
  89. package/src/factory.ts +105 -51
  90. package/src/type.ts +2 -1
  91. package/src/utils/style/index.ts +9 -9
  92. package/src/utils/style.md +9 -9
@@ -12,7 +12,31 @@ $tabs-underline-color-active: sass.fn-naming-var("tabs", "underline", "color", "
12
12
  $tabs-underline-color-hover: sass.fn-naming-var("tabs", "underline", "color", "hover");
13
13
  $tabs-underline-color-focus: sass.fn-naming-var("tabs", "underline", "color", "focus");
14
14
  $tabs-underline-color-disabled: sass.fn-naming-var("tabs", "underline", "color", "disabled");
15
- $tabs-underline-background-color: sass.fn-naming-var("tabs", "underline", "background-color");
15
+ $tabs-underline-border-color: sass.fn-naming-var("tabs", "underline", "border-color");
16
+ $tabs-underline-border-color-active: sass.fn-naming-var(
17
+ "tabs",
18
+ "underline",
19
+ "border-color",
20
+ "active"
21
+ );
22
+ $tabs-underline-border-color-hover: sass.fn-naming-var(
23
+ "tabs",
24
+ "underline",
25
+ "border-color",
26
+ "hover"
27
+ );
28
+ $tabs-underline-border-color-focus: sass.fn-naming-var(
29
+ "tabs",
30
+ "underline",
31
+ "border-color",
32
+ "focus"
33
+ );
34
+ $tabs-underline-border-color-disabled: sass.fn-naming-var(
35
+ "tabs",
36
+ "underline",
37
+ "border-color",
38
+ "disabled"
39
+ );
16
40
 
17
41
  // Fill
18
42
  $tabs-fill-color: sass.fn-naming-var("tabs", "fill", "color");
@@ -20,7 +44,6 @@ $tabs-fill-color-active: sass.fn-naming-var("tabs", "fill", "color", "active");
20
44
  $tabs-fill-color-hover: sass.fn-naming-var("tabs", "fill", "color", "hover");
21
45
  $tabs-fill-color-focus: sass.fn-naming-var("tabs", "fill", "color", "focus");
22
46
  $tabs-fill-color-disabled: sass.fn-naming-var("tabs", "fill", "color", "disabled");
23
-
24
47
  $tabs-fill-background-color: sass.fn-naming-var("tabs", "fill", "background-color");
25
48
  $tabs-fill-background-color-active: sass.fn-naming-var(
26
49
  "tabs",
@@ -36,6 +59,11 @@ $tabs-fill-background-color-disabled: sass.fn-naming-var(
36
59
  "background-color",
37
60
  "disabled"
38
61
  );
62
+ $tabs-fill-border-color: sass.fn-naming-var("tabs", "fill", "border-color");
63
+ $tabs-fill-border-color-active: sass.fn-naming-var("tabs", "fill", "border-color", "active");
64
+ $tabs-fill-border-color-hover: sass.fn-naming-var("tabs", "fill", "border-color", "hover");
65
+ $tabs-fill-border-color-focus: sass.fn-naming-var("tabs", "fill", "border-color", "focus");
66
+ $tabs-fill-border-color-disabled: sass.fn-naming-var("tabs", "fill", "border-color", "disabled");
39
67
 
40
68
  // Text
41
69
  $tabs-text-color: sass.fn-naming-var("tabs", "text", "color");
@@ -63,31 +91,29 @@ $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
63
91
  margin: 0;
64
92
  list-style: none;
65
93
  border: none;
66
- transition:
67
- box-shadow #{$transition-duration} ease,
68
- border-color #{$transition-duration} ease,
69
- background-color #{$transition-duration} ease,
70
- color #{$transition-duration} ease,
71
- border-radius #{$transition-duration} ease;
94
+ overflow-y: hidden;
95
+ overflow-x: hidden;
72
96
 
73
97
  > * {
74
98
  z-index: 1;
75
99
  }
76
100
 
77
- &::before {
78
- content: "";
79
- z-index: 1;
80
- display: block;
81
- position: absolute;
82
- top: 0;
83
- left: 0;
84
- width: #{$highlight-width};
85
- height: #{$highlight-height};
86
- transform: translate(#{$highlight-left}, #{$highlight-top});
87
- box-sizing: border-box;
88
- border-radius: calc(
89
- min(#{$highlight-width}, #{$highlight-height}, #{$radius-size}) * #{$radius-ratio}
90
- );
101
+ &:not(.text) {
102
+ &::before {
103
+ content: "";
104
+ z-index: 1;
105
+ display: block;
106
+ position: absolute;
107
+ top: 0;
108
+ left: 0;
109
+ width: #{$highlight-width};
110
+ height: #{$highlight-height};
111
+ transform: translate(#{$highlight-left}, #{$highlight-top});
112
+ box-sizing: border-box;
113
+ border-radius: calc(
114
+ min(#{$highlight-width}, #{$highlight-height}, #{$radius-size}) * #{$radius-ratio}
115
+ );
116
+ }
91
117
  }
92
118
 
93
119
  &.top-start,
@@ -123,6 +149,7 @@ $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
123
149
  width: 100%;
124
150
  padding-top: #{$highlight-space-y};
125
151
  padding-bottom: #{$highlight-space-y};
152
+ overflow-x: auto;
126
153
 
127
154
  > * {
128
155
  height: 100%;
@@ -140,6 +167,7 @@ $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
140
167
  flex-direction: column;
141
168
  width: fit-content;
142
169
  height: 100%;
170
+ overflow-y: auto;
143
171
 
144
172
  > * {
145
173
  width: 100%;
@@ -148,38 +176,39 @@ $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
148
176
 
149
177
  &.underline {
150
178
  &::before {
151
- background-color: rgb(#{$tabs-underline-background-color});
179
+ background-color: rgba(#{$tabs-underline-border-color-active});
152
180
  }
153
181
 
154
182
  :deep(.#{$tab}) {
155
183
  .#{$button} {
156
- color: rgb(#{$tabs-underline-color});
184
+ color: rgba(#{$tabs-underline-color});
185
+ background-color: transparent !important;
157
186
  }
158
187
 
159
188
  &.active {
160
189
  .#{$button} {
161
- color: rgb(#{$tabs-underline-color-active});
190
+ color: rgba(#{$tabs-underline-color-active});
162
191
  }
163
192
  }
164
193
 
165
194
  &:hover,
166
195
  &.hover {
167
196
  .#{$button} {
168
- color: rgb(#{$tabs-underline-color-hover});
197
+ color: rgba(#{$tabs-underline-color-hover});
169
198
  }
170
199
  }
171
200
 
172
201
  &:focus,
173
202
  &.focus {
174
203
  .#{$button} {
175
- color: rgb(#{$tabs-underline-color-focus});
204
+ color: rgba(#{$tabs-underline-color-focus});
176
205
  }
177
206
  }
178
207
 
179
208
  &:disabled,
180
209
  &.disabled {
181
210
  .#{$button} {
182
- color: rgb(#{$tabs-underline-color-disabled});
211
+ color: rgba(#{$tabs-underline-color-disabled});
183
212
  }
184
213
  }
185
214
  }
@@ -187,83 +216,92 @@ $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
187
216
 
188
217
  &.fill {
189
218
  &::before {
190
- background-color: rgb(#{$tabs-fill-background-color});
219
+ background-color: rgba(#{$tabs-fill-background-color-active});
191
220
  }
192
221
 
193
222
  :deep(.#{$tab}) {
194
223
  .#{$button} {
195
- color: rgb(#{$tabs-fill-color});
224
+ color: rgba(#{$tabs-fill-color});
225
+ background-color: rgba(#{$tabs-fill-background-color});
196
226
  }
197
227
 
198
228
  &.active {
199
229
  .#{$button} {
200
- color: rgb(#{$tabs-fill-color-active});
230
+ color: rgba(#{$tabs-fill-color-active});
231
+ background-color: transparent !important;
201
232
  }
202
233
  }
203
234
 
204
235
  &:hover,
205
236
  &.hover {
206
237
  .#{$button} {
207
- color: rgb(#{$tabs-fill-color-hover});
238
+ color: rgba(#{$tabs-fill-color-hover});
239
+ background-color: rgba(#{$tabs-fill-background-color-hover});
208
240
  }
209
241
  }
210
242
 
211
243
  &:focus,
212
244
  &.focus {
213
245
  .#{$button} {
214
- color: rgb(#{$tabs-fill-color-focus});
246
+ color: rgba(#{$tabs-fill-color-focus});
247
+ background-color: rgba(#{$tabs-fill-background-color-focus});
215
248
  }
216
249
  }
217
250
 
218
251
  &:disabled,
219
252
  &.disabled {
220
253
  .#{$button} {
221
- color: rgb(#{$tabs-fill-color-disabled});
254
+ color: rgba(#{$tabs-fill-color-disabled});
255
+ background-color: rgba(#{$tabs-fill-background-color-disabled});
222
256
  }
223
257
  }
224
258
  }
225
259
  }
226
260
 
227
261
  &.text {
228
- &::before {
229
- display: none;
230
- }
231
-
232
262
  :deep(.#{$tab}) {
233
263
  .#{$button} {
234
- color: rgb(#{$tabs-text-color});
264
+ color: rgba(#{$tabs-text-color});
265
+ background-color: transparent;
235
266
  }
236
267
 
237
268
  &.active {
238
269
  .#{$button} {
239
- color: rgb(#{$tabs-text-color-active});
270
+ color: rgba(#{$tabs-text-color-active});
240
271
  }
241
272
  }
242
273
 
243
274
  &:hover,
244
275
  &.hover {
245
276
  .#{$button} {
246
- color: rgb(#{$tabs-text-color-hover});
277
+ color: rgba(#{$tabs-text-color-hover});
247
278
  }
248
279
  }
249
280
 
250
281
  &:focus,
251
282
  &.focus {
252
283
  .#{$button} {
253
- color: rgb(#{$tabs-text-color-focus});
284
+ color: rgba(#{$tabs-text-color-focus});
254
285
  }
255
286
  }
256
287
 
257
288
  &:disabled,
258
289
  &.disabled {
259
290
  .#{$button} {
260
- color: rgb(#{$tabs-text-color-disabled});
291
+ color: rgba(#{$tabs-text-color-disabled});
261
292
  }
262
293
  }
263
294
  }
264
295
  }
265
296
 
266
297
  &.transition {
298
+ transition:
299
+ box-shadow #{$transition-duration} ease,
300
+ border-color #{$transition-duration} ease,
301
+ background-color #{$transition-duration} ease,
302
+ color #{$transition-duration} ease,
303
+ border-radius #{$transition-duration} ease;
304
+
267
305
  &::before {
268
306
  transition:
269
307
  background-color #{$transition-duration} ease,
@@ -297,13 +335,7 @@ $highlight-space-y: sass.fn-naming-var("tabs", "highlight", "space-y");
297
335
  align-items: center;
298
336
 
299
337
  .#{$button} {
300
- color: unset;
301
338
  cursor: pointer;
302
- background-color: transparent !important;
303
- border: none !important;
304
- box-shadow: none !important;
305
- border-radius: 0 !important;
306
- transition: none;
307
339
  }
308
340
  }
309
341
  }
@@ -1,6 +1,8 @@
1
1
  import { ComputedRef } from "vue";
2
+ import { AppSize } from "../../app";
2
3
 
3
4
  export type TabsVariant = "fill" | "underline" | "text";
5
+ export type TabsSize = AppSize;
4
6
  export type TabsPlacement =
5
7
  | "top-start"
6
8
  | "top-end"
@@ -17,10 +19,11 @@ export type TabsProps = {
17
19
  variant?: TabsVariant;
18
20
  role?: string;
19
21
  modelValue?: string;
20
- border?: number;
22
+ border?: number[];
21
23
  margin?: number[];
22
24
  shape?: string;
23
25
  transition?: boolean;
26
+ size?: TabsSize;
24
27
  };
25
28
 
26
29
  export type TabsEmit = {
@@ -31,5 +34,6 @@ export type TabsProviderState = {
31
34
  activeValue: ComputedRef<string>;
32
35
  role: ComputedRef<string>;
33
36
  shape: ComputedRef<string>;
37
+ size: ComputedRef<TabsSize>;
34
38
  setValue: (val: string) => void;
35
39
  };
@@ -3,7 +3,7 @@
3
3
  <script lang="ts" setup>
4
4
  import { computed, inject, nextTick, onMounted, onUnmounted, provide, ref, watch } from "vue";
5
5
  import { type TabsProps, type TabsEmit, type TabsProviderState } from "./tabs.type";
6
- import { property, withPrefix } from "../../../utils";
6
+ import { cssProperty, cssPrefix } from "../../../utils";
7
7
  import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../../app";
8
8
  import { TABS_PROVIDER_STATE_KEY } from "./tabs.constants";
9
9
 
@@ -12,8 +12,9 @@ import { TABS_PROVIDER_STATE_KEY } from "./tabs.constants";
12
12
  const props = withDefaults(defineProps<TabsProps>(), {
13
13
  placement: "top-start",
14
14
  margin: () => [0, 0],
15
- border: 2,
15
+ border: () => [2, 0],
16
16
  transition: true,
17
+ size: "standard",
17
18
  });
18
19
  const emit = defineEmits<TabsEmit>();
19
20
  const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
@@ -25,6 +26,7 @@ const height = ref(0);
25
26
  const top = ref(0);
26
27
  const left = ref(0);
27
28
  const container = ref();
29
+ const isFirstRender = ref(true);
28
30
 
29
31
  // Computed properties
30
32
  // ----------------------------------------------------------------------------
@@ -36,6 +38,10 @@ const shape = computed(() => {
36
38
  return props.shape || appState?.shape.value || "";
37
39
  });
38
40
 
41
+ const size = computed(() => {
42
+ return props.size;
43
+ });
44
+
39
45
  const activeValue = computed(() => {
40
46
  return props.modelValue || "";
41
47
  });
@@ -54,7 +60,7 @@ const tabsAttrs = computed(() => {
54
60
  if (props.variant === "underline") {
55
61
  // Underline variant: align the highlight strip for top vs bottom tab bars
56
62
  if (props.placement.startsWith("top-")) {
57
- t = h - props.border;
63
+ t = h - props.border[0];
58
64
  }
59
65
 
60
66
  if (props.placement.startsWith("bottom-")) {
@@ -62,12 +68,17 @@ const tabsAttrs = computed(() => {
62
68
  }
63
69
 
64
70
  if (props.placement.startsWith("top-") || props.placement.startsWith("bottom-")) {
65
- h = props.border + 0.5;
71
+ h = props.border[0] + 0.5;
72
+
73
+ if (props.border[1]) {
74
+ l += (w - props.border[1]) / 2;
75
+ w = props.border[1];
76
+ }
66
77
  }
67
78
 
68
79
  // Left, Right
69
80
  if (props.placement.startsWith("left-")) {
70
- l = w - props.border;
81
+ l = w - props.border[0];
71
82
  }
72
83
 
73
84
  if (props.placement.startsWith("right-")) {
@@ -75,29 +86,34 @@ const tabsAttrs = computed(() => {
75
86
  }
76
87
 
77
88
  if (props.placement.startsWith("left-") || props.placement.startsWith("right-")) {
78
- w = props.border;
89
+ w = props.border[0];
90
+
91
+ if (props.border[1]) {
92
+ t += (h - props.border[1]) / 2;
93
+ h = props.border[1];
94
+ }
79
95
  }
80
96
  }
81
97
 
82
98
  return {
83
99
  class: [
84
- withPrefix(["layer", "tabs"]),
85
- withPrefix(["role", role.value]),
86
- withPrefix(["shape", shape.value]),
87
- withPrefix("tabs"),
100
+ cssPrefix(["layer", "tabs"]),
101
+ cssPrefix(["role", role.value]),
102
+ cssPrefix(["shape", shape.value]),
103
+ cssPrefix("tabs"),
88
104
  props.variant,
89
105
  props.placement,
90
106
  {
91
- transition: props.transition,
107
+ transition: isFirstRender.value ? false : props.transition,
92
108
  },
93
109
  ],
94
110
  style: {
95
- [property("tabs-highlight-top")]: typeof t === "string" ? t : t + "px",
96
- [property("tabs-highlight-left")]: typeof l === "string" ? l : l + "px",
97
- [property("tabs-highlight-width")]: typeof w === "string" ? w : w + "px",
98
- [property("tabs-highlight-height")]: typeof h === "string" ? h : h + "px",
99
- [property("tabs-highlight-space-x")]: (props.margin[1] > 0 ? props.margin[1] : 0) + "px",
100
- [property("tabs-highlight-space-y")]: (props.margin[0] > 0 ? props.margin[0] : 0) + "px",
111
+ [cssProperty("tabs-highlight-top")]: typeof t === "string" ? t : t + "px",
112
+ [cssProperty("tabs-highlight-left")]: typeof l === "string" ? l : l + "px",
113
+ [cssProperty("tabs-highlight-width")]: typeof w === "string" ? w : w + "px",
114
+ [cssProperty("tabs-highlight-height")]: typeof h === "string" ? h : h + "px",
115
+ [cssProperty("tabs-highlight-space-x")]: (props.margin[1] > 0 ? props.margin[1] : 0) + "px",
116
+ [cssProperty("tabs-highlight-space-y")]: (props.margin[0] > 0 ? props.margin[0] : 0) + "px",
101
117
  },
102
118
  };
103
119
  });
@@ -120,20 +136,27 @@ const calcPosition = () => {
120
136
  }
121
137
  };
122
138
 
139
+ const checkRender = async () => {
140
+ await nextTick();
141
+ calcPosition();
142
+ };
143
+
123
144
  // Lifecycle
124
145
  // ----------------------------------------------------------------------------
125
146
  watch(
126
147
  () => props.modelValue,
127
- async () => {
128
- await nextTick();
129
- calcPosition();
148
+ () => {
149
+ checkRender();
130
150
  }
131
151
  );
132
152
 
133
- onMounted(async () => {
134
- await nextTick();
135
- calcPosition();
153
+ onMounted(() => {
154
+ checkRender();
136
155
  window.addEventListener("resize", calcPosition);
156
+
157
+ setTimeout(() => {
158
+ isFirstRender.value = false;
159
+ }, 500);
137
160
  });
138
161
 
139
162
  onUnmounted(() => {
@@ -146,6 +169,7 @@ provide<TabsProviderState>(TABS_PROVIDER_STATE_KEY, {
146
169
  activeValue,
147
170
  role,
148
171
  shape,
172
+ size,
149
173
  setValue: (val: unknown) => {
150
174
  emit("update:modelValue", val as string);
151
175
  },
@@ -3,7 +3,7 @@
3
3
  <script lang="ts" setup>
4
4
  import { computed } from "vue";
5
5
  import { type ToastProps } from "../toast.type";
6
- import { withPrefix } from "../../../utils";
6
+ import { cssPrefix } from "../../../utils";
7
7
  import { useToast } from "../toast.composable";
8
8
  import { ToastContent } from "../toast-content";
9
9
 
@@ -18,7 +18,7 @@ const toast = useToast();
18
18
  // ----------------------------------------------------------------------------
19
19
  const toastAttrs = computed(() => {
20
20
  return {
21
- class: [withPrefix("toast"), props.placement],
21
+ class: [cssPrefix("toast"), props.placement],
22
22
  };
23
23
  });
24
24
 
@@ -26,9 +26,9 @@ $max-height: sass.fn-naming-var("overlay", "max-height");
26
26
  border-radius #{$transition-duration} ease,
27
27
  opacity #{$transition-duration} ease;
28
28
 
29
- background-color: rgb(#{$toast-background-color});
30
- color: rgb(#{$toast-color});
31
- border-color: rgb(#{$toast-border-color});
29
+ background-color: rgba(#{$toast-background-color});
30
+ color: rgba(#{$toast-color});
31
+ border-color: rgba(#{$toast-border-color});
32
32
  border-width: #{$border-width};
33
33
  border-style: solid;
34
34
  max-height: #{$max-height};
@@ -3,7 +3,7 @@
3
3
  <script lang="ts" setup>
4
4
  import { computed, inject, onMounted, ref } from "vue";
5
5
  import { type ToastContentProps, type ToastContentEmit } from "../toast.type";
6
- import { withPrefix } from "../../../utils";
6
+ import { cssPrefix } from "../../../utils";
7
7
  import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../../app";
8
8
 
9
9
  // Component setup (props, emits, injects)
@@ -27,10 +27,10 @@ const contentAttrs = computed(() => {
27
27
  const shape = props.shape || appState?.shape.value || "";
28
28
  return {
29
29
  class: [
30
- withPrefix(["layer", "toast"]),
31
- withPrefix(["role", role]),
32
- withPrefix(["shape", shape]),
33
- withPrefix("toast-content"),
30
+ cssPrefix(["layer", "toast"]),
31
+ cssPrefix(["role", role]),
32
+ cssPrefix(["shape", shape]),
33
+ cssPrefix("toast-content"),
34
34
  props.variant,
35
35
  {
36
36
  closing: isClosing.value,
@@ -14,11 +14,11 @@ $safe-area-top: sass.fn-naming-var("safe-area", "top");
14
14
  $transition-duration: sass.fn-naming-var("motion", "duration");
15
15
 
16
16
  $border-width: sass.fn-naming-var("stroke", "width");
17
- $border: #{$border-width} solid rgb(#{$toolbar-border-color});
17
+ $border: #{$border-width} solid rgba(#{$toolbar-border-color});
18
18
 
19
19
  .#{$toolbar} {
20
- background-color: rgb(#{$toolbar-background-color});
21
- color: rgb(#{$toolbar-color});
20
+ background-color: rgba(#{$toolbar-background-color});
21
+ color: rgba(#{$toolbar-color});
22
22
  transition:
23
23
  box-shadow #{$transition-duration} ease,
24
24
  border-color #{$transition-duration} ease,
@@ -3,7 +3,7 @@
3
3
  <script lang="ts" setup>
4
4
  import { computed, inject } from "vue";
5
5
  import { type ToolbarProps } from "./toolbar.type";
6
- import { property, withPrefix } from "../../utils";
6
+ import { cssProperty, cssPrefix } from "../../utils";
7
7
  import { type CableProviderState } from "../cable/cable.type";
8
8
  import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../app";
9
9
  import { CABLE_PROVIDER_STATE_KEY } from "../cable";
@@ -27,13 +27,13 @@ const toolbarAttrs = computed(() => {
27
27
 
28
28
  return {
29
29
  class: [
30
- withPrefix(["layer", "toolbar"]),
31
- withPrefix(["role", role]),
32
- withPrefix("toolbar"),
30
+ cssPrefix(["layer", "toolbar"]),
31
+ cssPrefix(["role", role]),
32
+ cssPrefix("toolbar"),
33
33
  placement,
34
34
  {
35
35
  safe: props.safe,
36
- divider: divider.value,
36
+ divider: divider,
37
37
  },
38
38
  ],
39
39
  };