@khipu/design-system 0.3.0 → 0.3.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.
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
15
15
  * Source: design-system/src/tokens/tokens.json
16
- * Generated: 2026-08-04T17:30:50.532Z
16
+ * Generated: 2026-08-12T18:48:04.023Z
17
17
  *
18
18
  * To regenerate:
19
19
  * cd design-system && npm run tokens:generate
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
17
17
  * Source: design-system/src/tokens/tokens.json
18
- * Generated: 2026-08-04T17:30:50.532Z
18
+ * Generated: 2026-08-12T18:48:04.023Z
19
19
  *
20
20
  * To regenerate:
21
21
  * cd design-system && npm run tokens:generate
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@khipu/design-system/beercss",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
5
- "buildDate": "2026-08-04T17:30:52.937Z",
5
+ "buildDate": "2026-08-12T18:48:05.929Z",
6
6
  "includes": {
7
7
  "beercss": "4.0.1",
8
8
  "khipu-tokens": "latest",
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "scopeClass": ".kds-theme-root",
21
21
  "cdn": {
22
- "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.3.0/dist/beercss/khipu-beercss.min.css",
23
- "cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.3.0/dist/beercss/khipu-beercss.scoped.min.css",
24
- "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.3.0/dist/beercss/khipu-beercss.min.js"
22
+ "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.3.1/dist/beercss/khipu-beercss.min.css",
23
+ "cssScoped": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.3.1/dist/beercss/khipu-beercss.scoped.min.css",
24
+ "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.3.1/dist/beercss/khipu-beercss.min.js"
25
25
  }
26
26
  }
package/dist/index.d.mts CHANGED
@@ -14,9 +14,15 @@ interface KdsThemeProviderProps {
14
14
  * Lightweight theme provider using CSS custom properties.
15
15
  * Replaces MUI's KhipuThemeProvider.
16
16
  *
17
+ * Theme contract: sets `data-theme="light" | "dark"` on the wrapper — the same
18
+ * selector the generated CSS variables and component overrides key on
19
+ * (`[data-theme="dark"]`), so `mode="dark"` re-themes every `--kds-*` token in
20
+ * the subtree. The mode class is kept alongside for backward compatibility
21
+ * with CSS still keyed on `.light`/`.dark`.
22
+ *
17
23
  * @example
18
24
  * ```tsx
19
- * <KdsThemeProvider primaryColor="#FF0000">
25
+ * <KdsThemeProvider mode="dark" primaryColor="#FF0000">
20
26
  * <App />
21
27
  * </KdsThemeProvider>
22
28
  * ```
package/dist/index.d.ts CHANGED
@@ -14,9 +14,15 @@ interface KdsThemeProviderProps {
14
14
  * Lightweight theme provider using CSS custom properties.
15
15
  * Replaces MUI's KhipuThemeProvider.
16
16
  *
17
+ * Theme contract: sets `data-theme="light" | "dark"` on the wrapper — the same
18
+ * selector the generated CSS variables and component overrides key on
19
+ * (`[data-theme="dark"]`), so `mode="dark"` re-themes every `--kds-*` token in
20
+ * the subtree. The mode class is kept alongside for backward compatibility
21
+ * with CSS still keyed on `.light`/`.dark`.
22
+ *
17
23
  * @example
18
24
  * ```tsx
19
- * <KdsThemeProvider primaryColor="#FF0000">
25
+ * <KdsThemeProvider mode="dark" primaryColor="#FF0000">
20
26
  * <App />
21
27
  * </KdsThemeProvider>
22
28
  * ```
package/dist/index.js CHANGED
@@ -206,7 +206,7 @@ function KdsThemeProvider({ primaryColor, mode = "light", children }) {
206
206
  "--primary-container": lighten(primaryColor, 0.85),
207
207
  "--on-primary-container": primaryColor
208
208
  } : void 0;
209
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `kds-theme-root ${mode}`, style, children });
209
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `kds-theme-root ${mode}`, "data-theme": mode, style, children });
210
210
  }
211
211
 
212
212
  // src/tokens/index.ts
package/dist/index.mjs CHANGED
@@ -78,7 +78,7 @@ function KdsThemeProvider({ primaryColor, mode = "light", children }) {
78
78
  "--primary-container": lighten(primaryColor, 0.85),
79
79
  "--on-primary-container": primaryColor
80
80
  } : void 0;
81
- return /* @__PURE__ */ jsx("div", { className: `kds-theme-root ${mode}`, style, children });
81
+ return /* @__PURE__ */ jsx("div", { className: `kds-theme-root ${mode}`, "data-theme": mode, style, children });
82
82
  }
83
83
 
84
84
  // src/tokens/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khipu/design-system",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Khipu Design System - UI components and design tokens for the Khipu payment platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",