@dixy-ui/themes 0.0.0-stage → 0.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +139 -2
- package/dist/ansi/ornament.d.ts +3 -0
- package/dist/ansi/ornament.js +8 -0
- package/dist/ansi-panes.css +929 -0
- package/dist/art-deco.css +850 -0
- package/dist/atelier/ornament.d.ts +4 -0
- package/dist/atelier/ornament.js +9 -0
- package/dist/atomic/ornament.d.ts +3 -0
- package/dist/atomic/ornament.js +8 -0
- package/dist/atomic-lounge.css +946 -0
- package/dist/authoring.d.ts +142 -0
- package/dist/authoring.js +83 -0
- package/dist/azulejo/ornament.d.ts +3 -0
- package/dist/azulejo/ornament.js +8 -0
- package/dist/azulejo-tile.css +962 -0
- package/dist/blueprint/ornament.d.ts +3 -0
- package/dist/blueprint/ornament.js +8 -0
- package/dist/blueprint.css +897 -0
- package/dist/brutalist/ornament.d.ts +3 -0
- package/dist/brutalist/ornament.js +8 -0
- package/dist/brutalist-concrete.css +936 -0
- package/dist/bytes.json +162 -0
- package/dist/candy-clay.css +778 -0
- package/dist/catalog.d.ts +1346 -0
- package/dist/catalog.js +1379 -0
- package/dist/character.d.ts +103 -0
- package/dist/character.js +477 -0
- package/dist/chrome.d.ts +114 -0
- package/dist/chrome.js +247 -0
- package/dist/clay/ornament.d.ts +3 -0
- package/dist/clay/ornament.js +8 -0
- package/dist/compile-css.d.ts +3 -0
- package/dist/compile-css.js +133 -0
- package/dist/deco/ornament.d.ts +3 -0
- package/dist/deco/ornament.js +8 -0
- package/dist/diwali/ornament.d.ts +3 -0
- package/dist/diwali/ornament.js +8 -0
- package/dist/diwali-lights.css +894 -0
- package/dist/documents.d.ts +104 -0
- package/dist/documents.js +1411 -0
- package/dist/forest/ornament.d.ts +3 -0
- package/dist/forest/ornament.js +12 -0
- package/dist/foundations.d.ts +105 -0
- package/dist/foundations.js +140 -0
- package/dist/frame-corners.d.ts +5 -0
- package/dist/frame-corners.js +5 -0
- package/dist/frame-styles.d.ts +36 -0
- package/dist/frame-styles.js +146 -0
- package/dist/freeze.d.ts +2 -0
- package/dist/freeze.js +9 -0
- package/dist/freighter/ornament.d.ts +3 -0
- package/dist/freighter/ornament.js +8 -0
- package/dist/freighter.css +942 -0
- package/dist/glass/ornament.d.ts +3 -0
- package/dist/glass/ornament.js +8 -0
- package/dist/glass-ui.css +923 -0
- package/dist/hardware/ornament.d.ts +4 -0
- package/dist/hardware/ornament.js +10 -0
- package/dist/holi/ornament.d.ts +3 -0
- package/dist/holi/ornament.js +8 -0
- package/dist/holi-colours.css +887 -0
- package/dist/hud/ornament.d.ts +3 -0
- package/dist/hud/ornament.js +8 -0
- package/dist/light/ornament.d.ts +3 -0
- package/dist/light/ornament.js +10 -0
- package/dist/living-forest.css +917 -0
- package/dist/lunar/ornament.d.ts +3 -0
- package/dist/lunar/ornament.js +8 -0
- package/dist/lunar-new-year.css +811 -0
- package/dist/manifests.d.ts +2485 -0
- package/dist/manifests.js +264 -0
- package/dist/material-light.css +880 -0
- package/dist/neon/ornament.d.ts +3 -0
- package/dist/neon/ornament.js +8 -0
- package/dist/neon-night-market.css +944 -0
- package/dist/ocean/ornament.d.ts +3 -0
- package/dist/ocean/ornament.js +8 -0
- package/dist/ocean-depths.css +825 -0
- package/dist/orbital-hud.css +973 -0
- package/dist/organic-css.d.ts +3 -0
- package/dist/organic-css.js +23 -0
- package/dist/organic-geometry.d.ts +20 -0
- package/dist/organic-geometry.js +74 -0
- package/dist/organic-ornament.d.ts +9 -0
- package/dist/organic-ornament.js +28 -0
- package/dist/organic-paint-launch.d.ts +43 -0
- package/dist/organic-paint-launch.js +1156 -0
- package/dist/organic-paint-world.d.ts +24 -0
- package/dist/organic-paint-world.js +676 -0
- package/dist/organic-paint.d.ts +50 -0
- package/dist/organic-paint.js +695 -0
- package/dist/organic-runtime.d.ts +4 -0
- package/dist/organic-runtime.js +231 -0
- package/dist/organic-settings.d.ts +680 -0
- package/dist/organic-settings.js +433 -0
- package/dist/ornament-parts.d.ts +20 -0
- package/dist/ornament-parts.js +15 -0
- package/dist/papel-picado.css +904 -0
- package/dist/phosphor/ornament.d.ts +3 -0
- package/dist/phosphor/ornament.js +8 -0
- package/dist/phosphor-terminal.css +1011 -0
- package/dist/picado/ornament.d.ts +3 -0
- package/dist/picado/ornament.js +8 -0
- package/dist/prism/ornament.d.ts +4 -0
- package/dist/prism/ornament.js +9 -0
- package/dist/prism-glass.css +970 -0
- package/dist/recipes.d.ts +938 -0
- package/dist/recipes.js +939 -0
- package/dist/resolve.d.ts +40 -0
- package/dist/resolve.js +24 -0
- package/dist/retro/ornament.d.ts +5 -0
- package/dist/retro/ornament.js +10 -0
- package/dist/retro-os.css +867 -0
- package/dist/riso/ornament.d.ts +3 -0
- package/dist/riso/ornament.js +8 -0
- package/dist/riso-zine.css +786 -0
- package/dist/sail/ornament.d.ts +3 -0
- package/dist/sail/ornament.js +8 -0
- package/dist/scrapbook.css +685 -0
- package/dist/signal/ornament.d.ts +4 -0
- package/dist/signal/ornament.js +11 -0
- package/dist/skins/ansi-panes.d.ts +68 -0
- package/dist/skins/ansi-panes.js +68 -0
- package/dist/skins/art-deco.d.ts +68 -0
- package/dist/skins/art-deco.js +68 -0
- package/dist/skins/atomic-lounge.d.ts +68 -0
- package/dist/skins/atomic-lounge.js +68 -0
- package/dist/skins/azulejo-tile.d.ts +68 -0
- package/dist/skins/azulejo-tile.js +68 -0
- package/dist/skins/blueprint.d.ts +68 -0
- package/dist/skins/blueprint.js +68 -0
- package/dist/skins/brutalist-concrete.d.ts +68 -0
- package/dist/skins/brutalist-concrete.js +68 -0
- package/dist/skins/candy-clay.d.ts +57 -0
- package/dist/skins/candy-clay.js +57 -0
- package/dist/skins/diwali-lights.d.ts +68 -0
- package/dist/skins/diwali-lights.js +68 -0
- package/dist/skins/freighter.d.ts +68 -0
- package/dist/skins/freighter.js +68 -0
- package/dist/skins/glass-ui.d.ts +68 -0
- package/dist/skins/glass-ui.js +68 -0
- package/dist/skins/holi-colours.d.ts +68 -0
- package/dist/skins/holi-colours.js +68 -0
- package/dist/skins/living-forest.d.ts +68 -0
- package/dist/skins/living-forest.js +68 -0
- package/dist/skins/lunar-new-year.d.ts +68 -0
- package/dist/skins/lunar-new-year.js +68 -0
- package/dist/skins/material-light.d.ts +57 -0
- package/dist/skins/material-light.js +57 -0
- package/dist/skins/neon-night-market.d.ts +68 -0
- package/dist/skins/neon-night-market.js +68 -0
- package/dist/skins/ocean-depths.d.ts +57 -0
- package/dist/skins/ocean-depths.js +57 -0
- package/dist/skins/orbital-hud.d.ts +68 -0
- package/dist/skins/orbital-hud.js +68 -0
- package/dist/skins/papel-picado.d.ts +68 -0
- package/dist/skins/papel-picado.js +68 -0
- package/dist/skins/phosphor-terminal.d.ts +68 -0
- package/dist/skins/phosphor-terminal.js +68 -0
- package/dist/skins/prism-glass.d.ts +57 -0
- package/dist/skins/prism-glass.js +57 -0
- package/dist/skins/retro-os.d.ts +57 -0
- package/dist/skins/retro-os.js +57 -0
- package/dist/skins/riso-zine.d.ts +68 -0
- package/dist/skins/riso-zine.js +68 -0
- package/dist/skins/scrapbook.d.ts +57 -0
- package/dist/skins/scrapbook.js +57 -0
- package/dist/skins/solar-sail.d.ts +68 -0
- package/dist/skins/solar-sail.js +68 -0
- package/dist/skins/studio-hardware.d.ts +57 -0
- package/dist/skins/studio-hardware.js +57 -0
- package/dist/skins/sumi-ink.d.ts +68 -0
- package/dist/skins/sumi-ink.js +68 -0
- package/dist/skins/swiss-poster.d.ts +68 -0
- package/dist/skins/swiss-poster.js +68 -0
- package/dist/skins/tactile-atelier.d.ts +57 -0
- package/dist/skins/tactile-atelier.js +57 -0
- package/dist/skins/tokyo-transit.d.ts +68 -0
- package/dist/skins/tokyo-transit.js +68 -0
- package/dist/skins/winamp-signal.d.ts +57 -0
- package/dist/skins/winamp-signal.js +57 -0
- package/dist/skins/y2k-titanium.d.ts +57 -0
- package/dist/skins/y2k-titanium.js +57 -0
- package/dist/skins/yule-knit.d.ts +68 -0
- package/dist/skins/yule-knit.js +68 -0
- package/dist/solar-sail.css +901 -0
- package/dist/starters-launch.d.ts +361 -0
- package/dist/starters-launch.js +808 -0
- package/dist/studio-hardware.css +867 -0
- package/dist/sumi/ornament.d.ts +3 -0
- package/dist/sumi/ornament.js +8 -0
- package/dist/sumi-ink.css +733 -0
- package/dist/swiss/ornament.d.ts +3 -0
- package/dist/swiss/ornament.js +8 -0
- package/dist/swiss-poster.css +727 -0
- package/dist/tactile-atelier.css +922 -0
- package/dist/theme-document.schema.json +790 -0
- package/dist/theme-schema.d.ts +453 -0
- package/dist/theme-schema.js +416 -0
- package/dist/titanium/ornament.d.ts +3 -0
- package/dist/titanium/ornament.js +11 -0
- package/dist/tokyo-transit.css +756 -0
- package/dist/transit/ornament.d.ts +3 -0
- package/dist/transit/ornament.js +8 -0
- package/dist/winamp-signal.css +1048 -0
- package/dist/y2k-titanium.css +979 -0
- package/dist/yule/ornament.d.ts +3 -0
- package/dist/yule/ornament.js +8 -0
- package/dist/yule-knit.css +850 -0
- package/package.json +351 -3
package/dist/chrome.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Window chrome: the structural half of a frame. A frame recipe draws ornament
|
|
3
|
+
* art; chrome rebuilds the window itself out of existing Card parts:
|
|
4
|
+
*
|
|
5
|
+
* Card.Header → title bar (titlebar)
|
|
6
|
+
* Card.Root / Dialog popup → window edge (edge, corners)
|
|
7
|
+
* Card.Content directly after it → display well (well)
|
|
8
|
+
*
|
|
9
|
+
* Everything is CSS on existing elements and decorative pseudo-elements
|
|
10
|
+
* (`content:""`, so nothing is announced). No markup, refs, events, focus order
|
|
11
|
+
* or semantics change, and every chrome colour is either a palette token or a
|
|
12
|
+
* fixed dark/light ground with a matching ink, so text keeps its contrast.
|
|
13
|
+
*/
|
|
14
|
+
export declare const titlebarStyles: readonly ["none", "grip", "caption", "gradient", "tab", "glass", "chrome"];
|
|
15
|
+
export declare const edgeStyles: readonly ["line", "bevel", "double", "pill", "stepped"];
|
|
16
|
+
export declare const wellStyles: readonly ["none", "lcd", "recessed", "tinted", "paper", "glass", "sunken"];
|
|
17
|
+
export declare const cornerStyles: readonly ["inherit", "pixel", "notched", "round"];
|
|
18
|
+
/** The LCD well's fixed ground, shared by its CSS and its contrast traits. */
|
|
19
|
+
export declare const LCD_GROUND = "#060906";
|
|
20
|
+
/**
|
|
21
|
+
* What each well paints behind its content, so tools can reason about it without parsing CSS.
|
|
22
|
+
* - `surface`: no ground of its own; content sits on the card surface.
|
|
23
|
+
* - `canvas`: repaints to the palette canvas, so it follows the appearance.
|
|
24
|
+
* - `fixed`: a ground that stays put in both appearances, with its own ink (accent mixed with white
|
|
25
|
+
* at `inkAccent`%). `tone` says which appearance it belongs to; `substitute` is the closest
|
|
26
|
+
* appearance-following well, for tools that need the look to hold in both appearances.
|
|
27
|
+
*/
|
|
28
|
+
export type WellGround = {
|
|
29
|
+
readonly kind: "surface";
|
|
30
|
+
} | {
|
|
31
|
+
readonly kind: "canvas";
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: "fixed";
|
|
34
|
+
readonly color: string;
|
|
35
|
+
readonly tone: "light" | "dark";
|
|
36
|
+
readonly inkAccent: number;
|
|
37
|
+
readonly substitute: WellStyle;
|
|
38
|
+
};
|
|
39
|
+
export declare const wellGrounds: {
|
|
40
|
+
readonly none: {
|
|
41
|
+
readonly kind: "surface";
|
|
42
|
+
};
|
|
43
|
+
readonly lcd: {
|
|
44
|
+
readonly kind: "fixed";
|
|
45
|
+
readonly color: "#060906";
|
|
46
|
+
readonly tone: "dark";
|
|
47
|
+
readonly inkAccent: 70;
|
|
48
|
+
readonly substitute: "recessed";
|
|
49
|
+
};
|
|
50
|
+
readonly recessed: {
|
|
51
|
+
readonly kind: "canvas";
|
|
52
|
+
};
|
|
53
|
+
readonly tinted: {
|
|
54
|
+
readonly kind: "canvas";
|
|
55
|
+
};
|
|
56
|
+
readonly paper: {
|
|
57
|
+
readonly kind: "canvas";
|
|
58
|
+
};
|
|
59
|
+
readonly glass: {
|
|
60
|
+
readonly kind: "canvas";
|
|
61
|
+
};
|
|
62
|
+
readonly sunken: {
|
|
63
|
+
readonly kind: "canvas";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type TitlebarStyle = (typeof titlebarStyles)[number];
|
|
67
|
+
export type EdgeStyle = (typeof edgeStyles)[number];
|
|
68
|
+
export type WellStyle = (typeof wellStyles)[number];
|
|
69
|
+
export type CornerStyle = (typeof cornerStyles)[number];
|
|
70
|
+
export interface ThemeChrome {
|
|
71
|
+
readonly titlebar: TitlebarStyle;
|
|
72
|
+
readonly edge: EdgeStyle;
|
|
73
|
+
readonly well: WellStyle;
|
|
74
|
+
readonly corners: CornerStyle;
|
|
75
|
+
}
|
|
76
|
+
/** No chrome: compiles to nothing, so migrated documents keep their look. */
|
|
77
|
+
export declare const defaultChrome: ThemeChrome;
|
|
78
|
+
export declare const chromeLabels: {
|
|
79
|
+
readonly titlebar: {
|
|
80
|
+
readonly none: "None";
|
|
81
|
+
readonly grip: "Grip strip (media player)";
|
|
82
|
+
readonly caption: "Caption bar (classic desktop)";
|
|
83
|
+
readonly gradient: "Gradient header (social profile)";
|
|
84
|
+
readonly tab: "Paper tab";
|
|
85
|
+
readonly glass: "Glass strip (round lights)";
|
|
86
|
+
readonly chrome: "Brushed chrome (millennium)";
|
|
87
|
+
};
|
|
88
|
+
readonly edge: {
|
|
89
|
+
readonly line: "Single line";
|
|
90
|
+
readonly bevel: "Pixel bevel stack";
|
|
91
|
+
readonly double: "Double rule";
|
|
92
|
+
readonly pill: "Thick two-tone";
|
|
93
|
+
readonly stepped: "Stepped inlay";
|
|
94
|
+
};
|
|
95
|
+
readonly well: {
|
|
96
|
+
readonly none: "None";
|
|
97
|
+
readonly lcd: "LCD display";
|
|
98
|
+
readonly recessed: "Recessed with screws";
|
|
99
|
+
readonly tinted: "Tinted panel";
|
|
100
|
+
readonly paper: "Ruled paper";
|
|
101
|
+
readonly glass: "Frosted glass";
|
|
102
|
+
readonly sunken: "Soft sunken";
|
|
103
|
+
};
|
|
104
|
+
readonly corners: {
|
|
105
|
+
readonly inherit: "From radius";
|
|
106
|
+
readonly pixel: "Pixel square";
|
|
107
|
+
readonly notched: "Notched";
|
|
108
|
+
readonly round: "Big round";
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
type Scope = (parts: string, state?: string) => string;
|
|
112
|
+
/** Rules for the components layer. `C` scopes parts to this skin inside this theme. */
|
|
113
|
+
export declare function chromeCSS(c: ThemeChrome, theme: string, C: Scope): string;
|
|
114
|
+
export {};
|
package/dist/chrome.js
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Window chrome: the structural half of a frame. A frame recipe draws ornament
|
|
3
|
+
* art; chrome rebuilds the window itself out of existing Card parts:
|
|
4
|
+
*
|
|
5
|
+
* Card.Header → title bar (titlebar)
|
|
6
|
+
* Card.Root / Dialog popup → window edge (edge, corners)
|
|
7
|
+
* Card.Content directly after it → display well (well)
|
|
8
|
+
*
|
|
9
|
+
* Everything is CSS on existing elements and decorative pseudo-elements
|
|
10
|
+
* (`content:""`, so nothing is announced). No markup, refs, events, focus order
|
|
11
|
+
* or semantics change, and every chrome colour is either a palette token or a
|
|
12
|
+
* fixed dark/light ground with a matching ink, so text keeps its contrast.
|
|
13
|
+
*/
|
|
14
|
+
export const titlebarStyles = [
|
|
15
|
+
"none",
|
|
16
|
+
"grip",
|
|
17
|
+
"caption",
|
|
18
|
+
"gradient",
|
|
19
|
+
"tab",
|
|
20
|
+
"glass",
|
|
21
|
+
"chrome",
|
|
22
|
+
];
|
|
23
|
+
export const edgeStyles = [
|
|
24
|
+
"line",
|
|
25
|
+
"bevel",
|
|
26
|
+
"double",
|
|
27
|
+
"pill",
|
|
28
|
+
"stepped",
|
|
29
|
+
];
|
|
30
|
+
export const wellStyles = [
|
|
31
|
+
"none",
|
|
32
|
+
"lcd",
|
|
33
|
+
"recessed",
|
|
34
|
+
"tinted",
|
|
35
|
+
"paper",
|
|
36
|
+
"glass",
|
|
37
|
+
"sunken",
|
|
38
|
+
];
|
|
39
|
+
export const cornerStyles = ["inherit", "pixel", "notched", "round"];
|
|
40
|
+
/** The LCD well's fixed ground, shared by its CSS and its contrast traits. */
|
|
41
|
+
export const LCD_GROUND = "#060906";
|
|
42
|
+
export const wellGrounds = {
|
|
43
|
+
none: { kind: "surface" },
|
|
44
|
+
lcd: {
|
|
45
|
+
kind: "fixed",
|
|
46
|
+
color: LCD_GROUND,
|
|
47
|
+
tone: "dark",
|
|
48
|
+
inkAccent: 70,
|
|
49
|
+
substitute: "recessed",
|
|
50
|
+
},
|
|
51
|
+
recessed: { kind: "canvas" },
|
|
52
|
+
tinted: { kind: "canvas" },
|
|
53
|
+
paper: { kind: "canvas" },
|
|
54
|
+
glass: { kind: "canvas" },
|
|
55
|
+
sunken: { kind: "canvas" },
|
|
56
|
+
};
|
|
57
|
+
/** No chrome: compiles to nothing, so migrated documents keep their look. */
|
|
58
|
+
export const defaultChrome = {
|
|
59
|
+
titlebar: "none",
|
|
60
|
+
edge: "line",
|
|
61
|
+
well: "none",
|
|
62
|
+
corners: "inherit",
|
|
63
|
+
};
|
|
64
|
+
export const chromeLabels = {
|
|
65
|
+
titlebar: {
|
|
66
|
+
none: "None",
|
|
67
|
+
grip: "Grip strip (media player)",
|
|
68
|
+
caption: "Caption bar (classic desktop)",
|
|
69
|
+
gradient: "Gradient header (social profile)",
|
|
70
|
+
tab: "Paper tab",
|
|
71
|
+
glass: "Glass strip (round lights)",
|
|
72
|
+
chrome: "Brushed chrome (millennium)",
|
|
73
|
+
},
|
|
74
|
+
edge: {
|
|
75
|
+
line: "Single line",
|
|
76
|
+
bevel: "Pixel bevel stack",
|
|
77
|
+
double: "Double rule",
|
|
78
|
+
pill: "Thick two-tone",
|
|
79
|
+
stepped: "Stepped inlay",
|
|
80
|
+
},
|
|
81
|
+
well: {
|
|
82
|
+
none: "None",
|
|
83
|
+
lcd: "LCD display",
|
|
84
|
+
recessed: "Recessed with screws",
|
|
85
|
+
tinted: "Tinted panel",
|
|
86
|
+
paper: "Ruled paper",
|
|
87
|
+
glass: "Frosted glass",
|
|
88
|
+
sunken: "Soft sunken",
|
|
89
|
+
},
|
|
90
|
+
corners: {
|
|
91
|
+
inherit: "From radius",
|
|
92
|
+
pixel: "Pixel square",
|
|
93
|
+
notched: "Notched",
|
|
94
|
+
round: "Big round",
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
const ACCENT = "var(--dixy-color-background-action-primary)";
|
|
98
|
+
const EDGE = "var(--dixy-skin-edge)";
|
|
99
|
+
const SURFACE = "var(--dixy-skin-surface)";
|
|
100
|
+
const CANVAS = "var(--dixy-color-background-canvas)";
|
|
101
|
+
/** Wells that repaint to the canvas also reset text to its ink: a solid card's on-accent colour would vanish there. */
|
|
102
|
+
const GROUNDED = "color:var(--dixy-color-text-primary);";
|
|
103
|
+
const mix = (color, amount, other = "transparent") => `color-mix(in srgb,${color} ${amount}%,${other})`;
|
|
104
|
+
/** Sets every text role inside a chrome part, so nested parts and app copy follow its ground. */
|
|
105
|
+
const ink = (color, muted = color) => `color:${color}; --dixy-color-text-primary:${color}; --dixy-color-text-secondary:${color}; --dixy-color-text-muted:${muted};`;
|
|
106
|
+
/** Three small window buttons, painted as six gradient layers (shadow + face per button). */
|
|
107
|
+
function windowButtons(face, shade, size) {
|
|
108
|
+
const step = size + 2;
|
|
109
|
+
const layers = [0, 1, 2].flatMap((i) => [
|
|
110
|
+
`linear-gradient(${face},${face}) ${i * step}px 0/${size - 1}px ${size - 1}px no-repeat`,
|
|
111
|
+
`linear-gradient(${shade},${shade}) ${i * step + 1}px 1px/${size - 1}px ${size - 1}px no-repeat`,
|
|
112
|
+
]);
|
|
113
|
+
return layers.join(",");
|
|
114
|
+
}
|
|
115
|
+
function titlebarCSS(style, bar, theme) {
|
|
116
|
+
if (style === "none")
|
|
117
|
+
return "";
|
|
118
|
+
const common = `
|
|
119
|
+
${bar} { position:relative; z-index:2; display:flex; flex-wrap:wrap; align-items:center; column-gap:8px; row-gap:2px; margin:calc(var(--dixy-chrome-gap,0px) - var(--dixy-skin-pad-top,24px)) calc(var(--dixy-chrome-gap,0px) - var(--dixy-skin-pad-inline,24px)) 14px; padding:4px 8px; min-block-size:24px; border-radius:var(--dixy-chrome-bar-radius,0px) var(--dixy-chrome-bar-radius,0px) 0 0; }
|
|
120
|
+
${bar} > * { margin:0; }
|
|
121
|
+
${bar} :is(h1,h2,h3,h4,.dixy-card-title) { font-size:.875rem; line-height:1.3; }
|
|
122
|
+
${theme} .dixy-signal-rail { display:none; }
|
|
123
|
+
@media (forced-colors:active) { ${bar} { background:Canvas; border-block-end:1px solid CanvasText; } ${bar}::before,${bar}::after { display:none; } }`;
|
|
124
|
+
const buttons = (face, shade, size = 10) => `${bar}::after { content:""; flex:none; margin-inline-start:auto; inline-size:${size * 3 + 4}px; block-size:${size}px; background:${windowButtons(face, shade, size)}; }`;
|
|
125
|
+
switch (style) {
|
|
126
|
+
case "grip": {
|
|
127
|
+
// Media-player strip: grip lines either side of the label, buttons on the right.
|
|
128
|
+
const ground = mix(EDGE, 35, "#090c0a");
|
|
129
|
+
const lit = mix(ACCENT, 62, "#ffffff");
|
|
130
|
+
const face = mix(EDGE, 30, "#c9cfcb");
|
|
131
|
+
const grip = `repeating-linear-gradient(180deg,${mix(ACCENT, 55)} 0 1px,transparent 1px 3px)`;
|
|
132
|
+
return `${common}
|
|
133
|
+
${bar} { flex-wrap:nowrap; background-color:${ground}; background-image:linear-gradient(180deg,#ffffff1c,transparent 60%); box-shadow:inset 0 1px 0 #ffffff26,inset 0 -1px 0 #000; ${ink(lit)} font-family:var(--dixy-font-title-md-family,var(--dixy-font-mono)); letter-spacing:.14em; text-transform:uppercase; }
|
|
134
|
+
${bar} > * { flex:0 1 auto; min-inline-size:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
135
|
+
${bar}::before { content:""; flex:1 1 12px; min-inline-size:12px; block-size:8px; background:${grip}; }
|
|
136
|
+
${bar}::after { content:""; flex:1 1 52px; min-inline-size:52px; block-size:9px; background:${[0, 1, 2].map((i) => `linear-gradient(${face},${face}) right ${i * 11 + 1}px top 0/8px 8px no-repeat,linear-gradient(#000,#000) right ${i * 11}px top 1px/8px 8px no-repeat`).join(",")},${grip} 0 0/calc(100% - 40px) 100% no-repeat; }`;
|
|
137
|
+
}
|
|
138
|
+
case "caption":
|
|
139
|
+
// Classic desktop caption: dark-to-light accent gradient, bold white title, three bevelled buttons.
|
|
140
|
+
return `${common}
|
|
141
|
+
${bar} { background-image:linear-gradient(90deg,${mix(ACCENT, 35, "#06124a")},${mix(ACCENT, 42, "#0a1540")}); ${ink("#ffffff", "#e8ecff")} font-weight:700; padding-inline:6px 4px; }
|
|
142
|
+
${bar} :is(h1,h2,h3,h4,.dixy-card-title) { font-weight:700; }
|
|
143
|
+
${buttons("#d4d0c8", "#404040", 12)}`;
|
|
144
|
+
case "gradient":
|
|
145
|
+
// Social-profile header: glossy blue-to-violet band with a soft top light.
|
|
146
|
+
return `${common}
|
|
147
|
+
${bar} { background-image:linear-gradient(180deg,#ffffff30,transparent 55%),linear-gradient(100deg,${mix("#3456c4", 85, ACCENT)},${mix("#7446c9", 85, ACCENT)}); ${ink("#ffffff", "#eef0ff")} font-weight:700; padding:6px 12px; min-block-size:30px; }`;
|
|
148
|
+
case "glass": {
|
|
149
|
+
// A light-catching strip with three round lights; text stays on palette tokens.
|
|
150
|
+
const dot = (x, color) => `radial-gradient(circle,${color} 0 3.5px,${mix(EDGE, 60)} 4px,transparent 4.5px) right ${x}px center/10px 10px no-repeat`;
|
|
151
|
+
return `${common}
|
|
152
|
+
${bar} { background-image:linear-gradient(180deg,${mix("#ffffff", 34)},${mix("#ffffff", 6)}); border-block-end:1px solid ${mix(EDGE, 45)}; box-shadow:inset 0 1px 0 ${mix("#ffffff", 60)}; padding-inline:12px 8px; }
|
|
153
|
+
${bar}::after { content:""; flex:none; margin-inline-start:auto; inline-size:34px; block-size:10px; background:${dot(0, ACCENT)},${dot(12, mix(ACCENT, 50, SURFACE))},${dot(24, mix(EDGE, 70, SURFACE))}; }`;
|
|
154
|
+
}
|
|
155
|
+
case "chrome":
|
|
156
|
+
// Brushed light metal with a fixed dark ink (about 9:1) and pill buttons tinted by the accent.
|
|
157
|
+
return `${common}
|
|
158
|
+
${bar} { background-image:repeating-linear-gradient(90deg,#ffffff1a 0 1px,transparent 1px 3px),linear-gradient(180deg,#eef2f4,#c3ccd2 55%,#aab5bc); border-block-end:1px solid #6f7d86; box-shadow:inset 0 1px 0 #fff; ${ink("#0d1418", "#26333b")} font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
|
|
159
|
+
${bar}::after { content:""; flex:none; margin-inline-start:auto; inline-size:46px; block-size:10px; background:${[0, 16, 32].map((x) => `radial-gradient(5px 4px at 50% 50%,${mix(ACCENT, 80, "#ffffff")} 0 3px,#4f5d66 3.5px,transparent 4.5px) right ${x}px center/14px 10px no-repeat`).join(",")}; }`;
|
|
160
|
+
case "tab":
|
|
161
|
+
// A paper label hanging from the top edge, with a stitched rule.
|
|
162
|
+
return `${common}
|
|
163
|
+
${bar} { inline-size:fit-content; max-inline-size:100%; margin-inline:calc(var(--dixy-skin-pad-inline,24px) * -1 + 18px) auto; padding:7px 16px 10px; background-color:${CANVAS}; background-image:repeating-linear-gradient(90deg,${mix(EDGE, 55)} 0 4px,transparent 4px 7px); background-size:calc(100% - 18px) 1px; background-position:9px calc(100% - 4px); background-repeat:no-repeat; border:1px solid ${mix(EDGE, 70)}; border-block-start:0; border-radius:0 0 10px 10px; box-shadow:0 2px 0 ${mix(EDGE, 22)}; }`;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function edgeCSS(style, frame) {
|
|
167
|
+
const relief = "var(--dixy-skin-panel-relief)";
|
|
168
|
+
const hi = (n) => mix("#ffffff", n, SURFACE);
|
|
169
|
+
const lo = (n) => mix("#000000", n, SURFACE);
|
|
170
|
+
switch (style) {
|
|
171
|
+
case "line":
|
|
172
|
+
return "";
|
|
173
|
+
case "bevel":
|
|
174
|
+
// Four layers: dark outline, then light/dark pairs that read as a raised pixel window.
|
|
175
|
+
return `${frame} { border:1px solid ${mix(EDGE, 60, "#000")}; --dixy-chrome-gap:3px; box-shadow:inset 1px 1px 0 ${hi(60)},inset -1px -1px 0 ${lo(70)},inset 2px 2px 0 ${hi(25)},inset -2px -2px 0 ${lo(35)},${relief}; }`;
|
|
176
|
+
case "double":
|
|
177
|
+
return `${frame} { border:1px solid ${EDGE}; box-shadow:0 0 0 3px ${SURFACE},0 0 0 4px ${EDGE},${relief}; }`;
|
|
178
|
+
case "pill":
|
|
179
|
+
return `${frame} { border:3px solid ${mix(ACCENT, 45, SURFACE)}; box-shadow:inset 0 0 0 2px ${hi(70)},0 0 0 1px ${mix(EDGE, 70)},${relief}; }`;
|
|
180
|
+
case "stepped":
|
|
181
|
+
return `${frame} { border:1px solid ${EDGE}; box-shadow:inset 0 0 0 4px ${SURFACE},inset 0 0 0 5px ${EDGE},inset 0 0 0 9px ${SURFACE},inset 0 0 0 10px ${mix(EDGE, 55)},${relief}; }`;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function cornerCSS(style, frame) {
|
|
185
|
+
switch (style) {
|
|
186
|
+
case "inherit":
|
|
187
|
+
return "";
|
|
188
|
+
case "pixel":
|
|
189
|
+
return `${frame} { border-radius:0; --dixy-chrome-bar-radius:0px; }`;
|
|
190
|
+
case "notched":
|
|
191
|
+
// Clip-path also clips outer shadows, so notched windows lean on inset relief.
|
|
192
|
+
return `${frame} { border-radius:0; --dixy-chrome-bar-radius:0px; clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px); }`;
|
|
193
|
+
case "round":
|
|
194
|
+
return `${frame} { border-radius:16px; --dixy-chrome-bar-radius:13px; }`;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function screw(x, y) {
|
|
198
|
+
return `radial-gradient(circle at 50% 50%,#ffffffcc 0 1px,#9a9f9c 1.5px 2.5px,#4d524f 3px,transparent 3.5px) ${x} ${y}/8px 8px no-repeat`;
|
|
199
|
+
}
|
|
200
|
+
function wellCSS(style, well) {
|
|
201
|
+
const common = `${well} { position:relative; padding:12px 14px; }`;
|
|
202
|
+
switch (style) {
|
|
203
|
+
case "none":
|
|
204
|
+
return "";
|
|
205
|
+
case "lcd": {
|
|
206
|
+
// A display stays dark in both appearances. It re-points text, neutral-button and border tokens at its own ink,
|
|
207
|
+
// so ghost/outline buttons inside it stay readable in a light theme too.
|
|
208
|
+
const { color: ground, inkAccent } = wellGrounds.lcd;
|
|
209
|
+
const lit = mix(ACCENT, inkAccent, "#ffffff");
|
|
210
|
+
return `${common}
|
|
211
|
+
${well} { background-color:${ground}; background-image:repeating-linear-gradient(0deg,#ffffff08 0 1px,transparent 1px 3px); border:1px solid #000; border-radius:2px; box-shadow:inset 1px 1px 0 #000,inset -1px -1px 0 #ffffff24,0 1px 0 #ffffff12; ${ink(lit, mix(lit, 72, ground))} --dixy-color-background-canvas:${ground}; --dixy-color-background-surface:#0d120d; --dixy-color-border-default:${mix(lit, 35)}; --dixy-button-secondary-text:${lit}; --dixy-button-secondary-soft:${mix(lit, 14)}; --dixy-button-secondary-soft-hover:${mix(lit, 22)}; --dixy-button-secondary-soft-pressed:${mix(lit, 28)}; }
|
|
212
|
+
${well} :is(h1,h2,h3,h4,.dixy-card-title) { text-shadow:0 0 8px ${mix(ACCENT, 45)}; }
|
|
213
|
+
@media (prefers-contrast:more) { ${well} :is(h1,h2,h3,h4,.dixy-card-title) { text-shadow:none; } }`;
|
|
214
|
+
}
|
|
215
|
+
case "recessed":
|
|
216
|
+
return `${common}
|
|
217
|
+
${well} { ${GROUNDED} padding:16px 20px; background:${screw("5px", "5px")},${screw("right 5px", "5px")},${screw("5px", "bottom 5px")},${screw("right 5px", "bottom 5px")},${CANVAS}; border:1px solid ${mix(EDGE, 70)}; border-radius:6px; box-shadow:inset 0 2px 4px #0003,inset 0 -1px 0 #ffffff55; }`;
|
|
218
|
+
case "tinted":
|
|
219
|
+
return `${common}
|
|
220
|
+
${well} { ${GROUNDED} background-color:${mix(ACCENT, 9, CANVAS)}; border:1px solid ${mix(ACCENT, 28)}; border-radius:10px; }
|
|
221
|
+
${well} :is(ul,ol,[role="list"],tbody) > :nth-child(even),${well} > .dixy-button[data-variant="ghost"]:nth-of-type(even):not(:hover) { background-color:${mix(ACCENT, 8)}; }`;
|
|
222
|
+
case "glass":
|
|
223
|
+
// Translucent panel: the palette's own text stays readable on the surface beneath.
|
|
224
|
+
return `${common}
|
|
225
|
+
${well} { ${GROUNDED} background-color:${mix(CANVAS, 62)}; background-image:linear-gradient(160deg,${mix("#ffffff", 22)},transparent 45%); border:1px solid ${mix("#ffffff", 40, "transparent")}; border-radius:14px; box-shadow:inset 0 1px 0 ${mix("#ffffff", 55)},0 1px 2px ${mix(EDGE, 25)}; }
|
|
226
|
+
@media (prefers-reduced-transparency:reduce),(prefers-contrast:more) { ${well} { background-color:${CANVAS}; background-image:none; } }`;
|
|
227
|
+
case "sunken":
|
|
228
|
+
return `${common}
|
|
229
|
+
${well} { ${GROUNDED} background-color:${CANVAS}; border-radius:16px; box-shadow:inset 0 3px 8px ${mix(EDGE, 40)},inset 0 -2px 0 ${mix("#ffffff", 50)}; }`;
|
|
230
|
+
case "paper":
|
|
231
|
+
return `${common}
|
|
232
|
+
${well} { ${GROUNDED} background-color:${CANVAS}; background-image:repeating-linear-gradient(180deg,transparent 0 23px,${mix(EDGE, 22)} 23px 24px); background-position:0 10px; border-inline-start:2px solid ${mix("var(--dixy-color-border-danger)", 45)}; border-radius:2px; }`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/** Rules for the components layer. `C` scopes parts to this skin inside this theme. */
|
|
236
|
+
export function chromeCSS(c, theme, C) {
|
|
237
|
+
const frame = C(".dixy-card,.dixy-dialog-popup");
|
|
238
|
+
const card = C(".dixy-card");
|
|
239
|
+
return [
|
|
240
|
+
edgeCSS(c.edge, frame),
|
|
241
|
+
cornerCSS(c.corners, frame),
|
|
242
|
+
titlebarCSS(c.titlebar, `${card} > .dixy-card-header`, theme),
|
|
243
|
+
wellCSS(c.well, `${card} > .dixy-card-header + .dixy-card-content`),
|
|
244
|
+
]
|
|
245
|
+
.filter((part) => part.trim())
|
|
246
|
+
.join("\n ");
|
|
247
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { paintClay } from "../organic-paint.js";
|
|
4
|
+
import { OrganicOrnament } from "../organic-ornament.js";
|
|
5
|
+
export function ClayOrnament(props) {
|
|
6
|
+
return (_jsx(OrganicOrnament, { ...props, kind: "cushion", skin: "clay", painter: paintClay }));
|
|
7
|
+
}
|
|
8
|
+
export default ClayOrnament;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { organicOrnamentVariables } from "./organic-css.js";
|
|
2
|
+
import { organicFrameRecipes, isOrganicFrame } from "./organic-settings.js";
|
|
3
|
+
import { createColorPalette, colorThemeVariables } from "@dixy-ui/tokens";
|
|
4
|
+
import { frameStyles } from "./frame-styles.js";
|
|
5
|
+
import { themeFoundationStyle } from "./foundations.js";
|
|
6
|
+
import { characterComponentCSS, characterTokenCSS } from "./character.js";
|
|
7
|
+
const surfaces = ".dixy-card,.dixy-box,.dixy-dialog-popup,.dixy-alert-dialog-popup,.dixy-drawer-popup,.dixy-popover-popup,.dixy-preview-card-popup,.dixy-tooltip-popup,.dixy-select-popup,.dixy-combobox-popup,.dixy-autocomplete-popup,.dixy-menu-popup,.dixy-context-menu-popup,.dixy-navigation-menu-popup,.dixy-toast-root,.dixy-alert,.dixy-list-box,.dixy-calendar,.dixy-range-calendar";
|
|
8
|
+
const overlays = ".dixy-dialog-popup,.dixy-alert-dialog-popup,.dixy-drawer-popup,.dixy-popover-popup,.dixy-preview-card-popup,.dixy-tooltip-popup,.dixy-select-popup,.dixy-combobox-popup,.dixy-autocomplete-popup,.dixy-menu-popup,.dixy-context-menu-popup,.dixy-navigation-menu-popup";
|
|
9
|
+
const fields = ".dixy-input,.dixy-textarea,.dixy-native-select,.dixy-select-trigger,.dixy-input-group,.dixy-combobox-input-group,.dixy-autocomplete-input-group,.dixy-number-field-group,.dixy-otp-field-input";
|
|
10
|
+
const tracks = ".dixy-slider-track,.dixy-progress-track,.dixy-meter-track";
|
|
11
|
+
const fills = ".dixy-slider-indicator,.dixy-progress-indicator,.dixy-meter-indicator";
|
|
12
|
+
/** Material paint and frame geometry are emitted from independent inputs. */
|
|
13
|
+
export function compileThemeCSS(m) {
|
|
14
|
+
const theme = `.dixy-theme[data-dixy-skin="${m.id}"]`;
|
|
15
|
+
const S = (parts, state = "") => `:is(${parts})[data-dixy-skin="${m.id}"]${state}`;
|
|
16
|
+
const guard = ":not([data-dixy-material-override]):not(:where([data-dixy-material-override]) *)";
|
|
17
|
+
const own = (parts, state = "") => S(parts, guard + state);
|
|
18
|
+
const actions = ':is([data-variant="solid"],[data-variant="soft"],[data-variant="outline"]):not([data-disabled])';
|
|
19
|
+
const p = m.parameters;
|
|
20
|
+
const style = Object.entries(themeFoundationStyle(m.foundations))
|
|
21
|
+
.map(([key, value]) => `${key === "fontFamily" ? "font-family" : key}:${value};`)
|
|
22
|
+
.join("\n");
|
|
23
|
+
const organic = isOrganicFrame(m.frame) ? organicFrameRecipes[m.frame] : null;
|
|
24
|
+
const ornamentVariables = Object.entries(organicOrnamentVariables(m.frame, m.ornament))
|
|
25
|
+
.map(([key, value]) => `${key}:${value};`)
|
|
26
|
+
.join(" ");
|
|
27
|
+
const colors = (appearance) => organic
|
|
28
|
+
? organic[appearance]
|
|
29
|
+
.map((color, i) => `--dixy-organic-${["a", "b", "c", "d"][i]}:${color};`)
|
|
30
|
+
.join(" ")
|
|
31
|
+
: "";
|
|
32
|
+
const frameWidth = m.frame === "none" ? 0 : p.width;
|
|
33
|
+
const radius = (role) => p.cornerVariation === 0
|
|
34
|
+
? `calc(var(--dixy-radius-${role}) * ${p.cornerScale})`
|
|
35
|
+
: [1, 3, 0.5, 2.5]
|
|
36
|
+
.map((factor) => `calc(var(--dixy-radius-${role}) * ${p.cornerScale * (1 + p.cornerVariation * factor)})`)
|
|
37
|
+
.join(" ");
|
|
38
|
+
const palette = m.foundations.customAccent
|
|
39
|
+
? createColorPalette([
|
|
40
|
+
m.foundations.lightness,
|
|
41
|
+
m.foundations.chroma,
|
|
42
|
+
m.foundations.hue,
|
|
43
|
+
])
|
|
44
|
+
: null;
|
|
45
|
+
const paletteCSS = palette
|
|
46
|
+
? ["light", "dark"]
|
|
47
|
+
.map((appearance) => `${theme}[data-appearance="${appearance}"] { ${Object.entries(colorThemeVariables(palette, appearance))
|
|
48
|
+
.map(([key, value]) => `${key}:${value};`)
|
|
49
|
+
.join(" ")} }`)
|
|
50
|
+
.join("\n")
|
|
51
|
+
: "";
|
|
52
|
+
// Card glass blurs and saturates whatever sits behind a translucent surface tint.
|
|
53
|
+
const glass = m.backdropBlur > 0 || m.backdropSaturate > 100
|
|
54
|
+
? `blur(${m.backdropBlur}px) saturate(${m.backdropSaturate}%)`
|
|
55
|
+
: "";
|
|
56
|
+
const borderStyle = m.frame === "rails" ? "ridge" : "solid";
|
|
57
|
+
// Character rules sit after material rules and carry the theme ancestor, so they win over paint defaults.
|
|
58
|
+
const C = (parts, state = "") => `${theme} :is(${parts})[data-dixy-skin="${m.id}"]${state}`;
|
|
59
|
+
return `
|
|
60
|
+
@layer dixy.tokens, dixy.components;
|
|
61
|
+
@layer dixy.tokens {
|
|
62
|
+
${theme} {
|
|
63
|
+
${style}
|
|
64
|
+
--dixy-skin-edge:${m.edge};
|
|
65
|
+
${ornamentVariables}
|
|
66
|
+
${colors("light")}
|
|
67
|
+
${m.inkTint ? `--dixy-color-text-primary:color-mix(in srgb,var(--dixy-color-base-12) ${100 - m.inkTint * 100}%,${m.tint[1]});` : ""}
|
|
68
|
+
--dixy-skin-surface:color-mix(in srgb,var(--dixy-color-background-surface-raised) ${m.surfaceMix}%,${m.tint[0]});
|
|
69
|
+
--dixy-skin-ground:color-mix(in srgb,var(--dixy-color-background-canvas) 65%,${m.tint[2]});
|
|
70
|
+
--dixy-skin-card-inset:${p.paddingTop}px ${p.paddingInline}px ${p.paddingBottom}px;
|
|
71
|
+
--dixy-skin-pad-top:${p.paddingTop}px;
|
|
72
|
+
--dixy-skin-pad-inline:${p.paddingInline}px;
|
|
73
|
+
--dixy-skin-frame-inset:${m.frame === "rails" ? `${p.inset}px 0 0` : `${p.inset}px`};
|
|
74
|
+
--dixy-skin-frame-width:${frameWidth}px;
|
|
75
|
+
--dixy-skin-finish:linear-gradient(${m.lightAngle}deg,rgb(255 255 255 / ${m.sheen * 0.3}),transparent 42%),${m.finish};
|
|
76
|
+
--dixy-skin-grain:${m.grain};
|
|
77
|
+
--dixy-skin-grain-size:${4 * m.textureScale}px;
|
|
78
|
+
--dixy-skin-paint:var(--dixy-skin-grain),var(--dixy-skin-finish);
|
|
79
|
+
--dixy-skin-canvas:${m.canvas};
|
|
80
|
+
--dixy-skin-authored-shadow:${m.shadow};
|
|
81
|
+
--dixy-skin-shadow:var(--dixy-skin-depth-shadow,var(--dixy-skin-authored-shadow));
|
|
82
|
+
--dixy-skin-inset:${m.inset};
|
|
83
|
+
--dixy-skin-control-edge:inset 0 1px 0 rgb(255 255 255 / ${0.1 + m.sheen * 0.5}),inset 0 -1px 0 #0002;
|
|
84
|
+
--dixy-skin-cushion:inset 0 ${m.cushion * 3}px ${m.cushion * 5}px #ffffff66,inset 0 -${m.cushion * 5}px ${m.cushion * 8}px color-mix(in srgb,var(--dixy-skin-edge) ${m.cushion * 40}%,transparent),var(--dixy-skin-cushion-elevation);
|
|
85
|
+
--dixy-skin-cushion-cast:0 ${m.cushion * 10}px ${m.cushion * 14}px color-mix(in srgb,var(--dixy-skin-edge) ${m.cushion * 28}%,transparent);
|
|
86
|
+
--dixy-skin-panel-relief:${m.cushion ? "var(--dixy-skin-cushion)," : ""}var(--dixy-skin-shadow);
|
|
87
|
+
--dixy-skin-control-relief:${m.cushion ? "var(--dixy-skin-cushion)," : ""}var(--dixy-skin-control-edge),var(--dixy-skin-shadow);
|
|
88
|
+
--dixy-skin-thumb:${m.thumb};
|
|
89
|
+
--dixy-skin-mark-opacity:1;
|
|
90
|
+
${characterTokenCSS(m.character)}
|
|
91
|
+
}
|
|
92
|
+
${theme}[data-appearance="dark"] { ${colors("dark")} --dixy-skin-selected:var(--dixy-skin-finish); ${m.inkTint ? `--dixy-color-text-primary:color-mix(in srgb,var(--dixy-color-base-12) ${100 - m.inkTint * 100}%,${m.tint[0]});` : ""} --dixy-skin-edge:${m.darkEdge}; ${m.darkCanvas ? `--dixy-skin-canvas:${m.darkCanvas};` : ""} --dixy-skin-surface:color-mix(in srgb,var(--dixy-color-background-surface-raised) ${m.darkSurfaceMix}%,${m.tint[1]}); --dixy-skin-ground:color-mix(in srgb,var(--dixy-color-background-canvas) 65%,${m.tint[1]}); }
|
|
93
|
+
${theme}[data-relief="2"] { --dixy-skin-shadow:var(--dixy-skin-depth-shadow,var(--dixy-skin-authored-shadow)),0 10px 18px #0002; }
|
|
94
|
+
${theme}[data-relief="0"],${theme}[data-effects="reduced"] { --dixy-skin-shadow:none; --dixy-skin-inset:none; --dixy-skin-control-edge:none; --dixy-skin-panel-relief:none; --dixy-skin-control-relief:none; }
|
|
95
|
+
${theme}[data-effects="reduced"] { --dixy-skin-paint:none; --dixy-skin-finish:none; --dixy-skin-canvas:none; --dixy-skin-thumb:none; --dixy-skin-mark-opacity:0; }
|
|
96
|
+
${theme}[data-ornament="quiet"] { --dixy-skin-mark-opacity:0; }
|
|
97
|
+
${paletteCSS}
|
|
98
|
+
}
|
|
99
|
+
@layer dixy.components {
|
|
100
|
+
${theme} { position:relative; isolation:isolate; }
|
|
101
|
+
${theme}:not(.dixy-portal-scope) { background-color:var(--dixy-skin-ground); background-image:var(--dixy-skin-canvas); }
|
|
102
|
+
${S(surfaces)} { position:relative; border-radius:${radius("card")}; }
|
|
103
|
+
${S(overlays)} { border-radius:${radius("overlay")}; }
|
|
104
|
+
${S(".dixy-card,.dixy-dialog-popup")} { padding:var(--dixy-skin-card-inset); border:${frameWidth}px ${borderStyle} var(--dixy-skin-edge); }
|
|
105
|
+
${own(surfaces)} { background-image:var(--dixy-skin-paint); background-size:var(--dixy-skin-grain-size) var(--dixy-skin-grain-size),100% 100%,100% 100%,100% 100%; box-shadow:var(--dixy-skin-panel-relief); }
|
|
106
|
+
${own(surfaces, ':not([data-variant="solid"]):not([data-variant="soft"])')} { background-color:var(--dixy-skin-surface); }
|
|
107
|
+
${S(fields)} { border-radius:calc(var(--dixy-radius-control) * ${p.cornerScale}); }
|
|
108
|
+
${own(fields)} { border-width:var(--dixy-input-border-width); border-color:var(--dixy-skin-edge); background-image:var(--dixy-skin-paint); background-color:var(--dixy-color-background-canvas); background-size:var(--dixy-skin-grain-size) var(--dixy-skin-grain-size),100% 100%,100% 100%,100% 100%; box-shadow:var(--dixy-skin-inset); }
|
|
109
|
+
${own(".dixy-button", actions)} { border-width:var(--dixy-button-border-width); border-color:var(--dixy-skin-edge); border-radius:calc(var(--dixy-shape-control) * ${p.cornerScale}); background-image:var(--dixy-skin-finish); box-shadow:var(--dixy-skin-control-relief); }
|
|
110
|
+
${m.tintActions ? `${own(".dixy-button", '[data-variant="solid"][data-color="accent"]:not([data-disabled])')} { background-color:var(--dixy-skin-surface); color:var(--dixy-color-text-action-primary); }` : ""}
|
|
111
|
+
${own(".dixy-button", actions + ":active")} { box-shadow:var(--dixy-skin-inset); }
|
|
112
|
+
${own(".dixy-tabs-list")} { background-color:var(--dixy-color-background-canvas); border:1px solid var(--dixy-skin-edge); box-shadow:var(--dixy-skin-inset); }
|
|
113
|
+
${own(".dixy-tabs-indicator")} { background-image:var(--dixy-skin-finish); box-shadow:var(--dixy-skin-control-relief); border:1px solid var(--dixy-skin-edge); }
|
|
114
|
+
/* Toggle groups read like tabs: a sunken track, the selected toggle a raised thumb (slider-knob paint in light, the raised finish in dark so its label stays readable). */
|
|
115
|
+
${theme} .dixy-toggle-group:is([data-attached],[data-segmented])${guard} { background-color:var(--dixy-color-background-canvas); border:1px solid var(--dixy-skin-edge); box-shadow:var(--dixy-skin-inset); }
|
|
116
|
+
${own(".dixy-toggle", ':not([data-variant="solid"])[data-pressed]:not([data-disabled])')} { background-color:var(--dixy-color-background-surface-raised); background-image:var(--dixy-skin-selected,var(--dixy-skin-thumb)); box-shadow:var(--dixy-skin-control-relief); border-color:var(--dixy-skin-edge); color:var(--dixy-color-text-primary); }
|
|
117
|
+
${own(tracks)} { border:1px solid var(--dixy-skin-edge); background-color:var(--dixy-color-background-surface); box-shadow:var(--dixy-skin-inset); }
|
|
118
|
+
${own(fills)} { background-image:var(--dixy-skin-finish); }
|
|
119
|
+
${own(".dixy-switch-root,.dixy-checkbox-root,.dixy-radio-root")}::before { box-shadow:var(--dixy-skin-inset); }
|
|
120
|
+
${own(".dixy-checkbox-root,.dixy-radio-root", "[data-checked]")}::before { background-image:var(--dixy-skin-finish); }
|
|
121
|
+
${own(".dixy-switch-thumb")} { background-image:var(--dixy-skin-thumb); box-shadow:var(--dixy-skin-control-relief); border:1px solid var(--dixy-skin-edge); }
|
|
122
|
+
${own(".dixy-slider-thumb")}::before { background-image:var(--dixy-skin-thumb); box-shadow:var(--dixy-skin-control-relief); border:1px solid var(--dixy-skin-edge); }
|
|
123
|
+
${frameStyles(m, theme)}
|
|
124
|
+
${characterComponentCSS(m.character, theme, C)}
|
|
125
|
+
${glass ? `@supports(backdrop-filter:blur(1px)) { ${own(surfaces)} { backdrop-filter:${glass}; -webkit-backdrop-filter:${glass}; } }` : ""}
|
|
126
|
+
@supports(backdrop-filter:blur(8px)) { ${theme}[data-effects="backdrop"] > .dixy-skin-backdrop { backdrop-filter:blur(8px); } }
|
|
127
|
+
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active) {
|
|
128
|
+
${theme} { --dixy-skin-paint:none; --dixy-skin-finish:none; --dixy-skin-canvas:none; --dixy-skin-thumb:none; --dixy-skin-shadow:none; --dixy-skin-inset:none; --dixy-skin-panel-relief:none; --dixy-skin-control-relief:none; }
|
|
129
|
+
${theme} > .dixy-skin-backdrop, ${S(surfaces)} { backdrop-filter:none!important; -webkit-backdrop-filter:none!important; }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { paintBrass } from "../organic-paint.js";
|
|
4
|
+
import { OrganicOrnament } from "../organic-ornament.js";
|
|
5
|
+
export function DecoOrnament(props) {
|
|
6
|
+
return (_jsx(OrganicOrnament, { ...props, kind: "deco", skin: "deco", painter: paintBrass }));
|
|
7
|
+
}
|
|
8
|
+
export default DecoOrnament;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { paintRangoli } from "../organic-paint-launch.js";
|
|
4
|
+
import { OrganicOrnament } from "../organic-ornament.js";
|
|
5
|
+
export function DiwaliOrnament(props) {
|
|
6
|
+
return (_jsx(OrganicOrnament, { ...props, kind: "rangoli", skin: "diwali", painter: paintRangoli }));
|
|
7
|
+
}
|
|
8
|
+
export default DiwaliOrnament;
|