@helvetia-design/react 0.0.5 → 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,74 @@
1
+ <a href="https://helvetia-design.vercel.app" target="blank">
2
+ <img src="https://raw.githubusercontent.com/helvetia-design/system/main/apps/storybook/src/assets/images/banner.svg?sanitize=true" alt="Helvetia Design System" />
3
+ </a>
4
+
5
+ Built with accessibility and simplicity in mind, the Helvetia Design System provides UI components and a clearly defined visual style for building web applications.
6
+
7
+ ## Core Principles
8
+
9
+ - **Accessibility** — WCAG 2.2 AA compliant, keyboard navigation, screen reader support
10
+ - **Simplicity** — HTML → CSS → JavaScript approach, minimal complexity
11
+ - **Responsiveness** — Works seamlessly from 320px to 2560px viewports
12
+ - **Standards Compliance** — W3C best practices, modern web standards
13
+ - **Compatibility** — Browser support verified via webstatus.dev and caniuse.com
14
+ - **Inclusion** — Designed for diverse abilities and technologies
15
+
16
+ ## Installation
17
+
18
+ Install the core design system package via npm:
19
+
20
+ ```bash
21
+ npm install @helvetia-design/core
22
+ ```
23
+
24
+ Then import the CSS and component loader in your application:
25
+
26
+ ```html
27
+ <link rel="stylesheet" href="node_modules/@helvetia-design/styles/dist/css/design-system.css" />
28
+ <script type="module" src="node_modules/@helvetia-design/core/dist/design-system/design-system.esm.js"></script>
29
+ ```
30
+
31
+ For framework-specific integrations, see the [Quick Start guide](https://helvetia-design.vercel.app/?path=/docs/development-getting-started--documentation).
32
+
33
+ ## Quick Start
34
+
35
+ Use any design system component in your HTML:
36
+
37
+ ```html
38
+ <ds-button>Click me</ds-button>
39
+ <ds-card>
40
+ <ds-heading level="2">Welcome</ds-heading>
41
+ <p>Start building with the Helvetia Design System</p>
42
+ </ds-card>
43
+ ```
44
+
45
+ Explore all available components, design tokens, and examples in the [component library](https://helvetia-design.vercel.app).
46
+
47
+ ## Contributing
48
+
49
+ We welcome contributions! Please read our [CONTRIBUTING.md](https://github.com/helvetia-design/system/blob/main/CONTRIBUTING.md) guide to learn about:
50
+
51
+ - Reporting bugs and requesting features
52
+ - Development setup and workflow
53
+ - Creating new components
54
+ - Testing and code quality standards
55
+ - Semantic versioning and changesets
56
+
57
+ Follow our [Code of Conduct](https://github.com/helvetia-design/system/blob/main/CODE_OF_CONDUCT.md) for all interactions.
58
+
59
+ ## Learn More
60
+
61
+ - **[Documentation](https://helvetia-design.vercel.app)** — Component library, design tokens, and interactive examples in Storybook
62
+ - **[Quick Start](https://helvetia-design.vercel.app/?path=/docs/development-getting-started--documentation)** — Get started with the design system in your project
63
+ - **[llms.txt](https://helvetia-design.vercel.app/llms.txt)** / **[llms-full.txt](https://helvetia-design.vercel.app/llms-full.txt)** — Machine-readable component API and usage docs for AI coding tools ([llmstxt.org](https://llmstxt.org))
64
+ - **[CHANGELOG.md](https://github.com/helvetia-design/system/blob/main/CHANGELOG.md)** — Release notes, version history, and changes for each version
65
+ - **[ARCHITECTURE.md](https://github.com/helvetia-design/system/blob/main/docs/ARCHITECTURE.md)** — System design, workspace structure, component lifecycle, web components patterns, CSS variables, testing strategy
66
+ - **[DEVELOPMENT.md](https://github.com/helvetia-design/system/blob/main/docs/DEVELOPMENT.md)** — Local setup, dev servers, building, testing, troubleshooting
67
+ - **[CONTRIBUTING.md](https://github.com/helvetia-design/system/blob/main/CONTRIBUTING.md)** — Contribution workflow, PR process, component checklist, accessibility requirements
68
+ - **[STYLE_GUIDE.md](https://github.com/helvetia-design/system/blob/main/docs/STYLE_GUIDE.md)** — Code standards, naming conventions, best practices
69
+ - **[SECURITY.md](https://github.com/helvetia-design/system/blob/main/SECURITY.md)** — Security policy, vulnerability reporting, and compliance guidelines
70
+ - **[CODE_OF_CONDUCT.md](https://github.com/helvetia-design/system/blob/main/CODE_OF_CONDUCT.md)** — Community standards and expectations
71
+
72
+ ## License
73
+
74
+ This project is licensed under the Apache License 2.0. See [LICENSE](https://github.com/helvetia-design/system/blob/main/LICENSE) for details.
@@ -115,6 +115,7 @@ export const DsButton = /*@__PURE__*/ createComponent({
115
115
  name: 'name',
116
116
  value: 'value',
117
117
  a11yControls: 'a-1-1y-controls',
118
+ a11yCurrent: 'a-1-1y-current',
118
119
  a11yTitle: 'a-1-1y-title',
119
120
  a11yLabel: 'a-1-1y-label',
120
121
  a11yHaspopup: 'a-1-1y-haspopup'
@@ -179,8 +180,7 @@ export const DsCardSubtitle = /*@__PURE__*/ createComponent({
179
180
  tagName: 'ds-card-subtitle',
180
181
  properties: {
181
182
  inverted: 'inverted',
182
- bold: 'bold',
183
- color: 'color'
183
+ bold: 'bold'
184
184
  },
185
185
  hydrateModule: typeof window === 'undefined' ? import('@helvetia-design/core/hydrate') : undefined,
186
186
  clientModule: clientComponents.DsCardSubtitle,
@@ -453,7 +453,6 @@ export const DsHeading = /*@__PURE__*/ createComponent({
453
453
  noWrap: 'no-wrap',
454
454
  subtitle: 'subtitle',
455
455
  space: 'space',
456
- color: 'color',
457
456
  inverted: 'inverted',
458
457
  shadow: 'shadow'
459
458
  },
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { dsModalController } from '@helvetia-design/core';
3
+ import { defineCustomElement as defineDsModal } from '@helvetia-design/core/components/ds-modal.js';
3
4
  import { useCallback, useRef } from 'react';
4
5
  import { flushSync } from 'react-dom';
5
6
  import { createRoot } from 'react-dom/client';
@@ -8,6 +9,11 @@ import { createRoot } from 'react-dom/client';
8
9
  * and hands it to the modal controller via `ModalOptions.component`.
9
10
  */
10
11
  export function useModal() {
12
+ // `dsModalController.create()` builds the element with `document.createElement('ds-modal')`,
13
+ // which leaves it un-upgraded unless `ds-modal` is registered. Nothing else in this path
14
+ // registers it — an app that only ever presents modals imperatively never renders a `<Modal>`
15
+ // or `<DsModal>` wrapper — so the hook has to, the same way `useAlertController` does.
16
+ defineDsModal();
11
17
  const modalRef = useRef(null);
12
18
  const rootRef = useRef(null);
13
19
  const containerRef = useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helvetia-design/react",
3
- "version": "0.0.5",
3
+ "version": "0.1.0",
4
4
  "description": "The Helvetia Design System is an open source project for styling awesome web applications that follow the Helvetia corporate styling guidelines.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,15 +34,15 @@
34
34
  "react-dom": "^18.0.0 || ^19.0.0"
35
35
  },
36
36
  "dependencies": {
37
- "@helvetia-design/core": "0.0.5",
38
- "@stencil/react-output-target": "1.6.2"
37
+ "@helvetia-design/core": "0.1.0",
38
+ "@stencil/react-output-target": "1.6.5"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/react": "19.3.0",
42
42
  "@types/react-dom": "19.3.0",
43
- "eslint": "10.11.0",
43
+ "eslint": "10.12.0",
44
44
  "eslint-plugin-react-hooks": "7.1.1",
45
- "jsdom": "30.1.1",
45
+ "jsdom": "30.1.2",
46
46
  "react": "19.3.0",
47
47
  "react-dom": "19.3.0",
48
48
  "typescript": "5.6.3",