@limetech/lime-elements 36.1.0-next.8 → 36.1.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/dist/cjs/{checkbox.template-b6c6562c.js → checkbox.template-ac867c17.js} +1 -1
- package/dist/cjs/{index-2a28697b.js → index-287e25e0.js} +424 -246
- package/dist/cjs/lime-elements.cjs.js +3 -3
- package/dist/cjs/limel-badge.cjs.entry.js +2 -1
- package/dist/cjs/limel-banner.cjs.entry.js +3 -1
- package/dist/cjs/limel-button-group.cjs.entry.js +3 -8
- package/dist/cjs/{limel-button.cjs.entry.js → limel-button_2.cjs.entry.js} +117 -21
- package/dist/cjs/limel-checkbox.cjs.entry.js +10 -26
- package/dist/cjs/limel-chip-set.cjs.entry.js +21 -52
- package/dist/cjs/{limel-linear-progress.cjs.entry.js → limel-circular-progress_2.cjs.entry.js} +34 -7
- package/dist/cjs/limel-code-editor.cjs.entry.js +110 -97
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +4 -5
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +5 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +8 -2
- package/dist/cjs/limel-config.cjs.entry.js +2 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +15 -33
- package/dist/cjs/limel-dialog.cjs.entry.js +4 -12
- package/dist/cjs/limel-dock-button.cjs.entry.js +5 -15
- package/dist/cjs/limel-dock.cjs.entry.js +8 -40
- package/dist/cjs/limel-file.cjs.entry.js +10 -24
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +149 -48
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -13
- package/dist/cjs/limel-form.cjs.entry.js +328 -327
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +5 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +3 -8
- package/dist/cjs/limel-icon.cjs.entry.js +4 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +95 -0
- package/dist/cjs/limel-input-field.cjs.entry.js +27 -60
- package/dist/cjs/limel-list_2.cjs.entry.js +10 -21
- package/dist/cjs/limel-menu-list.cjs.entry.js +7 -14
- package/dist/cjs/limel-picker.cjs.entry.js +14 -39
- package/dist/cjs/limel-popover_4.cjs.entry.js +13 -12
- package/dist/cjs/limel-portal.cjs.entry.js +63 -73
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +4 -13
- package/dist/cjs/limel-progress-flow.cjs.entry.js +4 -20
- package/dist/cjs/limel-select.cjs.entry.js +20 -32
- package/dist/cjs/limel-shortcut.cjs.entry.js +52 -0
- package/dist/cjs/limel-slider.cjs.entry.js +12 -33
- package/dist/cjs/limel-snackbar.cjs.entry.js +7 -5
- package/dist/cjs/limel-spinner.cjs.entry.js +1 -7
- package/dist/cjs/limel-split-button.cjs.entry.js +35 -0
- package/dist/cjs/limel-switch.cjs.entry.js +6 -19
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -5
- package/dist/cjs/limel-tab-panel.cjs.entry.js +2 -5
- package/dist/cjs/limel-table.cjs.entry.js +16 -28
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{translations-5a8d7f6c.js → translations-ca7279bc.js} +6 -0
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/badge/badge.js +35 -26
- package/dist/collection/components/banner/banner.js +88 -83
- package/dist/collection/components/button/button.css +4 -1
- package/dist/collection/components/button/button.js +148 -160
- package/dist/collection/components/button-group/button-group.js +81 -79
- package/dist/collection/components/checkbox/checkbox.js +172 -176
- package/dist/collection/components/checkbox/checkbox.template.js +15 -23
- package/dist/collection/components/chip-set/chip-set.js +486 -528
- package/dist/collection/components/circular-progress/circular-progress.css +27 -5
- package/dist/collection/components/circular-progress/circular-progress.js +129 -113
- package/dist/collection/components/code-editor/code-editor.js +178 -182
- package/dist/collection/components/collapsible-section/collapsible-section.js +120 -124
- package/dist/collection/components/color-picker/color-picker-palette.js +102 -92
- package/dist/collection/components/color-picker/color-picker.js +143 -131
- package/dist/collection/components/config/config.js +21 -17
- package/dist/collection/components/date-picker/date-picker.js +254 -261
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +591 -166
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +150 -143
- package/dist/collection/components/date-picker/pickers/QuarterPicker.js +1 -3
- package/dist/collection/components/dialog/dialog.css +7 -1
- package/dist/collection/components/dialog/dialog.js +134 -142
- package/dist/collection/components/dock/dock-button/dock-button.js +138 -141
- package/dist/collection/components/dock/dock.js +204 -233
- package/dist/collection/components/file/file.js +187 -191
- package/dist/collection/components/flex-container/flex-container.js +96 -102
- package/dist/collection/components/form/form.js +158 -150
- package/dist/collection/components/form/widgets/code-editor.js +2 -0
- package/dist/collection/components/grid/grid.js +11 -7
- package/dist/collection/components/header/header.js +89 -87
- package/dist/collection/components/icon/icon.js +79 -66
- package/dist/collection/components/icon-button/icon-button.js +85 -85
- package/dist/collection/components/info-tile/info-tile.css +310 -0
- package/dist/collection/components/info-tile/info-tile.js +294 -0
- package/dist/collection/components/info-tile/info-tile.types.js +1 -0
- package/dist/collection/components/input-field/input-field.css +3 -0
- package/dist/collection/components/input-field/input-field.js +482 -523
- package/dist/collection/components/linear-progress/linear-progress.js +57 -61
- package/dist/collection/components/list/list-renderer.js +3 -12
- package/dist/collection/components/list/list.css +11 -116
- package/dist/collection/components/list/list.js +167 -166
- package/dist/collection/components/list/radio-button/radio-button.template.js +2 -8
- package/dist/collection/components/menu/menu.js +183 -195
- package/dist/collection/components/menu-list/menu-list-renderer.js +2 -9
- package/dist/collection/components/menu-list/menu-list.css +11 -116
- package/dist/collection/components/menu-list/menu-list.js +149 -146
- package/dist/collection/components/menu-surface/menu-surface.js +69 -64
- package/dist/collection/components/picker/picker.js +412 -427
- package/dist/collection/components/popover/popover.js +79 -74
- package/dist/collection/components/popover-surface/popover-surface.js +34 -25
- package/dist/collection/components/portal/portal.js +145 -158
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js +90 -94
- package/dist/collection/components/progress-flow/progress-flow.js +93 -101
- package/dist/collection/components/select/select.css +8 -7
- package/dist/collection/components/select/select.js +206 -211
- package/dist/collection/components/select/select.template.js +18 -27
- package/dist/collection/components/shortcut/shortcut.css +91 -0
- package/dist/collection/components/shortcut/shortcut.js +161 -0
- package/dist/collection/components/slider/slider.js +233 -264
- package/dist/collection/components/snackbar/snackbar.js +175 -169
- package/dist/collection/components/spinner/spinner.js +56 -85
- package/dist/collection/components/split-button/split-button.css +84 -0
- package/dist/collection/components/split-button/split-button.js +176 -0
- package/dist/collection/components/switch/switch.js +117 -129
- package/dist/collection/components/tab-bar/tab-bar.js +87 -92
- package/dist/collection/components/tab-panel/tab-panel.js +64 -61
- package/dist/collection/components/table/table.js +447 -457
- package/dist/collection/components/tooltip/tooltip-content.js +70 -61
- package/dist/collection/components/tooltip/tooltip.js +96 -91
- package/dist/collection/global/shared-types/link.types.js +1 -0
- package/dist/collection/style/internal/z-index.scss +0 -5
- package/dist/collection/translations/da.js +1 -0
- package/dist/collection/translations/en.js +1 -0
- package/dist/collection/translations/fi.js +1 -0
- package/dist/collection/translations/nl.js +1 -0
- package/dist/collection/translations/no.js +1 -0
- package/dist/collection/translations/sv.js +1 -0
- package/dist/esm/{checkbox.template-2f1bbc98.js → checkbox.template-fc7fcd06.js} +1 -1
- package/dist/esm/{index-11cd0b60.js → index-cdfd351d.js} +424 -246
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-badge.entry.js +2 -1
- package/dist/esm/limel-banner.entry.js +3 -1
- package/dist/esm/limel-button-group.entry.js +3 -8
- package/dist/esm/{limel-button.entry.js → limel-button_2.entry.js} +117 -22
- package/dist/esm/limel-checkbox.entry.js +10 -26
- package/dist/esm/limel-chip-set.entry.js +21 -52
- package/dist/esm/{limel-linear-progress.entry.js → limel-circular-progress_2.entry.js} +34 -8
- package/dist/esm/limel-code-editor.entry.js +110 -97
- package/dist/esm/limel-collapsible-section.entry.js +4 -5
- package/dist/esm/limel-color-picker-palette.entry.js +5 -1
- package/dist/esm/limel-color-picker.entry.js +8 -2
- package/dist/esm/limel-config.entry.js +2 -1
- package/dist/esm/limel-date-picker.entry.js +15 -33
- package/dist/esm/limel-dialog.entry.js +4 -12
- package/dist/esm/limel-dock-button.entry.js +5 -15
- package/dist/esm/limel-dock.entry.js +8 -40
- package/dist/esm/limel-file.entry.js +10 -24
- package/dist/esm/limel-flatpickr-adapter.entry.js +149 -48
- package/dist/esm/limel-flex-container.entry.js +1 -13
- package/dist/esm/limel-form.entry.js +328 -327
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +5 -1
- package/dist/esm/limel-icon-button.entry.js +3 -8
- package/dist/esm/limel-icon.entry.js +4 -1
- package/dist/esm/limel-info-tile.entry.js +91 -0
- package/dist/esm/limel-input-field.entry.js +27 -60
- package/dist/esm/limel-list_2.entry.js +10 -21
- package/dist/esm/limel-menu-list.entry.js +7 -14
- package/dist/esm/limel-picker.entry.js +14 -39
- package/dist/esm/limel-popover_4.entry.js +13 -12
- package/dist/esm/limel-portal.entry.js +63 -73
- package/dist/esm/limel-progress-flow-item.entry.js +4 -13
- package/dist/esm/limel-progress-flow.entry.js +4 -20
- package/dist/esm/limel-select.entry.js +20 -32
- package/dist/esm/limel-shortcut.entry.js +48 -0
- package/dist/esm/limel-slider.entry.js +12 -33
- package/dist/esm/limel-snackbar.entry.js +7 -5
- package/dist/esm/limel-spinner.entry.js +1 -7
- package/dist/esm/limel-split-button.entry.js +31 -0
- package/dist/esm/limel-switch.entry.js +6 -19
- package/dist/esm/limel-tab-bar.entry.js +2 -5
- package/dist/esm/limel-tab-panel.entry.js +2 -5
- package/dist/esm/limel-table.entry.js +16 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{translations-682e905e.js → translations-0d0ee941.js} +6 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-059e0a64.entry.js +1 -0
- package/dist/lime-elements/{p-440454ed.entry.js → p-06f2f6b4.entry.js} +1 -1
- package/dist/lime-elements/p-12a7453b.entry.js +73 -0
- package/dist/lime-elements/p-1386d86d.entry.js +82 -0
- package/dist/lime-elements/p-15c2eb16.entry.js +1 -0
- package/dist/lime-elements/{p-c80acfb2.entry.js → p-15ca0d70.entry.js} +4 -4
- package/dist/lime-elements/{p-ed65468d.entry.js → p-16eb9071.entry.js} +1 -1
- package/dist/lime-elements/{p-1ede893b.js → p-1af8258b.js} +1 -1
- package/dist/lime-elements/{p-71efe2ca.entry.js → p-21058db5.entry.js} +4 -3
- package/dist/lime-elements/p-246862ec.js +1 -0
- package/dist/lime-elements/p-36a3b897.entry.js +1 -0
- package/dist/lime-elements/p-4eda8b67.entry.js +82 -0
- package/dist/lime-elements/{p-9af0704c.entry.js → p-4fb4e89b.entry.js} +1 -1
- package/dist/lime-elements/p-4fc38050.entry.js +1 -0
- package/dist/lime-elements/{p-a5af84a7.entry.js → p-5338663b.entry.js} +1 -1
- package/dist/lime-elements/p-5ce60a32.entry.js +126 -0
- package/dist/lime-elements/p-5f13035a.entry.js +1 -0
- package/dist/lime-elements/p-5f29f099.entry.js +16 -0
- package/dist/lime-elements/p-600464a9.entry.js +1 -0
- package/dist/lime-elements/p-6534e16a.entry.js +1 -0
- package/dist/lime-elements/p-6a4a5ddd.entry.js +1 -0
- package/dist/lime-elements/p-6c38b505.entry.js +1 -0
- package/dist/lime-elements/p-75d01713.entry.js +1 -0
- package/dist/lime-elements/p-768b7cbb.entry.js +1 -0
- package/dist/lime-elements/{p-6e7809a6.entry.js → p-82cd7bb6.entry.js} +1 -1
- package/dist/lime-elements/p-84a137a7.entry.js +1 -0
- package/dist/lime-elements/{p-aa66620a.entry.js → p-8ab597a8.entry.js} +2 -2
- package/dist/lime-elements/{p-8827628d.entry.js → p-8fb83e83.entry.js} +2 -2
- package/dist/lime-elements/p-90961075.entry.js +1 -0
- package/dist/lime-elements/p-9984b31c.entry.js +1 -0
- package/dist/lime-elements/p-9bd76629.entry.js +59 -0
- package/dist/lime-elements/p-9ea8dd5c.entry.js +1 -0
- package/dist/lime-elements/p-cad7cda1.entry.js +16 -0
- package/dist/lime-elements/{p-104c89e8.entry.js → p-cfaa685f.entry.js} +1 -1
- package/dist/lime-elements/{p-94899019.entry.js → p-d1187867.entry.js} +1 -1
- package/dist/lime-elements/p-d4e788e1.js +2 -0
- package/dist/lime-elements/p-d512656b.entry.js +1 -0
- package/dist/lime-elements/p-d8e5a9ee.entry.js +1 -0
- package/dist/lime-elements/p-de161bb5.entry.js +1 -0
- package/dist/lime-elements/p-e4bca82b.entry.js +1 -0
- package/dist/lime-elements/p-e6f84d68.entry.js +1 -0
- package/dist/lime-elements/{p-c15da26d.entry.js → p-e7bb664f.entry.js} +1 -1
- package/dist/lime-elements/p-e88f7922.entry.js +1 -0
- package/dist/lime-elements/p-ec4c075d.entry.js +1 -0
- package/dist/lime-elements/p-f1ed857b.entry.js +37 -0
- package/dist/lime-elements/p-f33cfcb8.entry.js +11 -0
- package/dist/lime-elements/style/internal/z-index.scss +0 -5
- package/dist/loader/package.json +1 -0
- package/dist/types/components/circular-progress/circular-progress.d.ts +5 -0
- package/dist/types/components/dock/dock.d.ts +0 -1
- package/dist/types/components/info-tile/info-tile.d.ts +87 -0
- package/dist/types/components/info-tile/info-tile.types.d.ts +23 -0
- package/dist/types/components/picker/picker.d.ts +2 -2
- package/dist/types/components/shortcut/shortcut.d.ts +42 -0
- package/dist/types/components/split-button/split-button.d.ts +46 -0
- package/dist/types/components.d.ts +403 -67
- package/dist/types/global/shared-types/link.types.d.ts +25 -0
- package/dist/types/interface.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/translations/da.d.ts +1 -0
- package/dist/types/translations/en.d.ts +1 -0
- package/dist/types/translations/fi.d.ts +1 -0
- package/dist/types/translations/nl.d.ts +1 -0
- package/dist/types/translations/no.d.ts +1 -0
- package/dist/types/translations/sv.d.ts +1 -0
- package/package.json +25 -24
- package/dist/cjs/limel-circular-progress.cjs.entry.js +0 -44
- package/dist/cjs/limel-menu.cjs.entry.js +0 -137
- package/dist/esm/limel-circular-progress.entry.js +0 -40
- package/dist/esm/limel-menu.entry.js +0 -133
- package/dist/lime-elements/p-009de50e.entry.js +0 -1
- package/dist/lime-elements/p-0ba0c38a.entry.js +0 -11
- package/dist/lime-elements/p-19f72dab.entry.js +0 -1
- package/dist/lime-elements/p-2639edf9.entry.js +0 -73
- package/dist/lime-elements/p-2fc4f4ff.entry.js +0 -1
- package/dist/lime-elements/p-3bf54a4c.js +0 -1
- package/dist/lime-elements/p-3cf4aae0.entry.js +0 -1
- package/dist/lime-elements/p-41e902ac.entry.js +0 -126
- package/dist/lime-elements/p-4dc07252.entry.js +0 -82
- package/dist/lime-elements/p-53e01330.entry.js +0 -1
- package/dist/lime-elements/p-5ef52589.entry.js +0 -1
- package/dist/lime-elements/p-629862f4.entry.js +0 -1
- package/dist/lime-elements/p-63e25a0a.entry.js +0 -1
- package/dist/lime-elements/p-6b1bc80f.entry.js +0 -1
- package/dist/lime-elements/p-93cd2268.entry.js +0 -1
- package/dist/lime-elements/p-95f275ab.entry.js +0 -1
- package/dist/lime-elements/p-9917f042.entry.js +0 -16
- package/dist/lime-elements/p-995bbd2a.entry.js +0 -1
- package/dist/lime-elements/p-a465084b.entry.js +0 -82
- package/dist/lime-elements/p-b0046fcd.entry.js +0 -1
- package/dist/lime-elements/p-b0e54dc2.entry.js +0 -1
- package/dist/lime-elements/p-b4de3380.entry.js +0 -1
- package/dist/lime-elements/p-c59cbd68.entry.js +0 -1
- package/dist/lime-elements/p-cb8db8c2.entry.js +0 -37
- package/dist/lime-elements/p-d74fa89e.entry.js +0 -1
- package/dist/lime-elements/p-e98d76e8.entry.js +0 -59
- package/dist/lime-elements/p-e9a95b8f.js +0 -1
- package/dist/lime-elements/p-eec907ac.entry.js +0 -1
- package/dist/lime-elements/p-f0c9dadd.entry.js +0 -1
- package/dist/lime-elements/p-f0e872b6.entry.js +0 -16
- package/dist/lime-elements/p-f41567a1.entry.js +0 -1
- package/dist/lime-elements/p-f5df4d4f.entry.js +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface Link {
|
|
2
|
+
/**
|
|
3
|
+
* The url the link should point to.
|
|
4
|
+
*/
|
|
5
|
+
href: string;
|
|
6
|
+
/**
|
|
7
|
+
* The text value to use for the link.
|
|
8
|
+
* Note that this might not be used by all components that use the
|
|
9
|
+
* Link interface.
|
|
10
|
+
*/
|
|
11
|
+
text?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Title for the link. Read by assistive tech and shown when the
|
|
14
|
+
* link is hovered. Can be used to provide additional information
|
|
15
|
+
* about the link. It improves accessibility both for sighted users
|
|
16
|
+
* and users of assistive technologies.
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Target for the link. See
|
|
21
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target
|
|
22
|
+
* for more info.
|
|
23
|
+
*/
|
|
24
|
+
target?: string;
|
|
25
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Components interfaces
|
|
2
|
+
export * from './global/shared-types/link.types';
|
|
2
3
|
export * from './components/button/button.types';
|
|
3
4
|
export * from './components/chip-set/chip.types';
|
|
4
5
|
export * from './components/collapsible-section/action';
|
|
@@ -21,3 +22,4 @@ export * from './components/tab-bar/tab.types';
|
|
|
21
22
|
export * from './components/tab-panel/tab-panel.types';
|
|
22
23
|
export * from './components/table/table.types';
|
|
23
24
|
export * from './components/dock/dock.types';
|
|
25
|
+
export * from './components/info-tile/info-tile.types';
|
|
@@ -221,7 +221,9 @@ export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
|
221
221
|
*/
|
|
222
222
|
export declare const setMode: (handler: ResolutionHandler) => void;
|
|
223
223
|
/**
|
|
224
|
-
* getMode
|
|
224
|
+
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
|
+
* @param ref a reference to the node to get styles for
|
|
226
|
+
* @returns the current mode or undefined, if not found
|
|
225
227
|
*/
|
|
226
228
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
227
229
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -234,6 +236,9 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
234
236
|
/**
|
|
235
237
|
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
|
|
236
238
|
* if the path needs to be customized.
|
|
239
|
+
* @param path the path to use in calculating the asset path. this value will be
|
|
240
|
+
* used in conjunction with the base asset path
|
|
241
|
+
* @returns the base path
|
|
237
242
|
*/
|
|
238
243
|
export declare function getAssetPath(path: string): string;
|
|
239
244
|
/**
|
|
@@ -246,22 +251,29 @@ export declare function getAssetPath(path: string): string;
|
|
|
246
251
|
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
|
|
247
252
|
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
|
|
248
253
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
249
|
-
*
|
|
254
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
250
255
|
* will have to ensure the static assets are copied to its build directory.
|
|
256
|
+
* @param path the asset path to set
|
|
257
|
+
* @returns the set path
|
|
251
258
|
*/
|
|
252
259
|
export declare function setAssetPath(path: string): string;
|
|
253
260
|
/**
|
|
254
|
-
*
|
|
261
|
+
* Retrieve a Stencil element for a given reference
|
|
262
|
+
* @param ref the ref to get the Stencil element for
|
|
263
|
+
* @returns a reference to the element
|
|
255
264
|
*/
|
|
256
265
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
257
266
|
/**
|
|
258
267
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
259
268
|
*
|
|
260
|
-
* Notice `forceUpdate()` is not
|
|
269
|
+
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
|
|
270
|
+
*
|
|
271
|
+
* @param ref the node/element to force the re-render of
|
|
261
272
|
*/
|
|
262
273
|
export declare function forceUpdate(ref: any): void;
|
|
263
274
|
/**
|
|
264
275
|
* getRenderingRef
|
|
276
|
+
* @returns the rendering ref
|
|
265
277
|
*/
|
|
266
278
|
export declare function getRenderingRef(): any;
|
|
267
279
|
export interface HTMLStencilElement extends HTMLElement {
|
|
@@ -272,6 +284,8 @@ export interface HTMLStencilElement extends HTMLElement {
|
|
|
272
284
|
* in the best moment to perform DOM mutation without causing layout thrashing.
|
|
273
285
|
*
|
|
274
286
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
287
|
+
*
|
|
288
|
+
* @param task the DOM-write to schedule
|
|
275
289
|
*/
|
|
276
290
|
export declare function writeTask(task: RafCallback): void;
|
|
277
291
|
/**
|
|
@@ -279,6 +293,8 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
279
293
|
* in the best moment to perform DOM reads without causing layout thrashing.
|
|
280
294
|
*
|
|
281
295
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
296
|
+
*
|
|
297
|
+
* @param task the DOM-read to schedule
|
|
282
298
|
*/
|
|
283
299
|
export declare function readTask(task: RafCallback): void;
|
|
284
300
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "36.1.0
|
|
3
|
+
"version": "36.1.0",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,55 +40,56 @@
|
|
|
40
40
|
"generate": "stencil generate"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@commitlint/config-conventional": "^
|
|
44
|
-
"@popperjs/core": "^2.11.
|
|
43
|
+
"@commitlint/config-conventional": "^17.3.0",
|
|
44
|
+
"@popperjs/core": "^2.11.6",
|
|
45
45
|
"@rjsf/core": "^2.4.2",
|
|
46
|
-
"@stencil/core": "^2.
|
|
47
|
-
"@stencil/sass": "^
|
|
46
|
+
"@stencil/core": "^2.19.2",
|
|
47
|
+
"@stencil/sass": "^2.0.0",
|
|
48
48
|
"@types/codemirror": "^5.60.2",
|
|
49
49
|
"@types/html-escaper": "^3.0.0",
|
|
50
50
|
"@types/jest": "^27.4.0",
|
|
51
51
|
"@types/lodash-es": "^4.17.4",
|
|
52
|
-
"@types/puppeteer": "^
|
|
53
|
-
"@types/react": "^18.0.
|
|
52
|
+
"@types/puppeteer": "^7.0.4",
|
|
53
|
+
"@types/react": "^18.0.25",
|
|
54
54
|
"@types/tabulator-tables": "^4.9.4",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
56
|
-
"@typescript-eslint/parser": "^5.
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
|
56
|
+
"@typescript-eslint/parser": "^5.43.0",
|
|
57
57
|
"ajv": "^6.12.6",
|
|
58
58
|
"awesome-debounce-promise": "^2.1.0",
|
|
59
|
-
"codemirror": "^5.65.
|
|
59
|
+
"codemirror": "^5.65.9",
|
|
60
60
|
"cross-env": "^7.0.3",
|
|
61
61
|
"cz-conventional-changelog": "^3.3.0",
|
|
62
|
-
"dayjs": "^1.11.
|
|
63
|
-
"eslint": "^8.
|
|
62
|
+
"dayjs": "^1.11.6",
|
|
63
|
+
"eslint": "^8.28.0",
|
|
64
64
|
"eslint-config-prettier": "^8.5.0",
|
|
65
|
-
"eslint-plugin-
|
|
65
|
+
"eslint-plugin-ban": "^1.6.0",
|
|
66
|
+
"eslint-plugin-jsdoc": "^39.6.2",
|
|
66
67
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
67
|
-
"eslint-plugin-prettier": "^4.
|
|
68
|
-
"eslint-plugin-react": "^7.
|
|
69
|
-
"eslint-plugin-sonarjs": "^0.
|
|
68
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
69
|
+
"eslint-plugin-react": "^7.31.11",
|
|
70
|
+
"eslint-plugin-sonarjs": "^0.16.0",
|
|
70
71
|
"flatpickr": "^4.6.13",
|
|
71
72
|
"html-escaper": "^3.0.3",
|
|
72
73
|
"jest": "^26.6.3",
|
|
73
|
-
"jest-cli": "^
|
|
74
|
+
"jest-cli": "^27.4.5",
|
|
74
75
|
"jsonlint-mod": "^1.7.6",
|
|
75
|
-
"jsx-dom": "^
|
|
76
|
+
"jsx-dom": "^8.0.3",
|
|
76
77
|
"kompendium": "^0.11.3",
|
|
77
78
|
"lodash-es": "^4.17.21",
|
|
78
79
|
"material-components-web": "^13.0.0",
|
|
79
80
|
"moment": "^2.29.4",
|
|
80
81
|
"number-abbreviate": "^2.0.0",
|
|
81
|
-
"prettier": "^2.
|
|
82
|
-
"puppeteer": "^
|
|
83
|
-
"react": "^18.
|
|
84
|
-
"react-dom": "^18.
|
|
82
|
+
"prettier": "^2.7.1",
|
|
83
|
+
"puppeteer": "^19.3.0",
|
|
84
|
+
"react": "^18.2.0",
|
|
85
|
+
"react-dom": "^18.2.0",
|
|
85
86
|
"react-shadow-dom-retarget-events": "^1.1.0",
|
|
86
|
-
"replace-in-file": "^6.
|
|
87
|
+
"replace-in-file": "^6.3.5",
|
|
87
88
|
"shelljs": "0.8.5",
|
|
88
89
|
"showdown": "2.1.0",
|
|
89
90
|
"shx": "^0.3.3",
|
|
90
91
|
"tabulator-tables": "^4.9.3",
|
|
91
|
-
"typescript": "^4.
|
|
92
|
+
"typescript": "^4.9.3"
|
|
92
93
|
},
|
|
93
94
|
"keywords": [
|
|
94
95
|
"lime elements",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-2a28697b.js');
|
|
6
|
-
const format = require('./format-c0047dfb.js');
|
|
7
|
-
require('./_commonjsHelpers-0c557e26.js');
|
|
8
|
-
|
|
9
|
-
const circularProgressCss = ":host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n var(--lime-text-primary-on-background-color)\n )}:host{display:block;box-sizing:border-box}:host([size=x-small]){--circular-progress-size:1.5rem;font-weight:bold}:host([size=small]){--circular-progress-size:2rem;font-weight:bold}:host([size=medium]){--circular-progress-size:3rem}:host([size=large]){--circular-progress-size:4rem}:host([size=x-large]){--circular-progress-size:5rem}.lime-circular-progress{--size:var(--circular-progress-size, 3rem);--fill-color:var(--circular-progress-fill-color, var(--mdc-theme-primary));--track-color:var(\n --circular-progress-track-color,\n rgb(var(--contrast-400))\n );display:flex;align-items:center;justify-content:center;width:var(--size);height:var(--size);border-radius:50%;box-shadow:0 0 0 0.125rem rgba(var(--contrast-100), 0.8);background:conic-gradient(var(--fill-color) 0% var(--percentage), var(--track-color) var(--percentage) 100%)}.lime-circular-progress:before{content:\"\";position:absolute;width:calc(var(--size) * 0.75 + 0.25rem);height:calc(var(--size) * 0.75 + 0.25rem);border-radius:50%;background-color:rgb(var(--contrast-100));box-shadow:var(--button-shadow-pressed)}.value{font-size:calc(var(--size) * 0.25);color:rgb(var(--contrast-1200));z-index:1;cursor:default}.suffix{opacity:0.7}.displays-percentage-colors[style^=\"--percentage:1\"]{--circular-progress-fill-color:var(--color-percent--10to20)}.displays-percentage-colors[style^=\"--percentage:2\"]{--circular-progress-fill-color:var(--color-percent--20to30)}.displays-percentage-colors[style^=\"--percentage:3\"]{--circular-progress-fill-color:var(--color-percent--30to40)}.displays-percentage-colors[style^=\"--percentage:4\"]{--circular-progress-fill-color:var(--color-percent--40to50)}.displays-percentage-colors[style^=\"--percentage:5\"]{--circular-progress-fill-color:var(--color-percent--50to60)}.displays-percentage-colors[style^=\"--percentage:6\"]{--circular-progress-fill-color:var(--color-percent--60to70)}.displays-percentage-colors[style^=\"--percentage:7\"]{--circular-progress-fill-color:var(--color-percent--70to80)}.displays-percentage-colors[style^=\"--percentage:8\"]{--circular-progress-fill-color:var(--color-percent--80to90)}.displays-percentage-colors[style^=\"--percentage:9\"],.displays-percentage-colors[style=\"--percentage:100%;\"]{--circular-progress-fill-color:var(--color-percent--90to100)}.displays-percentage-colors[style=\"--percentage:1%;\"],.displays-percentage-colors[style=\"--percentage:2%;\"],.displays-percentage-colors[style=\"--percentage:3%;\"],.displays-percentage-colors[style=\"--percentage:4%;\"],.displays-percentage-colors[style=\"--percentage:5%;\"],.displays-percentage-colors[style=\"--percentage:6%;\"],.displays-percentage-colors[style=\"--percentage:7%;\"],.displays-percentage-colors[style=\"--percentage:8%;\"],.displays-percentage-colors[style=\"--percentage:9%;\"]{--circular-progress-fill-color:var(--color-percent--0to10)}";
|
|
10
|
-
|
|
11
|
-
const PERCENT = 100;
|
|
12
|
-
const CircularProgress = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
/**
|
|
16
|
-
* The value of the progress bar.
|
|
17
|
-
*/
|
|
18
|
-
this.value = 0;
|
|
19
|
-
/**
|
|
20
|
-
* The maximum value within the scale that the progress bar should visualize. Defaults to `100`.
|
|
21
|
-
*/
|
|
22
|
-
this.maxValue = PERCENT;
|
|
23
|
-
/**
|
|
24
|
-
* The suffix which is displayed after the `value`, must be one or two characters long. Defaults to `%`
|
|
25
|
-
*/
|
|
26
|
-
this.suffix = '%';
|
|
27
|
-
/**
|
|
28
|
-
* When set to `true`, makes the filled section showing the percentage colorful. Colors change with intervals of 10%.
|
|
29
|
-
*/
|
|
30
|
-
this.displayPercentageColors = false;
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
const classList = {
|
|
34
|
-
'lime-circular-progress': true,
|
|
35
|
-
'displays-percentage-colors': this.displayPercentageColors,
|
|
36
|
-
};
|
|
37
|
-
const currentPercentage = (this.value * PERCENT) / this.maxValue + '%';
|
|
38
|
-
const value = Math.round(this.value * 10) / 10; // eslint-disable-line no-magic-numbers
|
|
39
|
-
return (index.h("div", { role: "progressbar", class: classList, "aria-label": "%", "aria-valuemin": "0", "aria-valuemax": this.maxValue, "aria-valuenow": this.value, style: { '--percentage': currentPercentage } }, index.h("span", { class: "value" }, format.abbreviate(value), index.h("span", { class: "suffix" }, this.suffix))));
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
CircularProgress.style = circularProgressCss;
|
|
43
|
-
|
|
44
|
-
exports.limel_circular_progress = CircularProgress;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-2a28697b.js');
|
|
6
|
-
const randomString = require('./random-string-4c3b7f1c.js');
|
|
7
|
-
const zipObject = require('./zipObject-93a471fa.js');
|
|
8
|
-
require('./_assignValue-7c18d8d6.js');
|
|
9
|
-
require('./_defineProperty-8f56146d.js');
|
|
10
|
-
require('./_getNative-60328036.js');
|
|
11
|
-
require('./eq-9a943b00.js');
|
|
12
|
-
require('./isObject-e28b7997.js');
|
|
13
|
-
|
|
14
|
-
const menuCss = ":host{display:inline-block}:host([hidden]){display:none}.menu__trigger{border-color:transparent;border-width:1px;border-style:solid;background:none;color:rgb(var(--contrast-800));height:2.25rem}.menu__trigger-enabled:hover{border-color:rgb(var(--contrast-800));color:rgb(var(--contrast-1100))}.mdc-menu-surface--anchor{position:relative}";
|
|
15
|
-
|
|
16
|
-
const Menu = class {
|
|
17
|
-
constructor(hostRef) {
|
|
18
|
-
index.registerInstance(this, hostRef);
|
|
19
|
-
this.cancel = index.createEvent(this, "cancel", 7);
|
|
20
|
-
this.select = index.createEvent(this, "select", 7);
|
|
21
|
-
/**
|
|
22
|
-
* A list of items and separators to show in the menu.
|
|
23
|
-
*/
|
|
24
|
-
this.items = [];
|
|
25
|
-
/**
|
|
26
|
-
* Sets the disabled state of the menu.
|
|
27
|
-
*/
|
|
28
|
-
this.disabled = false;
|
|
29
|
-
/**
|
|
30
|
-
* Decides the menu's location in relation to its trigger
|
|
31
|
-
*/
|
|
32
|
-
this.openDirection = 'bottom-start';
|
|
33
|
-
/**
|
|
34
|
-
* Sets the open state of the menu.
|
|
35
|
-
*/
|
|
36
|
-
this.open = false;
|
|
37
|
-
/**
|
|
38
|
-
* Defines whether the menu should show badges.
|
|
39
|
-
*/
|
|
40
|
-
this.badgeIcons = false;
|
|
41
|
-
/**
|
|
42
|
-
* Renders list items in a grid layout, rather than a vertical list
|
|
43
|
-
*/
|
|
44
|
-
this.gridLayout = false;
|
|
45
|
-
this.setTriggerAttributes = (element) => {
|
|
46
|
-
const attributes = {
|
|
47
|
-
'aria-haspopup': true,
|
|
48
|
-
'aria-expanded': this.open,
|
|
49
|
-
disabled: this.disabled,
|
|
50
|
-
role: 'button',
|
|
51
|
-
};
|
|
52
|
-
for (const [key, value] of Object.entries(attributes)) {
|
|
53
|
-
if (!value) {
|
|
54
|
-
element.removeAttribute(key);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
element.setAttribute(key, String(value));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
this.onClose = () => {
|
|
62
|
-
this.cancel.emit();
|
|
63
|
-
this.open = false;
|
|
64
|
-
};
|
|
65
|
-
this.onTriggerClick = (event) => {
|
|
66
|
-
event.stopPropagation();
|
|
67
|
-
if (this.disabled) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.open = !this.open;
|
|
71
|
-
};
|
|
72
|
-
this.handleSelect = (event) => {
|
|
73
|
-
event.stopPropagation();
|
|
74
|
-
this.select.emit(event.detail);
|
|
75
|
-
this.open = false;
|
|
76
|
-
};
|
|
77
|
-
this.setListElement = (element) => {
|
|
78
|
-
this.list = element;
|
|
79
|
-
};
|
|
80
|
-
this.focusMenuItem = () => {
|
|
81
|
-
var _a;
|
|
82
|
-
const activeElement = this.list.shadowRoot.activeElement;
|
|
83
|
-
activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur();
|
|
84
|
-
const MenuItems = this.items.filter(this.isMenuItem);
|
|
85
|
-
const selectedIndex = Math.max(MenuItems.findIndex((item) => item.selected), 0);
|
|
86
|
-
const menuElements = Array.from(this.list.shadowRoot.querySelectorAll('[role="menuitem"]'));
|
|
87
|
-
(_a = menuElements[selectedIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
88
|
-
};
|
|
89
|
-
this.portalId = randomString.createRandomString();
|
|
90
|
-
}
|
|
91
|
-
openWatcher() {
|
|
92
|
-
if (!this.open) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
const observer = new IntersectionObserver(() => {
|
|
96
|
-
observer.unobserve(this.list);
|
|
97
|
-
this.focusMenuItem();
|
|
98
|
-
});
|
|
99
|
-
observer.observe(this.list);
|
|
100
|
-
}
|
|
101
|
-
render() {
|
|
102
|
-
const cssProperties = this.getCssProperties();
|
|
103
|
-
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
104
|
-
return (index.h("div", { class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, index.h("slot", { name: "trigger" }), index.h("limel-portal", { visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } }, index.h("limel-menu-surface", { open: this.open, onDismiss: this.onClose, style: cssProperties, class: {
|
|
105
|
-
'has-grid-layout': this.gridLayout,
|
|
106
|
-
} }, index.h("limel-menu-list", { class: {
|
|
107
|
-
'has-grid-layout has-interactive-items': this.gridLayout,
|
|
108
|
-
}, items: this.items, type: "menu", badgeIcons: this.badgeIcons, onSelect: this.handleSelect, ref: this.setListElement })))));
|
|
109
|
-
}
|
|
110
|
-
componentDidRender() {
|
|
111
|
-
const slotElement = this.host.shadowRoot.querySelector('slot');
|
|
112
|
-
slotElement.assignedElements().forEach(this.setTriggerAttributes);
|
|
113
|
-
}
|
|
114
|
-
getCssProperties() {
|
|
115
|
-
const propertyNames = [
|
|
116
|
-
'--menu-surface-width',
|
|
117
|
-
'--list-grid-item-max-width',
|
|
118
|
-
'--list-grid-item-min-width',
|
|
119
|
-
'--list-grid-gap',
|
|
120
|
-
];
|
|
121
|
-
const style = getComputedStyle(this.host);
|
|
122
|
-
const values = propertyNames.map((property) => {
|
|
123
|
-
return style.getPropertyValue(property);
|
|
124
|
-
});
|
|
125
|
-
return zipObject.zipObject(propertyNames, values);
|
|
126
|
-
}
|
|
127
|
-
isMenuItem(item) {
|
|
128
|
-
return !('separator' in item);
|
|
129
|
-
}
|
|
130
|
-
get host() { return index.getElement(this); }
|
|
131
|
-
static get watchers() { return {
|
|
132
|
-
"open": ["openWatcher"]
|
|
133
|
-
}; }
|
|
134
|
-
};
|
|
135
|
-
Menu.style = menuCss;
|
|
136
|
-
|
|
137
|
-
exports.limel_menu = Menu;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-11cd0b60.js';
|
|
2
|
-
import { a as abbreviate } from './format-a0e2d949.js';
|
|
3
|
-
import './_commonjsHelpers-5ec8f9b7.js';
|
|
4
|
-
|
|
5
|
-
const circularProgressCss = ":host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n var(--lime-text-primary-on-background-color)\n )}:host{display:block;box-sizing:border-box}:host([size=x-small]){--circular-progress-size:1.5rem;font-weight:bold}:host([size=small]){--circular-progress-size:2rem;font-weight:bold}:host([size=medium]){--circular-progress-size:3rem}:host([size=large]){--circular-progress-size:4rem}:host([size=x-large]){--circular-progress-size:5rem}.lime-circular-progress{--size:var(--circular-progress-size, 3rem);--fill-color:var(--circular-progress-fill-color, var(--mdc-theme-primary));--track-color:var(\n --circular-progress-track-color,\n rgb(var(--contrast-400))\n );display:flex;align-items:center;justify-content:center;width:var(--size);height:var(--size);border-radius:50%;box-shadow:0 0 0 0.125rem rgba(var(--contrast-100), 0.8);background:conic-gradient(var(--fill-color) 0% var(--percentage), var(--track-color) var(--percentage) 100%)}.lime-circular-progress:before{content:\"\";position:absolute;width:calc(var(--size) * 0.75 + 0.25rem);height:calc(var(--size) * 0.75 + 0.25rem);border-radius:50%;background-color:rgb(var(--contrast-100));box-shadow:var(--button-shadow-pressed)}.value{font-size:calc(var(--size) * 0.25);color:rgb(var(--contrast-1200));z-index:1;cursor:default}.suffix{opacity:0.7}.displays-percentage-colors[style^=\"--percentage:1\"]{--circular-progress-fill-color:var(--color-percent--10to20)}.displays-percentage-colors[style^=\"--percentage:2\"]{--circular-progress-fill-color:var(--color-percent--20to30)}.displays-percentage-colors[style^=\"--percentage:3\"]{--circular-progress-fill-color:var(--color-percent--30to40)}.displays-percentage-colors[style^=\"--percentage:4\"]{--circular-progress-fill-color:var(--color-percent--40to50)}.displays-percentage-colors[style^=\"--percentage:5\"]{--circular-progress-fill-color:var(--color-percent--50to60)}.displays-percentage-colors[style^=\"--percentage:6\"]{--circular-progress-fill-color:var(--color-percent--60to70)}.displays-percentage-colors[style^=\"--percentage:7\"]{--circular-progress-fill-color:var(--color-percent--70to80)}.displays-percentage-colors[style^=\"--percentage:8\"]{--circular-progress-fill-color:var(--color-percent--80to90)}.displays-percentage-colors[style^=\"--percentage:9\"],.displays-percentage-colors[style=\"--percentage:100%;\"]{--circular-progress-fill-color:var(--color-percent--90to100)}.displays-percentage-colors[style=\"--percentage:1%;\"],.displays-percentage-colors[style=\"--percentage:2%;\"],.displays-percentage-colors[style=\"--percentage:3%;\"],.displays-percentage-colors[style=\"--percentage:4%;\"],.displays-percentage-colors[style=\"--percentage:5%;\"],.displays-percentage-colors[style=\"--percentage:6%;\"],.displays-percentage-colors[style=\"--percentage:7%;\"],.displays-percentage-colors[style=\"--percentage:8%;\"],.displays-percentage-colors[style=\"--percentage:9%;\"]{--circular-progress-fill-color:var(--color-percent--0to10)}";
|
|
6
|
-
|
|
7
|
-
const PERCENT = 100;
|
|
8
|
-
const CircularProgress = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
/**
|
|
12
|
-
* The value of the progress bar.
|
|
13
|
-
*/
|
|
14
|
-
this.value = 0;
|
|
15
|
-
/**
|
|
16
|
-
* The maximum value within the scale that the progress bar should visualize. Defaults to `100`.
|
|
17
|
-
*/
|
|
18
|
-
this.maxValue = PERCENT;
|
|
19
|
-
/**
|
|
20
|
-
* The suffix which is displayed after the `value`, must be one or two characters long. Defaults to `%`
|
|
21
|
-
*/
|
|
22
|
-
this.suffix = '%';
|
|
23
|
-
/**
|
|
24
|
-
* When set to `true`, makes the filled section showing the percentage colorful. Colors change with intervals of 10%.
|
|
25
|
-
*/
|
|
26
|
-
this.displayPercentageColors = false;
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
const classList = {
|
|
30
|
-
'lime-circular-progress': true,
|
|
31
|
-
'displays-percentage-colors': this.displayPercentageColors,
|
|
32
|
-
};
|
|
33
|
-
const currentPercentage = (this.value * PERCENT) / this.maxValue + '%';
|
|
34
|
-
const value = Math.round(this.value * 10) / 10; // eslint-disable-line no-magic-numbers
|
|
35
|
-
return (h("div", { role: "progressbar", class: classList, "aria-label": "%", "aria-valuemin": "0", "aria-valuemax": this.maxValue, "aria-valuenow": this.value, style: { '--percentage': currentPercentage } }, h("span", { class: "value" }, abbreviate(value), h("span", { class: "suffix" }, this.suffix))));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
CircularProgress.style = circularProgressCss;
|
|
39
|
-
|
|
40
|
-
export { CircularProgress as limel_circular_progress };
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-11cd0b60.js';
|
|
2
|
-
import { c as createRandomString } from './random-string-2246b81e.js';
|
|
3
|
-
import { z as zipObject } from './zipObject-2bb1968e.js';
|
|
4
|
-
import './_assignValue-fb2bf80a.js';
|
|
5
|
-
import './_defineProperty-2105cb48.js';
|
|
6
|
-
import './_getNative-93d6bfe9.js';
|
|
7
|
-
import './eq-c1c7f528.js';
|
|
8
|
-
import './isObject-c74e273c.js';
|
|
9
|
-
|
|
10
|
-
const menuCss = ":host{display:inline-block}:host([hidden]){display:none}.menu__trigger{border-color:transparent;border-width:1px;border-style:solid;background:none;color:rgb(var(--contrast-800));height:2.25rem}.menu__trigger-enabled:hover{border-color:rgb(var(--contrast-800));color:rgb(var(--contrast-1100))}.mdc-menu-surface--anchor{position:relative}";
|
|
11
|
-
|
|
12
|
-
const Menu = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
registerInstance(this, hostRef);
|
|
15
|
-
this.cancel = createEvent(this, "cancel", 7);
|
|
16
|
-
this.select = createEvent(this, "select", 7);
|
|
17
|
-
/**
|
|
18
|
-
* A list of items and separators to show in the menu.
|
|
19
|
-
*/
|
|
20
|
-
this.items = [];
|
|
21
|
-
/**
|
|
22
|
-
* Sets the disabled state of the menu.
|
|
23
|
-
*/
|
|
24
|
-
this.disabled = false;
|
|
25
|
-
/**
|
|
26
|
-
* Decides the menu's location in relation to its trigger
|
|
27
|
-
*/
|
|
28
|
-
this.openDirection = 'bottom-start';
|
|
29
|
-
/**
|
|
30
|
-
* Sets the open state of the menu.
|
|
31
|
-
*/
|
|
32
|
-
this.open = false;
|
|
33
|
-
/**
|
|
34
|
-
* Defines whether the menu should show badges.
|
|
35
|
-
*/
|
|
36
|
-
this.badgeIcons = false;
|
|
37
|
-
/**
|
|
38
|
-
* Renders list items in a grid layout, rather than a vertical list
|
|
39
|
-
*/
|
|
40
|
-
this.gridLayout = false;
|
|
41
|
-
this.setTriggerAttributes = (element) => {
|
|
42
|
-
const attributes = {
|
|
43
|
-
'aria-haspopup': true,
|
|
44
|
-
'aria-expanded': this.open,
|
|
45
|
-
disabled: this.disabled,
|
|
46
|
-
role: 'button',
|
|
47
|
-
};
|
|
48
|
-
for (const [key, value] of Object.entries(attributes)) {
|
|
49
|
-
if (!value) {
|
|
50
|
-
element.removeAttribute(key);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
element.setAttribute(key, String(value));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
this.onClose = () => {
|
|
58
|
-
this.cancel.emit();
|
|
59
|
-
this.open = false;
|
|
60
|
-
};
|
|
61
|
-
this.onTriggerClick = (event) => {
|
|
62
|
-
event.stopPropagation();
|
|
63
|
-
if (this.disabled) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
this.open = !this.open;
|
|
67
|
-
};
|
|
68
|
-
this.handleSelect = (event) => {
|
|
69
|
-
event.stopPropagation();
|
|
70
|
-
this.select.emit(event.detail);
|
|
71
|
-
this.open = false;
|
|
72
|
-
};
|
|
73
|
-
this.setListElement = (element) => {
|
|
74
|
-
this.list = element;
|
|
75
|
-
};
|
|
76
|
-
this.focusMenuItem = () => {
|
|
77
|
-
var _a;
|
|
78
|
-
const activeElement = this.list.shadowRoot.activeElement;
|
|
79
|
-
activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur();
|
|
80
|
-
const MenuItems = this.items.filter(this.isMenuItem);
|
|
81
|
-
const selectedIndex = Math.max(MenuItems.findIndex((item) => item.selected), 0);
|
|
82
|
-
const menuElements = Array.from(this.list.shadowRoot.querySelectorAll('[role="menuitem"]'));
|
|
83
|
-
(_a = menuElements[selectedIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
84
|
-
};
|
|
85
|
-
this.portalId = createRandomString();
|
|
86
|
-
}
|
|
87
|
-
openWatcher() {
|
|
88
|
-
if (!this.open) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const observer = new IntersectionObserver(() => {
|
|
92
|
-
observer.unobserve(this.list);
|
|
93
|
-
this.focusMenuItem();
|
|
94
|
-
});
|
|
95
|
-
observer.observe(this.list);
|
|
96
|
-
}
|
|
97
|
-
render() {
|
|
98
|
-
const cssProperties = this.getCssProperties();
|
|
99
|
-
const dropdownZIndex = getComputedStyle(this.host).getPropertyValue('--dropdown-z-index');
|
|
100
|
-
return (h("div", { class: "mdc-menu-surface--anchor", onClick: this.onTriggerClick }, h("slot", { name: "trigger" }), h("limel-portal", { visible: this.open, containerId: this.portalId, openDirection: this.openDirection, position: "absolute", containerStyle: { 'z-index': dropdownZIndex } }, h("limel-menu-surface", { open: this.open, onDismiss: this.onClose, style: cssProperties, class: {
|
|
101
|
-
'has-grid-layout': this.gridLayout,
|
|
102
|
-
} }, h("limel-menu-list", { class: {
|
|
103
|
-
'has-grid-layout has-interactive-items': this.gridLayout,
|
|
104
|
-
}, items: this.items, type: "menu", badgeIcons: this.badgeIcons, onSelect: this.handleSelect, ref: this.setListElement })))));
|
|
105
|
-
}
|
|
106
|
-
componentDidRender() {
|
|
107
|
-
const slotElement = this.host.shadowRoot.querySelector('slot');
|
|
108
|
-
slotElement.assignedElements().forEach(this.setTriggerAttributes);
|
|
109
|
-
}
|
|
110
|
-
getCssProperties() {
|
|
111
|
-
const propertyNames = [
|
|
112
|
-
'--menu-surface-width',
|
|
113
|
-
'--list-grid-item-max-width',
|
|
114
|
-
'--list-grid-item-min-width',
|
|
115
|
-
'--list-grid-gap',
|
|
116
|
-
];
|
|
117
|
-
const style = getComputedStyle(this.host);
|
|
118
|
-
const values = propertyNames.map((property) => {
|
|
119
|
-
return style.getPropertyValue(property);
|
|
120
|
-
});
|
|
121
|
-
return zipObject(propertyNames, values);
|
|
122
|
-
}
|
|
123
|
-
isMenuItem(item) {
|
|
124
|
-
return !('separator' in item);
|
|
125
|
-
}
|
|
126
|
-
get host() { return getElement(this); }
|
|
127
|
-
static get watchers() { return {
|
|
128
|
-
"open": ["openWatcher"]
|
|
129
|
-
}; }
|
|
130
|
-
};
|
|
131
|
-
Menu.style = menuCss;
|
|
132
|
-
|
|
133
|
-
export { Menu as limel_menu };
|