@limetech/lime-elements 37.24.0 → 37.26.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 +21 -0
- package/dist/cjs/{dom-ee8ee17d.js → debounce-2e5f4b7e.js} +1 -31
- package/dist/cjs/debounce-2e5f4b7e.js.map +1 -0
- package/dist/cjs/dom-81eaa633.js +34 -0
- package/dist/cjs/dom-81eaa633.js.map +1 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/{limel-action-bar-item_2.cjs.entry.js → limel-action-bar_3.cjs.entry.js} +106 -1
- package/dist/cjs/limel-action-bar_3.cjs.entry.js.map +1 -0
- package/dist/cjs/{limel-breadcrumbs_3.cjs.entry.js → limel-breadcrumbs_4.cjs.entry.js} +519 -20
- package/dist/cjs/limel-breadcrumbs_4.cjs.entry.js.map +1 -0
- package/dist/cjs/{limel-input-field_3.cjs.entry.js → limel-dynamic-label_4.cjs.entry.js} +75 -494
- package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-picker.cjs.entry.js +3 -2
- package/dist/cjs/limel-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +154 -117
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-text-editor.cjs.entry.js +8 -2
- package/dist/cjs/limel-text-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +77 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js.map +1 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js +53 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-items.js.map +1 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +73 -82
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +34 -9
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
- package/dist/collection/components/text-editor/text-editor.css +172 -4
- package/dist/collection/components/text-editor/text-editor.js +7 -1
- package/dist/collection/components/text-editor/text-editor.js.map +1 -1
- package/dist/collection/style/internal/fieldset.scss +62 -0
- package/dist/esm/{dom-ae531ebc.js → debounce-9a05c91c.js} +2 -31
- package/dist/esm/debounce-9a05c91c.js.map +1 -0
- package/dist/esm/dom-0b0170a0.js +32 -0
- package/dist/esm/dom-0b0170a0.js.map +1 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/{limel-action-bar-item_2.entry.js → limel-action-bar_3.entry.js} +107 -3
- package/dist/esm/limel-action-bar_3.entry.js.map +1 -0
- package/dist/esm/{limel-breadcrumbs_3.entry.js → limel-breadcrumbs_4.entry.js} +501 -3
- package/dist/esm/limel-breadcrumbs_4.entry.js.map +1 -0
- package/dist/esm/{limel-input-field_3.entry.js → limel-dynamic-label_4.entry.js} +70 -490
- package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -0
- package/dist/esm/limel-picker.entry.js +2 -1
- package/dist/esm/limel-picker.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +154 -117
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/esm/limel-text-editor.entry.js +8 -2
- package/dist/esm/limel-text-editor.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/p-18c97232.js +2 -0
- package/dist/lime-elements/p-18c97232.js.map +1 -0
- package/dist/lime-elements/p-2bff59a1.entry.js +2 -0
- package/dist/lime-elements/p-2bff59a1.entry.js.map +1 -0
- package/dist/lime-elements/p-3ab8d3e9.entry.js +68 -0
- package/dist/lime-elements/p-3ab8d3e9.entry.js.map +1 -0
- package/dist/lime-elements/p-5e7b7b03.js +2 -0
- package/dist/lime-elements/p-5e7b7b03.js.map +1 -0
- package/dist/lime-elements/p-5fcdb9d2.entry.js +2 -0
- package/dist/lime-elements/{p-3e90be0a.entry.js.map → p-5fcdb9d2.entry.js.map} +1 -1
- package/dist/lime-elements/{p-5b2e8739.entry.js → p-db7ce0f8.entry.js} +2 -2
- package/dist/lime-elements/p-db7ce0f8.entry.js.map +1 -0
- package/dist/lime-elements/p-e4424368.entry.js +2 -0
- package/dist/lime-elements/p-e4424368.entry.js.map +1 -0
- package/dist/lime-elements/p-f1e1f867.entry.js +2 -0
- package/dist/lime-elements/p-f1e1f867.entry.js.map +1 -0
- package/dist/lime-elements/style/internal/fieldset.scss +62 -0
- package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-commands.d.ts +12 -0
- package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-items.d.ts +4 -0
- package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +4 -1
- package/dist/types/components/text-editor/text-editor.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/dom-ee8ee17d.js.map +0 -1
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js.map +0 -1
- package/dist/cjs/limel-action-bar.cjs.entry.js +0 -113
- package/dist/cjs/limel-action-bar.cjs.entry.js.map +0 -1
- package/dist/cjs/limel-breadcrumbs_3.cjs.entry.js.map +0 -1
- package/dist/cjs/limel-dynamic-label_2.cjs.entry.js +0 -91
- package/dist/cjs/limel-dynamic-label_2.cjs.entry.js.map +0 -1
- package/dist/cjs/limel-input-field_3.cjs.entry.js.map +0 -1
- package/dist/esm/dom-ae531ebc.js.map +0 -1
- package/dist/esm/limel-action-bar-item_2.entry.js.map +0 -1
- package/dist/esm/limel-action-bar.entry.js +0 -109
- package/dist/esm/limel-action-bar.entry.js.map +0 -1
- package/dist/esm/limel-breadcrumbs_3.entry.js.map +0 -1
- package/dist/esm/limel-dynamic-label_2.entry.js +0 -86
- package/dist/esm/limel-dynamic-label_2.entry.js.map +0 -1
- package/dist/esm/limel-input-field_3.entry.js.map +0 -1
- package/dist/lime-elements/p-3e90be0a.entry.js +0 -2
- package/dist/lime-elements/p-497a0b69.entry.js +0 -68
- package/dist/lime-elements/p-497a0b69.entry.js.map +0 -1
- package/dist/lime-elements/p-5b2e8739.entry.js.map +0 -1
- package/dist/lime-elements/p-6eeb61e4.entry.js +0 -2
- package/dist/lime-elements/p-6eeb61e4.entry.js.map +0 -1
- package/dist/lime-elements/p-714d6937.js +0 -2
- package/dist/lime-elements/p-714d6937.js.map +0 -1
- package/dist/lime-elements/p-a2d19673.entry.js +0 -2
- package/dist/lime-elements/p-a2d19673.entry.js.map +0 -1
- package/dist/lime-elements/p-af964180.entry.js +0 -2
- package/dist/lime-elements/p-af964180.entry.js.map +0 -1
- package/dist/lime-elements/p-caf959fe.entry.js +0 -2
- package/dist/lime-elements/p-caf959fe.entry.js.map +0 -1
- package/dist/lime-elements/p-da62cd3f.entry.js +0 -2
- package/dist/lime-elements/p-da62cd3f.entry.js.map +0 -1
|
@@ -1,8 +1,176 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
:host(limel-text-editor) {
|
|
2
|
-
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
width: 100%;
|
|
3
6
|
}
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
fieldset {
|
|
9
|
+
min-width: 0;
|
|
10
|
+
min-height: 0;
|
|
11
|
+
}
|
|
12
|
+
:host(limel-text-editor[readonly]) fieldset {
|
|
13
|
+
padding-block-start: 0.75rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* This file is imported into every component!
|
|
18
|
+
*
|
|
19
|
+
* Nothing in this file may output any CSS
|
|
20
|
+
* without being explicitly called by outside code.
|
|
21
|
+
*/
|
|
22
|
+
/*
|
|
23
|
+
* This file is imported into every component that uses MDC!
|
|
24
|
+
*
|
|
25
|
+
* Anything in this file that generates CSS output on its own,
|
|
26
|
+
* without being explicitly used, will output that CSS in every
|
|
27
|
+
* single component, increasing the size of the production build.
|
|
28
|
+
* Avoid that unless there's very good reason for it!
|
|
29
|
+
*/
|
|
30
|
+
/*
|
|
31
|
+
* This file is imported into every component that uses MDC!
|
|
32
|
+
*
|
|
33
|
+
* Anything in this file that generates CSS output on its own,
|
|
34
|
+
* without being explicitly used, will output that CSS in every
|
|
35
|
+
* single component, increasing the size of the production build.
|
|
36
|
+
* Avoid that unless there's very good reason for it!
|
|
37
|
+
*/
|
|
38
|
+
:host {
|
|
39
|
+
--mdc-theme-primary: var(
|
|
40
|
+
--lime-primary-color,
|
|
41
|
+
rgb(var(--color-teal-default))
|
|
42
|
+
);
|
|
43
|
+
--mdc-theme-secondary: var(
|
|
44
|
+
--lime-secondary-color,
|
|
45
|
+
rgb(var(--contrast-1100))
|
|
46
|
+
);
|
|
47
|
+
--mdc-theme-on-primary: var(
|
|
48
|
+
--lime-on-primary-color,
|
|
49
|
+
rgb(var(--contrast-100))
|
|
50
|
+
);
|
|
51
|
+
--mdc-theme-on-secondary: var(
|
|
52
|
+
--lime-on-secondary-color,
|
|
53
|
+
rgb(var(--contrast-100))
|
|
54
|
+
);
|
|
55
|
+
--mdc-theme-text-disabled-on-background: var(
|
|
56
|
+
--lime-text-disabled-on-background-color,
|
|
57
|
+
rgba(var(--contrast-1700), 0.38)
|
|
58
|
+
);
|
|
59
|
+
--mdc-theme-text-primary-on-background: var(
|
|
60
|
+
--lime-text-primary-on-background-color,
|
|
61
|
+
rgba(var(--contrast-1700), 0.87)
|
|
62
|
+
);
|
|
63
|
+
--mdc-theme-text-secondary-on-background: var(
|
|
64
|
+
--lime-text-secondary-on-background-color,
|
|
65
|
+
rgba(var(--contrast-1700), 0.54)
|
|
66
|
+
);
|
|
67
|
+
--mdc-theme-error: var(
|
|
68
|
+
--lime-error-background-color,
|
|
69
|
+
rgb(var(--color-red-dark))
|
|
70
|
+
);
|
|
71
|
+
--lime-error-text-color: rgb(var(--color-red-darker));
|
|
72
|
+
--mdc-theme-surface: var(
|
|
73
|
+
--lime-surface-background-color,
|
|
74
|
+
rgb(var(--contrast-100))
|
|
75
|
+
);
|
|
76
|
+
--mdc-theme-on-surface: var(
|
|
77
|
+
--lime-on-surface-color,
|
|
78
|
+
rgb(var(--contrast-1500))
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Note! This file is exported to `dist/scss/` in the published
|
|
84
|
+
* node module, for consumer projects to import.
|
|
85
|
+
* That means this file cannot import from any file that isn't
|
|
86
|
+
* also exported, keeping the same relative path.
|
|
87
|
+
*
|
|
88
|
+
* Or, just don't import anything, that works too.
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
92
|
+
*/
|
|
93
|
+
/**
|
|
94
|
+
* This mixin will mask out the content that is close to
|
|
95
|
+
* the edges of a scrollable area.
|
|
96
|
+
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
97
|
+
* as an argument for `$direction`.
|
|
98
|
+
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
99
|
+
* as an argument for `$direction`.
|
|
100
|
+
*
|
|
101
|
+
* For the visual effect to work smoothly, we need to make sure that
|
|
102
|
+
* the size of the fade-out edge effect is the same as the
|
|
103
|
+
* internal paddings of the scrollable area. Otherwise, content of a
|
|
104
|
+
* scrollable area that does not have a padding will fade out before
|
|
105
|
+
* any scrolling has been done.
|
|
106
|
+
* This is why this mixin already adds paddings, which automatically
|
|
107
|
+
* default to the size of the fade-out effect.
|
|
108
|
+
* This size defaults to `1rem`, but to override the size use
|
|
109
|
+
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
110
|
+
* when `vertically` argument is set, and use
|
|
111
|
+
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
112
|
+
* when `horizontally` argument is set.
|
|
113
|
+
* Of course you can also programmatically increase and decrease the
|
|
114
|
+
* size of these variables for each edge, based on the amount of
|
|
115
|
+
* scrolling that has been done by the user. In this case, make sure
|
|
116
|
+
* to add a custom padding where the mixin is used, to override
|
|
117
|
+
* the paddings that are automatically added by the mixin in the
|
|
118
|
+
* compiled CSS code.
|
|
119
|
+
*/
|
|
120
|
+
/**
|
|
121
|
+
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
122
|
+
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
123
|
+
* before using this mixin.
|
|
124
|
+
*/
|
|
125
|
+
/**
|
|
126
|
+
* This mixin creates a cross-browser font stack.
|
|
127
|
+
* - `sans-serif` can be used for the UI of the components.
|
|
128
|
+
* - `monospace` can be used for code.
|
|
129
|
+
*
|
|
130
|
+
* ⚠️ If we change the font stacks, we need to update
|
|
131
|
+
* 1. the consumer documentation in `README.md`, and
|
|
132
|
+
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
133
|
+
* in the `<style>` tag of `index.html`.
|
|
134
|
+
*/
|
|
135
|
+
fieldset {
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
transition: border-color 0.2s ease, background-color 0.2s ease;
|
|
138
|
+
border: 1px solid;
|
|
139
|
+
border-radius: 0.25rem;
|
|
140
|
+
margin-inline-start: 0;
|
|
141
|
+
margin-inline-end: 0;
|
|
142
|
+
padding-block-start: 0;
|
|
143
|
+
padding-inline-start: 0.75rem;
|
|
144
|
+
padding-inline-end: 0.75rem;
|
|
145
|
+
padding-block-end: 0.75rem;
|
|
146
|
+
}
|
|
147
|
+
fieldset:not([disabled]) {
|
|
148
|
+
border-color: rgba(var(--contrast-700), 0.65);
|
|
149
|
+
background-color: rgba(var(--contrast-200), 0.5);
|
|
150
|
+
}
|
|
151
|
+
fieldset:not([disabled]):hover {
|
|
152
|
+
border-color: rgba(var(--contrast-700), 1);
|
|
153
|
+
background-color: rgba(var(--contrast-200), 1);
|
|
154
|
+
}
|
|
155
|
+
fieldset:not([disabled]):focus-within {
|
|
156
|
+
border-color: var(--mdc-theme-primary);
|
|
157
|
+
}
|
|
158
|
+
fieldset[disabled] {
|
|
159
|
+
border-color: transparent;
|
|
160
|
+
}
|
|
161
|
+
fieldset:has(legend) {
|
|
162
|
+
margin-top: calc((-0.75rem / 2) + (1px / 2));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
legend {
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
text-overflow: ellipsis;
|
|
170
|
+
max-width: 100%;
|
|
171
|
+
color: rgba(var(--contrast-1200), 1);
|
|
172
|
+
font-size: 0.65rem;
|
|
173
|
+
letter-spacing: var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);
|
|
174
|
+
padding-inline-start: 0.25rem;
|
|
175
|
+
padding-inline-end: 0.25rem;
|
|
8
176
|
}
|
|
@@ -29,7 +29,7 @@ export class TextEditor {
|
|
|
29
29
|
this.value = undefined;
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return this.renderEditor();
|
|
32
|
+
return (h("fieldset", { disabled: this.readonly || this.disabled }, this.renderLabel(), this.renderEditor()));
|
|
33
33
|
}
|
|
34
34
|
renderEditor() {
|
|
35
35
|
if (this.readonly) {
|
|
@@ -37,6 +37,12 @@ export class TextEditor {
|
|
|
37
37
|
}
|
|
38
38
|
return (h("limel-prosemirror-adapter", { onChange: this.handleChange, value: this.value }));
|
|
39
39
|
}
|
|
40
|
+
renderLabel() {
|
|
41
|
+
if (!this.label) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
return h("legend", null, this.label);
|
|
45
|
+
}
|
|
40
46
|
static get is() { return "limel-text-editor"; }
|
|
41
47
|
static get encapsulation() { return "shadow"; }
|
|
42
48
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.js","sourceRoot":"","sources":["../../../src/components/text-editor/text-editor.tsx"],"names":[],"mappings":"AAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMJ","sourcesContent":["import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { FormComponent } from '../form/form.types';\n/**\n * A rich text editor that offers a rich text editing experience with markdown support,\n * in the sense that you can easily type markdown syntax and see the rendered\n * result as rich text in real-time. For instance, you can type `# Hello, world!`\n * and see it directly turning to a heading 1 (an `<h1>` HTML element).\n *\n * Naturally, you can use standard keyboard hotkeys such as <kbd>Ctrl</kbd> + <kbd>B</kbd>\n * to toggle bold text, <kbd>Ctrl</kbd> + <kbd>I</kbd> to toggle italic text, and so on.\n *\n * @exampleComponent limel-example-text-editor-basic\n * @exampleComponent limel-example-text-editor-as-form-component\n * @exampleComponent limel-example-text-editor-composite\n * @beta\n * @private\n */\n@Component({\n tag: 'limel-text-editor',\n shadow: true,\n styleUrl: 'text-editor.scss',\n})\nexport class TextEditor implements FormComponent<string> {\n /**\n * Set to `true` to disable the field.\n * Use `disabled` to indicate that the field can normally be interacted\n * with, but is currently disabled. This tells the user that if certain\n * requirements are met, the field may become enabled again.\n */\n @Prop({ reflect: true })\n public disabled?: boolean;\n\n /**\n * Set to `true` to make the component read-only.\n * Use `readonly` when the field is only there to present the data it holds,\n * and will not become possible for the current user to edit.\n * :::note\n * Consider that it might be better to use `limel-markdown`\n * instead of `limel-text-editor` when the goal is visualizing data.\n * :::\n */\n @Prop({ reflect: true })\n public readonly?: boolean;\n\n /**\n * Optional helper text to display below the input field when it has focus\n */\n @Prop({ reflect: true })\n public helperText?: string;\n\n /**\n * The placeholder text shown inside the input field,\n * when the field is empty.\n */\n @Prop({ reflect: true })\n public placeholder?: string;\n\n /**\n * The label of the editor\n */\n @Prop({ reflect: true })\n public label?: string;\n\n /**\n * Set to `true` to indicate that the current value of the editor is\n * invalid.\n */\n @Prop({ reflect: true })\n public invalid?: boolean;\n\n /**\n * Description of the text inside the editor as serialised HTML\n */\n @Prop({ reflect: true })\n public value: string;\n\n /**\n * Dispatched when a change is made to the editor\n */\n @Event()\n public change: EventEmitter<string>;\n\n public render() {\n return (\n <fieldset disabled={this.readonly || this.disabled}>\n {this.renderLabel()}\n {this.renderEditor()}\n </fieldset>\n );\n }\n\n private renderEditor() {\n if (this.readonly) {\n return <limel-markdown value={this.value} />;\n }\n\n return (\n <limel-prosemirror-adapter\n onChange={this.handleChange}\n value={this.value}\n />\n );\n }\n\n private renderLabel() {\n if (!this.label) {\n return;\n }\n\n return <legend>{this.label}</legend>;\n }\n\n private handleChange = () => (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.change.emit(event.detail);\n };\n}\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@use './shared_input-select-picker.scss';
|
|
2
|
+
@use '../mixins.scss';
|
|
3
|
+
|
|
4
|
+
$_thickness-of-the-border: 1px;
|
|
5
|
+
|
|
6
|
+
fieldset {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
transition:
|
|
9
|
+
border-color 0.2s ease,
|
|
10
|
+
background-color 0.2s ease;
|
|
11
|
+
border: $_thickness-of-the-border solid;
|
|
12
|
+
border-radius: 0.25rem;
|
|
13
|
+
|
|
14
|
+
margin-inline-start: 0;
|
|
15
|
+
margin-inline-end: 0;
|
|
16
|
+
padding-block-start: 0;
|
|
17
|
+
padding-inline-start: 0.75rem;
|
|
18
|
+
padding-inline-end: 0.75rem;
|
|
19
|
+
padding-block-end: 0.75rem;
|
|
20
|
+
|
|
21
|
+
&:not([disabled]) {
|
|
22
|
+
border-color: shared_input-select-picker.$lime-text-field-outline-color;
|
|
23
|
+
background-color: shared_input-select-picker.$background-color-normal;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
border-color: shared_input-select-picker.$lime-text-field-outline-color--hovered;
|
|
27
|
+
background-color: shared_input-select-picker.$background-color-hovered;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:focus-within {
|
|
31
|
+
border-color: shared_input-select-picker.$lime-text-field-outline-color--focused;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[disabled] {
|
|
36
|
+
border-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:has(legend) {
|
|
40
|
+
// In input fields, the `label`s are optional,
|
|
41
|
+
// and we use the `legend` to render the `label`.
|
|
42
|
+
// This ensures that when or if the label appears,
|
|
43
|
+
// the field doesn't visually move down in the DOM.
|
|
44
|
+
$_height-of-the-legend: -0.75rem;
|
|
45
|
+
margin-top: calc(
|
|
46
|
+
(#{$_height-of-the-legend} / 2) + (#{$_thickness-of-the-border} / 2)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
legend {
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
@include mixins.truncate-text;
|
|
54
|
+
max-width: 100%;
|
|
55
|
+
|
|
56
|
+
color: shared_input-select-picker.$label-color;
|
|
57
|
+
font-size: 0.65rem; // `10.4px` similar to MDC's floating label
|
|
58
|
+
letter-spacing: var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);
|
|
59
|
+
|
|
60
|
+
padding-inline-start: 0.25rem;
|
|
61
|
+
padding-inline-end: 0.25rem;
|
|
62
|
+
}
|
|
@@ -207,35 +207,6 @@ function debounce(func, wait, options) {
|
|
|
207
207
|
return debounced;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
* Check if an element is a descendant of another, even if it is located within a shadow root
|
|
212
|
-
*
|
|
213
|
-
* @param element - The element to check
|
|
214
|
-
* @param parent - The parent element
|
|
215
|
-
* @returns True if the element is a descendant of the parent element, false otherwise
|
|
216
|
-
*/
|
|
217
|
-
function isDescendant(element, parent) {
|
|
218
|
-
if (!parent) {
|
|
219
|
-
return false;
|
|
220
|
-
}
|
|
221
|
-
if (parent.contains(element)) {
|
|
222
|
-
return true;
|
|
223
|
-
}
|
|
224
|
-
let currentNode = element;
|
|
225
|
-
let i = 0; // Just in case something weird happens, let's not crash the browser…
|
|
226
|
-
const DEPTH = 1000; // Max depth to search.
|
|
227
|
-
while (i < DEPTH &&
|
|
228
|
-
currentNode &&
|
|
229
|
-
currentNode.getRootNode().nodeName === '#document-fragment') {
|
|
230
|
-
currentNode = currentNode.getRootNode().host;
|
|
231
|
-
if (parent.contains(currentNode)) {
|
|
232
|
-
return true;
|
|
233
|
-
}
|
|
234
|
-
i += 1;
|
|
235
|
-
}
|
|
236
|
-
return parent.contains(currentNode);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export { debounce as d, isDescendant as i };
|
|
210
|
+
export { debounce as d };
|
|
240
211
|
|
|
241
|
-
//# sourceMappingURL=
|
|
212
|
+
//# sourceMappingURL=debounce-9a05c91c.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"debounce-9a05c91c.js","mappings":";;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,GAAG,WAAW;AACrB,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC;;AChBD;AACA,IAAI,eAAe,GAAG,qBAAqB,CAAC;AAC5C;AACA;AACA,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG;AACxB,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;AACvC,EAAE,IAAI,QAAQ;AACd,MAAM,QAAQ;AACd,MAAM,OAAO;AACb,MA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AI,CAAC,CAAC;AAC/C,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG;AACH,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,EAAE,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;AAC1B,EAAE,OAAO,SAAS,CAAC;AACnB;;;;","names":[],"sources":["./node_modules/lodash-es/now.js","./node_modules/lodash-es/debounce.js"],"sourcesContent":["import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n"],"version":3}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if an element is a descendant of another, even if it is located within a shadow root
|
|
3
|
+
*
|
|
4
|
+
* @param element - The element to check
|
|
5
|
+
* @param parent - The parent element
|
|
6
|
+
* @returns True if the element is a descendant of the parent element, false otherwise
|
|
7
|
+
*/
|
|
8
|
+
function isDescendant(element, parent) {
|
|
9
|
+
if (!parent) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
if (parent.contains(element)) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
let currentNode = element;
|
|
16
|
+
let i = 0; // Just in case something weird happens, let's not crash the browser…
|
|
17
|
+
const DEPTH = 1000; // Max depth to search.
|
|
18
|
+
while (i < DEPTH &&
|
|
19
|
+
currentNode &&
|
|
20
|
+
currentNode.getRootNode().nodeName === '#document-fragment') {
|
|
21
|
+
currentNode = currentNode.getRootNode().host;
|
|
22
|
+
if (parent.contains(currentNode)) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
i += 1;
|
|
26
|
+
}
|
|
27
|
+
return parent.contains(currentNode);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { isDescendant as i };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=dom-0b0170a0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"dom-0b0170a0.js","mappings":"AAAA;;;;;;;SAOgB,YAAY,CAAC,OAAa,EAAE,MAAY;EACpD,IAAI,CAAC,MAAM,EAAE;IACT,OAAO,KAAK,CAAC;GAChB;EAED,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;IAC1B,OAAO,IAAI,CAAC;GACf;EAED,IAAI,WAAW,GAAS,OAAO,CAAC;EAChC,IAAI,CAAC,GAAG,CAAC,CAAC;EACV,MAAM,KAAK,GAAG,IAAI,CAAC;EAEnB,OACI,CAAC,GAAG,KAAK;IACT,WAAW;IACX,WAAW,CAAC,WAAW,EAAE,CAAC,QAAQ,KAAK,oBAAoB,EAC7D;IACE,WAAW,GAAI,WAAW,CAAC,WAAW,EAAU,CAAC,IAAI,CAAC;IACtD,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;MAC9B,OAAO,IAAI,CAAC;KACf;IAED,CAAC,IAAI,CAAC,CAAC;GACV;EAED,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACxC;;;;","names":[],"sources":["./src/util/dom.ts"],"sourcesContent":["/**\n * Check if an element is a descendant of another, even if it is located within a shadow root\n *\n * @param element - The element to check\n * @param parent - The parent element\n * @returns True if the element is a descendant of the parent element, false otherwise\n */\nexport function isDescendant(element: Node, parent: Node): boolean {\n if (!parent) {\n return false;\n }\n\n if (parent.contains(element)) {\n return true;\n }\n\n let currentNode: Node = element;\n let i = 0; // Just in case something weird happens, let's not crash the browser…\n const DEPTH = 1000; // Max depth to search.\n\n while (\n i < DEPTH &&\n currentNode &&\n currentNode.getRootNode().nodeName === '#document-fragment'\n ) {\n currentNode = (currentNode.getRootNode() as any).host;\n if (parent.contains(currentNode)) {\n return true;\n }\n\n i += 1;\n }\n\n return parent.contains(currentNode);\n}\n"],"version":3}
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return bootstrapLazy(JSON.parse("[[\"limel-action-bar\",[[1,\"limel-action-bar\",{\"actions\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"layout\":[513],\"openDirection\":[513,\"open-direction\"],\"overflowCutoff\":[32]}]]],[\"limel-split-button\",[[1,\"limel-split-button\",{\"label\":[513],\"primary\":[516],\"icon\":[513],\"disabled\":[516],\"items\":[16]}]]],[\"limel-file-viewer\",[[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]}]]],[\"limel-color-picker\",[[1,\"limel-color-picker\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"tooltipLabel\":[513,\"tooltip-label\"],\"required\":[516],\"readonly\":[516],\"isOpen\":[32]}]]],[\"limel-picker\",[[1,\"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\"],\"required\":[4],\"invalid\":[516],\"value\":[16],\"searcher\":[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]}]]],[\"limel-date-picker\",[[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],\"formattedValue\":[32],\"internalFormat\":[32],\"showPortal\":[32]}]]],[\"limel-dock\",[[1,\"limel-dock\",{\"dockItems\":[16],\"dockFooterItems\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"expanded\":[516],\"allowResize\":[516,\"allow-resize\"],\"mobileBreakPoint\":[514,\"mobile-break-point\"],\"useMobileLayout\":[32]}]]],[\"limel-file\",[[1,\"limel-file\",{\"value\":[16],\"label\":[513],\"required\":[516],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"accept\":[513],\"language\":[1]}]]],[\"limel-snackbar\",[[1,\"limel-snackbar\",{\"message\":[1],\"timeout\":[2],\"actionText\":[1,\"action-text\"],\"dismissible\":[4],\"multiline\":[4],\"language\":[1],\"show\":[64]}]]],[\"limel-tab-panel\",[[1,\"limel-tab-panel\",{\"tabs\":[1040]}]]],[\"limel-select\",[[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]}]]],[\"limel-button-group\",[[1,\"limel-button-group\",{\"value\":[16],\"disabled\":[516],\"selectedButtonId\":[32]}]]],[\"limel-collapsible-section\",[[1,\"limel-collapsible-section\",{\"isOpen\":[1540,\"is-open\"],\"header\":[513],\"actions\":[16]}]]],[\"limel-help\",[[1,\"limel-help\",{\"value\":[1],\"trigger\":[1],\"readMoreLink\":[16],\"openDirection\":[513,\"open-direction\"],\"isOpen\":[32]}]]],[\"limel-table\",[[1,\"limel-table\",{\"data\":[16],\"columns\":[16],\"mode\":[1],\"layout\":[1],\"pageSize\":[2,\"page-size\"],\"totalRows\":[2,\"total-rows\"],\"sorting\":[16],\"activeRow\":[1040],\"movableColumns\":[4,\"movable-columns\"],\"loading\":[4],\"page\":[2],\"emptyMessage\":[1,\"empty-message\"],\"aggregates\":[16],\"selectable\":[4],\"selection\":[16]}]]],[\"limel-circular-progress\",[[1,\"limel-circular-progress\",{\"value\":[2],\"maxValue\":[2,\"max-value\"],\"prefix\":[513],\"suffix\":[1],\"displayPercentageColors\":[4,\"display-percentage-colors\"],\"size\":[513]}]]],[\"limel-icon\",[[1,\"limel-icon\",{\"size\":[513],\"name\":[513],\"badge\":[516]}]]],[\"limel-info-tile\",[[1,\"limel-info-tile\",{\"value\":[520],\"icon\":[1],\"label\":[513],\"prefix\":[513],\"suffix\":[513],\"disabled\":[516],\"badge\":[520],\"loading\":[516],\"link\":[16],\"progress\":[16]}]]],[\"limel-switch\",[[1,\"limel-switch\",{\"label\":[513],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"value\":[516],\"helperText\":[513,\"helper-text\"],\"readonlyLabels\":[16],\"fieldId\":[32]}]]],[\"limel-header\",[[1,\"limel-header\",{\"icon\":[1],\"heading\":[1],\"subheading\":[1],\"supportingText\":[1,\"supporting-text\"],\"subheadingDivider\":[1,\"subheading-divider\"]}]]],[\"limel-dialog\",[[1,\"limel-dialog\",{\"heading\":[1],\"fullscreen\":[516],\"open\":[1540],\"closingActions\":[16]}]]],[\"limel-progress-flow\",[[1,\"limel-progress-flow\",{\"flowItems\":[16],\"disabled\":[4],\"readonly\":[4]}]]],[\"limel-shortcut\",[[1,\"limel-shortcut\",{\"icon\":[513],\"label\":[513],\"disabled\":[516],\"badge\":[520],\"link\":[16]}]]],[\"limel-text-editor\",[[1,\"limel-text-editor\",{\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"value\":[513]}]]],[\"limel-banner\",[[1,\"limel-banner\",{\"message\":[513],\"icon\":[513],\"isOpen\":[32],\"open\":[64],\"close\":[64]}]]],[\"limel-callout\",[[1,\"limel-callout\",{\"heading\":[513],\"icon\":[513],\"type\":[513],\"language\":[1]}]]],[\"limel-badge\",[[1,\"limel-badge\",{\"label\":[520]}]]],[\"limel-dynamic-label_2\",[[1,\"limel-dynamic-label\",{\"value\":[8],\"defaultLabel\":[16],\"labels\":[16]}],[1,\"limel-helper-line\",{\"helperText\":[513,\"helper-text\"],\"length\":[514],\"maxLength\":[514,\"max-length\"],\"invalid\":[516],\"helperTextId\":[513,\"helper-text-id\"]}]]],[\"limel-slider\",[[1,\"limel-slider\",{\"disabled\":[516],\"readonly\":[516],\"factor\":[514],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"unit\":[513],\"value\":[514],\"valuemax\":[514],\"valuemin\":[514],\"step\":[514],\"percentageClass\":[32]}]]],[\"limel-code-editor\",[[1,\"limel-code-editor\",{\"value\":[1],\"language\":[1],\"readonly\":[4],\"lineNumbers\":[4,\"line-numbers\"],\"fold\":[4],\"lint\":[4],\"colorScheme\":[1,\"color-scheme\"],\"random\":[32]}]]],[\"limel-config\",[[1,\"limel-config\",{\"config\":[16]}]]],[\"limel-flex-container\",[[1,\"limel-flex-container\",{\"direction\":[513],\"justify\":[513],\"align\":[513],\"reverse\":[516]}]]],[\"limel-form\",[[1,\"limel-form\",{\"schema\":[16],\"value\":[16],\"disabled\":[4],\"propsFactory\":[16],\"transformErrors\":[16],\"errors\":[16]}]]],[\"limel-grid\",[[1,\"limel-grid\"]]],[\"limel-color-picker-palette\",[[17,\"limel-color-picker-palette\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516]}]]],[\"limel-dock-button\",[[0,\"limel-dock-button\",{\"item\":[16],\"expanded\":[516],\"useMobileLayout\":[516,\"use-mobile-layout\"],\"isOpen\":[32]}]]],[\"limel-icon-button\",[[1,\"limel-icon-button\",{\"icon\":[513],\"elevated\":[516],\"label\":[513],\"disabled\":[516]}]]],[\"limel-tab-bar\",[[1,\"limel-tab-bar\",{\"tabs\":[1040],\"canScrollLeft\":[32],\"canScrollRight\":[32]},[[9,\"resize\",\"handleWindowResize\"]]]]],[\"limel-checkbox\",[[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]}]]],[\"limel-help-content\",[[1,\"limel-help-content\",{\"value\":[1],\"readMoreLink\":[16]}]]],[\"limel-progress-flow-item\",[[0,\"limel-progress-flow-item\",{\"item\":[16],\"disabled\":[4],\"readonly\":[4],\"currentStep\":[4,\"current-step\"]}]]],[\"limel-flatpickr-adapter\",[[1,\"limel-flatpickr-adapter\",{\"value\":[16],\"type\":[1],\"format\":[1],\"isOpen\":[4,\"is-open\"],\"inputElement\":[16],\"language\":[1],\"formatter\":[16]}]]],[\"limel-prosemirror-adapter\",[[1,\"limel-prosemirror-adapter\",{\"value\":[1],\"view\":[32]}]]],[\"limel-breadcrumbs_3\",[[1,\"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],\"emptyResultMessage\":[1,\"empty-result-message\"],\"loadingSubItems\":[32],\"searchValue\":[32],\"searchResults\":[32]}],[1,\"limel-breadcrumbs\",{\"items\":[16],\"divider\":[1]}],[1,\"limel-menu-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"],\"type\":[1],\"maxLinesSecondaryText\":[2,\"max-lines-secondary-text\"]}]]],[\"limel-action-bar-item_2\",[[0,\"limel-action-bar-overflow-menu\",{\"items\":[16],\"openDirection\":[513,\"open-direction\"]}],[0,\"limel-action-bar-item\",{\"item\":[16],\"isVisible\":[516,\"is-visible\"]}]]],[\"limel-button\",[[1,\"limel-button\",{\"label\":[513],\"primary\":[516],\"outlined\":[516],\"icon\":[513],\"disabled\":[516],\"loading\":[516],\"loadingFailed\":[516,\"loading-failed\"],\"justLoaded\":[32]}]]],[\"limel-file-dropzone_2\",[[1,\"limel-file-dropzone\",{\"accept\":[513],\"disabled\":[4],\"text\":[1],\"helperText\":[1,\"helper-text\"],\"hasFileToDrop\":[32]}],[1,\"limel-file-input\",{\"accept\":[513],\"disabled\":[516],\"multiple\":[516]}]]],[\"limel-markdown\",[[1,\"limel-markdown\",{\"value\":[1]}]]],[\"limel-linear-progress\",[[1,\"limel-linear-progress\",{\"value\":[514],\"indeterminate\":[516]}]]],[\"limel-chip_2\",[[1,\"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\"],\"clearAllButton\":[4,\"clear-all-button\"],\"leadingIcon\":[513,\"leading-icon\"],\"delimiter\":[513],\"language\":[1],\"editMode\":[32],\"textValue\":[32],\"blurred\":[32],\"inputChipIndexSelected\":[32],\"selectedChipIds\":[32],\"getEditMode\":[64],\"setFocus\":[64],\"emptyInput\":[64]}],[1,\"limel-chip\",{\"language\":[513],\"text\":[513],\"icon\":[1],\"link\":[16],\"badge\":[520],\"disabled\":[516],\"readonly\":[516],\"selected\":[516],\"invalid\":[516],\"removable\":[516],\"type\":[513],\"loading\":[516],\"progress\":[514],\"identifier\":[520]}]]],[\"limel-portal_3\",[[1,\"limel-tooltip\",{\"elementId\":[513,\"element-id\"],\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"maxlength\":[514],\"openDirection\":[513,\"open-direction\"],\"open\":[32]}],[1,\"limel-tooltip-content\",{\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"maxlength\":[514]}],[1,\"limel-portal\",{\"openDirection\":[513,\"open-direction\"],\"position\":[513],\"containerId\":[513,\"container-id\"],\"containerStyle\":[16],\"parent\":[16],\"inheritParentWidth\":[516,\"inherit-parent-width\"],\"visible\":[516],\"anchor\":[16]}]]],[\"limel-popover_2\",[[1,\"limel-popover\",{\"open\":[4],\"openDirection\":[513,\"open-direction\"]}],[1,\"limel-popover-surface\",{\"contentCollection\":[16]}]]],[\"limel-spinner\",[[1,\"limel-spinner\",{\"size\":[513],\"limeBranded\":[4,\"lime-branded\"]}]]],[\"limel-input-field_3\",[[1,\"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],\"isModified\":[32],\"showCompletions\":[32]}],[1,\"limel-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"],\"type\":[1],\"maxLinesSecondaryText\":[2,\"max-lines-secondary-text\"]}],[1,\"limel-menu-surface\",{\"open\":[4],\"allowClicksElement\":[16]}]]]]"), options);
|
|
20
|
+
return bootstrapLazy(JSON.parse("[[\"limel-text-editor\",[[1,\"limel-text-editor\",{\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"value\":[513]}]]],[\"limel-split-button\",[[1,\"limel-split-button\",{\"label\":[513],\"primary\":[516],\"icon\":[513],\"disabled\":[516],\"items\":[16]}]]],[\"limel-file-viewer\",[[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]}]]],[\"limel-color-picker\",[[1,\"limel-color-picker\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"tooltipLabel\":[513,\"tooltip-label\"],\"required\":[516],\"readonly\":[516],\"isOpen\":[32]}]]],[\"limel-picker\",[[1,\"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\"],\"required\":[4],\"invalid\":[516],\"value\":[16],\"searcher\":[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]}]]],[\"limel-date-picker\",[[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],\"formattedValue\":[32],\"internalFormat\":[32],\"showPortal\":[32]}]]],[\"limel-dock\",[[1,\"limel-dock\",{\"dockItems\":[16],\"dockFooterItems\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"expanded\":[516],\"allowResize\":[516,\"allow-resize\"],\"mobileBreakPoint\":[514,\"mobile-break-point\"],\"useMobileLayout\":[32]}]]],[\"limel-file\",[[1,\"limel-file\",{\"value\":[16],\"label\":[513],\"required\":[516],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"accept\":[513],\"language\":[1]}]]],[\"limel-snackbar\",[[1,\"limel-snackbar\",{\"message\":[1],\"timeout\":[2],\"actionText\":[1,\"action-text\"],\"dismissible\":[4],\"multiline\":[4],\"language\":[1],\"show\":[64]}]]],[\"limel-tab-panel\",[[1,\"limel-tab-panel\",{\"tabs\":[1040]}]]],[\"limel-select\",[[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]}]]],[\"limel-button-group\",[[1,\"limel-button-group\",{\"value\":[16],\"disabled\":[516],\"selectedButtonId\":[32]}]]],[\"limel-collapsible-section\",[[1,\"limel-collapsible-section\",{\"isOpen\":[1540,\"is-open\"],\"header\":[513],\"actions\":[16]}]]],[\"limel-help\",[[1,\"limel-help\",{\"value\":[1],\"trigger\":[1],\"readMoreLink\":[16],\"openDirection\":[513,\"open-direction\"],\"isOpen\":[32]}]]],[\"limel-checkbox\",[[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]}]]],[\"limel-table\",[[1,\"limel-table\",{\"data\":[16],\"columns\":[16],\"mode\":[1],\"layout\":[1],\"pageSize\":[2,\"page-size\"],\"totalRows\":[2,\"total-rows\"],\"sorting\":[16],\"activeRow\":[1040],\"movableColumns\":[4,\"movable-columns\"],\"loading\":[4],\"page\":[2],\"emptyMessage\":[1,\"empty-message\"],\"aggregates\":[16],\"selectable\":[4],\"selection\":[16]}]]],[\"limel-info-tile\",[[1,\"limel-info-tile\",{\"value\":[520],\"icon\":[1],\"label\":[513],\"prefix\":[513],\"suffix\":[513],\"disabled\":[516],\"badge\":[520],\"loading\":[516],\"link\":[16],\"progress\":[16]}]]],[\"limel-switch\",[[1,\"limel-switch\",{\"label\":[513],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"value\":[516],\"helperText\":[513,\"helper-text\"],\"readonlyLabels\":[16],\"fieldId\":[32]}]]],[\"limel-dialog\",[[1,\"limel-dialog\",{\"heading\":[1],\"fullscreen\":[516],\"open\":[1540],\"closingActions\":[16]}]]],[\"limel-progress-flow\",[[1,\"limel-progress-flow\",{\"flowItems\":[16],\"disabled\":[4],\"readonly\":[4]}]]],[\"limel-shortcut\",[[1,\"limel-shortcut\",{\"icon\":[513],\"label\":[513],\"disabled\":[516],\"badge\":[520],\"link\":[16]}]]],[\"limel-banner\",[[1,\"limel-banner\",{\"message\":[513],\"icon\":[513],\"isOpen\":[32],\"open\":[64],\"close\":[64]}]]],[\"limel-callout\",[[1,\"limel-callout\",{\"heading\":[513],\"icon\":[513],\"type\":[513],\"language\":[1]}]]],[\"limel-slider\",[[1,\"limel-slider\",{\"disabled\":[516],\"readonly\":[516],\"factor\":[514],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"unit\":[513],\"value\":[514],\"valuemax\":[514],\"valuemin\":[514],\"step\":[514],\"percentageClass\":[32]}]]],[\"limel-code-editor\",[[1,\"limel-code-editor\",{\"value\":[1],\"language\":[1],\"readonly\":[4],\"lineNumbers\":[4,\"line-numbers\"],\"fold\":[4],\"lint\":[4],\"colorScheme\":[1,\"color-scheme\"],\"random\":[32]}]]],[\"limel-config\",[[1,\"limel-config\",{\"config\":[16]}]]],[\"limel-flex-container\",[[1,\"limel-flex-container\",{\"direction\":[513],\"justify\":[513],\"align\":[513],\"reverse\":[516]}]]],[\"limel-form\",[[1,\"limel-form\",{\"schema\":[16],\"value\":[16],\"disabled\":[4],\"propsFactory\":[16],\"transformErrors\":[16],\"errors\":[16]}]]],[\"limel-grid\",[[1,\"limel-grid\"]]],[\"limel-action-bar_3\",[[1,\"limel-action-bar\",{\"actions\":[16],\"accessibleLabel\":[513,\"accessible-label\"],\"layout\":[513],\"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\"]}]]],[\"limel-prosemirror-adapter\",[[1,\"limel-prosemirror-adapter\",{\"value\":[1],\"view\":[32],\"actionBarItems\":[32]}]]],[\"limel-color-picker-palette\",[[17,\"limel-color-picker-palette\",{\"value\":[513],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516]}]]],[\"limel-dock-button\",[[0,\"limel-dock-button\",{\"item\":[16],\"expanded\":[516],\"useMobileLayout\":[516,\"use-mobile-layout\"],\"isOpen\":[32]}]]],[\"limel-tab-bar\",[[1,\"limel-tab-bar\",{\"tabs\":[1040],\"canScrollLeft\":[32],\"canScrollRight\":[32]},[[9,\"resize\",\"handleWindowResize\"]]]]],[\"limel-header\",[[1,\"limel-header\",{\"icon\":[1],\"heading\":[1],\"subheading\":[1],\"supportingText\":[1,\"supporting-text\"],\"subheadingDivider\":[1,\"subheading-divider\"]}]]],[\"limel-help-content\",[[1,\"limel-help-content\",{\"value\":[1],\"readMoreLink\":[16]}]]],[\"limel-progress-flow-item\",[[0,\"limel-progress-flow-item\",{\"item\":[16],\"disabled\":[4],\"readonly\":[4],\"currentStep\":[4,\"current-step\"]}]]],[\"limel-circular-progress\",[[1,\"limel-circular-progress\",{\"value\":[2],\"maxValue\":[2,\"max-value\"],\"prefix\":[513],\"suffix\":[1],\"displayPercentageColors\":[4,\"display-percentage-colors\"],\"size\":[513]}]]],[\"limel-flatpickr-adapter\",[[1,\"limel-flatpickr-adapter\",{\"value\":[16],\"type\":[1],\"format\":[1],\"isOpen\":[4,\"is-open\"],\"inputElement\":[16],\"language\":[1],\"formatter\":[16]}]]],[\"limel-button\",[[1,\"limel-button\",{\"label\":[513],\"primary\":[516],\"outlined\":[516],\"icon\":[513],\"disabled\":[516],\"loading\":[516],\"loadingFailed\":[516,\"loading-failed\"],\"justLoaded\":[32]}]]],[\"limel-file-dropzone_2\",[[1,\"limel-file-dropzone\",{\"accept\":[513],\"disabled\":[4],\"text\":[1],\"helperText\":[1,\"helper-text\"],\"hasFileToDrop\":[32]}],[1,\"limel-file-input\",{\"accept\":[513],\"disabled\":[516],\"multiple\":[516]}]]],[\"limel-markdown\",[[1,\"limel-markdown\",{\"value\":[1]}]]],[\"limel-icon-button\",[[1,\"limel-icon-button\",{\"icon\":[513],\"elevated\":[516],\"label\":[513],\"disabled\":[516]}]]],[\"limel-linear-progress\",[[1,\"limel-linear-progress\",{\"value\":[514],\"indeterminate\":[516]}]]],[\"limel-chip_2\",[[1,\"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\"],\"clearAllButton\":[4,\"clear-all-button\"],\"leadingIcon\":[513,\"leading-icon\"],\"delimiter\":[513],\"language\":[1],\"editMode\":[32],\"textValue\":[32],\"blurred\":[32],\"inputChipIndexSelected\":[32],\"selectedChipIds\":[32],\"getEditMode\":[64],\"setFocus\":[64],\"emptyInput\":[64]}],[1,\"limel-chip\",{\"language\":[513],\"text\":[513],\"icon\":[1],\"link\":[16],\"badge\":[520],\"disabled\":[516],\"readonly\":[516],\"selected\":[516],\"invalid\":[516],\"removable\":[516],\"type\":[513],\"loading\":[516],\"progress\":[514],\"identifier\":[520]}]]],[\"limel-popover_2\",[[1,\"limel-popover\",{\"open\":[4],\"openDirection\":[513,\"open-direction\"]}],[1,\"limel-popover-surface\",{\"contentCollection\":[16]}]]],[\"limel-spinner\",[[1,\"limel-spinner\",{\"size\":[513],\"limeBranded\":[4,\"lime-branded\"]}]]],[\"limel-badge\",[[1,\"limel-badge\",{\"label\":[520]}]]],[\"limel-icon\",[[1,\"limel-icon\",{\"size\":[513],\"name\":[513],\"badge\":[516]}]]],[\"limel-dynamic-label_4\",[[1,\"limel-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"],\"type\":[1],\"maxLinesSecondaryText\":[2,\"max-lines-secondary-text\"]}],[1,\"limel-menu-surface\",{\"open\":[4],\"allowClicksElement\":[16]}],[1,\"limel-dynamic-label\",{\"value\":[8],\"defaultLabel\":[16],\"labels\":[16]}],[1,\"limel-helper-line\",{\"helperText\":[513,\"helper-text\"],\"length\":[514],\"maxLength\":[514,\"max-length\"],\"invalid\":[516],\"helperTextId\":[513,\"helper-text-id\"]}]]],[\"limel-portal_3\",[[1,\"limel-tooltip\",{\"elementId\":[513,\"element-id\"],\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"maxlength\":[514],\"openDirection\":[513,\"open-direction\"],\"open\":[32]}],[1,\"limel-tooltip-content\",{\"label\":[513],\"helperLabel\":[513,\"helper-label\"],\"maxlength\":[514]}],[1,\"limel-portal\",{\"openDirection\":[513,\"open-direction\"],\"position\":[513],\"containerId\":[513,\"container-id\"],\"containerStyle\":[16],\"parent\":[16],\"inheritParentWidth\":[516,\"inherit-parent-width\"],\"visible\":[516],\"anchor\":[16]}]]],[\"limel-breadcrumbs_4\",[[1,\"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],\"emptyResultMessage\":[1,\"empty-result-message\"],\"loadingSubItems\":[32],\"searchValue\":[32],\"searchResults\":[32]}],[1,\"limel-breadcrumbs\",{\"items\":[16],\"divider\":[1]}],[1,\"limel-menu-list\",{\"items\":[16],\"badgeIcons\":[4,\"badge-icons\"],\"iconSize\":[1,\"icon-size\"],\"type\":[1],\"maxLinesSecondaryText\":[2,\"max-lines-secondary-text\"]}],[1,\"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],\"isModified\":[32],\"showCompletions\":[32]}]]]]"), options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
//# sourceMappingURL=lime-elements.js.map
|
|
@@ -1,8 +1,112 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-6156b4fd.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6156b4fd.js';
|
|
2
2
|
import { c as createRandomString } from './random-string-812b1c35.js';
|
|
3
3
|
import { m as makeEnterClickable, r as removeEnterClickable } from './make-enter-clickable-a30589fb.js';
|
|
4
4
|
import { g as getIconName, a as getIconColor } from './get-icon-props-0b65f85e.js';
|
|
5
5
|
|
|
6
|
+
function isItem(item) {
|
|
7
|
+
return !('separator' in item);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const actionBarCss = ":host(limel-action-bar){--action-bar-item-height:2rem;--limel-action-bar-item-text-color:var(\n --action-bar-item-text-color,\n rgb(var(--contrast-1100))\n );box-sizing:border-box;display:inline-flex;align-items:center;padding:0.125rem 0.25rem;max-width:100%;border-radius:var(--action-bar-border-radius);background-color:var(--action-bar-background-color, rgb(var(--contrast-100)))}:host(limel-action-bar),.items{gap:0.25rem}@media (pointer: coarse){:host(limel-action-bar),.items{gap:0.5rem}}.items{display:inline-flex;max-width:100%;min-width:0}:host(limel-action-bar.is-full-width){width:100%}:host(limel-action-bar.is-floating){--action-bar-border-radius:100vw;border:1px solid rgb(var(--contrast-400));padding-right:0.125rem;padding-left:0.125rem;max-width:calc(100% - 2rem);box-shadow:var(--shadow-depth-16), var(--shadow-depth-8)}";
|
|
11
|
+
|
|
12
|
+
const ActionBar = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
registerInstance(this, hostRef);
|
|
15
|
+
this.itemSelected = createEvent(this, "itemSelected", 7);
|
|
16
|
+
this.firstRender = true;
|
|
17
|
+
this.actionBarItems = [];
|
|
18
|
+
this.renderActionBarItem = (item, index) => {
|
|
19
|
+
return (h("limel-action-bar-item", { item: item, onSelect: this.handleSelect, isVisible: this.isVisible(index), role: "gridcell" }));
|
|
20
|
+
};
|
|
21
|
+
this.renderOverflowMenu = (items) => {
|
|
22
|
+
if (!(this.actions.length - this.overflowCutoff)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
return (h("limel-action-bar-overflow-menu", { openDirection: this.openDirection, items: items, onSelect: this.handleSelect, role: "gridcell" }));
|
|
26
|
+
};
|
|
27
|
+
this.handleSelect = (event) => {
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
if (isItem(event.detail)) {
|
|
30
|
+
this.itemSelected.emit(event.detail);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.handleIntersection = (entries) => {
|
|
34
|
+
const intersectingItems = entries.filter((entry) => entry.isIntersecting);
|
|
35
|
+
const notIntersectingItems = entries.filter((entry) => !entry.isIntersecting);
|
|
36
|
+
if (this.firstRender) {
|
|
37
|
+
this.overflowCutoff = intersectingItems.length;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.overflowCutoff =
|
|
41
|
+
this.overflowCutoff +
|
|
42
|
+
intersectingItems.length -
|
|
43
|
+
notIntersectingItems.length;
|
|
44
|
+
}
|
|
45
|
+
this.firstRender = false;
|
|
46
|
+
};
|
|
47
|
+
this.actions = [];
|
|
48
|
+
this.accessibleLabel = undefined;
|
|
49
|
+
this.layout = undefined;
|
|
50
|
+
this.openDirection = undefined;
|
|
51
|
+
this.overflowCutoff = this.actions.length;
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
let overflowActions = [];
|
|
55
|
+
if (this.actions.length) {
|
|
56
|
+
overflowActions = this.actions.slice(this.overflowCutoff);
|
|
57
|
+
}
|
|
58
|
+
return (h(Host, { "aria-label": this.accessibleLabel, class: {
|
|
59
|
+
'is-full-width': this.layout === 'fullWidth',
|
|
60
|
+
'is-floating': this.layout === 'floating',
|
|
61
|
+
}, role: "grid" }, h("div", { class: "items", role: "rowgroup" }, this.actions.map(this.renderActionBarItem)), this.renderOverflowMenu(overflowActions)));
|
|
62
|
+
}
|
|
63
|
+
connectedCallback() { }
|
|
64
|
+
componentDidRender() {
|
|
65
|
+
var _a;
|
|
66
|
+
if (this.haveItemsChanged()) {
|
|
67
|
+
(_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
68
|
+
this.createIntersectionObserver();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
disconnectedCallback() {
|
|
72
|
+
var _a;
|
|
73
|
+
(_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
74
|
+
this.intersectionObserver = undefined;
|
|
75
|
+
this.actionBarItems = [];
|
|
76
|
+
this.connectedCallback = () => this.createIntersectionObserver();
|
|
77
|
+
}
|
|
78
|
+
isVisible(index) {
|
|
79
|
+
return index < this.overflowCutoff;
|
|
80
|
+
}
|
|
81
|
+
createIntersectionObserver() {
|
|
82
|
+
const options = {
|
|
83
|
+
root: this.host.shadowRoot.querySelector('.items'),
|
|
84
|
+
rootMargin: '0px',
|
|
85
|
+
threshold: 1.0,
|
|
86
|
+
};
|
|
87
|
+
this.overflowCutoff = this.actions.length;
|
|
88
|
+
this.firstRender = true;
|
|
89
|
+
this.actionBarItems = [];
|
|
90
|
+
this.intersectionObserver = new IntersectionObserver(this.handleIntersection, options);
|
|
91
|
+
this.host.shadowRoot
|
|
92
|
+
.querySelectorAll('limel-action-bar-item')
|
|
93
|
+
.forEach((actionBarItem) => {
|
|
94
|
+
this.observe(actionBarItem);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
observe(actionBarItem) {
|
|
98
|
+
this.intersectionObserver.observe(actionBarItem);
|
|
99
|
+
this.actionBarItems.push(actionBarItem);
|
|
100
|
+
}
|
|
101
|
+
haveItemsChanged() {
|
|
102
|
+
const someItemRemoved = this.actionBarItems.some((actionBarItem) => !this.host.shadowRoot.contains(actionBarItem));
|
|
103
|
+
const someItemAdded = Array.from(this.host.shadowRoot.querySelectorAll('limel-action-bar-item')).some((actionBarItem) => !this.actionBarItems.includes(actionBarItem));
|
|
104
|
+
return someItemRemoved || someItemAdded;
|
|
105
|
+
}
|
|
106
|
+
get host() { return getElement(this); }
|
|
107
|
+
};
|
|
108
|
+
ActionBar.style = actionBarCss;
|
|
109
|
+
|
|
6
110
|
const actionBarItemCss = "@charset \"UTF-8\";limel-action-bar-item{transition:opacity 0.2s ease-in-out;position:relative;display:flex;align-items:center}limel-action-bar-item:not([is-visible]){opacity:0;pointer-events:none}button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:0.25rem;width:100%;min-width:var(--action-bar-item-height);max-width:var(--action-bar-item-max-width, 10rem);height:var(--action-bar-item-height);color:var(--limel-action-bar-item-text-color);border-radius:var(--action-bar-item-height);font-size:0.875rem;padding:0 0.25rem}button:not([disabled]){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color)}button:not([disabled]):hover{color:var(--limel-action-bar-item-text-color);background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-hovered)}button:not([disabled]):active{background-color:var(--action-bar-background-color);box-shadow:var(--button-shadow-inset-pressed);transform:translate3d(0, 0.05rem, 0)}button:not([disabled]):focus{outline:none}button:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:has(.text){padding:0 0.5rem}button[disabled]{opacity:0.4}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0.25rem}limel-icon{flex-shrink:0;width:calc(var(--action-bar-item-height) - 0.75rem);height:calc(var(--action-bar-item-height) - 0.75rem);color:var(--action-bar-item-icon-color, var(--limel-action-bar-item-text-color))}div[role=separator]{width:1px;height:1.5rem;border-radius:var(--action-bar-item-height);background-color:var(--limel-action-bar-item-text-color);opacity:0.2}@media (pointer: fine){div[role=separator]{margin-right:0.5rem;margin-left:0.5rem}}limel-menu{--notification-badge-background-color:rgb(var(--contrast-600));--notification-badge-text-color:rgb(var(--contrast-1200))}limel-menu[open] button{box-shadow:var(--button-shadow-inset)}button[slot=trigger]{animation:fade-in ease-out 0.25s;font-size:0.75rem;font-weight:bold;transform:translate3d(0, 0, 0)}@keyframes fade-in{0%{scale:0.8;opacity:0}100%{scale:1;opacity:1}}";
|
|
7
111
|
|
|
8
112
|
const ActionBarButton = class {
|
|
@@ -109,6 +213,6 @@ const ActionBarOverflowMenu = class {
|
|
|
109
213
|
}
|
|
110
214
|
};
|
|
111
215
|
|
|
112
|
-
export { ActionBarButton as limel_action_bar_item, ActionBarOverflowMenu as limel_action_bar_overflow_menu };
|
|
216
|
+
export { ActionBar as limel_action_bar, ActionBarButton as limel_action_bar_item, ActionBarOverflowMenu as limel_action_bar_overflow_menu };
|
|
113
217
|
|
|
114
|
-
//# sourceMappingURL=limel-action-
|
|
218
|
+
//# sourceMappingURL=limel-action-bar_3.entry.js.map
|