@synergy-design-system/react 1.7.0 → 1.9.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.TOR523VV.js → chunk.7IZW5FRR.js} +1 -1
- package/dist/chunks/chunk.7IZW5FRR.js.map +7 -0
- package/dist/chunks/chunk.BQ62A32K.js +25 -0
- package/dist/chunks/chunk.BQ62A32K.js.map +7 -0
- package/dist/chunks/{chunk.UVFFLBXG.js → chunk.PCXGVEBP.js} +1 -1
- package/dist/chunks/{chunk.UVFFLBXG.js.map → chunk.PCXGVEBP.js.map} +2 -2
- package/dist/chunks/{chunk.FYIBHAO4.js → chunk.RU33PYCK.js} +1 -1
- package/dist/chunks/chunk.RU33PYCK.js.map +7 -0
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +1 -1
- package/dist/components/drawer.d.ts +74 -0
- package/dist/components/drawer.js +7 -0
- package/dist/components/drawer.js.map +7 -0
- package/dist/components/radio-group.d.ts +1 -0
- package/dist/components/radio-group.js +1 -1
- package/dist/components/switch.d.ts +2 -0
- package/dist/components/switch.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -9
- package/package.json +2 -2
- package/dist/chunks/chunk.FYIBHAO4.js.map +0 -7
- package/dist/chunks/chunk.TOR523VV.js.map +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/switch.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/switch/switch.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-switch';\nComponent.define('syn-switch');\n\n/**\n * @summary Switches allow the user to toggle an option on or off.\n * @documentation https://synergy.style/components/switch\n * @status stable\n * @since 2.0\n *\n * @slot - The switch's label.\n * @slot help-text - Text that describes how to use the switch. Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when the control's checked state changes.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The control that houses the switch's thumb.\n * @csspart thumb - The switch's thumb.\n * @csspart label - The switch's label.\n * @csspart form-control-help-text - The help text's wrapper.\n *\n * @cssproperty --width - The width of the switch.\n * @cssproperty --height - The height of the switch.\n * @cssproperty --thumb-size - The size of the thumb.\n */\nexport const SynSwitch = createComponent({\n displayName: 'SynSwitch',\n elementClass: Component,\n events: {\n onSynBlur: 'syn-blur' as EventName<SynBlurEvent>,\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynFocus: 'syn-focus' as EventName<SynFocusEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynBlurEvent } from '@synergy-design-system/components';\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynFocusEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,YAAY;AA2BtB,IAAM,YAAY,gBAAgB;AAAA,EACvC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/radio-group.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/radio-group/radio-group.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type { SynChangeEvent, SynInputEvent, SynInvalidEvent } from '@synergy-design-system/components';\n\nconst tagName = 'syn-radio-group';\nComponent.define('syn-radio-group');\n\n/**\n * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n * @documentation https://synergy.style/components/radio-group\n * @status stable\n * @since 2.0\n *\n * @dependency syn-button-group\n *\n * @slot - The default slot where `<syn-radio>` or `<syn-radio-button>` elements are placed.\n * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`\n * attribute.\n *\n * @event syn-change - Emitted when the radio group's selected value changes.\n * @event syn-input - Emitted when the radio group receives user input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart button-group - The button group that wraps radio buttons.\n * @csspart button-group__base - The button group's `base` part.\n */\nexport const SynRadioGroup = createComponent({\n displayName: 'SynRadioGroup',\n elementClass: Component,\n events: {\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
-
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAKtB,IAAM,UAAU;AAChB,UAAU,OAAO,iBAAiB;
|
|
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/radio-group/radio-group.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type { SynChangeEvent, SynInputEvent, SynInvalidEvent } from '@synergy-design-system/components';\n\nconst tagName = 'syn-radio-group';\nComponent.define('syn-radio-group');\n\n/**\n * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n * @documentation https://synergy.style/components/radio-group\n * @status stable\n * @since 2.0\n *\n * @dependency syn-button-group\n *\n * @slot - The default slot where `<syn-radio>` or `<syn-radio-button>` elements are placed.\n * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`\n * attribute.\n * @slot help-text - Text that describes how to use the radio group. Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-change - Emitted when the radio group's selected value changes.\n * @event syn-input - Emitted when the radio group receives user input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart button-group - The button group that wraps radio buttons.\n * @csspart button-group__base - The button group's `base` part.\n */\nexport const SynRadioGroup = createComponent({\n displayName: 'SynRadioGroup',\n elementClass: Component,\n events: {\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAKtB,IAAM,UAAU;AAChB,UAAU,OAAO,iBAAiB;AA0B3B,IAAM,gBAAgB,gBAAgB;AAAA,EAC3C,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/checkbox.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/checkbox/checkbox.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-checkbox';\nComponent.define('syn-checkbox');\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n * @documentation https://synergy.style/components/checkbox\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot - The checkbox's label.\n * @slot help-text - Text that describes how to use the checkbox. Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-blur - Emitted when the checkbox loses focus.\n * @event syn-change - Emitted when the checked state changes.\n * @event syn-focus - Emitted when the checkbox gains focus.\n * @event syn-input - Emitted when the checkbox receives input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<syn-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<syn-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n * @csspart form-control-help-text - The help text's wrapper.\n */\nexport const SynCheckbox = createComponent({\n displayName: 'SynCheckbox',\n elementClass: Component,\n events: {\n onSynBlur: 'syn-blur' as EventName<SynBlurEvent>,\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynFocus: 'syn-focus' as EventName<SynFocusEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynBlurEvent } from '@synergy-design-system/components';\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynFocusEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,cAAc;AA4BxB,IAAM,cAAc,gBAAgB;AAAA,EACzC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -10,6 +10,7 @@ import type { SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInv
|
|
|
10
10
|
* @dependency syn-icon
|
|
11
11
|
*
|
|
12
12
|
* @slot - The checkbox's label.
|
|
13
|
+
* @slot help-text - Text that describes how to use the checkbox. Alternatively, you can use the `help-text` attribute.
|
|
13
14
|
*
|
|
14
15
|
* @event syn-blur - Emitted when the checkbox loses focus.
|
|
15
16
|
* @event syn-change - Emitted when the checked state changes.
|
|
@@ -24,6 +25,7 @@ import type { SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInv
|
|
|
24
25
|
* @csspart checked-icon - The checked icon, an `<syn-icon>` element.
|
|
25
26
|
* @csspart indeterminate-icon - The indeterminate icon, an `<syn-icon>` element.
|
|
26
27
|
* @csspart label - The container that wraps the checkbox's label.
|
|
28
|
+
* @csspart form-control-help-text - The help text's wrapper.
|
|
27
29
|
*/
|
|
28
30
|
export declare const SynCheckbox: import("@lit/react").ReactWebComponent<Component, {
|
|
29
31
|
onSynBlur: EventName<SynBlurEvent>;
|
|
@@ -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';
|
|
@@ -12,6 +12,7 @@ import type { SynChangeEvent, SynInputEvent, SynInvalidEvent } from '@synergy-de
|
|
|
12
12
|
* @slot - The default slot where `<syn-radio>` or `<syn-radio-button>` elements are placed.
|
|
13
13
|
* @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`
|
|
14
14
|
* attribute.
|
|
15
|
+
* @slot help-text - Text that describes how to use the radio group. Alternatively, you can use the `help-text` attribute.
|
|
15
16
|
*
|
|
16
17
|
* @event syn-change - Emitted when the radio group's selected value changes.
|
|
17
18
|
* @event syn-input - Emitted when the radio group receives user input.
|
|
@@ -8,6 +8,7 @@ import type { SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInv
|
|
|
8
8
|
* @since 2.0
|
|
9
9
|
*
|
|
10
10
|
* @slot - The switch's label.
|
|
11
|
+
* @slot help-text - Text that describes how to use the switch. Alternatively, you can use the `help-text` attribute.
|
|
11
12
|
*
|
|
12
13
|
* @event syn-blur - Emitted when the control loses focus.
|
|
13
14
|
* @event syn-change - Emitted when the control's checked state changes.
|
|
@@ -19,6 +20,7 @@ import type { SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInv
|
|
|
19
20
|
* @csspart control - The control that houses the switch's thumb.
|
|
20
21
|
* @csspart thumb - The switch's thumb.
|
|
21
22
|
* @csspart label - The switch's label.
|
|
23
|
+
* @csspart form-control-help-text - The help text's wrapper.
|
|
22
24
|
*
|
|
23
25
|
* @cssproperty --width - The width of the switch.
|
|
24
26
|
* @cssproperty --height - The height of the switch.
|
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";
|
|
@@ -12,7 +18,7 @@ import {
|
|
|
12
18
|
} from "./chunks/chunk.QBD4EIK5.js";
|
|
13
19
|
import {
|
|
14
20
|
SynRadioGroup
|
|
15
|
-
} from "./chunks/chunk.
|
|
21
|
+
} from "./chunks/chunk.PCXGVEBP.js";
|
|
16
22
|
import {
|
|
17
23
|
SynRadio
|
|
18
24
|
} from "./chunks/chunk.AFCMSVBY.js";
|
|
@@ -21,10 +27,7 @@ import {
|
|
|
21
27
|
} from "./chunks/chunk.FB24BPQZ.js";
|
|
22
28
|
import {
|
|
23
29
|
SynSwitch
|
|
24
|
-
} from "./chunks/chunk.
|
|
25
|
-
import {
|
|
26
|
-
SynTag
|
|
27
|
-
} from "./chunks/chunk.7T7PO2AE.js";
|
|
30
|
+
} from "./chunks/chunk.7IZW5FRR.js";
|
|
28
31
|
import {
|
|
29
32
|
SynButtonGroup
|
|
30
33
|
} from "./chunks/chunk.6OTEQXZW.js";
|
|
@@ -33,24 +36,25 @@ import {
|
|
|
33
36
|
} from "./chunks/chunk.TTUPZLN7.js";
|
|
34
37
|
import {
|
|
35
38
|
SynCheckbox
|
|
36
|
-
} from "./chunks/chunk.
|
|
39
|
+
} from "./chunks/chunk.RU33PYCK.js";
|
|
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.
|
|
8
|
+
"@synergy-design-system/components": "^1.9.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.9.0",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "^18.2.55",
|
|
46
46
|
"react": "^18.2.0"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/checkbox.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/checkbox/checkbox.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-checkbox';\nComponent.define('syn-checkbox');\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n * @documentation https://synergy.style/components/checkbox\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot - The checkbox's label.\n *\n * @event syn-blur - Emitted when the checkbox loses focus.\n * @event syn-change - Emitted when the checked state changes.\n * @event syn-focus - Emitted when the checkbox gains focus.\n * @event syn-input - Emitted when the checkbox receives input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<syn-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<syn-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\nexport const SynCheckbox = createComponent({\n displayName: 'SynCheckbox',\n elementClass: Component,\n events: {\n onSynBlur: 'syn-blur' as EventName<SynBlurEvent>,\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynFocus: 'syn-focus' as EventName<SynFocusEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynBlurEvent } from '@synergy-design-system/components';\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynFocusEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
-
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,cAAc;AA0BxB,IAAM,cAAc,gBAAgB;AAAA,EACzC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/switch.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/switch/switch.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-switch';\nComponent.define('syn-switch');\n\n/**\n * @summary Switches allow the user to toggle an option on or off.\n * @documentation https://synergy.style/components/switch\n * @status stable\n * @since 2.0\n *\n * @slot - The switch's label.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when the control's checked state changes.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The control that houses the switch's thumb.\n * @csspart thumb - The switch's thumb.\n * @csspart label - The switch's label.\n *\n * @cssproperty --width - The width of the switch.\n * @cssproperty --height - The height of the switch.\n * @cssproperty --thumb-size - The size of the thumb.\n */\nexport const SynSwitch = createComponent({\n displayName: 'SynSwitch',\n elementClass: Component,\n events: {\n onSynBlur: 'syn-blur' as EventName<SynBlurEvent>,\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynFocus: 'syn-focus' as EventName<SynFocusEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynBlurEvent } from '@synergy-design-system/components';\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynFocusEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
-
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,YAAY;AAyBtB,IAAM,YAAY,gBAAgB;AAAA,EACvC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|