@warmio/ui 1.4.0 → 2.0.0

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 (51) hide show
  1. package/LICENSES/fluid-functionalism.txt +24 -0
  2. package/README.md +23 -14
  3. package/dist/badge.js +2 -2
  4. package/dist/button.js +4 -1
  5. package/dist/chunks/chunk-A2PN77YE.js +42 -0
  6. package/dist/chunks/chunk-DHV2A22F.js +240 -0
  7. package/dist/chunks/chunk-DOOSH3V6.js +72 -0
  8. package/dist/chunks/chunk-EIEA5RJJ.js +97 -0
  9. package/dist/chunks/chunk-FKGHMPVW.js +875 -0
  10. package/dist/chunks/chunk-K36HD5J5.js +133 -0
  11. package/dist/chunks/chunk-L6L3GVGM.js +130 -0
  12. package/dist/chunks/chunk-MGX6ZL6Q.js +224 -0
  13. package/dist/chunks/chunk-MVUHHKBL.js +492 -0
  14. package/dist/chunks/chunk-PJUNSOJK.js +116 -0
  15. package/dist/chunks/chunk-RVVHR7RY.js +0 -0
  16. package/dist/chunks/chunk-U7D32UN3.js +0 -0
  17. package/dist/chunks/chunk-W24JGQWM.js +65 -0
  18. package/dist/dropdown-menu.js +4 -3
  19. package/dist/entries/badge.css +178 -0
  20. package/dist/entries/button.css +422 -0
  21. package/dist/entries/dropdown-menu.css +167 -0
  22. package/dist/entries/index.css +2789 -0
  23. package/dist/entries/logo.css +147 -0
  24. package/dist/entries/product-header.css +88 -0
  25. package/dist/entries/sheet.css +666 -0
  26. package/dist/entries/sidebar.css +2108 -0
  27. package/dist/entries/text.css +97 -0
  28. package/dist/index.js +17 -13
  29. package/dist/logo.js +2 -2
  30. package/dist/product-header.js +2 -2
  31. package/dist/product-header.types.d.ts +3 -2
  32. package/dist/sheet.js +5 -3
  33. package/dist/sidebar.css +129 -0
  34. package/dist/sidebar.js +7 -3
  35. package/dist/text.css +121 -0
  36. package/dist/text.js +2 -2
  37. package/package.json +15 -5
  38. package/types/badge.d.ts +10 -2
  39. package/types/button.d.ts +65 -9
  40. package/types/sidebar.d.ts +10 -2
  41. package/types/text.d.ts +10 -2
  42. package/dist/chunks/chunk-4RQCHKAW.js +0 -105
  43. package/dist/chunks/chunk-FW2EHGRK.js +0 -748
  44. package/dist/chunks/chunk-GKEYV2XW.js +0 -10
  45. package/dist/chunks/chunk-HDCV4ACN.js +0 -469
  46. package/dist/chunks/chunk-ICC7GQXS.js +0 -74
  47. package/dist/chunks/chunk-KN6WVLCR.js +0 -261
  48. package/dist/chunks/chunk-MIMC4M6W.js +0 -86
  49. package/dist/chunks/chunk-PBWF6BDE.js +0 -88
  50. package/dist/chunks/chunk-VIB7OX7D.js +0 -10
  51. package/dist/chunks/chunk-YTDMREDR.js +0 -201
@@ -0,0 +1,97 @@
1
+ /* ../ui/src/warmio/text/text.css */
2
+ [data-text-variant=heading] {
3
+ font-family: var(--font-sans);
4
+ font-size: var(--type-size-body);
5
+ font-weight: 500;
6
+ line-height: 1.25;
7
+ }
8
+ [data-text-variant=heading][data-text-element=h1] {
9
+ display: block;
10
+ font-size: var(--type-size-display);
11
+ }
12
+ [data-text-variant=heading][data-text-element=h2] {
13
+ font-size: var(--type-size-display);
14
+ }
15
+ [data-text-variant=metric] {
16
+ display: block;
17
+ font-family: var(--font-mono);
18
+ font-size: var(--type-size-display);
19
+ line-height: 1.25;
20
+ }
21
+ [data-text-variant=body] {
22
+ font-size: var(--type-size-body);
23
+ line-height: 1.25;
24
+ }
25
+ [data-text-variant=body][data-text-size=large] {
26
+ font-size: var(--type-size-large);
27
+ }
28
+ [data-text-variant][data-text-size=display] {
29
+ font-size: var(--type-size-display);
30
+ }
31
+ [data-text-variant=caption] {
32
+ font-size: var(--type-size-caption);
33
+ line-height: 1.25;
34
+ }
35
+ [data-mono] {
36
+ font-family: var(--font-mono);
37
+ letter-spacing: normal;
38
+ }
39
+ [data-text-tone=muted] {
40
+ color: var(--muted-foreground);
41
+ }
42
+ [data-text-tone=foreground] {
43
+ color: var(--foreground);
44
+ }
45
+ [data-text-tone=primary] {
46
+ color: var(--primary);
47
+ }
48
+ [data-text-tone=success] {
49
+ color: var(--success);
50
+ }
51
+ [data-text-tone=warning] {
52
+ color: var(--warning);
53
+ }
54
+ [data-text-tone=financeCash] {
55
+ color: var(--finance-cash);
56
+ }
57
+ [data-text-tone=financeDebt] {
58
+ color: var(--finance-debt);
59
+ }
60
+ [data-text-tone=financeInvestment] {
61
+ color: var(--finance-investment);
62
+ }
63
+ [data-text-align=start] {
64
+ text-align: left;
65
+ }
66
+ [data-text-align=center] {
67
+ text-align: center;
68
+ }
69
+ [data-text-align=end] {
70
+ text-align: right;
71
+ }
72
+ :where([data-numeric=true]) {
73
+ font-family: var(--font-mono);
74
+ letter-spacing: normal;
75
+ }
76
+ [data-text-variant][data-text-numeric],
77
+ [data-numeric=true] {
78
+ font-variant-numeric: tabular-nums;
79
+ }
80
+ [data-text-variant][data-text-truncate],
81
+ [data-truncate=true] {
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ white-space: nowrap;
85
+ min-width: 0;
86
+ }
87
+ [data-text-line] {
88
+ display: block;
89
+ }
90
+ [data-presentation=dashboard][data-text-line=first],
91
+ [data-presentation=welcome][data-text-line=second] {
92
+ color: var(--foreground);
93
+ }
94
+ [data-presentation=welcome][data-text-line=first],
95
+ [data-presentation=dashboard][data-text-line=second] {
96
+ color: var(--muted-foreground);
97
+ }
package/dist/index.js CHANGED
@@ -1,14 +1,12 @@
1
+ import "./entries/index.css";
1
2
  import {
2
3
  StackedDisplay,
3
4
  Text
4
- } from "./chunks/chunk-4RQCHKAW.js";
5
+ } from "./chunks/chunk-W24JGQWM.js";
5
6
  import {
6
7
  Badge
7
- } from "./chunks/chunk-ICC7GQXS.js";
8
- import {
9
- Button,
10
- ButtonLink
11
- } from "./chunks/chunk-GKEYV2XW.js";
8
+ } from "./chunks/chunk-A2PN77YE.js";
9
+ import "./chunks/chunk-U7D32UN3.js";
12
10
  import {
13
11
  DropdownMenu,
14
12
  DropdownMenuCheckboxItem,
@@ -21,18 +19,18 @@ import {
21
19
  DropdownMenuRadioItem,
22
20
  DropdownMenuSeparator,
23
21
  DropdownMenuTrigger
24
- } from "./chunks/chunk-KN6WVLCR.js";
22
+ } from "./chunks/chunk-MGX6ZL6Q.js";
25
23
  import {
26
24
  Logo,
27
25
  WarmBrandedLogoLink,
28
26
  WarmBrandedLogoMark,
29
27
  WarmBrandedLogoMarkStatic,
30
28
  WarmLogoIcon
31
- } from "./chunks/chunk-HDCV4ACN.js";
29
+ } from "./chunks/chunk-MVUHHKBL.js";
32
30
  import {
33
31
  ProductHeader,
34
32
  ProductHeaderBreadcrumb
35
- } from "./chunks/chunk-PBWF6BDE.js";
33
+ } from "./chunks/chunk-DOOSH3V6.js";
36
34
  import {
37
35
  SheetClose,
38
36
  SheetContent,
@@ -41,7 +39,7 @@ import {
41
39
  SheetHeader,
42
40
  SheetTitle,
43
41
  SheetTrigger
44
- } from "./chunks/chunk-MIMC4M6W.js";
42
+ } from "./chunks/chunk-PJUNSOJK.js";
45
43
  import {
46
44
  Sidebar,
47
45
  SidebarAccountTrigger,
@@ -60,11 +58,17 @@ import {
60
58
  SidebarProvider,
61
59
  SidebarTrigger,
62
60
  useSidebar
63
- } from "./chunks/chunk-FW2EHGRK.js";
61
+ } from "./chunks/chunk-FKGHMPVW.js";
62
+ import {
63
+ Button,
64
+ ButtonLink
65
+ } from "./chunks/chunk-L6L3GVGM.js";
66
+ import "./chunks/chunk-DHV2A22F.js";
64
67
  import {
65
68
  Sheet
66
- } from "./chunks/chunk-YTDMREDR.js";
67
- import "./chunks/chunk-VIB7OX7D.js";
69
+ } from "./chunks/chunk-EIEA5RJJ.js";
70
+ import "./chunks/chunk-RVVHR7RY.js";
71
+ import "./chunks/chunk-K36HD5J5.js";
68
72
  export {
69
73
  Badge,
70
74
  Button,
package/dist/logo.js CHANGED
@@ -1,11 +1,11 @@
1
+ import "./entries/logo.css";
1
2
  import {
2
3
  Logo,
3
4
  WarmBrandedLogoLink,
4
5
  WarmBrandedLogoMark,
5
6
  WarmBrandedLogoMarkStatic,
6
7
  WarmLogoIcon
7
- } from "./chunks/chunk-HDCV4ACN.js";
8
- import "./chunks/chunk-VIB7OX7D.js";
8
+ } from "./chunks/chunk-MVUHHKBL.js";
9
9
  export {
10
10
  Logo,
11
11
  WarmBrandedLogoLink,
@@ -1,8 +1,8 @@
1
+ import "./entries/product-header.css";
1
2
  import {
2
3
  ProductHeader,
3
4
  ProductHeaderBreadcrumb
4
- } from "./chunks/chunk-PBWF6BDE.js";
5
- import "./chunks/chunk-VIB7OX7D.js";
5
+ } from "./chunks/chunk-DOOSH3V6.js";
6
6
  export {
7
7
  ProductHeader,
8
8
  ProductHeaderBreadcrumb
@@ -1,10 +1,11 @@
1
- import type { ReactNode, Ref } from 'react';
1
+ import type { ReactNode, Ref } from "react";
2
2
 
3
- export type ProductHeaderVisibility = 'always' | 'container' | 'desktop';
3
+ export type ProductHeaderVisibility = "always" | "container" | "desktop";
4
4
 
5
5
  export interface ProductHeaderBreadcrumbProps {
6
6
  pageTitle?: string | undefined;
7
7
  productName?: string | undefined;
8
+ homeHref?: string | undefined;
8
9
  }
9
10
 
10
11
  export interface ProductHeaderProps extends ProductHeaderBreadcrumbProps {
package/dist/sheet.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "./entries/sheet.css";
1
2
  import {
2
3
  SheetClose,
3
4
  SheetContent,
@@ -6,11 +7,12 @@ import {
6
7
  SheetHeader,
7
8
  SheetTitle,
8
9
  SheetTrigger
9
- } from "./chunks/chunk-MIMC4M6W.js";
10
+ } from "./chunks/chunk-PJUNSOJK.js";
10
11
  import {
11
12
  Sheet
12
- } from "./chunks/chunk-YTDMREDR.js";
13
- import "./chunks/chunk-VIB7OX7D.js";
13
+ } from "./chunks/chunk-EIEA5RJJ.js";
14
+ import "./chunks/chunk-RVVHR7RY.js";
15
+ import "./chunks/chunk-K36HD5J5.js";
14
16
  export {
15
17
  Sheet,
16
18
  SheetClose,
@@ -0,0 +1,129 @@
1
+ [data-sidebar-navigation-collapsed] {
2
+ display: none;
3
+ }
4
+
5
+ @media (width >= 48rem) and (width < 80rem) {
6
+ [data-force-icon-at-tablet='true'] [data-sidebar-navigation-expanded] {
7
+ display: none;
8
+ }
9
+
10
+ [data-force-icon-at-tablet='true'] [data-sidebar-navigation-collapsed] {
11
+ display: block;
12
+ }
13
+
14
+ [data-force-icon-at-tablet='true']
15
+ [data-slot='sidebar'][data-variant='floating']
16
+ [data-slot='sidebar-gap'],
17
+ [data-force-icon-at-tablet='true']
18
+ [data-slot='sidebar'][data-variant='inset']
19
+ [data-slot='sidebar-gap'] {
20
+ width: calc(var(--sidebar-width-icon) + (var(--spacing) * 8) + 2px);
21
+ transition: width var(--motion-duration-slow) linear;
22
+ }
23
+
24
+ [data-force-icon-at-tablet='true']
25
+ [data-slot='sidebar'][data-variant='floating']
26
+ [data-slot='sidebar-container'],
27
+ [data-force-icon-at-tablet='true']
28
+ [data-slot='sidebar'][data-variant='inset']
29
+ [data-slot='sidebar-container'] {
30
+ width: calc(var(--sidebar-width-icon) + (var(--spacing) * 8) + 2px);
31
+ padding: calc(var(--spacing) * 4);
32
+ transition: width var(--motion-duration-slow) linear;
33
+ }
34
+
35
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-content'] {
36
+ overflow: hidden;
37
+ }
38
+
39
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-group'] {
40
+ align-items: center;
41
+ padding-inline: calc(var(--spacing) * 2);
42
+ }
43
+
44
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-group-label'] {
45
+ display: none;
46
+ }
47
+
48
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-menu'] {
49
+ gap: calc(var(--spacing) * 2);
50
+ }
51
+
52
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-menu-item'] {
53
+ display: flex;
54
+ width: 100%;
55
+ justify-content: center;
56
+ }
57
+
58
+ [data-force-icon-at-tablet='true']
59
+ [data-slot='sidebar-menu-button']:not([data-presentation='sidebarIcon']) {
60
+ width: calc(var(--spacing) * 8);
61
+ height: calc(var(--spacing) * 8);
62
+ margin-inline: auto;
63
+ justify-content: center;
64
+ gap: 0;
65
+ padding: calc(var(--spacing) * 2);
66
+ }
67
+
68
+ [data-force-icon-at-tablet='true']
69
+ [data-slot='sidebar-menu-button']
70
+ > span:not([aria-hidden='true']),
71
+ [data-force-icon-at-tablet='true']
72
+ [data-slot='sidebar-menu-button']
73
+ [data-slot='sidebar-account-label'],
74
+ [data-force-icon-at-tablet='true']
75
+ [data-slot='sidebar-menu-button']
76
+ [data-slot='sidebar-account-email'],
77
+ [data-force-icon-at-tablet='true'] [data-sidebar-account-chevron],
78
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-menu-badge'] {
79
+ display: none;
80
+ }
81
+
82
+ [data-force-icon-at-tablet='true'] [data-slot='sidebar-brand'] {
83
+ justify-content: center;
84
+ padding-inline: 0;
85
+ }
86
+
87
+ [data-force-icon-at-tablet='true'] [data-sidebar-brand-mark] {
88
+ width: calc(var(--spacing) * 8);
89
+ height: calc(var(--spacing) * 8);
90
+ }
91
+
92
+ [data-force-icon-at-tablet='true'] [data-sidebar-brand-mark] > :first-child {
93
+ width: calc(var(--spacing) * 8);
94
+ height: calc(var(--spacing) * 8);
95
+ opacity: 0;
96
+ }
97
+
98
+ [data-force-icon-at-tablet='true'] [data-sidebar-brand-collapsed] {
99
+ display: flex;
100
+ }
101
+
102
+ [data-force-icon-at-tablet='true'] [data-sidebar-utility-controls] {
103
+ flex-direction: column;
104
+ align-items: center;
105
+ justify-content: center;
106
+ gap: calc(var(--spacing) * 2);
107
+ }
108
+
109
+ [data-force-icon-at-tablet='true'] [data-sidebar-account-collapsed] {
110
+ display: flex;
111
+ justify-content: center;
112
+ }
113
+
114
+ [data-force-icon-at-tablet='true'] [data-sidebar-account-expanded] {
115
+ display: none;
116
+ }
117
+ }
118
+
119
+ [data-visually-hidden] {
120
+ position: absolute;
121
+ width: 1px;
122
+ height: 1px;
123
+ padding: 0;
124
+ margin: -1px;
125
+ overflow: hidden;
126
+ clip-path: inset(50%);
127
+ white-space: nowrap;
128
+ border-width: 0;
129
+ }
package/dist/sidebar.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "./entries/sidebar.css";
1
2
  import {
2
3
  Sidebar,
3
4
  SidebarAccountTrigger,
@@ -16,9 +17,12 @@ import {
16
17
  SidebarProvider,
17
18
  SidebarTrigger,
18
19
  useSidebar
19
- } from "./chunks/chunk-FW2EHGRK.js";
20
- import "./chunks/chunk-YTDMREDR.js";
21
- import "./chunks/chunk-VIB7OX7D.js";
20
+ } from "./chunks/chunk-FKGHMPVW.js";
21
+ import "./chunks/chunk-L6L3GVGM.js";
22
+ import "./chunks/chunk-DHV2A22F.js";
23
+ import "./chunks/chunk-EIEA5RJJ.js";
24
+ import "./chunks/chunk-RVVHR7RY.js";
25
+ import "./chunks/chunk-K36HD5J5.js";
22
26
  export {
23
27
  Sidebar,
24
28
  SidebarAccountTrigger,
package/dist/text.css ADDED
@@ -0,0 +1,121 @@
1
+ [data-text-variant='heading'] {
2
+ font-family: var(--font-sans);
3
+ font-size: var(--type-size-body);
4
+ font-weight: 500;
5
+ line-height: 1.25;
6
+ }
7
+
8
+ [data-text-variant='heading'][data-text-element='h1'] {
9
+ display: block;
10
+ font-size: var(--type-size-display);
11
+ }
12
+
13
+ [data-text-variant='heading'][data-text-element='h2'] {
14
+ font-size: var(--type-size-display);
15
+ }
16
+
17
+ [data-text-variant='metric'] {
18
+ display: block;
19
+ font-family: var(--font-mono);
20
+ font-size: var(--type-size-display);
21
+ line-height: 1.25;
22
+ }
23
+
24
+ [data-text-variant='body'] {
25
+ font-size: var(--type-size-body);
26
+ line-height: 1.25;
27
+ }
28
+
29
+ [data-text-variant='body'][data-text-size='large'] {
30
+ font-size: var(--type-size-large);
31
+ }
32
+
33
+ [data-text-variant][data-text-size='display'] {
34
+ font-size: var(--type-size-display);
35
+ }
36
+
37
+ [data-text-variant='caption'] {
38
+ font-size: var(--type-size-caption);
39
+ line-height: 1.25;
40
+ }
41
+
42
+ [data-mono] {
43
+ font-family: var(--font-mono);
44
+ letter-spacing: normal;
45
+ }
46
+
47
+ [data-text-tone='muted'] {
48
+ color: var(--muted-foreground);
49
+ }
50
+
51
+ [data-text-tone='foreground'] {
52
+ color: var(--foreground);
53
+ }
54
+
55
+ [data-text-tone='primary'] {
56
+ color: var(--primary);
57
+ }
58
+
59
+ [data-text-tone='success'] {
60
+ color: var(--success);
61
+ }
62
+
63
+ [data-text-tone='warning'] {
64
+ color: var(--warning);
65
+ }
66
+
67
+ [data-text-tone='financeCash'] {
68
+ color: var(--finance-cash);
69
+ }
70
+
71
+ [data-text-tone='financeDebt'] {
72
+ color: var(--finance-debt);
73
+ }
74
+
75
+ [data-text-tone='financeInvestment'] {
76
+ color: var(--finance-investment);
77
+ }
78
+
79
+ [data-text-align='start'] {
80
+ text-align: left;
81
+ }
82
+
83
+ [data-text-align='center'] {
84
+ text-align: center;
85
+ }
86
+
87
+ [data-text-align='end'] {
88
+ text-align: right;
89
+ }
90
+
91
+ :where([data-numeric='true']) {
92
+ font-family: var(--font-mono);
93
+ letter-spacing: normal;
94
+ }
95
+
96
+ [data-text-variant][data-text-numeric],
97
+ [data-numeric='true'] {
98
+ font-variant-numeric: tabular-nums;
99
+ }
100
+
101
+ [data-text-variant][data-text-truncate],
102
+ [data-truncate='true'] {
103
+ overflow: hidden;
104
+ text-overflow: ellipsis;
105
+ white-space: nowrap;
106
+ min-width: 0;
107
+ }
108
+
109
+ [data-text-line] {
110
+ display: block;
111
+ }
112
+
113
+ [data-presentation='dashboard'][data-text-line='first'],
114
+ [data-presentation='welcome'][data-text-line='second'] {
115
+ color: var(--foreground);
116
+ }
117
+
118
+ [data-presentation='welcome'][data-text-line='first'],
119
+ [data-presentation='dashboard'][data-text-line='second'] {
120
+ color: var(--muted-foreground);
121
+ }
package/dist/text.js CHANGED
@@ -1,8 +1,8 @@
1
+ import "./entries/text.css";
1
2
  import {
2
3
  StackedDisplay,
3
4
  Text
4
- } from "./chunks/chunk-4RQCHKAW.js";
5
- import "./chunks/chunk-VIB7OX7D.js";
5
+ } from "./chunks/chunk-W24JGQWM.js";
6
6
  export {
7
7
  StackedDisplay,
8
8
  Text
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@warmio/ui",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "description": "Portable, sealed React components for Warm products.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "sideEffects": false,
7
+ "sideEffects": [
8
+ "./dist/*.css",
9
+ "./dist/*.js",
10
+ "./dist/entries/*.css",
11
+ "./dist/chunks/*.css"
12
+ ],
8
13
  "repository": {
9
14
  "type": "git",
10
15
  "url": "git+https://github.com/jasonstockman/warm-app.git",
@@ -17,7 +22,8 @@
17
22
  "files": [
18
23
  "dist",
19
24
  "types",
20
- "README.md"
25
+ "README.md",
26
+ "LICENSES"
21
27
  ],
22
28
  "exports": {
23
29
  ".": {
@@ -55,6 +61,8 @@
55
61
  "import": "./dist/sidebar.js",
56
62
  "default": "./dist/sidebar.js"
57
63
  },
64
+ "./sidebar.css": "./dist/sidebar.css",
65
+ "./entries/*": "./dist/entries/*",
58
66
  "./sheet": {
59
67
  "types": "./types/sheet.d.ts",
60
68
  "import": "./dist/sheet.js",
@@ -64,15 +72,17 @@
64
72
  "types": "./types/text.d.ts",
65
73
  "import": "./dist/text.js",
66
74
  "default": "./dist/text.js"
67
- }
75
+ },
76
+ "./text.css": "./dist/text.css"
68
77
  },
69
78
  "peerDependencies": {
70
79
  "@base-ui/react": ">=1.6.0 <2.0.0",
71
- "@warmio/design": "1.6.0",
80
+ "@warmio/design": "2.0.0",
72
81
  "class-variance-authority": "^0.7.1",
73
82
  "clsx": "^2.1.1",
74
83
  "cuelume": "0.1.0",
75
84
  "lucide-react": ">=0.562.0 <2.0.0",
85
+ "motion": "^12.42.2",
76
86
  "react": ">=19.0.0",
77
87
  "react-dom": ">=19.0.0",
78
88
  "tailwind-merge": ">=3.6.0 <4.0.0"
package/types/badge.d.ts CHANGED
@@ -4,19 +4,27 @@ import type { AriaAttributes, ReactNode } from 'react';
4
4
  export type FeedbackTone = 'default' | 'info' | 'success' | 'warning' | 'destructive';
5
5
  export type FeedbackSize = 'sm' | 'default';
6
6
 
7
- export type BadgeProps = {
7
+ export type BadgeToneProps = {
8
8
  tone?: FeedbackTone;
9
9
  size?: FeedbackSize;
10
10
  shape?: 'pill' | 'circle';
11
+ emphasis?: 'subtle' | 'solid';
12
+ };
13
+
14
+ export type BadgeLayoutProps = {
11
15
  surface?: 'default' | 'floating';
12
16
  placement?: 'inline' | 'top-end';
13
- emphasis?: 'subtle' | 'solid';
14
17
  width?: 'auto' | 'metric' | 'compact';
15
18
  truncate?: boolean;
19
+ };
20
+
21
+ export type BadgeContentProps = {
16
22
  children?: ReactNode;
17
23
  numeric?: boolean;
18
24
  id?: string;
19
25
  'aria-label'?: AriaAttributes['aria-label'];
20
26
  };
21
27
 
28
+ export type BadgeProps = BadgeToneProps & BadgeLayoutProps & BadgeContentProps;
29
+
22
30
  export declare function Badge(props: BadgeProps): ReactNode;
package/types/button.d.ts CHANGED
@@ -1,9 +1,65 @@
1
- export {
2
- Button,
3
- ButtonLink,
4
- type ButtonLinkProps,
5
- type ButtonPresentation,
6
- type ButtonProps,
7
- type ButtonSize,
8
- type ButtonVariant,
9
- } from '@warmio/design/button';
1
+ import type {
2
+ AnchorHTMLAttributes,
3
+ ButtonHTMLAttributes,
4
+ ForwardRefExoticComponent,
5
+ RefAttributes,
6
+ } from 'react';
7
+
8
+ export type ButtonPresentation =
9
+ | 'assistantIcon'
10
+ | 'assistantRoundIcon'
11
+ | 'composerIcon'
12
+ | 'default'
13
+ | 'headerAction'
14
+ | 'compact'
15
+ | 'controlPeer'
16
+ | 'editPill'
17
+ | 'hero'
18
+ | 'menuOption'
19
+ | 'promptCategory'
20
+ | 'promptOption'
21
+ | 'sidebarIcon'
22
+ | 'tableHeader'
23
+ | 'tableHeaderLink'
24
+ | 'threadMore'
25
+ | 'threadNew'
26
+ | 'touch';
27
+
28
+ export type ButtonVariant = 'default' | 'outline' | 'ghost' | 'destructive' | 'apple' | 'arrow';
29
+
30
+ export type ButtonSize = 'compact' | 'default' | 'jumbo' | 'icon';
31
+
32
+ export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> & {
33
+ asChild?: never;
34
+ className?: never;
35
+ presentation?: ButtonPresentation;
36
+ render?: never;
37
+ size?: ButtonSize;
38
+ style?: never;
39
+ variant?: ButtonVariant;
40
+ width?: 'full';
41
+ };
42
+
43
+ export type ButtonLinkProps = Omit<
44
+ AnchorHTMLAttributes<HTMLAnchorElement>,
45
+ 'className' | 'disabled' | 'style'
46
+ > & {
47
+ href: string;
48
+ presentation?: ButtonPresentation;
49
+ size?: ButtonSize;
50
+ variant?: ButtonVariant;
51
+ width?: 'full';
52
+ asChild?: never;
53
+ className?: never;
54
+ disabled?: never;
55
+ render?: never;
56
+ style?: never;
57
+ };
58
+
59
+ export declare const Button: ForwardRefExoticComponent<
60
+ ButtonProps & RefAttributes<HTMLButtonElement>
61
+ >;
62
+
63
+ export declare const ButtonLink: ForwardRefExoticComponent<
64
+ ButtonLinkProps & RefAttributes<HTMLAnchorElement>
65
+ >;