@tcn/sb-blackcat-addon 4.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A Storybook addon that provides enhanced accessibility features, layout direction controls, and design system integration for the Blackcat UI component library.
4
4
 
5
+ > **Integrating into a new storybook config?** This package ships CSS unbundled. Read the [Consumer Integration Guide](../../docs/consumer-integration.md) first — misconfigured `css.modules.localsConvention` will cause the addon to render unstyled.
6
+
5
7
  ## Overview
6
8
 
7
9
  `@tcn/sb-blackcat-addon` is a specialized Storybook addon that enhances the development experience for Blackcat UI components. It provides accessibility testing tools, layout direction controls, and design system integration features that help developers build and test components with accessibility and internationalization in mind.
@@ -0,0 +1 @@
1
+ @layer tcn-reset, tcn-system, tcn-theme;
package/dist/preview.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- require('./preview.css');const index = require("./index.cjs");
2
+ require("./layers.css");
3
+ const index = require("./index.cjs");
3
4
  const jsxRuntime = require("react/jsx-runtime");
4
5
  const themes = require("@tcn/ui/themes");
5
6
  const react = require("react");
7
+ const styles = require("./sb_decorator.module.css");
6
8
  const stacks = require("@tcn/ui/stacks");
7
9
  const windows98 = require("@tcn/ui/themes/windows98");
8
10
  const ergo = require("@tcn/ui/themes/ergo");
9
- const blackcatStorybookDecorator = `_blackcat-storybook-decorator_e27594c`;
10
- const styles = { "blackcat-storybook-decorator": blackcatStorybookDecorator };
11
11
  const sbThemes = Object.freeze({
12
12
  ergo: {
13
13
  value: "ergo",
package/dist/preview.js CHANGED
@@ -1,12 +1,12 @@
1
+ import "./layers.css";
1
2
  import { BLACKCAT_ADDON_ID as ADDON_ID } from "./index.js";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { Theme } from "@tcn/ui/themes";
4
5
  import { useEffect } from "react";
6
+ import styles from "./sb_decorator.module.css";
5
7
  import { VStack } from "@tcn/ui/stacks";
6
8
  import { windows98StyleSheet } from "@tcn/ui/themes/windows98";
7
9
  import { ergoStyleSheet } from "@tcn/ui/themes/ergo";
8
- import './preview.css';const blackcatStorybookDecorator = `_blackcat-storybook-decorator_e27594c`;
9
- const styles = { "blackcat-storybook-decorator": blackcatStorybookDecorator };
10
10
  const sbThemes = Object.freeze({
11
11
  ergo: {
12
12
  value: "ergo",
@@ -1,7 +1,6 @@
1
- @layer tcn-reset, tcn-system, tcn-theme;
2
- html,
3
- body,
4
- #storybook-root {
1
+ :global(html),
2
+ :global(body),
3
+ :global(#storybook-root) {
5
4
  width: 100% !important;
6
5
  height: 100% !important;
7
6
  padding: 0 !important;
@@ -11,12 +10,12 @@ body,
11
10
  background-color: var(--body-color);
12
11
  }
13
12
 
14
- #storybook-docs {
13
+ :global(#storybook-docs) {
15
14
  width: 100% !important;
16
15
  height: 100% !important;
17
16
  overflow: auto !important;
18
17
  }
19
18
 
20
- ._blackcat-storybook-decorator_e27594c {
19
+ .blackcat-storybook-decorator {
21
20
  background-color: var(--background-color-primary);
22
21
  }
@@ -0,0 +1,31 @@
1
+ .storybook-button {
2
+ font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3
+ font-weight: 700;
4
+ border: 0;
5
+ border-radius: 3em;
6
+ cursor: pointer;
7
+ display: inline-block;
8
+ line-height: 1;
9
+ }
10
+ .storybook-button--primary {
11
+ color: white;
12
+ background-color: var(--tcn-primary-main);
13
+ }
14
+ .storybook-button--secondary {
15
+ color: var(--tcn-primary-main);
16
+ background-color: transparent;
17
+ box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
18
+ }
19
+ .storybook-button--small {
20
+ font-size: calc(12px * var(--accessibility-scalar));
21
+ padding: 10px 16px;
22
+ }
23
+
24
+ .storybook-button--medium {
25
+ font-size: calc(14px * var(--accessibility-scalar));
26
+ padding: 11px 20px;
27
+ }
28
+ .storybook-button--large {
29
+ font-size: calc(16px * var(--accessibility-scalar));
30
+ padding: 12px 24px;
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcn/sb-blackcat-addon",
3
- "version": "4.0.0",
3
+ "version": "6.0.0",
4
4
  "type": "module",
5
5
  "author": "TCN",
6
6
  "description": "Storybook addon that provides Blackcat accessibility scalar and layout direction.",
@@ -39,10 +39,10 @@
39
39
  "peerDependencies": {
40
40
  "react": "^18.2.0",
41
41
  "react-dom": "^18.2.0",
42
- "@tcn/ui": "^0.18.1"
42
+ "@tcn/ui": "^0.20.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@tcn/ui": "0.18.1"
45
+ "@tcn/ui": "0.20.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "clsx": "^2.1.1",