@limetech/lime-elements 40.1.1 → 40.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/CHANGELOG.md +7 -0
- package/dist/cjs/limel-button-group.cjs.entry.js +17 -6
- package/dist/collection/components/button-group/button-group.css +13 -15
- package/dist/collection/components/button-group/button-group.js +18 -6
- package/dist/esm/limel-button-group.entry.js +17 -6
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-0c47d262.entry.js +1 -0
- package/dist/types/components/button/button.types.d.ts +10 -0
- package/dist/types/components/button-group/button-group.d.ts +5 -1
- package/dist/types/components.d.ts +6 -2
- package/package.json +1 -1
- package/dist/lime-elements/p-92bbb643.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [40.2.0](https://github.com/Lundalogik/lime-elements/compare/v40.1.1...v40.2.0) (2026-09-07)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **button-group:** support disabling individual buttons ([3fa1726](https://github.com/Lundalogik/lime-elements/commit/3fa1726c6ea8613ad53732d6fdc4ab1d786711d6))
|
|
7
|
+
|
|
1
8
|
## [40.1.1](https://github.com/Lundalogik/lime-elements/compare/v40.1.0...v40.1.1) (2026-09-07)
|
|
2
9
|
|
|
3
10
|
### Bug Fixes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-DYg_7kkT.js');
|
|
4
4
|
var randomString = require('./random-string-BTzDB2ee.js');
|
|
5
5
|
|
|
6
|
-
const buttonGroupCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}:
|
|
6
|
+
const buttonGroupCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}.button{color:var(--limel-theme-on-surface-color)}.button:not(:has(:disabled)){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):focus,.button:not(:has(:disabled)):focus-visible{will-change:color, background-color, box-shadow, transform}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button:not(:has(:disabled)):hover{box-shadow:var(--button-shadow-hovered)}.button:not(:has(:disabled)):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button{position:relative;display:inline-grid;grid-auto-flow:column;align-items:center;max-width:100%;min-width:2rem;height:2rem;padding:0 0.0625rem;margin:0.125rem;border-radius:1rem;font-size:var(--limel-theme-default-font-size);user-select:none}.button:not(:last-child):after{content:"";display:block;height:1rem;width:0.125rem;border-radius:0.25rem;background-color:var(--button-group-text-color, rgb(var(--contrast-1200)));opacity:0.1;position:absolute;right:-0.1875rem;top:0;bottom:0;margin:auto}.button label{cursor:pointer;transition:color 0.2s ease;display:flex;align-items:center;flex:1;height:100%;min-width:0}.button label:has(>limel-badge) .button__label{padding-right:0.25rem}.button:has(:disabled) label{cursor:not-allowed;opacity:0.4}.button input[type=radio]{position:absolute;width:0;opacity:0}.button input[type=radio]:focus-visible+label:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:3.75rem;box-shadow:var(--shadow-depth-8-focused)}.button:focus-within{outline:none;color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button:only-child .button__label{padding-left:0.75rem}.button:first-child .button__label{padding-left:0.75rem}.button.button--selected{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset);color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button.button--selected:not(:has(:disabled)):active{box-shadow:var(--button-shadow-inset-pressed)}.button__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-small-font-size);padding:0 0.75rem}.button__icon{border-radius:50%;vertical-align:middle}limel-badge{margin-right:0.25rem;pointer-events:none}.button:not(.button--selected){--badge-background-color:rgb(var(--contrast-200))}`;
|
|
7
7
|
|
|
8
8
|
const ButtonGroup = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -14,7 +14,10 @@ const ButtonGroup = class {
|
|
|
14
14
|
*/
|
|
15
15
|
this.value = [];
|
|
16
16
|
/**
|
|
17
|
-
* True if the button-group should be disabled
|
|
17
|
+
* True if the button-group should be disabled.
|
|
18
|
+
*
|
|
19
|
+
* Disables every button in the group, regardless of the `disabled` value
|
|
20
|
+
* of each individual button.
|
|
18
21
|
*/
|
|
19
22
|
this.disabled = false;
|
|
20
23
|
this.radioGroupName = randomString.createRandomString();
|
|
@@ -32,17 +35,18 @@ const ButtonGroup = class {
|
|
|
32
35
|
this.setSelectedButton();
|
|
33
36
|
}
|
|
34
37
|
render() {
|
|
35
|
-
return (index.h(index.Host, { key: '
|
|
38
|
+
return (index.h(index.Host, { key: '7823fd4593ee4eddb6d56ce55e7ff5eb1cc28397', role: "radiogroup" }, this.value.map(this.renderButton)));
|
|
36
39
|
}
|
|
37
40
|
renderButton(button) {
|
|
38
41
|
// Prefix with 'b' because html IDs cannot start with a digit,
|
|
39
42
|
// and we need to differentiate from the ID on the limel-icon. /Ads
|
|
40
43
|
const buttonId = `b${button.id}`;
|
|
44
|
+
const isDisabled = this.disabled || button.disabled;
|
|
41
45
|
const classes = {
|
|
42
46
|
button: true,
|
|
43
47
|
'button--selected': this.isButtonChecked(button),
|
|
44
48
|
};
|
|
45
|
-
return (index.h("div", { class: classes }, index.h("input", { type: "radio", name: this.radioGroupName, checked: this.isButtonChecked(button), disabled:
|
|
49
|
+
return (index.h("div", { class: classes }, index.h("input", { type: "radio", name: this.radioGroupName, checked: this.isButtonChecked(button), disabled: isDisabled, "aria-disabled": isDisabled ? 'true' : 'false', id: buttonId, onChange: this.onChange }), index.h("label", { htmlFor: buttonId }, this.renderContent(button), this.renderBadge(button))));
|
|
46
50
|
}
|
|
47
51
|
renderContent(button) {
|
|
48
52
|
if (button.icon) {
|
|
@@ -75,10 +79,17 @@ const ButtonGroup = class {
|
|
|
75
79
|
event.stopPropagation();
|
|
76
80
|
const target = event.target;
|
|
77
81
|
// The ID is prefixed with `b` in the HTML, remember? /Ads
|
|
78
|
-
|
|
82
|
+
const buttonId = target.id.slice(1);
|
|
79
83
|
const button = this.value.find((item) => {
|
|
80
|
-
return item.id ===
|
|
84
|
+
return item.id === buttonId;
|
|
81
85
|
});
|
|
86
|
+
// The `disabled` attribute on the input already stops the browser
|
|
87
|
+
// from getting here. This makes it hold even if the attribute is
|
|
88
|
+
// removed from the DOM, or a `change` event is dispatched by hand.
|
|
89
|
+
if (!button || this.disabled || button.disabled) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.selectedButtonId = buttonId;
|
|
82
93
|
this.change.emit(button);
|
|
83
94
|
}
|
|
84
95
|
valueChanged() {
|
|
@@ -123,29 +123,27 @@
|
|
|
123
123
|
flex-wrap: nowrap;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
:host([disabled]:not([disabled=false])) {
|
|
127
|
-
cursor: not-allowed;
|
|
128
|
-
opacity: 0.4;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
126
|
.button {
|
|
127
|
+
color: var(--limel-theme-on-surface-color);
|
|
128
|
+
}
|
|
129
|
+
.button:not(:has(:disabled)) {
|
|
132
130
|
transition: color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);
|
|
133
131
|
cursor: pointer;
|
|
134
132
|
color: var(--limel-theme-on-surface-color);
|
|
135
133
|
background-color: transparent;
|
|
136
134
|
}
|
|
137
|
-
.button:hover, .button:focus, .button:focus-visible {
|
|
135
|
+
.button:not(:has(:disabled)):hover, .button:not(:has(:disabled)):focus, .button:not(:has(:disabled)):focus-visible {
|
|
138
136
|
will-change: color, background-color, box-shadow, transform;
|
|
139
137
|
}
|
|
140
|
-
.button:hover, .button:focus-visible {
|
|
138
|
+
.button:not(:has(:disabled)):hover, .button:not(:has(:disabled)):focus-visible {
|
|
141
139
|
transform: translate3d(0, -0.04rem, 0);
|
|
142
140
|
color: var(--limel-theme-on-surface-color);
|
|
143
141
|
background-color: var(--lime-elevated-surface-background-color);
|
|
144
142
|
}
|
|
145
|
-
.button:hover {
|
|
143
|
+
.button:not(:has(:disabled)):hover {
|
|
146
144
|
box-shadow: var(--button-shadow-hovered);
|
|
147
145
|
}
|
|
148
|
-
.button:active {
|
|
146
|
+
.button:not(:has(:disabled)):active {
|
|
149
147
|
--limel-clickable-transform-timing-function: cubic-bezier(
|
|
150
148
|
0.83,
|
|
151
149
|
-0.15,
|
|
@@ -156,14 +154,10 @@
|
|
|
156
154
|
background-color: var(--limel-theme-surface-background-color);
|
|
157
155
|
box-shadow: var(--button-shadow-inset-pressed);
|
|
158
156
|
}
|
|
159
|
-
.button:hover, .button:active {
|
|
157
|
+
.button:not(:has(:disabled)):hover, .button:not(:has(:disabled)):active {
|
|
160
158
|
--limel-clickable-transition-speed: 0.2s;
|
|
161
159
|
--limel-clickable-transform-speed: 0.16s;
|
|
162
160
|
}
|
|
163
|
-
.button:has(input[disabled]):hover {
|
|
164
|
-
box-shadow: none;
|
|
165
|
-
transform: none;
|
|
166
|
-
}
|
|
167
161
|
.button {
|
|
168
162
|
position: relative;
|
|
169
163
|
display: inline-grid;
|
|
@@ -204,6 +198,10 @@
|
|
|
204
198
|
.button label:has(> limel-badge) .button__label {
|
|
205
199
|
padding-right: 0.25rem;
|
|
206
200
|
}
|
|
201
|
+
.button:has(:disabled) label {
|
|
202
|
+
cursor: not-allowed;
|
|
203
|
+
opacity: 0.4;
|
|
204
|
+
}
|
|
207
205
|
.button input[type=radio] {
|
|
208
206
|
position: absolute;
|
|
209
207
|
width: 0;
|
|
@@ -235,7 +233,7 @@
|
|
|
235
233
|
box-shadow: var(--button-shadow-inset);
|
|
236
234
|
color: var(--lime-primary-color, var(--limel-theme-primary-color));
|
|
237
235
|
}
|
|
238
|
-
.button.button--selected:active {
|
|
236
|
+
.button.button--selected:not(:has(:disabled)):active {
|
|
239
237
|
box-shadow: var(--button-shadow-inset-pressed);
|
|
240
238
|
}
|
|
241
239
|
|
|
@@ -34,6 +34,7 @@ import { createRandomString } from "../../util/random-string";
|
|
|
34
34
|
* @exampleComponent limel-example-button-group-basic
|
|
35
35
|
* @exampleComponent limel-example-button-group-mix
|
|
36
36
|
* @exampleComponent limel-example-button-group-badges
|
|
37
|
+
* @exampleComponent limel-example-button-group-disabled-item
|
|
37
38
|
* @exampleComponent limel-example-button-group-composite
|
|
38
39
|
*/
|
|
39
40
|
export class ButtonGroup {
|
|
@@ -43,7 +44,10 @@ export class ButtonGroup {
|
|
|
43
44
|
*/
|
|
44
45
|
this.value = [];
|
|
45
46
|
/**
|
|
46
|
-
* True if the button-group should be disabled
|
|
47
|
+
* True if the button-group should be disabled.
|
|
48
|
+
*
|
|
49
|
+
* Disables every button in the group, regardless of the `disabled` value
|
|
50
|
+
* of each individual button.
|
|
47
51
|
*/
|
|
48
52
|
this.disabled = false;
|
|
49
53
|
this.radioGroupName = createRandomString();
|
|
@@ -61,17 +65,18 @@ export class ButtonGroup {
|
|
|
61
65
|
this.setSelectedButton();
|
|
62
66
|
}
|
|
63
67
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '7823fd4593ee4eddb6d56ce55e7ff5eb1cc28397', role: "radiogroup" }, this.value.map(this.renderButton)));
|
|
65
69
|
}
|
|
66
70
|
renderButton(button) {
|
|
67
71
|
// Prefix with 'b' because html IDs cannot start with a digit,
|
|
68
72
|
// and we need to differentiate from the ID on the limel-icon. /Ads
|
|
69
73
|
const buttonId = `b${button.id}`;
|
|
74
|
+
const isDisabled = this.disabled || button.disabled;
|
|
70
75
|
const classes = {
|
|
71
76
|
button: true,
|
|
72
77
|
'button--selected': this.isButtonChecked(button),
|
|
73
78
|
};
|
|
74
|
-
return (h("div", { class: classes }, h("input", { type: "radio", name: this.radioGroupName, checked: this.isButtonChecked(button), disabled:
|
|
79
|
+
return (h("div", { class: classes }, h("input", { type: "radio", name: this.radioGroupName, checked: this.isButtonChecked(button), disabled: isDisabled, "aria-disabled": isDisabled ? 'true' : 'false', id: buttonId, onChange: this.onChange }), h("label", { htmlFor: buttonId }, this.renderContent(button), this.renderBadge(button))));
|
|
75
80
|
}
|
|
76
81
|
renderContent(button) {
|
|
77
82
|
if (button.icon) {
|
|
@@ -104,10 +109,17 @@ export class ButtonGroup {
|
|
|
104
109
|
event.stopPropagation();
|
|
105
110
|
const target = event.target;
|
|
106
111
|
// The ID is prefixed with `b` in the HTML, remember? /Ads
|
|
107
|
-
|
|
112
|
+
const buttonId = target.id.slice(1);
|
|
108
113
|
const button = this.value.find((item) => {
|
|
109
|
-
return item.id ===
|
|
114
|
+
return item.id === buttonId;
|
|
110
115
|
});
|
|
116
|
+
// The `disabled` attribute on the input already stops the browser
|
|
117
|
+
// from getting here. This makes it hold even if the attribute is
|
|
118
|
+
// removed from the DOM, or a `change` event is dispatched by hand.
|
|
119
|
+
if (!button || this.disabled || button.disabled) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.selectedButtonId = buttonId;
|
|
111
123
|
this.change.emit(button);
|
|
112
124
|
}
|
|
113
125
|
valueChanged() {
|
|
@@ -164,7 +176,7 @@ export class ButtonGroup {
|
|
|
164
176
|
"optional": false,
|
|
165
177
|
"docs": {
|
|
166
178
|
"tags": [],
|
|
167
|
-
"text": "True if the button-group should be disabled"
|
|
179
|
+
"text": "True if the button-group should be disabled.\n\nDisables every button in the group, regardless of the `disabled` value\nof each individual button."
|
|
168
180
|
},
|
|
169
181
|
"getter": false,
|
|
170
182
|
"setter": false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-BGxJfR2f.js';
|
|
2
2
|
import { c as createRandomString } from './random-string-JbKhhoXs.js';
|
|
3
3
|
|
|
4
|
-
const buttonGroupCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}:
|
|
4
|
+
const buttonGroupCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}.button{color:var(--limel-theme-on-surface-color)}.button:not(:has(:disabled)){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):focus,.button:not(:has(:disabled)):focus-visible{will-change:color, background-color, box-shadow, transform}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button:not(:has(:disabled)):hover{box-shadow:var(--button-shadow-hovered)}.button:not(:has(:disabled)):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button{position:relative;display:inline-grid;grid-auto-flow:column;align-items:center;max-width:100%;min-width:2rem;height:2rem;padding:0 0.0625rem;margin:0.125rem;border-radius:1rem;font-size:var(--limel-theme-default-font-size);user-select:none}.button:not(:last-child):after{content:"";display:block;height:1rem;width:0.125rem;border-radius:0.25rem;background-color:var(--button-group-text-color, rgb(var(--contrast-1200)));opacity:0.1;position:absolute;right:-0.1875rem;top:0;bottom:0;margin:auto}.button label{cursor:pointer;transition:color 0.2s ease;display:flex;align-items:center;flex:1;height:100%;min-width:0}.button label:has(>limel-badge) .button__label{padding-right:0.25rem}.button:has(:disabled) label{cursor:not-allowed;opacity:0.4}.button input[type=radio]{position:absolute;width:0;opacity:0}.button input[type=radio]:focus-visible+label:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:3.75rem;box-shadow:var(--shadow-depth-8-focused)}.button:focus-within{outline:none;color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button:only-child .button__label{padding-left:0.75rem}.button:first-child .button__label{padding-left:0.75rem}.button.button--selected{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset);color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button.button--selected:not(:has(:disabled)):active{box-shadow:var(--button-shadow-inset-pressed)}.button__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-small-font-size);padding:0 0.75rem}.button__icon{border-radius:50%;vertical-align:middle}limel-badge{margin-right:0.25rem;pointer-events:none}.button:not(.button--selected){--badge-background-color:rgb(var(--contrast-200))}`;
|
|
5
5
|
|
|
6
6
|
const ButtonGroup = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -12,7 +12,10 @@ const ButtonGroup = class {
|
|
|
12
12
|
*/
|
|
13
13
|
this.value = [];
|
|
14
14
|
/**
|
|
15
|
-
* True if the button-group should be disabled
|
|
15
|
+
* True if the button-group should be disabled.
|
|
16
|
+
*
|
|
17
|
+
* Disables every button in the group, regardless of the `disabled` value
|
|
18
|
+
* of each individual button.
|
|
16
19
|
*/
|
|
17
20
|
this.disabled = false;
|
|
18
21
|
this.radioGroupName = createRandomString();
|
|
@@ -30,17 +33,18 @@ const ButtonGroup = class {
|
|
|
30
33
|
this.setSelectedButton();
|
|
31
34
|
}
|
|
32
35
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '7823fd4593ee4eddb6d56ce55e7ff5eb1cc28397', role: "radiogroup" }, this.value.map(this.renderButton)));
|
|
34
37
|
}
|
|
35
38
|
renderButton(button) {
|
|
36
39
|
// Prefix with 'b' because html IDs cannot start with a digit,
|
|
37
40
|
// and we need to differentiate from the ID on the limel-icon. /Ads
|
|
38
41
|
const buttonId = `b${button.id}`;
|
|
42
|
+
const isDisabled = this.disabled || button.disabled;
|
|
39
43
|
const classes = {
|
|
40
44
|
button: true,
|
|
41
45
|
'button--selected': this.isButtonChecked(button),
|
|
42
46
|
};
|
|
43
|
-
return (h("div", { class: classes }, h("input", { type: "radio", name: this.radioGroupName, checked: this.isButtonChecked(button), disabled:
|
|
47
|
+
return (h("div", { class: classes }, h("input", { type: "radio", name: this.radioGroupName, checked: this.isButtonChecked(button), disabled: isDisabled, "aria-disabled": isDisabled ? 'true' : 'false', id: buttonId, onChange: this.onChange }), h("label", { htmlFor: buttonId }, this.renderContent(button), this.renderBadge(button))));
|
|
44
48
|
}
|
|
45
49
|
renderContent(button) {
|
|
46
50
|
if (button.icon) {
|
|
@@ -73,10 +77,17 @@ const ButtonGroup = class {
|
|
|
73
77
|
event.stopPropagation();
|
|
74
78
|
const target = event.target;
|
|
75
79
|
// The ID is prefixed with `b` in the HTML, remember? /Ads
|
|
76
|
-
|
|
80
|
+
const buttonId = target.id.slice(1);
|
|
77
81
|
const button = this.value.find((item) => {
|
|
78
|
-
return item.id ===
|
|
82
|
+
return item.id === buttonId;
|
|
79
83
|
});
|
|
84
|
+
// The `disabled` attribute on the input already stops the browser
|
|
85
|
+
// from getting here. This makes it hold even if the attribute is
|
|
86
|
+
// removed from the DOM, or a `change` event is dispatched by hand.
|
|
87
|
+
if (!button || this.disabled || button.disabled) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.selectedButtonId = buttonId;
|
|
80
91
|
this.change.emit(button);
|
|
81
92
|
}
|
|
82
93
|
valueChanged() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,g as l,b as a}from"./p-BGxJfR2f.js";export{s as setNonce}from"./p-BGxJfR2f.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await l(),a(JSON.parse('[["p-d19ab443",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516],"svgClass":[513,"svg-class"]},null,{"name":[{"loadIcon":0}],"svgClass":[{"applySvgClass":0}]}]]],["p-26fed26a",[[17,"limel-text-editor",{"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"value":[513],"customElements":[16],"inlineImages":[16],"triggers":[16],"required":[516],"allowResize":[516,"allow-resize"],"ui":[513],"flushPendingChanges":[64],"clear":[64]}]]],["p-3e316685",[[1,"limel-file-viewer",{"url":[513],"filename":[513],"alt":[513],"allowFullscreen":[516,"allow-fullscreen"],"allowOpenInNewTab":[516,"allow-open-in-new-tab"],"allowDownload":[516,"allow-download"],"language":[1],"officeViewer":[513,"office-viewer"],"actions":[16],"isFullscreen":[32],"fileType":[32],"loading":[32],"fileUrl":[32],"email":[32]},null,{"url":[{"watchUrl":0}]}]]],["p-7df111bb",[[257,"limel-card",{"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"actions":[16],"clickable":[516],"orientation":[513],"selected":[516],"show3dEffect":[516,"show-3d-effect"],"canScrollUp":[32],"canScrollDown":[32]}]]],["p-8cf79fa1",[[1,"limel-file",{"value":[16],"label":[513],"helperText":[513,"helper-text"],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"loading":[516],"accept":[513],"resizeImage":[16],"language":[1],"resizingFile":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-8c3798ee",[[1,"limel-code-diff",{"oldValue":[1,"old-value"],"newValue":[1,"new-value"],"oldHeading":[513,"old-heading"],"newHeading":[513,"new-heading"],"layout":[513],"contextLines":[514,"context-lines"],"lineWrapping":[516,"line-wrapping"],"language":[513],"reformatJson":[516,"reformat-json"],"translationLanguage":[513,"translation-language"],"diffResult":[32],"liveAnnouncement":[32],"copyState":[32],"searchVisible":[32],"searchTerm":[32],"currentMatchIndex":[32]},null,{"oldValue":[{"watchInputs":0}],"newValue":[{"watchInputs":0}],"contextLines":[{"watchInputs":0}],"reformatJson":[{"watchInputs":0}],"layout":[{"watchInputs":0}]}]]],["p-8b3b7505",[[0,"limel-list-item",{"language":[513],"value":[8],"text":[513],"secondaryText":[513,"secondary-text"],"disabled":[516],"icon":[1],"iconSize":[513,"icon-size"],"badgeIcon":[516,"badge-icon"],"selected":[516],"actions":[16],"primaryComponent":[16],"image":[16],"type":[513]}]]],["p-f2294e26",[[17,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"language":[1],"required":[4],"invalid":[516],"value":[16],"searcher":[16],"allItems":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]},null,{"disabled":[{"onDisabledChange":0}],"value":[{"onChangeValue":0}]}]]],["p-8175c53a",[[17,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"items":[16]}]]],["p-191efd88",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"placeholder":[513],"manualInput":[516,"manual-input"],"palette":[16],"paletteColumnCount":[514,"palette-column-count"],"isOpen":[32]}]]],["p-cafebc7d",[[1,"limel-profile-picture",{"language":[513],"label":[513],"icon":[1],"helperText":[1,"helper-text"],"disabled":[516],"readonly":[516],"required":[516],"invalid":[516],"loading":[516],"value":[1],"imageFit":[513,"image-fit"],"accept":[513],"resize":[16],"objectUrl":[32],"imageError":[32],"isErrorMessagePopoverOpen":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-aee66710",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["p-b04c6602",[[1,"limel-snackbar",{"open":[516],"message":[1],"timeout":[514],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"offset":[32],"isOpen":[32],"closing":[32],"show":[64]},[[0,"changeOffset","onChangeIndex"]],{"open":[{"watchOpen":0}]}]]],["p-ed53466d",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"internalFormat":[32],"showPortal":[32]}]]],["p-92bbb643",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]},null,{"value":[{"valueChanged":0}]}]]],["p-73d9f0f6",[[1,"limel-chart",{"language":[513],"accessibleLabel":[513,"accessible-label"],"accessibleItemsLabel":[513,"accessible-items-label"],"accessibleValuesLabel":[513,"accessible-values-label"],"displayAxisLabels":[516,"display-axis-labels"],"displayItemText":[516,"display-item-text"],"displayItemValue":[516,"display-item-value"],"displayItemPercentage":[516,"display-item-percentage"],"items":[16],"type":[513],"orientation":[513],"maxValue":[514,"max-value"],"axisIncrement":[514,"axis-increment"],"loading":[516]},null,{"items":[{"handleChange":0}],"axisIncrement":[{"handleChange":0}],"maxValue":[{"handleChange":0}],"type":[{"handleChange":0}]}]]],["p-9152d7e1",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]},null,{"value":[{"resetHasChanged":0}],"options":[{"resetHasChanged":0},{"updateHasPrimaryComponent":0},{"resetTypeaheadOnItemsChange":0}],"required":[{"resetTypeaheadOnItemsChange":0}],"menuOpen":[{"watchOpen":0}]}]]],["p-b6528083",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"required":[516],"invalid":[516],"displaysPercentageColors":[516,"displays-percentage-colors"],"unit":[513],"language":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32],"displayValue":[32],"isUnset":[32]},null,{"value":[{"watchValue":0}]}]]],["p-f2c8b10b",[[1,"limel-help",{"value":[1],"trigger":[1],"readMoreLink":[16],"openDirection":[513,"open-direction"],"isOpen":[32]}]]],["p-51cb779f",[[257,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"reducedPresence":[516,"reduced-presence"],"badge":[520],"loading":[516],"link":[16],"progress":[16],"hasPrimarySlot":[32]}]]],["p-5e432a44",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[513],"layout":[513],"pageSize":[514,"page-size"],"totalRows":[514,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[516,"movable-columns"],"movableRows":[516,"movable-rows"],"sortableColumns":[516,"sortable-columns"],"loading":[516],"page":[514],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[516],"selection":[16],"language":[513],"paginationLocation":[513,"pagination-location"]},null,{"totalRows":[{"totalRowsChanged":0}],"pageSize":[{"pageSizeChanged":0}],"page":[{"pageChanged":0}],"activeRow":[{"activeRowChanged":0}],"data":[{"updateData":0}],"columns":[{"updateColumns":0}],"aggregates":[{"updateAggregates":0}],"selection":[{"updateSelection":0}],"selectable":[{"updateSelectable":0}],"movableRows":[{"updateMovableRows":0}],"sortableColumns":[{"updateSortableColumns":0}],"sorting":[{"updateSorting":0}]}]]],["p-62a25deb",[[0,"limel-drag-handle",{"dragDirection":[513,"drag-direction"],"tooltipOpenDirection":[513,"tooltip-open-direction"],"language":[513]}]]],["p-ad4672b2",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["p-b3274e2e",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"invalid":[516],"value":[516],"helperText":[513,"helper-text"],"readonlyLabels":[16],"fieldId":[32]}]]],["p-946a33ea",[[257,"limel-tab-panel",{"tabs":[1040]},null,{"tabs":[{"tabsChanged":0}]}]]],["p-f53d8bda",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[516],"disabled":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"lineNumbers":[516,"line-numbers"],"lineWrapping":[516,"line-wrapping"],"fold":[516],"lint":[516],"colorScheme":[513,"color-scheme"],"translationLanguage":[513,"translation-language"],"showCopyButton":[516,"show-copy-button"],"random":[32],"wasCopied":[32]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"readonly":[{"watchReadonly":0}],"invalid":[{"watchInvalid":0}],"required":[{"watchRequired":0}],"helperText":[{"watchHelperText":0}]}]]],["p-c0263530",[[257,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]},null,{"open":[{"watchHandler":0}],"closingActions":[{"closingActionsChanged":0}]}]]],["p-120182f5",[[1,"limel-menu-item-meta",{"commandText":[513,"command-text"],"hotkey":[513],"disabled":[516],"badge":[8],"showChevron":[4,"show-chevron"]}]]],["p-eecd1132",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["p-fe531211",[[257,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["p-1b25f158",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16],"revealErrors":[4,"reveal-errors"]}]]],["p-2737cade",[[0,"limel-radio-button-group",{"items":[16],"selectedItem":[16],"disabled":[516],"badgeIcons":[516,"badge-icons"],"maxLinesSecondaryText":[514,"max-lines-secondary-text"]}]]],["p-e8783848",[[1,"limel-ai-avatar",{"isThinking":[516,"is-thinking"],"mode":[513],"variant":[513],"language":[513]},null,{"isThinking":[{"onIsThinkingChange":0}]}]]],["p-6acd82ce",[[1,"limel-config",{"config":[16]}]]],["p-bb9b399c",[[257,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["p-6665e14b",[[257,"limel-grid"]]],["p-21558be2",[[257,"limel-masonry-layout",{"ordered":[516],"containerHeight":[32]},null,{"ordered":[{"onOrderedChange":0}]}]]],["p-5dde5d72",[[257,"limel-email-viewer",{"email":[16],"fallbackUrl":[513,"fallback-url"],"language":[513],"allowRemoteImages":[4,"allow-remote-images"],"allowRemoteImagesState":[32]},null,{"email":[{"resetAllowRemoteImages":0}]}]]],["p-d3d71a68",[[17,"limel-prosemirror-adapter",{"contentType":[1,"content-type"],"value":[1],"language":[513],"disabled":[516],"customElements":[16],"inlineImages":[16],"triggerCharacters":[16],"ui":[1],"view":[32],"actionBarItems":[32],"link":[32],"isLinkMenuOpen":[32],"flushPendingChanges":[64],"clear":[64]},null,{"value":[{"watchValue":0}]}]]],["p-dd9591a3",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]},null,{"isOpen":[{"openWatcher":0}]}]]],["p-c8ce60a0",[[17,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"placeholder":[513],"required":[516],"invalid":[516],"manualInput":[516,"manual-input"],"columnCount":[514,"column-count"],"palette":[16]}]]],["p-cf955cc2",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"readonlyLabels":[16],"modified":[32]},null,{"checked":[{"handleCheckedChange":0}],"indeterminate":[{"handleIndeterminateChange":0}],"readonly":[{"handleReadonlyChange":0}]}]]],["p-eeb7fcb3",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]],{"tabs":[{"tabsChanged":0}]}]]],["p-a6500046",[[257,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["p-1907a5be",[[257,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"],"subheadingDivider":[1,"subheading-divider"]}]]],["p-de070191",[[1,"limel-help-content",{"value":[1],"readMoreLink":[16]}]]],["p-e3ba7e15",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4],"currentStep":[4,"current-step"]}]]],["p-70087de6",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["p-eeddce38",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["p-7fe6a073",[[0,"limel-radio-button",{"checked":[516],"disabled":[516],"id":[1],"label":[1],"onChange":[16]}]]],["p-056ba5c5",[[17,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"invalid":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"emptyInputOnChange":[516,"empty-input-on-change"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"autocomplete":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"selectedChipIds":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]},null,{"value":[{"handleChangeChips":0}]}]]],["p-7bfac292",[[17,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]},null,{"loading":[{"loadingWatcher":0}]}]]],["p-d521d599",[[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"hotkey":[513],"maxlength":[514],"openDirection":[513,"open-direction"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"hotkey":[513]}],[1,"limel-hotkey",{"value":[513],"disabled":[516]}],[257,"limel-portal",{"openDirection":[513,"open-direction"],"position":[513],"containerId":[513,"container-id"],"containerStyle":[16],"inheritParentWidth":[516,"inherit-parent-width"],"visible":[516],"anchor":[16]},null,{"visible":[{"onVisible":0}]}]]],["p-b4b43404",[[1,"limel-text-editor-link-menu",{"link":[16],"language":[513],"isOpen":[516,"is-open"]}]]],["p-dda63b8b",[[257,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"icon":[1],"invalid":[516],"actions":[16],"language":[513]}]]],["p-be5cc2ae",[[1,"limel-3d-hover-effect-glow"]]],["p-ea34a4bc",[[257,"limel-file-dropzone",{"accept":[513],"disabled":[4],"text":[1],"helperText":[1,"helper-text"],"hasFileToDrop":[32]}],[257,"limel-file-input",{"accept":[513],"disabled":[516],"multiple":[516]}]]],["p-a1c15727",[[1,"limel-dynamic-label",{"value":[8],"defaultLabel":[16],"labels":[16]}]]],["p-86b9f9d0",[[17,"limel-icon-button",{"icon":[1],"elevated":[516],"label":[513],"helperLabel":[513,"helper-label"],"disabled":[516]}]]],["p-a579e80f",[[1,"limel-markdown",{"value":[1],"whitelist":[16],"lazyLoadImages":[516,"lazy-load-images"],"removeEmptyParagraphs":[516,"remove-empty-paragraphs"],"adaptColorContrast":[516,"adapt-color-contrast"]},null,{"value":[{"textChanged":0}],"whitelist":[{"handleWhitelistChange":0}],"removeEmptyParagraphs":[{"handleRemoveEmptyParagraphsChange":0}],"adaptColorContrast":[{"handleAdaptColorContrastChange":0}]}]]],["p-2b01c1f2",[[257,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]},null,{"open":[{"watchOpen":0}]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["p-f09822a6",[[1,"limel-badge",{"label":[520]}]]],["p-0ecf8399",[[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]],["p-12fe8fe1",[[257,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"surfaceWidth":[513,"surface-width"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"loading":[516],"currentSubMenu":[1040],"rootItem":[16],"searcher":[16],"searchPlaceholder":[1,"search-placeholder"],"emptyResultMessage":[1,"empty-result-message"],"keepOpenOnSelect":[516,"keep-open-on-select"],"loadingSubItems":[32],"searchValue":[32],"searchResults":[32]},null,{"items":[{"itemsWatcher":0}],"open":[{"openWatcher":0}]}],[1,"limel-breadcrumbs",{"items":[16],"divider":[1]}],[17,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"]},null,{"items":[{"itemsChanged":0}]}],[17,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"locale":[513],"isFocused":[32],"wasInvalid":[32],"showCompletions":[32],"getSelectionStart":[64],"getSelectionEnd":[64],"getSelectionDirection":[64]},null,{"value":[{"valueWatcher":0}],"completions":[{"completionsWatcher":0}]}],[257,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}],[17,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]},null,{"type":[{"handleType":0}],"items":[{"itemsChanged":0}]}],[260,"limel-notched-outline",{"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"label":[513],"labelId":[513,"label-id"],"hasValue":[516,"has-value"],"hasLeadingIcon":[516,"has-leading-icon"],"hasFloatingLabel":[516,"has-floating-label"]}]]],["p-83bdbaf7",[[17,"limel-chip",{"language":[513],"text":[513],"icon":[1],"image":[16],"link":[16],"badge":[520],"disabled":[516],"readonly":[516],"selected":[516],"invalid":[516],"removable":[516],"type":[513],"loading":[516],"progress":[514],"identifier":[520],"size":[513],"menuItems":[16]}],[1,"limel-linear-progress",{"language":[513],"value":[514],"indeterminate":[516],"accessibleLabel":[513,"accessible-label"]},null,{"value":[{"watchValue":0}]}]]],["p-565f688a",[[1,"limel-action-bar",{"actions":[16],"accessibleLabel":[513,"accessible-label"],"language":[1],"layout":[513],"collapsible":[516],"openDirection":[513,"open-direction"],"overflowCutoff":[32]}],[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"],"selected":[516]}]]]]'),e))));
|
|
1
|
+
import{p as e,g as l,b as a}from"./p-BGxJfR2f.js";export{s as setNonce}from"./p-BGxJfR2f.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await l(),a(JSON.parse('[["p-d19ab443",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516],"svgClass":[513,"svg-class"]},null,{"name":[{"loadIcon":0}],"svgClass":[{"applySvgClass":0}]}]]],["p-26fed26a",[[17,"limel-text-editor",{"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"value":[513],"customElements":[16],"inlineImages":[16],"triggers":[16],"required":[516],"allowResize":[516,"allow-resize"],"ui":[513],"flushPendingChanges":[64],"clear":[64]}]]],["p-3e316685",[[1,"limel-file-viewer",{"url":[513],"filename":[513],"alt":[513],"allowFullscreen":[516,"allow-fullscreen"],"allowOpenInNewTab":[516,"allow-open-in-new-tab"],"allowDownload":[516,"allow-download"],"language":[1],"officeViewer":[513,"office-viewer"],"actions":[16],"isFullscreen":[32],"fileType":[32],"loading":[32],"fileUrl":[32],"email":[32]},null,{"url":[{"watchUrl":0}]}]]],["p-7df111bb",[[257,"limel-card",{"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"actions":[16],"clickable":[516],"orientation":[513],"selected":[516],"show3dEffect":[516,"show-3d-effect"],"canScrollUp":[32],"canScrollDown":[32]}]]],["p-8cf79fa1",[[1,"limel-file",{"value":[16],"label":[513],"helperText":[513,"helper-text"],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"loading":[516],"accept":[513],"resizeImage":[16],"language":[1],"resizingFile":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-8c3798ee",[[1,"limel-code-diff",{"oldValue":[1,"old-value"],"newValue":[1,"new-value"],"oldHeading":[513,"old-heading"],"newHeading":[513,"new-heading"],"layout":[513],"contextLines":[514,"context-lines"],"lineWrapping":[516,"line-wrapping"],"language":[513],"reformatJson":[516,"reformat-json"],"translationLanguage":[513,"translation-language"],"diffResult":[32],"liveAnnouncement":[32],"copyState":[32],"searchVisible":[32],"searchTerm":[32],"currentMatchIndex":[32]},null,{"oldValue":[{"watchInputs":0}],"newValue":[{"watchInputs":0}],"contextLines":[{"watchInputs":0}],"reformatJson":[{"watchInputs":0}],"layout":[{"watchInputs":0}]}]]],["p-8b3b7505",[[0,"limel-list-item",{"language":[513],"value":[8],"text":[513],"secondaryText":[513,"secondary-text"],"disabled":[516],"icon":[1],"iconSize":[513,"icon-size"],"badgeIcon":[516,"badge-icon"],"selected":[516],"actions":[16],"primaryComponent":[16],"image":[16],"type":[513]}]]],["p-f2294e26",[[17,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"language":[1],"required":[4],"invalid":[516],"value":[16],"searcher":[16],"allItems":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]},null,{"disabled":[{"onDisabledChange":0}],"value":[{"onChangeValue":0}]}]]],["p-8175c53a",[[17,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"items":[16]}]]],["p-191efd88",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"placeholder":[513],"manualInput":[516,"manual-input"],"palette":[16],"paletteColumnCount":[514,"palette-column-count"],"isOpen":[32]}]]],["p-cafebc7d",[[1,"limel-profile-picture",{"language":[513],"label":[513],"icon":[1],"helperText":[1,"helper-text"],"disabled":[516],"readonly":[516],"required":[516],"invalid":[516],"loading":[516],"value":[1],"imageFit":[513,"image-fit"],"accept":[513],"resize":[16],"objectUrl":[32],"imageError":[32],"isErrorMessagePopoverOpen":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-aee66710",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["p-b04c6602",[[1,"limel-snackbar",{"open":[516],"message":[1],"timeout":[514],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"offset":[32],"isOpen":[32],"closing":[32],"show":[64]},[[0,"changeOffset","onChangeIndex"]],{"open":[{"watchOpen":0}]}]]],["p-ed53466d",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"internalFormat":[32],"showPortal":[32]}]]],["p-0c47d262",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]},null,{"value":[{"valueChanged":0}]}]]],["p-73d9f0f6",[[1,"limel-chart",{"language":[513],"accessibleLabel":[513,"accessible-label"],"accessibleItemsLabel":[513,"accessible-items-label"],"accessibleValuesLabel":[513,"accessible-values-label"],"displayAxisLabels":[516,"display-axis-labels"],"displayItemText":[516,"display-item-text"],"displayItemValue":[516,"display-item-value"],"displayItemPercentage":[516,"display-item-percentage"],"items":[16],"type":[513],"orientation":[513],"maxValue":[514,"max-value"],"axisIncrement":[514,"axis-increment"],"loading":[516]},null,{"items":[{"handleChange":0}],"axisIncrement":[{"handleChange":0}],"maxValue":[{"handleChange":0}],"type":[{"handleChange":0}]}]]],["p-9152d7e1",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]},null,{"value":[{"resetHasChanged":0}],"options":[{"resetHasChanged":0},{"updateHasPrimaryComponent":0},{"resetTypeaheadOnItemsChange":0}],"required":[{"resetTypeaheadOnItemsChange":0}],"menuOpen":[{"watchOpen":0}]}]]],["p-b6528083",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"required":[516],"invalid":[516],"displaysPercentageColors":[516,"displays-percentage-colors"],"unit":[513],"language":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32],"displayValue":[32],"isUnset":[32]},null,{"value":[{"watchValue":0}]}]]],["p-f2c8b10b",[[1,"limel-help",{"value":[1],"trigger":[1],"readMoreLink":[16],"openDirection":[513,"open-direction"],"isOpen":[32]}]]],["p-51cb779f",[[257,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"reducedPresence":[516,"reduced-presence"],"badge":[520],"loading":[516],"link":[16],"progress":[16],"hasPrimarySlot":[32]}]]],["p-5e432a44",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[513],"layout":[513],"pageSize":[514,"page-size"],"totalRows":[514,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[516,"movable-columns"],"movableRows":[516,"movable-rows"],"sortableColumns":[516,"sortable-columns"],"loading":[516],"page":[514],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[516],"selection":[16],"language":[513],"paginationLocation":[513,"pagination-location"]},null,{"totalRows":[{"totalRowsChanged":0}],"pageSize":[{"pageSizeChanged":0}],"page":[{"pageChanged":0}],"activeRow":[{"activeRowChanged":0}],"data":[{"updateData":0}],"columns":[{"updateColumns":0}],"aggregates":[{"updateAggregates":0}],"selection":[{"updateSelection":0}],"selectable":[{"updateSelectable":0}],"movableRows":[{"updateMovableRows":0}],"sortableColumns":[{"updateSortableColumns":0}],"sorting":[{"updateSorting":0}]}]]],["p-62a25deb",[[0,"limel-drag-handle",{"dragDirection":[513,"drag-direction"],"tooltipOpenDirection":[513,"tooltip-open-direction"],"language":[513]}]]],["p-ad4672b2",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["p-b3274e2e",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"invalid":[516],"value":[516],"helperText":[513,"helper-text"],"readonlyLabels":[16],"fieldId":[32]}]]],["p-946a33ea",[[257,"limel-tab-panel",{"tabs":[1040]},null,{"tabs":[{"tabsChanged":0}]}]]],["p-f53d8bda",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[516],"disabled":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"lineNumbers":[516,"line-numbers"],"lineWrapping":[516,"line-wrapping"],"fold":[516],"lint":[516],"colorScheme":[513,"color-scheme"],"translationLanguage":[513,"translation-language"],"showCopyButton":[516,"show-copy-button"],"random":[32],"wasCopied":[32]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"readonly":[{"watchReadonly":0}],"invalid":[{"watchInvalid":0}],"required":[{"watchRequired":0}],"helperText":[{"watchHelperText":0}]}]]],["p-c0263530",[[257,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]},null,{"open":[{"watchHandler":0}],"closingActions":[{"closingActionsChanged":0}]}]]],["p-120182f5",[[1,"limel-menu-item-meta",{"commandText":[513,"command-text"],"hotkey":[513],"disabled":[516],"badge":[8],"showChevron":[4,"show-chevron"]}]]],["p-eecd1132",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["p-fe531211",[[257,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["p-1b25f158",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16],"revealErrors":[4,"reveal-errors"]}]]],["p-2737cade",[[0,"limel-radio-button-group",{"items":[16],"selectedItem":[16],"disabled":[516],"badgeIcons":[516,"badge-icons"],"maxLinesSecondaryText":[514,"max-lines-secondary-text"]}]]],["p-e8783848",[[1,"limel-ai-avatar",{"isThinking":[516,"is-thinking"],"mode":[513],"variant":[513],"language":[513]},null,{"isThinking":[{"onIsThinkingChange":0}]}]]],["p-6acd82ce",[[1,"limel-config",{"config":[16]}]]],["p-bb9b399c",[[257,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["p-6665e14b",[[257,"limel-grid"]]],["p-21558be2",[[257,"limel-masonry-layout",{"ordered":[516],"containerHeight":[32]},null,{"ordered":[{"onOrderedChange":0}]}]]],["p-5dde5d72",[[257,"limel-email-viewer",{"email":[16],"fallbackUrl":[513,"fallback-url"],"language":[513],"allowRemoteImages":[4,"allow-remote-images"],"allowRemoteImagesState":[32]},null,{"email":[{"resetAllowRemoteImages":0}]}]]],["p-d3d71a68",[[17,"limel-prosemirror-adapter",{"contentType":[1,"content-type"],"value":[1],"language":[513],"disabled":[516],"customElements":[16],"inlineImages":[16],"triggerCharacters":[16],"ui":[1],"view":[32],"actionBarItems":[32],"link":[32],"isLinkMenuOpen":[32],"flushPendingChanges":[64],"clear":[64]},null,{"value":[{"watchValue":0}]}]]],["p-dd9591a3",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]},null,{"isOpen":[{"openWatcher":0}]}]]],["p-c8ce60a0",[[17,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"placeholder":[513],"required":[516],"invalid":[516],"manualInput":[516,"manual-input"],"columnCount":[514,"column-count"],"palette":[16]}]]],["p-cf955cc2",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"readonlyLabels":[16],"modified":[32]},null,{"checked":[{"handleCheckedChange":0}],"indeterminate":[{"handleIndeterminateChange":0}],"readonly":[{"handleReadonlyChange":0}]}]]],["p-eeb7fcb3",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]],{"tabs":[{"tabsChanged":0}]}]]],["p-a6500046",[[257,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["p-1907a5be",[[257,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"],"subheadingDivider":[1,"subheading-divider"]}]]],["p-de070191",[[1,"limel-help-content",{"value":[1],"readMoreLink":[16]}]]],["p-e3ba7e15",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4],"currentStep":[4,"current-step"]}]]],["p-70087de6",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["p-eeddce38",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["p-7fe6a073",[[0,"limel-radio-button",{"checked":[516],"disabled":[516],"id":[1],"label":[1],"onChange":[16]}]]],["p-056ba5c5",[[17,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"invalid":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"emptyInputOnChange":[516,"empty-input-on-change"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"autocomplete":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"selectedChipIds":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]},null,{"value":[{"handleChangeChips":0}]}]]],["p-7bfac292",[[17,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]},null,{"loading":[{"loadingWatcher":0}]}]]],["p-d521d599",[[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"hotkey":[513],"maxlength":[514],"openDirection":[513,"open-direction"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"hotkey":[513]}],[1,"limel-hotkey",{"value":[513],"disabled":[516]}],[257,"limel-portal",{"openDirection":[513,"open-direction"],"position":[513],"containerId":[513,"container-id"],"containerStyle":[16],"inheritParentWidth":[516,"inherit-parent-width"],"visible":[516],"anchor":[16]},null,{"visible":[{"onVisible":0}]}]]],["p-b4b43404",[[1,"limel-text-editor-link-menu",{"link":[16],"language":[513],"isOpen":[516,"is-open"]}]]],["p-dda63b8b",[[257,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"icon":[1],"invalid":[516],"actions":[16],"language":[513]}]]],["p-be5cc2ae",[[1,"limel-3d-hover-effect-glow"]]],["p-ea34a4bc",[[257,"limel-file-dropzone",{"accept":[513],"disabled":[4],"text":[1],"helperText":[1,"helper-text"],"hasFileToDrop":[32]}],[257,"limel-file-input",{"accept":[513],"disabled":[516],"multiple":[516]}]]],["p-a1c15727",[[1,"limel-dynamic-label",{"value":[8],"defaultLabel":[16],"labels":[16]}]]],["p-86b9f9d0",[[17,"limel-icon-button",{"icon":[1],"elevated":[516],"label":[513],"helperLabel":[513,"helper-label"],"disabled":[516]}]]],["p-a579e80f",[[1,"limel-markdown",{"value":[1],"whitelist":[16],"lazyLoadImages":[516,"lazy-load-images"],"removeEmptyParagraphs":[516,"remove-empty-paragraphs"],"adaptColorContrast":[516,"adapt-color-contrast"]},null,{"value":[{"textChanged":0}],"whitelist":[{"handleWhitelistChange":0}],"removeEmptyParagraphs":[{"handleRemoveEmptyParagraphsChange":0}],"adaptColorContrast":[{"handleAdaptColorContrastChange":0}]}]]],["p-2b01c1f2",[[257,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]},null,{"open":[{"watchOpen":0}]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["p-f09822a6",[[1,"limel-badge",{"label":[520]}]]],["p-0ecf8399",[[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]],["p-12fe8fe1",[[257,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"surfaceWidth":[513,"surface-width"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"loading":[516],"currentSubMenu":[1040],"rootItem":[16],"searcher":[16],"searchPlaceholder":[1,"search-placeholder"],"emptyResultMessage":[1,"empty-result-message"],"keepOpenOnSelect":[516,"keep-open-on-select"],"loadingSubItems":[32],"searchValue":[32],"searchResults":[32]},null,{"items":[{"itemsWatcher":0}],"open":[{"openWatcher":0}]}],[1,"limel-breadcrumbs",{"items":[16],"divider":[1]}],[17,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"]},null,{"items":[{"itemsChanged":0}]}],[17,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"locale":[513],"isFocused":[32],"wasInvalid":[32],"showCompletions":[32],"getSelectionStart":[64],"getSelectionEnd":[64],"getSelectionDirection":[64]},null,{"value":[{"valueWatcher":0}],"completions":[{"completionsWatcher":0}]}],[257,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}],[17,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]},null,{"type":[{"handleType":0}],"items":[{"itemsChanged":0}]}],[260,"limel-notched-outline",{"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"label":[513],"labelId":[513,"label-id"],"hasValue":[516,"has-value"],"hasLeadingIcon":[516,"has-leading-icon"],"hasFloatingLabel":[516,"has-floating-label"]}]]],["p-83bdbaf7",[[17,"limel-chip",{"language":[513],"text":[513],"icon":[1],"image":[16],"link":[16],"badge":[520],"disabled":[516],"readonly":[516],"selected":[516],"invalid":[516],"removable":[516],"type":[513],"loading":[516],"progress":[514],"identifier":[520],"size":[513],"menuItems":[16]}],[1,"limel-linear-progress",{"language":[513],"value":[514],"indeterminate":[516],"accessibleLabel":[513,"accessible-label"]},null,{"value":[{"watchValue":0}]}]]],["p-565f688a",[[1,"limel-action-bar",{"actions":[16],"accessibleLabel":[513,"accessible-label"],"language":[1],"layout":[513],"collapsible":[516],"openDirection":[513,"open-direction"],"overflowCutoff":[32]}],[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"],"selected":[516]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as o,H as r}from"./p-BGxJfR2f.js";import{c as a}from"./p-JbKhhoXs.js";const i=class{constructor(o){t(this,o),this.change=e(this,"change"),this.value=[],this.disabled=!1,this.radioGroupName=a(),this.setSelectedButton=()=>{var t;this.selectedButtonId=null===(t=this.value.find((t=>t.selected)))||void 0===t?void 0:t.id},this.renderButton=this.renderButton.bind(this),this.onChange=this.onChange.bind(this),this.renderContent=this.renderContent.bind(this)}componentWillLoad(){this.setSelectedButton()}render(){return o(r,{key:"7823fd4593ee4eddb6d56ce55e7ff5eb1cc28397",role:"radiogroup"},this.value.map(this.renderButton))}renderButton(t){const e=`b${t.id}`,r=this.disabled||t.disabled,a={button:!0,"button--selected":this.isButtonChecked(t)};return o("div",{class:a},o("input",{type:"radio",name:this.radioGroupName,checked:this.isButtonChecked(t),disabled:r,"aria-disabled":r?"true":"false",id:e,onChange:this.onChange}),o("label",{htmlFor:e},this.renderContent(t),this.renderBadge(t)))}renderContent(t){return t.icon?this.renderIcon(t):this.renderLabel(t)}isButtonChecked(t){return t.id===this.selectedButtonId}renderLabel(t){return o("span",{class:"button__label"},t.title)}renderIcon(t){const e=`i${t.id}`;return[o("limel-icon",{id:e,class:"button__icon","aria-label":t.title,name:t.icon,size:"small",badge:!0}),o("limel-tooltip",{elementId:e,label:t.title})]}renderBadge(t){if(t.badge)return o("limel-badge",{label:t.badge})}onChange(t){t.stopPropagation();const e=t.target.id.slice(1),o=this.value.find((t=>t.id===e));!o||this.disabled||o.disabled||(this.selectedButtonId=e,this.change.emit(o))}valueChanged(){this.setSelectedButton()}static get watchers(){return{value:[{valueChanged:0}]}}};i.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}.button{color:var(--limel-theme-on-surface-color)}.button:not(:has(:disabled)){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):focus,.button:not(:has(:disabled)):focus-visible{will-change:color, background-color, box-shadow, transform}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button:not(:has(:disabled)):hover{box-shadow:var(--button-shadow-hovered)}.button:not(:has(:disabled)):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.button:not(:has(:disabled)):hover,.button:not(:has(:disabled)):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button{position:relative;display:inline-grid;grid-auto-flow:column;align-items:center;max-width:100%;min-width:2rem;height:2rem;padding:0 0.0625rem;margin:0.125rem;border-radius:1rem;font-size:var(--limel-theme-default-font-size);user-select:none}.button:not(:last-child):after{content:"";display:block;height:1rem;width:0.125rem;border-radius:0.25rem;background-color:var(--button-group-text-color, rgb(var(--contrast-1200)));opacity:0.1;position:absolute;right:-0.1875rem;top:0;bottom:0;margin:auto}.button label{cursor:pointer;transition:color 0.2s ease;display:flex;align-items:center;flex:1;height:100%;min-width:0}.button label:has(>limel-badge) .button__label{padding-right:0.25rem}.button:has(:disabled) label{cursor:not-allowed;opacity:0.4}.button input[type=radio]{position:absolute;width:0;opacity:0}.button input[type=radio]:focus-visible+label:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:3.75rem;box-shadow:var(--shadow-depth-8-focused)}.button:focus-within{outline:none;color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button:only-child .button__label{padding-left:0.75rem}.button:first-child .button__label{padding-left:0.75rem}.button.button--selected{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset);color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button.button--selected:not(:has(:disabled)):active{box-shadow:var(--button-shadow-inset-pressed)}.button__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-small-font-size);padding:0 0.75rem}.button__icon{border-radius:50%;vertical-align:middle}limel-badge{margin-right:0.25rem;pointer-events:none}.button:not(.button--selected){--badge-background-color:rgb(var(--contrast-200))}';export{i as limel_button_group}
|
|
@@ -22,5 +22,15 @@ export interface Button {
|
|
|
22
22
|
* The label displayed in the badge
|
|
23
23
|
*/
|
|
24
24
|
badge?: number | string;
|
|
25
|
+
/**
|
|
26
|
+
* True if the button should be disabled.
|
|
27
|
+
*
|
|
28
|
+
* Disabling every button in the group is not the same as disabling the
|
|
29
|
+
* group itself; set `disabled` on `limel-button-group` for that.
|
|
30
|
+
*
|
|
31
|
+
* Combining this with `selected` is not supported. Once the user picks
|
|
32
|
+
* another button, the disabled one can never be selected again.
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
25
35
|
}
|
|
26
36
|
//# sourceMappingURL=button.types.d.ts.map
|
|
@@ -33,6 +33,7 @@ import { Button } from '../button/button.types';
|
|
|
33
33
|
* @exampleComponent limel-example-button-group-basic
|
|
34
34
|
* @exampleComponent limel-example-button-group-mix
|
|
35
35
|
* @exampleComponent limel-example-button-group-badges
|
|
36
|
+
* @exampleComponent limel-example-button-group-disabled-item
|
|
36
37
|
* @exampleComponent limel-example-button-group-composite
|
|
37
38
|
*/
|
|
38
39
|
export declare class ButtonGroup {
|
|
@@ -41,7 +42,10 @@ export declare class ButtonGroup {
|
|
|
41
42
|
*/
|
|
42
43
|
value: Button[];
|
|
43
44
|
/**
|
|
44
|
-
* True if the button-group should be disabled
|
|
45
|
+
* True if the button-group should be disabled.
|
|
46
|
+
*
|
|
47
|
+
* Disables every button in the group, regardless of the `disabled` value
|
|
48
|
+
* of each individual button.
|
|
45
49
|
*/
|
|
46
50
|
disabled: boolean;
|
|
47
51
|
/**
|
|
@@ -390,11 +390,12 @@ export namespace Components {
|
|
|
390
390
|
* @exampleComponent limel-example-button-group-basic
|
|
391
391
|
* @exampleComponent limel-example-button-group-mix
|
|
392
392
|
* @exampleComponent limel-example-button-group-badges
|
|
393
|
+
* @exampleComponent limel-example-button-group-disabled-item
|
|
393
394
|
* @exampleComponent limel-example-button-group-composite
|
|
394
395
|
*/
|
|
395
396
|
interface LimelButtonGroup {
|
|
396
397
|
/**
|
|
397
|
-
* True if the button-group should be disabled
|
|
398
|
+
* True if the button-group should be disabled. Disables every button in the group, regardless of the `disabled` value of each individual button.
|
|
398
399
|
* @default false
|
|
399
400
|
*/
|
|
400
401
|
"disabled": boolean;
|
|
@@ -4480,6 +4481,7 @@ declare global {
|
|
|
4480
4481
|
* @exampleComponent limel-example-button-group-basic
|
|
4481
4482
|
* @exampleComponent limel-example-button-group-mix
|
|
4482
4483
|
* @exampleComponent limel-example-button-group-badges
|
|
4484
|
+
* @exampleComponent limel-example-button-group-disabled-item
|
|
4483
4485
|
* @exampleComponent limel-example-button-group-composite
|
|
4484
4486
|
*/
|
|
4485
4487
|
interface HTMLLimelButtonGroupElement extends Components.LimelButtonGroup, HTMLStencilElement {
|
|
@@ -6968,11 +6970,12 @@ declare namespace LocalJSX {
|
|
|
6968
6970
|
* @exampleComponent limel-example-button-group-basic
|
|
6969
6971
|
* @exampleComponent limel-example-button-group-mix
|
|
6970
6972
|
* @exampleComponent limel-example-button-group-badges
|
|
6973
|
+
* @exampleComponent limel-example-button-group-disabled-item
|
|
6971
6974
|
* @exampleComponent limel-example-button-group-composite
|
|
6972
6975
|
*/
|
|
6973
6976
|
interface LimelButtonGroup {
|
|
6974
6977
|
/**
|
|
6975
|
-
* True if the button-group should be disabled
|
|
6978
|
+
* True if the button-group should be disabled. Disables every button in the group, regardless of the `disabled` value of each individual button.
|
|
6976
6979
|
* @default false
|
|
6977
6980
|
*/
|
|
6978
6981
|
"disabled"?: boolean;
|
|
@@ -11775,6 +11778,7 @@ declare module "@stencil/core" {
|
|
|
11775
11778
|
* @exampleComponent limel-example-button-group-basic
|
|
11776
11779
|
* @exampleComponent limel-example-button-group-mix
|
|
11777
11780
|
* @exampleComponent limel-example-button-group-badges
|
|
11781
|
+
* @exampleComponent limel-example-button-group-disabled-item
|
|
11778
11782
|
* @exampleComponent limel-example-button-group-composite
|
|
11779
11783
|
*/
|
|
11780
11784
|
"limel-button-group": LocalJSX.IntrinsicElements["limel-button-group"] & JSXBase.HTMLAttributes<HTMLLimelButtonGroupElement>;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as o,H as r}from"./p-BGxJfR2f.js";import{c as i}from"./p-JbKhhoXs.js";const a=class{constructor(o){t(this,o),this.change=e(this,"change"),this.value=[],this.disabled=!1,this.radioGroupName=i(),this.setSelectedButton=()=>{var t;this.selectedButtonId=null===(t=this.value.find((t=>t.selected)))||void 0===t?void 0:t.id},this.renderButton=this.renderButton.bind(this),this.onChange=this.onChange.bind(this),this.renderContent=this.renderContent.bind(this)}componentWillLoad(){this.setSelectedButton()}render(){return o(r,{key:"867ce929125e09bbe9f0862e6cb68ad10f90a768",role:"radiogroup"},this.value.map(this.renderButton))}renderButton(t){const e=`b${t.id}`,r={button:!0,"button--selected":this.isButtonChecked(t)};return o("div",{class:r},o("input",{type:"radio",name:this.radioGroupName,checked:this.isButtonChecked(t),disabled:this.disabled,id:e,onChange:this.onChange}),o("label",{htmlFor:e},this.renderContent(t),this.renderBadge(t)))}renderContent(t){return t.icon?this.renderIcon(t):this.renderLabel(t)}isButtonChecked(t){return t.id===this.selectedButtonId}renderLabel(t){return o("span",{class:"button__label"},t.title)}renderIcon(t){const e=`i${t.id}`;return[o("limel-icon",{id:e,class:"button__icon","aria-label":t.title,name:t.icon,size:"small",badge:!0}),o("limel-tooltip",{elementId:e,label:t.title})]}renderBadge(t){if(t.badge)return o("limel-badge",{label:t.badge})}onChange(t){t.stopPropagation(),this.selectedButtonId=t.target.id.slice(1);const e=this.value.find((t=>t.id===this.selectedButtonId));this.change.emit(e)}valueChanged(){this.setSelectedButton()}static get watchers(){return{value:[{valueChanged:0}]}}};a.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limel-button-group){display:flex;box-sizing:border-box;align-items:center;border-radius:3.75rem;background-color:var(--button-group-background-color, rgb(var(--contrast-400)));width:max-content;max-width:100%;flex-wrap:nowrap}:host([disabled]:not([disabled=false])){cursor:not-allowed;opacity:0.4}.button{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.button:hover,.button:focus,.button:focus-visible{will-change:color, background-color, box-shadow, transform}.button:hover,.button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button:hover{box-shadow:var(--button-shadow-hovered)}.button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}.button:hover,.button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button:has(input[disabled]):hover{box-shadow:none;transform:none}.button{position:relative;display:inline-grid;grid-auto-flow:column;align-items:center;max-width:100%;min-width:2rem;height:2rem;padding:0 0.0625rem;margin:0.125rem;border-radius:1rem;font-size:var(--limel-theme-default-font-size);user-select:none}.button:not(:last-child):after{content:"";display:block;height:1rem;width:0.125rem;border-radius:0.25rem;background-color:var(--button-group-text-color, rgb(var(--contrast-1200)));opacity:0.1;position:absolute;right:-0.1875rem;top:0;bottom:0;margin:auto}.button label{cursor:pointer;transition:color 0.2s ease;display:flex;align-items:center;flex:1;height:100%;min-width:0}.button label:has(>limel-badge) .button__label{padding-right:0.25rem}.button input[type=radio]{position:absolute;width:0;opacity:0}.button input[type=radio]:focus-visible+label:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:3.75rem;box-shadow:var(--shadow-depth-8-focused)}.button:focus-within{outline:none;color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button:only-child .button__label{padding-left:0.75rem}.button:first-child .button__label{padding-left:0.75rem}.button.button--selected{background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset);color:var(--lime-primary-color, var(--limel-theme-primary-color))}.button.button--selected:active{box-shadow:var(--button-shadow-inset-pressed)}.button__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-small-font-size);padding:0 0.75rem}.button__icon{border-radius:50%;vertical-align:middle}limel-badge{margin-right:0.25rem;pointer-events:none}.button:not(.button--selected){--badge-background-color:rgb(var(--contrast-200))}';export{a as limel_button_group}
|