horizon-design 0.0.4 → 0.0.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.
@@ -23,17 +23,18 @@
23
23
  } as const;
24
24
 
25
25
  const sizes = {
26
- xs: 'h-6 gap-1.5 px-2 text-xs rounded-md [&_svg:not([class*="size-"])]:size-2.5',
27
- sm: 'h-7 px-2.5 gap-1.5 rounded-md [&_svg:not([class*="size-"])]:size-3.5',
28
- md: 'h-8 px-3 py-2 rounded-md',
29
- lg: 'h-9 px-3.5 rounded-lg',
30
- xl: 'h-10 text-base px-4 rounded-lg',
31
- 'icon-xs': 'size-6 rounded-md',
32
- 'icon-sm': 'size-7 rounded-md',
33
- 'icon-md': 'size-8 rounded-md',
34
- 'icon-lg': 'size-9 rounded-lg',
35
- 'icon-xl': 'size-10 rounded-lg [&_svg:not([class*="size-"])]:size-5'
36
- } as const;
26
+ xs: 'inline-flex items-center justify-center h-6 gap-1.5 px-2 text-xs rounded-md [&_svg:not([class*="size-"])]:size-2.5',
27
+ sm: 'inline-flex items-center justify-center h-7 px-2.5 gap-1.5 rounded-md [&_svg:not([class*="size-"])]:size-3.5',
28
+ md: 'inline-flex items-center justify-center h-8 px-3 py-2 rounded-md',
29
+ lg: 'inline-flex items-center justify-center h-9 px-3.5 rounded-lg',
30
+ xl: 'inline-flex items-center justify-center h-10 text-base px-4 rounded-lg',
31
+ 'icon-xs': 'inline-grid place-content-center size-6 rounded-md',
32
+ 'icon-sm': 'inline-grid place-content-center size-7 rounded-md',
33
+ 'icon-md': 'inline-grid place-content-center size-8 rounded-md',
34
+ 'icon-lg': 'inline-grid place-content-center size-9 rounded-lg',
35
+ 'icon-xl':
36
+ 'inline-grid place-content-center size-10 rounded-lg [&_svg:not([class*="size-"])]:size-5'
37
+ };
37
38
 
38
39
  type Variant = keyof typeof variants;
39
40
  type Size = keyof typeof sizes;
@@ -51,7 +52,7 @@
51
52
  }
52
53
 
53
54
  const base =
54
- 'inline-grid shrink-0 place-content-center whitespace-nowrap font-medium text-sm transition-[background-color,border-color,color,opacity,transform,box-shadow] duration-200 ease-out outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-60 [&_svg:not([class*="size-"])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0';
55
+ 'shrink-0 whitespace-nowrap font-medium text-sm transition-[background-color,border-color,color,opacity,transform,box-shadow] duration-200 ease-out outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-60 [&_svg:not([class*="size-"])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0';
55
56
 
56
57
  let {
57
58
  variant = 'default',
@@ -85,7 +86,7 @@
85
86
  disabled={isLoading || disabled}
86
87
  {...rest}
87
88
  >
88
- <span class="flex items-center justify-center gap-2">
89
+ <span class="flex items-center justify-center gap-2 w-full">
89
90
  {#if isLoading}
90
91
  <Spinner aria-hidden="true" />
91
92
  {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "horizon-design",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/horizon-engine/horizon-design"