@synergy-design-system/components 0.1.0 → 1.0.0-main.10
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/LICENSE +28 -0
- package/README.md +150 -1
- package/dist/chunks/{chunk.Y5USHY74.js → chunk.5FQRRIZP.js} +4 -3
- package/dist/chunks/chunk.5FQRRIZP.js.map +7 -0
- package/dist/chunks/{chunk.2DA7CIOQ.js → chunk.5OIEI73E.js} +3 -2
- package/dist/chunks/chunk.5OIEI73E.js.map +7 -0
- package/dist/chunks/{chunk.7XI5LKCC.js → chunk.6C4JXZZN.js} +2 -1
- package/dist/chunks/chunk.6C4JXZZN.js.map +7 -0
- package/dist/chunks/{chunk.MAS2SHYD.js → chunk.A3SKDWCT.js} +1 -0
- package/dist/chunks/chunk.A3SKDWCT.js.map +7 -0
- package/dist/chunks/{chunk.SVIWEI6P.js → chunk.BREU4ILT.js} +2 -1
- package/dist/chunks/chunk.BREU4ILT.js.map +7 -0
- package/dist/chunks/{chunk.2CFEYJLE.js → chunk.C7624ITA.js} +1 -0
- package/dist/chunks/chunk.C7624ITA.js.map +7 -0
- package/dist/chunks/{chunk.PM7NIY3M.js → chunk.DJOAQ4JU.js} +1 -0
- package/dist/chunks/chunk.DJOAQ4JU.js.map +7 -0
- package/dist/chunks/{chunk.Q5SD5LHE.js → chunk.GHPQ7ZMD.js} +11 -242
- package/dist/chunks/chunk.GHPQ7ZMD.js.map +7 -0
- package/dist/chunks/chunk.IFBY43YE.js +138 -0
- package/dist/chunks/chunk.IFBY43YE.js.map +7 -0
- package/dist/chunks/{chunk.HQUF2ZAX.js → chunk.LE4ARJTE.js} +3 -2
- package/dist/chunks/chunk.LE4ARJTE.js.map +7 -0
- package/dist/chunks/{chunk.QPNUJNT5.js → chunk.N2I6HVX3.js} +2 -1
- package/dist/chunks/chunk.N2I6HVX3.js.map +7 -0
- package/dist/chunks/{chunk.KHU4AFPL.js → chunk.N7UUNTQC.js} +2 -1
- package/dist/chunks/chunk.N7UUNTQC.js.map +7 -0
- package/dist/chunks/{chunk.4NMNW5OM.js → chunk.O7USYXBT.js} +1 -0
- package/dist/chunks/chunk.O7USYXBT.js.map +7 -0
- package/dist/chunks/{chunk.NBKDLFEY.js → chunk.OEWBEV4Z.js} +7 -6
- package/dist/chunks/chunk.OEWBEV4Z.js.map +7 -0
- package/dist/chunks/{chunk.HSF5YXAS.js → chunk.OLZ3GIFL.js} +19 -35
- package/dist/chunks/chunk.OLZ3GIFL.js.map +7 -0
- package/dist/chunks/chunk.R55DOPNK.js +12 -0
- package/dist/chunks/chunk.R55DOPNK.js.map +7 -0
- package/dist/chunks/{chunk.2A3352EO.js → chunk.R6VNLE6N.js} +1 -0
- package/dist/chunks/chunk.R6VNLE6N.js.map +7 -0
- package/dist/chunks/{chunk.XVEDHRRP.js → chunk.RLGMLXIP.js} +20 -22
- package/dist/chunks/chunk.RLGMLXIP.js.map +7 -0
- package/dist/chunks/{chunk.VRTJZYIC.js → chunk.U7ZJ22QM.js} +1 -0
- package/dist/chunks/chunk.U7ZJ22QM.js.map +7 -0
- package/dist/chunks/chunk.W46CFM2R.js +90 -0
- package/dist/chunks/chunk.W46CFM2R.js.map +7 -0
- package/dist/chunks/{chunk.Z6AW3P62.js → chunk.WDCAHRYG.js} +4 -48
- package/dist/chunks/chunk.WDCAHRYG.js.map +7 -0
- package/dist/chunks/chunk.WTCUSH7V.js +42 -0
- package/dist/chunks/chunk.WTCUSH7V.js.map +7 -0
- package/dist/chunks/chunk.XGXFE6IF.js +49 -0
- package/dist/chunks/chunk.XGXFE6IF.js.map +7 -0
- package/dist/chunks/{chunk.O3LUPMYG.js → chunk.Y7DVVKVJ.js} +82 -18
- package/dist/chunks/chunk.Y7DVVKVJ.js.map +7 -0
- package/dist/components/button/button.component.d.ts +1 -10
- package/dist/components/button/button.component.js +19 -16
- package/dist/components/button/button.component.js.map +7 -0
- package/dist/components/button/button.custom.styles.d.ts +2 -0
- package/dist/components/button/button.custom.styles.js +8 -0
- package/dist/components/button/button.custom.styles.js.map +7 -0
- package/dist/components/button/button.js +21 -21
- package/dist/components/button/button.js.map +7 -0
- package/dist/components/button/button.styles.js +5 -3
- package/dist/components/button/button.styles.js.map +7 -0
- package/dist/components/checkbox/checkbox.custom.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.custom.styles.js +11 -0
- package/dist/components/checkbox/checkbox.custom.styles.js.map +7 -0
- package/dist/components/icon/icon.component.js +10 -9
- package/dist/components/icon/icon.component.js.map +7 -0
- package/dist/components/icon/icon.js +10 -9
- package/dist/components/icon/icon.js.map +7 -0
- package/dist/components/icon/icon.styles.js +4 -3
- package/dist/components/icon/icon.styles.js.map +7 -0
- package/dist/components/icon/library.default.js +4 -3
- package/dist/components/icon/library.default.js.map +7 -0
- package/dist/components/icon/library.js +6 -5
- package/dist/components/icon/library.js.map +7 -0
- package/dist/components/icon/library.system.js +3 -2
- package/dist/components/icon/library.system.js.map +7 -0
- package/dist/components/input/input.component.d.ts +0 -4
- package/dist/components/input/input.component.js +17 -14
- package/dist/components/input/input.component.js.map +7 -0
- package/dist/components/input/input.custom.styles.d.ts +2 -0
- package/dist/components/input/input.custom.styles.js +8 -0
- package/dist/components/input/input.custom.styles.js.map +7 -0
- package/dist/components/input/input.js +18 -15
- package/dist/components/input/input.js.map +7 -0
- package/dist/components/input/input.styles.js +5 -3
- package/dist/components/input/input.styles.js.map +7 -0
- package/dist/components/spinner/spinner.component.js +8 -7
- package/dist/components/spinner/spinner.component.js.map +7 -0
- package/dist/components/spinner/spinner.styles.js +4 -3
- package/dist/components/spinner/spinner.styles.js.map +7 -0
- package/dist/components/textarea/textarea.custom.styles.d.ts +2 -0
- package/dist/components/textarea/textarea.custom.styles.js +11 -0
- package/dist/components/textarea/textarea.custom.styles.js.map +7 -0
- package/dist/custom-elements.json +11 -108
- package/dist/events/events.d.ts +8 -8
- package/dist/styles/form-control.custom.styles.d.ts +2 -0
- package/dist/synergy-autoloader.js +3 -2
- package/dist/synergy-autoloader.js.map +7 -0
- package/dist/synergy.d.ts +2 -0
- package/dist/synergy.js +34 -16
- package/dist/synergy.js.map +7 -0
- package/dist/translations/de.js +4 -3
- package/dist/translations/de.js.map +7 -0
- package/dist/translations/en.js +3 -2
- package/dist/translations/en.js.map +7 -0
- package/dist/utilities/base-path.js +3 -2
- package/dist/utilities/base-path.js.map +7 -0
- package/dist/utilities/form.d.ts +11 -0
- package/dist/utilities/form.js +11 -0
- package/dist/utilities/form.js.map +7 -0
- package/dist/utilities/localize.js +4 -3
- package/dist/utilities/localize.js.map +7 -0
- package/dist/vscode.html-custom-data.json +2 -31
- package/dist/web-types.json +4 -56
- package/package.json +73 -34
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, SickDesignSystem
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,9 +1,154 @@
|
|
|
1
1
|
# @synergy-design-system/components
|
|
2
2
|
|
|
3
|
-
Synergy
|
|
3
|
+
This package provides the base of the Synergy Design System as native web components.
|
|
4
|
+
It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/).
|
|
5
|
+
|
|
6
|
+
## Getting started
|
|
7
|
+
|
|
8
|
+
### 1. Package installation
|
|
9
|
+
|
|
10
|
+
Run the following steps to install the required packages.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Install the base library and required css files
|
|
14
|
+
npm install --save @synergy-design-system/components @synergy-design-system/tokens
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### 2. Load the design tokens
|
|
20
|
+
|
|
21
|
+
The shipped components make heavy use of design tokens, which are provided via [@synergy-design-system/tokens](https://github.com/SickDesignSystem/synergy/tree/main/packages/tokens). Make sure to follow the installation steps there for help on setting the tokens up. Usually it is enough to load the light or dark theme included there.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### 3. Define the elements
|
|
26
|
+
|
|
27
|
+
There are multiple ways to load the components:
|
|
28
|
+
|
|
29
|
+
#### Loading all available components
|
|
30
|
+
|
|
31
|
+
To make all components available, just load the main package file. It will make sure that all components and needed dependencies are loaded and available directly.
|
|
32
|
+
|
|
33
|
+
> Please keep in mind that this way of loading the components will create larger bundle sizes!
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<!-- Example 1: Loading via script type module -->
|
|
37
|
+
<!doctype html>
|
|
38
|
+
<html lang="en">
|
|
39
|
+
<head>
|
|
40
|
+
<meta charset="UTF-8" />
|
|
41
|
+
</head>
|
|
42
|
+
<body>
|
|
43
|
+
<div id="root">
|
|
44
|
+
<syn-button variant="text">Button</syn-button>
|
|
45
|
+
<syn-input></syn-input>
|
|
46
|
+
</div>
|
|
47
|
+
<!-- As we are loading all modules, syn-button and syn-input will render correctly -->
|
|
48
|
+
<script type="module" src="../node_modules/@synergy-design-system/components/dist/synergy.js"></script>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
When using a build system, you should load the bundle in JavaScript or TypeScript directly, for example when using vite:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
// main.ts
|
|
57
|
+
|
|
58
|
+
// Do not forget to load the design tokens!
|
|
59
|
+
import '@synergy-design-system/tokens/themes/light.css';
|
|
60
|
+
|
|
61
|
+
// This will load synergy.js via the exports map
|
|
62
|
+
import '@synergy-design-system/components';
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Loading selected components only
|
|
66
|
+
|
|
67
|
+
Use this when you need complete control about which components are loaded. This will usually lead to smaller bundle sizes, which might be preferable for your application. As a downside, you will have to remember adding missing components to your bundle.
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<!-- Example 1: Loading via script type module -->
|
|
71
|
+
<!doctype html>
|
|
72
|
+
<html lang="en">
|
|
73
|
+
<head>
|
|
74
|
+
<meta charset="UTF-8" />
|
|
75
|
+
</head>
|
|
76
|
+
<body>
|
|
77
|
+
<div id="root">
|
|
78
|
+
<syn-button variant="text">Button</syn-button>
|
|
79
|
+
<syn-input></syn-input>
|
|
80
|
+
</div>
|
|
81
|
+
<!-- We are only loading the button, syn-input will render as an empty div! -->
|
|
82
|
+
<script type="module" src="../node_modules/@synergy-design-system/components/dist/components/button/button.js"></script>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
When using a build system, you may also load the bundle in JavaScript or TypeScript directly, for example when using vite:
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
// main.ts
|
|
91
|
+
|
|
92
|
+
// Do not forget to load the design tokens!
|
|
93
|
+
import '@synergy-design-system/tokens/themes/light.css';
|
|
94
|
+
|
|
95
|
+
// This will only load and define the button itself
|
|
96
|
+
import '@synergy-design-system/components/components/button/button.js';
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### 4. Using the provided types
|
|
102
|
+
|
|
103
|
+
The components are built using typescript and provide types for elements and events out of the box. These can be used for working with the dom when working in a typescript environment. You may use them by importing the needed types and using them for elements, like shown in this example:
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// main.ts
|
|
107
|
+
|
|
108
|
+
// Do not forget to load the design tokens!
|
|
109
|
+
import '@synergy-design-system/tokens/themes/light.css';
|
|
110
|
+
|
|
111
|
+
// Example 1: Load the type for syn-button from the root:
|
|
112
|
+
import type { SynButton, SynInvalidEvent } from '@synergy-design-system/components';
|
|
113
|
+
|
|
114
|
+
// Example 2: Load the type from the syn-button dir directly.
|
|
115
|
+
// In this case you will have to load the event type from another file!
|
|
116
|
+
import type { SynButton } from '@synergy-design-system/components/components/button/button';
|
|
117
|
+
import type { SynInvalidEvent } from '@synergy-design-system/components/events/syn-invalid';
|
|
118
|
+
|
|
119
|
+
document.addEventListener('load', () => {
|
|
120
|
+
const loadedSynButtons = document.querySelectorAll<SynButton>('syn-button');
|
|
121
|
+
|
|
122
|
+
// Attach a syn-invalid event that is fired every time a button becomes invalid
|
|
123
|
+
Array
|
|
124
|
+
.from(loadedSynButtons) // Type: SynButton[]
|
|
125
|
+
.addEventListener('syn-invalid', (e: SynInvalidEvent) => {
|
|
126
|
+
console.log('Button is now invalid!', e);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### 5. Add html autocompletion to VSCode (optional)
|
|
134
|
+
|
|
135
|
+
This package ships with a [custom-elements-manifest](https://github.com/webcomponents/custom-elements-manifest) that may be used to provide typings for tags. To enable code completion, please proceed the following way:
|
|
136
|
+
|
|
137
|
+
1. Install the `@synergy-design-system/components` package.
|
|
138
|
+
2. If you do **not** have a `.vscode/settings.json` file yet, create it.
|
|
139
|
+
3. Add support for [vscode-custom-data](https://github.com/microsoft/vscode-custom-data) by adding the following setting to your `.vscode/settings.json`: `"html.customData": ["./node_modules/@synergy-design-system/components/dist/vscode.html-custom-data.json"]`
|
|
140
|
+
4. Restart VSCode.
|
|
141
|
+
5. Switch to an html (or similar) file and type `<syn`. Auto-complete now provides a list of available components along with its attributes.
|
|
142
|
+
|
|
143
|
+
> Note the path above is valid for installations using npm.
|
|
144
|
+
> When using another package manager, make sure to set the proper path to `vscode.html-custom-data.json`!
|
|
145
|
+
|
|
146
|
+
---
|
|
4
147
|
|
|
5
148
|
## Local setup
|
|
149
|
+
|
|
6
150
|
### Using the vendor cli
|
|
151
|
+
|
|
7
152
|
The vendor cli is taking care about updating our code base according to a new version of shoelace.
|
|
8
153
|
|
|
9
154
|
To change the shoelace version, that should be downloaded, change the version in the config of `./scripts/vendorism.js`.
|
|
@@ -12,3 +157,7 @@ If code in our components library should be updated to this new shoelace version
|
|
|
12
157
|
|
|
13
158
|
All shoelace files are per default readonly and are disabled from being changed. To change this files can be ejected. This can be done via:
|
|
14
159
|
`pnpm vendor.eject "src/declaration.d.ts"`.
|
|
160
|
+
|
|
161
|
+
### Adding events to the output
|
|
162
|
+
|
|
163
|
+
To add events to the component output, make sure to add them to `src/scripts/vendorism.js` into the `events` array that is defined there. After a new build run `via pnpm build`, you will see the new event files and the `events/events.ts` file will be regenerated.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spinner_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.N2I6HVX3.js";
|
|
4
4
|
import {
|
|
5
5
|
LocalizeController
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.R6VNLE6N.js";
|
|
7
7
|
import {
|
|
8
8
|
SynergyElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.LE4ARJTE.js";
|
|
10
10
|
|
|
11
11
|
// src/components/spinner/spinner.component.ts
|
|
12
12
|
import { html } from "lit";
|
|
@@ -29,3 +29,4 @@ SynSpinner.styles = spinner_styles_default;
|
|
|
29
29
|
export {
|
|
30
30
|
SynSpinner
|
|
31
31
|
};
|
|
32
|
+
//# sourceMappingURL=chunk.5FQRRIZP.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/spinner/spinner.component.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { html } from 'lit';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './spinner.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Spinners are used to show the progress of an indeterminate operation.\n * @documentation https://synergy.style/components/spinner\n * @status stable\n * @since 2.0\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --track-width - The width of the track.\n * @cssproperty --track-color - The color of the track.\n * @cssproperty --indicator-color - The color of the spinner's indicator.\n * @cssproperty --speed - The time it takes for the spinner to complete one animation cycle.\n */\nexport default class SynSpinner extends SynergyElement {\n static styles: CSSResultGroup = styles;\n\n private readonly localize = new LocalizeController(this);\n\n render() {\n return html`\n <svg part=\"base\" class=\"spinner\" role=\"progressbar\" aria-label=${this.localize.term('loading')}>\n <circle class=\"spinner__track\"></circle>\n <circle class=\"spinner__indicator\"></circle>\n </svg>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAMA,SAAS,YAAY;AAmBrB,IAAqB,aAArB,cAAwC,eAAe;AAAA,EAAvD;AAAA;AAGE,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAAA;AAAA,EAEvD,SAAS;AACP,WAAO;AAAA,uEAC4D,KAAK,SAAS,KAAK,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKlG;AACF;AAbqB,WACZ,SAAyB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
library_default_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.6C4JXZZN.js";
|
|
4
4
|
import {
|
|
5
5
|
library_system_default
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.U7ZJ22QM.js";
|
|
7
7
|
|
|
8
8
|
// src/components/icon/library.ts
|
|
9
9
|
var registry = [library_default_default, library_system_default];
|
|
@@ -42,3 +42,4 @@ export {
|
|
|
42
42
|
registerIconLibrary,
|
|
43
43
|
unregisterIconLibrary
|
|
44
44
|
};
|
|
45
|
+
//# sourceMappingURL=chunk.5OIEI73E.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/library.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport defaultLibrary from './library.default.js';\nimport systemLibrary from './library.system.js';\nimport type SynIcon from '../icon/icon.js';\n\nexport type IconLibraryResolver = (name: string) => string;\nexport type IconLibraryMutator = (svg: SVGElement) => void;\nexport interface IconLibrary {\n name: string;\n resolver: IconLibraryResolver;\n mutator?: IconLibraryMutator;\n spriteSheet?: boolean;\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, systemLibrary];\nlet watchedIcons: SynIcon[] = [];\n\n/** Adds an icon to the list of watched icons. */\nexport function watchIcon(icon: SynIcon) {\n watchedIcons.push(icon);\n}\n\n/** Removes an icon from the list of watched icons. */\nexport function unwatchIcon(icon: SynIcon) {\n watchedIcons = watchedIcons.filter(el => el !== icon);\n}\n\n/** Returns a library from the registry. */\nexport function getIconLibrary(name?: string) {\n return registry.find(lib => lib.name === name);\n}\n\n/** Adds an icon library to the registry, or overrides an existing one. */\nexport function registerIconLibrary(name: string, options: Omit<IconLibrary, 'name'>) {\n unregisterIconLibrary(name);\n registry.push({\n name,\n resolver: options.resolver,\n mutator: options.mutator,\n spriteSheet: options.spriteSheet\n });\n\n // Redraw watched icons\n watchedIcons.forEach(icon => {\n if (icon.library === name) {\n icon.setIcon();\n }\n });\n}\n\n/** Removes an icon library from the registry. */\nexport function unregisterIconLibrary(name: string) {\n registry = registry.filter(lib => lib.name !== name);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAmBA,IAAI,WAA0B,CAAC,yBAAgB,sBAAa;AAC5D,IAAI,eAA0B,CAAC;AAGxB,SAAS,UAAU,MAAe;AACvC,eAAa,KAAK,IAAI;AACxB;AAGO,SAAS,YAAY,MAAe;AACzC,iBAAe,aAAa,OAAO,QAAM,OAAO,IAAI;AACtD;AAGO,SAAS,eAAe,MAAe;AAC5C,SAAO,SAAS,KAAK,SAAO,IAAI,SAAS,IAAI;AAC/C;AAGO,SAAS,oBAAoB,MAAc,SAAoC;AACpF,wBAAsB,IAAI;AAC1B,WAAS,KAAK;AAAA,IACZ;AAAA,IACA,UAAU,QAAQ;AAAA,IAClB,SAAS,QAAQ;AAAA,IACjB,aAAa,QAAQ;AAAA,EACvB,CAAC;AAGD,eAAa,QAAQ,UAAQ;AAC3B,QAAI,KAAK,YAAY,MAAM;AACzB,WAAK,QAAQ;AAAA,IACf;AAAA,EACF,CAAC;AACH;AAGO,SAAS,sBAAsB,MAAc;AAClD,aAAW,SAAS,OAAO,SAAO,IAAI,SAAS,IAAI;AACrD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getBasePath
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.C7624ITA.js";
|
|
4
4
|
|
|
5
5
|
// src/components/icon/library.default.ts
|
|
6
6
|
var library = {
|
|
@@ -12,3 +12,4 @@ var library_default_default = library;
|
|
|
12
12
|
export {
|
|
13
13
|
library_default_default
|
|
14
14
|
};
|
|
15
|
+
//# sourceMappingURL=chunk.6C4JXZZN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/library.default.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { getBasePath } from '../../utilities/base-path.js';\nimport type { IconLibrary } from './library.js';\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: name => getBasePath(`assets/icons/${name}.svg`)\n};\n\nexport default library;\n"],
|
|
5
|
+
"mappings": ";;;;;AASA,IAAM,UAAuB;AAAA,EAC3B,MAAM;AAAA,EACN,UAAU,UAAQ,YAAY,gBAAgB,IAAI,MAAM;AAC1D;AAEA,IAAO,0BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/translations/en.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { registerTranslation } from '@shoelace-style/localize';\nimport type { Translation } from '../utilities/localize.js';\n\nconst translation: Translation = {\n $code: 'en',\n $name: 'English',\n $dir: 'ltr',\n\n carousel: 'Carousel',\n clearEntry: 'Clear entry',\n close: 'Close',\n copied: 'Copied',\n copy: 'Copy',\n currentValue: 'Current value',\n error: 'Error',\n goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,\n hidePassword: 'Hide password',\n loading: 'Loading',\n nextSlide: 'Next slide',\n numOptionsSelected: num => {\n if (num === 0) return 'No options selected';\n if (num === 1) return '1 option selected';\n return `${num} options selected`;\n },\n previousSlide: 'Previous slide',\n progress: 'Progress',\n remove: 'Remove',\n resize: 'Resize',\n scrollToEnd: 'Scroll to end',\n scrollToStart: 'Scroll to start',\n selectAColorFromTheScreen: 'Select a color from the screen',\n showPassword: 'Show password',\n slideNum: slide => `Slide ${slide}`,\n toggleColorFormat: 'Toggle color format'\n};\n\nregisterTranslation(translation);\n\nexport default translation;\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS,2BAA2B;AAGpC,IAAM,cAA2B;AAAA,EAC/B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EAEN,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,EACP,WAAW,CAAC,OAAO,UAAU,eAAe,KAAK,OAAO,KAAK;AAAA,EAC7D,cAAc;AAAA,EACd,SAAS;AAAA,EACT,WAAW;AAAA,EACX,oBAAoB,SAAO;AACzB,QAAI,QAAQ;AAAG,aAAO;AACtB,QAAI,QAAQ;AAAG,aAAO;AACtB,WAAO,GAAG,GAAG;AAAA,EACf;AAAA,EACA,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,eAAe;AAAA,EACf,2BAA2B;AAAA,EAC3B,cAAc;AAAA,EACd,UAAU,WAAS,SAAS,KAAK;AAAA,EACjC,mBAAmB;AACrB;AAEA,oBAAoB,WAAW;AAE/B,IAAO,aAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
component_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.O7USYXBT.js";
|
|
4
4
|
|
|
5
5
|
// src/components/icon/icon.styles.ts
|
|
6
6
|
import { css } from "lit";
|
|
@@ -25,3 +25,4 @@ var icon_styles_default = css`
|
|
|
25
25
|
export {
|
|
26
26
|
icon_styles_default
|
|
27
27
|
};
|
|
28
|
+
//# sourceMappingURL=chunk.BREU4ILT.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/icon.styles.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\nimport componentStyles from '../../styles/component.styles.js';\n\nexport default css`\n\t/* stylelint-disable */\n ${componentStyles}\n\n :host {\n display: inline-block;\n width: 1em;\n height: 1em;\n box-sizing: content-box !important;\n }\n\n svg {\n display: block;\n height: 100%;\n width: 100%;\n }\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;AAMA,SAAS,WAAW;AAGpB,IAAO,sBAAQ;AAAA;AAAA,IAEX,wBAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utilities/base-path.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nlet basePath = '';\n\n/** Sets the library's base path to the specified directory. */\nexport function setBasePath(path: string) {\n basePath = path;\n}\n\n/**\n * Gets the library's base path.\n *\n * The base path is used to load assets such as icons and images, so it needs to be set for components to work properly.\n * By default, this script will look for a script ending in synergy.js or synergy-autoloader.js and set the base path\n * to the directory that contains that file. To override this behavior, you can add the data-synergy attribute to any\n * script on the page (it probably makes the most sense to attach it to the Synergy script, but it could also be on a\n * bundle). The value can be a local folder or it can point to a CORS-enabled endpoint such as a CDN.\n *\n * <script src=\"bundle.js\" data-synergy=\"/custom/base/path\"></script>\n *\n * Alternatively, you can set the base path manually using the exported setBasePath() function.\n *\n * @param subpath - An optional path to append to the base path.\n */\nexport function getBasePath(subpath = '') {\n if (!basePath) {\n const scripts = [...document.getElementsByTagName('script')] as HTMLScriptElement[];\n const configScript = scripts.find(script => script.hasAttribute('data-synergy'));\n\n if (configScript) {\n // Use the data-synergy attribute\n setBasePath(configScript.getAttribute('data-synergy')!);\n } else {\n const fallbackScript = scripts.find(s => {\n return /synergy(\\.min)?\\.js($|\\?)/.test(s.src) || /synergy-autoloader(\\.min)?\\.js($|\\?)/.test(s.src);\n });\n let path = '';\n\n if (fallbackScript) {\n path = fallbackScript.getAttribute('src')!;\n }\n\n setBasePath(path.split('/').slice(0, -1).join('/'));\n }\n }\n\n // Return the base path without a trailing slash. If one exists, append the subpath separated by a slash.\n return basePath.replace(/\\/$/, '') + (subpath ? `/${subpath.replace(/^\\//, '')}` : ``);\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,IAAI,WAAW;AAGR,SAAS,YAAY,MAAc;AACxC,aAAW;AACb;AAiBO,SAAS,YAAY,UAAU,IAAI;AACxC,MAAI,CAAC,UAAU;AACb,UAAM,UAAU,CAAC,GAAG,SAAS,qBAAqB,QAAQ,CAAC;AAC3D,UAAM,eAAe,QAAQ,KAAK,YAAU,OAAO,aAAa,cAAc,CAAC;AAE/E,QAAI,cAAc;AAEhB,kBAAY,aAAa,aAAa,cAAc,CAAE;AAAA,IACxD,OAAO;AACL,YAAM,iBAAiB,QAAQ,KAAK,OAAK;AACvC,eAAO,4BAA4B,KAAK,EAAE,GAAG,KAAK,uCAAuC,KAAK,EAAE,GAAG;AAAA,MACrG,CAAC;AACD,UAAI,OAAO;AAEX,UAAI,gBAAgB;AAClB,eAAO,eAAe,aAAa,KAAK;AAAA,MAC1C;AAEA,kBAAY,KAAK,MAAM,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC;AAAA,IACpD;AAAA,EACF;AAGA,SAAO,SAAS,QAAQ,OAAO,EAAE,KAAK,UAAU,IAAI,QAAQ,QAAQ,OAAO,EAAE,CAAC,KAAK;AACrF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
button_custom_styles_default
|
|
3
|
+
} from "./chunk.IFBY43YE.js";
|
|
1
4
|
import {
|
|
2
5
|
component_styles_default
|
|
3
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.O7USYXBT.js";
|
|
4
7
|
|
|
5
8
|
// src/components/button/button.styles.ts
|
|
6
9
|
import { css } from "lit";
|
|
@@ -81,119 +84,25 @@ var button_styles_default = css`
|
|
|
81
84
|
* Standard buttons
|
|
82
85
|
*/
|
|
83
86
|
|
|
84
|
-
/* Default */
|
|
85
|
-
.button--standard.button--default {
|
|
86
|
-
background-color: var(--syn-color-neutral-0);
|
|
87
|
-
border-color: var(--syn-color-neutral-300);
|
|
88
|
-
color: var(--syn-color-neutral-700);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.button--standard.button--default:hover:not(.button--disabled) {
|
|
92
|
-
background-color: var(--syn-color-primary-50);
|
|
93
|
-
border-color: var(--syn-color-primary-300);
|
|
94
|
-
color: var(--syn-color-primary-700);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.button--standard.button--default:active:not(.button--disabled) {
|
|
98
|
-
background-color: var(--syn-color-primary-100);
|
|
99
|
-
border-color: var(--syn-color-primary-400);
|
|
100
|
-
color: var(--syn-color-primary-700);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
87
|
/* Primary */
|
|
104
|
-
.button--
|
|
88
|
+
.button--filled.button--primary {
|
|
105
89
|
background-color: var(--syn-color-primary-600);
|
|
106
90
|
border-color: var(--syn-color-primary-600);
|
|
107
91
|
color: var(--syn-color-neutral-0);
|
|
108
92
|
}
|
|
109
93
|
|
|
110
|
-
.button--
|
|
94
|
+
.button--filled.button--primary:hover:not(.button--disabled) {
|
|
111
95
|
background-color: var(--syn-color-primary-500);
|
|
112
96
|
border-color: var(--syn-color-primary-500);
|
|
113
97
|
color: var(--syn-color-neutral-0);
|
|
114
98
|
}
|
|
115
99
|
|
|
116
|
-
.button--
|
|
100
|
+
.button--filled.button--primary:active:not(.button--disabled) {
|
|
117
101
|
background-color: var(--syn-color-primary-600);
|
|
118
102
|
border-color: var(--syn-color-primary-600);
|
|
119
103
|
color: var(--syn-color-neutral-0);
|
|
120
104
|
}
|
|
121
105
|
|
|
122
|
-
/* Success */
|
|
123
|
-
.button--standard.button--success {
|
|
124
|
-
background-color: var(--syn-color-success-600);
|
|
125
|
-
border-color: var(--syn-color-success-600);
|
|
126
|
-
color: var(--syn-color-neutral-0);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.button--standard.button--success:hover:not(.button--disabled) {
|
|
130
|
-
background-color: var(--syn-color-success-500);
|
|
131
|
-
border-color: var(--syn-color-success-500);
|
|
132
|
-
color: var(--syn-color-neutral-0);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.button--standard.button--success:active:not(.button--disabled) {
|
|
136
|
-
background-color: var(--syn-color-success-600);
|
|
137
|
-
border-color: var(--syn-color-success-600);
|
|
138
|
-
color: var(--syn-color-neutral-0);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/* Neutral */
|
|
142
|
-
.button--standard.button--neutral {
|
|
143
|
-
background-color: var(--syn-color-neutral-600);
|
|
144
|
-
border-color: var(--syn-color-neutral-600);
|
|
145
|
-
color: var(--syn-color-neutral-0);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.button--standard.button--neutral:hover:not(.button--disabled) {
|
|
149
|
-
background-color: var(--syn-color-neutral-500);
|
|
150
|
-
border-color: var(--syn-color-neutral-500);
|
|
151
|
-
color: var(--syn-color-neutral-0);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.button--standard.button--neutral:active:not(.button--disabled) {
|
|
155
|
-
background-color: var(--syn-color-neutral-600);
|
|
156
|
-
border-color: var(--syn-color-neutral-600);
|
|
157
|
-
color: var(--syn-color-neutral-0);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/* Warning */
|
|
161
|
-
.button--standard.button--warning {
|
|
162
|
-
background-color: var(--syn-color-warning-600);
|
|
163
|
-
border-color: var(--syn-color-warning-600);
|
|
164
|
-
color: var(--syn-color-neutral-0);
|
|
165
|
-
}
|
|
166
|
-
.button--standard.button--warning:hover:not(.button--disabled) {
|
|
167
|
-
background-color: var(--syn-color-warning-500);
|
|
168
|
-
border-color: var(--syn-color-warning-500);
|
|
169
|
-
color: var(--syn-color-neutral-0);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.button--standard.button--warning:active:not(.button--disabled) {
|
|
173
|
-
background-color: var(--syn-color-warning-600);
|
|
174
|
-
border-color: var(--syn-color-warning-600);
|
|
175
|
-
color: var(--syn-color-neutral-0);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/* Danger */
|
|
179
|
-
.button--standard.button--danger {
|
|
180
|
-
background-color: var(--syn-color-danger-600);
|
|
181
|
-
border-color: var(--syn-color-danger-600);
|
|
182
|
-
color: var(--syn-color-neutral-0);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.button--standard.button--danger:hover:not(.button--disabled) {
|
|
186
|
-
background-color: var(--syn-color-danger-500);
|
|
187
|
-
border-color: var(--syn-color-danger-500);
|
|
188
|
-
color: var(--syn-color-neutral-0);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.button--standard.button--danger:active:not(.button--disabled) {
|
|
192
|
-
background-color: var(--syn-color-danger-600);
|
|
193
|
-
border-color: var(--syn-color-danger-600);
|
|
194
|
-
color: var(--syn-color-neutral-0);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
106
|
/*
|
|
198
107
|
* Outline buttons
|
|
199
108
|
*/
|
|
@@ -203,25 +112,6 @@ var button_styles_default = css`
|
|
|
203
112
|
border: solid 1px;
|
|
204
113
|
}
|
|
205
114
|
|
|
206
|
-
/* Default */
|
|
207
|
-
.button--outline.button--default {
|
|
208
|
-
border-color: var(--syn-color-neutral-300);
|
|
209
|
-
color: var(--syn-color-neutral-700);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.button--outline.button--default:hover:not(.button--disabled),
|
|
213
|
-
.button--outline.button--default.button--checked:not(.button--disabled) {
|
|
214
|
-
border-color: var(--syn-color-primary-600);
|
|
215
|
-
background-color: var(--syn-color-primary-600);
|
|
216
|
-
color: var(--syn-color-neutral-0);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.button--outline.button--default:active:not(.button--disabled) {
|
|
220
|
-
border-color: var(--syn-color-primary-700);
|
|
221
|
-
background-color: var(--syn-color-primary-700);
|
|
222
|
-
color: var(--syn-color-neutral-0);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
115
|
/* Primary */
|
|
226
116
|
.button--outline.button--primary {
|
|
227
117
|
border-color: var(--syn-color-primary-600);
|
|
@@ -240,84 +130,6 @@ var button_styles_default = css`
|
|
|
240
130
|
color: var(--syn-color-neutral-0);
|
|
241
131
|
}
|
|
242
132
|
|
|
243
|
-
/* Success */
|
|
244
|
-
.button--outline.button--success {
|
|
245
|
-
border-color: var(--syn-color-success-600);
|
|
246
|
-
color: var(--syn-color-success-600);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.button--outline.button--success:hover:not(.button--disabled),
|
|
250
|
-
.button--outline.button--success.button--checked:not(.button--disabled) {
|
|
251
|
-
background-color: var(--syn-color-success-600);
|
|
252
|
-
color: var(--syn-color-neutral-0);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.button--outline.button--success:active:not(.button--disabled) {
|
|
256
|
-
border-color: var(--syn-color-success-700);
|
|
257
|
-
background-color: var(--syn-color-success-700);
|
|
258
|
-
color: var(--syn-color-neutral-0);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/* Neutral */
|
|
262
|
-
.button--outline.button--neutral {
|
|
263
|
-
border-color: var(--syn-color-neutral-600);
|
|
264
|
-
color: var(--syn-color-neutral-600);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.button--outline.button--neutral:hover:not(.button--disabled),
|
|
268
|
-
.button--outline.button--neutral.button--checked:not(.button--disabled) {
|
|
269
|
-
background-color: var(--syn-color-neutral-600);
|
|
270
|
-
color: var(--syn-color-neutral-0);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.button--outline.button--neutral:active:not(.button--disabled) {
|
|
274
|
-
border-color: var(--syn-color-neutral-700);
|
|
275
|
-
background-color: var(--syn-color-neutral-700);
|
|
276
|
-
color: var(--syn-color-neutral-0);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/* Warning */
|
|
280
|
-
.button--outline.button--warning {
|
|
281
|
-
border-color: var(--syn-color-warning-600);
|
|
282
|
-
color: var(--syn-color-warning-600);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.button--outline.button--warning:hover:not(.button--disabled),
|
|
286
|
-
.button--outline.button--warning.button--checked:not(.button--disabled) {
|
|
287
|
-
background-color: var(--syn-color-warning-600);
|
|
288
|
-
color: var(--syn-color-neutral-0);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.button--outline.button--warning:active:not(.button--disabled) {
|
|
292
|
-
border-color: var(--syn-color-warning-700);
|
|
293
|
-
background-color: var(--syn-color-warning-700);
|
|
294
|
-
color: var(--syn-color-neutral-0);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/* Danger */
|
|
298
|
-
.button--outline.button--danger {
|
|
299
|
-
border-color: var(--syn-color-danger-600);
|
|
300
|
-
color: var(--syn-color-danger-600);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.button--outline.button--danger:hover:not(.button--disabled),
|
|
304
|
-
.button--outline.button--danger.button--checked:not(.button--disabled) {
|
|
305
|
-
background-color: var(--syn-color-danger-600);
|
|
306
|
-
color: var(--syn-color-neutral-0);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.button--outline.button--danger:active:not(.button--disabled) {
|
|
310
|
-
border-color: var(--syn-color-danger-700);
|
|
311
|
-
background-color: var(--syn-color-danger-700);
|
|
312
|
-
color: var(--syn-color-neutral-0);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
@media (forced-colors: active) {
|
|
316
|
-
.button.button--outline.button--checked:not(.button--disabled) {
|
|
317
|
-
outline: solid 2px transparent;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
133
|
/*
|
|
322
134
|
* Text buttons
|
|
323
135
|
*/
|
|
@@ -374,52 +186,6 @@ var button_styles_default = css`
|
|
|
374
186
|
border-radius: var(--syn-input-border-radius-large);
|
|
375
187
|
}
|
|
376
188
|
|
|
377
|
-
/*
|
|
378
|
-
* Pill modifier
|
|
379
|
-
*/
|
|
380
|
-
|
|
381
|
-
.button--pill.button--small {
|
|
382
|
-
border-radius: var(--syn-input-height-small);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.button--pill.button--medium {
|
|
386
|
-
border-radius: var(--syn-input-height-medium);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.button--pill.button--large {
|
|
390
|
-
border-radius: var(--syn-input-height-large);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/*
|
|
394
|
-
* Circle modifier
|
|
395
|
-
*/
|
|
396
|
-
|
|
397
|
-
.button--circle {
|
|
398
|
-
padding-left: 0;
|
|
399
|
-
padding-right: 0;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.button--circle.button--small {
|
|
403
|
-
width: var(--syn-input-height-small);
|
|
404
|
-
border-radius: 50%;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.button--circle.button--medium {
|
|
408
|
-
width: var(--syn-input-height-medium);
|
|
409
|
-
border-radius: 50%;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.button--circle.button--large {
|
|
413
|
-
width: var(--syn-input-height-large);
|
|
414
|
-
border-radius: 50%;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.button--circle .button__prefix,
|
|
418
|
-
.button--circle .button__suffix,
|
|
419
|
-
.button--circle .button__caret {
|
|
420
|
-
display: none;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
189
|
/*
|
|
424
190
|
* Caret modifier
|
|
425
191
|
*/
|
|
@@ -577,7 +343,7 @@ var button_styles_default = css`
|
|
|
577
343
|
.syn-button-group__button:not(
|
|
578
344
|
.syn-button-group__button--first,
|
|
579
345
|
.syn-button-group__button--radio,
|
|
580
|
-
[variant='
|
|
346
|
+
[variant='filled']
|
|
581
347
|
):not(:hover)
|
|
582
348
|
)
|
|
583
349
|
.button:after {
|
|
@@ -600,8 +366,11 @@ var button_styles_default = css`
|
|
|
600
366
|
:host(.syn-button-group__button[checked]) {
|
|
601
367
|
z-index: 2;
|
|
602
368
|
}
|
|
369
|
+
|
|
370
|
+
${button_custom_styles_default}
|
|
603
371
|
`;
|
|
604
372
|
|
|
605
373
|
export {
|
|
606
374
|
button_styles_default
|
|
607
375
|
};
|
|
376
|
+
//# sourceMappingURL=chunk.GHPQ7ZMD.js.map
|