@genexus/genexus-ide-ui 0.0.13 → 0.0.14

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 (77) hide show
  1. package/dist/cjs/ch-suggest_5.cjs.entry.js +388 -0
  2. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  3. package/dist/cjs/gx-ide-container_2.cjs.entry.js +168 -0
  4. package/dist/cjs/gx-ide-references.cjs.entry.js +299 -0
  5. package/dist/cjs/gx-ide-test.cjs.entry.js +2 -25
  6. package/dist/cjs/{gx-ide-container_10.cjs.entry.js → gxg-combo-box_8.cjs.entry.js} +0 -162
  7. package/dist/cjs/{gxg-tree-item.cjs.entry.js → gxg-tree_2.cjs.entry.js} +167 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/render-tree-25d5b8a1.js +29 -0
  10. package/dist/collection/collection-manifest.json +1 -0
  11. package/dist/collection/common/render-suggest.js +18 -0
  12. package/dist/collection/components/references/gx-ide-assets/references/langs/references.lang.en.json +15 -0
  13. package/dist/collection/components/references/gx-ide-assets/references/langs/references.lang.ja.json +3 -0
  14. package/dist/collection/components/references/gx-ide-assets/references/langs/references.lang.zh.json +3 -0
  15. package/dist/collection/components/references/helpers.js +76 -0
  16. package/dist/collection/components/references/references.css +194 -0
  17. package/dist/collection/components/references/references.js +377 -0
  18. package/dist/collection/index.js +1 -0
  19. package/dist/components/ch-suggest-list-item.js +1 -58
  20. package/dist/{esm/ch-suggest-list-item.entry.js → components/ch-suggest-list-item2.js} +27 -8
  21. package/dist/components/ch-suggest-list.js +1 -39
  22. package/dist/components/ch-suggest-list2.js +41 -0
  23. package/dist/components/ch-suggest.js +1 -259
  24. package/dist/{esm/ch-suggest.entry.js → components/ch-suggest2.js} +47 -8
  25. package/dist/components/gx-ide-references.d.ts +11 -0
  26. package/dist/components/gx-ide-references.js +433 -0
  27. package/dist/components/gx-ide-test.js +2 -25
  28. package/dist/components/gxg-suggest.js +1 -55
  29. package/dist/components/gxg-text.js +1 -88
  30. package/dist/components/index.d.ts +1 -0
  31. package/dist/components/index.js +1 -0
  32. package/dist/components/render-tree.js +27 -0
  33. package/dist/{esm/gxg-suggest.entry.js → components/suggest.js} +29 -10
  34. package/dist/{esm/gxg-text.entry.js → components/text.js} +30 -8
  35. package/dist/esm/ch-suggest_5.entry.js +380 -0
  36. package/dist/esm/genexus-ide-ui.js +1 -1
  37. package/dist/esm/gx-ide-container_2.entry.js +163 -0
  38. package/dist/esm/gx-ide-references.entry.js +295 -0
  39. package/dist/esm/gx-ide-test.entry.js +2 -25
  40. package/dist/esm/{gx-ide-container_10.entry.js → gxg-combo-box_8.entry.js} +2 -162
  41. package/dist/esm/{gxg-tree-item.entry.js → gxg-tree_2.entry.js} +168 -2
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm/render-tree-fc8636a3.js +27 -0
  44. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  45. package/dist/genexus-ide-ui/gx-ide-assets/references/langs/references.lang.en.json +15 -0
  46. package/dist/genexus-ide-ui/gx-ide-assets/references/langs/references.lang.ja.json +3 -0
  47. package/dist/genexus-ide-ui/gx-ide-assets/references/langs/references.lang.zh.json +3 -0
  48. package/dist/genexus-ide-ui/p-1e412d88.entry.js +1 -0
  49. package/dist/genexus-ide-ui/p-62814082.entry.js +1 -0
  50. package/dist/genexus-ide-ui/p-8cdad9e1.entry.js +1 -0
  51. package/dist/genexus-ide-ui/p-92b75873.entry.js +1 -0
  52. package/dist/genexus-ide-ui/p-a5fee36d.entry.js +1 -0
  53. package/dist/genexus-ide-ui/p-abee8c7b.js +1 -0
  54. package/dist/genexus-ide-ui/p-be9406e7.entry.js +1 -0
  55. package/dist/types/common/render-suggest.d.ts +2 -0
  56. package/dist/types/components/references/helpers.d.ts +17 -0
  57. package/dist/types/components/references/references.d.ts +125 -0
  58. package/dist/types/components.d.ts +78 -0
  59. package/dist/types/index.d.ts +1 -0
  60. package/package.json +1 -1
  61. package/dist/cjs/ch-suggest-list-item.cjs.entry.js +0 -45
  62. package/dist/cjs/ch-suggest-list.cjs.entry.js +0 -28
  63. package/dist/cjs/ch-suggest.cjs.entry.js +0 -226
  64. package/dist/cjs/gxg-suggest.cjs.entry.js +0 -42
  65. package/dist/cjs/gxg-text.cjs.entry.js +0 -72
  66. package/dist/cjs/gxg-tree.cjs.entry.js +0 -173
  67. package/dist/esm/ch-suggest-list.entry.js +0 -24
  68. package/dist/esm/gxg-tree.entry.js +0 -169
  69. package/dist/genexus-ide-ui/p-0a954e0f.entry.js +0 -1
  70. package/dist/genexus-ide-ui/p-20a45778.entry.js +0 -1
  71. package/dist/genexus-ide-ui/p-23d4b295.entry.js +0 -1
  72. package/dist/genexus-ide-ui/p-5463844e.entry.js +0 -1
  73. package/dist/genexus-ide-ui/p-5faaf0e5.entry.js +0 -1
  74. package/dist/genexus-ide-ui/p-7a5e0988.entry.js +0 -1
  75. package/dist/genexus-ide-ui/p-a985b448.entry.js +0 -1
  76. package/dist/genexus-ide-ui/p-ad9fe469.entry.js +0 -1
  77. package/dist/genexus-ide-ui/p-b3727324.entry.js +0 -1
@@ -1,226 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-93a6a7e0.js');
6
-
7
- const chSuggestCss = "*,::after,::before{box-sizing:border-box}:host{--window-max-height:none;--window-gap:50px}.main-wrapper{display:block}.label-input-wrapper{display:flex}.label-input-wrapper .input{flex:1}:host([label-position=start]) .label-input-wrapper{flex-direction:row}:host([label-position=above]) .label-input-wrapper{flex-direction:column}.input{background-color:unset;border:none;color:inherit;font:inherit;margin:0;padding:0;outline:0}.ch-window-container{position:relative}ch-window::part(window){width:100%;max-height:calc(var(--window-max-height) - var(--window-gap));overflow-y:auto}";
8
-
9
- const ARROW_DOWN = "ArrowDown";
10
- const ARROW_UP = "ArrowUp";
11
- const ChSuggest = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.valueChanged = index.createEvent(this, "valueChanged", 7);
15
- this.keyEventsDictionary = {
16
- ArrowDown: (e) => {
17
- const newFocusedItem = this.getNewFocusedItem(e.currentFocusedItem, ARROW_DOWN);
18
- const nextFocusedItem = this.getNewFocusedItem(newFocusedItem, ARROW_DOWN);
19
- newFocusedItem && newFocusedItem.focus();
20
- if (!nextFocusedItem) {
21
- /* This is the last item. Adjust window scroll to be at the very bottom*/
22
- this.scrollListToBottom();
23
- }
24
- },
25
- ArrowUp: (e) => {
26
- const newFocusedItem = this.getNewFocusedItem(e.currentFocusedItem, ARROW_UP);
27
- const nextFocusedItem = this.getNewFocusedItem(newFocusedItem, ARROW_UP);
28
- newFocusedItem && newFocusedItem.focus();
29
- if (!nextFocusedItem) {
30
- /* This is the first item. Adjust window scroll to be at the very top*/
31
- this.scrollListToTop();
32
- }
33
- }
34
- };
35
- // 3.STATE() VARIABLES //
36
- this.windowHidden = true;
37
- this.slotIsEmpty = true;
38
- // 4.PUBLIC PROPERTY API / WATCH'S //
39
- /**
40
- * The debounce amount in milliseconds (This is the time the suggest waits after the user has finished typing, to show the suggestions).
41
- */
42
- this.debounce = 500;
43
- /**
44
- * The label position
45
- */
46
- this.labelPosition = "start";
47
- /**
48
- * Whether or not to display the label
49
- */
50
- this.showLabel = true;
51
- /**
52
- * Wether or not the suggest has a header. The header will show the "suggestTitle" if provided, and a close button.
53
- */
54
- this.showHeader = false;
55
- /**
56
- * If true, it will position the cursor at the end when the input is focused.
57
- */
58
- this.cursorEnd = false;
59
- // 10.LOCAL METHODS //
60
- this.evaluateSlotIsEmpty = () => {
61
- this.slotIsEmpty = !this.el.firstElementChild;
62
- };
63
- this.setFocusOnFirstItem = () => {
64
- const firstItem = this.el.querySelector("ch-suggest-list-item");
65
- firstItem && firstItem.focus();
66
- };
67
- this.getChSuggestListItems = () => Array.from(this.el.querySelectorAll("ch-suggest-list-item"));
68
- this.getNewFocusedItem = (currentFocusedItem, direction) => {
69
- /* Helper function that returns the list item that should get focus (the first one, or the last one)*/
70
- const getListChild = (list) => {
71
- const listItems = list.querySelectorAll("ch-suggest-list-item");
72
- let listChild = listItems && listItems[listItems.length - 1];
73
- if (direction === ARROW_DOWN) {
74
- listChild = list.querySelector("ch-suggest-list-item");
75
- }
76
- else {
77
- const parentListItems = list.querySelectorAll("ch-suggest-list-item");
78
- listChild =
79
- parentListItems && parentListItems[parentListItems.length - 1];
80
- }
81
- return listChild;
82
- };
83
- if (!currentFocusedItem) {
84
- return;
85
- }
86
- let newFocusedItem = direction === ARROW_DOWN
87
- ? currentFocusedItem.nextElementSibling
88
- : currentFocusedItem.previousElementSibling;
89
- if ((newFocusedItem === null || newFocusedItem === void 0 ? void 0 : newFocusedItem.nodeName) === "CH-SUGGEST-LIST") {
90
- newFocusedItem = getListChild(newFocusedItem);
91
- }
92
- else if (!newFocusedItem) {
93
- /* this could be the last item of a list, but not the last item*/
94
- const parent = currentFocusedItem.parentElement;
95
- const sibling = direction === ARROW_DOWN
96
- ? parent.nextElementSibling
97
- : parent.previousElementSibling;
98
- const parentIsList = parent.nodeName === "CH-SUGGEST-LIST";
99
- if (parentIsList &&
100
- sibling &&
101
- sibling.nodeName === "CH-SUGGEST-LIST-ITEM") {
102
- newFocusedItem =
103
- direction === ARROW_DOWN
104
- ? parent.nextElementSibling
105
- : parent.previousElementSibling;
106
- }
107
- else if (parentIsList &&
108
- sibling &&
109
- sibling.nodeName === "CH-SUGGEST-LIST") {
110
- const parentList = direction === ARROW_DOWN
111
- ? parent.nextElementSibling
112
- : parent.previousElementSibling;
113
- let listChild;
114
- if (direction === ARROW_DOWN) {
115
- listChild = parentList.querySelector("ch-suggest-list-item");
116
- }
117
- else {
118
- listChild = getListChild(parentList);
119
- }
120
- newFocusedItem = listChild ? listChild : null;
121
- }
122
- }
123
- return newFocusedItem;
124
- };
125
- /**
126
- * Every time the input event is triggered, the value of the input is sent to processInputEvent, which is responsible for displaying a window with the suggested options. this.debounce is a delay that, along with clearTimeout, ensures that the window is only shown after the user has stopped typing.
127
- */
128
- this.handleInput = (e) => {
129
- this.value = e.target.value;
130
- if (this.timeoutReference) {
131
- clearTimeout(this.timeoutReference);
132
- }
133
- this.timeoutReference = setTimeout(() => {
134
- this.processInputEvent();
135
- }, this.debounce);
136
- };
137
- this.handleKeyDown = (e) => {
138
- if (e.key === ARROW_DOWN) {
139
- e.preventDefault();
140
- this.setFocusOnFirstItem();
141
- }
142
- };
143
- this.evaluateWindowMaxHeight = () => {
144
- const viewportHeight = window.innerHeight;
145
- const documentHeight = document.body.scrollHeight;
146
- const height = documentHeight >= viewportHeight ? documentHeight : viewportHeight;
147
- const inputBottomPosition = this.textInput.getBoundingClientRect().bottom + window.scrollY;
148
- const windowMaxHeight = height - inputBottomPosition + "px";
149
- this.el.style.setProperty("--window-max-height", windowMaxHeight);
150
- };
151
- this.scrollListToTop = () => {
152
- const partWindow = this.chWindow.shadowRoot.querySelector("[part='window']");
153
- partWindow.scrollTop = 0;
154
- };
155
- this.scrollListToBottom = () => {
156
- const partWindow = this.chWindow.shadowRoot.querySelector("[part='window']");
157
- partWindow.scrollTop = partWindow.scrollHeight;
158
- };
159
- this.processInputEvent = () => {
160
- this.evaluateWindowMaxHeight();
161
- this.chWindow.hidden = this.slotIsEmpty;
162
- };
163
- this.closeWindow = () => {
164
- this.chWindow.hidden = true;
165
- };
166
- this.onFocusHandler = () => {
167
- if (this.cursorEnd) {
168
- this.textInput.setSelectionRange(this.textInput.value.length, this.textInput.value.length);
169
- }
170
- };
171
- }
172
- watchValueHandler(newValue) {
173
- this.valueChanged.emit(newValue);
174
- }
175
- // 6.COMPONENT LIFECYCLE EVENTS //
176
- componentWillLoad() {
177
- this.evaluateSlotIsEmpty();
178
- }
179
- // 7.LISTENERS //
180
- itemSelectedHandler(event) {
181
- this.value = event.detail.value;
182
- this.closeWindow();
183
- }
184
- focusChangeAttemptHandler(event) {
185
- const keyEventHandler = this.keyEventsDictionary[event.detail.code];
186
- if (keyEventHandler) {
187
- const currentFocusedItem = event.detail.el;
188
- const chSuggestListItemsArray = this.getChSuggestListItems();
189
- const currentFocusedItemIndex = chSuggestListItemsArray.findIndex(item => {
190
- return item === currentFocusedItem;
191
- });
192
- const newItemToSetFocusOn = null;
193
- keyEventHandler({
194
- event: event.detail,
195
- currentFocusedItem: currentFocusedItem,
196
- chSuggestListItemsArray: chSuggestListItemsArray,
197
- currentFocusedItemIndex: currentFocusedItemIndex,
198
- newItemToSetFocusOn: newItemToSetFocusOn
199
- });
200
- }
201
- }
202
- windowClosedHandler() {
203
- this.textInput.focus();
204
- this.windowHidden = true;
205
- }
206
- // 9.PUBLIC METHODS API //
207
- /**
208
- * @description It selects/highlights the input text.
209
- */
210
- async selectInputText() {
211
- this.textInput.focus();
212
- this.textInput.select();
213
- }
214
- // 10.RENDER() FUNCTION //
215
- render() {
216
- return (index.h(index.Host, null, index.h("div", { class: "main-wrapper", part: "main-wrapper" }, index.h("div", { class: "label-input-wrapper", part: "label-input-wrapper" }, this.showLabel && this.label && (index.h("label", { id: "label", htmlFor: "input", part: "label" }, this.label)), index.h("input", { type: "text", id: "input", part: "input", class: "input", ref: el => (this.textInput = el), onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.onFocusHandler, value: this.value, autocomplete: "off", "aria-controls": "ch-window", "aria-label": !this.showLabel && this.label ? this.label : undefined, "aria-labelledby": this.showLabel && this.label ? "label" : undefined, "aria-expanded": this.windowHidden.toString() })), index.h("ch-window", { id: "ch-window", container: this.textInput, "close-on-outside-click": true, "close-on-escape": true, xAlign: "inside-start", yAlign: "outside-end", ref: el => (this.chWindow = el), showHeader: this.showHeader, caption: this.suggestTitle, exportparts: "\n header:header, \n caption:title, \n close:close-button,\n window:dropdown" }, index.h("slot", { onSlotchange: this.evaluateSlotIsEmpty })))));
217
- }
218
- static get delegatesFocus() { return true; }
219
- get el() { return index.getElement(this); }
220
- static get watchers() { return {
221
- "value": ["watchValueHandler"]
222
- }; }
223
- };
224
- ChSuggest.style = chSuggestCss;
225
-
226
- exports.ch_suggest = ChSuggest;
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-93a6a7e0.js');
6
- const store = require('./store-49485138.js');
7
- const form = require('./form-c5e161c6.js');
8
- const classesNames = require('./classesNames-5b7c6ad4.js');
9
-
10
- const stylesCss = "@charset \"UTF-8\";:root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-01--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-02{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-02--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-03{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-03--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-04{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-04--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-05{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}.gxg-title-05--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em;color:var(--color-on-primary)}.gxg-text{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-text--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-text--gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--gray-05)}.gxg-quote{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}.gxg-quote--negative{color:var(--color-on-primary)}.gxg-link{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--color-primary-hover)}.gxg-link:active{color:var(--color-primary-active)}.gxg-link-gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04)}.gxg-link-gray:hover{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04);color:var(--gray-06)}.gxg-alert-error{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-error-dark);display:inline-block}.gxg-alert-warning{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-warning-dark);display:inline-block}.gxg-alert-success{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-success-dark);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-button-styles{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}:host(.gxg-validation--warning) .form-element{border-color:var(--color-warning-dark)}:host(.gxg-validation--warning) .form-element:focus{outline-color:var(--color-warning-dark);border-color:var(--color-warning-dark)}:host(.gxg-validation--warning) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-warning-dark)}:host(.gxg-validation--error) .form-element{border-color:var(--color-error-dark)}:host(.gxg-validation--error) .form-element:focus{outline-color:var(--color-error-dark);border-color:var(--color-error-dark)}:host(.gxg-validation--error) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-error-dark)}:host(.gxg-validation--success) .form-element{border-color:var(--color-success-dark)}:host(.gxg-validation--success) .form-element:focus{outline-color:var(--color-success-dark);border-color:var(--color-success-dark)}:host(.gxg-validation--success) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-success-dark)}ch-suggest{font-family:var(--font-family-primary);font-size:var(--font-size-lg);color:var(--color-on-background);}ch-suggest::-webkit-scrollbar{width:6px;height:6px}ch-suggest::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}ch-suggest::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}ch-suggest::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}ch-suggest .gxg-scroll{display:block;overflow-y:auto;padding-right:2px}ch-suggest ::-webkit-scrollbar{width:6px;height:6px}ch-suggest ::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}ch-suggest ::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}ch-suggest ::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}ch-suggest::part(label){font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;display:flex;align-items:center;cursor:default;font-size:inherit}ch-suggest[label-position=start]::part(label){margin-inline-end:var(--gxg-label-margin-horizontal)}ch-suggest[label-position=above]::part(label){margin-block-end:var(--gxg-label-margin-vertical)}ch-suggest::part(input){height:var(--spacing-comp-05);border:var(--border-width-sm) solid var(--gxg-border-color--regular);padding:var(--spacing-comp-01) var(--spacing-comp-02);box-sizing:border-box;background-color:var(--color-background)}ch-suggest::part(input):focus{outline-style:solid;outline-color:var(--color-primary-active);outline-width:var(--border-width-md);outline-offset:-2px}ch-suggest::part(input):focus{outline-style:solid;outline-color:var(--color-primary-active);outline-width:var(--border-width-md);outline-offset:-2px}ch-suggest::part(header){display:block;padding-block-end:var(--spacing-comp-02);display:flex;justify-content:flex-end}ch-suggest::part(close-button){height:var(--spacing-comp-05);width:var(--spacing-comp-05);background-color:var(--color-background);color:var(--color-primary-hover);border:1px solid var(--color-primary-hover);box-sizing:border-box;cursor:pointer;display:block}ch-suggest::part(close-button):hover{background-color:var(--color-primary-hover-opacity-01)}ch-suggest::part(close-button)::after{content:\"✖\";width:100%;display:block;line-height:24px;text-align:center}ch-suggest::part(close-button):focus{outline-style:solid;outline-color:var(--color-primary-active);outline-width:var(--border-width-md);outline-offset:-2px}ch-suggest::part(dropdown){background-color:var(--color-background);margin-top:var(--spacing-comp-01);padding:var(--spacing-comp-02);box-shadow:var(--box-shadow-02);}ch-suggest::part(dropdown)::-webkit-scrollbar{width:6px;height:6px}ch-suggest::part(dropdown)::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}ch-suggest::part(dropdown)::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}ch-suggest::part(dropdown)::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}ch-suggest::part(dropdown) .gxg-scroll{display:block;overflow-y:auto;padding-right:2px}ch-suggest::part(dropdown) ::-webkit-scrollbar{width:6px;height:6px}ch-suggest::part(dropdown) ::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}ch-suggest::part(dropdown) ::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}ch-suggest::part(dropdown) ::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}.messages-wrapper{margin-top:var(--spacing-comp-02);display:flex;gap:var(--spacing-comp-01);flex-direction:column}gxg-suggest.gxg-validation--success ch-suggest::part(input){outline-color:var(--color-success-dark);border-color:var(--color-success-dark)}gxg-suggest.gxg-validation--success ch-suggest::part(input)+.checkmark{--checkmark-border-color:var(--color-success-dark)}gxg-suggest.gxg-validation--warning ch-suggest::part(input){outline-color:var(--color-warning-dark);border-color:var(--color-warning-dark)}gxg-suggest.gxg-validation--warning ch-suggest::part(input)+.checkmark{--checkmark-border-color:var(--color-warning-dark)}gxg-suggest.gxg-validation--error ch-suggest::part(input){outline-color:var(--color-error-dark);border-color:var(--color-error-dark)}gxg-suggest.gxg-validation--error ch-suggest::part(input)+.checkmark{--checkmark-border-color:var(--color-error-dark)}gxg-suggest.gxg--disabled ch-suggest{pointer-events:none}gxg-suggest.gxg--disabled ch-suggest::part(input){background-color:var(--gray-01);color:var(--color-on-disabled)}gxg-suggest[ellipsis]:not([ellipsis=false]) ch-suggest-list-item::part(content-wrapper){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}ch-suggest-list{margin:var(--spacing-comp-01) 0;font-family:inherit;border:var(--border-width-sm) solid var(--gxg-border-color--regular)}ch-suggest-list:first-child{margin-top:0}ch-suggest-list:last-child{margin-bottom:0}ch-suggest-list::part(title){text-transform:uppercase;font-weight:var(--font-weight-semibold);margin:var(--spacing-comp-01) 0 0 0;padding:var(--spacing-comp-01) var(--spacing-comp-02)}ch-suggest-list-item{}ch-suggest-list-item::part(button){padding:var(--spacing-comp-01) var(--spacing-comp-02);align-items:center;gap:var(--spacing-comp-01);box-sizing:border-box}ch-suggest-list-item::part(button):focus{outline-style:solid;outline-color:var(--color-primary-active);outline-width:var(--border-width-md);outline-offset:-2px}ch-suggest-list-item::part(description)::before{content:\" - \"}ch-suggest-list-item gxg-icon::part(ch-icon){--icon-size:16px;margin-right:2px}ch-suggest-list-item:hover{background-color:var(--gxg-background-color-item-hover)}";
11
-
12
- const GxgSuggest = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- /* VALIDATION */
16
- /**
17
- * The validation status
18
- */
19
- this.validationStatus = "indeterminate";
20
- /**
21
- * The presence of this attribute makes the suggest disabled.
22
- */
23
- this.disabled = false;
24
- /**
25
- * The presence of this attribute forces the suggest list items to not wrap to a second line, and it will display ellipsis. (...)
26
- */
27
- this.ellipsis = true;
28
- }
29
- render() {
30
- return (index.h(index.Host, { class: {
31
- large: store.state.large,
32
- [classesNames.formClasses["VALIDATION_INDETERMINATE_CLASS"]]: this.validationStatus === "indeterminate",
33
- [classesNames.formClasses["VALIDATION_WARNING_CLASS"]]: this.validationStatus === "warning",
34
- [classesNames.formClasses["VALIDATION_ERROR_CLASS"]]: this.validationStatus === "error",
35
- [classesNames.formClasses["VALIDATION_SUCCESS_CLASS"]]: this.validationStatus === "success",
36
- [classesNames.commonClassesNames["DISABLED_CLASS"]]: this.disabled,
37
- } }, index.h("slot", null), form.formMessageLogic(this)));
38
- }
39
- };
40
- GxgSuggest.style = stylesCss;
41
-
42
- exports.gxg_suggest = GxgSuggest;
@@ -1,72 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-93a6a7e0.js');
6
- const store = require('./store-49485138.js');
7
-
8
- const textCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-01--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-02{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-02--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-03{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-03--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-04{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-04--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-05{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}.gxg-title-05--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em;color:var(--color-on-primary)}.gxg-text{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-text--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-text--gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--gray-05)}.gxg-quote{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}.gxg-quote--negative{color:var(--color-on-primary)}.gxg-link{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--color-primary-hover)}.gxg-link:active{color:var(--color-primary-active)}.gxg-link-gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04)}.gxg-link-gray:hover{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04);color:var(--gray-06)}.gxg-alert-error{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-error-dark);display:inline-block}.gxg-alert-warning{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-warning-dark);display:inline-block}.gxg-alert-success{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-success-dark);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-button-styles{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}:host{display:block;font-size:14px}:host p,:host q,:host a{display:block;margin:0;padding:0;margin:0 auto}:host([text-align=start]){text-align:start}:host([text-align=start]) *{text-align:start}:host([text-align=center]){text-align:center}:host([text-align=center]) *{text-align:center}:host([text-align=end]){text-align:end}:host([text-align=end]) *{text-align:end}:host([padding=s]){padding:var(--spacing-comp-01)}:host([padding=m]){padding:var(--spacing-comp-02)}:host(.large) .gxg-text,:host(.large) .gxg-text--gray,:host(.large) .gxg-quote,:host(.large) .gxg-link,:host(.large) .gxg-link-gray,:host(.large) .gxg-alert-error,:host(.large) .gxg-alert-warning,:host(.large) .gxg-alert-success{font-size:var(--font-size-lg)}";
9
-
10
- const GxgText = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- /**
14
- * The target (for "link" or "link-gray" types
15
- * */
16
- this.target = "_self";
17
- /**
18
- * Text type
19
- */
20
- this.type = "text-regular";
21
- /**
22
- * Text alignment
23
- */
24
- this.textAlign = "start";
25
- /**
26
- * Text padding
27
- */
28
- this.padding = "none";
29
- /**
30
- * Max. width
31
- */
32
- this.maxWidth = "100%";
33
- }
34
- textType() {
35
- let text;
36
- switch (this.type) {
37
- case "text-regular":
38
- text = (index.h("p", { style: { maxWidth: this.maxWidth }, class: "gxg-text" }, index.h("slot", null)));
39
- break;
40
- case "text-gray":
41
- text = (index.h("p", { style: { maxWidth: this.maxWidth }, class: "gxg-text--gray" }, index.h("slot", null)));
42
- break;
43
- case "text-quote":
44
- text = (index.h("q", { style: { maxWidth: this.maxWidth }, class: "gxg-quote" }, index.h("slot", null)));
45
- break;
46
- case "text-link":
47
- text = (index.h("a", { style: { maxWidth: this.maxWidth }, href: this.href, target: this.target, class: "gxg-link" }, index.h("slot", null)));
48
- break;
49
- case "text-link-gray":
50
- text = (index.h("a", { style: { maxWidth: this.maxWidth }, href: this.href, target: this.target, class: "gxg-link-gray" }, index.h("slot", null)));
51
- break;
52
- case "text-alert-error":
53
- text = (index.h("p", { style: { maxWidth: this.maxWidth }, class: "gxg-alert-error" }, index.h("slot", null)));
54
- break;
55
- case "text-alert-warning":
56
- text = (index.h("p", { style: { maxWidth: this.maxWidth }, class: "gxg-alert-warning" }, index.h("slot", null)));
57
- break;
58
- case "text-alert-success":
59
- text = (index.h("p", { style: { maxWidth: this.maxWidth }, class: "gxg-alert-success" }, index.h("slot", null)));
60
- break;
61
- default:
62
- text = (index.h("p", { style: { maxWidth: this.maxWidth }, class: "gxg-text" }, index.h("slot", null)));
63
- }
64
- return text;
65
- }
66
- render() {
67
- return index.h(index.Host, { class: { large: store.state.large } }, this.textType(), " ");
68
- }
69
- };
70
- GxgText.style = textCss;
71
-
72
- exports.gxg_text = GxgText;
@@ -1,173 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-93a6a7e0.js');
6
-
7
- const gxgTreeCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-01--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-02{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-02--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-03{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-03--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-04{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-04--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-05{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}.gxg-title-05--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em;color:var(--color-on-primary)}.gxg-text{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-text--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-text--gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--gray-05)}.gxg-quote{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}.gxg-quote--negative{color:var(--color-on-primary)}.gxg-link{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--color-primary-hover)}.gxg-link:active{color:var(--color-primary-active)}.gxg-link-gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04)}.gxg-link-gray:hover{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04);color:var(--gray-06)}.gxg-alert-error{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-error-dark);display:inline-block}.gxg-alert-warning{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-warning-dark);display:inline-block}.gxg-alert-success{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-success-dark);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-button-styles{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}:host{display:block;--gxg-tree-item-inner-spacing:var(--spacing-comp-01);overflow:auto;height:100%}:host::-webkit-scrollbar{width:6px;height:6px}:host::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}:host::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}:host::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}:host .gxg-scroll{display:block;overflow-y:auto;padding-right:2px}:host ul{margin:0;padding-left:0;width:100%}";
8
-
9
- const GxgTree = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- //PROPS
13
- /**
14
- * Set this attribute if you want all the items to have a checkbox.
15
- */
16
- this.checkbox = true;
17
- /**
18
- * Set this attribute if you want all the items to be checked by default.
19
- */
20
- this.checked = false;
21
- /**
22
- * Set this attribute if you want all the items to be opened by default.
23
- */
24
- this.opened = true;
25
- /**
26
- * Set this attribute if you want all the items checkboxes to be toggled when the parent tree item checkbox is toggled.
27
- */
28
- this.toggleCheckboxes = false;
29
- /**
30
- * Set this attribute if you want to allow multi selection of the items. This property should only be set on the master tree.
31
- */
32
- this.multiSelection = false;
33
- /**
34
- * Indicates if this the is master tree
35
- */
36
- this.masterTree = false;
37
- /**
38
- * This method evaluates if this tree is the master tree
39
- */
40
- this.evaluateIsMasterTree = () => {
41
- var _a;
42
- const grandFather = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement;
43
- if (grandFather === undefined || grandFather.nodeName !== "GXG-TREE") {
44
- this.masterTree = true;
45
- }
46
- };
47
- this.initialConfig = () => {
48
- const parent = this.el.parentElement;
49
- if ((parent === null || parent === void 0 ? void 0 : parent.tagName) === "GXG-TREE-ITEM") {
50
- const treeItem = parent;
51
- this.checkbox =
52
- treeItem.checkbox !== undefined ? treeItem.checkbox : this.checkbox;
53
- this.checked =
54
- treeItem.checked !== undefined ? treeItem.checked : this.checked;
55
- this.opened =
56
- treeItem.opened !== undefined ? treeItem.opened : this.opened;
57
- this.toggleCheckboxes =
58
- treeItem.toggleCheckboxes !== undefined
59
- ? treeItem.toggleCheckboxes
60
- : this.toggleCheckboxes;
61
- }
62
- };
63
- }
64
- componentWillLoad() {
65
- //this.initialConfig();
66
- this.initialConfig();
67
- this.evaluateIsMasterTree();
68
- }
69
- selectionChangedHandler(e) {
70
- //Unselect all items, except the one that triggered this event. This action should be done once, by the master tree.
71
- if ((this.masterTree && !this.multiSelection) ||
72
- (this.masterTree && this.multiSelection && !e.detail.ctrlKey)) {
73
- const allChildren = this.el.querySelectorAll("gxg-tree-item");
74
- if (allChildren === null || allChildren === void 0 ? void 0 : allChildren.length) {
75
- Array.from(allChildren).forEach((item) => {
76
- item.selected = false;
77
- });
78
- }
79
- }
80
- }
81
- /**
82
- * Returns an array of the selected tree-items, providing the id, checked status, selected status, and label.
83
- */
84
- async getCheckedItems(idsArray) {
85
- const allTreeItems = Array.from(this.el.querySelectorAll("gxg-tree-item"));
86
- const checkedTreeItems = [];
87
- if (idsArray === null || idsArray === void 0 ? void 0 : idsArray.length) {
88
- idsArray.forEach((id) => {
89
- const found = allTreeItems.find((item) => id === item.id);
90
- found &&
91
- checkedTreeItems.push({
92
- id: found.id,
93
- label: found.label,
94
- checked: found.checked,
95
- selected: found.selected,
96
- });
97
- });
98
- }
99
- else {
100
- allTreeItems.forEach((item) => {
101
- item.checked &&
102
- checkedTreeItems.push({
103
- id: item.id,
104
- label: item.label,
105
- checked: item.checked,
106
- selected: item.selected,
107
- });
108
- });
109
- }
110
- return checkedTreeItems;
111
- }
112
- /**
113
- * Returns an array of the selected tree-items, providing the id, checked status, selected status, and label.
114
- */
115
- async getSelectedItems() {
116
- const selectedItems = [];
117
- const allItems = this.el.querySelectorAll("gxg-tree-item");
118
- if (allItems === null || allItems === void 0 ? void 0 : allItems.length) {
119
- Array.from(allItems).forEach((item) => {
120
- if (item.selected) {
121
- selectedItems.push({
122
- id: item.id,
123
- label: item.label,
124
- checked: item.checked,
125
- selected: item.selected,
126
- });
127
- }
128
- });
129
- }
130
- return selectedItems;
131
- }
132
- /**
133
- * @param ids: An array id the tree items to be toggled.
134
- * @param open: A boolean indicating that the tree item should be opened or closed. (optional)
135
- * @description This method is used to toggle a tree-item by the tree-item id/ids.
136
- * @returns a boolean value indicating if the selected tree-item is open or not, after the method was called.
137
- */
138
- async toggleItems(ids, open) {
139
- if (!(ids === null || ids === void 0 ? void 0 : ids.length)) {
140
- return [];
141
- }
142
- const allTreeItems = Array.from(this.el.querySelectorAll("gxg-tree-item"));
143
- const toggledTreeItems = [];
144
- ids.forEach((id) => {
145
- const found = allTreeItems.find((item) => id === item.id);
146
- if (found && open === undefined) {
147
- found.opened = !found.opened;
148
- }
149
- else if (found && open && !found.opened) {
150
- found.opened = true;
151
- }
152
- else if (found && !open && found.opened) {
153
- found.opened = false;
154
- }
155
- if (found) {
156
- toggledTreeItems.push({
157
- id: found.id,
158
- opened: found.opened,
159
- });
160
- }
161
- });
162
- return toggledTreeItems;
163
- }
164
- render() {
165
- return (index.h(index.Host, null, index.h("div", { class: {
166
- tree: true,
167
- } }, index.h("ul", { ref: (el) => (this.ulTree = el) }, index.h("slot", null)))));
168
- }
169
- get el() { return index.getElement(this); }
170
- };
171
- GxgTree.style = gxgTreeCss;
172
-
173
- exports.gxg_tree = GxgTree;
@@ -1,24 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-4f0a5746.js';
2
-
3
- const chSuggestListCss = "*,::after,::before{box-sizing:border-box}:host{display:block}.title{margin:0;font:inherit}.list{margin:0;padding:0}";
4
-
5
- const ChSuggestList = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- }
9
- // 2.REFERENCE TO ELEMENTS //
10
- // 3.STATE() VARIABLES //
11
- // 4.PUBLIC PROPERTY API / WATCH'S //
12
- // 5.EVENTS (EMIT) //
13
- // 6.COMPONENT LIFECYCLE EVENTS //
14
- // 7.LISTENERS //
15
- // 8.PUBLIC METHODS API //
16
- // 9.LOCAL METHODS //
17
- // 10.RENDER() FUNCTION //
18
- render() {
19
- return (h(Host, null, this.label && (h("h2", { id: "heading", part: "title", class: "title" }, this.label)), h("ul", { "aria-labelledby": this.label ? "heading" : undefined, part: "list", class: "list" }, h("slot", null))));
20
- }
21
- };
22
- ChSuggestList.style = chSuggestListCss;
23
-
24
- export { ChSuggestList as ch_suggest_list };