@tabler/charts-bootstrap 0.0.1-alpha.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tabler.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! @tabler/charts-bootstrap, Tabler preset | MIT */
2
- :where(:root,[data-bs-theme],[data-bs-theme-primary],[data-bs-theme-base],[data-bs-theme-font],[data-bs-theme-radius]){--tc-color-1:var(--tblr-primary,#066fd1);--tc-focus-color:var(--tblr-primary,#066fd1);--tc-surface:var(--tblr-bg-surface,#fff);--tc-text-color:var(--tblr-body-color,#0b0b0b);--tc-tooltip-color:var(--tblr-body-color,#0b0b0b);--tc-text-muted:var(--tblr-secondary,#6f6e69);--tc-grid-color:var(--tblr-border-color-translucent,#e1e0d9);--tc-baseline-color:var(--tblr-border-color,#c3c2b7);--tc-hover-color:rgba(var(--tblr-emphasis-color-rgb,11, 11, 11), .05);--tc-tooltip-bg:var(--tblr-bg-surface,#fff);--tc-tooltip-border:var(--tblr-border-color-translucent,#0b0b0b1a);--tc-tooltip-shadow:var(--tblr-box-shadow,0 4px 16px #0b0b0b1f);--tc-tooltip-radius:var(--tblr-border-radius,6px);--tc-font-family:var(--tblr-body-font-family,inherit)}:where(:root,[data-bs-theme=light]){--tc-color-2:#eb6834;--tc-color-3:#1baf7a;--tc-color-4:#eda100;--tc-color-5:#e87ba4;--tc-color-6:#008300;--tc-color-7:#4a3aa7;--tc-color-8:#e34948}:where([data-bs-theme=dark]){--tc-color-2:#d95926;--tc-color-3:#199e70;--tc-color-4:#c98500;--tc-color-5:#d55181;--tc-color-6:#008300;--tc-color-7:#9085e9;--tc-color-8:#e66767}
2
+ :where(:root,[data-bs-theme],[data-bs-theme-primary],[data-bs-theme-base],[data-bs-theme-font],[data-bs-theme-radius]){--tc-color-1:var(--tblr-primary,#066fd1);--tc-focus-color:var(--tblr-primary,#066fd1);--tc-surface:var(--tblr-bg-surface,#fff);--tc-text-color:var(--tblr-body-color,#0b0b0b);--tc-text-muted:var(--tblr-secondary,#6f6e69);--tc-grid-color:var(--tblr-border-color-translucent,#e1e0d9);--tc-baseline-color:var(--tblr-border-color,#c3c2b7);--tc-hover-color:rgba(var(--tblr-emphasis-color-rgb,11, 11, 11), .05);--tc-tooltip-bg:var(--tblr-tooltip-bg,#0b0b0b);--tc-tooltip-color:var(--tblr-tooltip-color,#fff);--tc-tooltip-muted:rgba(var(--tblr-body-bg-rgb,255, 255, 255), .7);--tc-tooltip-border:rgba(var(--tblr-body-bg-rgb,255, 255, 255), .12);--tc-tooltip-shadow:var(--tblr-box-shadow,0 4px 16px #0b0b0b1f);--tc-tooltip-radius:var(--tblr-border-radius,6px);--tc-font-family:var(--tblr-body-font-family,inherit)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tabler/charts-bootstrap",
3
- "version": "0.0.1-alpha.0",
3
+ "version": "0.2.0",
4
4
  "description": "Bootstrap 5.3 and Tabler theme mapping (CSS and SCSS) and a data API for @tabler/charts.",
5
5
  "keywords": [
6
6
  "charts",
@@ -55,7 +55,7 @@
55
55
  "scss"
56
56
  ],
57
57
  "peerDependencies": {
58
- "@tabler/charts": "^0.0.1-alpha.0",
58
+ "@tabler/charts": "^0.2.0",
59
59
  "bootstrap": ">=5.3"
60
60
  },
61
61
  "peerDependenciesMeta": {
@@ -64,8 +64,8 @@
64
64
  }
65
65
  },
66
66
  "devDependencies": {
67
- "@tabler/charts": "^0.0.1-alpha.0",
68
- "sass": "^1.105.1"
67
+ "@tabler/charts": "^0.2.0",
68
+ "sass": "^1.108.2"
69
69
  },
70
70
  "publishConfig": {
71
71
  "access": "public"
package/scss/_charts.scss CHANGED
@@ -26,8 +26,11 @@ $tc-text-muted: var(--#{$tc-prefix}secondary-color, #6f6e69) !default;
26
26
  $tc-grid-color: var(--#{$tc-prefix}border-color-translucent, #e1e0d9) !default;
27
27
  $tc-baseline-color: var(--#{$tc-prefix}border-color, #c3c2b7) !default;
28
28
  $tc-hover-color: rgba(var(--#{$tc-prefix}emphasis-color-rgb, 11, 11, 11), 0.05) !default;
29
- $tc-tooltip-bg: var(--#{$tc-prefix}body-bg, #fff) !default;
30
- $tc-tooltip-border: var(--#{$tc-prefix}border-color-translucent, rgb(11 11 11 / 10%)) !default;
29
+ // The tooltip takes Bootstrap's tooltip colors: the emphasis color on the body background.
30
+ $tc-tooltip-bg: var(--#{$tc-prefix}emphasis-color, #0b0b0b) !default;
31
+ $tc-tooltip-color: var(--#{$tc-prefix}body-bg, #fff) !default;
32
+ $tc-tooltip-muted: rgba(var(--#{$tc-prefix}body-bg-rgb, 255, 255, 255), 0.7) !default;
33
+ $tc-tooltip-border: rgba(var(--#{$tc-prefix}body-bg-rgb, 255, 255, 255), 0.12) !default;
31
34
  $tc-tooltip-shadow: var(--#{$tc-prefix}box-shadow, 0 4px 16px rgb(11 11 11 / 12%)) !default;
32
35
  $tc-tooltip-radius: var(--#{$tc-prefix}border-radius, 6px) !default;
33
36
  $tc-font-family: var(--#{$tc-prefix}body-font-family, inherit) !default;
@@ -60,12 +63,13 @@ $tc-palette-dark: (
60
63
  --tc-focus-color: #{$tc-series-1};
61
64
  --tc-surface: #{$tc-surface};
62
65
  --tc-text-color: #{$tc-text-color};
63
- --tc-tooltip-color: #{$tc-text-color};
64
66
  --tc-text-muted: #{$tc-text-muted};
65
67
  --tc-grid-color: #{$tc-grid-color};
66
68
  --tc-baseline-color: #{$tc-baseline-color};
67
69
  --tc-hover-color: #{$tc-hover-color};
68
70
  --tc-tooltip-bg: #{$tc-tooltip-bg};
71
+ --tc-tooltip-color: #{$tc-tooltip-color};
72
+ --tc-tooltip-muted: #{$tc-tooltip-muted};
69
73
  --tc-tooltip-border: #{$tc-tooltip-border};
70
74
  --tc-tooltip-shadow: #{$tc-tooltip-shadow};
71
75
  --tc-tooltip-radius: #{$tc-tooltip-radius};
package/scss/_tabler.scss CHANGED
@@ -3,10 +3,13 @@
3
3
  // but prefixes its variables with `tblr-`, and sets its theme options
4
4
  // (data-bs-theme-primary, -base, -font, -radius) as attributes too.
5
5
  //
6
- // Charts then sit on the card surface (--tblr-bg-surface), use Tabler's
7
- // muted gray, border colors, radius, shadow and font, and the first series
8
- // follows the theme's primary color. Load it after `@tabler/charts/style.css`;
9
- // the plain CSS build is `@tabler/charts-bootstrap/tabler.css`.
6
+ // The chart stylesheet already reads --tblr-* variables (with its own colors
7
+ // as fallbacks), so on a Tabler page this preset only adds the theme-option
8
+ // scopes: the mapping is declared again on every element that carries a
9
+ // data-bs-theme-* attribute, so a subtree with its own primary color or
10
+ // radius gets it. Series 2–8 are left to the chart stylesheet, which uses
11
+ // Tabler's named colors. Load it after `@tabler/charts/style.css`; the plain
12
+ // CSS build is `@tabler/charts-bootstrap/tabler.css`.
10
13
  //
11
14
  // @use "@tabler/charts-bootstrap/scss/tabler";
12
15
  // @use "@tabler/charts-bootstrap/scss/tabler" with ($tc-series-1: var(--tblr-green));
@@ -17,6 +20,9 @@
17
20
  $tc-theme-scopes: ":root, [data-bs-theme], [data-bs-theme-primary], [data-bs-theme-base], [data-bs-theme-font], [data-bs-theme-radius]" !default,
18
21
  $tc-series-1: var(--tblr-primary, #066fd1) !default,
19
22
  $tc-surface: var(--tblr-bg-surface, #fff) !default,
20
- $tc-tooltip-bg: var(--tblr-bg-surface, #fff) !default,
21
- $tc-text-muted: var(--tblr-secondary, #6f6e69) !default
23
+ $tc-tooltip-bg: var(--tblr-tooltip-bg, #0b0b0b) !default,
24
+ $tc-tooltip-color: var(--tblr-tooltip-color, #fff) !default,
25
+ $tc-text-muted: var(--tblr-secondary, #6f6e69) !default,
26
+ $tc-palette-light: () !default,
27
+ $tc-palette-dark: () !default
22
28
  );