@sebgroup/green-core 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -7
- package/chunks/chunk.274BU2AI.js +244 -0
- package/chunks/chunk.2LQSDOD4.js +29 -0
- package/chunks/chunk.2ND5EWHE.js +65 -0
- package/chunks/chunk.2OOTOCUG.js +420 -0
- package/chunks/chunk.2WO4NHJ2.js +34 -0
- package/chunks/chunk.2Y3BHFKO.js +154 -0
- package/chunks/chunk.375BWME4.js +29 -0
- package/chunks/chunk.3SEVAGLE.js +96 -0
- package/chunks/chunk.522C22QY.js +460 -0
- package/chunks/chunk.5VURDMKE.js +75 -0
- package/chunks/chunk.6NM7ENKA.js +31 -0
- package/chunks/chunk.6UA66KQU.js +153 -0
- package/chunks/chunk.7P5N6NZL.js +560 -0
- package/chunks/chunk.7TCXY7BP.js +0 -0
- package/chunks/chunk.D7H7CUS4.js +55 -0
- package/chunks/chunk.DFYMYEGD.js +78 -0
- package/chunks/chunk.HS7ICQNA.js +0 -0
- package/chunks/chunk.IYCENQZG.js +28 -0
- package/chunks/chunk.J2A6J77W.js +81 -0
- package/chunks/chunk.KC32OWZE.js +274 -0
- package/chunks/chunk.KV4SDMFS.js +101 -0
- package/chunks/chunk.LUHCF4BJ.js +64 -0
- package/chunks/chunk.MAD5DQMN.js +161 -0
- package/chunks/chunk.MI4A2C2A.js +0 -0
- package/chunks/chunk.NOYHINYP.js +467 -0
- package/chunks/chunk.Q2T57HE7.js +0 -0
- package/chunks/chunk.QONSFT2N.js +4653 -0
- package/chunks/chunk.TMBQL2RO.js +0 -0
- package/chunks/chunk.TN6ZYAH3.js +74 -0
- package/chunks/chunk.TSDZQZBY.js +0 -0
- package/chunks/chunk.TX64TTBN.js +0 -0
- package/chunks/chunk.UF6IEONX.js +0 -0
- package/chunks/chunk.VOYMQ322.js +61 -0
- package/chunks/chunk.VYK7D6QO.js +64 -0
- package/chunks/chunk.WDZ2JTCP.js +360 -0
- package/chunks/chunk.WJDR7FTS.js +193 -0
- package/chunks/chunk.WM7HBMMV.js +54 -0
- package/chunks/chunk.XHTJVQUJ.js +140 -0
- package/chunks/chunk.XI4H54TV.js +39 -0
- package/chunks/chunk.XU4HZLJL.js +0 -0
- package/chunks/chunk.YIQIH4RW.js +139 -0
- package/chunks/chunk.YJHAKLGR.js +54 -0
- package/chunks/chunk.YO24ZYAD.js +0 -0
- package/chunks/chunk.ZTE73BY2.js +655 -0
- package/components/badge/badge.js +245 -0
- package/components/button/button.d.ts +5 -5
- package/components/button/button.js +18 -0
- package/components/button/button.trans.styles.d.ts +2 -0
- package/components/button/index.d.ts +1 -0
- package/components/button/index.js +18 -0
- package/components/checkbox/checkbox.js +219 -0
- package/components/context-menu/context-menu.d.ts +2 -1
- package/components/context-menu/context-menu.js +22 -0
- package/components/context-menu/index.d.ts +3 -0
- package/components/context-menu/index.js +29 -0
- package/components/datepicker/date-part-spinner.js +10 -0
- package/components/datepicker/datepicker.d.ts +3 -2
- package/components/datepicker/datepicker.js +29 -0
- package/components/datepicker/index.d.ts +1 -0
- package/components/datepicker/index.js +29 -0
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +22 -0
- package/components/dropdown/index.d.ts +3 -0
- package/components/dropdown/index.js +30 -0
- package/components/form-control.js +12 -0
- package/components/grid/grid.d.ts +2 -2
- package/components/grid/grid.js +11 -0
- package/components/grid/grid.style.css.js +7 -0
- package/components/grid/index.d.ts +1 -0
- package/components/grid/index.js +11 -0
- package/components/grouped-list/grouped-list.js +14 -0
- package/components/grouped-list/index.d.ts +2 -0
- package/components/grouped-list/index.js +17 -0
- package/components/grouped-list/list-item.js +10 -0
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +10 -0
- package/components/icon/index.d.ts +1 -0
- package/components/icon/index.js +10 -0
- package/components/index.d.ts +4 -3
- package/components/index.js +81 -0
- package/components/input/input.js +682 -0
- package/components/radio/radio-group.js +9 -0
- package/components/radio/radio.js +240 -0
- package/components/segmented-control/index.d.ts +1 -0
- package/components/segmented-control/index.js +15 -0
- package/components/segmented-control/segment/index.d.ts +1 -0
- package/components/segmented-control/segment/index.js +13 -0
- package/components/segmented-control/segment/segment.js +12 -0
- package/components/segmented-control/segmented-control.d.ts +1 -1
- package/components/segmented-control/segmented-control.js +15 -0
- package/components/switch/switch.js +164 -0
- package/components/theme/index.d.ts +1 -0
- package/components/theme/index.js +11 -0
- package/components/theme/theme.js +11 -0
- package/components/tooltip/tooltip.js +252 -0
- package/index.js +72 -4278
- package/localization.js +40 -44
- package/package.json +7 -16
- package/primitives/calendar/calendar.js +13 -0
- package/primitives/calendar/functions.js +7 -0
- package/primitives/calendar/index.d.ts +1 -0
- package/primitives/calendar/index.js +14 -0
- package/primitives/listbox/index.d.ts +0 -1
- package/primitives/listbox/index.js +17 -0
- package/primitives/listbox/listbox.d.ts +2 -1
- package/primitives/listbox/listbox.js +16 -0
- package/primitives/listbox/option.js +14 -0
- package/primitives/menu/index.d.ts +1 -0
- package/primitives/menu/index.js +15 -0
- package/primitives/menu/menu-heading.js +11 -0
- package/primitives/menu/menu-item.d.ts +1 -2
- package/primitives/menu/menu-item.js +12 -0
- package/primitives/menu/menu.d.ts +2 -1
- package/primitives/menu/menu.js +14 -0
- package/primitives/popover/index.js +14 -0
- package/primitives/popover/popover.js +13 -0
- package/primitives/ripple/index.d.ts +1 -0
- package/primitives/ripple/index.js +11 -0
- package/primitives/ripple/ripple.d.ts +1 -1
- package/primitives/ripple/ripple.js +10 -0
- package/scoping.d.ts +1 -0
- package/scoping.js +18 -0
- package/transitional-styles.js +6 -4275
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TransitionalStyles
|
|
3
|
+
} from "./chunk.QONSFT2N.js";
|
|
4
|
+
import {
|
|
5
|
+
GdsElement
|
|
6
|
+
} from "./chunk.2LQSDOD4.js";
|
|
7
|
+
import {
|
|
8
|
+
constrainSlots
|
|
9
|
+
} from "./chunk.6NM7ENKA.js";
|
|
10
|
+
import {
|
|
11
|
+
gdsCustomElement,
|
|
12
|
+
html
|
|
13
|
+
} from "./chunk.VOYMQ322.js";
|
|
14
|
+
import {
|
|
15
|
+
__decorateClass,
|
|
16
|
+
__privateAdd,
|
|
17
|
+
__privateMethod
|
|
18
|
+
} from "./chunk.5VURDMKE.js";
|
|
19
|
+
|
|
20
|
+
// libs/core/src/components/context-menu/context-menu.ts
|
|
21
|
+
import { nothing } from "lit";
|
|
22
|
+
import { msg } from "@lit/localize";
|
|
23
|
+
import { classMap } from "lit-html/directives/class-map.js";
|
|
24
|
+
import { property, queryAsync, state } from "lit/decorators.js";
|
|
25
|
+
|
|
26
|
+
// libs/core/src/components/context-menu/context-menu.styles.ts
|
|
27
|
+
import { css } from "lit";
|
|
28
|
+
var style = css`
|
|
29
|
+
@layer base, reset, transitional-styles;
|
|
30
|
+
@layer base {
|
|
31
|
+
button {
|
|
32
|
+
display: flex;
|
|
33
|
+
border-width: 0;
|
|
34
|
+
background-color: #ededed;
|
|
35
|
+
border-radius: calc(1px * infinity);
|
|
36
|
+
padding: 0.4rem 0.8rem;
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button:hover {
|
|
44
|
+
background-color: #dcdcdc;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
var context_menu_styles_default = style;
|
|
49
|
+
|
|
50
|
+
// libs/core/src/components/context-menu/context-menu.ts
|
|
51
|
+
var _handleItemClick, handleItemClick_fn;
|
|
52
|
+
var GdsContextMenu = class extends GdsElement {
|
|
53
|
+
constructor() {
|
|
54
|
+
super();
|
|
55
|
+
__privateAdd(this, _handleItemClick);
|
|
56
|
+
this.open = false;
|
|
57
|
+
this.buttonLabel = msg("Open context menu");
|
|
58
|
+
this.showLabel = false;
|
|
59
|
+
this.label = "";
|
|
60
|
+
this.placement = "bottom-start";
|
|
61
|
+
constrainSlots(this);
|
|
62
|
+
}
|
|
63
|
+
connectedCallback() {
|
|
64
|
+
super.connectedCallback();
|
|
65
|
+
TransitionalStyles.instance.apply(this, "gds-context-menu");
|
|
66
|
+
this.addEventListener("keydown", (e) => {
|
|
67
|
+
if (this.open && e.key == "Tab") {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
this.open = false;
|
|
70
|
+
this.elTriggerBtn.then((el) => el.focus());
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
var _a, _b, _c;
|
|
76
|
+
return html`${this._tStyles}
|
|
77
|
+
<button
|
|
78
|
+
id="trigger"
|
|
79
|
+
class="icon border-0 small ${classMap({ highlighted: this.open })}"
|
|
80
|
+
aria-label=${(_a = this.buttonLabel) != null ? _a : this.label}
|
|
81
|
+
aria-haspopup="menu"
|
|
82
|
+
aria-controls="menu"
|
|
83
|
+
aria-expanded=${this.open}
|
|
84
|
+
@click=${() => this.open = !this.open}
|
|
85
|
+
>
|
|
86
|
+
<slot name="trigger">
|
|
87
|
+
${this.showLabel ? (_b = this.buttonLabel) != null ? _b : this.label : nothing}
|
|
88
|
+
<svg width="24" height="24" viewBox="0 0 24 24">
|
|
89
|
+
<path
|
|
90
|
+
d="M14 12C14 13.1042 13.1042 14 12 14C10.8958 14 10 13.1042 10 12C10 10.8958 10.8958 10 12 10C13.1042 10 14 10.8958 14 12ZM19 10C17.8958 10 17 10.8958 17 12C17 13.1042 17.8958 14 19 14C20.1042 14 21 13.1042 21 12C21 10.8958 20.1042 10 19 10ZM5 10C3.89583 10 3 10.8958 3 12C3 13.1042 3.89583 14 5 14C6.10417 14 7 13.1042 7 12C7 10.8958 6.10417 10 5 10Z"
|
|
91
|
+
fill="#353531"
|
|
92
|
+
/>
|
|
93
|
+
</svg>
|
|
94
|
+
</slot>
|
|
95
|
+
</button>
|
|
96
|
+
<gds-popover
|
|
97
|
+
id="menu"
|
|
98
|
+
.open=${this.open}
|
|
99
|
+
.triggerRef=${this.elTriggerBtn}
|
|
100
|
+
.label=${this.label}
|
|
101
|
+
.placement=${this.placement}
|
|
102
|
+
@gds-ui-state=${(e) => this.open = e.detail.open}
|
|
103
|
+
>
|
|
104
|
+
<gds-menu
|
|
105
|
+
aria-label=${(_c = this.label) != null ? _c : this.buttonLabel}
|
|
106
|
+
@gds-menu-item-click=${__privateMethod(this, _handleItemClick, handleItemClick_fn)}
|
|
107
|
+
>
|
|
108
|
+
<slot allow="gds-menu-item gds-menu-heading"></slot>
|
|
109
|
+
</gds-menu>
|
|
110
|
+
</gds-popover>`;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
_handleItemClick = new WeakSet();
|
|
114
|
+
handleItemClick_fn = function() {
|
|
115
|
+
this.open = false;
|
|
116
|
+
};
|
|
117
|
+
GdsContextMenu.styles = [context_menu_styles_default];
|
|
118
|
+
GdsContextMenu.shadowRootOptions = {
|
|
119
|
+
mode: "open",
|
|
120
|
+
delegatesFocus: true
|
|
121
|
+
};
|
|
122
|
+
__decorateClass([
|
|
123
|
+
property({ type: Boolean, reflect: true })
|
|
124
|
+
], GdsContextMenu.prototype, "open", 2);
|
|
125
|
+
__decorateClass([
|
|
126
|
+
property({
|
|
127
|
+
attribute: "button-label"
|
|
128
|
+
})
|
|
129
|
+
], GdsContextMenu.prototype, "buttonLabel", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
property({
|
|
132
|
+
attribute: "show-label"
|
|
133
|
+
})
|
|
134
|
+
], GdsContextMenu.prototype, "showLabel", 2);
|
|
135
|
+
__decorateClass([
|
|
136
|
+
property()
|
|
137
|
+
], GdsContextMenu.prototype, "label", 2);
|
|
138
|
+
__decorateClass([
|
|
139
|
+
property()
|
|
140
|
+
], GdsContextMenu.prototype, "placement", 2);
|
|
141
|
+
__decorateClass([
|
|
142
|
+
state()
|
|
143
|
+
], GdsContextMenu.prototype, "_tStyles", 2);
|
|
144
|
+
__decorateClass([
|
|
145
|
+
queryAsync("#trigger")
|
|
146
|
+
], GdsContextMenu.prototype, "elTriggerBtn", 2);
|
|
147
|
+
GdsContextMenu = __decorateClass([
|
|
148
|
+
gdsCustomElement("gds-context-menu")
|
|
149
|
+
], GdsContextMenu);
|
|
150
|
+
|
|
151
|
+
export {
|
|
152
|
+
GdsContextMenu
|
|
153
|
+
};
|