@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.
Files changed (124) hide show
  1. package/README.md +101 -7
  2. package/chunks/chunk.274BU2AI.js +244 -0
  3. package/chunks/chunk.2LQSDOD4.js +29 -0
  4. package/chunks/chunk.2ND5EWHE.js +65 -0
  5. package/chunks/chunk.2OOTOCUG.js +420 -0
  6. package/chunks/chunk.2WO4NHJ2.js +34 -0
  7. package/chunks/chunk.2Y3BHFKO.js +154 -0
  8. package/chunks/chunk.375BWME4.js +29 -0
  9. package/chunks/chunk.3SEVAGLE.js +96 -0
  10. package/chunks/chunk.522C22QY.js +460 -0
  11. package/chunks/chunk.5VURDMKE.js +75 -0
  12. package/chunks/chunk.6NM7ENKA.js +31 -0
  13. package/chunks/chunk.6UA66KQU.js +153 -0
  14. package/chunks/chunk.7P5N6NZL.js +560 -0
  15. package/chunks/chunk.7TCXY7BP.js +0 -0
  16. package/chunks/chunk.D7H7CUS4.js +55 -0
  17. package/chunks/chunk.DFYMYEGD.js +78 -0
  18. package/chunks/chunk.HS7ICQNA.js +0 -0
  19. package/chunks/chunk.IYCENQZG.js +28 -0
  20. package/chunks/chunk.J2A6J77W.js +81 -0
  21. package/chunks/chunk.KC32OWZE.js +274 -0
  22. package/chunks/chunk.KV4SDMFS.js +101 -0
  23. package/chunks/chunk.LUHCF4BJ.js +64 -0
  24. package/chunks/chunk.MAD5DQMN.js +161 -0
  25. package/chunks/chunk.MI4A2C2A.js +0 -0
  26. package/chunks/chunk.NOYHINYP.js +467 -0
  27. package/chunks/chunk.Q2T57HE7.js +0 -0
  28. package/chunks/chunk.QONSFT2N.js +4653 -0
  29. package/chunks/chunk.TMBQL2RO.js +0 -0
  30. package/chunks/chunk.TN6ZYAH3.js +74 -0
  31. package/chunks/chunk.TSDZQZBY.js +0 -0
  32. package/chunks/chunk.TX64TTBN.js +0 -0
  33. package/chunks/chunk.UF6IEONX.js +0 -0
  34. package/chunks/chunk.VOYMQ322.js +61 -0
  35. package/chunks/chunk.VYK7D6QO.js +64 -0
  36. package/chunks/chunk.WDZ2JTCP.js +360 -0
  37. package/chunks/chunk.WJDR7FTS.js +193 -0
  38. package/chunks/chunk.WM7HBMMV.js +54 -0
  39. package/chunks/chunk.XHTJVQUJ.js +140 -0
  40. package/chunks/chunk.XI4H54TV.js +39 -0
  41. package/chunks/chunk.XU4HZLJL.js +0 -0
  42. package/chunks/chunk.YIQIH4RW.js +139 -0
  43. package/chunks/chunk.YJHAKLGR.js +54 -0
  44. package/chunks/chunk.YO24ZYAD.js +0 -0
  45. package/chunks/chunk.ZTE73BY2.js +655 -0
  46. package/components/badge/badge.js +245 -0
  47. package/components/button/button.d.ts +5 -5
  48. package/components/button/button.js +18 -0
  49. package/components/button/button.trans.styles.d.ts +2 -0
  50. package/components/button/index.d.ts +1 -0
  51. package/components/button/index.js +18 -0
  52. package/components/checkbox/checkbox.js +219 -0
  53. package/components/context-menu/context-menu.d.ts +2 -1
  54. package/components/context-menu/context-menu.js +22 -0
  55. package/components/context-menu/index.d.ts +3 -0
  56. package/components/context-menu/index.js +29 -0
  57. package/components/datepicker/date-part-spinner.js +10 -0
  58. package/components/datepicker/datepicker.d.ts +3 -2
  59. package/components/datepicker/datepicker.js +29 -0
  60. package/components/datepicker/index.d.ts +1 -0
  61. package/components/datepicker/index.js +29 -0
  62. package/components/dropdown/dropdown.d.ts +2 -2
  63. package/components/dropdown/dropdown.js +22 -0
  64. package/components/dropdown/index.d.ts +3 -0
  65. package/components/dropdown/index.js +30 -0
  66. package/components/form-control.js +12 -0
  67. package/components/grid/grid.d.ts +2 -2
  68. package/components/grid/grid.js +11 -0
  69. package/components/grid/grid.style.css.js +7 -0
  70. package/components/grid/index.d.ts +1 -0
  71. package/components/grid/index.js +11 -0
  72. package/components/grouped-list/grouped-list.js +14 -0
  73. package/components/grouped-list/index.d.ts +2 -0
  74. package/components/grouped-list/index.js +17 -0
  75. package/components/grouped-list/list-item.js +10 -0
  76. package/components/icon/icon.d.ts +2 -2
  77. package/components/icon/icon.js +10 -0
  78. package/components/icon/index.d.ts +1 -0
  79. package/components/icon/index.js +10 -0
  80. package/components/index.d.ts +4 -3
  81. package/components/index.js +81 -0
  82. package/components/input/input.js +682 -0
  83. package/components/radio/radio-group.js +9 -0
  84. package/components/radio/radio.js +240 -0
  85. package/components/segmented-control/index.d.ts +1 -0
  86. package/components/segmented-control/index.js +15 -0
  87. package/components/segmented-control/segment/index.d.ts +1 -0
  88. package/components/segmented-control/segment/index.js +13 -0
  89. package/components/segmented-control/segment/segment.js +12 -0
  90. package/components/segmented-control/segmented-control.d.ts +1 -1
  91. package/components/segmented-control/segmented-control.js +15 -0
  92. package/components/switch/switch.js +164 -0
  93. package/components/theme/index.d.ts +1 -0
  94. package/components/theme/index.js +11 -0
  95. package/components/theme/theme.js +11 -0
  96. package/components/tooltip/tooltip.js +252 -0
  97. package/index.js +72 -4278
  98. package/localization.js +40 -44
  99. package/package.json +7 -16
  100. package/primitives/calendar/calendar.js +13 -0
  101. package/primitives/calendar/functions.js +7 -0
  102. package/primitives/calendar/index.d.ts +1 -0
  103. package/primitives/calendar/index.js +14 -0
  104. package/primitives/listbox/index.d.ts +0 -1
  105. package/primitives/listbox/index.js +17 -0
  106. package/primitives/listbox/listbox.d.ts +2 -1
  107. package/primitives/listbox/listbox.js +16 -0
  108. package/primitives/listbox/option.js +14 -0
  109. package/primitives/menu/index.d.ts +1 -0
  110. package/primitives/menu/index.js +15 -0
  111. package/primitives/menu/menu-heading.js +11 -0
  112. package/primitives/menu/menu-item.d.ts +1 -2
  113. package/primitives/menu/menu-item.js +12 -0
  114. package/primitives/menu/menu.d.ts +2 -1
  115. package/primitives/menu/menu.js +14 -0
  116. package/primitives/popover/index.js +14 -0
  117. package/primitives/popover/popover.js +13 -0
  118. package/primitives/ripple/index.d.ts +1 -0
  119. package/primitives/ripple/index.js +11 -0
  120. package/primitives/ripple/ripple.d.ts +1 -1
  121. package/primitives/ripple/ripple.js +10 -0
  122. package/scoping.d.ts +1 -0
  123. package/scoping.js +18 -0
  124. 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
+ };