@synergy-design-system/react 1.7.0 → 1.8.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.
@@ -0,0 +1,25 @@
1
+ // ../react/src/components/drawer.ts
2
+ import * as React from "react";
3
+ import { createComponent } from "@lit/react";
4
+ import Component from "@synergy-design-system/components/components/drawer/drawer.component.js";
5
+ var tagName = "syn-drawer";
6
+ Component.define("syn-drawer");
7
+ var SynDrawer = createComponent({
8
+ displayName: "SynDrawer",
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
+ SynDrawer
24
+ };
25
+ //# sourceMappingURL=chunk.BQ62A32K.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/drawer.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/drawer/drawer.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-drawer';\nComponent.define('syn-drawer');\n\n/**\n * @summary Drawers slide in from a container to expose additional options and information.\n * @documentation https://synergy.style/components/drawer\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer'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 drawer's footer, usually one or more buttons representing various options.\n *\n * @event syn-show - Emitted when the drawer opens.\n * @event syn-after-show - Emitted after the drawer opens and all animations are complete.\n * @event syn-hide - Emitted when the drawer closes.\n * @event syn-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event syn-initial-focus - Emitted when the drawer 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 drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer 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 drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer'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 drawer'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 drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer 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 drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer'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 SynDrawer = createComponent({\n displayName: 'SynDrawer',\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;AA2DtB,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,74 @@
1
+ import Component from '@synergy-design-system/components/components/drawer/drawer.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 Drawers slide in from a container to expose additional options and information.
6
+ * @documentation https://synergy.style/components/drawer
7
+ * @status stable
8
+ * @since 2.0
9
+ *
10
+ * @dependency syn-icon-button
11
+ *
12
+ * @slot - The drawer's main content.
13
+ * @slot label - The drawer'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 drawer's footer, usually one or more buttons representing various options.
16
+ *
17
+ * @event syn-show - Emitted when the drawer opens.
18
+ * @event syn-after-show - Emitted after the drawer opens and all animations are complete.
19
+ * @event syn-hide - Emitted when the drawer closes.
20
+ * @event syn-after-hide - Emitted after the drawer closes and all animations are complete.
21
+ * @event syn-initial-focus - Emitted when the drawer 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 drawer by clicking the close button, clicking the overlay, or pressing escape. Calling
25
+ * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer 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 drawer.
30
+ * @csspart panel - The drawer's panel (where the drawer and its content are rendered).
31
+ * @csspart header - The drawer'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 drawer'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 drawer's body.
37
+ * @csspart footer - The drawer's footer.
38
+ *
39
+ * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height
40
+ * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.
41
+ * @cssproperty --header-spacing - The amount of padding to use for the header.
42
+ * @cssproperty --body-spacing - The amount of padding to use for the body.
43
+ * @cssproperty --footer-spacing - The amount of padding to use for the footer.
44
+ *
45
+ * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.
46
+ * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.
47
+ * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.
48
+ * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.
49
+ * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.
50
+ * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.
51
+ * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.
52
+ * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.
53
+ * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.
54
+ * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.
55
+ * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.
56
+ *
57
+ * @property modal - Exposes the internal modal utility that controls focus trapping. To temporarily disable focus
58
+ * trapping and allow third-party modals spawned from an active Synergy modal, call `modal.activateExternal()` when
59
+ * the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Synergy's focus trapping.
60
+ */
61
+ export declare const SynDrawer: import("@lit/react").ReactWebComponent<Component, {
62
+ onSynShow: EventName<SynShowEvent>;
63
+ onSynAfterShow: EventName<SynAfterShowEvent>;
64
+ onSynHide: EventName<SynHideEvent>;
65
+ onSynAfterHide: EventName<SynAfterHideEvent>;
66
+ onSynInitialFocus: EventName<SynInitialFocusEvent>;
67
+ onSynRequestClose: EventName<SynRequestCloseEvent>;
68
+ }>;
69
+ export type { SynShowEvent } from '@synergy-design-system/components';
70
+ export type { SynAfterShowEvent } from '@synergy-design-system/components';
71
+ export type { SynHideEvent } from '@synergy-design-system/components';
72
+ export type { SynAfterHideEvent } from '@synergy-design-system/components';
73
+ export type { SynInitialFocusEvent } from '@synergy-design-system/components';
74
+ export type { SynRequestCloseEvent } from '@synergy-design-system/components';
@@ -0,0 +1,7 @@
1
+ import {
2
+ SynDrawer
3
+ } from "../chunks/chunk.BQ62A32K.js";
4
+ export {
5
+ SynDrawer
6
+ };
7
+ //# sourceMappingURL=drawer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { SynButton } from './components/button.js';
2
2
  export { SynButtonGroup } from './components/button-group.js';
3
3
  export { SynCheckbox } from './components/checkbox.js';
4
4
  export { SynDivider } from './components/divider.js';
5
+ export { SynDrawer } from './components/drawer.js';
5
6
  export { SynIcon } from './components/icon.js';
6
7
  export { SynIconButton } from './components/icon-button.js';
7
8
  export { SynInput } from './components/input.js';
package/dist/index.js CHANGED
@@ -1,6 +1,12 @@
1
+ import {
2
+ SynTag
3
+ } from "./chunks/chunk.7T7PO2AE.js";
1
4
  import {
2
5
  SynTextarea
3
6
  } from "./chunks/chunk.4YY6TGIA.js";
7
+ import {
8
+ SynInput
9
+ } from "./chunks/chunk.N6QQSQTB.js";
4
10
  import {
5
11
  SynOptgroup
6
12
  } from "./chunks/chunk.DLAIDGSD.js";
@@ -22,9 +28,6 @@ import {
22
28
  import {
23
29
  SynSwitch
24
30
  } from "./chunks/chunk.TOR523VV.js";
25
- import {
26
- SynTag
27
- } from "./chunks/chunk.7T7PO2AE.js";
28
31
  import {
29
32
  SynButtonGroup
30
33
  } from "./chunks/chunk.6OTEQXZW.js";
@@ -37,20 +40,21 @@ import {
37
40
  import {
38
41
  SynDivider
39
42
  } from "./chunks/chunk.HKOGDFA5.js";
43
+ import {
44
+ SynDrawer
45
+ } from "./chunks/chunk.BQ62A32K.js";
40
46
  import {
41
47
  SynIconButton
42
48
  } from "./chunks/chunk.W4YO4ERO.js";
43
49
  import {
44
50
  SynIcon
45
51
  } from "./chunks/chunk.6CO3KAZG.js";
46
- import {
47
- SynInput
48
- } from "./chunks/chunk.N6QQSQTB.js";
49
52
  export {
50
53
  SynButton,
51
54
  SynButtonGroup,
52
55
  SynCheckbox,
53
56
  SynDivider,
57
+ SynDrawer,
54
58
  SynIcon,
55
59
  SynIconButton,
56
60
  SynInput,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "dependencies": {
7
7
  "@lit/react": "^1.0.3",
8
- "@synergy-design-system/components": "^1.7.0"
8
+ "@synergy-design-system/components": "^1.8.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.7.0",
43
+ "version": "1.8.0",
44
44
  "devDependencies": {
45
45
  "@types/react": "^18.2.55",
46
46
  "react": "^18.2.0"