@synergy-design-system/react 2.4.2 → 2.5.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,24 @@
|
|
|
1
|
+
// ../react/src/components/file.ts
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createComponent } from "@lit/react";
|
|
4
|
+
import Component from "@synergy-design-system/components/components/file/file.component.js";
|
|
5
|
+
var tagName = "syn-file";
|
|
6
|
+
Component.define("syn-file");
|
|
7
|
+
var SynFile = createComponent({
|
|
8
|
+
displayName: "SynFile",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
events: {
|
|
11
|
+
onSynBlur: "syn-blur",
|
|
12
|
+
onSynChange: "syn-change",
|
|
13
|
+
onSynError: "syn-error",
|
|
14
|
+
onSynFocus: "syn-focus",
|
|
15
|
+
onSynInput: "syn-input"
|
|
16
|
+
},
|
|
17
|
+
react: React,
|
|
18
|
+
tagName
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
SynFile
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk.3OAYVNPH.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/file.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/file/file.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynBlurEvent, SynChangeEvent, SynErrorEvent, SynFocusEvent, SynInputEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-file';\nComponent.define('syn-file');\n\n/**\n * @summary File controls allow selecting an arbitrary number of files for uploading.\n * @status stable\n *\n * @dependency syn-button\n * @dependency syn-icon\n *\n * @slot label - The file control's label. Alternatively, you can use the `label` attribute.\n * @slot help-text - Text that describes how to use the file control.\n * Alternatively, you can use the `help-text` attribute.\n * @slot droparea-icon - Optional droparea icon to use instead of the default.\n * Works best with `<syn-icon>`.\n * @slot trigger - Optional content to be used as trigger instead of the default content.\n * Opening the file dialog on click and as well as drag and drop will work for this content.\n * Following attributes will no longer work: *label*, *droparea*, *help-text*, *size*,\n * *hide-value*. Also if using the disabled attribute, the disabled styling will not be\n * applied and must be taken care of yourself.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event syn-error - Emitted when multiple files are selected via drag and drop, without\n * the `multiple` property being set.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-input - Emitted when the control receives input.\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-wrapper - The wrapper around the button and text value.\n * @csspart button - The syn-button acting as a file input.\n * @csspart button__base - The syn-button's exported `base` part.\n * @csspart value - The chosen files or placeholder text for the file input.\n * @csspart droparea - The element wrapping the drop zone.\n * @csspart droparea-background - The background of the drop zone.\n * @csspart droparea-icon - The container that wraps the icon for the drop zone.\n * @csspart droparea-value - The text for the drop zone.\n * @csspart trigger - The container that wraps the trigger.\n *\n * @animation file.iconDrop - The animation to use for the file icon\n * when a file is dropped\n * @animation file.text.disappear - The disappear animation to use for the file placeholder text\n * when a file is dropped\n * @animation file.text.appear - The appear animation to use for the file placeholder text\n * when a file is dropped\n */\nexport const SynFile = createComponent({\n displayName: 'SynFile',\n elementClass: Component,\n events: {\n onSynBlur: 'syn-blur' as EventName<SynBlurEvent>,\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynError: 'syn-error' as EventName<SynErrorEvent>,\n onSynFocus: 'syn-focus' as EventName<SynFocusEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\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 { SynErrorEvent } from '@synergy-design-system/components';\nexport type { SynFocusEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,UAAU;AAgDpB,IAAM,UAAU,gBAAgB;AAAA,EACrC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import Component from '@synergy-design-system/components/components/file/file.component.js';
|
|
2
|
+
import { type EventName } from '@lit/react';
|
|
3
|
+
import type { SynBlurEvent, SynChangeEvent, SynErrorEvent, SynFocusEvent, SynInputEvent } from '@synergy-design-system/components';
|
|
4
|
+
/**
|
|
5
|
+
* @summary File controls allow selecting an arbitrary number of files for uploading.
|
|
6
|
+
* @status stable
|
|
7
|
+
*
|
|
8
|
+
* @dependency syn-button
|
|
9
|
+
* @dependency syn-icon
|
|
10
|
+
*
|
|
11
|
+
* @slot label - The file control's label. Alternatively, you can use the `label` attribute.
|
|
12
|
+
* @slot help-text - Text that describes how to use the file control.
|
|
13
|
+
* Alternatively, you can use the `help-text` attribute.
|
|
14
|
+
* @slot droparea-icon - Optional droparea icon to use instead of the default.
|
|
15
|
+
* Works best with `<syn-icon>`.
|
|
16
|
+
* @slot trigger - Optional content to be used as trigger instead of the default content.
|
|
17
|
+
* Opening the file dialog on click and as well as drag and drop will work for this content.
|
|
18
|
+
* Following attributes will no longer work: *label*, *droparea*, *help-text*, *size*,
|
|
19
|
+
* *hide-value*. Also if using the disabled attribute, the disabled styling will not be
|
|
20
|
+
* applied and must be taken care of yourself.
|
|
21
|
+
*
|
|
22
|
+
* @event syn-blur - Emitted when the control loses focus.
|
|
23
|
+
* @event syn-change - Emitted when an alteration to the control's value is committed by the user.
|
|
24
|
+
* @event syn-error - Emitted when multiple files are selected via drag and drop, without
|
|
25
|
+
* the `multiple` property being set.
|
|
26
|
+
* @event syn-focus - Emitted when the control gains focus.
|
|
27
|
+
* @event syn-input - Emitted when the control receives input.
|
|
28
|
+
*
|
|
29
|
+
* @csspart form-control - The form control that wraps the label, input, and help text.
|
|
30
|
+
* @csspart form-control-label - The label's wrapper.
|
|
31
|
+
* @csspart form-control-input - The input's wrapper.
|
|
32
|
+
* @csspart form-control-help-text - The help text's wrapper.
|
|
33
|
+
* @csspart button-wrapper - The wrapper around the button and text value.
|
|
34
|
+
* @csspart button - The syn-button acting as a file input.
|
|
35
|
+
* @csspart button__base - The syn-button's exported `base` part.
|
|
36
|
+
* @csspart value - The chosen files or placeholder text for the file input.
|
|
37
|
+
* @csspart droparea - The element wrapping the drop zone.
|
|
38
|
+
* @csspart droparea-background - The background of the drop zone.
|
|
39
|
+
* @csspart droparea-icon - The container that wraps the icon for the drop zone.
|
|
40
|
+
* @csspart droparea-value - The text for the drop zone.
|
|
41
|
+
* @csspart trigger - The container that wraps the trigger.
|
|
42
|
+
*
|
|
43
|
+
* @animation file.iconDrop - The animation to use for the file icon
|
|
44
|
+
* when a file is dropped
|
|
45
|
+
* @animation file.text.disappear - The disappear animation to use for the file placeholder text
|
|
46
|
+
* when a file is dropped
|
|
47
|
+
* @animation file.text.appear - The appear animation to use for the file placeholder text
|
|
48
|
+
* when a file is dropped
|
|
49
|
+
*/
|
|
50
|
+
export declare const SynFile: import("@lit/react").ReactWebComponent<Component, {
|
|
51
|
+
onSynBlur: EventName<SynBlurEvent>;
|
|
52
|
+
onSynChange: EventName<SynChangeEvent>;
|
|
53
|
+
onSynError: EventName<SynErrorEvent>;
|
|
54
|
+
onSynFocus: EventName<SynFocusEvent>;
|
|
55
|
+
onSynInput: EventName<SynInputEvent>;
|
|
56
|
+
}>;
|
|
57
|
+
export type { SynBlurEvent } from '@synergy-design-system/components';
|
|
58
|
+
export type { SynChangeEvent } from '@synergy-design-system/components';
|
|
59
|
+
export type { SynErrorEvent } from '@synergy-design-system/components';
|
|
60
|
+
export type { SynFocusEvent } from '@synergy-design-system/components';
|
|
61
|
+
export type { SynInputEvent } from '@synergy-design-system/components';
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { SynDialog } from './components/dialog.js';
|
|
|
12
12
|
export { SynDivider } from './components/divider.js';
|
|
13
13
|
export { SynDrawer } from './components/drawer.js';
|
|
14
14
|
export { SynDropdown } from './components/dropdown.js';
|
|
15
|
+
export { SynFile } from './components/file.js';
|
|
15
16
|
export { SynHeader } from './components/header.js';
|
|
16
17
|
export { SynIcon } from './components/icon.js';
|
|
17
18
|
export { SynIconButton } from './components/icon-button.js';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SynTag
|
|
3
|
+
} from "./chunks/chunk.7T7PO2AE.js";
|
|
1
4
|
import {
|
|
2
5
|
SynTextarea
|
|
3
6
|
} from "./chunks/chunk.4YY6TGIA.js";
|
|
4
7
|
import {
|
|
5
8
|
SynTooltip
|
|
6
9
|
} from "./chunks/chunk.BU4SKSAF.js";
|
|
10
|
+
import {
|
|
11
|
+
SynRadio
|
|
12
|
+
} from "./chunks/chunk.AFCMSVBY.js";
|
|
7
13
|
import {
|
|
8
14
|
SynSelect
|
|
9
15
|
} from "./chunks/chunk.FB24BPQZ.js";
|
|
@@ -26,8 +32,8 @@ import {
|
|
|
26
32
|
SynTab
|
|
27
33
|
} from "./chunks/chunk.XNCRUJQI.js";
|
|
28
34
|
import {
|
|
29
|
-
|
|
30
|
-
} from "./chunks/chunk.
|
|
35
|
+
SynOptgroup
|
|
36
|
+
} from "./chunks/chunk.DLAIDGSD.js";
|
|
31
37
|
import {
|
|
32
38
|
SynOption
|
|
33
39
|
} from "./chunks/chunk.CJKK63W2.js";
|
|
@@ -50,8 +56,8 @@ import {
|
|
|
50
56
|
SynRadioGroup
|
|
51
57
|
} from "./chunks/chunk.PCXGVEBP.js";
|
|
52
58
|
import {
|
|
53
|
-
|
|
54
|
-
} from "./chunks/chunk.
|
|
59
|
+
SynHeader
|
|
60
|
+
} from "./chunks/chunk.RY2WG25R.js";
|
|
55
61
|
import {
|
|
56
62
|
SynIconButton
|
|
57
63
|
} from "./chunks/chunk.W4YO4ERO.js";
|
|
@@ -73,9 +79,6 @@ import {
|
|
|
73
79
|
import {
|
|
74
80
|
SynNavItem
|
|
75
81
|
} from "./chunks/chunk.Y2KBRBDX.js";
|
|
76
|
-
import {
|
|
77
|
-
SynOptgroup
|
|
78
|
-
} from "./chunks/chunk.DLAIDGSD.js";
|
|
79
82
|
import {
|
|
80
83
|
SynCard
|
|
81
84
|
} from "./chunks/chunk.JTJSVPDC.js";
|
|
@@ -98,8 +101,8 @@ import {
|
|
|
98
101
|
SynDropdown
|
|
99
102
|
} from "./chunks/chunk.E3427YBK.js";
|
|
100
103
|
import {
|
|
101
|
-
|
|
102
|
-
} from "./chunks/chunk.
|
|
104
|
+
SynFile
|
|
105
|
+
} from "./chunks/chunk.3OAYVNPH.js";
|
|
103
106
|
import {
|
|
104
107
|
SynAccordion
|
|
105
108
|
} from "./chunks/chunk.W6NG3JOO.js";
|
|
@@ -136,6 +139,7 @@ export {
|
|
|
136
139
|
SynDivider,
|
|
137
140
|
SynDrawer,
|
|
138
141
|
SynDropdown,
|
|
142
|
+
SynFile,
|
|
139
143
|
SynHeader,
|
|
140
144
|
SynIcon,
|
|
141
145
|
SynIconButton,
|
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.5.0"
|
|
9
9
|
},
|
|
10
10
|
"description": "React wrappers for the Synergy Design System",
|
|
11
11
|
"exports": {
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"directory": "packages/react"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "2.
|
|
43
|
+
"version": "2.5.0",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "^18.2.79",
|
|
46
46
|
"react": "^18.2.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@synergy-design-system/tokens": "^2.
|
|
49
|
+
"@synergy-design-system/tokens": "^2.6.0"
|
|
50
50
|
}
|
|
51
51
|
}
|