@helvetia-design/react 0.0.5 → 0.1.0-snapshot.332-ce68326

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.
@@ -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-snapshot.332-ce68326",
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,17 +34,17 @@
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-snapshot.332-ce68326",
38
+ "@stencil/react-output-target": "1.8.0"
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.14.0",
44
44
  "eslint-plugin-react-hooks": "7.1.1",
45
- "jsdom": "30.1.1",
46
- "react": "19.3.0",
47
- "react-dom": "19.3.0",
45
+ "jsdom": "30.1.2",
46
+ "react": "19.3.1",
47
+ "react-dom": "19.3.1",
48
48
  "typescript": "5.6.3",
49
49
  "vitest": "4.1.11"
50
50
  },