@aggc/ui 0.6.0 → 0.7.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 (50) hide show
  1. package/dist/chunks/{UiSkeleton.vue_vue_type_script_setup_true_lang-B61z8swg.js → UiSkeleton.vue_vue_type_script_setup_true_lang-Dg-HzSqj.js} +285 -285
  2. package/dist/chunks/{pageHeader-D9KF7WOO.js → pageHeader-DhPY_hNA.js} +153 -62
  3. package/dist/components/StatusBadge.styles.d.ts +5 -0
  4. package/dist/components/StatusBadge.vue.d.ts +2 -2
  5. package/dist/components/UiButton.styles.d.ts +31 -1
  6. package/dist/components/UiButton.vue.d.ts +4 -0
  7. package/dist/components/UiCheckbox.styles.d.ts +2 -4
  8. package/dist/components/UiSegmentedControl.styles.d.ts +5 -1
  9. package/dist/components/UiSelect.styles.d.ts +10 -3
  10. package/dist/components/UiSkeleton.styles.d.ts +1 -33
  11. package/dist/components.js +1 -1
  12. package/dist/index.js +2 -2
  13. package/dist/styles/recipes/badge.recipe.d.ts +5 -0
  14. package/dist/styles/recipes/button.recipe.d.ts +31 -1
  15. package/dist/styles/recipes/card.recipe.d.ts +23 -12
  16. package/dist/styles/recipes/dropdown.recipe.d.ts +6 -6
  17. package/dist/styles/recipes/input.recipe.d.ts +0 -3
  18. package/dist/styles.js +118 -92
  19. package/dist/tokens/colors.d.ts +30 -0
  20. package/dist/tokens/core-colors.d.ts +30 -0
  21. package/dist/tokens/motion.d.ts +20 -0
  22. package/dist/tokens/radius.d.ts +9 -0
  23. package/dist/tokens-core.js +21 -5
  24. package/dist/ui.css +312 -207
  25. package/package.json +1 -1
  26. package/src/components/ResultPanel.styles.ts +7 -2
  27. package/src/components/SectionCard.styles.ts +1 -1
  28. package/src/components/StatusBadge.styles.ts +10 -8
  29. package/src/components/StatusBadge.vue +1 -1
  30. package/src/components/UiButton.vue +5 -1
  31. package/src/components/UiCheckbox.styles.ts +7 -11
  32. package/src/components/UiField.styles.ts +2 -2
  33. package/src/components/UiLoadingState.styles.ts +2 -2
  34. package/src/components/UiSegmentedControl.styles.ts +14 -4
  35. package/src/components/UiSelect.styles.ts +24 -10
  36. package/src/components/UiSkeleton.styles.ts +7 -36
  37. package/src/css/base.css +44 -9
  38. package/src/styles/layouts/page.ts +5 -0
  39. package/src/styles/primitives/feedback.ts +1 -0
  40. package/src/styles/primitives/fields.ts +21 -11
  41. package/src/styles/primitives/surfaces.ts +12 -5
  42. package/src/styles/primitives/typography.ts +5 -4
  43. package/src/styles/recipes/badge.recipe.ts +5 -5
  44. package/src/styles/recipes/button.recipe.ts +83 -8
  45. package/src/styles/recipes/card.recipe.ts +24 -13
  46. package/src/styles/recipes/dropdown.recipe.ts +11 -8
  47. package/src/styles/recipes/input.recipe.ts +10 -6
  48. package/src/tokens/core-colors.ts +5 -0
  49. package/src/tokens/motion.ts +8 -0
  50. package/src/tokens/radius.ts +3 -0
@@ -2,14 +2,15 @@ import { css } from "@styled/css";
2
2
 
3
3
  export const surfacePanelClass = css({
4
4
  position: "relative",
5
- overflow: "hidden",
6
5
  borderRadius: "xl",
7
6
  borderWidth: "1px",
8
7
  borderColor: "border.subtle",
9
8
  bg: "bg.card",
10
- boxShadow: "0 1px 3px 0 rgba(15,23,42,0.06)",
9
+ boxShadow: "0 1px 2px 0 rgba(15,23,42,0.04), 0 1px 3px 0 rgba(15,23,42,0.06)",
10
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
11
11
  _dark: {
12
- boxShadow: "0 1px 3px 0 rgba(0,0,0,0.24)",
12
+ borderColor: "border.default",
13
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.2), 0 1px 3px 0 rgba(0,0,0,0.24)",
13
14
  },
14
15
  });
15
16
 
@@ -18,6 +19,10 @@ export const insetPanelClass = css({
18
19
  borderWidth: "1px",
19
20
  borderColor: "border.soft",
20
21
  bg: "bg.cardAlt",
22
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
23
+ _dark: {
24
+ borderColor: "border.subtle",
25
+ },
21
26
  });
22
27
 
23
28
  export const elevatedPanelClass = css({
@@ -25,8 +30,10 @@ export const elevatedPanelClass = css({
25
30
  borderWidth: "1px",
26
31
  borderColor: "border.default",
27
32
  bg: "bg.cardStrong",
28
- boxShadow: "0 2px 8px -2px rgba(15,23,42,0.08)",
33
+ boxShadow: "0 1px 2px 0 rgba(15,23,42,0.04), 0 4px 12px -4px rgba(15,23,42,0.1)",
34
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
29
35
  _dark: {
30
- boxShadow: "0 2px 8px -2px rgba(0,0,0,0.32)",
36
+ borderColor: "border.strong",
37
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.24), 0 4px 12px -4px rgba(0,0,0,0.4)",
31
38
  },
32
39
  });
@@ -3,21 +3,22 @@ import { css } from "@styled/css";
3
3
  export const eyebrowClass = css({
4
4
  fontSize: "xs",
5
5
  textTransform: "uppercase",
6
- letterSpacing: "0.12em",
6
+ letterSpacing: "0.08em",
7
7
  color: "text.muted",
8
- fontWeight: "700",
8
+ fontWeight: "600",
9
9
  });
10
10
 
11
11
  export const sectionTitleClass = css({
12
12
  fontFamily: "heading",
13
13
  fontSize: { base: "2xl", md: "3xl" },
14
- lineHeight: "1",
14
+ lineHeight: "1.1",
15
15
  color: "text.primary",
16
+ textWrap: "balance",
16
17
  });
17
18
 
18
19
  export const sectionDescriptionClass = css({
19
20
  color: "text.secondary",
20
- lineHeight: "1.65",
21
+ lineHeight: "1.6",
21
22
  fontSize: "sm",
22
23
  });
23
24
 
@@ -13,11 +13,6 @@ export const badgeRecipe = cva({
13
13
  fontWeight: "600",
14
14
  lineHeight: "1",
15
15
  whiteSpace: "nowrap",
16
- backdropFilter: "blur(16px) saturate(140%)",
17
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.16)",
18
- _dark: {
19
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.04)",
20
- },
21
16
  },
22
17
  variants: {
23
18
  tone: {
@@ -41,6 +36,11 @@ export const badgeRecipe = cva({
41
36
  bg: "badge.warningBg",
42
37
  color: "badge.warningText",
43
38
  },
39
+ danger: {
40
+ borderColor: "badge.dangerBorder",
41
+ bg: "badge.dangerBg",
42
+ color: "badge.dangerText",
43
+ },
44
44
  },
45
45
  size: {
46
46
  sm: { px: "2.5", py: "1.5", fontSize: "xs" },
@@ -8,14 +8,17 @@ export const buttonRecipe = cva({
8
8
  justifyContent: "center",
9
9
  gap: "2",
10
10
  borderRadius: "lg",
11
- px: "4",
12
- py: "2.5",
13
11
  fontSize: "sm",
14
12
  fontWeight: "600",
15
- letterSpacing: "0.01em",
16
- transition: "background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease",
13
+ letterSpacing: "0.005em",
14
+ transition: "background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1), opacity 160ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
17
15
  userSelect: "none",
18
16
  whiteSpace: "nowrap",
17
+ _focusVisible: {
18
+ outline: "2px solid",
19
+ outlineColor: "text.accent",
20
+ outlineOffset: "2px",
21
+ },
19
22
  },
20
23
  variants: {
21
24
  variant: {
@@ -25,7 +28,7 @@ export const buttonRecipe = cva({
25
28
  borderWidth: "1px",
26
29
  borderColor: "transparent",
27
30
  _dark: {
28
- color: "#f7f9fd",
31
+ color: "text.inverse",
29
32
  },
30
33
  },
31
34
  outline: {
@@ -41,10 +44,40 @@ export const buttonRecipe = cva({
41
44
  borderColor: "badge.infoBorder",
42
45
  },
43
46
  },
47
+ size: {
48
+ sm: {
49
+ px: "3",
50
+ py: "1.5",
51
+ fontSize: "xs",
52
+ borderRadius: "md",
53
+ },
54
+ md: {
55
+ px: "4",
56
+ py: "2.5",
57
+ },
58
+ lg: {
59
+ px: "5",
60
+ py: "3",
61
+ fontSize: "md",
62
+ borderRadius: "xl",
63
+ },
64
+ },
65
+ tone: {
66
+ default: {},
67
+ danger: {
68
+ bg: "text.error",
69
+ color: "text.inverse",
70
+ borderWidth: "1px",
71
+ borderColor: "transparent",
72
+ _dark: {
73
+ color: "text.inverse",
74
+ },
75
+ },
76
+ },
44
77
  disabled: {
45
78
  true: {
46
79
  cursor: "not-allowed",
47
- opacity: 0.5,
80
+ opacity: 0.45,
48
81
  },
49
82
  false: {
50
83
  cursor: "pointer",
@@ -53,24 +86,60 @@ export const buttonRecipe = cva({
53
86
  loading: {
54
87
  true: {
55
88
  cursor: "not-allowed",
56
- opacity: 0.5,
89
+ opacity: 0.45,
57
90
  },
58
91
  },
59
92
  },
60
93
  compoundVariants: [
61
94
  {
62
95
  variant: "solid",
96
+ tone: "default",
63
97
  disabled: false,
64
98
  loading: false,
65
99
  css: {
66
100
  _hover: {
67
101
  bg: "text.accent",
68
- opacity: 0.9,
102
+ boxShadow: "0 2px 8px -2px rgba(49, 94, 255, 0.4)",
103
+ _dark: {
104
+ boxShadow: "0 2px 8px -2px rgba(138, 180, 255, 0.3)",
105
+ },
106
+ },
107
+ },
108
+ },
109
+ {
110
+ variant: "solid",
111
+ tone: "danger",
112
+ disabled: false,
113
+ loading: false,
114
+ css: {
115
+ _hover: {
116
+ bg: "text.error",
117
+ boxShadow: "0 2px 8px -2px rgba(217, 45, 32, 0.4)",
118
+ _dark: {
119
+ boxShadow: "0 2px 8px -2px rgba(255, 142, 127, 0.3)",
120
+ },
121
+ },
122
+ },
123
+ },
124
+ {
125
+ variant: "outline",
126
+ tone: "danger",
127
+ disabled: false,
128
+ loading: false,
129
+ css: {
130
+ color: "text.error",
131
+ borderColor: "border.danger",
132
+ bg: "transparent",
133
+ _hover: {
134
+ bg: "badge.dangerBg",
135
+ borderColor: "text.error",
136
+ color: "text.error",
69
137
  },
70
138
  },
71
139
  },
72
140
  {
73
141
  variant: "outline",
142
+ tone: "default",
74
143
  disabled: false,
75
144
  loading: false,
76
145
  css: {
@@ -78,11 +147,15 @@ export const buttonRecipe = cva({
78
147
  color: "text.primary",
79
148
  borderColor: "border.strong",
80
149
  bg: "bg.cardStrong",
150
+ _dark: {
151
+ bg: "rgba(255, 255, 255, 0.06)",
152
+ },
81
153
  },
82
154
  },
83
155
  },
84
156
  {
85
157
  variant: "subtle",
158
+ tone: "default",
86
159
  disabled: false,
87
160
  loading: false,
88
161
  css: {
@@ -95,6 +168,8 @@ export const buttonRecipe = cva({
95
168
  ],
96
169
  defaultVariants: {
97
170
  variant: "solid",
171
+ size: "md",
172
+ tone: "default",
98
173
  disabled: false,
99
174
  loading: false,
100
175
  },
@@ -4,42 +4,53 @@ export const cardRecipe = cva({
4
4
  base: {
5
5
  minWidth: "0",
6
6
  borderWidth: "1px",
7
- transition: "all 160ms ease",
7
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
8
8
  },
9
9
  variants: {
10
10
  variant: {
11
11
  surface: {
12
12
  position: "relative",
13
- overflow: "hidden",
14
- borderRadius: "3xl",
13
+ borderRadius: "xl",
15
14
  borderColor: "border.subtle",
16
15
  bg: "bg.card",
17
- backdropFilter: "blur(28px) saturate(155%)",
18
- boxShadow: "0 25px 30px -35px rgba(15,23,42,0.42)",
16
+ boxShadow: "0 1px 2px 0 rgba(15,23,42,0.04), 0 1px 3px 0 rgba(15,23,42,0.06)",
17
+ _dark: {
18
+ borderColor: "border.default",
19
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.2), 0 1px 3px 0 rgba(0,0,0,0.24)",
20
+ },
19
21
  },
20
22
  inset: {
21
- borderRadius: "2xl",
23
+ borderRadius: "lg",
22
24
  borderColor: "border.soft",
23
25
  bg: "bg.cardAlt",
24
- backdropFilter: "blur(24px) saturate(145%)",
25
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.22)",
26
+ _dark: {
27
+ borderColor: "border.subtle",
28
+ },
26
29
  },
27
30
  elevated: {
28
- borderRadius: "2xl",
31
+ borderRadius: "lg",
29
32
  borderColor: "border.default",
30
33
  bg: "bg.cardStrong",
31
- backdropFilter: "blur(24px) saturate(145%)",
32
- boxShadow: "0 16px 32px -28px rgba(15,23,42,0.42)",
34
+ boxShadow: "0 1px 2px 0 rgba(15,23,42,0.04), 0 4px 12px -4px rgba(15,23,42,0.1)",
35
+ _dark: {
36
+ borderColor: "border.strong",
37
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.24), 0 4px 12px -4px rgba(0,0,0,0.4)",
38
+ },
33
39
  },
34
40
  selectable: {
35
- borderRadius: "2xl",
41
+ borderRadius: "lg",
36
42
  borderColor: "border.default",
37
43
  bg: "bg.cardAlt",
38
44
  cursor: "pointer",
39
45
  _hover: {
40
46
  borderColor: "border.strong",
41
47
  bg: "bg.card",
42
- transform: "translateY(-1px)",
48
+ },
49
+ _dark: {
50
+ borderColor: "border.strong",
51
+ _hover: {
52
+ borderColor: "border.accent",
53
+ },
43
54
  },
44
55
  },
45
56
  },
@@ -5,14 +5,17 @@ export const dropdownRecipe = cva({
5
5
  borderWidth: "1px",
6
6
  borderColor: "border.subtle",
7
7
  bg: "bg.menu",
8
- backdropFilter: "blur(34px) saturate(165%)",
9
- boxShadow: "0 32px 70px -40px rgba(15,23,42,0.5)",
8
+ boxShadow: "0 4px 16px -4px rgba(15,23,42,0.1), 0 8px 24px -8px rgba(15,23,42,0.08), 0 1px 2px 0 rgba(15,23,42,0.04)",
9
+ _dark: {
10
+ borderColor: "border.default",
11
+ boxShadow: "0 4px 16px -4px rgba(0,0,0,0.32), 0 8px 24px -8px rgba(0,0,0,0.24), 0 1px 2px 0 rgba(0,0,0,0.16)",
12
+ },
10
13
  },
11
14
  variants: {
12
15
  placement: {
13
16
  anchored: {
14
17
  position: "absolute",
15
- top: "calc(100% + 10px)",
18
+ top: "calc(100% + 6px)",
16
19
  left: "0",
17
20
  right: "0",
18
21
  },
@@ -22,15 +25,15 @@ export const dropdownRecipe = cva({
22
25
  },
23
26
  density: {
24
27
  cozy: {
25
- borderRadius: "2xl",
26
- p: "2",
27
- gap: "1",
28
- },
29
- compact: {
30
28
  borderRadius: "xl",
31
29
  p: "1.5",
32
30
  gap: "0.5",
33
31
  },
32
+ compact: {
33
+ borderRadius: "lg",
34
+ p: "1",
35
+ gap: "0.5",
36
+ },
34
37
  },
35
38
  },
36
39
  defaultVariants: {
@@ -8,16 +8,23 @@ export const inputRecipe = cva({
8
8
  bg: "bg.input",
9
9
  color: "text.primary",
10
10
  fontSize: "sm",
11
- backdropFilter: "blur(22px) saturate(145%)",
12
- transition: "border-color 160ms ease, background 160ms ease",
11
+ transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
13
12
  _placeholder: {
14
13
  color: "text.muted",
15
14
  },
16
15
  _hover: {
17
16
  borderColor: "border.strong",
18
17
  },
18
+ _focusVisible: {
19
+ outline: "none",
20
+ borderColor: "border.accent",
21
+ boxShadow: "0 0 0 3px var(--colors-bg-accentSoft, rgba(49, 94, 255, 0.12))",
22
+ },
19
23
  _dark: {
20
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.03)",
24
+ borderColor: "border.strong",
25
+ _focusVisible: {
26
+ boxShadow: "0 0 0 3px var(--colors-bg-accentSoft, rgba(138, 180, 255, 0.14))",
27
+ },
21
28
  },
22
29
  },
23
30
  variants: {
@@ -28,7 +35,6 @@ export const inputRecipe = cva({
28
35
  px: "3",
29
36
  py: "2.5",
30
37
  lineHeight: "1.45",
31
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.2)",
32
38
  },
33
39
  md: {
34
40
  minHeight: "48px",
@@ -36,7 +42,6 @@ export const inputRecipe = cva({
36
42
  px: "4",
37
43
  py: "3",
38
44
  lineHeight: "1.5",
39
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.24), 0 14px 28px -28px rgba(15,23,42,0.42)",
40
45
  },
41
46
  },
42
47
  kind: {
@@ -48,7 +53,6 @@ export const inputRecipe = cva({
48
53
  py: "4",
49
54
  lineHeight: "1.6",
50
55
  fontFamily: "mono",
51
- boxShadow: "inset 0 1px 0 rgba(255,255,255,0.24), 0 18px 36px -32px rgba(15,23,42,0.42)",
52
56
  },
53
57
  },
54
58
  },
@@ -28,6 +28,7 @@ export const coreColorTokens = {
28
28
  menu: { value: { base: "rgba(255, 255, 255, 0.9)", _dark: "rgba(9, 12, 18, 0.99)" } },
29
29
  accentSoft: { value: { base: "rgba(49, 94, 255, 0.1)", _dark: "rgba(138, 180, 255, 0.18)" } },
30
30
  accentStrong: { value: { base: "rgba(49, 94, 255, 0.86)", _dark: "rgba(122, 170, 255, 0.82)" } },
31
+ dangerSoft: { value: { base: "rgba(217, 45, 32, 0.06)", _dark: "rgba(255, 142, 127, 0.08)" } },
31
32
  },
32
33
  border: {
33
34
  soft: { value: { base: "rgba(148, 163, 184, 0.14)", _dark: "rgba(255, 255, 255, 0.035)" } },
@@ -35,6 +36,7 @@ export const coreColorTokens = {
35
36
  default: { value: { base: "rgba(109, 130, 164, 0.28)", _dark: "rgba(255, 255, 255, 0.14)" } },
36
37
  strong: { value: { base: "rgba(80, 98, 127, 0.42)", _dark: "rgba(255, 255, 255, 0.22)" } },
37
38
  accent: { value: { base: "rgba(82, 121, 255, 0.5)", _dark: "rgba(125, 171, 255, 0.44)" } },
39
+ danger: { value: { base: "rgba(217, 45, 32, 0.35)", _dark: "rgba(255, 142, 127, 0.35)" } },
38
40
  },
39
41
  badge: {
40
42
  successBg: { value: { base: "rgba(19, 163, 74, 0.12)", _dark: "rgba(19, 80, 58, 0.7)" } },
@@ -49,5 +51,8 @@ export const coreColorTokens = {
49
51
  neutralBg: { value: { base: "rgba(99, 115, 148, 0.08)", _dark: "rgba(21, 26, 35, 0.92)" } },
50
52
  neutralText: { value: { base: "#4b5d7a", _dark: "#d0d7e4" } },
51
53
  neutralBorder: { value: { base: "rgba(109, 130, 164, 0.18)", _dark: "rgba(183, 195, 215, 0.22)" } },
54
+ dangerBg: { value: { base: "rgba(217, 45, 32, 0.12)", _dark: "rgba(255, 142, 127, 0.15)" } },
55
+ dangerText: { value: { base: "#b42318", _dark: "#ff8e7f" } },
56
+ dangerBorder: { value: { base: "rgba(217, 45, 32, 0.22)", _dark: "rgba(255, 142, 127, 0.3)" } },
52
57
  },
53
58
  } as const;
@@ -1,6 +1,14 @@
1
1
  export const motionTokens = {
2
2
  durations: {
3
+ fast: { value: "100ms" },
3
4
  moderate: { value: "160ms" },
4
5
  emphasized: { value: "240ms" },
6
+ slow: { value: "320ms" },
7
+ },
8
+ easings: {
9
+ default: { value: "cubic-bezier(0.25, 0.1, 0.25, 1)" },
10
+ out: { value: "cubic-bezier(0.16, 1, 0.3, 1)" },
11
+ inOut: { value: "cubic-bezier(0.45, 0, 0.55, 1)" },
12
+ spring: { value: "cubic-bezier(0.34, 1.56, 0.64, 1)" },
5
13
  },
6
14
  } as const;
@@ -1,3 +1,6 @@
1
1
  export const radiusTokens = {
2
+ "2xs": { value: "0.125rem" },
3
+ "3xs": { value: "0.0625rem" },
2
4
  "4xl": { value: "2rem" },
5
+ "5xl": { value: "2.5rem" },
3
6
  } as const;