@oscarrf2/goo-ds 0.1.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/README.md +163 -0
- package/package.json +60 -0
- package/src/components/Button/Button.css +107 -0
- package/src/components/Button/Button.tsx +82 -0
- package/src/components/Button/Button.types.ts +62 -0
- package/src/components/Button/index.ts +3 -0
- package/src/components/Cell/Cell.css +64 -0
- package/src/components/Cell/Cell.tsx +42 -0
- package/src/components/Cell/Cell.types.ts +42 -0
- package/src/components/Cell/index.ts +3 -0
- package/src/components/Codeblock/Codeblock.css +90 -0
- package/src/components/Codeblock/Codeblock.tsx +88 -0
- package/src/components/Codeblock/Codeblock.types.ts +42 -0
- package/src/components/Codeblock/index.ts +3 -0
- package/src/components/CoreText/CoreText.tsx +43 -0
- package/src/components/CoreText/CoreText.types.ts +56 -0
- package/src/components/CoreText/index.ts +2 -0
- package/src/components/Divider/Divider.css +38 -0
- package/src/components/Divider/Divider.tsx +35 -0
- package/src/components/Divider/Divider.types.ts +19 -0
- package/src/components/Divider/index.ts +3 -0
- package/src/components/InputImage/InputImage.css +212 -0
- package/src/components/InputImage/InputImage.tsx +314 -0
- package/src/components/InputImage/InputImage.types.ts +86 -0
- package/src/components/InputImage/index.ts +2 -0
- package/src/components/Sidebar/Sidebar.css +35 -0
- package/src/components/Sidebar/Sidebar.tsx +42 -0
- package/src/components/Sidebar/Sidebar.types.ts +24 -0
- package/src/components/Sidebar/index.ts +3 -0
- package/src/components/SidebarItem/SidebarItem.css +70 -0
- package/src/components/SidebarItem/SidebarItem.tsx +55 -0
- package/src/components/SidebarItem/SidebarItem.types.ts +39 -0
- package/src/components/SidebarItem/index.ts +3 -0
- package/src/components/Skeleton/Skeleton.css +25 -0
- package/src/components/Skeleton/Skeleton.tsx +41 -0
- package/src/components/Skeleton/Skeleton.types.ts +65 -0
- package/src/components/Skeleton/index.ts +5 -0
- package/src/components/Spacer/Spacer.tsx +31 -0
- package/src/components/Spacer/Spacer.types.ts +58 -0
- package/src/components/Spacer/index.ts +3 -0
- package/src/components/TabItem/TabItem.css +67 -0
- package/src/components/TabItem/TabItem.tsx +45 -0
- package/src/components/TabItem/TabItem.types.ts +35 -0
- package/src/components/TabItem/index.ts +3 -0
- package/src/components/Table/Table.css +16 -0
- package/src/components/Table/Table.tsx +39 -0
- package/src/components/Table/Table.types.ts +18 -0
- package/src/components/Table/index.ts +3 -0
- package/src/components/TableRow/TableRow.css +53 -0
- package/src/components/TableRow/TableRow.tsx +53 -0
- package/src/components/TableRow/TableRow.types.ts +41 -0
- package/src/components/TableRow/index.ts +3 -0
- package/src/components/Tabs/Tabs.css +11 -0
- package/src/components/Tabs/Tabs.tsx +37 -0
- package/src/components/Tabs/Tabs.types.ts +18 -0
- package/src/components/Tabs/index.ts +3 -0
- package/src/components/index.ts +15 -0
- package/src/compositions/index.ts +3 -0
- package/src/index.css +68 -0
- package/src/index.ts +4 -0
- package/src/styles/component-tokens.css +270 -0
- package/src/styles/component-tokens.current.css +3 -0
- package/src/styles/fonts.css +11 -0
- package/src/styles/global-tokens.css +257 -0
- package/src/styles/index.css +20 -0
- package/src/styles/number-tokens.css +72 -0
- package/src/styles/semantic-tokens.css +84 -0
- package/src/styles/style-tokens.css +219 -0
- package/src/styles/typography-tokens.css +50 -0
- package/src/styles.css +2 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codeblock component styles
|
|
3
|
+
* Token-driven code display styling for the goo-ds design system
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.gds-codeblock {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
gap: var(--codeblock-medium-gap);
|
|
12
|
+
padding: var(--codeblock-medium-paddingVertical) var(--codeblock-medium-paddingHorizontal);
|
|
13
|
+
background-color: var(--codeblock-background-default);
|
|
14
|
+
border: var(--codeblock-medium-strokeWidth) solid var(--codeblock-stroke-default);
|
|
15
|
+
border-radius: var(--codeblock-medium-radius);
|
|
16
|
+
overflow: clip;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Code content area */
|
|
22
|
+
.gds-codeblock-content {
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow-x: auto;
|
|
27
|
+
font-family: var(--coreText-family-primary);
|
|
28
|
+
font-size: var(--font-size-sm);
|
|
29
|
+
font-weight: var(--font-weight-regular);
|
|
30
|
+
line-height: var(--font-lineHeight-sm);
|
|
31
|
+
color: var(--codeblock-text-default);
|
|
32
|
+
white-space: pre;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.gds-codeblock-content code {
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
font-size: inherit;
|
|
39
|
+
background: none;
|
|
40
|
+
padding: 0;
|
|
41
|
+
border: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Copy button */
|
|
45
|
+
.gds-codeblock-copy-button {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 7px;
|
|
48
|
+
right: 7px;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
gap: var(--button-extraSmall-cta-gap);
|
|
53
|
+
min-height: 24px;
|
|
54
|
+
padding: var(--button-extraSmall-cta-paddingVertical) var(--button-extraSmall-cta-paddingHorizontal);
|
|
55
|
+
border-radius: var(--button-extraSmall-cta-radius);
|
|
56
|
+
border: none;
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
color: var(--button-ghost-text-default);
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
transition: background-color 0.2s ease;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
font-family: var(--coreText-family-primary);
|
|
63
|
+
font-size: var(--font-size-xs);
|
|
64
|
+
font-weight: var(--font-weight-medium);
|
|
65
|
+
line-height: var(--font-lineHeight-xs);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.gds-codeblock-copy-button:hover {
|
|
69
|
+
background-color: var(--button-ghost-background-hover);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.gds-codeblock-copy-button:active {
|
|
73
|
+
background-color: var(--button-ghost-background-pressed);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.gds-codeblock-copy-button:focus-visible {
|
|
77
|
+
outline: 2px solid var(--color-stroke-focus);
|
|
78
|
+
outline-offset: 2px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.gds-codeblock-copy-text {
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Respect user's motion preferences */
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
.gds-codeblock-copy-button {
|
|
88
|
+
transition: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState, useRef } from "react";
|
|
4
|
+
import type { CodeblockProps } from "./Codeblock.types";
|
|
5
|
+
import "./Codeblock.css";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Codeblock - Code display component for the goo-ds design system
|
|
9
|
+
*
|
|
10
|
+
* Provides consistent code block display with copy functionality.
|
|
11
|
+
* Token-first per Constitution (no hardcoded values).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Codeblock>
|
|
16
|
+
* const greeting = "Hello, world!";
|
|
17
|
+
* console.log(greeting);
|
|
18
|
+
* </Codeblock>
|
|
19
|
+
*
|
|
20
|
+
* <Codeblock showCopy={false}>
|
|
21
|
+
* function example() {
|
|
22
|
+
* return true;
|
|
23
|
+
* }
|
|
24
|
+
* </Codeblock>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function Codeblock({
|
|
28
|
+
children,
|
|
29
|
+
showCopy = true,
|
|
30
|
+
copyLabel = "Copy",
|
|
31
|
+
copiedLabel = "Copied!",
|
|
32
|
+
onCodeCopy,
|
|
33
|
+
className = "",
|
|
34
|
+
...props
|
|
35
|
+
}: CodeblockProps) {
|
|
36
|
+
const [copied, setCopied] = useState(false);
|
|
37
|
+
const codeRef = useRef<HTMLPreElement>(null);
|
|
38
|
+
|
|
39
|
+
const handleCopy = async () => {
|
|
40
|
+
if (!codeRef.current) return;
|
|
41
|
+
|
|
42
|
+
const textContent = codeRef.current.textContent || "";
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
await navigator.clipboard.writeText(textContent);
|
|
46
|
+
setCopied(true);
|
|
47
|
+
|
|
48
|
+
if (onCodeCopy) {
|
|
49
|
+
onCodeCopy(textContent);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Reset copied state after 2 seconds
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
setCopied(false);
|
|
55
|
+
}, 2000);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
console.error("Failed to copy code:", err);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
className={`gds-codeblock ${className}`.trim()}
|
|
64
|
+
data-component="Codeblock"
|
|
65
|
+
data-show-copy={showCopy}
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
<pre ref={codeRef} className="gds-codeblock-content">
|
|
69
|
+
<code>{children}</code>
|
|
70
|
+
</pre>
|
|
71
|
+
|
|
72
|
+
{showCopy && (
|
|
73
|
+
<button
|
|
74
|
+
type="button"
|
|
75
|
+
className="gds-codeblock-copy-button"
|
|
76
|
+
onClick={handleCopy}
|
|
77
|
+
aria-label={copied ? copiedLabel : copyLabel}
|
|
78
|
+
>
|
|
79
|
+
<span className="gds-codeblock-copy-text">
|
|
80
|
+
{copied ? copiedLabel : copyLabel}
|
|
81
|
+
</span>
|
|
82
|
+
</button>
|
|
83
|
+
)}
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default Codeblock;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Codeblock component props
|
|
5
|
+
* Provides code display with copy functionality using design system tokens
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface CodeblockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Code content to display
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Whether to show the copy button
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
showCopy?: boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Custom copy button label
|
|
22
|
+
* @default "Copy"
|
|
23
|
+
*/
|
|
24
|
+
copyLabel?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Label shown after successful copy
|
|
28
|
+
* @default "Copied!"
|
|
29
|
+
*/
|
|
30
|
+
copiedLabel?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Callback when copy button is clicked
|
|
34
|
+
* Receives the text content of the codeblock
|
|
35
|
+
*/
|
|
36
|
+
onCodeCopy?: (content: string) => void;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Additional CSS class names
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CoreTextProps } from "./CoreText.types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CoreText - Foundation typography component for the goo-ds design system
|
|
5
|
+
*
|
|
6
|
+
* Renders text with consistent typography styles defined in Figma.
|
|
7
|
+
* Styles are applied via CSS classes from style-tokens.css (token-first per Constitution).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <CoreText style="headline-lg-bold">Page Title</CoreText>
|
|
12
|
+
* <CoreText style="body-md-regular" align="center">Body text</CoreText>
|
|
13
|
+
* <CoreText style="link-md-medium" as="a" href="/page">Link text</CoreText>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export function CoreText({
|
|
17
|
+
children,
|
|
18
|
+
style = "body-md-regular",
|
|
19
|
+
align = "left",
|
|
20
|
+
className = "",
|
|
21
|
+
as: Component = "p",
|
|
22
|
+
}: CoreTextProps) {
|
|
23
|
+
// Alignment classes (structural utility per Constitution IV)
|
|
24
|
+
const alignmentClass =
|
|
25
|
+
align === "center" ? "text-center" : align === "right" ? "text-right" : "text-left";
|
|
26
|
+
|
|
27
|
+
// Combine style class from style-tokens.css with alignment and custom classes
|
|
28
|
+
const combinedClassName = [style, alignmentClass, className].filter(Boolean).join(" ");
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Component
|
|
32
|
+
className={combinedClassName}
|
|
33
|
+
style={{
|
|
34
|
+
color: "var(--coreText-text-primary-default)",
|
|
35
|
+
margin: 0,
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
{children}
|
|
39
|
+
</Component>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default CoreText;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CoreText style variants matching Figma text styles
|
|
5
|
+
* These map directly to CSS classes in style-tokens.css
|
|
6
|
+
*/
|
|
7
|
+
export type CoreTextStyle =
|
|
8
|
+
// Headlines (use secondary font: Geist)
|
|
9
|
+
| "headline-lg-bold"
|
|
10
|
+
| "headline-md-bold"
|
|
11
|
+
| "headline-sm-bold"
|
|
12
|
+
| "headline-sm-medium"
|
|
13
|
+
| "headline-sm-regular"
|
|
14
|
+
| "headline-xs-bold"
|
|
15
|
+
// Body (use primary font: Inter)
|
|
16
|
+
| "body-lg-bold"
|
|
17
|
+
| "body-lg-medium"
|
|
18
|
+
| "body-lg-regular"
|
|
19
|
+
| "body-md-bold"
|
|
20
|
+
| "body-md-medium"
|
|
21
|
+
| "body-md-regular"
|
|
22
|
+
| "body-sm-medium"
|
|
23
|
+
| "body-sm-regular"
|
|
24
|
+
| "body-xs-medium"
|
|
25
|
+
| "body-xs-regular"
|
|
26
|
+
// Labels (use primary font: Inter)
|
|
27
|
+
| "label-lg-medium"
|
|
28
|
+
| "label-lg-regular"
|
|
29
|
+
| "label-md-medium"
|
|
30
|
+
| "label-md-regular"
|
|
31
|
+
// Links (use primary font: Inter, with underline)
|
|
32
|
+
| "link-md-medium"
|
|
33
|
+
| "link-md-regular"
|
|
34
|
+
| "link-sm-medium"
|
|
35
|
+
| "link-sm-regular";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Text alignment options matching Figma variants
|
|
39
|
+
*/
|
|
40
|
+
export type CoreTextAlign = "left" | "center" | "right";
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* CoreText component props
|
|
44
|
+
*/
|
|
45
|
+
export interface CoreTextProps {
|
|
46
|
+
/** Text content to render */
|
|
47
|
+
children?: ReactNode;
|
|
48
|
+
/** Typography style variant (maps to CSS class from style-tokens.css) */
|
|
49
|
+
style?: CoreTextStyle;
|
|
50
|
+
/** Text alignment */
|
|
51
|
+
align?: CoreTextAlign;
|
|
52
|
+
/** Additional CSS class names */
|
|
53
|
+
className?: string;
|
|
54
|
+
/** Polymorphic element type (default: "p") */
|
|
55
|
+
as?: ElementType;
|
|
56
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Divider component styles
|
|
3
|
+
* Token-driven divider styling for the goo-ds design system
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.gds-divider {
|
|
7
|
+
display: flex;
|
|
8
|
+
position: relative;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Horizontal orientation */
|
|
13
|
+
.gds-divider-horizontal {
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.gds-divider-horizontal .gds-divider-line {
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 1px;
|
|
22
|
+
background-color: var(--divider-background-default);
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Vertical orientation */
|
|
27
|
+
.gds-divider-vertical {
|
|
28
|
+
align-items: center;
|
|
29
|
+
align-self: stretch;
|
|
30
|
+
height: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.gds-divider-vertical .gds-divider-line {
|
|
34
|
+
width: 1px;
|
|
35
|
+
height: 100%;
|
|
36
|
+
background-color: var(--divider-background-default);
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DividerProps } from "./Divider.types";
|
|
2
|
+
import "./Divider.css";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Divider - Divider component for the goo-ds design system
|
|
6
|
+
*
|
|
7
|
+
* Provides consistent visual separator in horizontal or vertical orientation.
|
|
8
|
+
* Token-first per Constitution (no hardcoded values).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Divider />
|
|
13
|
+
* <Divider orientation="vertical" />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export function Divider({
|
|
17
|
+
orientation = "horizontal",
|
|
18
|
+
className = "",
|
|
19
|
+
...props
|
|
20
|
+
}: DividerProps) {
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
className={`gds-divider gds-divider-${orientation} ${className}`.trim()}
|
|
24
|
+
role="separator"
|
|
25
|
+
aria-orientation={orientation}
|
|
26
|
+
data-component="Divider"
|
|
27
|
+
data-orientation={orientation}
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
<div className="gds-divider-line" />
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default Divider;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Divider component props
|
|
3
|
+
* Provides visual separator using design system tokens
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type DividerOrientation = "horizontal" | "vertical";
|
|
7
|
+
|
|
8
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Orientation of the divider
|
|
11
|
+
* @default "horizontal"
|
|
12
|
+
*/
|
|
13
|
+
orientation?: DividerOrientation;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Additional CSS class names
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InputImage component styles
|
|
3
|
+
* Token-first per Constitution (all values from design tokens)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* Base input image container */
|
|
7
|
+
.gds-input-image {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 284px;
|
|
10
|
+
max-height: var(--image-medium-maxHeight-default);
|
|
11
|
+
border-radius: var(--image-medium-radius);
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Default state */
|
|
22
|
+
.gds-input-image-default {
|
|
23
|
+
background: var(--input-background-default);
|
|
24
|
+
border-color: var(--input-stroke-default);
|
|
25
|
+
border-style: dashed;
|
|
26
|
+
gap: var(--image-medium-gap);
|
|
27
|
+
padding: var(--image-medium-paddingVertical-default)
|
|
28
|
+
var(--image-medium-paddingHorizontal-default);
|
|
29
|
+
height: var(--image-medium-maxHeight-default);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.gds-input-image-default .gds-input-image-label {
|
|
33
|
+
color: var(--input-text-default);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.gds-input-image-default .gds-input-image-separator {
|
|
37
|
+
color: var(--input-text-active);
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
line-height: var(--font-lineHeight-xs);
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Hover state */
|
|
45
|
+
.gds-input-image-hover {
|
|
46
|
+
background: var(--input-background-hover);
|
|
47
|
+
border-color: var(--input-stroke-default);
|
|
48
|
+
border-style: dashed;
|
|
49
|
+
gap: var(--image-medium-gap);
|
|
50
|
+
padding: var(--image-medium-paddingVertical-default)
|
|
51
|
+
var(--image-medium-paddingHorizontal-default);
|
|
52
|
+
height: var(--image-medium-maxHeight-default);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.gds-input-image-hover .gds-input-image-label {
|
|
56
|
+
color: var(--input-text-default);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.gds-input-image-hover .gds-input-image-separator {
|
|
60
|
+
color: var(--input-text-active);
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
line-height: var(--font-lineHeight-xs);
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Filled state */
|
|
68
|
+
.gds-input-image-filled {
|
|
69
|
+
background: transparent;
|
|
70
|
+
border-color: var(--input-stroke-default);
|
|
71
|
+
border-style: solid;
|
|
72
|
+
gap: 0;
|
|
73
|
+
padding: 0;
|
|
74
|
+
height: var(--image-medium-maxHeight-default);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.gds-input-image-preview {
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: 0;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
object-fit: cover;
|
|
83
|
+
border-radius: var(--image-medium-radius);
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
max-width: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.gds-input-image-remove-button {
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: var(--image-medium-paddingVertical-filled);
|
|
91
|
+
right: var(--image-medium-paddingHorizontal-filled);
|
|
92
|
+
z-index: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Loading state */
|
|
96
|
+
.gds-input-image-loading {
|
|
97
|
+
background: var(--image-background-loading);
|
|
98
|
+
border-color: var(--input-stroke-default);
|
|
99
|
+
border-style: dashed;
|
|
100
|
+
height: var(--image-medium-maxHeight-default);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Generating state */
|
|
104
|
+
.gds-input-image-generating {
|
|
105
|
+
background: transparent;
|
|
106
|
+
border-color: var(--input-stroke-default);
|
|
107
|
+
border-style: solid;
|
|
108
|
+
gap: 0;
|
|
109
|
+
height: var(--image-medium-maxHeight-generated);
|
|
110
|
+
max-height: var(--image-medium-maxHeight-generated);
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.gds-input-image-blur-container {
|
|
115
|
+
flex: 1 0 0;
|
|
116
|
+
width: 100%;
|
|
117
|
+
min-height: 1px;
|
|
118
|
+
min-width: 1px;
|
|
119
|
+
position: relative;
|
|
120
|
+
filter: blur(20px);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.gds-input-image-blur-preview {
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 0;
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: 100%;
|
|
128
|
+
object-fit: cover;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
max-width: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Generated state */
|
|
134
|
+
.gds-input-image-generated {
|
|
135
|
+
background: transparent;
|
|
136
|
+
border-color: var(--input-stroke-default);
|
|
137
|
+
border-style: solid;
|
|
138
|
+
height: var(--image-medium-maxHeight-generated);
|
|
139
|
+
max-height: var(--image-medium-maxHeight-generated);
|
|
140
|
+
align-items: center;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.gds-input-image-result {
|
|
145
|
+
position: absolute;
|
|
146
|
+
inset: 0;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
object-fit: cover;
|
|
150
|
+
border-radius: var(--image-medium-radius);
|
|
151
|
+
pointer-events: none;
|
|
152
|
+
max-width: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.gds-input-image-comparison-slider {
|
|
156
|
+
position: absolute;
|
|
157
|
+
display: flex;
|
|
158
|
+
width: 32px;
|
|
159
|
+
height: 100%;
|
|
160
|
+
top: 0;
|
|
161
|
+
left: 50%;
|
|
162
|
+
transform: translateX(-50%);
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
cursor: ew-resize;
|
|
166
|
+
z-index: 2;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.gds-input-image-slider-line {
|
|
170
|
+
position: absolute;
|
|
171
|
+
width: 1px;
|
|
172
|
+
height: 100%;
|
|
173
|
+
background: var(--color-background-neutral-default);
|
|
174
|
+
box-shadow:
|
|
175
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.3),
|
|
176
|
+
0px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.gds-input-image-slider-button {
|
|
181
|
+
position: relative;
|
|
182
|
+
z-index: 1;
|
|
183
|
+
pointer-events: auto;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Disabled state */
|
|
187
|
+
.gds-input-image-disabled {
|
|
188
|
+
background: var(--input-background-disabled);
|
|
189
|
+
border-color: var(--input-stroke-default);
|
|
190
|
+
border-style: solid;
|
|
191
|
+
gap: var(--image-medium-gap);
|
|
192
|
+
padding: var(--image-medium-paddingVertical-default)
|
|
193
|
+
var(--image-medium-paddingHorizontal-default);
|
|
194
|
+
height: var(--image-medium-maxHeight-default);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.gds-input-image-disabled .gds-input-image-label {
|
|
198
|
+
color: var(--input-text-disabled);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.gds-input-image-disabled .gds-input-image-separator {
|
|
202
|
+
color: var(--input-text-active);
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
line-height: var(--font-lineHeight-xs);
|
|
205
|
+
text-overflow: ellipsis;
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Button spacing within InputImage */
|
|
210
|
+
.gds-input-image-button {
|
|
211
|
+
flex-shrink: 0;
|
|
212
|
+
}
|