@irozon/design-system-react 0.2.3 → 0.3.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
@@ -69,6 +69,7 @@ both packages because your app imports the CSS package directly.
69
69
  | Component | Wraps |
70
70
  | --- | --- |
71
71
  | `Button` | `.iz-button` |
72
+ | `SignatureCTA` | `.iz-signature-cta` |
72
73
  | `Loader` | `.iz-loader` |
73
74
  | `Input`, `Textarea` | `.iz-input`, `.iz-textarea` |
74
75
  | `Select` | `.iz-select-wrap` / `.iz-select` |
@@ -80,6 +81,32 @@ both packages because your app imports the CSS package directly.
80
81
  | `Nav`, `NavGroup`, `NavItem` | `.iz-nav`, `.iz-nav-group`, `.iz-nav-item` |
81
82
  | `Tabs`, `TabPanel` | `.iz-tabs`, `.iz-tab`, `.iz-tab-panel` |
82
83
 
84
+ ### Signature CTA
85
+
86
+ `SignatureCTA` renders the canonical `.iz-signature-cta` structure and uses
87
+ the same framework-neutral CSS as standalone HTML. It renders an anchor by
88
+ default; choose a button for an action, or pass a router link component through
89
+ `as` to retain client-side navigation:
90
+
91
+ ```tsx
92
+ import { Link } from "react-router-dom";
93
+ import { SignatureCTA } from "@irozon/design-system-react";
94
+
95
+ <SignatureCTA href="/contact">Get in touch</SignatureCTA>
96
+
97
+ <SignatureCTA as="button" type="submit" onClick={submitForm}>
98
+ Send message
99
+ </SignatureCTA>
100
+
101
+ <SignatureCTA as={Link} to="/contact">
102
+ Get in touch
103
+ </SignatureCTA>
104
+ ```
105
+
106
+ Props for the rendered element are inferred from `as`, including its
107
+ accessibility, event, and navigation props. The CTA owns its decorative
108
+ three-dot motif in CSS; consumers provide the semantic label only.
109
+
83
110
  `Tabs`/`TabPanel` implement the full WAI-ARIA Tabs pattern (automatic
84
111
  activation): a roving tabindex so only the selected tab sits in the page's Tab
85
112
  order, ArrowLeft/ArrowRight to move between tabs, Home/End to jump to the
package/dist/Button.js CHANGED
@@ -3,5 +3,5 @@ import { cx } from "./internal/cx.js";
3
3
  /** Canonical `.iz-button` — see button.css for the full state/variant
4
4
  * contract this renders. */
5
5
  export function Button({ variant = "primary", size = "default", iconOnly, loading, iconHint, className, children, ...rest }) {
6
- return (_jsxs("button", { className: cx("iz-button", className), "data-variant": variant, "data-size": size === "default" ? undefined : size, "data-icon-only": iconOnly || undefined, "data-icon-hint": iconHint, "aria-busy": loading || undefined, ...rest, children: [_jsx("span", { className: "iz-button__spinner", "aria-hidden": "true", children: _jsx("span", { className: "iz-loader", "data-size": "small" }) }), _jsx("span", { children: children })] }));
6
+ return (_jsxs("button", { className: cx("iz-button", className), "data-variant": variant, "data-size": size === "default" ? undefined : size, "data-icon-only": iconOnly || undefined, "data-icon-hint": iconHint, "aria-busy": loading || undefined, ...rest, children: [_jsx("span", { className: "iz-loader iz-button__spinner", "data-size": "small", "aria-hidden": "true" }), _jsx("span", { children: children })] }));
7
7
  }
@@ -0,0 +1,18 @@
1
+ import type { ComponentPropsWithoutRef, ElementType, ReactNode } from "react";
2
+ interface SignatureCTAOwnProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ /**
7
+ * Props for the canonical Signature CTA. Native element props are inferred
8
+ * from `as`, so router links can receive their own navigation props.
9
+ */
10
+ export type SignatureCTAProps<T extends ElementType = "a"> = SignatureCTAOwnProps & {
11
+ as?: T;
12
+ } & Omit<ComponentPropsWithoutRef<T>, keyof SignatureCTAOwnProps | "as">;
13
+ /**
14
+ * Canonical `.iz-signature-cta` markup. Import `@irozon/design-system/irozon.css`
15
+ * once in the app to get its shared Ink-to-Lime animation and decorative mark.
16
+ */
17
+ export declare function SignatureCTA<T extends ElementType = "a">({ as, children, className, ...rest }: SignatureCTAProps<T>): import("react").JSX.Element;
18
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from "./internal/cx.js";
3
+ /**
4
+ * Canonical `.iz-signature-cta` markup. Import `@irozon/design-system/irozon.css`
5
+ * once in the app to get its shared Ink-to-Lime animation and decorative mark.
6
+ */
7
+ export function SignatureCTA({ as, children, className, ...rest }) {
8
+ const Component = as ?? "a";
9
+ return (_jsxs(Component, { className: cx("iz-signature-cta", className), ...rest, children: [_jsx("span", { className: "iz-signature-cta__sizer", "aria-hidden": "true", children: children }), _jsx("span", { className: "iz-signature-cta__base", children: _jsx("span", { className: "iz-signature-cta__label", children: children }) }), _jsx("span", { className: "iz-signature-cta__panel", "aria-hidden": "true" })] }));
10
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export { Button } from "./Button.js";
2
2
  export type { ButtonProps, ButtonVariant, ButtonSize } from "./Button.js";
3
+ export { SignatureCTA } from "./SignatureCTA.js";
4
+ export type { SignatureCTAProps } from "./SignatureCTA.js";
3
5
  export { Loader } from "./Loader.js";
4
6
  export type { LoaderProps } from "./Loader.js";
5
7
  export { Input, Textarea } from "./Input.js";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Button } from "./Button.js";
2
+ export { SignatureCTA } from "./SignatureCTA.js";
2
3
  export { Loader } from "./Loader.js";
3
4
  export { Input, Textarea } from "./Input.js";
4
5
  export { Select } from "./Select.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@irozon/design-system-react",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Canonical React components for the Irozon Design System — thin, accessible wrappers over @irozon/design-system's framework-neutral iz-* CSS. No independent visual styling of its own; the CSS package stays the single source of truth for how these look.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsc",
37
- "typecheck": "tsc --noEmit",
37
+ "typecheck": "tsc --noEmit && tsc --project test/tsconfig.json",
38
38
  "test": "npm run build && node --experimental-strip-types --test test/smoke.test.ts"
39
39
  },
40
40
  "peerDependencies": {