@revojs/ui 0.2.62 → 0.2.64

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.
@@ -3,7 +3,7 @@ export type NotificationVariant = "error" | "attention" | "success" | "info";
3
3
  export interface NotificationProps {
4
4
  label?: string;
5
5
  subtext?: string;
6
- icon?: IconComponent;
6
+ icon?: IconComponent | null;
7
7
  variant?: NotificationVariant;
8
8
  announce?: boolean;
9
9
  }
@@ -1,6 +1,6 @@
1
1
  import type { IconComponent } from "./icon";
2
2
  export type TabsValue = string | number;
3
- export type TabsSize = "md" | "xs";
3
+ export type TabsSize = "md" | "sm" | "xs";
4
4
  export type TabsOrientation = "horizontal" | "vertical";
5
5
  export type TabsActivation = "automatic" | "manual";
6
6
  export interface TabsItem<Value extends TabsValue = TabsValue> {
@@ -1,7 +1,7 @@
1
1
  import type { IconComponent } from "./icon";
2
2
  import type { RovingFocusOrientation } from "./roving-focus";
3
3
  export type ToggleGroupValue = string | number;
4
- export type ToggleGroupSize = "md" | "xs";
4
+ export type ToggleGroupSize = "md" | "sm" | "xs";
5
5
  export interface ToggleGroupItem<Value extends ToggleGroupValue = ToggleGroupValue> {
6
6
  value: Value;
7
7
  label?: string;
@@ -1,10 +1,15 @@
1
1
  <template>
2
2
  <div
3
3
  :role="announce ? (variant === 'error' ? 'alert' : 'status') : undefined"
4
- class="grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-3 gap-y-3 rounded-ui border p-3 text-sm"
5
- :class="[variants[variant], $slots.actions ? 'sm:grid-cols-[auto_minmax(0,1fr)_auto]' : '']"
4
+ class="grid items-start gap-x-3 gap-y-3 rounded-ui border p-3 text-sm"
5
+ :class="[
6
+ variants[variant],
7
+ icon === null ? 'grid-cols-[minmax(0,1fr)]' : 'grid-cols-[auto_minmax(0,1fr)]',
8
+ $slots.actions && icon === null ? 'sm:grid-cols-[minmax(0,1fr)_auto]' : '',
9
+ $slots.actions && icon !== null ? 'sm:grid-cols-[auto_minmax(0,1fr)_auto]' : '',
10
+ ]"
6
11
  >
7
- <Stack gap="0" class="shrink-0">
12
+ <Stack v-if="icon !== null" gap="0" class="shrink-0">
8
13
  <slot name="icon">
9
14
  <Icon :is="icon ?? icons[variant]" :size="20" />
10
15
  </slot>
@@ -24,7 +29,8 @@
24
29
  align="center"
25
30
  gap="1"
26
31
  wrap
27
- class="col-start-2 sm:col-start-auto"
32
+ class="self-center"
33
+ :class="icon === null ? '' : 'col-start-2 sm:col-start-auto'"
28
34
  >
29
35
  <slot name="actions" />
30
36
  </Stack>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revojs/ui",
3
- "version": "0.2.62",
3
+ "version": "0.2.64",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",