@seed-design/css 0.1.13 → 0.1.15

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 (45) hide show
  1. package/all.css +3734 -3447
  2. package/all.min.css +1 -1
  3. package/base.css +111 -70
  4. package/base.min.css +1 -1
  5. package/package.json +2 -2
  6. package/recipes/badge.css +42 -29
  7. package/recipes/badge.d.ts +4 -2
  8. package/recipes/badge.mjs +31 -4
  9. package/recipes/inline-banner.css +1 -2
  10. package/recipes/page-banner.css +246 -0
  11. package/recipes/page-banner.d.ts +28 -0
  12. package/recipes/page-banner.mjs +108 -0
  13. package/recipes/snackbar.css +1 -0
  14. package/vars/color/bg.d.ts +9 -6
  15. package/vars/color/bg.mjs +9 -6
  16. package/vars/color/fg.d.ts +6 -4
  17. package/vars/color/fg.mjs +6 -4
  18. package/vars/color/manner-temp/l1.d.ts +2 -2
  19. package/vars/color/manner-temp/l1.mjs +2 -2
  20. package/vars/color/manner-temp/l2.d.ts +2 -2
  21. package/vars/color/manner-temp/l2.mjs +2 -2
  22. package/vars/color/manner-temp/l3.d.ts +2 -2
  23. package/vars/color/manner-temp/l3.mjs +2 -2
  24. package/vars/color/manner-temp/l4.d.ts +2 -2
  25. package/vars/color/manner-temp/l4.mjs +2 -2
  26. package/vars/color/manner-temp/l5.d.ts +2 -2
  27. package/vars/color/manner-temp/l5.mjs +2 -2
  28. package/vars/color/manner-temp/l6.d.ts +2 -2
  29. package/vars/color/manner-temp/l6.mjs +2 -2
  30. package/vars/color/stroke.d.ts +5 -4
  31. package/vars/color/stroke.mjs +5 -4
  32. package/vars/component/badge.d.ts +34 -2
  33. package/vars/component/badge.mjs +34 -2
  34. package/vars/component/index.d.ts +1 -0
  35. package/vars/component/index.mjs +1 -0
  36. package/vars/component/page-banner.d.ts +309 -0
  37. package/vars/component/page-banner.mjs +309 -0
  38. package/vars/component/snackbar.d.ts +1 -0
  39. package/vars/component/snackbar.mjs +1 -0
  40. package/vars/font-size.d.ts +8 -1
  41. package/vars/font-size.mjs +8 -1
  42. package/vars/gradient.d.ts +3 -3
  43. package/vars/gradient.mjs +3 -3
  44. package/vars/line-height.d.ts +11 -1
  45. package/vars/line-height.mjs +11 -1
package/recipes/badge.css CHANGED
@@ -1,15 +1,20 @@
1
- .seed-badge {
1
+ .seed-badge__root {
2
2
  display: inline-flex;
3
3
  box-sizing: border-box;
4
4
  align-items: center;
5
- justify-content: center;
6
5
  text-transform: none;
7
6
  text-align: start;
8
7
  -webkit-font-smoothing: antialiased;
9
8
  -moz-osx-font-smoothing: grayscale;
10
9
  text-decoration: none
11
10
  }
12
- .seed-badge--size_medium {
11
+ .seed-badge__label {
12
+ overflow: hidden;
13
+ text-overflow: ellipsis;
14
+ white-space: nowrap
15
+ }
16
+ .seed-badge__root--size_medium {
17
+ max-width: 7.5rem;
13
18
  min-height: var(--seed-dimension-x5);
14
19
  padding-inline: var(--seed-dimension-x1_5);
15
20
  padding-block: var(--seed-dimension-x0_5);
@@ -17,7 +22,8 @@
17
22
  font-size: var(--seed-font-size-t1);
18
23
  line-height: var(--seed-line-height-t1)
19
24
  }
20
- .seed-badge--size_large {
25
+ .seed-badge__root--size_large {
26
+ max-width: 6.75rem;
21
27
  min-height: var(--seed-dimension-x6);
22
28
  padding-inline: var(--seed-dimension-x2);
23
29
  padding-block: var(--seed-dimension-x1);
@@ -25,77 +31,84 @@
25
31
  font-size: var(--seed-font-size-t2);
26
32
  line-height: var(--seed-line-height-t2)
27
33
  }
28
- .seed-badge--variant_weak {
34
+ .seed-badge__root--variant_weak {
29
35
  font-weight: var(--seed-font-weight-medium)
30
36
  }
31
- .seed-badge--variant_solid {
37
+ .seed-badge__root--variant_solid {
32
38
  font-weight: var(--seed-font-weight-bold)
33
39
  }
34
- .seed-badge--variant_outline {
40
+ .seed-badge__root--variant_outline {
35
41
  font-weight: var(--seed-font-weight-bold)
36
42
  }
37
- .seed-badge--tone_neutral {}
38
- .seed-badge--tone_brand {}
39
- .seed-badge--tone_informative {}
40
- .seed-badge--tone_positive {}
41
- .seed-badge--tone_critical {}
42
- .seed-badge--tone_neutral-variant_weak {
43
+ .seed-badge__root--tone_neutral-variant_weak {
43
44
  background-color: var(--seed-color-bg-neutral-weak);
44
45
  color: var(--seed-color-fg-neutral-muted)
45
46
  }
46
- .seed-badge--tone_neutral-variant_solid {
47
+ .seed-badge__root--tone_neutral-variant_solid {
47
48
  background-color: var(--seed-color-palette-gray-800);
48
49
  color: var(--seed-color-fg-neutral-inverted)
49
50
  }
50
- .seed-badge--tone_neutral-variant_outline {
51
+ .seed-badge__root--tone_neutral-variant_outline {
51
52
  box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral);
52
53
  color: var(--seed-color-fg-neutral-muted)
53
54
  }
54
- .seed-badge--tone_brand-variant_weak {
55
- background-color: var(--seed-color-palette-carrot-100);
56
- color: var(--seed-color-palette-carrot-900)
55
+ .seed-badge__root--tone_brand-variant_weak {
56
+ background-color: var(--seed-color-bg-brand-weak);
57
+ color: var(--seed-color-fg-brand-contrast)
57
58
  }
58
- .seed-badge--tone_brand-variant_solid {
59
+ .seed-badge__root--tone_brand-variant_solid {
59
60
  background-color: var(--seed-color-bg-brand-solid);
60
61
  color: var(--seed-color-palette-static-white)
61
62
  }
62
- .seed-badge--tone_brand-variant_outline {
63
+ .seed-badge__root--tone_brand-variant_outline {
63
64
  box-shadow: inset 0 0 0 1px var(--seed-color-stroke-brand);
64
65
  color: var(--seed-color-fg-brand)
65
66
  }
66
- .seed-badge--tone_informative-variant_weak {
67
+ .seed-badge__root--tone_informative-variant_weak {
67
68
  background-color: var(--seed-color-bg-informative-weak);
68
69
  color: var(--seed-color-fg-informative-contrast)
69
70
  }
70
- .seed-badge--tone_informative-variant_solid {
71
+ .seed-badge__root--tone_informative-variant_solid {
71
72
  background-color: var(--seed-color-bg-informative-solid);
72
73
  color: var(--seed-color-palette-static-white)
73
74
  }
74
- .seed-badge--tone_informative-variant_outline {
75
+ .seed-badge__root--tone_informative-variant_outline {
75
76
  box-shadow: inset 0 0 0 1px var(--seed-color-stroke-informative);
76
77
  color: var(--seed-color-fg-informative)
77
78
  }
78
- .seed-badge--tone_positive-variant_weak {
79
+ .seed-badge__root--tone_positive-variant_weak {
79
80
  background-color: var(--seed-color-bg-positive-weak);
80
81
  color: var(--seed-color-fg-positive-contrast)
81
82
  }
82
- .seed-badge--tone_positive-variant_solid {
83
+ .seed-badge__root--tone_positive-variant_solid {
83
84
  background-color: var(--seed-color-bg-positive-solid);
84
85
  color: var(--seed-color-palette-static-white)
85
86
  }
86
- .seed-badge--tone_positive-variant_outline {
87
+ .seed-badge__root--tone_positive-variant_outline {
87
88
  box-shadow: inset 0 0 0 1px var(--seed-color-stroke-positive);
88
89
  color: var(--seed-color-fg-positive)
89
90
  }
90
- .seed-badge--tone_critical-variant_weak {
91
+ .seed-badge__root--tone_warning-variant_weak {
92
+ background-color: var(--seed-color-bg-warning-weak);
93
+ color: var(--seed-color-fg-warning-contrast)
94
+ }
95
+ .seed-badge__root--tone_warning-variant_solid {
96
+ background-color: var(--seed-color-bg-warning-solid);
97
+ color: var(--seed-color-fg-neutral)
98
+ }
99
+ .seed-badge__root--tone_warning-variant_outline {
100
+ box-shadow: inset 0 0 0 1px var(--seed-color-stroke-warning);
101
+ color: var(--seed-color-fg-warning)
102
+ }
103
+ .seed-badge__root--tone_critical-variant_weak {
91
104
  background-color: var(--seed-color-bg-critical-weak);
92
105
  color: var(--seed-color-fg-critical-contrast)
93
106
  }
94
- .seed-badge--tone_critical-variant_solid {
107
+ .seed-badge__root--tone_critical-variant_solid {
95
108
  background-color: var(--seed-color-bg-critical-solid);
96
109
  color: var(--seed-color-palette-static-white)
97
110
  }
98
- .seed-badge--tone_critical-variant_outline {
111
+ .seed-badge__root--tone_critical-variant_outline {
99
112
  box-shadow: inset 0 0 0 1px var(--seed-color-stroke-critical);
100
113
  color: var(--seed-color-fg-critical)
101
114
  }
@@ -10,7 +10,7 @@ declare interface BadgeVariant {
10
10
  /**
11
11
  * @default neutral
12
12
  */
13
- tone: "neutral" | "brand" | "informative" | "positive" | "critical";
13
+ tone: "neutral" | "brand" | "informative" | "positive" | "warning" | "critical";
14
14
  }
15
15
 
16
16
  declare type BadgeVariantMap = {
@@ -19,11 +19,13 @@ declare type BadgeVariantMap = {
19
19
 
20
20
  export declare type BadgeVariantProps = Partial<BadgeVariant>;
21
21
 
22
+ export declare type BadgeSlotName = "root" | "label";
23
+
22
24
  export declare const badgeVariantMap: BadgeVariantMap;
23
25
 
24
26
  export declare const badge: ((
25
27
  props?: BadgeVariantProps,
26
- ) => string) & {
28
+ ) => Record<BadgeSlotName, string>) & {
27
29
  splitVariantProps: <T extends BadgeVariantProps>(
28
30
  props: T,
29
31
  ) => [BadgeVariantProps, Omit<T, keyof BadgeVariantProps>];
package/recipes/badge.mjs CHANGED
@@ -1,6 +1,17 @@
1
1
  import './badge.css';
2
2
  import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
3
3
 
4
+ const badgeSlotNames = [
5
+ [
6
+ "root",
7
+ "seed-badge__root"
8
+ ],
9
+ [
10
+ "label",
11
+ "seed-badge__label"
12
+ ]
13
+ ];
14
+
4
15
  const defaultVariant = {
5
16
  "size": "medium",
6
17
  "variant": "solid",
@@ -56,6 +67,18 @@ const compoundVariants = [
56
67
  "tone": "positive",
57
68
  "variant": "outline"
58
69
  },
70
+ {
71
+ "tone": "warning",
72
+ "variant": "weak"
73
+ },
74
+ {
75
+ "tone": "warning",
76
+ "variant": "solid"
77
+ },
78
+ {
79
+ "tone": "warning",
80
+ "variant": "outline"
81
+ },
59
82
  {
60
83
  "tone": "critical",
61
84
  "variant": "weak"
@@ -85,6 +108,7 @@ export const badgeVariantMap = {
85
108
  "brand",
86
109
  "informative",
87
110
  "positive",
111
+ "warning",
88
112
  "critical"
89
113
  ]
90
114
  };
@@ -92,10 +116,13 @@ export const badgeVariantMap = {
92
116
  export const badgeVariantKeys = Object.keys(badgeVariantMap);
93
117
 
94
118
  export function badge(props) {
95
- return createClassName(
96
- "seed-badge",
97
- mergeVariants(defaultVariant, props),
98
- compoundVariants,
119
+ return Object.fromEntries(
120
+ badgeSlotNames.map(([slot, className]) => {
121
+ return [
122
+ slot,
123
+ createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
124
+ ];
125
+ }),
99
126
  );
100
127
  }
101
128
 
@@ -16,8 +16,7 @@
16
16
  --seed-prefix-icon-margin-top: calc((var(--seed-dimension-x10) - var(--seed-dimension-x4)) * 0.5 - var(--seed-dimension-x2_5));
17
17
  --seed-suffix-icon-size: var(--seed-dimension-x4);
18
18
  --seed-suffix-icon-margin-left: var(--seed-dimension-x4);
19
- --seed-suffix-icon-margin-top: auto;
20
- --seed-suffix-icon-margin-bottom: auto;
19
+ --seed-suffix-icon-align-self: center;
21
20
  }
22
21
  .seed-inline-banner__root:is(button) {
23
22
  cursor: pointer;
@@ -0,0 +1,246 @@
1
+ .seed-page-banner__root {
2
+ box-sizing: border-box;
3
+ border: none;
4
+ font-family: inherit;
5
+ -webkit-font-smoothing: antialiased;
6
+ -moz-osx-font-smoothing: grayscale;
7
+ display: flex;
8
+ align-items: flex-start;
9
+ text-align: start;
10
+ width: 100%;
11
+ min-height: var(--seed-dimension-x10);
12
+ padding-inline: var(--seed-dimension-x4);
13
+ padding-block: var(--seed-dimension-x2_5);
14
+ --seed-prefix-icon-size: var(--seed-dimension-x4);
15
+ --seed-prefix-icon-margin-right: var(--seed-dimension-x2);
16
+ --seed-prefix-icon-margin-top: calc((var(--seed-dimension-x10) - var(--seed-dimension-x4)) * 0.5 - var(--seed-dimension-x2_5));
17
+ --seed-suffix-icon-size: var(--seed-dimension-x4);
18
+ --seed-suffix-icon-margin-left: var(--seed-dimension-x2);
19
+ --seed-suffix-icon-align-self: center;
20
+ }
21
+ .seed-page-banner__root:is(button) {
22
+ cursor: pointer;
23
+ }
24
+ .seed-page-banner__textContent {
25
+ display: flex;
26
+ flex-wrap: wrap;
27
+ align-items: center;
28
+ justify-content: space-between;
29
+ flex-grow: 1;
30
+ gap: var(--seed-dimension-x1_5);
31
+ }
32
+ .seed-page-banner__title {
33
+ flex-shrink: 0;
34
+ font-size: var(--seed-font-size-t4);
35
+ line-height: var(--seed-line-height-t4);
36
+ font-weight: var(--seed-font-weight-bold);
37
+ }
38
+ .seed-page-banner__title::after {
39
+ content: " ";
40
+ white-space: pre;
41
+ }
42
+ .seed-page-banner__description {
43
+ font-size: var(--seed-font-size-t4);
44
+ line-height: var(--seed-line-height-t4);
45
+ font-weight: var(--seed-font-weight-medium);
46
+ }
47
+ .seed-page-banner__button {
48
+ font-family: inherit;
49
+ border: none;
50
+ background-color: transparent;
51
+ cursor: pointer;
52
+ display: flex;
53
+ align-items: center;
54
+ margin: calc((var(--seed-dimension-x10) - var(--seed-line-height-t3)) * 0.5 * -1);
55
+ padding: calc((var(--seed-dimension-x10) - var(--seed-line-height-t3)) * 0.5);
56
+ font-size: var(--seed-font-size-t3);
57
+ line-height: var(--seed-line-height-t3);
58
+ font-weight: var(--seed-font-weight-bold);
59
+ }
60
+ .seed-page-banner__closeButton {
61
+ flex-shrink: 0;
62
+ flex-grow: 0;
63
+ display: flex;
64
+ justify-content: center;
65
+ align-items: center;
66
+ width: var(--seed-dimension-x10);
67
+ height: var(--seed-dimension-x10);
68
+ margin: calc((var(--seed-dimension-x10) - var(--seed-dimension-x4)) * -0.5);
69
+ margin-left: calc((var(--seed-dimension-x10) - var(--seed-dimension-x4)) * -0.5 + var(--seed-dimension-x2));
70
+ --seed-suffix-icon-margin-left: initial;
71
+ align-self: center;
72
+ border: none;
73
+ background-color: transparent;
74
+ padding: 0;
75
+ cursor: pointer;
76
+ }
77
+ .seed-page-banner__root--tone_neutral-variant_weak {
78
+ background-color: var(--seed-color-bg-neutral-weak);
79
+ --seed-prefix-icon-color: var(--seed-color-fg-neutral);
80
+ --seed-suffix-icon-color: var(--seed-color-fg-neutral);
81
+ }
82
+ .seed-page-banner__root--tone_neutral-variant_weak:is(button):is(:active, [data-active]) {
83
+ background-color: var(--seed-color-bg-neutral-weak-pressed);
84
+ }
85
+ .seed-page-banner__title--tone_neutral-variant_weak {
86
+ color: var(--seed-color-fg-neutral);
87
+ }
88
+ .seed-page-banner__description--tone_neutral-variant_weak {
89
+ color: var(--seed-color-fg-neutral);
90
+ }
91
+ .seed-page-banner__button--tone_neutral-variant_weak {
92
+ color: var(--seed-color-fg-neutral);
93
+ }
94
+ .seed-page-banner__root--tone_neutral-variant_solid {
95
+ background-color: var(--seed-color-bg-neutral-inverted);
96
+ --seed-prefix-icon-color: var(--seed-color-fg-neutral-inverted);
97
+ --seed-suffix-icon-color: var(--seed-color-fg-neutral-inverted);
98
+ }
99
+ .seed-page-banner__root--tone_neutral-variant_solid:is(button):is(:active, [data-active]) {
100
+ background-color: var(--seed-color-bg-neutral-inverted-pressed);
101
+ }
102
+ .seed-page-banner__title--tone_neutral-variant_solid {
103
+ color: var(--seed-color-fg-neutral-inverted);
104
+ }
105
+ .seed-page-banner__description--tone_neutral-variant_solid {
106
+ color: var(--seed-color-fg-neutral-inverted);
107
+ }
108
+ .seed-page-banner__button--tone_neutral-variant_solid {
109
+ color: var(--seed-color-fg-neutral-inverted);
110
+ }
111
+ .seed-page-banner__root--tone_informative-variant_weak {
112
+ background-color: var(--seed-color-bg-informative-weak);
113
+ --seed-prefix-icon-color: var(--seed-color-fg-informative-contrast);
114
+ --seed-suffix-icon-color: var(--seed-color-fg-informative-contrast);
115
+ }
116
+ .seed-page-banner__root--tone_informative-variant_weak:is(button):is(:active, [data-active]) {
117
+ background-color: var(--seed-color-bg-informative-weak-pressed);
118
+ }
119
+ .seed-page-banner__title--tone_informative-variant_weak {
120
+ color: var(--seed-color-fg-informative-contrast);
121
+ }
122
+ .seed-page-banner__description--tone_informative-variant_weak {
123
+ color: var(--seed-color-fg-informative-contrast);
124
+ }
125
+ .seed-page-banner__button--tone_informative-variant_weak {
126
+ color: var(--seed-color-fg-informative-contrast);
127
+ }
128
+ .seed-page-banner__root--tone_informative-variant_solid {
129
+ background-color: var(--seed-color-bg-informative-solid);
130
+ --seed-prefix-icon-color: var(--seed-color-palette-static-white);
131
+ --seed-suffix-icon-color: var(--seed-color-palette-static-white);
132
+ }
133
+ .seed-page-banner__root--tone_informative-variant_solid:is(button):is(:active, [data-active]) {
134
+ background-color: var(--seed-color-bg-informative-solid-pressed);
135
+ }
136
+ .seed-page-banner__title--tone_informative-variant_solid {
137
+ color: var(--seed-color-palette-static-white);
138
+ }
139
+ .seed-page-banner__description--tone_informative-variant_solid {
140
+ color: var(--seed-color-palette-static-white);
141
+ }
142
+ .seed-page-banner__button--tone_informative-variant_solid {
143
+ color: var(--seed-color-palette-static-white);
144
+ }
145
+ .seed-page-banner__root--tone_positive-variant_weak {
146
+ background-color: var(--seed-color-bg-positive-weak);
147
+ --seed-prefix-icon-color: var(--seed-color-fg-positive-contrast);
148
+ --seed-suffix-icon-color: var(--seed-color-fg-positive-contrast);
149
+ }
150
+ .seed-page-banner__root--tone_positive-variant_weak:is(button):is(:active, [data-active]) {
151
+ background-color: var(--seed-color-bg-positive-weak-pressed);
152
+ }
153
+ .seed-page-banner__title--tone_positive-variant_weak {
154
+ color: var(--seed-color-fg-positive-contrast);
155
+ }
156
+ .seed-page-banner__description--tone_positive-variant_weak {
157
+ color: var(--seed-color-fg-positive-contrast);
158
+ }
159
+ .seed-page-banner__button--tone_positive-variant_weak {
160
+ color: var(--seed-color-fg-positive-contrast);
161
+ }
162
+ .seed-page-banner__root--tone_positive-variant_solid {
163
+ background-color: var(--seed-color-bg-positive-solid);
164
+ --seed-prefix-icon-color: var(--seed-color-palette-static-white);
165
+ --seed-suffix-icon-color: var(--seed-color-palette-static-white);
166
+ }
167
+ .seed-page-banner__root--tone_positive-variant_solid:is(button):is(:active, [data-active]) {
168
+ background-color: var(--seed-color-bg-positive-solid-pressed);
169
+ }
170
+ .seed-page-banner__title--tone_positive-variant_solid {
171
+ color: var(--seed-color-palette-static-white);
172
+ }
173
+ .seed-page-banner__description--tone_positive-variant_solid {
174
+ color: var(--seed-color-palette-static-white);
175
+ }
176
+ .seed-page-banner__button--tone_positive-variant_solid {
177
+ color: var(--seed-color-palette-static-white);
178
+ }
179
+ .seed-page-banner__root--tone_warning-variant_weak {
180
+ background-color: var(--seed-color-bg-warning-weak);
181
+ --seed-prefix-icon-color: var(--seed-color-fg-warning-contrast);
182
+ --seed-suffix-icon-color: var(--seed-color-fg-warning-contrast);
183
+ }
184
+ .seed-page-banner__root--tone_warning-variant_weak:is(button):is(:active, [data-active]) {
185
+ background-color: var(--seed-color-bg-warning-weak-pressed);
186
+ }
187
+ .seed-page-banner__title--tone_warning-variant_weak {
188
+ color: var(--seed-color-fg-warning-contrast);
189
+ }
190
+ .seed-page-banner__description--tone_warning-variant_weak {
191
+ color: var(--seed-color-fg-warning-contrast);
192
+ }
193
+ .seed-page-banner__button--tone_warning-variant_weak {
194
+ color: var(--seed-color-fg-warning-contrast);
195
+ }
196
+ .seed-page-banner__root--tone_warning-variant_solid {
197
+ background-color: var(--seed-color-bg-warning-solid);
198
+ --seed-prefix-icon-color: var(--seed-color-fg-neutral);
199
+ --seed-suffix-icon-color: var(--seed-color-fg-neutral);
200
+ }
201
+ .seed-page-banner__root--tone_warning-variant_solid:is(button):is(:active, [data-active]) {
202
+ background-color: var(--seed-color-bg-warning-solid-pressed);
203
+ }
204
+ .seed-page-banner__title--tone_warning-variant_solid {
205
+ color: var(--seed-color-fg-neutral);
206
+ }
207
+ .seed-page-banner__description--tone_warning-variant_solid {
208
+ color: var(--seed-color-fg-neutral);
209
+ }
210
+ .seed-page-banner__button--tone_warning-variant_solid {
211
+ color: var(--seed-color-fg-neutral);
212
+ }
213
+ .seed-page-banner__root--tone_critical-variant_weak {
214
+ background-color: var(--seed-color-bg-critical-weak);
215
+ --seed-prefix-icon-color: var(--seed-color-fg-critical-contrast);
216
+ --seed-suffix-icon-color: var(--seed-color-fg-critical-contrast);
217
+ }
218
+ .seed-page-banner__root--tone_critical-variant_weak:is(button):is(:active, [data-active]) {
219
+ background-color: var(--seed-color-bg-critical-weak-pressed);
220
+ }
221
+ .seed-page-banner__title--tone_critical-variant_weak {
222
+ color: var(--seed-color-fg-critical-contrast);
223
+ }
224
+ .seed-page-banner__description--tone_critical-variant_weak {
225
+ color: var(--seed-color-fg-critical-contrast);
226
+ }
227
+ .seed-page-banner__button--tone_critical-variant_weak {
228
+ color: var(--seed-color-fg-critical-contrast);
229
+ }
230
+ .seed-page-banner__root--tone_critical-variant_solid {
231
+ background-color: var(--seed-color-bg-critical-solid);
232
+ --seed-prefix-icon-color: var(--seed-color-palette-static-white);
233
+ --seed-suffix-icon-color: var(--seed-color-palette-static-white);
234
+ }
235
+ .seed-page-banner__root--tone_critical-variant_solid:is(button):is(:active, [data-active]) {
236
+ background-color: var(--seed-color-bg-critical-solid-pressed);
237
+ }
238
+ .seed-page-banner__title--tone_critical-variant_solid {
239
+ color: var(--seed-color-palette-static-white);
240
+ }
241
+ .seed-page-banner__description--tone_critical-variant_solid {
242
+ color: var(--seed-color-palette-static-white);
243
+ }
244
+ .seed-page-banner__button--tone_critical-variant_solid {
245
+ color: var(--seed-color-palette-static-white);
246
+ }
@@ -0,0 +1,28 @@
1
+ declare interface PageBannerVariant {
2
+ /**
3
+ * @default weak
4
+ */
5
+ variant: "weak" | "solid";
6
+ /**
7
+ * @default neutral
8
+ */
9
+ tone: "neutral" | "informative" | "positive" | "warning" | "critical";
10
+ }
11
+
12
+ declare type PageBannerVariantMap = {
13
+ [key in keyof PageBannerVariant]: Array<PageBannerVariant[key]>;
14
+ };
15
+
16
+ export declare type PageBannerVariantProps = Partial<PageBannerVariant>;
17
+
18
+ export declare type PageBannerSlotName = "root" | "textContent" | "title" | "description" | "button" | "closeButton";
19
+
20
+ export declare const pageBannerVariantMap: PageBannerVariantMap;
21
+
22
+ export declare const pageBanner: ((
23
+ props?: PageBannerVariantProps,
24
+ ) => Record<PageBannerSlotName, string>) & {
25
+ splitVariantProps: <T extends PageBannerVariantProps>(
26
+ props: T,
27
+ ) => [PageBannerVariantProps, Omit<T, keyof PageBannerVariantProps>];
28
+ }
@@ -0,0 +1,108 @@
1
+ import './page-banner.css';
2
+ import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
3
+
4
+ const pageBannerSlotNames = [
5
+ [
6
+ "root",
7
+ "seed-page-banner__root"
8
+ ],
9
+ [
10
+ "textContent",
11
+ "seed-page-banner__textContent"
12
+ ],
13
+ [
14
+ "title",
15
+ "seed-page-banner__title"
16
+ ],
17
+ [
18
+ "description",
19
+ "seed-page-banner__description"
20
+ ],
21
+ [
22
+ "button",
23
+ "seed-page-banner__button"
24
+ ],
25
+ [
26
+ "closeButton",
27
+ "seed-page-banner__closeButton"
28
+ ]
29
+ ];
30
+
31
+ const defaultVariant = {
32
+ "tone": "neutral",
33
+ "variant": "weak"
34
+ };
35
+
36
+ const compoundVariants = [
37
+ {
38
+ "tone": "neutral",
39
+ "variant": "weak"
40
+ },
41
+ {
42
+ "tone": "neutral",
43
+ "variant": "solid"
44
+ },
45
+ {
46
+ "tone": "informative",
47
+ "variant": "weak"
48
+ },
49
+ {
50
+ "tone": "informative",
51
+ "variant": "solid"
52
+ },
53
+ {
54
+ "tone": "positive",
55
+ "variant": "weak"
56
+ },
57
+ {
58
+ "tone": "positive",
59
+ "variant": "solid"
60
+ },
61
+ {
62
+ "tone": "warning",
63
+ "variant": "weak"
64
+ },
65
+ {
66
+ "tone": "warning",
67
+ "variant": "solid"
68
+ },
69
+ {
70
+ "tone": "critical",
71
+ "variant": "weak"
72
+ },
73
+ {
74
+ "tone": "critical",
75
+ "variant": "solid"
76
+ }
77
+ ];
78
+
79
+ export const pageBannerVariantMap = {
80
+ "variant": [
81
+ "weak",
82
+ "solid"
83
+ ],
84
+ "tone": [
85
+ "neutral",
86
+ "informative",
87
+ "positive",
88
+ "warning",
89
+ "critical"
90
+ ]
91
+ };
92
+
93
+ export const pageBannerVariantKeys = Object.keys(pageBannerVariantMap);
94
+
95
+ export function pageBanner(props) {
96
+ return Object.fromEntries(
97
+ pageBannerSlotNames.map(([slot, className]) => {
98
+ return [
99
+ slot,
100
+ createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
101
+ ];
102
+ }),
103
+ );
104
+ }
105
+
106
+ Object.assign(pageBanner, { splitVariantProps: (props) => splitVariantProps(props, pageBannerVariantMap) });
107
+
108
+ // @recipe(seed): page-banner
@@ -4,6 +4,7 @@
4
4
  justify-content: space-between;
5
5
  align-items: center;
6
6
  width: 100%;
7
+ max-width: 560px;
7
8
  background: var(--seed-color-bg-neutral-solid);
8
9
  border-radius: var(--seed-radius-r2);
9
10
  padding-inline: var(--seed-dimension-x4);
@@ -1,13 +1,15 @@
1
- export declare const disabled = "var(--seed-color-bg-disabled)";
2
1
  export declare const overlay = "var(--seed-color-bg-overlay)";
2
+ export declare const disabled = "var(--seed-color-bg-disabled)";
3
+ export declare const brandWeak = "var(--seed-color-bg-brand-weak)";
3
4
  export declare const brandSolid = "var(--seed-color-bg-brand-solid)";
4
5
  export declare const brandSolidPressed = "var(--seed-color-bg-brand-solid-pressed)";
5
- export declare const criticalSolid = "var(--seed-color-bg-critical-solid)";
6
+ export declare const brandWeakPressed = "var(--seed-color-bg-brand-weak-pressed)";
6
7
  export declare const criticalWeak = "var(--seed-color-bg-critical-weak)";
8
+ export declare const criticalSolid = "var(--seed-color-bg-critical-solid)";
7
9
  export declare const criticalSolidPressed = "var(--seed-color-bg-critical-solid-pressed)";
8
10
  export declare const criticalWeakPressed = "var(--seed-color-bg-critical-weak-pressed)";
9
- export declare const informativeSolid = "var(--seed-color-bg-informative-solid)";
10
11
  export declare const informativeWeak = "var(--seed-color-bg-informative-weak)";
12
+ export declare const informativeSolid = "var(--seed-color-bg-informative-solid)";
11
13
  export declare const informativeSolidPressed = "var(--seed-color-bg-informative-solid-pressed)";
12
14
  export declare const informativeWeakPressed = "var(--seed-color-bg-informative-weak-pressed)";
13
15
  export declare const layerBasement = "var(--seed-color-bg-layer-basement)";
@@ -17,18 +19,19 @@ export declare const layerFloating = "var(--seed-color-bg-layer-floating)";
17
19
  export declare const layerDefaultPressed = "var(--seed-color-bg-layer-default-pressed)";
18
20
  export declare const layerFloatingPressed = "var(--seed-color-bg-layer-floating-pressed)";
19
21
  export declare const magicWeak = "var(--seed-color-bg-magic-weak)";
22
+ export declare const neutralWeak = "var(--seed-color-bg-neutral-weak)";
20
23
  export declare const neutralInverted = "var(--seed-color-bg-neutral-inverted)";
21
24
  export declare const neutralSolid = "var(--seed-color-bg-neutral-solid)";
22
- export declare const neutralWeak = "var(--seed-color-bg-neutral-weak)";
23
25
  export declare const neutralInvertedPressed = "var(--seed-color-bg-neutral-inverted-pressed)";
24
26
  export declare const neutralSolidMuted = "var(--seed-color-bg-neutral-solid-muted)";
25
27
  export declare const neutralSolidMutedPressed = "var(--seed-color-bg-neutral-solid-muted-pressed)";
26
28
  export declare const neutralWeakPressed = "var(--seed-color-bg-neutral-weak-pressed)";
27
29
  export declare const overlayMuted = "var(--seed-color-bg-overlay-muted)";
28
- export declare const positiveSolid = "var(--seed-color-bg-positive-solid)";
29
30
  export declare const positiveWeak = "var(--seed-color-bg-positive-weak)";
31
+ export declare const positiveSolid = "var(--seed-color-bg-positive-solid)";
30
32
  export declare const positiveSolidPressed = "var(--seed-color-bg-positive-solid-pressed)";
31
33
  export declare const positiveWeakPressed = "var(--seed-color-bg-positive-weak-pressed)";
32
- export declare const warningSolid = "var(--seed-color-bg-warning-solid)";
33
34
  export declare const warningWeak = "var(--seed-color-bg-warning-weak)";
35
+ export declare const warningSolid = "var(--seed-color-bg-warning-solid)";
36
+ export declare const warningSolidPressed = "var(--seed-color-bg-warning-solid-pressed)";
34
37
  export declare const warningWeakPressed = "var(--seed-color-bg-warning-weak-pressed)";