@seed-design/css 1.0.7 → 1.1.3
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.
- package/all.css +907 -474
- package/all.min.css +1 -1
- package/base.css +32 -0
- package/base.min.css +1 -1
- package/package.json +1 -1
- package/recipes/action-button.css +8 -1
- package/recipes/action-sheet.css +8 -2
- package/recipes/app-bar.css +8 -1
- package/recipes/app-screen.css +16 -0
- package/recipes/app-screen.d.ts +4 -0
- package/recipes/app-screen.mjs +6 -1
- package/recipes/bottom-sheet-handle.css +24 -0
- package/recipes/bottom-sheet-handle.d.ts +21 -0
- package/recipes/bottom-sheet-handle.mjs +36 -0
- package/recipes/bottom-sheet.css +67 -35
- package/recipes/callout.css +1 -0
- package/recipes/dialog.css +8 -2
- package/recipes/extended-action-sheet.css +8 -2
- package/recipes/field-label.css +29 -0
- package/recipes/field-label.d.ts +24 -0
- package/recipes/field-label.mjs +47 -0
- package/recipes/field.css +63 -0
- package/recipes/field.d.ts +21 -0
- package/recipes/field.mjs +60 -0
- package/recipes/input-button.css +103 -0
- package/recipes/input-button.d.ts +21 -0
- package/recipes/input-button.mjs +64 -0
- package/recipes/list-header.css +1 -0
- package/recipes/list-item.css +13 -3
- package/recipes/menu-sheet-item.css +3 -0
- package/recipes/menu-sheet.css +12 -2
- package/recipes/page-banner.css +5 -4
- package/recipes/page-banner.d.ts +1 -1
- package/recipes/page-banner.mjs +6 -2
- package/recipes/scroll-fog.css +23 -0
- package/recipes/scroll-fog.d.ts +22 -0
- package/recipes/scroll-fog.mjs +28 -0
- package/recipes/slider-marker.css +42 -0
- package/recipes/slider-marker.d.ts +22 -0
- package/recipes/slider-marker.mjs +30 -0
- package/recipes/slider-tick.css +19 -0
- package/recipes/slider-tick.d.ts +22 -0
- package/recipes/slider-tick.mjs +29 -0
- package/recipes/slider.css +174 -0
- package/recipes/slider.d.ts +21 -0
- package/recipes/slider.mjs +68 -0
- package/recipes/text-input.css +194 -0
- package/recipes/text-input.d.ts +28 -0
- package/recipes/text-input.mjs +73 -0
- package/vars/component/bottom-sheet-handle.d.ts +24 -0
- package/vars/component/bottom-sheet-handle.mjs +24 -0
- package/vars/component/bottom-sheet.d.ts +2 -2
- package/vars/component/bottom-sheet.mjs +2 -2
- package/vars/component/field-label.d.ts +25 -0
- package/vars/component/field-label.mjs +25 -0
- package/vars/component/field.d.ts +72 -0
- package/vars/component/field.mjs +72 -0
- package/vars/component/index.d.ts +9 -1
- package/vars/component/index.mjs +9 -1
- package/vars/component/input-button.d.ts +78 -0
- package/vars/component/input-button.mjs +78 -0
- package/vars/component/page-banner.d.ts +1 -1
- package/vars/component/page-banner.mjs +1 -1
- package/vars/component/scroll-fog.d.ts +11 -0
- package/vars/component/scroll-fog.mjs +11 -0
- package/vars/component/slider-thumb.d.ts +25 -0
- package/vars/component/slider-thumb.mjs +25 -0
- package/vars/component/slider-tick.d.ts +23 -0
- package/vars/component/slider-tick.mjs +23 -0
- package/vars/component/slider.d.ts +74 -0
- package/vars/component/slider.mjs +74 -0
- package/vars/component/text-input.d.ts +212 -0
- package/vars/component/text-input.mjs +212 -0
- package/recipes/text-field.css +0 -385
- package/recipes/text-field.d.ts +0 -24
- package/recipes/text-field.mjs +0 -104
- package/vars/component/text-field.d.ts +0 -294
- package/vars/component/text-field.mjs +0 -294
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.seed-field-label__root {
|
|
2
|
+
color: var(--seed-color-fg-neutral);
|
|
3
|
+
font-size: var(--seed-font-size-t5);
|
|
4
|
+
line-height: var(--seed-line-height-t5)
|
|
5
|
+
}
|
|
6
|
+
.seed-field-label__indicatorText {
|
|
7
|
+
display: inline;
|
|
8
|
+
vertical-align: bottom;
|
|
9
|
+
padding-inline-start: 0.25rem;
|
|
10
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
11
|
+
font-size: var(--seed-font-size-t4);
|
|
12
|
+
line-height: var(--seed-line-height-t5);
|
|
13
|
+
font-weight: var(--seed-font-weight-regular)
|
|
14
|
+
}
|
|
15
|
+
.seed-field-label__indicatorIcon {
|
|
16
|
+
display: inline;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
width: 0.375rem;
|
|
19
|
+
height: 0.375rem;
|
|
20
|
+
margin-block-start: 0.25rem;
|
|
21
|
+
margin-inline-start: 0.125rem;
|
|
22
|
+
color: var(--seed-color-fg-critical)
|
|
23
|
+
}
|
|
24
|
+
.seed-field-label__root--weight_medium {
|
|
25
|
+
font-weight: var(--seed-font-weight-medium)
|
|
26
|
+
}
|
|
27
|
+
.seed-field-label__root--weight_bold {
|
|
28
|
+
font-weight: var(--seed-font-weight-bold)
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare interface FieldLabelVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default "medium"
|
|
4
|
+
*/
|
|
5
|
+
weight: "medium" | "bold";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type FieldLabelVariantMap = {
|
|
9
|
+
[key in keyof FieldLabelVariant]: Array<FieldLabelVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type FieldLabelVariantProps = Partial<FieldLabelVariant>;
|
|
13
|
+
|
|
14
|
+
export declare type FieldLabelSlotName = "root" | "indicatorText" | "indicatorIcon";
|
|
15
|
+
|
|
16
|
+
export declare const fieldLabelVariantMap: FieldLabelVariantMap;
|
|
17
|
+
|
|
18
|
+
export declare const fieldLabel: ((
|
|
19
|
+
props?: FieldLabelVariantProps,
|
|
20
|
+
) => Record<FieldLabelSlotName, string>) & {
|
|
21
|
+
splitVariantProps: <T extends FieldLabelVariantProps>(
|
|
22
|
+
props: T,
|
|
23
|
+
) => [FieldLabelVariantProps, Omit<T, keyof FieldLabelVariantProps>];
|
|
24
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import './field-label.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const fieldLabelSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-field-label__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"indicatorText",
|
|
11
|
+
"seed-field-label__indicatorText"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"indicatorIcon",
|
|
15
|
+
"seed-field-label__indicatorIcon"
|
|
16
|
+
]
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const defaultVariant = {
|
|
20
|
+
"weight": "medium"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const compoundVariants = [];
|
|
24
|
+
|
|
25
|
+
export const fieldLabelVariantMap = {
|
|
26
|
+
"weight": [
|
|
27
|
+
"medium",
|
|
28
|
+
"bold"
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const fieldLabelVariantKeys = Object.keys(fieldLabelVariantMap);
|
|
33
|
+
|
|
34
|
+
export function fieldLabel(props) {
|
|
35
|
+
return Object.fromEntries(
|
|
36
|
+
fieldLabelSlotNames.map(([slot, className]) => {
|
|
37
|
+
return [
|
|
38
|
+
slot,
|
|
39
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
40
|
+
];
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Object.assign(fieldLabel, { splitVariantProps: (props) => splitVariantProps(props, fieldLabelVariantMap) });
|
|
46
|
+
|
|
47
|
+
// @recipe(seed): field-label
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.seed-field__root {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
gap: var(--seed-dimension-x2);
|
|
6
|
+
}
|
|
7
|
+
.seed-field__header {
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
padding-inline: var(--seed-dimension-x0_5);
|
|
12
|
+
gap: var(--seed-dimension-x2_5);
|
|
13
|
+
}
|
|
14
|
+
.seed-field__footer {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
padding-inline: var(--seed-dimension-x0_5);
|
|
19
|
+
gap: var(--seed-dimension-x2);
|
|
20
|
+
}
|
|
21
|
+
.seed-field__description {
|
|
22
|
+
display: flex;
|
|
23
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
24
|
+
font-weight: var(--seed-font-weight-regular);
|
|
25
|
+
font-size: var(--seed-font-size-t4);
|
|
26
|
+
line-height: var(--seed-line-height-t4);
|
|
27
|
+
--seed-prefix-icon-size: var(--seed-dimension-x4);
|
|
28
|
+
--seed-prefix-icon-color: var(--seed-color-fg-neutral-subtle);
|
|
29
|
+
--seed-prefix-icon-margin-right: var(--seed-dimension-x1_5);
|
|
30
|
+
--seed-prefix-icon-margin-top: calc((var(--seed-line-height-t4) - var(--seed-dimension-x4)) / 2);
|
|
31
|
+
}
|
|
32
|
+
.seed-field__errorMessage {
|
|
33
|
+
display: flex;
|
|
34
|
+
color: var(--seed-color-fg-critical);
|
|
35
|
+
font-weight: var(--seed-font-weight-regular);
|
|
36
|
+
font-size: var(--seed-font-size-t4);
|
|
37
|
+
line-height: var(--seed-line-height-t4);
|
|
38
|
+
--seed-prefix-icon-size: var(--seed-dimension-x4);
|
|
39
|
+
--seed-prefix-icon-color: var(--seed-color-fg-critical);
|
|
40
|
+
--seed-prefix-icon-margin-right: var(--seed-dimension-x1_5);
|
|
41
|
+
--seed-prefix-icon-margin-top: calc((var(--seed-line-height-t4) - var(--seed-dimension-x4)) / 2);
|
|
42
|
+
}
|
|
43
|
+
.seed-field__characterCount {
|
|
44
|
+
color: var(--seed-color-fg-neutral);
|
|
45
|
+
font-weight: var(--seed-font-weight-regular);
|
|
46
|
+
font-size: var(--seed-font-size-t4);
|
|
47
|
+
line-height: var(--seed-line-height-t4);
|
|
48
|
+
}
|
|
49
|
+
.seed-field__characterCount[data-empty]:not(:is(:invalid, [data-invalid])) {
|
|
50
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
51
|
+
}
|
|
52
|
+
.seed-field__characterCount:is(:invalid, [data-invalid]) {
|
|
53
|
+
color: var(--seed-color-fg-critical);
|
|
54
|
+
}
|
|
55
|
+
.seed-field__maxCharacterCount {
|
|
56
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
57
|
+
font-weight: var(--seed-font-weight-regular);
|
|
58
|
+
font-size: var(--seed-font-size-t4);
|
|
59
|
+
line-height: var(--seed-line-height-t4);
|
|
60
|
+
}
|
|
61
|
+
.seed-field__maxCharacterCount:is(:invalid, [data-invalid]) {
|
|
62
|
+
color: var(--seed-color-fg-critical);
|
|
63
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare interface FieldVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type FieldVariantMap = {
|
|
6
|
+
[key in keyof FieldVariant]: Array<FieldVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type FieldVariantProps = Partial<FieldVariant>;
|
|
10
|
+
|
|
11
|
+
export declare type FieldSlotName = "root" | "header" | "footer" | "description" | "errorMessage" | "characterCountArea" | "characterCount" | "maxCharacterCount";
|
|
12
|
+
|
|
13
|
+
export declare const fieldVariantMap: FieldVariantMap;
|
|
14
|
+
|
|
15
|
+
export declare const field: ((
|
|
16
|
+
props?: FieldVariantProps,
|
|
17
|
+
) => Record<FieldSlotName, string>) & {
|
|
18
|
+
splitVariantProps: <T extends FieldVariantProps>(
|
|
19
|
+
props: T,
|
|
20
|
+
) => [FieldVariantProps, Omit<T, keyof FieldVariantProps>];
|
|
21
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import './field.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const fieldSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-field__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"header",
|
|
11
|
+
"seed-field__header"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"footer",
|
|
15
|
+
"seed-field__footer"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"description",
|
|
19
|
+
"seed-field__description"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"errorMessage",
|
|
23
|
+
"seed-field__errorMessage"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"characterCountArea",
|
|
27
|
+
"seed-field__characterCountArea"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"characterCount",
|
|
31
|
+
"seed-field__characterCount"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"maxCharacterCount",
|
|
35
|
+
"seed-field__maxCharacterCount"
|
|
36
|
+
]
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const defaultVariant = {};
|
|
40
|
+
|
|
41
|
+
const compoundVariants = [];
|
|
42
|
+
|
|
43
|
+
export const fieldVariantMap = {};
|
|
44
|
+
|
|
45
|
+
export const fieldVariantKeys = Object.keys(fieldVariantMap);
|
|
46
|
+
|
|
47
|
+
export function field(props) {
|
|
48
|
+
return Object.fromEntries(
|
|
49
|
+
fieldSlotNames.map(([slot, className]) => {
|
|
50
|
+
return [
|
|
51
|
+
slot,
|
|
52
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
53
|
+
];
|
|
54
|
+
}),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Object.assign(field, { splitVariantProps: (props) => splitVariantProps(props, fieldVariantMap) });
|
|
59
|
+
|
|
60
|
+
// @recipe(seed): field
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.seed-input-button__root {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
align-items: center;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
position: relative;
|
|
7
|
+
isolation: isolate;
|
|
8
|
+
height: var(--seed-dimension-x13);
|
|
9
|
+
gap: var(--seed-dimension-x2_5);
|
|
10
|
+
padding-inline: var(--seed-dimension-x4);
|
|
11
|
+
}
|
|
12
|
+
.seed-input-button__button {
|
|
13
|
+
position: absolute;
|
|
14
|
+
z-index: -1;
|
|
15
|
+
top: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
border: none;
|
|
21
|
+
padding: 0;
|
|
22
|
+
border-radius: var(--seed-radius-r3);
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
box-shadow: inset 0 0 0 1px var(--seed-color-stroke-neutral-weak);
|
|
25
|
+
transition: box-shadow var(--seed-duration-d3) var(--seed-timing-function-easing), background-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
26
|
+
}
|
|
27
|
+
.seed-input-button__button:is(:disabled, [disabled], [data-disabled]) {
|
|
28
|
+
cursor: not-allowed;
|
|
29
|
+
background-color: var(--seed-color-bg-disabled);
|
|
30
|
+
}
|
|
31
|
+
.seed-input-button__button:is(:active, [data-active]) {
|
|
32
|
+
background-color: var(--seed-color-bg-layer-default-pressed);
|
|
33
|
+
}
|
|
34
|
+
.seed-input-button__button:is(:focus, [data-focus]) {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
.seed-input-button__button:is(:invalid, [data-invalid]) {
|
|
38
|
+
box-shadow: inset 0 0 0 2px var(--seed-color-stroke-critical-solid);
|
|
39
|
+
}
|
|
40
|
+
.seed-input-button__value {
|
|
41
|
+
font-size: var(--seed-font-size-t5);
|
|
42
|
+
line-height: var(--seed-line-height-t5);
|
|
43
|
+
font-weight: var(--seed-font-weight-regular);
|
|
44
|
+
color: var(--seed-color-fg-neutral);
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
text-overflow: ellipsis;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
}
|
|
51
|
+
.seed-input-button__value:is(:disabled, [disabled], [data-disabled]) {
|
|
52
|
+
color: var(--seed-color-fg-disabled);
|
|
53
|
+
}
|
|
54
|
+
.seed-input-button__placeholder {
|
|
55
|
+
font-size: var(--seed-font-size-t5);
|
|
56
|
+
line-height: var(--seed-line-height-t5);
|
|
57
|
+
font-weight: var(--seed-font-weight-regular);
|
|
58
|
+
color: var(--seed-color-fg-placeholder);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
flex-grow: 1;
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
}
|
|
65
|
+
.seed-input-button__placeholder:is(:disabled, [disabled], [data-disabled]) {
|
|
66
|
+
color: var(--seed-color-fg-disabled);
|
|
67
|
+
}
|
|
68
|
+
.seed-input-button__prefixText {
|
|
69
|
+
font-size: var(--seed-font-size-t5);
|
|
70
|
+
line-height: var(--seed-line-height-t5);
|
|
71
|
+
font-weight: var(--seed-font-weight-regular);
|
|
72
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
}
|
|
75
|
+
.seed-input-button__prefixIcon {
|
|
76
|
+
width: var(--seed-dimension-x5);
|
|
77
|
+
height: var(--seed-dimension-x5);
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
}
|
|
82
|
+
.seed-input-button__suffixText {
|
|
83
|
+
font-size: var(--seed-font-size-t5);
|
|
84
|
+
line-height: var(--seed-line-height-t5);
|
|
85
|
+
font-weight: var(--seed-font-weight-regular);
|
|
86
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
}
|
|
89
|
+
.seed-input-button__suffixIcon {
|
|
90
|
+
width: var(--seed-dimension-x5);
|
|
91
|
+
height: var(--seed-dimension-x5);
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
.seed-input-button__clearButton {
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
border: none;
|
|
99
|
+
background-color: transparent;
|
|
100
|
+
padding: 0;
|
|
101
|
+
--seed-icon-size: 22px;
|
|
102
|
+
--seed-icon-color: var(--seed-color-fg-neutral-subtle);
|
|
103
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare interface InputButtonVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type InputButtonVariantMap = {
|
|
6
|
+
[key in keyof InputButtonVariant]: Array<InputButtonVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type InputButtonVariantProps = Partial<InputButtonVariant>;
|
|
10
|
+
|
|
11
|
+
export declare type InputButtonSlotName = "root" | "value" | "placeholder" | "button" | "prefixText" | "prefixIcon" | "suffixText" | "suffixIcon" | "clearButton";
|
|
12
|
+
|
|
13
|
+
export declare const inputButtonVariantMap: InputButtonVariantMap;
|
|
14
|
+
|
|
15
|
+
export declare const inputButton: ((
|
|
16
|
+
props?: InputButtonVariantProps,
|
|
17
|
+
) => Record<InputButtonSlotName, string>) & {
|
|
18
|
+
splitVariantProps: <T extends InputButtonVariantProps>(
|
|
19
|
+
props: T,
|
|
20
|
+
) => [InputButtonVariantProps, Omit<T, keyof InputButtonVariantProps>];
|
|
21
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import './input-button.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const inputButtonSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-input-button__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"value",
|
|
11
|
+
"seed-input-button__value"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"placeholder",
|
|
15
|
+
"seed-input-button__placeholder"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"button",
|
|
19
|
+
"seed-input-button__button"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"prefixText",
|
|
23
|
+
"seed-input-button__prefixText"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"prefixIcon",
|
|
27
|
+
"seed-input-button__prefixIcon"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"suffixText",
|
|
31
|
+
"seed-input-button__suffixText"
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"suffixIcon",
|
|
35
|
+
"seed-input-button__suffixIcon"
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"clearButton",
|
|
39
|
+
"seed-input-button__clearButton"
|
|
40
|
+
]
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const defaultVariant = {};
|
|
44
|
+
|
|
45
|
+
const compoundVariants = [];
|
|
46
|
+
|
|
47
|
+
export const inputButtonVariantMap = {};
|
|
48
|
+
|
|
49
|
+
export const inputButtonVariantKeys = Object.keys(inputButtonVariantMap);
|
|
50
|
+
|
|
51
|
+
export function inputButton(props) {
|
|
52
|
+
return Object.fromEntries(
|
|
53
|
+
inputButtonSlotNames.map(([slot, className]) => {
|
|
54
|
+
return [
|
|
55
|
+
slot,
|
|
56
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
57
|
+
];
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
Object.assign(inputButton, { splitVariantProps: (props) => splitVariantProps(props, inputButtonVariantMap) });
|
|
63
|
+
|
|
64
|
+
// @recipe(seed): input-button
|
package/recipes/list-header.css
CHANGED
package/recipes/list-item.css
CHANGED
|
@@ -53,20 +53,30 @@
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
align-items: flex-start;
|
|
55
55
|
flex-grow: 1;
|
|
56
|
+
border: none;
|
|
57
|
+
background: none;
|
|
58
|
+
font-family: inherit;
|
|
56
59
|
--seed-box-gap: var(--seed-dimension-x0_5);
|
|
57
60
|
gap: var(--seed-box-gap);
|
|
58
61
|
--seed-box-padding-right: var(--seed-dimension-x2_5);
|
|
59
|
-
padding
|
|
62
|
+
padding: 0 var(--seed-box-padding-right) 0 0;
|
|
63
|
+
text-decoration: none;
|
|
60
64
|
}
|
|
61
65
|
.seed-list-item__content:after {
|
|
62
66
|
content: '';
|
|
63
67
|
position: absolute;
|
|
64
|
-
|
|
68
|
+
top: 0;
|
|
69
|
+
right: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
left: 0;
|
|
65
72
|
}
|
|
66
73
|
.seed-list-item__content:before {
|
|
67
74
|
content: '';
|
|
68
75
|
position: absolute;
|
|
69
|
-
|
|
76
|
+
top: 0;
|
|
77
|
+
right: 0;
|
|
78
|
+
bottom: 0;
|
|
79
|
+
left: 0;
|
|
70
80
|
z-index: -1;
|
|
71
81
|
transition-property: background-color;
|
|
72
82
|
transition-duration: var(--seed-duration-d3);
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
font-size: var(--seed-font-size-t5);
|
|
11
11
|
line-height: var(--seed-line-height-t5);
|
|
12
12
|
font-weight: var(--seed-font-weight-regular);
|
|
13
|
+
border: none;
|
|
14
|
+
font-family: inherit;
|
|
15
|
+
outline: none;
|
|
13
16
|
}
|
|
14
17
|
.seed-menu-sheet-item:is(:active, [data-active]) {
|
|
15
18
|
background-color: var(--seed-color-bg-neutral-weak-pressed);
|
package/recipes/menu-sheet.css
CHANGED
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
align-items: flex-end;
|
|
6
|
-
|
|
6
|
+
top: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
7
10
|
overscroll-behavior-y: none;
|
|
8
11
|
--sheet-z-index: 2;
|
|
9
12
|
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
10
13
|
}
|
|
11
14
|
.seed-menu-sheet__backdrop {
|
|
12
15
|
position: fixed;
|
|
13
|
-
|
|
16
|
+
top: 0;
|
|
17
|
+
right: 0;
|
|
18
|
+
bottom: 0;
|
|
19
|
+
left: 0;
|
|
14
20
|
background: var(--seed-color-bg-overlay);
|
|
15
21
|
z-index: calc(var(--sheet-z-index) + var(--layer-index, 0));
|
|
16
22
|
}
|
|
@@ -78,6 +84,7 @@
|
|
|
78
84
|
font-size: var(--seed-font-size-t6);
|
|
79
85
|
line-height: var(--seed-line-height-t6);
|
|
80
86
|
font-weight: var(--seed-font-weight-bold);
|
|
87
|
+
margin: 0;
|
|
81
88
|
}
|
|
82
89
|
.seed-menu-sheet__list {
|
|
83
90
|
display: flex;
|
|
@@ -107,6 +114,9 @@
|
|
|
107
114
|
padding-inline: var(--seed-dimension-x5);
|
|
108
115
|
padding-block: var(--seed-dimension-x3_5);
|
|
109
116
|
border-radius: var(--seed-radius-r3);
|
|
117
|
+
border: none;
|
|
118
|
+
font-family: inherit;
|
|
119
|
+
outline: none;
|
|
110
120
|
color: var(--seed-color-fg-neutral);
|
|
111
121
|
font-size: var(--seed-font-size-t5);
|
|
112
122
|
line-height: var(--seed-line-height-t5);
|
package/recipes/page-banner.css
CHANGED
|
@@ -22,10 +22,7 @@
|
|
|
22
22
|
.seed-page-banner__root:is(button) {
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
}
|
|
25
|
-
.seed-page-
|
|
26
|
-
line-height: var(--seed-line-height-t4);
|
|
27
|
-
}
|
|
28
|
-
.seed-page-banner__textContent {
|
|
25
|
+
.seed-page-banner__content {
|
|
29
26
|
display: flex;
|
|
30
27
|
flex-wrap: wrap;
|
|
31
28
|
align-items: center;
|
|
@@ -33,6 +30,10 @@
|
|
|
33
30
|
flex-grow: 1;
|
|
34
31
|
gap: var(--seed-dimension-x1_5);
|
|
35
32
|
}
|
|
33
|
+
.seed-page-banner__body {
|
|
34
|
+
line-height: var(--seed-line-height-t4);
|
|
35
|
+
flex-grow: 1;
|
|
36
|
+
}
|
|
36
37
|
.seed-page-banner__title {
|
|
37
38
|
flex-shrink: 0;
|
|
38
39
|
font-size: var(--seed-font-size-t4);
|
package/recipes/page-banner.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ declare type PageBannerVariantMap = {
|
|
|
15
15
|
|
|
16
16
|
export declare type PageBannerVariantProps = Partial<PageBannerVariant>;
|
|
17
17
|
|
|
18
|
-
export declare type PageBannerSlotName = "root" | "
|
|
18
|
+
export declare type PageBannerSlotName = "root" | "content" | "body" | "title" | "description" | "button" | "closeButton";
|
|
19
19
|
|
|
20
20
|
export declare const pageBannerVariantMap: PageBannerVariantMap;
|
|
21
21
|
|
package/recipes/page-banner.mjs
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.seed-scroll-fog {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: auto;
|
|
4
|
+
height: 100%;
|
|
5
|
+
width: 100%;
|
|
6
|
+
--scroll-fog-from-color: #00000000;
|
|
7
|
+
--scroll-fog-to-color: #000000ff;
|
|
8
|
+
mask-image: linear-gradient(to bottom, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-top) * var(--scroll-fog-size-top))), linear-gradient(to top, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-bottom) * var(--scroll-fog-size-bottom))), linear-gradient(to right, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-left) * var(--scroll-fog-size-left))), linear-gradient(to left, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-right) * var(--scroll-fog-size-right)));
|
|
9
|
+
-webkit-mask-image: linear-gradient(to bottom, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-top) * var(--scroll-fog-size-top))), linear-gradient(to top, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-bottom) * var(--scroll-fog-size-bottom))), linear-gradient(to right, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-left) * var(--scroll-fog-size-left))), linear-gradient(to left, var(--scroll-fog-from-color) 0, var(--scroll-fog-to-color) calc(var(--scrollable-right) * var(--scroll-fog-size-right)));
|
|
10
|
+
mask-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
|
|
11
|
+
-webkit-mask-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
|
|
12
|
+
mask-repeat: no-repeat;
|
|
13
|
+
-webkit-mask-repeat: no-repeat;
|
|
14
|
+
mask-composite: intersect;
|
|
15
|
+
-webkit-mask-composite: source-in;
|
|
16
|
+
}
|
|
17
|
+
.seed-scroll-fog--hideScrollBar_true {
|
|
18
|
+
scrollbar-width: none;
|
|
19
|
+
-ms-overflow-style: none;
|
|
20
|
+
}
|
|
21
|
+
.seed-scroll-fog--hideScrollBar_true::-webkit-scrollbar {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare interface ScrollFogVariant {
|
|
2
|
+
/**
|
|
3
|
+
* @default false
|
|
4
|
+
*/
|
|
5
|
+
hideScrollBar: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type ScrollFogVariantMap = {
|
|
9
|
+
[key in keyof ScrollFogVariant]: Array<ScrollFogVariant[key]>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare type ScrollFogVariantProps = Partial<ScrollFogVariant>;
|
|
13
|
+
|
|
14
|
+
export declare const scrollFogVariantMap: ScrollFogVariantMap;
|
|
15
|
+
|
|
16
|
+
export declare const scrollFog: ((
|
|
17
|
+
props?: ScrollFogVariantProps,
|
|
18
|
+
) => string) & {
|
|
19
|
+
splitVariantProps: <T extends ScrollFogVariantProps>(
|
|
20
|
+
props: T,
|
|
21
|
+
) => [ScrollFogVariantProps, Omit<T, keyof ScrollFogVariantProps>];
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './scroll-fog.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const defaultVariant = {
|
|
5
|
+
"hideScrollBar": false
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const compoundVariants = [];
|
|
9
|
+
|
|
10
|
+
export const scrollFogVariantMap = {
|
|
11
|
+
"hideScrollBar": [
|
|
12
|
+
true
|
|
13
|
+
]
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const scrollFogVariantKeys = Object.keys(scrollFogVariantMap);
|
|
17
|
+
|
|
18
|
+
export function scrollFog(props) {
|
|
19
|
+
return createClassName(
|
|
20
|
+
"seed-scroll-fog",
|
|
21
|
+
mergeVariants(defaultVariant, props),
|
|
22
|
+
compoundVariants,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Object.assign(scrollFog, { splitVariantProps: (props) => splitVariantProps(props, scrollFogVariantMap) });
|
|
27
|
+
|
|
28
|
+
// @recipe(seed): scroll-fog
|