@synergy-design-system/react 1.22.0 → 1.23.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/dist/chunks/chunk.IRQRZGIS.js +25 -0
- package/dist/chunks/chunk.IRQRZGIS.js.map +7 -0
- package/dist/components/dialog.d.ts +67 -0
- package/dist/components/dialog.js +7 -0
- package/dist/components/dialog.js.map +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -10
- package/package.json +2 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ../react/src/components/dialog.ts
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createComponent } from "@lit/react";
|
|
4
|
+
import Component from "@synergy-design-system/components/components/dialog/dialog.component.js";
|
|
5
|
+
var tagName = "syn-dialog";
|
|
6
|
+
Component.define("syn-dialog");
|
|
7
|
+
var SynDialog = createComponent({
|
|
8
|
+
displayName: "SynDialog",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
events: {
|
|
11
|
+
onSynShow: "syn-show",
|
|
12
|
+
onSynAfterShow: "syn-after-show",
|
|
13
|
+
onSynHide: "syn-hide",
|
|
14
|
+
onSynAfterHide: "syn-after-hide",
|
|
15
|
+
onSynInitialFocus: "syn-initial-focus",
|
|
16
|
+
onSynRequestClose: "syn-request-close"
|
|
17
|
+
},
|
|
18
|
+
react: React,
|
|
19
|
+
tagName
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
SynDialog
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk.IRQRZGIS.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/dialog.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED @synergy-design-system/react wrappers for @synergy-design-system/components\n// Please do not edit this file directly!\n// It will get recreated when running pnpm build.\n// ---------------------------------------------------------------------\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport Component from '@synergy-design-system/components/components/dialog/dialog.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynAfterHideEvent, SynAfterShowEvent, SynHideEvent, SynInitialFocusEvent, SynRequestCloseEvent, SynShowEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-dialog';\nComponent.define('syn-dialog');\n\n/**\n * @summary Dialogs, sometimes called \"modals\", appear above the page and require the user's immediate attention.\n * @documentation https://synergy.style/components/dialog\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The dialog's main content.\n * @slot label - The dialog's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<syn-icon-button>`.\n * @slot footer - The dialog's footer, usually one or more buttons representing various options.\n *\n * @event syn-show - Emitted when the dialog opens.\n * @event syn-after-show - Emitted after the dialog opens and all animations are complete.\n * @event syn-hide - Emitted when the dialog closes.\n * @event syn-after-hide - Emitted after the dialog closes and all animations are complete.\n * @event syn-initial-focus - Emitted when the dialog opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} syn-request-close - Emitted when the user attempts to\n * close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the dialog.\n * @csspart panel - The dialog's panel (where the dialog and its content are rendered).\n * @csspart header - The dialog's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<syn-icon-button>`.\n * @csspart title - The dialog's title.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The dialog's body.\n * @csspart footer - The dialog's footer.\n *\n * @cssproperty --width - The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation dialog.show - The animation to use when showing the dialog.\n * @animation dialog.hide - The animation to use when hiding the dialog.\n * @animation dialog.denyClose - The animation to use when a request to close the dialog is denied.\n * @animation dialog.overlay.show - The animation to use when showing the dialog's overlay.\n * @animation dialog.overlay.hide - The animation to use when hiding the dialog's overlay.\n *\n * @property modal - Exposes the internal modal utility that controls focus trapping. To temporarily disable focus\n * trapping and allow third-party modals spawned from an active Synergy modal, call `modal.activateExternal()` when\n * the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Synergy's focus trapping.\n */\nexport const SynDialog = createComponent({\n displayName: 'SynDialog',\n elementClass: Component,\n events: {\n onSynShow: 'syn-show' as EventName<SynShowEvent>,\n onSynAfterShow: 'syn-after-show' as EventName<SynAfterShowEvent>,\n onSynHide: 'syn-hide' as EventName<SynHideEvent>,\n onSynAfterHide: 'syn-after-hide' as EventName<SynAfterHideEvent>,\n onSynInitialFocus: 'syn-initial-focus' as EventName<SynInitialFocusEvent>,\n onSynRequestClose: 'syn-request-close' as EventName<SynRequestCloseEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynShowEvent } from '@synergy-design-system/components';\nexport type { SynAfterShowEvent } from '@synergy-design-system/components';\nexport type { SynHideEvent } from '@synergy-design-system/components';\nexport type { SynAfterHideEvent } from '@synergy-design-system/components';\nexport type { SynInitialFocusEvent } from '@synergy-design-system/components';\nexport type { SynRequestCloseEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,YAAY;AAoDtB,IAAM,YAAY,gBAAgB;AAAA,EACvC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,EACrB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Component from '@synergy-design-system/components/components/dialog/dialog.component.js';
|
|
2
|
+
import { type EventName } from '@lit/react';
|
|
3
|
+
import type { SynAfterHideEvent, SynAfterShowEvent, SynHideEvent, SynInitialFocusEvent, SynRequestCloseEvent, SynShowEvent } from '@synergy-design-system/components';
|
|
4
|
+
/**
|
|
5
|
+
* @summary Dialogs, sometimes called "modals", appear above the page and require the user's immediate attention.
|
|
6
|
+
* @documentation https://synergy.style/components/dialog
|
|
7
|
+
* @status stable
|
|
8
|
+
* @since 2.0
|
|
9
|
+
*
|
|
10
|
+
* @dependency syn-icon-button
|
|
11
|
+
*
|
|
12
|
+
* @slot - The dialog's main content.
|
|
13
|
+
* @slot label - The dialog's label. Alternatively, you can use the `label` attribute.
|
|
14
|
+
* @slot header-actions - Optional actions to add to the header. Works best with `<syn-icon-button>`.
|
|
15
|
+
* @slot footer - The dialog's footer, usually one or more buttons representing various options.
|
|
16
|
+
*
|
|
17
|
+
* @event syn-show - Emitted when the dialog opens.
|
|
18
|
+
* @event syn-after-show - Emitted after the dialog opens and all animations are complete.
|
|
19
|
+
* @event syn-hide - Emitted when the dialog closes.
|
|
20
|
+
* @event syn-after-hide - Emitted after the dialog closes and all animations are complete.
|
|
21
|
+
* @event syn-initial-focus - Emitted when the dialog opens and is ready to receive focus. Calling
|
|
22
|
+
* `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.
|
|
23
|
+
* @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} syn-request-close - Emitted when the user attempts to
|
|
24
|
+
* close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling
|
|
25
|
+
* `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in
|
|
26
|
+
* destructive behavior such as data loss.
|
|
27
|
+
*
|
|
28
|
+
* @csspart base - The component's base wrapper.
|
|
29
|
+
* @csspart overlay - The overlay that covers the screen behind the dialog.
|
|
30
|
+
* @csspart panel - The dialog's panel (where the dialog and its content are rendered).
|
|
31
|
+
* @csspart header - The dialog's header. This element wraps the title and header actions.
|
|
32
|
+
* @csspart header-actions - Optional actions to add to the header. Works best with `<syn-icon-button>`.
|
|
33
|
+
* @csspart title - The dialog's title.
|
|
34
|
+
* @csspart close-button - The close button, an `<syn-icon-button>`.
|
|
35
|
+
* @csspart close-button__base - The close button's exported `base` part.
|
|
36
|
+
* @csspart body - The dialog's body.
|
|
37
|
+
* @csspart footer - The dialog's footer.
|
|
38
|
+
*
|
|
39
|
+
* @cssproperty --width - The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.
|
|
40
|
+
* @cssproperty --header-spacing - The amount of padding to use for the header.
|
|
41
|
+
* @cssproperty --body-spacing - The amount of padding to use for the body.
|
|
42
|
+
* @cssproperty --footer-spacing - The amount of padding to use for the footer.
|
|
43
|
+
*
|
|
44
|
+
* @animation dialog.show - The animation to use when showing the dialog.
|
|
45
|
+
* @animation dialog.hide - The animation to use when hiding the dialog.
|
|
46
|
+
* @animation dialog.denyClose - The animation to use when a request to close the dialog is denied.
|
|
47
|
+
* @animation dialog.overlay.show - The animation to use when showing the dialog's overlay.
|
|
48
|
+
* @animation dialog.overlay.hide - The animation to use when hiding the dialog's overlay.
|
|
49
|
+
*
|
|
50
|
+
* @property modal - Exposes the internal modal utility that controls focus trapping. To temporarily disable focus
|
|
51
|
+
* trapping and allow third-party modals spawned from an active Synergy modal, call `modal.activateExternal()` when
|
|
52
|
+
* the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Synergy's focus trapping.
|
|
53
|
+
*/
|
|
54
|
+
export declare const SynDialog: import("@lit/react").ReactWebComponent<Component, {
|
|
55
|
+
onSynShow: EventName<SynShowEvent>;
|
|
56
|
+
onSynAfterShow: EventName<SynAfterShowEvent>;
|
|
57
|
+
onSynHide: EventName<SynHideEvent>;
|
|
58
|
+
onSynAfterHide: EventName<SynAfterHideEvent>;
|
|
59
|
+
onSynInitialFocus: EventName<SynInitialFocusEvent>;
|
|
60
|
+
onSynRequestClose: EventName<SynRequestCloseEvent>;
|
|
61
|
+
}>;
|
|
62
|
+
export type { SynShowEvent } from '@synergy-design-system/components';
|
|
63
|
+
export type { SynAfterShowEvent } from '@synergy-design-system/components';
|
|
64
|
+
export type { SynHideEvent } from '@synergy-design-system/components';
|
|
65
|
+
export type { SynAfterHideEvent } from '@synergy-design-system/components';
|
|
66
|
+
export type { SynInitialFocusEvent } from '@synergy-design-system/components';
|
|
67
|
+
export type { SynRequestCloseEvent } from '@synergy-design-system/components';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { SynBadge } from './components/badge.js';
|
|
|
3
3
|
export { SynButton } from './components/button.js';
|
|
4
4
|
export { SynButtonGroup } from './components/button-group.js';
|
|
5
5
|
export { SynCheckbox } from './components/checkbox.js';
|
|
6
|
+
export { SynDialog } from './components/dialog.js';
|
|
6
7
|
export { SynDivider } from './components/divider.js';
|
|
7
8
|
export { SynDrawer } from './components/drawer.js';
|
|
8
9
|
export { SynDropdown } from './components/dropdown.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SynTextarea
|
|
3
|
+
} from "./chunks/chunk.4YY6TGIA.js";
|
|
1
4
|
import {
|
|
2
5
|
SynTooltip
|
|
3
6
|
} from "./chunks/chunk.BU4SKSAF.js";
|
|
7
|
+
import {
|
|
8
|
+
SynRadioButton
|
|
9
|
+
} from "./chunks/chunk.QBD4EIK5.js";
|
|
4
10
|
import {
|
|
5
11
|
SynRadioGroup
|
|
6
12
|
} from "./chunks/chunk.PCXGVEBP.js";
|
|
@@ -23,8 +29,8 @@ import {
|
|
|
23
29
|
SynTag
|
|
24
30
|
} from "./chunks/chunk.7T7PO2AE.js";
|
|
25
31
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./chunks/chunk.
|
|
32
|
+
SynMenu
|
|
33
|
+
} from "./chunks/chunk.NSUMR2HG.js";
|
|
28
34
|
import {
|
|
29
35
|
SynNavItem
|
|
30
36
|
} from "./chunks/chunk.Y2KBRBDX.js";
|
|
@@ -47,8 +53,8 @@ import {
|
|
|
47
53
|
SynProgressRing
|
|
48
54
|
} from "./chunks/chunk.FGMVRUPR.js";
|
|
49
55
|
import {
|
|
50
|
-
|
|
51
|
-
} from "./chunks/chunk.
|
|
56
|
+
SynDrawer
|
|
57
|
+
} from "./chunks/chunk.BQ62A32K.js";
|
|
52
58
|
import {
|
|
53
59
|
SynDropdown
|
|
54
60
|
} from "./chunks/chunk.E3427YBK.js";
|
|
@@ -70,9 +76,6 @@ import {
|
|
|
70
76
|
import {
|
|
71
77
|
SynMenuLabel
|
|
72
78
|
} from "./chunks/chunk.EOLGRN43.js";
|
|
73
|
-
import {
|
|
74
|
-
SynMenu
|
|
75
|
-
} from "./chunks/chunk.NSUMR2HG.js";
|
|
76
79
|
import {
|
|
77
80
|
SynAlert
|
|
78
81
|
} from "./chunks/chunk.NCB462OR.js";
|
|
@@ -88,18 +91,19 @@ import {
|
|
|
88
91
|
import {
|
|
89
92
|
SynCheckbox
|
|
90
93
|
} from "./chunks/chunk.RU33PYCK.js";
|
|
94
|
+
import {
|
|
95
|
+
SynDialog
|
|
96
|
+
} from "./chunks/chunk.IRQRZGIS.js";
|
|
91
97
|
import {
|
|
92
98
|
SynDivider
|
|
93
99
|
} from "./chunks/chunk.HKOGDFA5.js";
|
|
94
|
-
import {
|
|
95
|
-
SynDrawer
|
|
96
|
-
} from "./chunks/chunk.BQ62A32K.js";
|
|
97
100
|
export {
|
|
98
101
|
SynAlert,
|
|
99
102
|
SynBadge,
|
|
100
103
|
SynButton,
|
|
101
104
|
SynButtonGroup,
|
|
102
105
|
SynCheckbox,
|
|
106
|
+
SynDialog,
|
|
103
107
|
SynDivider,
|
|
104
108
|
SynDrawer,
|
|
105
109
|
SynDropdown,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@lit/react": "^1.0.4",
|
|
8
|
-
"@synergy-design-system/components": "^1.
|
|
8
|
+
"@synergy-design-system/components": "^1.23.0"
|
|
9
9
|
},
|
|
10
10
|
"description": "React wrappers for the Synergy Design System",
|
|
11
11
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"directory": "packages/react"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "1.
|
|
43
|
+
"version": "1.23.0",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "^18.2.79",
|
|
46
46
|
"react": "^18.2.0"
|