@quartzds/core-react 1.0.0-beta.54 → 1.0.0-beta.56

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.
Files changed (49) hide show
  1. package/lib/generated/components.d.ts +6 -0
  2. package/lib/generated/components.d.ts.map +1 -0
  3. package/lib/generated/components.js +8 -0
  4. package/lib/generated/components.js.map +1 -0
  5. package/lib/generated/components.server.d.ts +154 -0
  6. package/lib/generated/components.server.d.ts.map +1 -0
  7. package/lib/generated/components.server.js +431 -0
  8. package/lib/generated/components.server.js.map +1 -0
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.d.ts.map +1 -1
  11. package/lib/index.js +1 -1
  12. package/lib/index.js.map +1 -1
  13. package/package.json +12 -8
  14. package/lib/generated/proxies.d.ts +0 -30
  15. package/lib/generated/proxies.d.ts.map +0 -1
  16. package/lib/generated/proxies.js +0 -61
  17. package/lib/generated/proxies.js.map +0 -1
  18. package/lib/generated/react-component-lib/createComponent.d.ts +0 -11
  19. package/lib/generated/react-component-lib/createComponent.d.ts.map +0 -1
  20. package/lib/generated/react-component-lib/createComponent.js +0 -68
  21. package/lib/generated/react-component-lib/createComponent.js.map +0 -1
  22. package/lib/generated/react-component-lib/createOverlayComponent.d.ts +0 -22
  23. package/lib/generated/react-component-lib/createOverlayComponent.d.ts.map +0 -1
  24. package/lib/generated/react-component-lib/createOverlayComponent.js +0 -96
  25. package/lib/generated/react-component-lib/createOverlayComponent.js.map +0 -1
  26. package/lib/generated/react-component-lib/index.d.ts +0 -3
  27. package/lib/generated/react-component-lib/index.d.ts.map +0 -1
  28. package/lib/generated/react-component-lib/index.js +0 -3
  29. package/lib/generated/react-component-lib/index.js.map +0 -1
  30. package/lib/generated/react-component-lib/interfaces.d.ts +0 -30
  31. package/lib/generated/react-component-lib/interfaces.d.ts.map +0 -1
  32. package/lib/generated/react-component-lib/interfaces.js +0 -2
  33. package/lib/generated/react-component-lib/interfaces.js.map +0 -1
  34. package/lib/generated/react-component-lib/utils/attachProps.d.ts +0 -17
  35. package/lib/generated/react-component-lib/utils/attachProps.d.ts.map +0 -1
  36. package/lib/generated/react-component-lib/utils/attachProps.js +0 -108
  37. package/lib/generated/react-component-lib/utils/attachProps.js.map +0 -1
  38. package/lib/generated/react-component-lib/utils/case.d.ts +0 -3
  39. package/lib/generated/react-component-lib/utils/case.d.ts.map +0 -1
  40. package/lib/generated/react-component-lib/utils/case.js +0 -7
  41. package/lib/generated/react-component-lib/utils/case.js.map +0 -1
  42. package/lib/generated/react-component-lib/utils/dev.d.ts +0 -3
  43. package/lib/generated/react-component-lib/utils/dev.d.ts.map +0 -1
  44. package/lib/generated/react-component-lib/utils/dev.js +0 -13
  45. package/lib/generated/react-component-lib/utils/dev.js.map +0 -1
  46. package/lib/generated/react-component-lib/utils/index.d.ts +0 -11
  47. package/lib/generated/react-component-lib/utils/index.d.ts.map +0 -1
  48. package/lib/generated/react-component-lib/utils/index.js +0 -32
  49. package/lib/generated/react-component-lib/utils/index.js.map +0 -1
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './generated/proxies';
1
+ export * from './generated/components';
2
2
  export { getPlatform, getTheme, type IconLibrary, type IconLibraryResolver, registerIconLibrary, setAssetPath, setNonce, setPlatform, setTheme, unregisterIconLibrary, } from '@quartzds/core';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAA;AACnC,OAAO,EACL,WAAW,EACX,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,qBAAqB,GACtB,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAA;AACtC,OAAO,EACL,WAAW,EACX,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,qBAAqB,GACtB,MAAM,gBAAgB,CAAA"}
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // SPDX-FileCopyrightText: © 2024 Schneider Electric
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
- export * from './generated/proxies';
4
+ export * from './generated/components';
5
5
  export { getPlatform, getTheme, registerIconLibrary, setAssetPath, setNonce, setPlatform, setTheme, unregisterIconLibrary, } from '@quartzds/core';
6
6
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,sCAAsC;AAEtC,cAAc,qBAAqB,CAAA;AACnC,OAAO,EACL,WAAW,EACX,QAAQ,EAGR,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,qBAAqB,GACtB,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,sCAAsC;AAEtC,cAAc,wBAAwB,CAAA;AACtC,OAAO,EACL,WAAW,EACX,QAAQ,EAGR,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,qBAAqB,GACtB,MAAM,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quartzds/core-react",
3
- "version": "1.0.0-beta.54",
3
+ "version": "1.0.0-beta.56",
4
4
  "description": "React wrapper for @quartzds/core",
5
5
  "homepage": "https://github.com/quartzds/core-foundations/tree/main/packages/react",
6
6
  "bugs": {
@@ -8,12 +8,14 @@
8
8
  },
9
9
  "repository": "https://github.com/quartzds/core-foundations",
10
10
  "license": "Apache-2.0",
11
+ "type": "module",
11
12
  "exports": {
12
13
  ".": {
13
14
  "types": "./lib/index.d.ts",
14
- "import": "./lib/index.js"
15
+ "default": "./lib/index.js"
15
16
  },
16
- "./package.json": "./package.json"
17
+ "./package.json": "./package.json",
18
+ "./CHANGELOG.md": "./CHANGELOG.md"
17
19
  },
18
20
  "main": "./lib/index.js",
19
21
  "types": "./lib/index.d.ts",
@@ -26,13 +28,15 @@
26
28
  "dev": "tsc --watch"
27
29
  },
28
30
  "dependencies": {
29
- "@quartzds/core": "1.0.0-beta.55"
31
+ "@quartzds/core": "1.0.0-beta.57",
32
+ "@stencil/core": "^4.21.0",
33
+ "@stencil/react-output-target": "^0.7.0"
30
34
  },
31
35
  "devDependencies": {
32
- "@types/react": "18.2.60",
33
- "@types/react-dom": "18.2.18",
34
- "rimraf": "5.0.5",
35
- "typescript": "5.4.5"
36
+ "@types/react": "18.3.9",
37
+ "@types/react-dom": "18.3.0",
38
+ "rimraf": "5.0.10",
39
+ "typescript": "5.6.2"
36
40
  },
37
41
  "peerDependencies": {
38
42
  "@types/react": ">=17.0.0",
@@ -1,30 +0,0 @@
1
- import type { JSX } from '@quartzds/core/components';
2
- export declare const QdsBreadcrumbItem: import("react").ForwardRefExoticComponent<JSX.QdsBreadcrumbItem & Omit<import("react").HTMLAttributes<HTMLQdsBreadcrumbItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsBreadcrumbItemElement>>;
3
- export declare const QdsButton: import("react").ForwardRefExoticComponent<JSX.QdsButton & Omit<import("react").HTMLAttributes<HTMLQdsButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsButtonElement>>;
4
- export declare const QdsCheckbox: import("react").ForwardRefExoticComponent<JSX.QdsCheckbox & Omit<import("react").HTMLAttributes<HTMLQdsCheckboxElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsCheckboxElement>>;
5
- export declare const QdsChip: import("react").ForwardRefExoticComponent<JSX.QdsChip & Omit<import("react").HTMLAttributes<HTMLQdsChipElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsChipElement>>;
6
- export declare const QdsDialog: import("react").ForwardRefExoticComponent<JSX.QdsDialog & Omit<import("react").HTMLAttributes<HTMLQdsDialogElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsDialogElement>>;
7
- export declare const QdsDivider: import("react").ForwardRefExoticComponent<JSX.QdsDivider & Omit<import("react").HTMLAttributes<HTMLQdsDividerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsDividerElement>>;
8
- export declare const QdsDropdown: import("react").ForwardRefExoticComponent<JSX.QdsDropdown & Omit<import("react").HTMLAttributes<HTMLQdsDropdownElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsDropdownElement>>;
9
- export declare const QdsFormMessage: import("react").ForwardRefExoticComponent<JSX.QdsFormMessage & Omit<import("react").HTMLAttributes<HTMLQdsFormMessageElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsFormMessageElement>>;
10
- export declare const QdsIcon: import("react").ForwardRefExoticComponent<JSX.QdsIcon & Omit<import("react").HTMLAttributes<HTMLQdsIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsIconElement>>;
11
- export declare const QdsInlineLink: import("react").ForwardRefExoticComponent<JSX.QdsInlineLink & Omit<import("react").HTMLAttributes<HTMLQdsInlineLinkElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsInlineLinkElement>>;
12
- export declare const QdsInput: import("react").ForwardRefExoticComponent<JSX.QdsInput & Omit<import("react").HTMLAttributes<HTMLQdsInputElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsInputElement>>;
13
- export declare const QdsLabel: import("react").ForwardRefExoticComponent<JSX.QdsLabel & Omit<import("react").HTMLAttributes<HTMLQdsLabelElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsLabelElement>>;
14
- export declare const QdsListItem: import("react").ForwardRefExoticComponent<JSX.QdsListItem & Omit<import("react").HTMLAttributes<HTMLQdsListItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsListItemElement>>;
15
- export declare const QdsNavListItem: import("react").ForwardRefExoticComponent<JSX.QdsNavListItem & Omit<import("react").HTMLAttributes<HTMLQdsNavListItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsNavListItemElement>>;
16
- export declare const QdsRadio: import("react").ForwardRefExoticComponent<JSX.QdsRadio & Omit<import("react").HTMLAttributes<HTMLQdsRadioElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsRadioElement>>;
17
- export declare const QdsSelect: import("react").ForwardRefExoticComponent<JSX.QdsSelect & Omit<import("react").HTMLAttributes<HTMLQdsSelectElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsSelectElement>>;
18
- export declare const QdsStandaloneLink: import("react").ForwardRefExoticComponent<JSX.QdsStandaloneLink & Omit<import("react").HTMLAttributes<HTMLQdsStandaloneLinkElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsStandaloneLinkElement>>;
19
- export declare const QdsSwitch: import("react").ForwardRefExoticComponent<JSX.QdsSwitch & Omit<import("react").HTMLAttributes<HTMLQdsSwitchElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsSwitchElement>>;
20
- export declare const QdsTable: import("react").ForwardRefExoticComponent<JSX.QdsTable & Omit<import("react").HTMLAttributes<HTMLQdsTableElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTableElement>>;
21
- export declare const QdsTableBody: import("react").ForwardRefExoticComponent<JSX.QdsTableBody & Omit<import("react").HTMLAttributes<HTMLQdsTableBodyElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTableBodyElement>>;
22
- export declare const QdsTableCell: import("react").ForwardRefExoticComponent<JSX.QdsTableCell & Omit<import("react").HTMLAttributes<HTMLQdsTableCellElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTableCellElement>>;
23
- export declare const QdsTableHead: import("react").ForwardRefExoticComponent<JSX.QdsTableHead & Omit<import("react").HTMLAttributes<HTMLQdsTableHeadElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTableHeadElement>>;
24
- export declare const QdsTableHeadCell: import("react").ForwardRefExoticComponent<JSX.QdsTableHeadCell & Omit<import("react").HTMLAttributes<HTMLQdsTableHeadCellElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTableHeadCellElement>>;
25
- export declare const QdsTableRow: import("react").ForwardRefExoticComponent<JSX.QdsTableRow & Omit<import("react").HTMLAttributes<HTMLQdsTableRowElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTableRowElement>>;
26
- export declare const QdsTag: import("react").ForwardRefExoticComponent<JSX.QdsTag & Omit<import("react").HTMLAttributes<HTMLQdsTagElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTagElement>>;
27
- export declare const QdsTextarea: import("react").ForwardRefExoticComponent<JSX.QdsTextarea & Omit<import("react").HTMLAttributes<HTMLQdsTextareaElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTextareaElement>>;
28
- export declare const QdsTitle: import("react").ForwardRefExoticComponent<JSX.QdsTitle & Omit<import("react").HTMLAttributes<HTMLQdsTitleElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTitleElement>>;
29
- export declare const QdsTooltip: import("react").ForwardRefExoticComponent<JSX.QdsTooltip & Omit<import("react").HTMLAttributes<HTMLQdsTooltipElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLQdsTooltipElement>>;
30
- //# sourceMappingURL=proxies.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxies.d.ts","sourceRoot":"","sources":["../../src/generated/proxies.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AA+BrD,eAAO,MAAM,iBAAiB,2QAA+J,CAAC;AAC9L,eAAO,MAAM,SAAS,mPAA8H,CAAC;AACrJ,eAAO,MAAM,WAAW,yPAAsI,CAAC;AAC/J,eAAO,MAAM,OAAO,6OAAsH,CAAC;AAC3I,eAAO,MAAM,SAAS,mPAA8H,CAAC;AACrJ,eAAO,MAAM,UAAU,sPAAkI,CAAC;AAC1J,eAAO,MAAM,WAAW,yPAAsI,CAAC;AAC/J,eAAO,MAAM,cAAc,kQAAmJ,CAAC;AAC/K,eAAO,MAAM,OAAO,6OAAsH,CAAC;AAC3I,eAAO,MAAM,aAAa,+PAA+I,CAAC;AAC1K,eAAO,MAAM,QAAQ,gPAA0H,CAAC;AAChJ,eAAO,MAAM,QAAQ,gPAA0H,CAAC;AAChJ,eAAO,MAAM,WAAW,yPAAuI,CAAC;AAChK,eAAO,MAAM,cAAc,kQAAoJ,CAAC;AAChL,eAAO,MAAM,QAAQ,gPAA0H,CAAC;AAChJ,eAAO,MAAM,SAAS,mPAA8H,CAAC;AACrJ,eAAO,MAAM,iBAAiB,2QAA+J,CAAC;AAC9L,eAAO,MAAM,SAAS,mPAA8H,CAAC;AACrJ,eAAO,MAAM,QAAQ,gPAA0H,CAAC;AAChJ,eAAO,MAAM,YAAY,4PAA2I,CAAC;AACrK,eAAO,MAAM,YAAY,4PAA2I,CAAC;AACrK,eAAO,MAAM,YAAY,4PAA2I,CAAC;AACrK,eAAO,MAAM,gBAAgB,wQAA4J,CAAC;AAC1L,eAAO,MAAM,WAAW,yPAAuI,CAAC;AAChK,eAAO,MAAM,MAAM,0OAAkH,CAAC;AACtI,eAAO,MAAM,WAAW,yPAAsI,CAAC;AAC/J,eAAO,MAAM,QAAQ,gPAA0H,CAAC;AAChJ,eAAO,MAAM,UAAU,sPAAkI,CAAC"}
@@ -1,61 +0,0 @@
1
- /* eslint-disable */
2
- /* tslint:disable */
3
- /* auto-generated react proxies */
4
- import { createReactComponent } from './react-component-lib';
5
- import { defineCustomElement as defineQdsBreadcrumbItem } from '@quartzds/core/components/qds-breadcrumb-item.js';
6
- import { defineCustomElement as defineQdsButton } from '@quartzds/core/components/qds-button.js';
7
- import { defineCustomElement as defineQdsCheckbox } from '@quartzds/core/components/qds-checkbox.js';
8
- import { defineCustomElement as defineQdsChip } from '@quartzds/core/components/qds-chip.js';
9
- import { defineCustomElement as defineQdsDialog } from '@quartzds/core/components/qds-dialog.js';
10
- import { defineCustomElement as defineQdsDivider } from '@quartzds/core/components/qds-divider.js';
11
- import { defineCustomElement as defineQdsDropdown } from '@quartzds/core/components/qds-dropdown.js';
12
- import { defineCustomElement as defineQdsFormMessage } from '@quartzds/core/components/qds-form-message.js';
13
- import { defineCustomElement as defineQdsIcon } from '@quartzds/core/components/qds-icon.js';
14
- import { defineCustomElement as defineQdsInlineLink } from '@quartzds/core/components/qds-inline-link.js';
15
- import { defineCustomElement as defineQdsInput } from '@quartzds/core/components/qds-input.js';
16
- import { defineCustomElement as defineQdsLabel } from '@quartzds/core/components/qds-label.js';
17
- import { defineCustomElement as defineQdsListItem } from '@quartzds/core/components/qds-list-item.js';
18
- import { defineCustomElement as defineQdsNavListItem } from '@quartzds/core/components/qds-nav-list-item.js';
19
- import { defineCustomElement as defineQdsRadio } from '@quartzds/core/components/qds-radio.js';
20
- import { defineCustomElement as defineQdsSelect } from '@quartzds/core/components/qds-select.js';
21
- import { defineCustomElement as defineQdsStandaloneLink } from '@quartzds/core/components/qds-standalone-link.js';
22
- import { defineCustomElement as defineQdsSwitch } from '@quartzds/core/components/qds-switch.js';
23
- import { defineCustomElement as defineQdsTable } from '@quartzds/core/components/qds-table.js';
24
- import { defineCustomElement as defineQdsTableBody } from '@quartzds/core/components/qds-table-body.js';
25
- import { defineCustomElement as defineQdsTableCell } from '@quartzds/core/components/qds-table-cell.js';
26
- import { defineCustomElement as defineQdsTableHead } from '@quartzds/core/components/qds-table-head.js';
27
- import { defineCustomElement as defineQdsTableHeadCell } from '@quartzds/core/components/qds-table-head-cell.js';
28
- import { defineCustomElement as defineQdsTableRow } from '@quartzds/core/components/qds-table-row.js';
29
- import { defineCustomElement as defineQdsTag } from '@quartzds/core/components/qds-tag.js';
30
- import { defineCustomElement as defineQdsTextarea } from '@quartzds/core/components/qds-textarea.js';
31
- import { defineCustomElement as defineQdsTitle } from '@quartzds/core/components/qds-title.js';
32
- import { defineCustomElement as defineQdsTooltip } from '@quartzds/core/components/qds-tooltip.js';
33
- export const QdsBreadcrumbItem = /*@__PURE__*/ createReactComponent('qds-breadcrumb-item', undefined, undefined, defineQdsBreadcrumbItem);
34
- export const QdsButton = /*@__PURE__*/ createReactComponent('qds-button', undefined, undefined, defineQdsButton);
35
- export const QdsCheckbox = /*@__PURE__*/ createReactComponent('qds-checkbox', undefined, undefined, defineQdsCheckbox);
36
- export const QdsChip = /*@__PURE__*/ createReactComponent('qds-chip', undefined, undefined, defineQdsChip);
37
- export const QdsDialog = /*@__PURE__*/ createReactComponent('qds-dialog', undefined, undefined, defineQdsDialog);
38
- export const QdsDivider = /*@__PURE__*/ createReactComponent('qds-divider', undefined, undefined, defineQdsDivider);
39
- export const QdsDropdown = /*@__PURE__*/ createReactComponent('qds-dropdown', undefined, undefined, defineQdsDropdown);
40
- export const QdsFormMessage = /*@__PURE__*/ createReactComponent('qds-form-message', undefined, undefined, defineQdsFormMessage);
41
- export const QdsIcon = /*@__PURE__*/ createReactComponent('qds-icon', undefined, undefined, defineQdsIcon);
42
- export const QdsInlineLink = /*@__PURE__*/ createReactComponent('qds-inline-link', undefined, undefined, defineQdsInlineLink);
43
- export const QdsInput = /*@__PURE__*/ createReactComponent('qds-input', undefined, undefined, defineQdsInput);
44
- export const QdsLabel = /*@__PURE__*/ createReactComponent('qds-label', undefined, undefined, defineQdsLabel);
45
- export const QdsListItem = /*@__PURE__*/ createReactComponent('qds-list-item', undefined, undefined, defineQdsListItem);
46
- export const QdsNavListItem = /*@__PURE__*/ createReactComponent('qds-nav-list-item', undefined, undefined, defineQdsNavListItem);
47
- export const QdsRadio = /*@__PURE__*/ createReactComponent('qds-radio', undefined, undefined, defineQdsRadio);
48
- export const QdsSelect = /*@__PURE__*/ createReactComponent('qds-select', undefined, undefined, defineQdsSelect);
49
- export const QdsStandaloneLink = /*@__PURE__*/ createReactComponent('qds-standalone-link', undefined, undefined, defineQdsStandaloneLink);
50
- export const QdsSwitch = /*@__PURE__*/ createReactComponent('qds-switch', undefined, undefined, defineQdsSwitch);
51
- export const QdsTable = /*@__PURE__*/ createReactComponent('qds-table', undefined, undefined, defineQdsTable);
52
- export const QdsTableBody = /*@__PURE__*/ createReactComponent('qds-table-body', undefined, undefined, defineQdsTableBody);
53
- export const QdsTableCell = /*@__PURE__*/ createReactComponent('qds-table-cell', undefined, undefined, defineQdsTableCell);
54
- export const QdsTableHead = /*@__PURE__*/ createReactComponent('qds-table-head', undefined, undefined, defineQdsTableHead);
55
- export const QdsTableHeadCell = /*@__PURE__*/ createReactComponent('qds-table-head-cell', undefined, undefined, defineQdsTableHeadCell);
56
- export const QdsTableRow = /*@__PURE__*/ createReactComponent('qds-table-row', undefined, undefined, defineQdsTableRow);
57
- export const QdsTag = /*@__PURE__*/ createReactComponent('qds-tag', undefined, undefined, defineQdsTag);
58
- export const QdsTextarea = /*@__PURE__*/ createReactComponent('qds-textarea', undefined, undefined, defineQdsTextarea);
59
- export const QdsTitle = /*@__PURE__*/ createReactComponent('qds-title', undefined, undefined, defineQdsTitle);
60
- export const QdsTooltip = /*@__PURE__*/ createReactComponent('qds-tooltip', undefined, undefined, defineQdsTooltip);
61
- //# sourceMappingURL=proxies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxies.js","sourceRoot":"","sources":["../../src/generated/proxies.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAClH,OAAO,EAAE,mBAAmB,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,mBAAmB,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EAAE,mBAAmB,IAAI,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACnG,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC5G,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,mBAAmB,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,mBAAmB,IAAI,iBAA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AC,CAAC;AACrK,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAA,oBAAoB,CAAoD,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,sBAAsB,CAAC,CAAC;AAC1L,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAChK,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAA,oBAAoB,CAAgC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AACtI,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC/J,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAA,oBAAoB,CAAoC,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;AAChJ,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- export interface HTMLStencilElement extends HTMLElement {
3
- componentOnReady(): Promise<this>;
4
- }
5
- interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
6
- forwardedRef: React.RefObject<ElementType>;
7
- ref?: React.Ref<any>;
8
- }
9
- export declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = {}, ExpandedPropsTypes = {}>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
10
- export {};
11
- //# sourceMappingURL=createComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../../../src/generated/react-component-lib/createComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC;AAED,UAAU,yBAAyB,CAAC,WAAW,CAAE,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACxF,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,eAAO,MAAM,oBAAoB,8GAMtB,MAAM,0BACS,MAAM,OAAO,CAAC,gBAAgB,CAAC,4BAC7B,CACxB,aAAa,EAAE,0BAA0B,WAAW,CAAC,EACrD,WAAW,EAAE,GAAG,KACb,kBAAkB,wBACD,MAAM,IAAI,kKAgFjC,CAAC"}
@@ -1,68 +0,0 @@
1
- import React, { createElement } from 'react';
2
- import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
3
- export const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {
4
- if (defineCustomElement !== undefined) {
5
- defineCustomElement();
6
- }
7
- const displayName = dashToPascalCase(tagName);
8
- const ReactComponent = class extends React.Component {
9
- constructor(props) {
10
- super(props);
11
- this.setComponentElRef = (element) => {
12
- this.componentEl = element;
13
- };
14
- }
15
- componentDidMount() {
16
- this.componentDidUpdate(this.props);
17
- }
18
- componentDidUpdate(prevProps) {
19
- attachProps(this.componentEl, this.props, prevProps);
20
- }
21
- render() {
22
- const { children, forwardedRef, style, className, ref, ...cProps } = this.props;
23
- let propsToPass = Object.keys(cProps).reduce((acc, name) => {
24
- const value = cProps[name];
25
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
26
- const eventName = name.substring(2).toLowerCase();
27
- if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
28
- acc[name] = value;
29
- }
30
- }
31
- else {
32
- // we should only render strings, booleans, and numbers as attrs in html.
33
- // objects, functions, arrays etc get synced via properties on mount.
34
- const type = typeof value;
35
- if (type === 'string' || type === 'boolean' || type === 'number') {
36
- acc[camelToDashCase(name)] = value;
37
- }
38
- }
39
- return acc;
40
- }, {});
41
- if (manipulatePropsFunction) {
42
- propsToPass = manipulatePropsFunction(this.props, propsToPass);
43
- }
44
- const newProps = {
45
- ...propsToPass,
46
- ref: mergeRefs(forwardedRef, this.setComponentElRef),
47
- style,
48
- };
49
- /**
50
- * We use createElement here instead of
51
- * React.createElement to work around a
52
- * bug in Vite (https://github.com/vitejs/vite/issues/6104).
53
- * React.createElement causes all elements to be rendered
54
- * as <tagname> instead of the actual Web Component.
55
- */
56
- return createElement(tagName, newProps, children);
57
- }
58
- static get displayName() {
59
- return displayName;
60
- }
61
- };
62
- // If context was passed to createReactComponent then conditionally add it to the Component Class
63
- if (ReactComponentContext) {
64
- ReactComponent.contextType = ReactComponentContext;
65
- }
66
- return createForwardRef(ReactComponent, displayName);
67
- };
68
- //# sourceMappingURL=createComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createComponent.js","sourceRoot":"","sources":["../../../src/generated/react-component-lib/createComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAWxH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAMlC,OAAe,EACf,qBAAuD,EACvD,uBAGuB,EACvB,mBAAgC,EAChC,EAAE;IACF,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACtC,mBAAmB,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BAAM,CAAC;oBACN,yEAAyE;oBACzE,qEAAqE;oBACrE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;oBAE1B,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;wBACjE,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;oBACrC,CAAC;gBACH,CAAC;gBACD,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,EAAwB,CAAC,CAAC;YAE7B,IAAI,uBAAuB,EAAE,CAAC;gBAC5B,WAAW,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,QAAQ,GAAiE;gBAC7E,GAAG,WAAW;gBACd,GAAG,EAAE,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC;gBACpD,KAAK;aACN,CAAC;YAEF;;;;;;eAMG;YACH,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,KAAK,WAAW;YACpB,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,iGAAiG;IACjG,IAAI,qBAAqB,EAAE,CAAC;QAC1B,cAAc,CAAC,WAAW,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED,OAAO,gBAAgB,CAAwB,cAAc,EAAE,WAAW,CAAC,CAAC;AAC9E,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { OverlayEventDetail } from './interfaces';
3
- import { StencilReactForwardedRef } from './utils';
4
- interface OverlayElement extends HTMLElement {
5
- present: () => Promise<void>;
6
- dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
7
- }
8
- export interface ReactOverlayProps {
9
- children?: React.ReactNode;
10
- isOpen: boolean;
11
- onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
12
- onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
13
- onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
14
- onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
15
- }
16
- export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
17
- create: (options: any) => Promise<OverlayType>;
18
- }, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
19
- forwardedRef?: StencilReactForwardedRef<OverlayType>;
20
- }> & React.RefAttributes<OverlayType>>;
21
- export {};
22
- //# sourceMappingURL=createOverlayComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOverlayComponent.d.ts","sourceRoot":"","sources":["../../../src/generated/react-component-lib/createOverlayComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAA8D,MAAM,SAAS,CAAC;AAE/G,UAAU,cAAe,SAAQ,WAAW;IAC1C,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACjE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;CAClE;AAED,eAAO,MAAM,sBAAsB,iFACxB,MAAM,cACH;IAAE,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,QAAQ,WAAW,CAAC,CAAA;CAAE,kBAC9C,GAAG;mBAYA,yBAAyB,WAAW,CAAC;sCA0GzD,CAAC"}
@@ -1,96 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
3
- import { attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils';
4
- export const createOverlayComponent = (tagName, controller, customElement) => {
5
- defineCustomElement(tagName, customElement);
6
- const displayName = dashToPascalCase(tagName);
7
- const didDismissEventName = `on${displayName}DidDismiss`;
8
- const didPresentEventName = `on${displayName}DidPresent`;
9
- const willDismissEventName = `on${displayName}WillDismiss`;
10
- const willPresentEventName = `on${displayName}WillPresent`;
11
- let isDismissing = false;
12
- class Overlay extends React.Component {
13
- constructor(props) {
14
- super(props);
15
- if (typeof document !== 'undefined') {
16
- this.el = document.createElement('div');
17
- }
18
- this.handleDismiss = this.handleDismiss.bind(this);
19
- }
20
- static get displayName() {
21
- return displayName;
22
- }
23
- componentDidMount() {
24
- if (this.props.isOpen) {
25
- this.present();
26
- }
27
- }
28
- componentWillUnmount() {
29
- if (this.overlay) {
30
- this.overlay.dismiss();
31
- }
32
- }
33
- handleDismiss(event) {
34
- if (this.props.onDidDismiss) {
35
- this.props.onDidDismiss(event);
36
- }
37
- setRef(this.props.forwardedRef, null);
38
- }
39
- shouldComponentUpdate(nextProps) {
40
- // Check if the overlay component is about to dismiss
41
- if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {
42
- isDismissing = true;
43
- }
44
- return true;
45
- }
46
- async componentDidUpdate(prevProps) {
47
- if (this.overlay) {
48
- attachProps(this.overlay, this.props, prevProps);
49
- }
50
- if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
51
- this.present(prevProps);
52
- }
53
- if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
54
- await this.overlay.dismiss();
55
- isDismissing = false;
56
- /**
57
- * Now that the overlay is dismissed
58
- * we need to render again so that any
59
- * inner components will be unmounted
60
- */
61
- this.forceUpdate();
62
- }
63
- }
64
- async present(prevProps) {
65
- const { children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, ...cProps } = this.props;
66
- const elementProps = {
67
- ...cProps,
68
- ref: this.props.forwardedRef,
69
- [didDismissEventName]: this.handleDismiss,
70
- [didPresentEventName]: (e) => this.props.onDidPresent && this.props.onDidPresent(e),
71
- [willDismissEventName]: (e) => this.props.onWillDismiss && this.props.onWillDismiss(e),
72
- [willPresentEventName]: (e) => this.props.onWillPresent && this.props.onWillPresent(e),
73
- };
74
- this.overlay = await controller.create({
75
- ...elementProps,
76
- component: this.el,
77
- componentProps: {},
78
- });
79
- setRef(this.props.forwardedRef, this.overlay);
80
- attachProps(this.overlay, elementProps, prevProps);
81
- await this.overlay.present();
82
- }
83
- render() {
84
- /**
85
- * Continue to render the component even when
86
- * overlay is dismissing otherwise component
87
- * will be hidden before animation is done.
88
- */
89
- return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
90
- }
91
- }
92
- return React.forwardRef((props, ref) => {
93
- return React.createElement(Overlay, { ...props, forwardedRef: ref });
94
- });
95
- };
96
- //# sourceMappingURL=createOverlayComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOverlayComponent.js","sourceRoot":"","sources":["../../../src/generated/react-component-lib/createOverlayComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AAGjC,OAAO,EAA4B,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAgB/G,MAAM,CAAC,M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E,EAAE;QACzD,OAAO,oBAAC,OAAO,OAAK,KAAK,EAAE,YAAY,EAAE,GAAG,GAAI,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export { createReactComponent } from './createComponent';
2
- export { createOverlayComponent } from './createOverlayComponent';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/react-component-lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,3 +0,0 @@
1
- export { createReactComponent } from './createComponent';
2
- export { createOverlayComponent } from './createOverlayComponent';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/react-component-lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,30 +0,0 @@
1
- export interface EventEmitter<T = any> {
2
- emit: (data?: T) => CustomEvent<T>;
3
- }
4
- export interface StyleReactProps {
5
- class?: string;
6
- className?: string;
7
- style?: {
8
- [key: string]: any;
9
- };
10
- }
11
- export interface OverlayEventDetail<T = any> {
12
- data?: T;
13
- role?: string;
14
- }
15
- export interface OverlayInterface {
16
- el: HTMLElement;
17
- animated: boolean;
18
- keyboardClose: boolean;
19
- overlayIndex: number;
20
- presented: boolean;
21
- enterAnimation?: any;
22
- leaveAnimation?: any;
23
- didPresent: EventEmitter<void>;
24
- willPresent: EventEmitter<void>;
25
- willDismiss: EventEmitter<OverlayEventDetail>;
26
- didDismiss: EventEmitter<OverlayEventDetail>;
27
- present(): Promise<void>;
28
- dismiss(data?: any, role?: string): Promise<boolean>;
29
- }
30
- //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/generated/react-component-lib/interfaces.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,GAAG;IACnC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,GAAG;IACzC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IAEnB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/B,WAAW,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,WAAW,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAC9C,UAAU,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAE7C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/generated/react-component-lib/interfaces.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
2
- export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
3
- /**
4
- * Transforms a React event name to a browser event name.
5
- */
6
- export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
- /**
8
- * Checks if an event is supported in the current execution environment.
9
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
- */
11
- export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
- export declare const syncEvent: (node: Element & {
13
- __events?: {
14
- [key: string]: ((e: Event) => any) | undefined;
15
- };
16
- }, eventName: string, newEventHandler?: (e: Event) => any) => void;
17
- //# sourceMappingURL=attachProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachProps.d.ts","sourceRoot":"","sources":["../../../../src/generated/react-component-lib/utils/attachProps.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,SAAU,WAAW,YAAY,GAAG,aAAY,GAAG,SAoC1E,CAAC;AAEF,eAAO,MAAM,YAAY,cAAe,YAAY,YAAY,GAAG,YAAY,GAAG,WAsBjF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,oBAAqB,MAAM,WAM9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,oBAAqB,MAAM,YAevD,CAAC;AAEF,eAAO,MAAM,SAAS,SACd,OAAO,GAAG;IAAE,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,SAAS,CAAA;KAAE,CAAA;CAAE,aACtE,MAAM,oBACC,CAAC,CAAC,EAAE,KAAK,KAAK,GAAG,SAmBpC,CAAC"}
@@ -1,108 +0,0 @@
1
- import { camelToDashCase } from './case';
2
- export const attachProps = (node, newProps, oldProps = {}) => {
3
- // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
4
- if (node instanceof Element) {
5
- // add any classes in className to the class list
6
- const className = getClassName(node.classList, newProps, oldProps);
7
- if (className !== '') {
8
- node.className = className;
9
- }
10
- Object.keys(newProps).forEach((name) => {
11
- if (name === 'children' ||
12
- name === 'style' ||
13
- name === 'ref' ||
14
- name === 'class' ||
15
- name === 'className' ||
16
- name === 'forwardedRef') {
17
- return;
18
- }
19
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
20
- const eventName = name.substring(2);
21
- const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
22
- if (!isCoveredByReact(eventNameLc)) {
23
- syncEvent(node, eventNameLc, newProps[name]);
24
- }
25
- }
26
- else {
27
- node[name] = newProps[name];
28
- const propType = typeof newProps[name];
29
- if (propType === 'string') {
30
- node.setAttribute(camelToDashCase(name), newProps[name]);
31
- }
32
- }
33
- });
34
- }
35
- };
36
- export const getClassName = (classList, newProps, oldProps) => {
37
- const newClassProp = newProps.className || newProps.class;
38
- const oldClassProp = oldProps.className || oldProps.class;
39
- // map the classes to Maps for performance
40
- const currentClasses = arrayToMap(classList);
41
- const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
42
- const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
43
- const finalClassNames = [];
44
- // loop through each of the current classes on the component
45
- // to see if it should be a part of the classNames added
46
- currentClasses.forEach((currentClass) => {
47
- if (incomingPropClasses.has(currentClass)) {
48
- // add it as its already included in classnames coming in from newProps
49
- finalClassNames.push(currentClass);
50
- incomingPropClasses.delete(currentClass);
51
- }
52
- else if (!oldPropClasses.has(currentClass)) {
53
- // add it as it has NOT been removed by user
54
- finalClassNames.push(currentClass);
55
- }
56
- });
57
- incomingPropClasses.forEach((s) => finalClassNames.push(s));
58
- return finalClassNames.join(' ');
59
- };
60
- /**
61
- * Transforms a React event name to a browser event name.
62
- */
63
- export const transformReactEventName = (eventNameSuffix) => {
64
- switch (eventNameSuffix) {
65
- case 'doubleclick':
66
- return 'dblclick';
67
- }
68
- return eventNameSuffix;
69
- };
70
- /**
71
- * Checks if an event is supported in the current execution environment.
72
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
73
- */
74
- export const isCoveredByReact = (eventNameSuffix) => {
75
- if (typeof document === 'undefined') {
76
- return true;
77
- }
78
- else {
79
- const eventName = 'on' + transformReactEventName(eventNameSuffix);
80
- let isSupported = eventName in document;
81
- if (!isSupported) {
82
- const element = document.createElement('div');
83
- element.setAttribute(eventName, 'return;');
84
- isSupported = typeof element[eventName] === 'function';
85
- }
86
- return isSupported;
87
- }
88
- };
89
- export const syncEvent = (node, eventName, newEventHandler) => {
90
- const eventStore = node.__events || (node.__events = {});
91
- const oldEventHandler = eventStore[eventName];
92
- // Remove old listener so they don't double up.
93
- if (oldEventHandler) {
94
- node.removeEventListener(eventName, oldEventHandler);
95
- }
96
- // Bind new listener.
97
- node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
98
- if (newEventHandler) {
99
- newEventHandler.call(this, e);
100
- }
101
- }));
102
- };
103
- const arrayToMap = (arr) => {
104
- const map = new Map();
105
- arr.forEach((s) => map.set(s, s));
106
- return map;
107
- };
108
- //# sourceMappingURL=attachProps.js.map