@synergy-design-system/react 2.0.0 → 2.2.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/README.md +7 -0
- package/dist/chunks/chunk.CKKXGN4F.js +18 -0
- package/dist/chunks/chunk.CKKXGN4F.js.map +7 -0
- package/dist/chunks/chunk.VLHZNU3B.js +21 -0
- package/dist/chunks/chunk.VLHZNU3B.js.map +7 -0
- package/dist/chunks/chunk.XNCRUJQI.js +20 -0
- package/dist/chunks/chunk.XNCRUJQI.js.map +7 -0
- package/dist/components/tab-group.d.ts +38 -0
- package/dist/components/tab-group.js +7 -0
- package/dist/components/tab-group.js.map +7 -0
- package/dist/components/tab-panel.d.ts +14 -0
- package/dist/components/tab-panel.js +7 -0
- package/dist/components/tab-panel.js.map +7 -0
- package/dist/components/tab.d.ts +23 -0
- package/dist/components/tab.js +7 -0
- package/dist/components/tab.js.map +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +12 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -17,6 +17,9 @@ Run the following steps to install the required packages.
|
|
|
17
17
|
# Install the base library and required css files
|
|
18
18
|
npm install --save @synergy-design-system/react @synergy-design-system/tokens
|
|
19
19
|
|
|
20
|
+
# Optional: Install the styles utility package
|
|
21
|
+
npm install --save @synergy-design-system/styles
|
|
22
|
+
|
|
20
23
|
# Only if not already installed
|
|
21
24
|
npm install --save react react-dom
|
|
22
25
|
|
|
@@ -39,6 +42,10 @@ import { App } from "./App";
|
|
|
39
42
|
|
|
40
43
|
// Add this line to enable the light theme for your application
|
|
41
44
|
import "@synergy-design-system/tokens/themes/light.css";
|
|
45
|
+
import "@synergy-design-system/components/index.css";
|
|
46
|
+
|
|
47
|
+
// Optional: Import the styles package
|
|
48
|
+
import "@synergy-design-system/styles/index.css";
|
|
42
49
|
|
|
43
50
|
createRoot(document.getElementById("root")!).render(
|
|
44
51
|
<StrictMode>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// ../react/src/components/tab-panel.ts
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createComponent } from "@lit/react";
|
|
4
|
+
import Component from "@synergy-design-system/components/components/tab-panel/tab-panel.component.js";
|
|
5
|
+
var tagName = "syn-tab-panel";
|
|
6
|
+
Component.define("syn-tab-panel");
|
|
7
|
+
var SynTabPanel = createComponent({
|
|
8
|
+
displayName: "SynTabPanel",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
events: {},
|
|
11
|
+
react: React,
|
|
12
|
+
tagName
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
SynTabPanel
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk.CKKXGN4F.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/tab-panel.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/tab-panel/tab-panel.component.js';\n\nconst tagName = 'syn-tab-panel';\nComponent.define('syn-tab-panel');\n\n/**\n * @summary Tab panels are used inside [tab groups](/components/tab-group) to display tabbed content.\n * @documentation https://synergy.style/components/tab-panel\n * @status stable\n * @since 2.0\n *\n * @slot - The tab panel's content.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --padding - The tab panel's padding.\n */\nexport const SynTabPanel = createComponent({\n displayName: 'SynTabPanel',\n elementClass: Component,\n events: {\n\n },\n react: React,\n tagName,\n});\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAEtB,IAAM,UAAU;AAChB,UAAU,OAAO,eAAe;AAczB,IAAM,cAAc,gBAAgB;AAAA,EACzC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ,CAER;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// ../react/src/components/tab-group.ts
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createComponent } from "@lit/react";
|
|
4
|
+
import Component from "@synergy-design-system/components/components/tab-group/tab-group.component.js";
|
|
5
|
+
var tagName = "syn-tab-group";
|
|
6
|
+
Component.define("syn-tab-group");
|
|
7
|
+
var SynTabGroup = createComponent({
|
|
8
|
+
displayName: "SynTabGroup",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
events: {
|
|
11
|
+
onSynTabShow: "syn-tab-show",
|
|
12
|
+
onSynTabHide: "syn-tab-hide"
|
|
13
|
+
},
|
|
14
|
+
react: React,
|
|
15
|
+
tagName
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
SynTabGroup
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk.VLHZNU3B.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/tab-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/tab-group/tab-group.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type { SynTabHideEvent, SynTabShowEvent } from '@synergy-design-system/components';\n\nconst tagName = 'syn-tab-group';\nComponent.define('syn-tab-group');\n\n/**\n * @summary Tab groups organize content into a container that shows one section at a time.\n * @documentation https://synergy.style/components/tab-group\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - Used for grouping tab panels in the tab group. Must be `<syn-tab-panel>` elements.\n * @slot nav - Used for grouping tabs in the tab group. Must be `<syn-tab>` elements.\n *\n * @event {{ name: String }} syn-tab-show - Emitted when a tab is shown. The payload of the event returns the \"panel\" attribute of the shown tab.\n * @event {{ name: String }} syn-tab-hide - Emitted when a tab is hidden. The payload of the event returns the \"panel\" attribute of the hidden tab.\n *\n * @csspart base - The component's base wrapper.\n * @csspart nav - The tab group's navigation container where tabs are slotted in.\n * @csspart tabs - The container that wraps the tabs.\n * @csspart active-tab-indicator - The line that highlights the currently selected tab.\n * @csspart body - The tab group's body where tab panels are slotted in.\n * @csspart scroll-button - The previous/next scroll buttons that show when tabs are scrollable, an `<syn-icon-button>`.\n * @csspart scroll-button--start - The starting scroll button.\n * @csspart scroll-button--end - The ending scroll button.\n * @csspart scroll-button__base - The scroll button's exported `base` part.\n *\n * @cssproperty --indicator-color - The color of the active tab indicator.\n * @cssproperty --indicator-width - The width of the active tab indicator.\n * @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).\n * @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).\n */\nexport const SynTabGroup = createComponent({\n displayName: 'SynTabGroup',\n elementClass: Component,\n events: {\n onSynTabShow: 'syn-tab-show' as EventName<SynTabShowEvent>,\n onSynTabHide: 'syn-tab-hide' as EventName<SynTabHideEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynTabShowEvent } from '@synergy-design-system/components';\nexport type { SynTabHideEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAKtB,IAAM,UAAU;AAChB,UAAU,OAAO,eAAe;AA+BzB,IAAM,cAAc,gBAAgB;AAAA,EACzC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,cAAc;AAAA,IACd,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ../react/src/components/tab.ts
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createComponent } from "@lit/react";
|
|
4
|
+
import Component from "@synergy-design-system/components/components/tab/tab.component.js";
|
|
5
|
+
var tagName = "syn-tab";
|
|
6
|
+
Component.define("syn-tab");
|
|
7
|
+
var SynTab = createComponent({
|
|
8
|
+
displayName: "SynTab",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
events: {
|
|
11
|
+
onSynClose: "syn-close"
|
|
12
|
+
},
|
|
13
|
+
react: React,
|
|
14
|
+
tagName
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
SynTab
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk.XNCRUJQI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/tab.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/tab/tab.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type { SynCloseEvent } from '@synergy-design-system/components';\n\nconst tagName = 'syn-tab';\nComponent.define('syn-tab');\n\n/**\n * @summary Tabs are used inside [tab groups](/components/tab-group) to represent and activate [tab panels](/components/tab-panel).\n * @documentation https://synergy.style/components/tab\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The tab's label.\n *\n * @event syn-close - Emitted when the tab is closable and the close button is activated.\n *\n * @csspart base - The component's base wrapper.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n */\nexport const SynTab = createComponent({\n displayName: 'SynTab',\n elementClass: Component,\n events: {\n onSynClose: 'syn-close' as EventName<SynCloseEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynCloseEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAKtB,IAAM,UAAU;AAChB,UAAU,OAAO,SAAS;AAkBnB,IAAM,SAAS,gBAAgB;AAAA,EACpC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Component from '@synergy-design-system/components/components/tab-group/tab-group.component.js';
|
|
2
|
+
import { type EventName } from '@lit/react';
|
|
3
|
+
import type { SynTabHideEvent, SynTabShowEvent } from '@synergy-design-system/components';
|
|
4
|
+
/**
|
|
5
|
+
* @summary Tab groups organize content into a container that shows one section at a time.
|
|
6
|
+
* @documentation https://synergy.style/components/tab-group
|
|
7
|
+
* @status stable
|
|
8
|
+
* @since 2.0
|
|
9
|
+
*
|
|
10
|
+
* @dependency syn-icon-button
|
|
11
|
+
*
|
|
12
|
+
* @slot - Used for grouping tab panels in the tab group. Must be `<syn-tab-panel>` elements.
|
|
13
|
+
* @slot nav - Used for grouping tabs in the tab group. Must be `<syn-tab>` elements.
|
|
14
|
+
*
|
|
15
|
+
* @event {{ name: String }} syn-tab-show - Emitted when a tab is shown. The payload of the event returns the "panel" attribute of the shown tab.
|
|
16
|
+
* @event {{ name: String }} syn-tab-hide - Emitted when a tab is hidden. The payload of the event returns the "panel" attribute of the hidden tab.
|
|
17
|
+
*
|
|
18
|
+
* @csspart base - The component's base wrapper.
|
|
19
|
+
* @csspart nav - The tab group's navigation container where tabs are slotted in.
|
|
20
|
+
* @csspart tabs - The container that wraps the tabs.
|
|
21
|
+
* @csspart active-tab-indicator - The line that highlights the currently selected tab.
|
|
22
|
+
* @csspart body - The tab group's body where tab panels are slotted in.
|
|
23
|
+
* @csspart scroll-button - The previous/next scroll buttons that show when tabs are scrollable, an `<syn-icon-button>`.
|
|
24
|
+
* @csspart scroll-button--start - The starting scroll button.
|
|
25
|
+
* @csspart scroll-button--end - The ending scroll button.
|
|
26
|
+
* @csspart scroll-button__base - The scroll button's exported `base` part.
|
|
27
|
+
*
|
|
28
|
+
* @cssproperty --indicator-color - The color of the active tab indicator.
|
|
29
|
+
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
30
|
+
* @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
|
|
31
|
+
* @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
|
|
32
|
+
*/
|
|
33
|
+
export declare const SynTabGroup: import("@lit/react").ReactWebComponent<Component, {
|
|
34
|
+
onSynTabShow: EventName<SynTabShowEvent>;
|
|
35
|
+
onSynTabHide: EventName<SynTabHideEvent>;
|
|
36
|
+
}>;
|
|
37
|
+
export type { SynTabShowEvent } from '@synergy-design-system/components';
|
|
38
|
+
export type { SynTabHideEvent } from '@synergy-design-system/components';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Component from '@synergy-design-system/components/components/tab-panel/tab-panel.component.js';
|
|
2
|
+
/**
|
|
3
|
+
* @summary Tab panels are used inside [tab groups](/components/tab-group) to display tabbed content.
|
|
4
|
+
* @documentation https://synergy.style/components/tab-panel
|
|
5
|
+
* @status stable
|
|
6
|
+
* @since 2.0
|
|
7
|
+
*
|
|
8
|
+
* @slot - The tab panel's content.
|
|
9
|
+
*
|
|
10
|
+
* @csspart base - The component's base wrapper.
|
|
11
|
+
*
|
|
12
|
+
* @cssproperty --padding - The tab panel's padding.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SynTabPanel: import("@lit/react").ReactWebComponent<Component, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Component from '@synergy-design-system/components/components/tab/tab.component.js';
|
|
2
|
+
import { type EventName } from '@lit/react';
|
|
3
|
+
import type { SynCloseEvent } from '@synergy-design-system/components';
|
|
4
|
+
/**
|
|
5
|
+
* @summary Tabs are used inside [tab groups](/components/tab-group) to represent and activate [tab panels](/components/tab-panel).
|
|
6
|
+
* @documentation https://synergy.style/components/tab
|
|
7
|
+
* @status stable
|
|
8
|
+
* @since 2.0
|
|
9
|
+
*
|
|
10
|
+
* @dependency syn-icon-button
|
|
11
|
+
*
|
|
12
|
+
* @slot - The tab's label.
|
|
13
|
+
*
|
|
14
|
+
* @event syn-close - Emitted when the tab is closable and the close button is activated.
|
|
15
|
+
*
|
|
16
|
+
* @csspart base - The component's base wrapper.
|
|
17
|
+
* @csspart close-button - The close button, an `<syn-icon-button>`.
|
|
18
|
+
* @csspart close-button__base - The close button's exported `base` part.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SynTab: import("@lit/react").ReactWebComponent<Component, {
|
|
21
|
+
onSynClose: EventName<SynCloseEvent>;
|
|
22
|
+
}>;
|
|
23
|
+
export type { SynCloseEvent } from '@synergy-design-system/components';
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export { SynSelect } from './components/select.js';
|
|
|
31
31
|
export { SynSideNav } from './components/side-nav.js';
|
|
32
32
|
export { SynSpinner } from './components/spinner.js';
|
|
33
33
|
export { SynSwitch } from './components/switch.js';
|
|
34
|
+
export { SynTab } from './components/tab.js';
|
|
35
|
+
export { SynTabGroup } from './components/tab-group.js';
|
|
36
|
+
export { SynTabPanel } from './components/tab-panel.js';
|
|
34
37
|
export { SynTag } from './components/tag.js';
|
|
35
38
|
export { SynTextarea } from './components/textarea.js';
|
|
36
39
|
export { SynTooltip } from './components/tooltip.js';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SynSwitch
|
|
6
6
|
} from "./chunks/chunk.7IZW5FRR.js";
|
|
7
|
+
import {
|
|
8
|
+
SynTabGroup
|
|
9
|
+
} from "./chunks/chunk.VLHZNU3B.js";
|
|
10
|
+
import {
|
|
11
|
+
SynTabPanel
|
|
12
|
+
} from "./chunks/chunk.CKKXGN4F.js";
|
|
13
|
+
import {
|
|
14
|
+
SynTab
|
|
15
|
+
} from "./chunks/chunk.XNCRUJQI.js";
|
|
7
16
|
import {
|
|
8
17
|
SynTag
|
|
9
18
|
} from "./chunks/chunk.7T7PO2AE.js";
|
|
@@ -140,6 +149,9 @@ export {
|
|
|
140
149
|
SynSideNav,
|
|
141
150
|
SynSpinner,
|
|
142
151
|
SynSwitch,
|
|
152
|
+
SynTab,
|
|
153
|
+
SynTabGroup,
|
|
154
|
+
SynTabPanel,
|
|
143
155
|
SynTag,
|
|
144
156
|
SynTextarea,
|
|
145
157
|
SynTooltip
|
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": "^2.
|
|
8
|
+
"@synergy-design-system/components": "^2.2.0"
|
|
9
9
|
},
|
|
10
10
|
"description": "React wrappers for the Synergy Design System",
|
|
11
11
|
"exports": {
|
|
@@ -40,9 +40,12 @@
|
|
|
40
40
|
"directory": "packages/react"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "2.
|
|
43
|
+
"version": "2.2.0",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "^18.2.79",
|
|
46
46
|
"react": "^18.2.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@synergy-design-system/tokens": "^2.2.0"
|
|
47
50
|
}
|
|
48
51
|
}
|