mds-storybook 0.1.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 ADDED
@@ -0,0 +1,70 @@
1
+ # Marketing Design System (MDS)
2
+
3
+ A themed React component library for marketing — dark mode by default, light mode via `data-theme="light"`.
4
+
5
+ ## Stack
6
+
7
+ - React 18 + TypeScript
8
+ - Sass Modules
9
+ - Storybook 8 + Vite
10
+
11
+ ## Getting started
12
+
13
+ ```bash
14
+ npm install
15
+ npm run storybook # dev server at localhost:6006
16
+ npm run build-storybook
17
+ ```
18
+
19
+ ## Build outputs
20
+
21
+ ```bash
22
+ npm run npm:build:lib
23
+ npm run npm:build:storybook
24
+ npm run npm:build:all
25
+ ```
26
+
27
+ - `npm run npm:build:lib` builds the consumable package into `dist/`.
28
+ - `npm run npm:build:storybook` builds the Storybook display site into `storybook-static/`.
29
+ - `npm run npm:build:all` builds both outputs.
30
+
31
+ The `dist/` folder is the package output intended for consumption.
32
+
33
+ The `storybook-static/` folder is the Storybook presentation build.
34
+
35
+ ## Publish scripts
36
+
37
+ ```bash
38
+ npm run npm:pack:check
39
+ npm run npm:version:patch
40
+ npm run npm:publish
41
+ ```
42
+
43
+ - `npm:pack:check` previews the npm tarball before publishing.
44
+ - `npm:version:patch|minor|major` bumps the package version.
45
+ - `npm:publish` publishes the package.
46
+ - `npm:publish:public` publishes a scoped package with public access.
47
+ - `npm:whoami` confirms the logged-in npm account.
48
+
49
+ Remove `"private": true` from `package.json` before publishing, otherwise npm will refuse to publish the package.
50
+
51
+ ## Package usage
52
+
53
+ ```tsx
54
+ import { Button, Checkbox, Headline, Icon, SmallIcon, SSOButton, Subhead } from 'mds-storybook';
55
+ import 'mds-storybook/style.css';
56
+ ```
57
+
58
+ ## Theming
59
+
60
+ Tokens live in `src/styles/tokens.scss`. All colors are CSS custom properties — switch themes by toggling `html[data-theme="light"]`.
61
+
62
+ ## Components
63
+
64
+ | Component | Variants | Description |
65
+ |-----------|----------|-------------|
66
+ | `Headline` | `xxl` `xl` `l` `m` `s` `xs` `xxs` `xxxs` | Montserrat Bold/SemiBold headings |
67
+ | `Subhead` | `l` `m` `s` | Montserrat Medium subheadings |
68
+ | `Button` | variant: `primary` `secondary` · platform: `ow` `cf` `tb` `nt` `op` · size: `l` `m` | Marketing CTA button, platform-themed |
69
+ | `Checkbox` | size: `l` `s` · states: unchecked, checked, indeterminate, disabled | Form checkbox with optional leading/trailing label |
70
+ | `SSOButton` | provider: `discord` `facebook` `google` `twitch` | Social sign-in button with branded icon tile |
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { IconName } from '../Icon';
3
+ export type ButtonVariant = 'primary' | 'secondary';
4
+ export type ButtonPlatform = 'ow' | 'cf' | 'tb' | 'nt' | 'op';
5
+ export type ButtonSize = 'l' | 'm';
6
+ export interface ButtonProps {
7
+ variant?: ButtonVariant;
8
+ platform?: ButtonPlatform;
9
+ size?: ButtonSize;
10
+ icon?: IconName;
11
+ iconPosition?: 'leading' | 'trailing';
12
+ disabled?: boolean;
13
+ onClick?: () => void;
14
+ children: ReactNode;
15
+ className?: string;
16
+ }
17
+ export declare const Button: ({ variant, platform, size, icon, iconPosition, disabled, onClick, children, className, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps, ButtonVariant, ButtonPlatform, ButtonSize } from './Button';
@@ -0,0 +1,11 @@
1
+ import type { InputHTMLAttributes, ReactNode } from 'react';
2
+ export type CheckboxSize = 'l' | 's';
3
+ export type CheckboxIndicatorPosition = 'leading' | 'trailing';
4
+ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'children' | 'size' | 'type'> {
5
+ size?: CheckboxSize;
6
+ indicatorPosition?: CheckboxIndicatorPosition;
7
+ indeterminate?: boolean;
8
+ children?: ReactNode;
9
+ className?: string;
10
+ }
11
+ export declare const Checkbox: ({ size, indicatorPosition, indeterminate, children, className, disabled, id, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './Checkbox';
2
+ export type { CheckboxProps, CheckboxSize, CheckboxIndicatorPosition, } from './Checkbox';
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ export type HeadlineSize = "xxl" | "xl" | "l" | "m" | "s" | "xs" | "xxs" | "xxxs";
3
+ type HeadingElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
+ export interface HeadlineProps {
5
+ size?: HeadlineSize;
6
+ as?: HeadingElement;
7
+ children: ReactNode;
8
+ className?: string;
9
+ }
10
+ export declare const Headline: ({ size, as, children, className, }: HeadlineProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Headline } from './Headline';
2
+ export type { HeadlineProps, HeadlineSize } from './Headline';
@@ -0,0 +1,9 @@
1
+ export declare const ICON_NAMES: readonly ["arrow-right", "arrow-left", "arrow-up", "arrow-down", "chevron-right", "chevron-left", "chevron-up", "chevron-down", "close", "plus", "minus", "check", "search", "download", "external-link", "play", "discord", "facebook", "google", "instagram", "linkedin", "reddit", "tiktok", "twitch", "twitter", "whatsapp", "youtube"];
2
+ export type IconName = (typeof ICON_NAMES)[number];
3
+ export type IconSize = 16 | 20 | 24 | 32;
4
+ export interface IconProps {
5
+ name: IconName;
6
+ size?: IconSize;
7
+ className?: string;
8
+ }
9
+ export declare const Icon: ({ name, size, className }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { Icon } from './Icon';
2
+ export { ICON_NAMES } from './Icon';
3
+ export type { IconProps, IconName, IconSize } from './Icon';
@@ -0,0 +1,9 @@
1
+ import type { ButtonHTMLAttributes } from 'react';
2
+ export declare const SSO_PROVIDERS: readonly ["discord", "facebook", "google", "twitch"];
3
+ export type SSOProvider = (typeof SSO_PROVIDERS)[number];
4
+ export interface SSOButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ provider: SSOProvider;
6
+ label?: string;
7
+ fullWidth?: boolean;
8
+ }
9
+ export declare const SSOButton: ({ provider, label, fullWidth, className, type, ...props }: SSOButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { SSOButton, SSO_PROVIDERS } from './SSOButton';
2
+ export type { SSOButtonProps, SSOProvider } from './SSOButton';
@@ -0,0 +1,9 @@
1
+ import type { SmallIconName } from './smallIconData';
2
+ export type { SmallIconName };
3
+ export interface SmallIconProps {
4
+ name: SmallIconName;
5
+ /** Rendered size in px. Default: 40 (native). */
6
+ size?: number;
7
+ className?: string;
8
+ }
9
+ export declare const SmallIcon: ({ name, size, className }: SmallIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { SmallIcon } from './SmallIcon';
2
+ export type { SmallIconProps, SmallIconName } from './SmallIcon';
@@ -0,0 +1,5 @@
1
+ export type SmallIconName = 'castel' | 'robot' | 'report' | 'history' | 'cancel' | 'check' | 'recipe' | 'globe' | 'monetize-in-minutes' | 'money' | 'layout' | 'swords' | 'shield' | 'cart' | 'checkout' | 'checkout-alt' | 'growth' | 'gift-card' | 'badge' | 'coupon' | 'flash' | 'basket' | 'subscriptions' | 'no-hidden-costs' | 'team' | 'management' | 'gem' | 'games' | 'gamer' | 'pixel-heart' | 'stop-hand' | 'ow-app' | 'pc' | 'internet' | 'image' | 'bike' | 'meteor' | 'planet' | 'award' | 'tools' | 'multi-platform' | 'api' | 'analytics' | 'dev-console' | 'men' | 'dollar' | 'anchor' | 'explore' | 'key' | 'joystick' | 'user' | 'crown' | 'badge-check' | 'overlay' | 'lock' | 'flag' | 'search' | 'bell' | 'rocket' | 'code' | 'filter' | 'star' | 'token' | 'video' | 'lightbulb' | 'discord' | 'stop-hand-2' | 'games-2' | 'academy' | 'support' | 'knowledgebase' | 'chat' | 'update' | 'changes' | 'profit' | 'star-2' | 'upload' | 'download' | 'flame' | 'window' | 'apple' | 'linux' | 'mobile' | 'store' | 'store-2' | 'control-panel' | 'currency-exchange' | 'multi-currency-2' | 'multi-currency-3' | 'eye' | 'ai' | 'percent' | 'ad' | 'cursor' | 'medkit' | 'rate-us' | 'premium-diamond' | 'megaphone' | 'megaphone-2' | 'chest' | 'money-bag' | 'movie' | 'ticket' | 'map' | 'fps' | 'sports' | 'racing' | 'moba' | 'battle-royale' | 'rpg' | 'rts' | 'simulator' | 'tools-hogwarts' | 'community-hogwarts' | 'smiley-bad' | 'smiley-poor' | 'average' | 'good' | 'excellent' | 'timezone' | 'place' | 'keyboard' | 'mouse' | 'headset' | 'globe-2' | 'chargebacks' | 'display' | 'native' | 'ctv' | 'olv' | 'tv' | 'mic' | 'tag' | 'discount' | 'wallet' | 'legal' | 'scale' | 'credit-card' | 'pie-chart' | 'cashier' | 'growth-2' | 'money-file' | 'money-record' | 'analysis' | 'tracking' | 'map-pin' | 'capa' | 'golden-logo';
2
+ export declare const smallIconData: Record<SmallIconName, {
3
+ inner: string;
4
+ viewBox: string;
5
+ }>;
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ export type SubheadSize = 'l' | 'm' | 's';
3
+ type HeadingElement = 'h3' | 'h4' | 'h5' | 'h6';
4
+ export interface SubheadProps {
5
+ size?: SubheadSize;
6
+ as?: HeadingElement;
7
+ children: ReactNode;
8
+ className?: string;
9
+ }
10
+ export declare const Subhead: ({ size, as, children, className }: SubheadProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Subhead } from './Subhead';
2
+ export type { SubheadProps, SubheadSize } from './Subhead';
@@ -0,0 +1,7 @@
1
+ export * from './Button';
2
+ export * from './Checkbox';
3
+ export * from './Headline';
4
+ export * from './Icon';
5
+ export * from './SmallIcon';
6
+ export * from './SSOButton';
7
+ export * from './Subhead';