@seed-design/css 1.2.15 → 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.
- package/all.css +4956 -1925
- package/all.layered.css +5922 -2883
- package/all.layered.min.css +1 -1
- package/all.min.css +1 -1
- package/base.css +348 -35
- package/base.layered.css +348 -35
- package/base.layered.min.css +1 -1
- package/base.min.css +1 -1
- package/breakpoints/index.d.ts +7 -0
- package/breakpoints/index.mjs +17 -0
- package/package.json +6 -1
- package/recipes/accordion.css +268 -0
- package/recipes/accordion.d.ts +33 -0
- package/recipes/accordion.layered.css +308 -0
- package/recipes/accordion.layered.mjs +94 -0
- package/recipes/accordion.mjs +94 -0
- package/recipes/action-button.css +56 -4
- package/recipes/action-button.d.ts +16 -0
- package/recipes/action-button.layered.css +60 -4
- package/recipes/app-bar.css +0 -3
- package/recipes/app-bar.d.ts +0 -4
- package/recipes/app-bar.layered.css +0 -4
- package/recipes/app-bar.layered.mjs +1 -5
- package/recipes/app-bar.mjs +1 -5
- package/recipes/app-screen.css +3 -0
- package/recipes/app-screen.layered.css +4 -0
- package/recipes/attachment-input-item.css +275 -0
- package/recipes/attachment-input-item.d.ts +24 -0
- package/recipes/attachment-input-item.layered.css +288 -0
- package/recipes/attachment-input-item.layered.mjs +79 -0
- package/recipes/attachment-input-item.mjs +79 -0
- package/recipes/attachment-input-trigger.css +71 -0
- package/recipes/attachment-input-trigger.d.ts +21 -0
- package/recipes/attachment-input-trigger.layered.css +85 -0
- package/recipes/attachment-input-trigger.layered.mjs +48 -0
- package/recipes/attachment-input-trigger.mjs +48 -0
- package/recipes/attachment-input.css +55 -0
- package/recipes/attachment-input.d.ts +21 -0
- package/recipes/attachment-input.layered.css +64 -0
- package/recipes/attachment-input.layered.mjs +48 -0
- package/recipes/attachment-input.mjs +48 -0
- package/recipes/avatar.d.ts +9 -0
- package/recipes/badge.d.ts +10 -0
- package/recipes/bottom-sheet.css +62 -5
- package/recipes/bottom-sheet.layered.css +67 -5
- package/recipes/callout.d.ts +7 -0
- package/recipes/checkmark.d.ts +3 -0
- package/recipes/chip-tabs.css +8 -52
- package/recipes/chip-tabs.d.ts +1 -1
- package/recipes/chip-tabs.layered.css +8 -62
- package/recipes/chip-tabs.layered.mjs +1 -2
- package/recipes/chip-tabs.mjs +1 -2
- package/recipes/chip.d.ts +4 -0
- package/recipes/contextual-floating-button.d.ts +6 -0
- package/recipes/dialog.css +14 -11
- package/recipes/dialog.layered.css +4 -0
- package/recipes/footer.css +44 -0
- package/recipes/footer.d.ts +24 -0
- package/recipes/footer.layered.css +52 -0
- package/recipes/footer.layered.mjs +39 -0
- package/recipes/footer.mjs +39 -0
- package/recipes/help-bubble.css +29 -1
- package/recipes/help-bubble.layered.css +34 -1
- package/recipes/image-frame.css +0 -3
- package/recipes/image-frame.d.ts +0 -4
- package/recipes/image-frame.layered.css +0 -4
- package/recipes/image-frame.layered.mjs +1 -6
- package/recipes/image-frame.mjs +1 -6
- package/recipes/input-button.css +176 -20
- package/recipes/input-button.d.ts +8 -1
- package/recipes/input-button.layered.css +197 -21
- package/recipes/input-button.layered.mjs +10 -2
- package/recipes/input-button.mjs +10 -2
- package/recipes/layout.css +25 -0
- package/recipes/layout.d.ts +24 -0
- package/recipes/layout.layered.css +25 -0
- package/recipes/layout.layered.mjs +44 -0
- package/recipes/layout.mjs +44 -0
- package/recipes/list-item.css +72 -4
- package/recipes/list-item.layered.css +84 -4
- package/recipes/menu-item.css +174 -0
- package/recipes/menu-item.d.ts +35 -0
- package/recipes/menu-item.layered.css +200 -0
- package/recipes/menu-item.layered.mjs +57 -0
- package/recipes/menu-item.mjs +57 -0
- package/recipes/menu-sheet-item.d.ts +6 -0
- package/recipes/menu-sheet.css +19 -1
- package/recipes/menu-sheet.layered.css +22 -1
- package/recipes/menu.css +119 -0
- package/recipes/menu.d.ts +28 -0
- package/recipes/menu.layered.css +139 -0
- package/recipes/menu.layered.mjs +56 -0
- package/recipes/menu.mjs +56 -0
- package/recipes/notification-badge.d.ts +3 -0
- package/recipes/page-banner.d.ts +5 -0
- package/recipes/progress-circle.d.ts +7 -0
- package/recipes/{selectBoxCheckmark.css → select-box-checkmark.css} +6 -6
- package/recipes/{selectBoxCheckmark.layered.css → select-box-checkmark.layered.css} +6 -6
- package/recipes/{selectBoxCheckmark.layered.mjs → select-box-checkmark.layered.mjs} +4 -4
- package/recipes/{selectBoxCheckmark.mjs → select-box-checkmark.mjs} +4 -4
- package/recipes/side-navigation-inset.css +4 -0
- package/recipes/side-navigation-inset.d.ts +19 -0
- package/recipes/side-navigation-inset.layered.css +6 -0
- package/recipes/side-navigation-inset.layered.mjs +22 -0
- package/recipes/side-navigation-inset.mjs +22 -0
- package/recipes/side-navigation-menu-item.css +135 -0
- package/recipes/side-navigation-menu-item.d.ts +21 -0
- package/recipes/side-navigation-menu-item.layered.css +156 -0
- package/recipes/side-navigation-menu-item.layered.mjs +48 -0
- package/recipes/side-navigation-menu-item.mjs +48 -0
- package/recipes/side-navigation.css +115 -0
- package/recipes/side-navigation.d.ts +24 -0
- package/recipes/side-navigation.layered.css +132 -0
- package/recipes/side-navigation.layered.mjs +63 -0
- package/recipes/side-navigation.mjs +63 -0
- package/recipes/side-panel.css +327 -0
- package/recipes/side-panel.d.ts +24 -0
- package/recipes/side-panel.layered.css +361 -0
- package/recipes/side-panel.layered.mjs +72 -0
- package/recipes/side-panel.mjs +72 -0
- package/recipes/skeleton.css +36 -2
- package/recipes/skeleton.d.ts +8 -0
- package/recipes/skeleton.layered.css +40 -2
- package/recipes/text-input.css +323 -52
- package/recipes/text-input.d.ts +8 -1
- package/recipes/text-input.layered.css +385 -51
- package/recipes/text-input.layered.mjs +18 -1
- package/recipes/text-input.mjs +18 -1
- package/recipes/text.css +180 -0
- package/recipes/text.d.ts +59 -1
- package/recipes/text.layered.css +216 -0
- package/recipes/text.layered.mjs +37 -1
- package/recipes/text.mjs +37 -1
- package/recipes/toggle-button.d.ts +3 -0
- package/vars/color/bg.d.ts +2 -2
- package/vars/color/bg.mjs +2 -1
- package/vars/color/stroke.d.ts +2 -2
- package/vars/color/stroke.mjs +2 -2
- package/vars/component/accordion-item.d.ts +132 -0
- package/vars/component/accordion-item.mjs +126 -0
- package/vars/component/accordion.d.ts +22 -0
- package/vars/component/accordion.mjs +16 -0
- package/vars/component/attachment-input-dropzone.d.ts +32 -0
- package/vars/component/attachment-input-dropzone.mjs +30 -0
- package/vars/component/attachment-input-item-action-button.d.ts +37 -0
- package/vars/component/attachment-input-item-action-button.mjs +37 -0
- package/vars/component/attachment-input-item-remove-button.d.ts +28 -0
- package/vars/component/attachment-input-item-remove-button.mjs +28 -0
- package/vars/component/attachment-input-item.d.ts +103 -0
- package/vars/component/attachment-input-item.mjs +102 -0
- package/vars/component/attachment-input-trigger.d.ts +46 -0
- package/vars/component/attachment-input-trigger.mjs +46 -0
- package/vars/component/attachment-input.d.ts +14 -0
- package/vars/component/attachment-input.mjs +12 -0
- package/vars/component/chip-tablist.d.ts +0 -7
- package/vars/component/chip-tablist.mjs +0 -7
- package/vars/component/image-frame.d.ts +1 -22
- package/vars/component/image-frame.mjs +1 -9
- package/vars/component/index.d.ts +12 -1
- package/vars/component/index.mjs +12 -1
- package/vars/component/input-button.d.ts +90 -17
- package/vars/component/input-button.mjs +84 -17
- package/vars/component/menu-item.d.ts +129 -0
- package/vars/component/menu-item.mjs +117 -0
- package/vars/component/menu.d.ts +68 -0
- package/vars/component/menu.mjs +60 -0
- package/vars/component/side-panel-close-button.d.ts +23 -0
- package/vars/component/side-panel-close-button.mjs +23 -0
- package/vars/component/side-panel.d.ts +94 -0
- package/vars/component/side-panel.mjs +83 -0
- package/vars/component/text-input.d.ts +92 -24
- package/vars/component/text-input.mjs +76 -24
- package/vars/component/typography.d.ts +414 -0
- package/vars/component/typography.mjs +324 -0
- package/vars/font-size.d.ts +17 -1
- package/vars/font-size.mjs +9 -1
- package/vars/gradient.d.ts +0 -8
- package/vars/gradient.mjs +0 -2
- package/vars/line-height.d.ts +17 -1
- package/vars/line-height.mjs +9 -1
- package/vars/component/chip-tab.d.ts +0 -162
- package/vars/component/chip-tab.mjs +0 -162
- /package/recipes/{selectBoxCheckmark.d.ts → select-box-checkmark.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer seed-components {
|
|
2
|
-
.seed-
|
|
2
|
+
.seed-select-box-checkmark__root {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
width: var(--seed-dimension-x5);
|
|
5
5
|
height: var(--seed-dimension-x5);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.seed-
|
|
10
|
+
.seed-select-box-checkmark__icon {
|
|
11
11
|
text-align: center;
|
|
12
12
|
overflow: initial;
|
|
13
13
|
width: 15px;
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@media (hover: hover) and (pointer: fine) {
|
|
24
|
-
.seed-
|
|
24
|
+
.seed-select-box-checkmark__icon:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
|
|
25
25
|
color: var(--seed-color-fg-neutral-subtle);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@media not all and (hover: hover) and (pointer: fine) {
|
|
30
|
-
.seed-
|
|
30
|
+
.seed-select-box-checkmark__icon:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
31
31
|
color: var(--seed-color-fg-neutral-subtle);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.seed-
|
|
35
|
+
.seed-select-box-checkmark__icon:not(:is(:disabled, [disabled], [data-disabled])):is(:checked, [data-checked]) {
|
|
36
36
|
color: var(--seed-color-fg-neutral);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.seed-
|
|
39
|
+
.seed-select-box-checkmark__icon:is(:disabled, [disabled], [data-disabled]) {
|
|
40
40
|
color: var(--seed-color-fg-disabled);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './select-box-checkmark.layered.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
4
|
const selectBoxCheckmarkSlotNames = [
|
|
5
5
|
[
|
|
6
6
|
"root",
|
|
7
|
-
"seed-
|
|
7
|
+
"seed-select-box-checkmark__root"
|
|
8
8
|
],
|
|
9
9
|
[
|
|
10
10
|
"icon",
|
|
11
|
-
"seed-
|
|
11
|
+
"seed-select-box-checkmark__icon"
|
|
12
12
|
]
|
|
13
13
|
];
|
|
14
14
|
|
|
@@ -33,4 +33,4 @@ export function selectBoxCheckmark(props) {
|
|
|
33
33
|
|
|
34
34
|
Object.assign(selectBoxCheckmark, { splitVariantProps: (props) => splitVariantProps(props, selectBoxCheckmarkVariantMap) });
|
|
35
35
|
|
|
36
|
-
// @recipe(seed):
|
|
36
|
+
// @recipe(seed): select-box-checkmark
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './select-box-checkmark.css';
|
|
2
2
|
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
3
|
|
|
4
4
|
const selectBoxCheckmarkSlotNames = [
|
|
5
5
|
[
|
|
6
6
|
"root",
|
|
7
|
-
"seed-
|
|
7
|
+
"seed-select-box-checkmark__root"
|
|
8
8
|
],
|
|
9
9
|
[
|
|
10
10
|
"icon",
|
|
11
|
-
"seed-
|
|
11
|
+
"seed-select-box-checkmark__icon"
|
|
12
12
|
]
|
|
13
13
|
];
|
|
14
14
|
|
|
@@ -33,4 +33,4 @@ export function selectBoxCheckmark(props) {
|
|
|
33
33
|
|
|
34
34
|
Object.assign(selectBoxCheckmark, { splitVariantProps: (props) => splitVariantProps(props, selectBoxCheckmarkVariantMap) });
|
|
35
35
|
|
|
36
|
-
// @recipe(seed):
|
|
36
|
+
// @recipe(seed): select-box-checkmark
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare interface SideNavigationInsetVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type SideNavigationInsetVariantMap = {
|
|
6
|
+
[key in keyof SideNavigationInsetVariant]: Array<SideNavigationInsetVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type SideNavigationInsetVariantProps = Partial<SideNavigationInsetVariant>;
|
|
10
|
+
|
|
11
|
+
export declare const sideNavigationInsetVariantMap: SideNavigationInsetVariantMap;
|
|
12
|
+
|
|
13
|
+
export declare const sideNavigationInset: ((
|
|
14
|
+
props?: SideNavigationInsetVariantProps,
|
|
15
|
+
) => string) & {
|
|
16
|
+
splitVariantProps: <T extends SideNavigationInsetVariantProps>(
|
|
17
|
+
props: T,
|
|
18
|
+
) => [SideNavigationInsetVariantProps, Omit<T, keyof SideNavigationInsetVariantProps>];
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './side-navigation-inset.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const defaultVariant = {};
|
|
5
|
+
|
|
6
|
+
const compoundVariants = [];
|
|
7
|
+
|
|
8
|
+
export const sideNavigationInsetVariantMap = {};
|
|
9
|
+
|
|
10
|
+
export const sideNavigationInsetVariantKeys = Object.keys(sideNavigationInsetVariantMap);
|
|
11
|
+
|
|
12
|
+
export function sideNavigationInset(props) {
|
|
13
|
+
return createClassName(
|
|
14
|
+
"seed-side-navigation-inset",
|
|
15
|
+
mergeVariants(defaultVariant, props),
|
|
16
|
+
compoundVariants,
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
Object.assign(sideNavigationInset, { splitVariantProps: (props) => splitVariantProps(props, sideNavigationInsetVariantMap) });
|
|
21
|
+
|
|
22
|
+
// @recipe(seed): side-navigation-inset
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './side-navigation-inset.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const defaultVariant = {};
|
|
5
|
+
|
|
6
|
+
const compoundVariants = [];
|
|
7
|
+
|
|
8
|
+
export const sideNavigationInsetVariantMap = {};
|
|
9
|
+
|
|
10
|
+
export const sideNavigationInsetVariantKeys = Object.keys(sideNavigationInsetVariantMap);
|
|
11
|
+
|
|
12
|
+
export function sideNavigationInset(props) {
|
|
13
|
+
return createClassName(
|
|
14
|
+
"seed-side-navigation-inset",
|
|
15
|
+
mergeVariants(defaultVariant, props),
|
|
16
|
+
compoundVariants,
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
Object.assign(sideNavigationInset, { splitVariantProps: (props) => splitVariantProps(props, sideNavigationInsetVariantMap) });
|
|
21
|
+
|
|
22
|
+
// @recipe(seed): side-navigation-inset
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.seed-side-navigation-menu-item__root {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
height: 44px;
|
|
7
|
+
padding-left: 8px;
|
|
8
|
+
padding-right: 8px;
|
|
9
|
+
width: 100%;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-align: left;
|
|
12
|
+
background: none;
|
|
13
|
+
border: none;
|
|
14
|
+
border-radius: 10px;
|
|
15
|
+
outline: none;
|
|
16
|
+
transition: padding 200ms, background-color 200ms;
|
|
17
|
+
scroll-margin-top: 8px;
|
|
18
|
+
scroll-margin-bottom: 24px;
|
|
19
|
+
}
|
|
20
|
+
.seed-side-navigation-menu-item__root::before {
|
|
21
|
+
content: "";
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
right: 0;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
border-radius: 10px;
|
|
28
|
+
outline: var(--seed-dimension-x0_5) solid transparent;
|
|
29
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
30
|
+
transition: background-color 200ms, outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
31
|
+
}
|
|
32
|
+
.seed-side-navigation-menu-item__root:is(:focus-visible, [data-focus-visible])::before {
|
|
33
|
+
outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
|
|
34
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
35
|
+
}
|
|
36
|
+
.seed-side-navigation-menu-item__root[data-side-navigation-state=collapsed]::before {
|
|
37
|
+
right: unset;
|
|
38
|
+
width: calc(56px - 8px * 2);
|
|
39
|
+
}
|
|
40
|
+
.seed-side-navigation-menu-item__root:is(:disabled, [disabled], [data-disabled]) {
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
}
|
|
43
|
+
.seed-side-navigation-menu-item__root:not(:is(:disabled, [disabled], [data-disabled])) {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
@media (hover: hover) and (pointer: fine) {
|
|
47
|
+
.seed-side-navigation-menu-item__root:not(:is(:disabled, [disabled], [data-disabled])):not([data-current]):is(:hover, [data-hover])::before {
|
|
48
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
@media not all and (hover: hover) and (pointer: fine) {
|
|
52
|
+
.seed-side-navigation-menu-item__root:not(:is(:disabled, [disabled], [data-disabled])):not([data-current]):is(:active, [data-active])::before {
|
|
53
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.seed-side-navigation-menu-item__root[data-current] {
|
|
57
|
+
background-color: var(--seed-color-bg-transparent-selected);
|
|
58
|
+
}
|
|
59
|
+
@media (hover: hover) and (pointer: fine) {
|
|
60
|
+
.seed-side-navigation-menu-item__root[data-current]:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
|
|
61
|
+
background-color: var(--seed-color-bg-transparent-selected-pressed);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
@media not all and (hover: hover) and (pointer: fine) {
|
|
65
|
+
.seed-side-navigation-menu-item__root[data-current]:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
66
|
+
background-color: var(--seed-color-bg-transparent-selected-pressed);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.seed-side-navigation-menu-item__root[data-side-navigation-state=collapsed] {
|
|
70
|
+
padding-left: 10px;
|
|
71
|
+
padding-right: 10px;
|
|
72
|
+
}
|
|
73
|
+
.seed-side-navigation-menu-item__prefixIcon {
|
|
74
|
+
width: 20px;
|
|
75
|
+
height: 20px;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
color: var(--seed-color-palette-gray-600);
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: 50%;
|
|
80
|
+
transform: translateY(-50%);
|
|
81
|
+
transition: color 200ms;
|
|
82
|
+
}
|
|
83
|
+
.seed-side-navigation-menu-item__prefixIcon[data-current] {
|
|
84
|
+
color: var(--seed-color-fg-neutral);
|
|
85
|
+
}
|
|
86
|
+
.seed-side-navigation-menu-item__prefixIcon:is(:disabled, [disabled], [data-disabled]) {
|
|
87
|
+
color: var(--seed-color-fg-disabled);
|
|
88
|
+
}
|
|
89
|
+
.seed-side-navigation-menu-item__label {
|
|
90
|
+
padding: 6px;
|
|
91
|
+
flex-grow: 1;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
text-overflow: ellipsis;
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
97
|
+
font-size: var(--seed-font-size-t4);
|
|
98
|
+
line-height: var(--seed-line-height-t4);
|
|
99
|
+
font-weight: var(--seed-font-weight-medium);
|
|
100
|
+
padding-left: calc(20px + 12px);
|
|
101
|
+
transition: opacity 200ms, color 200ms;
|
|
102
|
+
}
|
|
103
|
+
.seed-side-navigation-menu-item__label[data-side-navigation-state=collapsed] {
|
|
104
|
+
opacity: 0;
|
|
105
|
+
}
|
|
106
|
+
.seed-side-navigation-menu-item__label[data-current] {
|
|
107
|
+
color: var(--seed-color-fg-neutral);
|
|
108
|
+
}
|
|
109
|
+
.seed-side-navigation-menu-item__label:is(:disabled, [disabled], [data-disabled]) {
|
|
110
|
+
color: var(--seed-color-fg-disabled);
|
|
111
|
+
}
|
|
112
|
+
.seed-side-navigation-menu-item__suffixIcon {
|
|
113
|
+
width: 16px;
|
|
114
|
+
height: 16px;
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
117
|
+
transition: transform 200ms, opacity 200ms;
|
|
118
|
+
}
|
|
119
|
+
.seed-side-navigation-menu-item__suffixIcon:not(:is([data-state="open"], [data-open])) {
|
|
120
|
+
transform: rotate(180deg);
|
|
121
|
+
}
|
|
122
|
+
.seed-side-navigation-menu-item__suffixIcon[data-side-navigation-state=collapsed] {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
}
|
|
125
|
+
.seed-side-navigation-menu-item__panel[data-collapsible] {
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
height: 0;
|
|
128
|
+
opacity: 0;
|
|
129
|
+
transition: height 200ms, opacity 200ms;
|
|
130
|
+
}
|
|
131
|
+
.seed-side-navigation-menu-item__panel[data-collapsible]:is([data-state="open"], [data-open]) {
|
|
132
|
+
height: var(--collapsible-content-height);
|
|
133
|
+
opacity: 1;
|
|
134
|
+
transition: height 200ms, opacity 200ms;
|
|
135
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare interface SideNavigationMenuItemVariant {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
declare type SideNavigationMenuItemVariantMap = {
|
|
6
|
+
[key in keyof SideNavigationMenuItemVariant]: Array<SideNavigationMenuItemVariant[key]>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare type SideNavigationMenuItemVariantProps = Partial<SideNavigationMenuItemVariant>;
|
|
10
|
+
|
|
11
|
+
export declare type SideNavigationMenuItemSlotName = "root" | "prefixIcon" | "label" | "suffixIcon" | "panel";
|
|
12
|
+
|
|
13
|
+
export declare const sideNavigationMenuItemVariantMap: SideNavigationMenuItemVariantMap;
|
|
14
|
+
|
|
15
|
+
export declare const sideNavigationMenuItem: ((
|
|
16
|
+
props?: SideNavigationMenuItemVariantProps,
|
|
17
|
+
) => Record<SideNavigationMenuItemSlotName, string>) & {
|
|
18
|
+
splitVariantProps: <T extends SideNavigationMenuItemVariantProps>(
|
|
19
|
+
props: T,
|
|
20
|
+
) => [SideNavigationMenuItemVariantProps, Omit<T, keyof SideNavigationMenuItemVariantProps>];
|
|
21
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@layer seed-components {
|
|
2
|
+
.seed-side-navigation-menu-item__root {
|
|
3
|
+
text-align: left;
|
|
4
|
+
background: none;
|
|
5
|
+
border: none;
|
|
6
|
+
border-radius: 10px;
|
|
7
|
+
outline: none;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 12px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 44px;
|
|
12
|
+
padding-left: 8px;
|
|
13
|
+
padding-right: 8px;
|
|
14
|
+
scroll-margin-top: 8px;
|
|
15
|
+
scroll-margin-bottom: 24px;
|
|
16
|
+
transition: padding .2s, background-color .2s;
|
|
17
|
+
display: flex;
|
|
18
|
+
position: relative;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.seed-side-navigation-menu-item__root:before {
|
|
23
|
+
content: "";
|
|
24
|
+
outline: var(--seed-dimension-x0_5) solid transparent;
|
|
25
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
26
|
+
transition: background-color .2s, outline-color var(--seed-duration-d3) var(--seed-timing-function-easing);
|
|
27
|
+
border-radius: 10px;
|
|
28
|
+
position: absolute;
|
|
29
|
+
inset: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.seed-side-navigation-menu-item__root:is(:focus-visible, [data-focus-visible]):before {
|
|
33
|
+
outline: var(--seed-dimension-x0_5) solid var(--seed-color-stroke-focus-ring);
|
|
34
|
+
outline-offset: calc(var(--seed-dimension-x0_5) * -1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.seed-side-navigation-menu-item__root[data-side-navigation-state="collapsed"]:before {
|
|
38
|
+
right: unset;
|
|
39
|
+
width: 40px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.seed-side-navigation-menu-item__root:is(:disabled, [disabled], [data-disabled]) {
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.seed-side-navigation-menu-item__root:not(:is(:disabled, [disabled], [data-disabled])) {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (hover: hover) and (pointer: fine) {
|
|
51
|
+
.seed-side-navigation-menu-item__root:not(:is(:disabled, [disabled], [data-disabled])):not([data-current]):is(:hover, [data-hover]):before {
|
|
52
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media not all and (hover: hover) and (pointer: fine) {
|
|
57
|
+
.seed-side-navigation-menu-item__root:not(:is(:disabled, [disabled], [data-disabled])):not([data-current]):is(:active, [data-active]):before {
|
|
58
|
+
background-color: var(--seed-color-bg-transparent-pressed);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.seed-side-navigation-menu-item__root[data-current] {
|
|
63
|
+
background-color: var(--seed-color-bg-transparent-selected);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (hover: hover) and (pointer: fine) {
|
|
67
|
+
.seed-side-navigation-menu-item__root[data-current]:not(:is(:disabled, [disabled], [data-disabled])):is(:hover, [data-hover]) {
|
|
68
|
+
background-color: var(--seed-color-bg-transparent-selected-pressed);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media not all and (hover: hover) and (pointer: fine) {
|
|
73
|
+
.seed-side-navigation-menu-item__root[data-current]:not(:is(:disabled, [disabled], [data-disabled])):is(:active, [data-active]) {
|
|
74
|
+
background-color: var(--seed-color-bg-transparent-selected-pressed);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.seed-side-navigation-menu-item__root[data-side-navigation-state="collapsed"] {
|
|
79
|
+
padding-left: 10px;
|
|
80
|
+
padding-right: 10px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.seed-side-navigation-menu-item__prefixIcon {
|
|
84
|
+
width: 20px;
|
|
85
|
+
height: 20px;
|
|
86
|
+
color: var(--seed-color-palette-gray-600);
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
transition: color .2s;
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 50%;
|
|
91
|
+
transform: translateY(-50%);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.seed-side-navigation-menu-item__prefixIcon[data-current] {
|
|
95
|
+
color: var(--seed-color-fg-neutral);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.seed-side-navigation-menu-item__prefixIcon:is(:disabled, [disabled], [data-disabled]) {
|
|
99
|
+
color: var(--seed-color-fg-disabled);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.seed-side-navigation-menu-item__label {
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
color: var(--seed-color-fg-neutral-muted);
|
|
107
|
+
font-size: var(--seed-font-size-t4);
|
|
108
|
+
line-height: var(--seed-line-height-t4);
|
|
109
|
+
font-weight: var(--seed-font-weight-medium);
|
|
110
|
+
flex-grow: 1;
|
|
111
|
+
padding: 6px 6px 6px 32px;
|
|
112
|
+
transition: opacity .2s, color .2s;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.seed-side-navigation-menu-item__label[data-side-navigation-state="collapsed"] {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.seed-side-navigation-menu-item__label[data-current] {
|
|
121
|
+
color: var(--seed-color-fg-neutral);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.seed-side-navigation-menu-item__label:is(:disabled, [disabled], [data-disabled]) {
|
|
125
|
+
color: var(--seed-color-fg-disabled);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.seed-side-navigation-menu-item__suffixIcon {
|
|
129
|
+
width: 16px;
|
|
130
|
+
height: 16px;
|
|
131
|
+
color: var(--seed-color-fg-neutral-subtle);
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
transition: transform .2s, opacity .2s;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.seed-side-navigation-menu-item__suffixIcon:not(:is([data-state="open"], [data-open])) {
|
|
137
|
+
transform: rotate(180deg);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.seed-side-navigation-menu-item__suffixIcon[data-side-navigation-state="collapsed"] {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.seed-side-navigation-menu-item__panel[data-collapsible] {
|
|
145
|
+
opacity: 0;
|
|
146
|
+
height: 0;
|
|
147
|
+
transition: height .2s, opacity .2s;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.seed-side-navigation-menu-item__panel[data-collapsible]:is([data-state="open"], [data-open]) {
|
|
152
|
+
height: var(--collapsible-content-height);
|
|
153
|
+
opacity: 1;
|
|
154
|
+
transition: height .2s, opacity .2s;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import './side-navigation-menu-item.layered.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const sideNavigationMenuItemSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-side-navigation-menu-item__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"prefixIcon",
|
|
11
|
+
"seed-side-navigation-menu-item__prefixIcon"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"label",
|
|
15
|
+
"seed-side-navigation-menu-item__label"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"suffixIcon",
|
|
19
|
+
"seed-side-navigation-menu-item__suffixIcon"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"panel",
|
|
23
|
+
"seed-side-navigation-menu-item__panel"
|
|
24
|
+
]
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const defaultVariant = {};
|
|
28
|
+
|
|
29
|
+
const compoundVariants = [];
|
|
30
|
+
|
|
31
|
+
export const sideNavigationMenuItemVariantMap = {};
|
|
32
|
+
|
|
33
|
+
export const sideNavigationMenuItemVariantKeys = Object.keys(sideNavigationMenuItemVariantMap);
|
|
34
|
+
|
|
35
|
+
export function sideNavigationMenuItem(props) {
|
|
36
|
+
return Object.fromEntries(
|
|
37
|
+
sideNavigationMenuItemSlotNames.map(([slot, className]) => {
|
|
38
|
+
return [
|
|
39
|
+
slot,
|
|
40
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
41
|
+
];
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Object.assign(sideNavigationMenuItem, { splitVariantProps: (props) => splitVariantProps(props, sideNavigationMenuItemVariantMap) });
|
|
47
|
+
|
|
48
|
+
// @recipe(seed): side-navigation-menu-item
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import './side-navigation-menu-item.css';
|
|
2
|
+
import { createClassName, mergeVariants, splitVariantProps } from "./shared.mjs";
|
|
3
|
+
|
|
4
|
+
const sideNavigationMenuItemSlotNames = [
|
|
5
|
+
[
|
|
6
|
+
"root",
|
|
7
|
+
"seed-side-navigation-menu-item__root"
|
|
8
|
+
],
|
|
9
|
+
[
|
|
10
|
+
"prefixIcon",
|
|
11
|
+
"seed-side-navigation-menu-item__prefixIcon"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"label",
|
|
15
|
+
"seed-side-navigation-menu-item__label"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"suffixIcon",
|
|
19
|
+
"seed-side-navigation-menu-item__suffixIcon"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"panel",
|
|
23
|
+
"seed-side-navigation-menu-item__panel"
|
|
24
|
+
]
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const defaultVariant = {};
|
|
28
|
+
|
|
29
|
+
const compoundVariants = [];
|
|
30
|
+
|
|
31
|
+
export const sideNavigationMenuItemVariantMap = {};
|
|
32
|
+
|
|
33
|
+
export const sideNavigationMenuItemVariantKeys = Object.keys(sideNavigationMenuItemVariantMap);
|
|
34
|
+
|
|
35
|
+
export function sideNavigationMenuItem(props) {
|
|
36
|
+
return Object.fromEntries(
|
|
37
|
+
sideNavigationMenuItemSlotNames.map(([slot, className]) => {
|
|
38
|
+
return [
|
|
39
|
+
slot,
|
|
40
|
+
createClassName(className, mergeVariants(defaultVariant, props), compoundVariants),
|
|
41
|
+
];
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Object.assign(sideNavigationMenuItem, { splitVariantProps: (props) => splitVariantProps(props, sideNavigationMenuItemVariantMap) });
|
|
47
|
+
|
|
48
|
+
// @recipe(seed): side-navigation-menu-item
|