@nextlyhq/ui 0.0.2-alpha.73 → 0.0.2-alpha.75
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/dist/index.cjs +1264 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +342 -17
- package/dist/index.d.ts +342 -17
- package/dist/index.mjs +1259 -60
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.scoped.css +1 -1
- package/dist/tailwind-preset.cjs +20 -0
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.d.cts +20 -0
- package/dist/tailwind-preset.d.ts +20 -0
- package/dist/tailwind-preset.mjs +20 -0
- package/dist/tailwind-preset.mjs.map +1 -1
- package/dist/theme.css +240 -85
- package/package.json +4 -4
|
@@ -27,16 +27,36 @@ type UiPreset = {
|
|
|
27
27
|
destructive: {
|
|
28
28
|
DEFAULT: string;
|
|
29
29
|
solid: string;
|
|
30
|
+
hover: string;
|
|
30
31
|
foreground: string;
|
|
31
32
|
};
|
|
32
33
|
success: {
|
|
33
34
|
DEFAULT: string;
|
|
34
35
|
solid: string;
|
|
35
36
|
foreground: string;
|
|
37
|
+
surface: string;
|
|
38
|
+
border: string;
|
|
39
|
+
text: string;
|
|
36
40
|
};
|
|
37
41
|
warning: {
|
|
38
42
|
DEFAULT: string;
|
|
39
43
|
foreground: string;
|
|
44
|
+
solid: string;
|
|
45
|
+
surface: string;
|
|
46
|
+
border: string;
|
|
47
|
+
text: string;
|
|
48
|
+
};
|
|
49
|
+
danger: {
|
|
50
|
+
surface: string;
|
|
51
|
+
border: string;
|
|
52
|
+
text: string;
|
|
53
|
+
solid: string;
|
|
54
|
+
};
|
|
55
|
+
info: {
|
|
56
|
+
surface: string;
|
|
57
|
+
border: string;
|
|
58
|
+
text: string;
|
|
59
|
+
solid: string;
|
|
40
60
|
};
|
|
41
61
|
muted: {
|
|
42
62
|
DEFAULT: string;
|
package/dist/tailwind-preset.mjs
CHANGED
|
@@ -78,6 +78,7 @@ const uiPreset = { theme: { extend: {
|
|
|
78
78
|
destructive: {
|
|
79
79
|
DEFAULT: "var(--nx-destructive)",
|
|
80
80
|
solid: "var(--nx-destructive-solid)",
|
|
81
|
+
hover: "var(--nx-destructive-hover)",
|
|
81
82
|
foreground: "var(--nx-destructive-foreground)",
|
|
82
83
|
...tintScale("--nx-destructive")
|
|
83
84
|
},
|
|
@@ -85,13 +86,32 @@ const uiPreset = { theme: { extend: {
|
|
|
85
86
|
DEFAULT: "var(--nx-success)",
|
|
86
87
|
solid: "var(--nx-success-solid)",
|
|
87
88
|
foreground: "var(--nx-success-foreground)",
|
|
89
|
+
surface: "var(--nx-success-surface)",
|
|
90
|
+
border: "var(--nx-success-border)",
|
|
91
|
+
text: "var(--nx-success-text)",
|
|
88
92
|
...tintScale("--nx-success")
|
|
89
93
|
},
|
|
90
94
|
warning: {
|
|
91
95
|
DEFAULT: "var(--nx-warning)",
|
|
92
96
|
foreground: "var(--nx-warning-foreground)",
|
|
97
|
+
solid: "var(--nx-warning-solid)",
|
|
98
|
+
surface: "var(--nx-warning-surface)",
|
|
99
|
+
border: "var(--nx-warning-border)",
|
|
100
|
+
text: "var(--nx-warning-text)",
|
|
93
101
|
...tintScale("--nx-warning")
|
|
94
102
|
},
|
|
103
|
+
danger: {
|
|
104
|
+
surface: "var(--nx-danger-surface)",
|
|
105
|
+
border: "var(--nx-danger-border)",
|
|
106
|
+
text: "var(--nx-danger-text)",
|
|
107
|
+
solid: "var(--nx-danger-solid)"
|
|
108
|
+
},
|
|
109
|
+
info: {
|
|
110
|
+
surface: "var(--nx-info-surface)",
|
|
111
|
+
border: "var(--nx-info-border)",
|
|
112
|
+
text: "var(--nx-info-text)",
|
|
113
|
+
solid: "var(--nx-info-solid)"
|
|
114
|
+
},
|
|
95
115
|
muted: {
|
|
96
116
|
DEFAULT: "var(--nx-muted)",
|
|
97
117
|
foreground: "var(--nx-muted-foreground)"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-preset.mjs","names":[],"sources":["../src/tailwind-preset.ts"],"sourcesContent":["/**\n * Tailwind CSS preset for @nextlyhq/ui components.\n *\n * Defines the CSS custom property contract that all UI components expect.\n * Consumers must provide the actual CSS variable values in their stylesheets.\n *\n * Usage (Tailwind v3, ESM):\n * // tailwind.config.ts\n * import uiPreset from \"@nextlyhq/ui/tailwind-preset\";\n * export default { presets: [uiPreset], ... };\n *\n * Usage (Tailwind v3, CommonJS):\n * // tailwind.config.js\n * const { uiPreset } = require(\"@nextlyhq/ui/tailwind-preset\");\n * module.exports = { presets: [uiPreset], ... };\n *\n * Usage (Tailwind v4 with @config):\n * Consumers define the equivalent @theme tokens in their CSS.\n * This file serves as the reference contract.\n *\n * Scope: tokens and the utilities derived from them, and nothing else. The\n * component classes the library writes into its own markup — `.nx-page-shell`,\n * `.nx-bleed`, `.nx-form-section-rows` — are CSS rules rather than token\n * mappings, and they ship in `theme.css` for every consumer alike. Restating\n * one of them here would express a single decision in two places that agree\n * until one of them is edited, and would still leave the others missing; the\n * boundary holds for all of them or it holds for none. `theme.css` is\n * therefore required alongside this preset, not an alternative to it, and\n * `tailwind-preset.test.ts` fails if a component selector reappears here.\n */\n/**\n * The numbered shade scale for a color, mixed from its base the same way the v4\n * `@theme` block does, so v3 preset consumers get the same utilities the\n * components emit (`bg-destructive-700`, `bg-primary-500`, `border-primary-300`).\n *\n * Named for the derivation rather than for one caller: the status colors, the\n * primary and the accent all use it, and `@theme` derives all five identically.\n */\nconst tintScale = (base: string): Record<number, string> => ({\n 50: `color-mix(in srgb, var(${base}), white 95%)`,\n 100: `color-mix(in srgb, var(${base}), white 90%)`,\n 200: `color-mix(in srgb, var(${base}), white 70%)`,\n 300: `color-mix(in srgb, var(${base}), white 50%)`,\n 400: `color-mix(in srgb, var(${base}), white 30%)`,\n 500: `var(${base})`,\n 600: `color-mix(in srgb, var(${base}), black 10%)`,\n 700: `color-mix(in srgb, var(${base}), black 30%)`,\n 800: `color-mix(in srgb, var(${base}), black 50%)`,\n 900: `color-mix(in srgb, var(${base}), black 70%)`,\n 950: `color-mix(in srgb, var(${base}), black 85%)`,\n});\n\n/** The shape of {@link uiPreset}: the tokens it maps, each to its CSS custom property. */\ntype UiPreset = {\n theme: {\n extend: {\n colors: {\n overlay: string;\n \"overlay-soft\": string;\n \"overlay-strong\": string;\n border: {\n DEFAULT: string;\n subtle: string;\n strong: string;\n };\n input: string;\n \"control-border\": string;\n ring: string;\n background: string;\n foreground: string;\n primary: {\n DEFAULT: string;\n foreground: string;\n };\n secondary: {\n DEFAULT: string;\n foreground: string;\n };\n destructive: {\n DEFAULT: string;\n solid: string;\n foreground: string;\n };\n success: {\n DEFAULT: string;\n solid: string;\n foreground: string;\n };\n warning: {\n DEFAULT: string;\n foreground: string;\n };\n muted: {\n DEFAULT: string;\n foreground: string;\n };\n accent: {\n DEFAULT: string;\n foreground: string;\n };\n highlight: {\n DEFAULT: string;\n foreground: string;\n };\n code: {\n bg: string;\n fg: string;\n comment: string;\n keyword: string;\n string: string;\n number: string;\n function: string;\n operator: string;\n punctuation: string;\n variable: string;\n tag: string;\n deleted: string;\n inserted: string;\n };\n sidebar: {\n DEFAULT: string;\n background: string;\n foreground: string;\n primary: string;\n \"primary-foreground\": string;\n accent: string;\n \"accent-background\": string;\n \"accent-foreground\": string;\n border: string;\n ring: string;\n };\n popover: {\n DEFAULT: string;\n foreground: string;\n };\n card: {\n DEFAULT: string;\n foreground: string;\n };\n };\n borderRadius: {\n lg: string;\n md: string;\n sm: string;\n };\n keyframes: {\n \"accordion-down\": {\n from: {\n height: string;\n };\n to: {\n height: string;\n };\n };\n \"accordion-up\": {\n from: {\n height: string;\n };\n to: {\n height: string;\n };\n };\n };\n animation: {\n \"accordion-down\": string;\n \"accordion-up\": string;\n };\n };\n };\n};\n\n/** @experimental */\nconst uiPreset: UiPreset = {\n theme: {\n extend: {\n colors: {\n // The modal scrim. Mapped here as well as in the v4 `@theme` block,\n // because this preset is the documented Tailwind v3 path and reads\n // none of that: without these two, `bg-overlay` generates no rule at\n // all and every backdrop is transparent rather than merely unthemed.\n overlay: \"var(--nx-overlay)\",\n \"overlay-soft\": \"var(--nx-overlay-soft)\",\n \"overlay-strong\": \"var(--nx-overlay-strong)\",\n border: {\n DEFAULT: \"var(--nx-border)\",\n subtle: \"var(--nx-border-subtle)\",\n strong: \"var(--nx-border-strong)\",\n },\n input: \"var(--nx-input)\",\n // The boundary of a control that draws no fill of its own -- an\n // unchecked checkbox, radio or switch. Separate from `input` because\n // that one is the field border weight, which sits below the 3:1\n // non-text minimum by design.\n \"control-border\": \"var(--nx-control-border)\",\n ring: \"var(--nx-ring)\",\n background: \"var(--nx-background)\",\n foreground: \"var(--nx-foreground)\",\n primary: {\n DEFAULT: \"var(--nx-primary)\",\n foreground: \"var(--nx-primary-foreground)\",\n ...tintScale(\"--nx-primary\"),\n },\n secondary: {\n DEFAULT: \"var(--nx-secondary)\",\n foreground: \"var(--nx-secondary-foreground)\",\n },\n destructive: {\n DEFAULT: \"var(--nx-destructive)\",\n // Saturated fill for solid buttons, distinct from the text-tuned base.\n solid: \"var(--nx-destructive-solid)\",\n foreground: \"var(--nx-destructive-foreground)\",\n ...tintScale(\"--nx-destructive\"),\n },\n success: {\n DEFAULT: \"var(--nx-success)\",\n solid: \"var(--nx-success-solid)\",\n foreground: \"var(--nx-success-foreground)\",\n ...tintScale(\"--nx-success\"),\n },\n warning: {\n DEFAULT: \"var(--nx-warning)\",\n foreground: \"var(--nx-warning-foreground)\",\n ...tintScale(\"--nx-warning\"),\n },\n muted: {\n DEFAULT: \"var(--nx-muted)\",\n foreground: \"var(--nx-muted-foreground)\",\n },\n accent: {\n DEFAULT: \"var(--nx-accent)\",\n foreground: \"var(--nx-accent-foreground)\",\n ...tintScale(\"--nx-accent\"),\n },\n // The editor's highlight mark, and the syntax colors, so authored\n // content and code blocks theme like everything else.\n highlight: {\n DEFAULT: \"var(--nx-highlight)\",\n foreground: \"var(--nx-highlight-foreground)\",\n },\n code: {\n bg: \"var(--nx-code-bg)\",\n fg: \"var(--nx-code-fg)\",\n comment: \"var(--nx-code-comment)\",\n keyword: \"var(--nx-code-keyword)\",\n string: \"var(--nx-code-string)\",\n number: \"var(--nx-code-number)\",\n function: \"var(--nx-code-function)\",\n operator: \"var(--nx-code-operator)\",\n punctuation: \"var(--nx-code-punctuation)\",\n variable: \"var(--nx-code-variable)\",\n tag: \"var(--nx-code-tag)\",\n deleted: \"var(--nx-code-deleted)\",\n inserted: \"var(--nx-code-inserted)\",\n },\n // `sidebar` and `sidebar-background` are the same value under two\n // names, and `sidebar-accent` and `sidebar-accent-background` likewise.\n // Both pairs exist in the v4 block and both spellings are in use, so\n // dropping either here would leave a live utility generating nothing.\n sidebar: {\n DEFAULT: \"var(--nx-sidebar-background)\",\n background: \"var(--nx-sidebar-background)\",\n foreground: \"var(--nx-sidebar-foreground)\",\n primary: \"var(--nx-sidebar-primary)\",\n \"primary-foreground\": \"var(--nx-sidebar-primary-foreground)\",\n accent: \"var(--nx-sidebar-accent)\",\n \"accent-background\": \"var(--nx-sidebar-accent)\",\n \"accent-foreground\": \"var(--nx-sidebar-accent-foreground)\",\n border: \"var(--nx-sidebar-border)\",\n ring: \"var(--nx-sidebar-ring)\",\n },\n popover: {\n DEFAULT: \"var(--nx-popover)\",\n foreground: \"var(--nx-popover-foreground)\",\n },\n card: {\n DEFAULT: \"var(--nx-card)\",\n foreground: \"var(--nx-card-foreground)\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: { height: \"0\" },\n to: { height: \"var(--radix-accordion-content-height)\" },\n },\n \"accordion-up\": {\n from: { height: \"var(--radix-accordion-content-height)\" },\n to: { height: \"0\" },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.3s cubic-bezier(0.87, 0, 0.13, 1)\",\n \"accordion-up\": \"accordion-up 0.3s cubic-bezier(0.87, 0, 0.13, 1)\",\n },\n },\n },\n};\n\n// Exported both ways on purpose. CommonJS cannot represent a default-only\n// module without `module.exports =`, which makes the emitted declarations\n// disagree with the runtime shape (attw's FalseExportDefault); a named export\n// alongside it keeps `require()` and `import` consistent and typed.\nexport { uiPreset };\nexport default uiPreset;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,aAAa,UAA0C;CAC3D,IAAI,0BAA0B,KAAK;CACnC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,OAAO,KAAK;CACjB,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;AACtC;;AA0HA,MAAM,WAAqB,EACzB,OAAO,EACL,QAAQ;CACN,QAAQ;EAKN,SAAS;EACT,gBAAgB;EAChB,kBAAkB;EAClB,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;EAKP,kBAAkB;EAClB,MAAM;EACN,YAAY;EACZ,YAAY;EACZ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,GAAG,UAAU,cAAc;EAC7B;EACA,WAAW;GACT,SAAS;GACT,YAAY;EACd;EACA,aAAa;GACX,SAAS;GAET,OAAO;GACP,YAAY;GACZ,GAAG,UAAU,kBAAkB;EACjC;EACA,SAAS;GACP,SAAS;GACT,OAAO;GACP,YAAY;GACZ,GAAG,UAAU,cAAc;EAC7B;EACA,SAAS;GACP,SAAS;GACT,YAAY;GACZ,GAAG,UAAU,cAAc;EAC7B;EACA,OAAO;GACL,SAAS;GACT,YAAY;EACd;EACA,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,GAAG,UAAU,aAAa;EAC5B;EAGA,WAAW;GACT,SAAS;GACT,YAAY;EACd;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,UAAU;GACV,UAAU;GACV,aAAa;GACb,UAAU;GACV,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EAKA,SAAS;GACP,SAAS;GACT,YAAY;GACZ,YAAY;GACZ,SAAS;GACT,sBAAsB;GACtB,QAAQ;GACR,qBAAqB;GACrB,qBAAqB;GACrB,QAAQ;GACR,MAAM;EACR;EACA,SAAS;GACP,SAAS;GACT,YAAY;EACd;EACA,MAAM;GACJ,SAAS;GACT,YAAY;EACd;CACF;CACA,cAAc;EACZ,IAAI;EACJ,IAAI;EACJ,IAAI;CACN;CACA,WAAW;EACT,kBAAkB;GAChB,MAAM,EAAE,QAAQ,IAAI;GACpB,IAAI,EAAE,QAAQ,wCAAwC;EACxD;EACA,gBAAgB;GACd,MAAM,EAAE,QAAQ,wCAAwC;GACxD,IAAI,EAAE,QAAQ,IAAI;EACpB;CACF;CACA,WAAW;EACT,kBAAkB;EAClB,gBAAgB;CAClB;AACF,EACF,EACF"}
|
|
1
|
+
{"version":3,"file":"tailwind-preset.mjs","names":[],"sources":["../src/tailwind-preset.ts"],"sourcesContent":["/**\n * Tailwind CSS preset for @nextlyhq/ui components.\n *\n * Defines the CSS custom property contract that all UI components expect.\n * Consumers must provide the actual CSS variable values in their stylesheets.\n *\n * Usage (Tailwind v3, ESM):\n * // tailwind.config.ts\n * import uiPreset from \"@nextlyhq/ui/tailwind-preset\";\n * export default { presets: [uiPreset], ... };\n *\n * Usage (Tailwind v3, CommonJS):\n * // tailwind.config.js\n * const { uiPreset } = require(\"@nextlyhq/ui/tailwind-preset\");\n * module.exports = { presets: [uiPreset], ... };\n *\n * Usage (Tailwind v4 with @config):\n * Consumers define the equivalent @theme tokens in their CSS.\n * This file serves as the reference contract.\n *\n * Scope: tokens and the utilities derived from them, and nothing else. The\n * component classes the library writes into its own markup — `.nx-page-shell`,\n * `.nx-bleed`, `.nx-form-section-rows` — are CSS rules rather than token\n * mappings, and they ship in `theme.css` for every consumer alike. Restating\n * one of them here would express a single decision in two places that agree\n * until one of them is edited, and would still leave the others missing; the\n * boundary holds for all of them or it holds for none. `theme.css` is\n * therefore required alongside this preset, not an alternative to it, and\n * `tailwind-preset.test.ts` fails if a component selector reappears here.\n */\n/**\n * The numbered shade scale for a color, mixed from its base the same way the v4\n * `@theme` block does, so v3 preset consumers get the same utilities the\n * components emit (`bg-destructive-700`, `bg-primary-500`, `border-primary-300`).\n *\n * Named for the derivation rather than for one caller: the status colors, the\n * primary and the accent all use it, and `@theme` derives all five identically.\n */\nconst tintScale = (base: string): Record<number, string> => ({\n 50: `color-mix(in srgb, var(${base}), white 95%)`,\n 100: `color-mix(in srgb, var(${base}), white 90%)`,\n 200: `color-mix(in srgb, var(${base}), white 70%)`,\n 300: `color-mix(in srgb, var(${base}), white 50%)`,\n 400: `color-mix(in srgb, var(${base}), white 30%)`,\n 500: `var(${base})`,\n 600: `color-mix(in srgb, var(${base}), black 10%)`,\n 700: `color-mix(in srgb, var(${base}), black 30%)`,\n 800: `color-mix(in srgb, var(${base}), black 50%)`,\n 900: `color-mix(in srgb, var(${base}), black 70%)`,\n 950: `color-mix(in srgb, var(${base}), black 85%)`,\n});\n\n/** The shape of {@link uiPreset}: the tokens it maps, each to its CSS custom property. */\ntype UiPreset = {\n theme: {\n extend: {\n colors: {\n overlay: string;\n \"overlay-soft\": string;\n \"overlay-strong\": string;\n border: {\n DEFAULT: string;\n subtle: string;\n strong: string;\n };\n input: string;\n \"control-border\": string;\n ring: string;\n background: string;\n foreground: string;\n primary: {\n DEFAULT: string;\n foreground: string;\n };\n secondary: {\n DEFAULT: string;\n foreground: string;\n };\n destructive: {\n DEFAULT: string;\n solid: string;\n hover: string;\n foreground: string;\n };\n success: {\n DEFAULT: string;\n solid: string;\n foreground: string;\n surface: string;\n border: string;\n text: string;\n };\n warning: {\n DEFAULT: string;\n foreground: string;\n solid: string;\n surface: string;\n border: string;\n text: string;\n };\n danger: {\n surface: string;\n border: string;\n text: string;\n solid: string;\n };\n info: {\n surface: string;\n border: string;\n text: string;\n solid: string;\n };\n muted: {\n DEFAULT: string;\n foreground: string;\n };\n accent: {\n DEFAULT: string;\n foreground: string;\n };\n highlight: {\n DEFAULT: string;\n foreground: string;\n };\n code: {\n bg: string;\n fg: string;\n comment: string;\n keyword: string;\n string: string;\n number: string;\n function: string;\n operator: string;\n punctuation: string;\n variable: string;\n tag: string;\n deleted: string;\n inserted: string;\n };\n sidebar: {\n DEFAULT: string;\n background: string;\n foreground: string;\n primary: string;\n \"primary-foreground\": string;\n accent: string;\n \"accent-background\": string;\n \"accent-foreground\": string;\n border: string;\n ring: string;\n };\n popover: {\n DEFAULT: string;\n foreground: string;\n };\n card: {\n DEFAULT: string;\n foreground: string;\n };\n };\n borderRadius: {\n lg: string;\n md: string;\n sm: string;\n };\n keyframes: {\n \"accordion-down\": {\n from: {\n height: string;\n };\n to: {\n height: string;\n };\n };\n \"accordion-up\": {\n from: {\n height: string;\n };\n to: {\n height: string;\n };\n };\n };\n animation: {\n \"accordion-down\": string;\n \"accordion-up\": string;\n };\n };\n };\n};\n\n/** @experimental */\nconst uiPreset: UiPreset = {\n theme: {\n extend: {\n colors: {\n // The modal scrim. Mapped here as well as in the v4 `@theme` block,\n // because this preset is the documented Tailwind v3 path and reads\n // none of that: without these two, `bg-overlay` generates no rule at\n // all and every backdrop is transparent rather than merely unthemed.\n overlay: \"var(--nx-overlay)\",\n \"overlay-soft\": \"var(--nx-overlay-soft)\",\n \"overlay-strong\": \"var(--nx-overlay-strong)\",\n border: {\n DEFAULT: \"var(--nx-border)\",\n subtle: \"var(--nx-border-subtle)\",\n strong: \"var(--nx-border-strong)\",\n },\n input: \"var(--nx-input)\",\n // The boundary of a control that draws no fill of its own -- an\n // unchecked checkbox, radio or switch. Separate from `input` because\n // that one is the field border weight, which sits below the 3:1\n // non-text minimum by design.\n \"control-border\": \"var(--nx-control-border)\",\n ring: \"var(--nx-ring)\",\n background: \"var(--nx-background)\",\n foreground: \"var(--nx-foreground)\",\n primary: {\n DEFAULT: \"var(--nx-primary)\",\n foreground: \"var(--nx-primary-foreground)\",\n ...tintScale(\"--nx-primary\"),\n },\n secondary: {\n DEFAULT: \"var(--nx-secondary)\",\n foreground: \"var(--nx-secondary-foreground)\",\n },\n destructive: {\n DEFAULT: \"var(--nx-destructive)\",\n // Saturated fill for solid buttons, distinct from the text-tuned base.\n solid: \"var(--nx-destructive-solid)\",\n // The solid button's hover, set per mode in the theme so its label\n // keeps 4.5:1 with room to spare. Named, so no caller reaches for a\n // shade.\n hover: \"var(--nx-destructive-hover)\",\n foreground: \"var(--nx-destructive-foreground)\",\n ...tintScale(\"--nx-destructive\"),\n },\n success: {\n DEFAULT: \"var(--nx-success)\",\n solid: \"var(--nx-success-solid)\",\n foreground: \"var(--nx-success-foreground)\",\n surface: \"var(--nx-success-surface)\",\n border: \"var(--nx-success-border)\",\n text: \"var(--nx-success-text)\",\n ...tintScale(\"--nx-success\"),\n },\n warning: {\n DEFAULT: \"var(--nx-warning)\",\n foreground: \"var(--nx-warning-foreground)\",\n solid: \"var(--nx-warning-solid)\",\n surface: \"var(--nx-warning-surface)\",\n border: \"var(--nx-warning-border)\",\n text: \"var(--nx-warning-text)\",\n ...tintScale(\"--nx-warning\"),\n },\n // Status tokens with no base colour of their own: `danger` is a\n // status, kept apart from `destructive`, the colour of an action.\n danger: {\n surface: \"var(--nx-danger-surface)\",\n border: \"var(--nx-danger-border)\",\n text: \"var(--nx-danger-text)\",\n solid: \"var(--nx-danger-solid)\",\n },\n info: {\n surface: \"var(--nx-info-surface)\",\n border: \"var(--nx-info-border)\",\n text: \"var(--nx-info-text)\",\n solid: \"var(--nx-info-solid)\",\n },\n muted: {\n DEFAULT: \"var(--nx-muted)\",\n foreground: \"var(--nx-muted-foreground)\",\n },\n accent: {\n DEFAULT: \"var(--nx-accent)\",\n foreground: \"var(--nx-accent-foreground)\",\n ...tintScale(\"--nx-accent\"),\n },\n // The editor's highlight mark, and the syntax colors, so authored\n // content and code blocks theme like everything else.\n highlight: {\n DEFAULT: \"var(--nx-highlight)\",\n foreground: \"var(--nx-highlight-foreground)\",\n },\n code: {\n bg: \"var(--nx-code-bg)\",\n fg: \"var(--nx-code-fg)\",\n comment: \"var(--nx-code-comment)\",\n keyword: \"var(--nx-code-keyword)\",\n string: \"var(--nx-code-string)\",\n number: \"var(--nx-code-number)\",\n function: \"var(--nx-code-function)\",\n operator: \"var(--nx-code-operator)\",\n punctuation: \"var(--nx-code-punctuation)\",\n variable: \"var(--nx-code-variable)\",\n tag: \"var(--nx-code-tag)\",\n deleted: \"var(--nx-code-deleted)\",\n inserted: \"var(--nx-code-inserted)\",\n },\n // `sidebar` and `sidebar-background` are the same value under two\n // names, and `sidebar-accent` and `sidebar-accent-background` likewise.\n // Both pairs exist in the v4 block and both spellings are in use, so\n // dropping either here would leave a live utility generating nothing.\n sidebar: {\n DEFAULT: \"var(--nx-sidebar-background)\",\n background: \"var(--nx-sidebar-background)\",\n foreground: \"var(--nx-sidebar-foreground)\",\n primary: \"var(--nx-sidebar-primary)\",\n \"primary-foreground\": \"var(--nx-sidebar-primary-foreground)\",\n accent: \"var(--nx-sidebar-accent)\",\n \"accent-background\": \"var(--nx-sidebar-accent)\",\n \"accent-foreground\": \"var(--nx-sidebar-accent-foreground)\",\n border: \"var(--nx-sidebar-border)\",\n ring: \"var(--nx-sidebar-ring)\",\n },\n popover: {\n DEFAULT: \"var(--nx-popover)\",\n foreground: \"var(--nx-popover-foreground)\",\n },\n card: {\n DEFAULT: \"var(--nx-card)\",\n foreground: \"var(--nx-card-foreground)\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n keyframes: {\n \"accordion-down\": {\n from: { height: \"0\" },\n to: { height: \"var(--radix-accordion-content-height)\" },\n },\n \"accordion-up\": {\n from: { height: \"var(--radix-accordion-content-height)\" },\n to: { height: \"0\" },\n },\n },\n animation: {\n \"accordion-down\": \"accordion-down 0.3s cubic-bezier(0.87, 0, 0.13, 1)\",\n \"accordion-up\": \"accordion-up 0.3s cubic-bezier(0.87, 0, 0.13, 1)\",\n },\n },\n },\n};\n\n// Exported both ways on purpose. CommonJS cannot represent a default-only\n// module without `module.exports =`, which makes the emitted declarations\n// disagree with the runtime shape (attw's FalseExportDefault); a named export\n// alongside it keeps `require()` and `import` consistent and typed.\nexport { uiPreset };\nexport default uiPreset;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,aAAa,UAA0C;CAC3D,IAAI,0BAA0B,KAAK;CACnC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,OAAO,KAAK;CACjB,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;CACpC,KAAK,0BAA0B,KAAK;AACtC;;AA8IA,MAAM,WAAqB,EACzB,OAAO,EACL,QAAQ;CACN,QAAQ;EAKN,SAAS;EACT,gBAAgB;EAChB,kBAAkB;EAClB,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;EAKP,kBAAkB;EAClB,MAAM;EACN,YAAY;EACZ,YAAY;EACZ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,GAAG,UAAU,cAAc;EAC7B;EACA,WAAW;GACT,SAAS;GACT,YAAY;EACd;EACA,aAAa;GACX,SAAS;GAET,OAAO;GAIP,OAAO;GACP,YAAY;GACZ,GAAG,UAAU,kBAAkB;EACjC;EACA,SAAS;GACP,SAAS;GACT,OAAO;GACP,YAAY;GACZ,SAAS;GACT,QAAQ;GACR,MAAM;GACN,GAAG,UAAU,cAAc;EAC7B;EACA,SAAS;GACP,SAAS;GACT,YAAY;GACZ,OAAO;GACP,SAAS;GACT,QAAQ;GACR,MAAM;GACN,GAAG,UAAU,cAAc;EAC7B;EAGA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;EACT;EACA,MAAM;GACJ,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;EACT;EACA,OAAO;GACL,SAAS;GACT,YAAY;EACd;EACA,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,GAAG,UAAU,aAAa;EAC5B;EAGA,WAAW;GACT,SAAS;GACT,YAAY;EACd;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,UAAU;GACV,UAAU;GACV,aAAa;GACb,UAAU;GACV,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EAKA,SAAS;GACP,SAAS;GACT,YAAY;GACZ,YAAY;GACZ,SAAS;GACT,sBAAsB;GACtB,QAAQ;GACR,qBAAqB;GACrB,qBAAqB;GACrB,QAAQ;GACR,MAAM;EACR;EACA,SAAS;GACP,SAAS;GACT,YAAY;EACd;EACA,MAAM;GACJ,SAAS;GACT,YAAY;EACd;CACF;CACA,cAAc;EACZ,IAAI;EACJ,IAAI;EACJ,IAAI;CACN;CACA,WAAW;EACT,kBAAkB;GAChB,MAAM,EAAE,QAAQ,IAAI;GACpB,IAAI,EAAE,QAAQ,wCAAwC;EACxD;EACA,gBAAgB;GACd,MAAM,EAAE,QAAQ,wCAAwC;GACxD,IAAI,EAAE,QAAQ,IAAI;EACpB;CACF;CACA,WAAW;EACT,kBAAkB;EAClB,gBAAgB;CAClB;AACF,EACF,EACF"}
|
package/dist/theme.css
CHANGED
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
--animate-slide-in-from-right-2: slide-in-from-right-2 0.2s ease-out;
|
|
37
37
|
--animate-brand-orbit: brand-orbit 2.4s linear infinite;
|
|
38
38
|
--animate-brand-pulse: brand-pulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
|
|
39
|
+
/* The thin line under the admin's bar while a screen's data is on its way:
|
|
40
|
+
a short segment crossing the full width, then again. */
|
|
41
|
+
--animate-loading-line: loading-line 1.4s ease-in-out infinite;
|
|
39
42
|
|
|
40
43
|
/* ============================================
|
|
41
44
|
* COLOR PALETTE (Tailwind v4.1)
|
|
@@ -168,7 +171,12 @@
|
|
|
168
171
|
* shades exist because a status needs more than its solid colour: a tinted
|
|
169
172
|
* surface, a border on that surface, and text dark enough to read on it.
|
|
170
173
|
* Mixing toward white and black keeps 50 pale and 900 deep in both modes,
|
|
171
|
-
* which is what a `dark:` pair at the call site already assumes.
|
|
174
|
+
* which is what a `dark:` pair at the call site already assumes.
|
|
175
|
+
*
|
|
176
|
+
* Deprecated for status colour: the status tokens below (`-surface`,
|
|
177
|
+
* `-border`, `-text`, `-solid`) replace these shades wherever a status is
|
|
178
|
+
* drawn. The shades stay so existing callers and plugins keep building,
|
|
179
|
+
* and are removed in a later minor release. */
|
|
172
180
|
--color-destructive: var(--nx-destructive);
|
|
173
181
|
--color-destructive-50: color-mix(in srgb, var(--nx-destructive), white 95%);
|
|
174
182
|
--color-destructive-100: color-mix(in srgb, var(--nx-destructive), white 90%);
|
|
@@ -185,6 +193,9 @@
|
|
|
185
193
|
* so each can be solved for its own job. The ink that lands on it is
|
|
186
194
|
* `-foreground`, which is white in light mode and black in dark. */
|
|
187
195
|
--color-destructive-solid: var(--nx-destructive-solid);
|
|
196
|
+
/* The solid button's hover, set per mode beside its fill. Named, so no
|
|
197
|
+
* caller draws it from a numbered shade. */
|
|
198
|
+
--color-destructive-hover: var(--nx-destructive-hover);
|
|
188
199
|
--color-destructive-foreground: var(--nx-destructive-foreground);
|
|
189
200
|
|
|
190
201
|
--color-success: var(--nx-success);
|
|
@@ -217,6 +228,25 @@
|
|
|
217
228
|
--color-warning-950: color-mix(in srgb, var(--nx-warning), black 85%);
|
|
218
229
|
--color-warning-foreground: var(--nx-warning-foreground);
|
|
219
230
|
|
|
231
|
+
/* Status tokens: surface, border, text and solid per status (theme.css
|
|
232
|
+
* :root explains each). The numbered shades above stay for existing callers
|
|
233
|
+
* and are deprecated; new code uses these. */
|
|
234
|
+
--color-success-surface: var(--nx-success-surface);
|
|
235
|
+
--color-success-border: var(--nx-success-border);
|
|
236
|
+
--color-success-text: var(--nx-success-text);
|
|
237
|
+
--color-warning-surface: var(--nx-warning-surface);
|
|
238
|
+
--color-warning-border: var(--nx-warning-border);
|
|
239
|
+
--color-warning-text: var(--nx-warning-text);
|
|
240
|
+
--color-warning-solid: var(--nx-warning-solid);
|
|
241
|
+
--color-danger-surface: var(--nx-danger-surface);
|
|
242
|
+
--color-danger-border: var(--nx-danger-border);
|
|
243
|
+
--color-danger-text: var(--nx-danger-text);
|
|
244
|
+
--color-danger-solid: var(--nx-danger-solid);
|
|
245
|
+
--color-info-surface: var(--nx-info-surface);
|
|
246
|
+
--color-info-border: var(--nx-info-border);
|
|
247
|
+
--color-info-text: var(--nx-info-text);
|
|
248
|
+
--color-info-solid: var(--nx-info-solid);
|
|
249
|
+
|
|
220
250
|
/* The editor's highlight mark. A token rather than a literal because it
|
|
221
251
|
* styles authored content, which an integrator restyles to their own site
|
|
222
252
|
* and which has to stay readable on a dark page. */
|
|
@@ -279,29 +309,8 @@
|
|
|
279
309
|
* Perfect Fourth Scale (1.333 ratio) - WCAG 2.2 AA Compliant
|
|
280
310
|
* ============================================ */
|
|
281
311
|
|
|
282
|
-
/* Font
|
|
283
|
-
|
|
284
|
-
/* Type Scale - Base Size: 16px (1rem) */
|
|
285
|
-
--text-xs: 0.75rem;
|
|
286
|
-
/* 12px */
|
|
287
|
-
--text-sm: 0.875rem;
|
|
288
|
-
/* 14px */
|
|
289
|
-
--text-base: 1rem;
|
|
290
|
-
/* 16px - body text (WCAG minimum) */
|
|
291
|
-
--text-lg: 1.125rem;
|
|
292
|
-
/* 18px */
|
|
293
|
-
--text-xl: 1.25rem;
|
|
294
|
-
/* 20px */
|
|
295
|
-
--text-2xl: 1.5rem;
|
|
296
|
-
/* 24px */
|
|
297
|
-
--text-3xl: 1.875rem;
|
|
298
|
-
/* 30px */
|
|
299
|
-
--text-4xl: 2.25rem;
|
|
300
|
-
/* 36px */
|
|
301
|
-
--text-5xl: 3rem;
|
|
302
|
-
/* 48px */
|
|
303
|
-
--text-6xl: 3.75rem;
|
|
304
|
-
/* 60px */
|
|
312
|
+
/* Font families, the type scale and the spacing scale live in the
|
|
313
|
+
* non-inline @theme blocks below. */
|
|
305
314
|
|
|
306
315
|
/* Line Heights (Leading) */
|
|
307
316
|
--leading-none: 1;
|
|
@@ -331,57 +340,6 @@
|
|
|
331
340
|
--tracking-widest: 0.1em;
|
|
332
341
|
/* +1.6px at 16px */
|
|
333
342
|
|
|
334
|
-
/* ============================================
|
|
335
|
-
* SPACING & LAYOUT (Tailwind v4.1)
|
|
336
|
-
* 8px Grid System - Industry Standard
|
|
337
|
-
* ============================================ */
|
|
338
|
-
|
|
339
|
-
/* Spacing Scale (8px base unit) */
|
|
340
|
-
--space-0: 0rem;
|
|
341
|
-
/* 0px */
|
|
342
|
-
--space-px: 0.0625rem;
|
|
343
|
-
/* 1px - for fine borders */
|
|
344
|
-
--space-0-5: 0.125rem;
|
|
345
|
-
/* 2px */
|
|
346
|
-
--space-1: 0.25rem;
|
|
347
|
-
/* 4px - icon padding, tiny gaps */
|
|
348
|
-
--space-1-5: 0.375rem;
|
|
349
|
-
/* 6px */
|
|
350
|
-
--space-2: 0.5rem;
|
|
351
|
-
/* 8px - tight spacing, inline elements */
|
|
352
|
-
--space-2-5: 0.625rem;
|
|
353
|
-
/* 10px */
|
|
354
|
-
--space-3: 0.75rem;
|
|
355
|
-
/* 12px - between related elements */
|
|
356
|
-
--space-3-5: 0.875rem;
|
|
357
|
-
/* 14px */
|
|
358
|
-
--space-4: 1rem;
|
|
359
|
-
/* 16px - standard element spacing */
|
|
360
|
-
--space-5: 1.25rem;
|
|
361
|
-
/* 20px */
|
|
362
|
-
--space-6: 1.5rem;
|
|
363
|
-
/* 24px - between form fields */
|
|
364
|
-
--space-7: 1.75rem;
|
|
365
|
-
/* 28px */
|
|
366
|
-
--space-8: 2rem;
|
|
367
|
-
/* 32px - between sections */
|
|
368
|
-
--space-9: 2.25rem;
|
|
369
|
-
/* 36px */
|
|
370
|
-
--space-10: 2.5rem;
|
|
371
|
-
/* 40px */
|
|
372
|
-
--space-11: 2.75rem;
|
|
373
|
-
/* 44px - minimum touch target */
|
|
374
|
-
--space-12: 3rem;
|
|
375
|
-
/* 48px - between major sections */
|
|
376
|
-
--space-14: 3.5rem;
|
|
377
|
-
/* 56px */
|
|
378
|
-
--space-16: 4rem;
|
|
379
|
-
/* 64px - page margins */
|
|
380
|
-
--space-20: 5rem;
|
|
381
|
-
/* 80px */
|
|
382
|
-
--space-24: 6rem;
|
|
383
|
-
/* 96px - large section breaks */
|
|
384
|
-
|
|
385
343
|
/* ============================================
|
|
386
344
|
* BORDER RADIUS (Tailwind v4.1)
|
|
387
345
|
*
|
|
@@ -562,20 +520,119 @@
|
|
|
562
520
|
}
|
|
563
521
|
|
|
564
522
|
/* ============================================
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
523
|
+
* TYPE SCALE & SPACING SCALE (Tailwind v4.1)
|
|
524
|
+
*
|
|
525
|
+
* Deliberately a STATIC, non-inline `@theme`: every token here is emitted as a
|
|
526
|
+
* real custom property on `:root` whether or not a Tailwind utility uses it.
|
|
527
|
+
* Stylesheets that are not compiled against this theme read these through
|
|
528
|
+
* `var()` -- the page-builder editor's (`@nextlyhq/builder/styles.css`, pulled
|
|
529
|
+
* in by `@nextlyhq/plugin-page-builder/styles/editor.css`) does, for
|
|
530
|
+
* `--text-xs`, `--text-sm`, `--text-lg` and `--space-*` -- and a `var()` in
|
|
531
|
+
* such a sheet makes Tailwind emit nothing. Under `@theme inline` a token is
|
|
532
|
+
* emitted only where CSS Tailwind compiles reads it with `var()`, and a plain
|
|
533
|
+
* `@theme` drops the ones no utility uses, so either way the admin's build
|
|
534
|
+
* left these out and the editor's text fell back to the browser's 16px and its
|
|
535
|
+
* spacing to nothing. `static` keeps them all.
|
|
536
|
+
*
|
|
537
|
+
* Non-inline also makes the `text-*` utilities read `var(--text-*)` rather
|
|
538
|
+
* than a copied value, so they follow a token redeclared on a scope, as the
|
|
539
|
+
* font utilities above do. `--space-*` is not a Tailwind namespace (spacing
|
|
540
|
+
* utilities use `--spacing`), so it adds no utilities; it exists for `var()`.
|
|
541
|
+
* `packages/admin/src/styles/__tests__/editor-token-emission.test.ts` holds
|
|
542
|
+
* the admin's built stylesheet to emitting every token the editor reads.
|
|
543
|
+
* ============================================ */
|
|
544
|
+
@theme static {
|
|
545
|
+
/* Type Scale - Base Size: 16px (1rem) */
|
|
546
|
+
--text-xs: 0.75rem;
|
|
547
|
+
/* 12px */
|
|
548
|
+
--text-sm: 0.875rem;
|
|
549
|
+
/* 14px */
|
|
550
|
+
--text-base: 1rem;
|
|
551
|
+
/* 16px - body text (WCAG minimum) */
|
|
552
|
+
--text-lg: 1.125rem;
|
|
553
|
+
/* 18px */
|
|
554
|
+
--text-xl: 1.25rem;
|
|
555
|
+
/* 20px */
|
|
556
|
+
--text-2xl: 1.5rem;
|
|
557
|
+
/* 24px */
|
|
558
|
+
--text-3xl: 1.875rem;
|
|
559
|
+
/* 30px */
|
|
560
|
+
--text-4xl: 2.25rem;
|
|
561
|
+
/* 36px */
|
|
562
|
+
--text-5xl: 3rem;
|
|
563
|
+
/* 48px */
|
|
564
|
+
--text-6xl: 3.75rem;
|
|
565
|
+
/* 60px */
|
|
566
|
+
|
|
567
|
+
/* Spacing Scale (8px base unit) */
|
|
568
|
+
--space-0: 0rem;
|
|
569
|
+
/* 0px */
|
|
570
|
+
--space-px: 0.0625rem;
|
|
571
|
+
/* 1px - for fine borders */
|
|
572
|
+
--space-0-5: 0.125rem;
|
|
573
|
+
/* 2px */
|
|
574
|
+
--space-1: 0.25rem;
|
|
575
|
+
/* 4px - icon padding, tiny gaps */
|
|
576
|
+
--space-1-5: 0.375rem;
|
|
577
|
+
/* 6px */
|
|
578
|
+
--space-2: 0.5rem;
|
|
579
|
+
/* 8px - tight spacing, inline elements */
|
|
580
|
+
--space-2-5: 0.625rem;
|
|
581
|
+
/* 10px */
|
|
582
|
+
--space-3: 0.75rem;
|
|
583
|
+
/* 12px - between related elements */
|
|
584
|
+
--space-3-5: 0.875rem;
|
|
585
|
+
/* 14px */
|
|
586
|
+
--space-4: 1rem;
|
|
587
|
+
/* 16px - standard element spacing */
|
|
588
|
+
--space-5: 1.25rem;
|
|
589
|
+
/* 20px */
|
|
590
|
+
--space-6: 1.5rem;
|
|
591
|
+
/* 24px - between form fields */
|
|
592
|
+
--space-7: 1.75rem;
|
|
593
|
+
/* 28px */
|
|
594
|
+
--space-8: 2rem;
|
|
595
|
+
/* 32px - between sections */
|
|
596
|
+
--space-9: 2.25rem;
|
|
597
|
+
/* 36px */
|
|
598
|
+
--space-10: 2.5rem;
|
|
599
|
+
/* 40px */
|
|
600
|
+
--space-11: 2.75rem;
|
|
601
|
+
/* 44px - minimum touch target */
|
|
602
|
+
--space-12: 3rem;
|
|
603
|
+
/* 48px - between major sections */
|
|
604
|
+
--space-14: 3.5rem;
|
|
605
|
+
/* 56px */
|
|
606
|
+
--space-16: 4rem;
|
|
607
|
+
/* 64px - page margins */
|
|
608
|
+
--space-20: 5rem;
|
|
609
|
+
/* 80px */
|
|
610
|
+
--space-24: 6rem;
|
|
611
|
+
/* 96px - large section breaks */
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* ============================================
|
|
615
|
+
* LARGER HEADING SIZES
|
|
616
|
+
*
|
|
617
|
+
* Tailwind lifts an `@theme` out of an enclosing `@media`: these declarations
|
|
618
|
+
* are not limited to wide screens. They replace the `--text-2xl` to
|
|
619
|
+
* `--text-5xl` values of the type scale above at EVERY width, and the built
|
|
620
|
+
* stylesheet declares only these. Because that scale is non-inline, the
|
|
621
|
+
* `text-2xl` to `text-5xl` utilities read `var(--text-*)` and so render at
|
|
622
|
+
* these sizes. The block is `static` like the scale: a token's options come
|
|
623
|
+
* from its last declaration, and without it the sizes no utility uses would
|
|
624
|
+
* be dropped from the build again.
|
|
568
625
|
* ============================================ */
|
|
569
626
|
@media (min-width: 768px) {
|
|
570
|
-
@theme {
|
|
627
|
+
@theme static {
|
|
571
628
|
--text-2xl: 1.75rem;
|
|
572
|
-
/* 28px
|
|
629
|
+
/* 28px (the scale above says 24px) */
|
|
573
630
|
--text-3xl: 2.25rem;
|
|
574
|
-
/* 36px
|
|
631
|
+
/* 36px (the scale above says 30px) */
|
|
575
632
|
--text-4xl: 3rem;
|
|
576
|
-
/* 48px
|
|
633
|
+
/* 48px (the scale above says 36px) */
|
|
577
634
|
--text-5xl: 4rem;
|
|
578
|
-
/* 64px
|
|
635
|
+
/* 64px (the scale above says 48px) */
|
|
579
636
|
}
|
|
580
637
|
}
|
|
581
638
|
|
|
@@ -590,6 +647,20 @@
|
|
|
590
647
|
}
|
|
591
648
|
}
|
|
592
649
|
|
|
650
|
+
/* From fully off the left edge to fully off the right one, so the segment
|
|
651
|
+
never sits still at either end. Driven by `transform`, never by `left`: a
|
|
652
|
+
moving box counts as a layout shift, and a transform does not. The segment
|
|
653
|
+
is 30% of the line, so the line's far edge is 100 / 30 of its own widths
|
|
654
|
+
from its start. */
|
|
655
|
+
@keyframes loading-line {
|
|
656
|
+
from {
|
|
657
|
+
transform: translateX(-100%);
|
|
658
|
+
}
|
|
659
|
+
to {
|
|
660
|
+
transform: translateX(333.34%);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
593
664
|
@keyframes brand-pulse {
|
|
594
665
|
0%,
|
|
595
666
|
100% {
|
|
@@ -765,6 +836,12 @@
|
|
|
765
836
|
* affected pairings with their measured ratios. */
|
|
766
837
|
--nx-destructive: oklch(0.63 0.19 23.03);
|
|
767
838
|
--nx-destructive-solid: oklch(0.63 0.19 23.03);
|
|
839
|
+
/* Hover deepens the fill toward black, which its white label reads better on. */
|
|
840
|
+
--nx-destructive-hover: color-mix(
|
|
841
|
+
in srgb,
|
|
842
|
+
var(--nx-destructive-solid),
|
|
843
|
+
black 20%
|
|
844
|
+
);
|
|
768
845
|
--nx-destructive-foreground: oklch(1 0 0);
|
|
769
846
|
/* white */
|
|
770
847
|
/* Darkened from green-600; renders as #00852c, ~4.8:1 as text on white. */
|
|
@@ -777,6 +854,11 @@
|
|
|
777
854
|
* from the library's green, which read at 4.26:1 on it, to about 5.2:1. */
|
|
778
855
|
--nx-toast-success-bg: oklch(0.9788 0.0221 160.24);
|
|
779
856
|
--nx-toast-success-text: oklch(0.5048 0.1506 146.87);
|
|
857
|
+
/* A warning toast's surface and text, the same way: the library's own pale
|
|
858
|
+
* amber surface, and its amber text, which read at 3.07:1 on it, darkened
|
|
859
|
+
* to about 5.1:1. */
|
|
860
|
+
--nx-toast-warning-bg: oklch(0.9904 0.0167 96.37);
|
|
861
|
+
--nx-toast-warning-text: oklch(0.54 0.13 60);
|
|
780
862
|
|
|
781
863
|
/* Darkened from amber-500 so it reads as text on white at WCAG 4.5:1 (was
|
|
782
864
|
* 2.15:1); its light shades still tint badge/alert surfaces. */
|
|
@@ -784,6 +866,29 @@
|
|
|
784
866
|
--nx-warning-foreground: oklch(0.2079 0.0399 265.73);
|
|
785
867
|
/* slate-900 - REQUIRED for AA contrast (warning-500 on white = 3.4:1, fails AA) */
|
|
786
868
|
|
|
869
|
+
/* Status tokens. Each status has a faint SURFACE (an alert, a highlighted
|
|
870
|
+
* row), a BORDER for anything drawn on that surface, TEXT that reads at 4.5:1
|
|
871
|
+
* on its surface, on a card and on the page, and a SOLID for dots and icons
|
|
872
|
+
* that meets 3:1 on the page. They replace the white/black mixes of the
|
|
873
|
+
* numbered shades (`success-100`, `warning-700`), which tinted every chip.
|
|
874
|
+
* `danger` is a status (Failed, Error); `destructive` stays the colour of a
|
|
875
|
+
* destructive action. Success keeps its existing `-solid`. */
|
|
876
|
+
--nx-success-surface: oklch(0.975 0.013 150);
|
|
877
|
+
--nx-success-border: oklch(0.86 0.06 150);
|
|
878
|
+
--nx-success-text: oklch(0.43 0.12 150);
|
|
879
|
+
--nx-warning-surface: oklch(0.978 0.018 80);
|
|
880
|
+
--nx-warning-border: oklch(0.86 0.08 80);
|
|
881
|
+
--nx-warning-text: oklch(0.47 0.11 65);
|
|
882
|
+
--nx-warning-solid: oklch(0.64 0.15 62);
|
|
883
|
+
--nx-danger-surface: oklch(0.975 0.013 25);
|
|
884
|
+
--nx-danger-border: oklch(0.86 0.06 25);
|
|
885
|
+
--nx-danger-text: oklch(0.5 0.17 27);
|
|
886
|
+
--nx-danger-solid: oklch(0.6 0.2 27);
|
|
887
|
+
--nx-info-surface: oklch(0.975 0.012 250);
|
|
888
|
+
--nx-info-border: oklch(0.86 0.05 250);
|
|
889
|
+
--nx-info-text: oklch(0.45 0.13 255);
|
|
890
|
+
--nx-info-solid: oklch(0.58 0.16 255);
|
|
891
|
+
|
|
787
892
|
/* The highlighter mark in authored content. Kept a light yellow in both
|
|
788
893
|
* modes on purpose: it stands for a marker pen drawn over the text, and the
|
|
789
894
|
* pairing below is what keeps that readable rather than the page's own
|
|
@@ -1055,6 +1160,13 @@
|
|
|
1055
1160
|
/* Same value as the base: the button fill needs no darkening here because
|
|
1056
1161
|
its ink is black rather than white. */
|
|
1057
1162
|
--nx-destructive-solid: oklch(0.69 0.2 23.91);
|
|
1163
|
+
/* Hover lightens the fill, since its label here is black: deepening it
|
|
1164
|
+
would take the label toward the fill. */
|
|
1165
|
+
--nx-destructive-hover: color-mix(
|
|
1166
|
+
in srgb,
|
|
1167
|
+
var(--nx-destructive-solid),
|
|
1168
|
+
white 15%
|
|
1169
|
+
);
|
|
1058
1170
|
/* Black, not white. The dark-mode fill is light enough that black on-color
|
|
1059
1171
|
text reads at 6.90:1 where white would fall below the minimum. */
|
|
1060
1172
|
--nx-destructive-foreground: oklch(0 0 0);
|
|
@@ -1072,11 +1184,32 @@
|
|
|
1072
1184
|
/* The toast library's own dark success surface and text, kept: about 12.3:1. */
|
|
1073
1185
|
--nx-toast-success-bg: oklch(0.2107 0.0498 157.43);
|
|
1074
1186
|
--nx-toast-success-text: oklch(0.8635 0.1699 157.75);
|
|
1187
|
+
/* The toast library's own dark warning surface and text, kept: about 11.2:1. */
|
|
1188
|
+
--nx-toast-warning-bg: oklch(0.2277 0.0509 113.29);
|
|
1189
|
+
--nx-toast-warning-text: oklch(0.8642 0.1416 92.19);
|
|
1075
1190
|
--nx-warning: oklch(0.7686 0.1646 70.11);
|
|
1076
1191
|
/* amber-500 */
|
|
1077
1192
|
--nx-warning-foreground: oklch(0.2079 0.0399 265.73);
|
|
1078
1193
|
/* slate-900 */
|
|
1079
1194
|
|
|
1195
|
+
/* Status tokens, dark: a deep tinted surface, a mid border, light text and a
|
|
1196
|
+
* bright solid, so each reads on the black page as its light twin does. */
|
|
1197
|
+
--nx-success-surface: oklch(0.22 0.03 150);
|
|
1198
|
+
--nx-success-border: oklch(0.37 0.07 150);
|
|
1199
|
+
--nx-success-text: oklch(0.82 0.13 150);
|
|
1200
|
+
--nx-warning-surface: oklch(0.23 0.035 75);
|
|
1201
|
+
--nx-warning-border: oklch(0.4 0.08 75);
|
|
1202
|
+
--nx-warning-text: oklch(0.85 0.12 80);
|
|
1203
|
+
--nx-warning-solid: oklch(0.78 0.15 75);
|
|
1204
|
+
--nx-danger-surface: oklch(0.23 0.04 25);
|
|
1205
|
+
--nx-danger-border: oklch(0.4 0.09 25);
|
|
1206
|
+
--nx-danger-text: oklch(0.8 0.11 25);
|
|
1207
|
+
--nx-danger-solid: oklch(0.68 0.19 25);
|
|
1208
|
+
--nx-info-surface: oklch(0.22 0.035 255);
|
|
1209
|
+
--nx-info-border: oklch(0.38 0.08 255);
|
|
1210
|
+
--nx-info-text: oklch(0.82 0.09 250);
|
|
1211
|
+
--nx-info-solid: oklch(0.68 0.14 255);
|
|
1212
|
+
|
|
1080
1213
|
/* Dimmed so the mark reads as highlighted rather than as a lamp on a dark
|
|
1081
1214
|
* page, while its own foreground stays dark enough to read against it. */
|
|
1082
1215
|
--nx-highlight: oklch(0.8 0.1425 101.06);
|
|
@@ -1231,6 +1364,26 @@
|
|
|
1231
1364
|
align-content: start;
|
|
1232
1365
|
}
|
|
1233
1366
|
|
|
1367
|
+
/* A list page's inset: the shell's gutter as padding on a plain block, for a
|
|
1368
|
+
* page that must stay a block (it hands its height down through
|
|
1369
|
+
* `height: 100%`, which a grid area sized by `align-content: start` would
|
|
1370
|
+
* collapse). */
|
|
1371
|
+
.nx-page-pad {
|
|
1372
|
+
padding-inline: var(--nx-gutter);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
/* A start-aligned shell keeps the leading gutter fixed and gives all the
|
|
1376
|
+
* surplus to the trailing track, so a bounded column starts at the same edge
|
|
1377
|
+
* as the page header and every list instead of drifting right as the screen
|
|
1378
|
+
* widens. A `full` column still fills the row. */
|
|
1379
|
+
.nx-page-shell[data-align="start"] {
|
|
1380
|
+
grid-template-columns:
|
|
1381
|
+
[full-start] var(--nx-gutter)
|
|
1382
|
+
[content-start] minmax(0, var(--nx-shell-measure))
|
|
1383
|
+
[content-end] minmax(var(--nx-gutter), 1fr)
|
|
1384
|
+
[full-end];
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1234
1387
|
/* `min-width: 0` because a grid item's default `min-width: auto` refuses to
|
|
1235
1388
|
* shrink below its content, which lets one wide descendant — a long code
|
|
1236
1389
|
* string, a table — push the column past the measure it was given. */
|
|
@@ -1258,13 +1411,15 @@
|
|
|
1258
1411
|
* `:root` or `.nextly-admin` — both ancestors of the `<main>` that declares it —
|
|
1259
1412
|
* never matches, and the gutter keeps its widest value at every panel size. */
|
|
1260
1413
|
@container content (max-width: 1024px) {
|
|
1261
|
-
.nx-page-shell
|
|
1414
|
+
.nx-page-shell,
|
|
1415
|
+
.nx-page-pad {
|
|
1262
1416
|
--nx-gutter: 1.5rem;
|
|
1263
1417
|
}
|
|
1264
1418
|
}
|
|
1265
1419
|
|
|
1266
1420
|
@container content (max-width: 768px) {
|
|
1267
|
-
.nx-page-shell
|
|
1421
|
+
.nx-page-shell,
|
|
1422
|
+
.nx-page-pad {
|
|
1268
1423
|
--nx-gutter: 1rem;
|
|
1269
1424
|
}
|
|
1270
1425
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextlyhq/ui",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.75",
|
|
4
4
|
"description": "Nextly UI — Reusable React component library for Nextly plugins and custom admin UIs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"react-dom": "^19.3.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@nextlyhq/admin-css": "0.0.2-alpha.
|
|
91
|
-
"@nextlyhq/module-specifiers": "0.0.2-alpha.
|
|
92
|
-
"@nextlyhq/tsconfig": "0.0.2-alpha.
|
|
90
|
+
"@nextlyhq/admin-css": "0.0.2-alpha.75",
|
|
91
|
+
"@nextlyhq/module-specifiers": "0.0.2-alpha.75",
|
|
92
|
+
"@nextlyhq/tsconfig": "0.0.2-alpha.75",
|
|
93
93
|
"@tailwindcss/cli": "^4.3.2",
|
|
94
94
|
"@testing-library/react": "^16.3.0",
|
|
95
95
|
"@types/culori": "^4.0.1",
|