@limetech/lime-elements 34.1.0-next.8 → 34.1.1-next.2
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/{_arrayIncludesWith-d69e30af.js → _arrayIncludesWith-36a6fafb.js} +7 -6
- package/dist/cjs/{_assignValue-493aac17.js → _assignValue-c9fc3712.js} +2 -2
- package/dist/cjs/{_defineProperty-c081d04c.js → _defineProperty-8351e789.js} +4 -3
- package/dist/cjs/{checkbox.template-d4423721.js → checkbox.template-312308d8.js} +9 -1
- package/dist/cjs/eq-9a943b00.js +75 -0
- package/dist/cjs/{isArrayLike-2bebb99c.js → isArrayLike-ac53bdac.js} +1 -30
- package/dist/cjs/{isEqual-1ce0c121.js → isEqual-e3b9c27c.js} +21 -19
- package/dist/cjs/{eq-3b43a5ca.js → isObject-e28b7997.js} +0 -71
- package/dist/cjs/isObjectLike-3e3f0cba.js +31 -0
- package/dist/cjs/{isSymbol-4666002c.js → isSymbol-d22b2798.js} +3 -3
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/limel-chip-set.cjs.entry.js +50 -28
- package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +188 -0
- package/dist/cjs/limel-color-picker.cjs.entry.js +51 -0
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/{limel-flatpickr-adapter_2.cjs.entry.js → limel-flatpickr-adapter.cjs.entry.js} +8 -801
- package/dist/cjs/limel-form.cjs.entry.js +62 -27
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-input-field.cjs.entry.js +713 -0
- package/dist/cjs/{limel-list_2.cjs.entry.js → limel-list_3.cjs.entry.js} +1948 -2
- package/dist/cjs/limel-menu-list.cjs.entry.js +1 -1
- package/dist/cjs/limel-menu.cjs.entry.js +5 -4
- package/dist/cjs/limel-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-slider.cjs.entry.js +69 -13
- package/dist/cjs/limel-tab-bar.cjs.entry.js +7 -5
- package/dist/cjs/limel-table.cjs.entry.js +9 -7
- package/dist/cjs/{limel-tooltip.cjs.entry.js → limel-tooltip_2.cjs.entry.js} +16 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pickBy-64252559.js → pickBy-88b0430a.js} +10 -10
- package/dist/cjs/toNumber-062ea29c.js +99 -0
- package/dist/cjs/{zipObject-2f430e94.js → zipObject-4050a45f.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/checkbox/checkbox.css +96 -0
- package/dist/collection/components/checkbox/checkbox.js +19 -1
- package/dist/collection/components/checkbox/checkbox.template.js +9 -1
- package/dist/collection/components/chip-set/chip-set.css +22 -0
- package/dist/collection/components/chip-set/chip-set.js +75 -35
- package/dist/collection/components/code-editor/code-editor.css +7 -0
- package/dist/collection/components/color-picker/color-picker-palette.css +1239 -0
- package/dist/collection/components/color-picker/color-picker-palette.js +135 -0
- package/dist/collection/components/color-picker/color-picker.css +108 -0
- package/dist/collection/components/color-picker/color-picker.js +189 -0
- package/dist/collection/components/color-picker/swatches.js +29 -0
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/form/adapters/widget-adapter.js +4 -1
- package/dist/collection/components/form/fields/schema-field.js +3 -1
- package/dist/collection/components/form/form.js +50 -0
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +8 -8
- package/dist/collection/components/form/templates/common.js +1 -1
- package/dist/collection/components/form/widgets/select.js +3 -4
- package/dist/collection/components/grid/grid.css +1 -1
- package/dist/collection/components/input-field/input-field.css +13 -0
- package/dist/collection/components/list/list-renderer.js +17 -0
- package/dist/collection/components/list/list.css +421 -2
- package/dist/collection/components/list/list.js +1 -0
- package/dist/collection/components/menu-list/menu-list.css +1408 -60
- package/dist/collection/components/picker/picker.js +18 -1
- package/dist/collection/components/slider/slider.js +69 -13
- package/dist/esm/{_arrayIncludesWith-3f5ce249.js → _arrayIncludesWith-b5d3fd9e.js} +5 -4
- package/dist/esm/{_assignValue-94fb6adc.js → _assignValue-08fe10bc.js} +2 -2
- package/dist/esm/{_defineProperty-cbf98a2a.js → _defineProperty-8c869077.js} +2 -1
- package/dist/esm/{checkbox.template-dbdd27c8.js → checkbox.template-4be69ce6.js} +9 -1
- package/dist/esm/eq-c1c7f528.js +72 -0
- package/dist/esm/{isArrayLike-14db8f02.js → isArrayLike-dd37ba9a.js} +2 -30
- package/dist/esm/{isEqual-4d982635.js → isEqual-4f22635f.js} +5 -3
- package/dist/esm/{eq-f40dd1d6.js → isObject-c74e273c.js} +1 -70
- package/dist/esm/isObjectLike-38996507.js +29 -0
- package/dist/esm/{isSymbol-84252d8e.js → isSymbol-5bf20921.js} +2 -2
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-checkbox.entry.js +3 -3
- package/dist/esm/limel-chip-set.entry.js +50 -28
- package/dist/esm/limel-code-editor.entry.js +1 -1
- package/dist/esm/limel-color-picker-palette_2.entry.js +183 -0
- package/dist/esm/limel-color-picker.entry.js +47 -0
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/{limel-flatpickr-adapter_2.entry.js → limel-flatpickr-adapter.entry.js} +8 -800
- package/dist/esm/limel-form.entry.js +58 -23
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-input-field.entry.js +709 -0
- package/dist/esm/{limel-list_2.entry.js → limel-list_3.entry.js} +1948 -3
- package/dist/esm/limel-menu-list.entry.js +1 -1
- package/dist/esm/limel-menu.entry.js +5 -4
- package/dist/esm/limel-picker.entry.js +1 -1
- package/dist/esm/limel-slider.entry.js +69 -13
- package/dist/esm/limel-tab-bar.entry.js +7 -5
- package/dist/esm/limel-table.entry.js +9 -7
- package/dist/esm/{limel-tooltip.entry.js → limel-tooltip_2.entry.js} +16 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pickBy-c485c1b5.js → pickBy-8a849e46.js} +5 -5
- package/dist/esm/toNumber-a6ed64f0.js +97 -0
- package/dist/esm/{zipObject-53fcafb3.js → zipObject-22e88ce9.js} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-090bc949.js +1 -0
- package/dist/lime-elements/p-0c121e2f.js +1 -0
- package/dist/lime-elements/{p-c6b97214.entry.js → p-0ce9165f.entry.js} +1 -1
- package/dist/lime-elements/p-13f0e4f4.entry.js +1 -0
- package/dist/lime-elements/p-1876a96a.entry.js +1 -0
- package/dist/lime-elements/{p-425a0596.js → p-1a64b531.js} +1 -1
- package/dist/lime-elements/p-365098fe.js +1 -0
- package/dist/lime-elements/p-379955f4.js +1 -0
- package/dist/lime-elements/p-426d11b4.js +1 -0
- package/dist/lime-elements/p-440084ea.js +1 -0
- package/dist/lime-elements/p-468e940e.entry.js +16 -0
- package/dist/lime-elements/p-46af5a60.entry.js +82 -0
- package/dist/lime-elements/p-4bc5d3fc.entry.js +1 -0
- package/dist/lime-elements/p-511d71e0.entry.js +1 -0
- package/dist/lime-elements/p-5170a62c.entry.js +1 -0
- package/dist/lime-elements/p-5a9ecd77.entry.js +73 -0
- package/dist/lime-elements/p-6003f817.entry.js +1 -0
- package/dist/lime-elements/p-7f43b0c4.js +1 -0
- package/dist/lime-elements/p-858c6b82.js +1 -0
- package/dist/lime-elements/p-8a2c1038.entry.js +16 -0
- package/dist/lime-elements/{p-a1153d2a.entry.js → p-8ad5e143.entry.js} +1 -1
- package/dist/lime-elements/{p-b386bfeb.entry.js → p-a2cf74c1.entry.js} +1 -1
- package/dist/lime-elements/p-a77cbb08.entry.js +1 -0
- package/dist/lime-elements/p-c93050d6.js +1 -0
- package/dist/lime-elements/p-d48ad9f7.entry.js +126 -0
- package/dist/lime-elements/p-d529bb7d.js +1 -0
- package/dist/lime-elements/{p-fc691234.entry.js → p-d93a3b07.entry.js} +2 -2
- package/dist/lime-elements/p-eda23c05.js +1 -0
- package/dist/lime-elements/{p-ff0217b3.entry.js → p-f2c706b8.entry.js} +1 -1
- package/dist/lime-elements/p-f83213b8.js +1 -0
- package/dist/lime-elements/{p-23d59a30.entry.js → p-fbe6100e.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +5 -0
- package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
- package/dist/types/components/chip-set/chip-set.d.ts +12 -0
- package/dist/types/components/color-picker/color-picker-palette.d.ts +32 -0
- package/dist/types/components/color-picker/color-picker.d.ts +54 -0
- package/dist/types/components/color-picker/swatches.d.ts +4 -0
- package/dist/types/components/form/form.d.ts +7 -1
- package/dist/types/components/list/list-item.types.d.ts +14 -0
- package/dist/types/components/list/list-renderer.d.ts +2 -0
- package/dist/types/components/list/list.d.ts +1 -0
- package/dist/types/components/picker/picker.d.ts +4 -0
- package/dist/types/components/slider/slider.d.ts +8 -0
- package/dist/types/components.d.ts +147 -1
- package/package.json +1 -1
- package/dist/cjs/limel-popover.cjs.entry.js +0 -116
- package/dist/cjs/limel-portal.cjs.entry.js +0 -1935
- package/dist/cjs/limel-tooltip-content.cjs.entry.js +0 -22
- package/dist/esm/limel-popover.entry.js +0 -112
- package/dist/esm/limel-portal.entry.js +0 -1931
- package/dist/esm/limel-tooltip-content.entry.js +0 -18
- package/dist/lime-elements/p-1cf833c8.entry.js +0 -16
- package/dist/lime-elements/p-227d2c5a.entry.js +0 -1
- package/dist/lime-elements/p-3ce2d46a.js +0 -1
- package/dist/lime-elements/p-77afe6dd.entry.js +0 -1
- package/dist/lime-elements/p-7c4d91f5.js +0 -1
- package/dist/lime-elements/p-845e645a.entry.js +0 -1
- package/dist/lime-elements/p-89b5a983.js +0 -1
- package/dist/lime-elements/p-8bbe3720.js +0 -1
- package/dist/lime-elements/p-8d8bd2ab.entry.js +0 -73
- package/dist/lime-elements/p-8e4ff107.js +0 -1
- package/dist/lime-elements/p-acfbf7ac.js +0 -1
- package/dist/lime-elements/p-b5d6abc3.entry.js +0 -126
- package/dist/lime-elements/p-bbc1bb01.entry.js +0 -1
- package/dist/lime-elements/p-c0765c9b.js +0 -1
- package/dist/lime-elements/p-df55ee67.entry.js +0 -82
- package/dist/lime-elements/p-e28a4246.entry.js +0 -1
- package/dist/lime-elements/p-ee7355e7.js +0 -1
- package/dist/lime-elements/p-f4495f59.entry.js +0 -1
- package/dist/lime-elements/p-facf936d.entry.js +0 -1
- package/dist/lime-elements/p-fbe32287.entry.js +0 -16
- package/dist/lime-elements/p-fc610f15.js +0 -1
|
@@ -11010,7 +11010,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11010
11010
|
});
|
|
11011
11011
|
});
|
|
11012
11012
|
|
|
11013
|
-
const codeEditorCss = ".CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0;}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px;}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white;}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20, 255, 20, 0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255, 150, 0, .3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px;}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:0.1px;}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255, 255, 0, .4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}:host{display:flex;font-size:1rem}.editor{width:100%}.editor.is-light-mode{--code-editor-neutral-text-color:var(--contrast-1100);--code-editor-background-color:var(--contrast-200);--code-editor-gutter-background-color:var(--contrast-300);--code-editor-line-number-text-color:var(--contrast-700);--code-editor-cursor-color:var(--color-amber-dark);--code-editor-selection-highlight-color:var(--color-cyan-default);--code-editor-selection-lowlight-color:var(--contrast-600)}.editor.is-light-mode .cm-attribute,.editor.is-light-mode .cm-property,.editor.is-light-mode .cm-keyword{color:rgb(var(--color-violet-light))}.editor.is-light-mode .cm-operator{color:rgb(var(--color-sky-dark))}.editor.is-light-mode .cm-variable{color:rgb(var(--color-pink-light))}.editor.is-light-mode .cm-variable-2{color:rgb(var(--contrast-1100))}.editor.is-light-mode .cm-variable-3,.editor.is-light-mode .cm-type{color:rgb(var(--color-amber-darker))}.editor.is-light-mode .cm-builtin,.editor.is-light-mode .cm-meta{color:rgb(var(--color-amber-default))}.editor.is-light-mode .cm-atom{color:rgb(var(--color-coral-default))}.editor.is-light-mode .cm-tag,.editor.is-light-mode .cm-number{color:rgb(var(--color-magenta-default))}.editor.is-light-mode .cm-def{color:rgb(var(--color-sky-default))}.editor.is-light-mode .cm-string{color:rgb(var(--color-green-dark))}.editor.is-light-mode .cm-string-2{color:rgb(var(--color-pink-default))}.editor.is-light-mode .cm-qualifier{color:rgb(var(--color-grass-default))}.editor.is-light-mode .cm-error{color:rgb(var(--color-white));background-color:rgb(var(--color-red-default))}.editor.is-light-mode .cm-comment{color:rgba(var(--code-editor-neutral-text-color), 0.7)}.editor.is-dark-mode{--code-editor-neutral-text-color:var(--contrast-200);--code-editor-background-color:var(--contrast-1600);--code-editor-gutter-background-color:var(--contrast-1500);--code-editor-line-number-text-color:var(--contrast-1000);--code-editor-cursor-color:var(--color-amber-default);--code-editor-selection-highlight-color:var(--color-cyan-light);--code-editor-selection-lowlight-color:var(--contrast-1700)}.editor.is-dark-mode .cm-attribute,.editor.is-dark-mode .cm-property,.editor.is-dark-mode .cm-keyword{color:rgb(var(--color-purple-lighter))}.editor.is-dark-mode .cm-operator{color:rgb(var(--color-sky-lighter))}.editor.is-dark-mode .cm-variable{color:rgb(var(--color-pink-light))}.editor.is-dark-mode .cm-variable-2{color:rgb(var(--contrast-300))}.editor.is-dark-mode .cm-variable-3,.editor.is-dark-mode .cm-type{color:rgb(var(--color-yellow-light))}.editor.is-dark-mode .cm-builtin,.editor.is-dark-mode .cm-meta{color:rgb(var(--color-amber-default))}.editor.is-dark-mode .cm-atom{color:rgb(var(--color-coral-light))}.editor.is-dark-mode .cm-tag,.editor.is-dark-mode .cm-number{color:rgb(var(--color-magenta-light))}.editor.is-dark-mode .cm-def{color:rgb(var(--color-sky-light))}.editor.is-dark-mode .cm-string{color:rgb(var(--color-lime-light))}.editor.is-dark-mode .cm-string-2{color:rgb(var(--color-pink-lighter))}.editor.is-dark-mode .cm-qualifier{color:rgb(var(--color-grass-light))}.editor.is-dark-mode .cm-error{color:rgb(var(--color-white));background-color:rgb(var(--color-red-default))}.editor.is-dark-mode .cm-comment{color:rgba(var(--code-editor-neutral-text-color), 0.4)}.editor.readonly .CodeMirror-focused .CodeMirror-cursors{visibility:visible !important}.cm-s-lime.CodeMirror{color:rgb(var(--code-editor-neutral-text-color));background-color:rgb(var(--code-editor-background-color));border-radius:0.25rem}.cm-s-lime.CodeMirror-focused div.CodeMirror-selected{background:rgba(var(--code-editor-selection-highlight-color), 0.15)}.cm-s-lime div.CodeMirror-selected{background:rgba(var(--code-editor-selection-highlight-color), 0.05)}.cm-s-lime .CodeMirror-gutters{background-color:rgb(var(--code-editor-gutter-background-color));color:rgb(var(--code-editor-line-number-text-color));border:none}.cm-s-lime .CodeMirror-guttermarker,.cm-s-lime .CodeMirror-guttermarker-subtle,.cm-s-lime .CodeMirror-linenumber{color:rgb(var(--code-editor-line-number-text-color))}.cm-s-lime .CodeMirror-cursor{border-left:1px solid rgb(var(--code-editor-cursor-color))}.editor.readonly .cm-s-lime .CodeMirror-cursor{border-color:rgba(var(--code-editor-neutral-text-color), 0.5);border-width:0.125rem}.cm-s-lime .CodeMirror-activeline-background{background:rgba(var(--code-editor-selection-lowlight-color), 0.5)}.cm-s-lime .CodeMirror-matchingbracket{font-weight:bold;color:rgb(var(--code-editor-neutral-text-color)) !important;background:rgba(var(--code-editor-selection-highlight-color), 0.15);position:relative}.cm-s-lime .CodeMirror-matchingbracket:before{content:\"_\";color:rgb(var(--code-editor-selection-highlight-color), 0.8);position:absolute;bottom:-0.4rem;left:0;right:0}";
|
|
11013
|
+
const codeEditorCss = ".CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0;}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px;}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white;}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20, 255, 20, 0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255, 150, 0, .3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px;}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:0.1px;}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255, 255, 0, .4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}:host{display:flex;font-size:1rem}.editor{width:100%}.editor.is-light-mode{--code-editor-neutral-text-color:var(--contrast-1100);--code-editor-background-color:var(--contrast-200);--code-editor-gutter-background-color:var(--contrast-300);--code-editor-line-number-text-color:var(--contrast-700);--code-editor-cursor-color:var(--color-amber-dark);--code-editor-selection-highlight-color:var(--color-cyan-default);--code-editor-selection-lowlight-color:var(--contrast-600)}.editor.is-light-mode .cm-attribute,.editor.is-light-mode .cm-property,.editor.is-light-mode .cm-keyword{color:rgb(var(--color-violet-light))}.editor.is-light-mode .cm-operator{color:rgb(var(--color-sky-dark))}.editor.is-light-mode .cm-variable{color:rgb(var(--color-pink-light))}.editor.is-light-mode .cm-variable-2{color:rgb(var(--contrast-1100))}.editor.is-light-mode .cm-variable-3,.editor.is-light-mode .cm-type{color:rgb(var(--color-amber-darker))}.editor.is-light-mode .cm-builtin,.editor.is-light-mode .cm-meta{color:rgb(var(--color-amber-default))}.editor.is-light-mode .cm-atom{color:rgb(var(--color-coral-default))}.editor.is-light-mode .cm-tag,.editor.is-light-mode .cm-number{color:rgb(var(--color-magenta-default))}.editor.is-light-mode .cm-def{color:rgb(var(--color-sky-default))}.editor.is-light-mode .cm-string{color:rgb(var(--color-green-dark))}.editor.is-light-mode .cm-string-2{color:rgb(var(--color-pink-default))}.editor.is-light-mode .cm-qualifier{color:rgb(var(--color-grass-default))}.editor.is-light-mode .cm-error{color:rgb(var(--color-white));background-color:rgb(var(--color-red-default))}.editor.is-light-mode .cm-comment{color:rgba(var(--code-editor-neutral-text-color), 0.7)}.editor.is-dark-mode{--code-editor-neutral-text-color:var(--contrast-200);--code-editor-background-color:var(--contrast-1600);--code-editor-gutter-background-color:var(--contrast-1500);--code-editor-line-number-text-color:var(--contrast-1000);--code-editor-cursor-color:var(--color-amber-default);--code-editor-selection-highlight-color:var(--color-cyan-light);--code-editor-selection-lowlight-color:var(--contrast-1700)}.editor.is-dark-mode .cm-attribute,.editor.is-dark-mode .cm-property,.editor.is-dark-mode .cm-keyword{color:rgb(var(--color-purple-lighter))}.editor.is-dark-mode .cm-operator{color:rgb(var(--color-sky-lighter))}.editor.is-dark-mode .cm-variable{color:rgb(var(--color-pink-light))}.editor.is-dark-mode .cm-variable-2{color:rgb(var(--contrast-300))}.editor.is-dark-mode .cm-variable-3,.editor.is-dark-mode .cm-type{color:rgb(var(--color-yellow-light))}.editor.is-dark-mode .cm-builtin,.editor.is-dark-mode .cm-meta{color:rgb(var(--color-amber-default))}.editor.is-dark-mode .cm-atom{color:rgb(var(--color-coral-light))}.editor.is-dark-mode .cm-tag,.editor.is-dark-mode .cm-number{color:rgb(var(--color-magenta-light))}.editor.is-dark-mode .cm-def{color:rgb(var(--color-sky-light))}.editor.is-dark-mode .cm-string{color:rgb(var(--color-lime-light))}.editor.is-dark-mode .cm-string-2{color:rgb(var(--color-pink-lighter))}.editor.is-dark-mode .cm-qualifier{color:rgb(var(--color-grass-light))}.editor.is-dark-mode .cm-error{color:rgb(var(--color-white));background-color:rgb(var(--color-red-default))}.editor.is-dark-mode .cm-comment{color:rgba(var(--code-editor-neutral-text-color), 0.4)}.editor.readonly .CodeMirror-focused .CodeMirror-cursors{visibility:visible !important}.cm-s-lime.CodeMirror{color:rgb(var(--code-editor-neutral-text-color));background-color:rgb(var(--code-editor-background-color));border-radius:0.25rem;height:auto}.cm-s-lime .CodeMirror-scroll{max-height:var(--code-editor-max-height, 10rem)}.cm-s-lime.CodeMirror-focused div.CodeMirror-selected{background:rgba(var(--code-editor-selection-highlight-color), 0.15)}.cm-s-lime div.CodeMirror-selected{background:rgba(var(--code-editor-selection-highlight-color), 0.05)}.cm-s-lime .CodeMirror-gutters{background-color:rgb(var(--code-editor-gutter-background-color));color:rgb(var(--code-editor-line-number-text-color));border:none}.cm-s-lime .CodeMirror-guttermarker,.cm-s-lime .CodeMirror-guttermarker-subtle,.cm-s-lime .CodeMirror-linenumber{color:rgb(var(--code-editor-line-number-text-color))}.cm-s-lime .CodeMirror-cursor{border-left:1px solid rgb(var(--code-editor-cursor-color))}.editor.readonly .cm-s-lime .CodeMirror-cursor{border-color:rgba(var(--code-editor-neutral-text-color), 0.5);border-width:0.125rem}.cm-s-lime .CodeMirror-activeline-background{background:rgba(var(--code-editor-selection-lowlight-color), 0.5)}.cm-s-lime .CodeMirror-matchingbracket{font-weight:bold;color:rgb(var(--code-editor-neutral-text-color)) !important;background:rgba(var(--code-editor-selection-highlight-color), 0.15);position:relative}.cm-s-lime .CodeMirror-matchingbracket:before{content:\"_\";color:rgb(var(--code-editor-selection-highlight-color), 0.8);position:absolute;bottom:-0.4rem;left:0;right:0}";
|
|
11014
11014
|
|
|
11015
11015
|
let CodeEditor = class {
|
|
11016
11016
|
constructor(hostRef) {
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e63a89d7.js');
|
|
6
|
+
const randomString = require('./random-string-4c3b7f1c.js');
|
|
7
|
+
const keycodes = require('./keycodes-3949f425.js');
|
|
8
|
+
const zipObject = require('./zipObject-4050a45f.js');
|
|
9
|
+
require('./_assignValue-c9fc3712.js');
|
|
10
|
+
require('./_defineProperty-8351e789.js');
|
|
11
|
+
require('./eq-9a943b00.js');
|
|
12
|
+
require('./isObject-e28b7997.js');
|
|
13
|
+
|
|
14
|
+
const colors = [
|
|
15
|
+
'red',
|
|
16
|
+
'pink',
|
|
17
|
+
'magenta',
|
|
18
|
+
'purple',
|
|
19
|
+
'violet',
|
|
20
|
+
'indigo',
|
|
21
|
+
'blue',
|
|
22
|
+
'sky',
|
|
23
|
+
'cyan',
|
|
24
|
+
'teal',
|
|
25
|
+
'green',
|
|
26
|
+
'lime',
|
|
27
|
+
'grass',
|
|
28
|
+
'yellow',
|
|
29
|
+
'amber',
|
|
30
|
+
'orange',
|
|
31
|
+
'coral',
|
|
32
|
+
'brown',
|
|
33
|
+
'gray',
|
|
34
|
+
'glaucous',
|
|
35
|
+
];
|
|
36
|
+
const brightnesses = ['lighter', 'light', 'default', 'dark', 'darker'];
|
|
37
|
+
function getColorName(color, brightness) {
|
|
38
|
+
return `--color-${color}-${brightness}`;
|
|
39
|
+
}
|
|
40
|
+
function getCssColor(color, brightness) {
|
|
41
|
+
return `rgb(var(${getColorName(color, brightness)}))`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const colorPickerPaletteCss = ".color-palette{display:grid;gap:0.25rem;grid-auto-flow:column;margin:0.75rem auto 1.25rem auto;padding:1.25rem 0.75rem;background-color:rgb(var(--kompendium-contrast-300));border-radius:0.1875rem}.brightness-label,.swatch{display:flex;align-items:center;position:relative}.swatch{transition:border-radius 0.2s ease;border-radius:3px;justify-content:center;color:rgba(var(--kompendium-color-white), 0.4);font-size:1.25rem;line-height:99%}.swatch:after{content:\"\";display:block;padding-top:100%}.swatch.hue{font-family:\"Source Code Pro\", monospace;font-size:0.75rem;position:relative;color:rgb(var(--kompendium-contrast-900));padding-top:0.5rem;writing-mode:vertical-lr;justify-content:left}.brightness-label{font-family:\"Source Code Pro\", monospace;font-size:0.75rem;color:rgb(var(--kompendium-contrast-900));justify-content:start}.brand-colors-tips{transition:opacity 0.2s ease 0.4s;opacity:0;font-size:0.875rem;padding-left:2.75rem;margin-bottom:2.5rem}.brand-colors .brand-colors-tips{opacity:1}@media (prefers-color-scheme: light){.brand-colors .--color-glaucous-default,.brand-colors .--color-gray-dark{border-radius:50%}}@media (prefers-color-scheme: dark){.brand-colors .--color-red-light,.brand-colors .--color-magenta-default,.brand-colors .--color-sky-light,.brand-colors .--color-teal-light,.brand-colors .--color-green-light,.brand-colors .--color-amber-light,.brand-colors .--color-amber-default,.brand-colors .--color-coral-light,.brand-colors .--color-gray-light{border-radius:50%}}.--color-red-lighter{background-color:rgb(var(--color-red-lighter))}.--color-red-light{background-color:rgb(var(--color-red-light))}.--color-red-default{background-color:rgb(var(--color-red-default))}.--color-red-dark{background-color:rgb(var(--color-red-dark))}.--color-red-darker{background-color:rgb(var(--color-red-darker))}.--color-pink-lighter{background-color:rgb(var(--color-pink-lighter))}.--color-pink-light{background-color:rgb(var(--color-pink-light))}.--color-pink-default{background-color:rgb(var(--color-pink-default))}.--color-pink-dark{background-color:rgb(var(--color-pink-dark))}.--color-pink-darker{background-color:rgb(var(--color-pink-darker))}.--color-magenta-lighter{background-color:rgb(var(--color-magenta-lighter))}.--color-magenta-light{background-color:rgb(var(--color-magenta-light))}.--color-magenta-default{background-color:rgb(var(--color-magenta-default))}.--color-magenta-dark{background-color:rgb(var(--color-magenta-dark))}.--color-magenta-darker{background-color:rgb(var(--color-magenta-darker))}.--color-purple-lighter{background-color:rgb(var(--color-purple-lighter))}.--color-purple-light{background-color:rgb(var(--color-purple-light))}.--color-purple-default{background-color:rgb(var(--color-purple-default))}.--color-purple-dark{background-color:rgb(var(--color-purple-dark))}.--color-purple-darker{background-color:rgb(var(--color-purple-darker))}.--color-violet-lighter{background-color:rgb(var(--color-violet-lighter))}.--color-violet-light{background-color:rgb(var(--color-violet-light))}.--color-violet-default{background-color:rgb(var(--color-violet-default))}.--color-violet-dark{background-color:rgb(var(--color-violet-dark))}.--color-violet-darker{background-color:rgb(var(--color-violet-darker))}.--color-indigo-lighter{background-color:rgb(var(--color-indigo-lighter))}.--color-indigo-light{background-color:rgb(var(--color-indigo-light))}.--color-indigo-default{background-color:rgb(var(--color-indigo-default))}.--color-indigo-dark{background-color:rgb(var(--color-indigo-dark))}.--color-indigo-darker{background-color:rgb(var(--color-indigo-darker))}.--color-blue-lighter{background-color:rgb(var(--color-blue-lighter))}.--color-blue-light{background-color:rgb(var(--color-blue-light))}.--color-blue-default{background-color:rgb(var(--color-blue-default))}.--color-blue-dark{background-color:rgb(var(--color-blue-dark))}.--color-blue-darker{background-color:rgb(var(--color-blue-darker))}.--color-sky-lighter{background-color:rgb(var(--color-sky-lighter))}.--color-sky-light{background-color:rgb(var(--color-sky-light))}.--color-sky-default{background-color:rgb(var(--color-sky-default))}.--color-sky-dark{background-color:rgb(var(--color-sky-dark))}.--color-sky-darker{background-color:rgb(var(--color-sky-darker))}.--color-cyan-lighter{background-color:rgb(var(--color-cyan-lighter))}.--color-cyan-light{background-color:rgb(var(--color-cyan-light))}.--color-cyan-default{background-color:rgb(var(--color-cyan-default))}.--color-cyan-dark{background-color:rgb(var(--color-cyan-dark))}.--color-cyan-darker{background-color:rgb(var(--color-cyan-darker))}.--color-teal-lighter{background-color:rgb(var(--color-teal-lighter))}.--color-teal-light{background-color:rgb(var(--color-teal-light))}.--color-teal-default{background-color:rgb(var(--color-teal-default))}.--color-teal-dark{background-color:rgb(var(--color-teal-dark))}.--color-teal-darker{background-color:rgb(var(--color-teal-darker))}.--color-green-lighter{background-color:rgb(var(--color-green-lighter))}.--color-green-light{background-color:rgb(var(--color-green-light))}.--color-green-default{background-color:rgb(var(--color-green-default))}.--color-green-dark{background-color:rgb(var(--color-green-dark))}.--color-green-darker{background-color:rgb(var(--color-green-darker))}.--color-lime-lighter{background-color:rgb(var(--color-lime-lighter))}.--color-lime-light{background-color:rgb(var(--color-lime-light))}.--color-lime-default{background-color:rgb(var(--color-lime-default))}.--color-lime-dark{background-color:rgb(var(--color-lime-dark))}.--color-lime-darker{background-color:rgb(var(--color-lime-darker))}.--color-grass-lighter{background-color:rgb(var(--color-grass-lighter))}.--color-grass-light{background-color:rgb(var(--color-grass-light))}.--color-grass-default{background-color:rgb(var(--color-grass-default))}.--color-grass-dark{background-color:rgb(var(--color-grass-dark))}.--color-grass-darker{background-color:rgb(var(--color-grass-darker))}.--color-yellow-lighter{background-color:rgb(var(--color-yellow-lighter))}.--color-yellow-light{background-color:rgb(var(--color-yellow-light))}.--color-yellow-default{background-color:rgb(var(--color-yellow-default))}.--color-yellow-dark{background-color:rgb(var(--color-yellow-dark))}.--color-yellow-darker{background-color:rgb(var(--color-yellow-darker))}.--color-amber-lighter{background-color:rgb(var(--color-amber-lighter))}.--color-amber-light{background-color:rgb(var(--color-amber-light))}.--color-amber-default{background-color:rgb(var(--color-amber-default))}.--color-amber-dark{background-color:rgb(var(--color-amber-dark))}.--color-amber-darker{background-color:rgb(var(--color-amber-darker))}.--color-orange-lighter{background-color:rgb(var(--color-orange-lighter))}.--color-orange-light{background-color:rgb(var(--color-orange-light))}.--color-orange-default{background-color:rgb(var(--color-orange-default))}.--color-orange-dark{background-color:rgb(var(--color-orange-dark))}.--color-orange-darker{background-color:rgb(var(--color-orange-darker))}.--color-coral-lighter{background-color:rgb(var(--color-coral-lighter))}.--color-coral-light{background-color:rgb(var(--color-coral-light))}.--color-coral-default{background-color:rgb(var(--color-coral-default))}.--color-coral-dark{background-color:rgb(var(--color-coral-dark))}.--color-coral-darker{background-color:rgb(var(--color-coral-darker))}.--color-brown-lighter{background-color:rgb(var(--color-brown-lighter))}.--color-brown-light{background-color:rgb(var(--color-brown-light))}.--color-brown-default{background-color:rgb(var(--color-brown-default))}.--color-brown-dark{background-color:rgb(var(--color-brown-dark))}.--color-brown-darker{background-color:rgb(var(--color-brown-darker))}.--color-gray-lighter{background-color:rgb(var(--color-gray-lighter))}.--color-gray-light{background-color:rgb(var(--color-gray-light))}.--color-gray-default{background-color:rgb(var(--color-gray-default))}.--color-gray-dark{background-color:rgb(var(--color-gray-dark))}.--color-gray-darker{background-color:rgb(var(--color-gray-darker))}.--color-glaucous-lighter{background-color:rgb(var(--color-glaucous-lighter))}.--color-glaucous-light{background-color:rgb(var(--color-glaucous-light))}.--color-glaucous-default{background-color:rgb(var(--color-glaucous-default))}.--color-glaucous-dark{background-color:rgb(var(--color-glaucous-dark))}.--color-glaucous-darker{background-color:rgb(var(--color-glaucous-darker))}.--contrast-100{color:rgb(var(--contrast-900));background-color:rgb(var(--contrast-100))}.--contrast-200{color:rgb(var(--contrast-1000));background-color:rgb(var(--contrast-200))}.--contrast-300{color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-300))}.--contrast-400{color:rgb(var(--contrast-1200));background-color:rgb(var(--contrast-400))}.--contrast-500{color:rgb(var(--contrast-1300));background-color:rgb(var(--contrast-500))}.--contrast-600{color:rgb(var(--contrast-1400));background-color:rgb(var(--contrast-600))}.--contrast-700{color:rgb(var(--contrast-1500));background-color:rgb(var(--contrast-700))}.--contrast-800{color:rgb(var(--contrast-1600));background-color:rgb(var(--contrast-800))}.--contrast-900{color:rgb(var(--contrast-1700));background-color:rgb(var(--contrast-900))}.--contrast-1000{color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-1000))}.--contrast-1100{color:rgb(var(--contrast-200));background-color:rgb(var(--contrast-1100))}.--contrast-1200{color:rgb(var(--contrast-300));background-color:rgb(var(--contrast-1200))}.--contrast-1300{color:rgb(var(--contrast-400));background-color:rgb(var(--contrast-1300))}.--contrast-1400{color:rgb(var(--contrast-500));background-color:rgb(var(--contrast-1400))}.--contrast-1500{color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-1500))}.--contrast-1600{color:rgb(var(--contrast-700));background-color:rgb(var(--contrast-1600))}.--contrast-1700{color:rgb(var(--contrast-800));background-color:rgb(var(--contrast-1700))}.--color-white{color:rgb(var(--color-black));background-color:rgb(var(--color-white))}.--color-black{color:rgb(var(--color-white));background-color:rgb(var(--color-black))}:host{--lime-brand-color-deep-red:240, 87, 80;--lime-brand-color-sellable-orange:255, 112, 67;--lime-brand-color-orange:255, 176, 59;--lime-brand-color-yellow:255, 207, 61;--lime-brand-color-lime-green:102, 187, 106;--lime-brand-color-flexible-turquoise:38, 166, 154;--lime-brand-color-simple-blue:41, 182, 246;--lime-brand-color-dark-blue:87, 135, 159;--lime-brand-color-loving-magenta:255, 49, 149;--lime-brand-color-light-grey:173, 173, 173;--lime-brand-color-grey:87, 87, 86;--color-white:255, 255, 255;--color-black:0, 0, 0;--contrast-100:255, 255, 255;--contrast-200:250, 250, 251;--contrast-300:246, 246, 247;--contrast-400:241, 241, 243;--contrast-500:237, 237, 238;--contrast-600:232, 232, 234;--contrast-700:209, 209, 213;--contrast-800:186, 186, 192;--contrast-900:140, 140, 150;--contrast-1000:117, 117, 128;--contrast-1100:94, 94, 108;--contrast-1200:71, 71, 86;--contrast-1300:48, 48, 66;--contrast-1400:39, 39, 57;--contrast-1500:35, 35, 53;--contrast-1600:25, 25, 44;--contrast-1700:0, 0, 0;--color-red-lighter:255, 205, 210;--color-red-light:255, 117, 107;--color-red-default:244, 67, 54;--color-red-dark:211, 47, 47;--color-red-darker:183, 28, 28;--color-pink-lighter:248, 187, 208;--color-pink-light:240, 98, 146;--color-pink-default:233, 30, 99;--color-pink-dark:194, 24, 91;--color-pink-darker:136, 14, 79;--color-purple-lighter:225, 190, 231;--color-purple-light:186, 104, 200;--color-purple-default:156, 39, 176;--color-purple-dark:123, 31, 162;--color-purple-darker:74, 20, 140;--color-magenta-lighter:249, 176, 212;--color-magenta-light:247, 89, 166;--color-magenta-default:243, 65, 151;--color-magenta-dark:199, 46, 121;--color-magenta-darker:156, 22, 87;--color-violet-lighter:209, 196, 233;--color-violet-light:149, 117, 205;--color-violet-default:103, 58, 183;--color-violet-dark:81, 45, 168;--color-violet-darker:49, 27, 146;--color-indigo-lighter:197, 202, 233;--color-indigo-light:121, 134, 203;--color-indigo-default:63, 81, 181;--color-indigo-dark:48, 63, 159;--color-indigo-darker:26, 35, 126;--color-blue-lighter:187, 222, 251;--color-blue-light:100, 181, 246;--color-blue-default:33, 150, 243;--color-blue-dark:25, 118, 210;--color-blue-darker:13, 71, 161;--color-sky-lighter:179, 229, 252;--color-sky-light:79, 195, 247;--color-sky-default:3, 169, 244;--color-sky-dark:2, 136, 209;--color-sky-darker:1, 87, 155;--color-cyan-lighter:178, 235, 242;--color-cyan-light:77, 208, 225;--color-cyan-default:0, 188, 212;--color-cyan-dark:0, 151, 167;--color-cyan-darker:0, 96, 100;--color-teal-lighter:178, 223, 219;--color-teal-light:77, 182, 172;--color-teal-default:0, 150, 136;--color-teal-dark:0, 121, 107;--color-teal-darker:0, 77, 64;--color-green-lighter:200, 230, 201;--color-green-light:129, 199, 132;--color-green-default:76, 175, 80;--color-green-dark:56, 142, 60;--color-green-darker:27, 94, 32;--color-lime-lighter:220, 237, 200;--color-lime-light:174, 213, 129;--color-lime-default:139, 195, 74;--color-lime-dark:104, 159, 56;--color-lime-darker:51, 105, 30;--color-grass-lighter:240, 244, 195;--color-grass-light:220, 231, 117;--color-grass-default:205, 220, 57;--color-grass-dark:175, 180, 43;--color-grass-darker:130, 119, 23;--color-yellow-lighter:255, 249, 196;--color-yellow-light:255, 241, 118;--color-yellow-default:255, 235, 59;--color-yellow-dark:251, 206, 44;--color-yellow-darker:232, 191, 41;--color-amber-lighter:255, 236, 179;--color-amber-light:255, 213, 79;--color-amber-default:255, 193, 7;--color-amber-dark:255, 160, 0;--color-amber-darker:255, 111, 0;--color-orange-lighter:255, 224, 178;--color-orange-light:255, 183, 77;--color-orange-default:255, 152, 0;--color-orange-dark:245, 124, 0;--color-orange-darker:230, 81, 0;--color-coral-lighter:255, 204, 188;--color-coral-light:255, 138, 101;--color-coral-default:255, 87, 34;--color-coral-dark:230, 74, 25;--color-coral-darker:191, 54, 12;--color-brown-lighter:215, 204, 200;--color-brown-light:161, 136, 127;--color-brown-default:121, 85, 72;--color-brown-dark:93, 64, 55;--color-brown-darker:62, 39, 35;--color-gray-lighter:245, 245, 245;--color-gray-light:224, 224, 224;--color-gray-default:158, 158, 158;--color-gray-dark:var(--lime-brand-color-grey);--color-gray-darker:33, 33, 33;--color-glaucous-lighter:208, 225, 232;--color-glaucous-light:135, 174, 193;--color-glaucous-default:var(--lime-brand-color-dark-blue);--color-glaucous-dark:58, 100, 119;--color-glaucous-darker:37, 71, 88;}@media (prefers-color-scheme: dark){:host{--contrast-100:0, 0, 0;--contrast-200:25, 25, 44;--contrast-300:35, 35, 53;--contrast-400:39, 39, 57;--contrast-500:48, 48, 66;--contrast-600:71, 71, 86;--contrast-700:94, 94, 108;--contrast-800:117, 117, 128;--contrast-900:140, 140, 150;--contrast-1000:186, 186, 192;--contrast-1100:209, 209, 213;--contrast-1200:232, 232, 234;--contrast-1300:237, 237, 238;--contrast-1400:241, 241, 243;--contrast-1500:246, 246, 247;--contrast-1600:250, 250, 251;--contrast-1700:255, 255, 255;--color-red-lighter:239, 154, 154;--color-red-light:var(--lime-brand-color-deep-red);--color-red-default:229, 57, 53;--color-red-dark:198, 40, 40;--color-red-darker:165, 23, 23;--color-pink-lighter:244, 143, 177;--color-pink-light:236, 64, 122;--color-pink-default:216, 27, 96;--color-pink-dark:173, 20, 87;--color-pink-darker:132, 10, 75;--color-magenta-lighter:249, 161, 204;--color-magenta-light:249, 79, 162;--color-magenta-default:var(--lime-brand-color-loving-magenta);--color-magenta-dark:208, 31, 117;--color-magenta-darker:156, 22, 87;--color-purple-lighter:206, 147, 216;--color-purple-light:171, 71, 188;--color-purple-default:142, 36, 170;--color-purple-dark:106, 27, 154;--color-purple-darker:62, 13, 121;--color-violet-lighter:179, 157, 219;--color-violet-light:126, 87, 194;--color-violet-default:94, 53, 177;--color-violet-dark:69, 39, 160;--color-violet-darker:41, 22, 127;--color-indigo-lighter:159, 168, 218;--color-indigo-light:92, 107, 192;--color-indigo-default:57, 73, 171;--color-indigo-dark:40, 53, 147;--color-indigo-darker:21, 30, 115;--color-blue-lighter:144, 202, 249;--color-blue-light:66, 165, 245;--color-blue-default:30, 136, 229;--color-blue-dark:21, 101, 192;--color-blue-darker:10, 60, 138;--color-sky-lighter:129, 212, 250;--color-sky-light:var(--lime-brand-color-simple-blue);--color-sky-default:3, 155, 229;--color-sky-dark:2, 119, 189;--color-sky-darker:1, 81, 144;--color-cyan-lighter:128, 222, 234;--color-cyan-light:38, 198, 218;--color-cyan-default:0, 172, 193;--color-cyan-dark:0, 131, 143;--color-cyan-darker:0, 89, 93;--color-teal-lighter:128, 203, 196;--color-teal-light:var(--lime-brand-color-flexible-turquoise);--color-teal-default:0, 137, 123;--color-teal-dark:0, 105, 92;--color-teal-darker:1, 82, 69;--color-green-lighter:165, 214, 167;--color-green-light:var(--lime-brand-color-lime-green);--color-green-default:67, 160, 71;--color-green-dark:46, 125, 50;--color-green-darker:32, 97, 37;--color-lime-lighter:197, 225, 165;--color-lime-light:156, 204, 101;--color-lime-default:124, 179, 66;--color-lime-dark:85, 139, 47;--color-lime-darker:43, 90, 25;--color-grass-lighter:230, 238, 156;--color-grass-light:212, 225, 87;--color-grass-default:192, 202, 51;--color-grass-dark:158, 157, 36;--color-grass-darker:119, 109, 19;--color-yellow-lighter:255, 245, 157;--color-yellow-light:255, 238, 88;--color-yellow-default:253, 216, 53;--color-yellow-dark:245, 200, 39;--color-yellow-darker:224, 180, 21;--color-amber-lighter:255, 224, 130;--color-amber-light:var(--lime-brand-color-yellow);--color-amber-default:var(--lime-brand-color-orange);--color-amber-dark:255, 143, 0;--color-amber-darker:222, 98, 2;--color-orange-lighter:255, 204, 128;--color-orange-light:255, 167, 38;--color-orange-default:251, 140, 0;--color-orange-dark:239, 108, 0;--color-orange-darker:216, 77, 1;--color-coral-lighter:255, 171, 145;--color-coral-light:var(--lime-brand-color-sellable-orange);--color-coral-default:244, 81, 30;--color-coral-dark:216, 67, 21;--color-coral-darker:181, 50, 10;--color-brown-lighter:188, 170, 164;--color-brown-light:141, 110, 99;--color-brown-default:109, 76, 65;--color-brown-dark:78, 52, 46;--color-brown-darker:51, 32, 28;--color-gray-lighter:238, 238, 238;--color-gray-light:var(--lime-brand-color-light-grey);--color-gray-default:117, 117, 117;--color-gray-dark:66, 66, 66;--color-gray-darker:33, 32, 32;--color-glaucous-lighter:159, 194, 208;--color-glaucous-light:110, 141, 156;--color-glaucous-default:68, 108, 128;--color-glaucous-dark:42, 87, 107;--color-glaucous-darker:34, 65, 80;}}.color-palette{grid-template-rows:repeat(5, 1fr) auto;grid-template-columns:repeat(20, 1fr) auto}.picker-trigger[style=\"--background:lime-magenta;\"]:after,.chosen-color-preview[style=\"--background:lime-magenta;\"]:after{background-color:var(--lime-magenta)}.picker-trigger[style=\"--background:lime-blue;\"]:after,.chosen-color-preview[style=\"--background:lime-blue;\"]:after{background-color:var(--lime-blue)}.picker-trigger[style=\"--background:lime-orange;\"]:after,.chosen-color-preview[style=\"--background:lime-orange;\"]:after{background-color:var(--lime-orange)}.picker-trigger[style=\"--background:lime-green;\"]:after,.chosen-color-preview[style=\"--background:lime-green;\"]:after{background-color:var(--lime-green)}.picker-trigger[style=\"--background:lime-red;\"]:after,.chosen-color-preview[style=\"--background:lime-red;\"]:after{background-color:var(--lime-red)}.picker-trigger[style=\"--background:lime-dark-blue;\"]:after,.chosen-color-preview[style=\"--background:lime-dark-blue;\"]:after{background-color:var(--lime-dark-blue)}.picker-trigger[style=\"--background:lime-turquoise;\"]:after,.chosen-color-preview[style=\"--background:lime-turquoise;\"]:after{background-color:var(--lime-turquoise)}.picker-trigger[style=\"--background:lime-yellow;\"]:after,.chosen-color-preview[style=\"--background:lime-yellow;\"]:after{background-color:var(--lime-yellow)}.picker-trigger[style=\"--background:lime-light-grey;\"]:after,.chosen-color-preview[style=\"--background:lime-light-grey;\"]:after{background-color:var(--lime-light-grey)}:host{--popover-surface-width:50rem;--color-picker-default-background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill-opacity='0.1' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\")}.color-picker{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.chosen-color-preview,.picker-trigger{box-sizing:border-box;position:relative;isolation:isolate;width:3.5rem;height:3.5rem}.chosen-color-preview:before,.chosen-color-preview:after,.picker-trigger:before,.picker-trigger:after{content:\"\";position:absolute;inset:0;border-radius:inherit}.chosen-color-preview:before,.picker-trigger:before{background:var(--color-picker-default-background);background-size:0.5rem;z-index:0}.chosen-color-preview:after,.picker-trigger:after{background:var(--background);z-index:1}.picker-trigger{border-radius:0.5rem;cursor:pointer;transition:background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;box-shadow:var(--button-shadow-normal)}.picker-trigger:hover{box-shadow:var(--button-shadow-hovered)}.picker-trigger:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.picker-trigger:after{box-shadow:0 0 0 0.25rem rgb(var(--contrast-100)) inset}:host([readonly]) .picker-trigger:hover,:host([readonly]) .picker-trigger:active{cursor:default;box-shadow:var(--button-shadow-normal);transform:none}.chosen-color-input[readonly]{transform:translateY(1rem)}:host{border-radius:0.75rem;background-color:rgb(var(--kompendium-contrast-300))}.color-picker-palette{display:grid;gap:0.25rem;grid-auto-flow:column;grid-template-columns:repeat(20, 1fr);grid-template-rows:repeat(4, 1fr) auto;margin:1rem}.chosen-color-name{box-sizing:border-box;padding:1rem;display:grid;grid-template-columns:1fr auto;gap:0.5rem}.chosen-color-preview{border:1px solid rgba(var(--contrast-700), 0.65);border-radius:50%}.swatch:not(.hue){transition:background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer}.swatch:not(.hue):hover{box-shadow:var(--button-shadow-hovered)}.swatch:not(.hue):active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.swatch:not(.hue):focus-visible{box-shadow:var(--shadow-depth-8-focused), 0 0 0 0.25rem rgb(var(--contrast-100)) inset}.swatch--selected{border-radius:50%}";
|
|
45
|
+
|
|
46
|
+
let Palette = class {
|
|
47
|
+
constructor(hostRef) {
|
|
48
|
+
index.registerInstance(this, hostRef);
|
|
49
|
+
this.change = index.createEvent(this, "change", 7);
|
|
50
|
+
this.renderSwatches = () => {
|
|
51
|
+
return colors.map((color) => {
|
|
52
|
+
return brightnesses.map(this.renderSwatch(color));
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
this.renderSwatch = (color) => (brightness) => {
|
|
56
|
+
const colorName = getColorName(color, brightness);
|
|
57
|
+
const classList = {
|
|
58
|
+
swatch: true,
|
|
59
|
+
[colorName]: true,
|
|
60
|
+
'swatch--selected': this.value === getCssColor(color, brightness),
|
|
61
|
+
};
|
|
62
|
+
return (index.h("div", { class: classList, onClick: this.handleClick(color, brightness), tabindex: "0" }));
|
|
63
|
+
};
|
|
64
|
+
this.handleChange = (event) => {
|
|
65
|
+
event.stopPropagation();
|
|
66
|
+
this.change.emit(event.detail);
|
|
67
|
+
};
|
|
68
|
+
this.handleClick = (color, brightness) => (event) => {
|
|
69
|
+
const value = getCssColor(color, brightness);
|
|
70
|
+
event.stopPropagation();
|
|
71
|
+
this.change.emit(value);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
const background = this.value ? { '--background': this.value } : {};
|
|
76
|
+
return [
|
|
77
|
+
index.h("div", { class: "color-picker-palette" }, this.renderSwatches()),
|
|
78
|
+
index.h("div", { class: "chosen-color-name" }, index.h("limel-input-field", { label: this.label, helperText: this.helperText, value: this.value, onChange: this.handleChange, required: this.required }), index.h("div", { class: "chosen-color-preview", style: background })),
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
Palette.style = colorPickerPaletteCss;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if an element is a descendant of another
|
|
86
|
+
*
|
|
87
|
+
* If the child element is a descendant of a limel-portal, this function will
|
|
88
|
+
* go back through the portal and check the original tree recursively
|
|
89
|
+
*
|
|
90
|
+
* @param {HTMLElement} element the parent element
|
|
91
|
+
* @param {HTMLElement} child the child element to check
|
|
92
|
+
* @returns {boolean} `true` if child is a descendant of element, taking
|
|
93
|
+
* portals into account
|
|
94
|
+
*/
|
|
95
|
+
function portalContains(element, child) {
|
|
96
|
+
var _a;
|
|
97
|
+
if (element.contains(child) || ((_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(child))) {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
const parent = findParent(child);
|
|
101
|
+
if (!parent) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
return portalContains(element, parent);
|
|
105
|
+
}
|
|
106
|
+
function findParent(element) {
|
|
107
|
+
const portal = element.closest('.limel-portal--container');
|
|
108
|
+
if (portal) {
|
|
109
|
+
return portal.portalSource;
|
|
110
|
+
}
|
|
111
|
+
const rootNode = element.getRootNode();
|
|
112
|
+
return rootNode.host;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const popoverCss = ".trigger-anchor{display:inline-block;position:relative}";
|
|
116
|
+
|
|
117
|
+
let Popover = class {
|
|
118
|
+
constructor(hostRef) {
|
|
119
|
+
index.registerInstance(this, hostRef);
|
|
120
|
+
this.close = index.createEvent(this, "close", 7);
|
|
121
|
+
/**
|
|
122
|
+
* True if the content within the popover should be visible
|
|
123
|
+
*/
|
|
124
|
+
this.open = false;
|
|
125
|
+
this.handleGlobalKeyPress = (event) => {
|
|
126
|
+
if (event.key !== keycodes.ESCAPE) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
event.stopPropagation();
|
|
130
|
+
event.preventDefault();
|
|
131
|
+
this.close.emit();
|
|
132
|
+
};
|
|
133
|
+
this.portalId = randomString.createRandomString();
|
|
134
|
+
this.globalClickListener = this.globalClickListener.bind(this);
|
|
135
|
+
}
|
|
136
|
+
watchOpen() {
|
|
137
|
+
this.setupGlobalHandlers();
|
|
138
|
+
}
|
|
139
|
+
componentWillLoad() {
|
|
140
|
+
this.setupGlobalHandlers();
|
|
141
|
+
}
|
|
142
|
+
setupGlobalHandlers() {
|
|
143
|
+
if (this.open) {
|
|
144
|
+
document.addEventListener('click', this.globalClickListener, {
|
|
145
|
+
capture: true,
|
|
146
|
+
});
|
|
147
|
+
document.addEventListener('keyup', this.handleGlobalKeyPress);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
document.removeEventListener('click', this.globalClickListener);
|
|
151
|
+
document.removeEventListener('keyup', this.handleGlobalKeyPress);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
const cssProperties = this.getCssProperties();
|
|
156
|
+
const popoverZIndex = getComputedStyle(this.host).getPropertyValue('--popover-z-index');
|
|
157
|
+
return (index.h("div", { class: "trigger-anchor" }, index.h("slot", { name: "trigger" }), index.h("limel-portal", { visible: this.open, containerId: this.portalId, containerStyle: { 'z-index': popoverZIndex } }, index.h("limel-popover-surface", { contentCollection: this.host.children, style: cssProperties }))));
|
|
158
|
+
}
|
|
159
|
+
globalClickListener(event) {
|
|
160
|
+
const element = event.target;
|
|
161
|
+
const clickedInside = portalContains(this.host, element);
|
|
162
|
+
if (this.open && !clickedInside) {
|
|
163
|
+
event.stopPropagation();
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
this.close.emit();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
getCssProperties() {
|
|
169
|
+
const propertyNames = [
|
|
170
|
+
'--popover-surface-width',
|
|
171
|
+
'--popover-body-background-color',
|
|
172
|
+
'--popover-border-radius',
|
|
173
|
+
];
|
|
174
|
+
const style = getComputedStyle(this.host);
|
|
175
|
+
const values = propertyNames.map((property) => {
|
|
176
|
+
return style.getPropertyValue(property);
|
|
177
|
+
});
|
|
178
|
+
return zipObject.zipObject(propertyNames, values);
|
|
179
|
+
}
|
|
180
|
+
get host() { return index.getElement(this); }
|
|
181
|
+
static get watchers() { return {
|
|
182
|
+
"open": ["watchOpen"]
|
|
183
|
+
}; }
|
|
184
|
+
};
|
|
185
|
+
Popover.style = popoverCss;
|
|
186
|
+
|
|
187
|
+
exports.limel_color_picker_palette = Palette;
|
|
188
|
+
exports.limel_popover = Popover;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e63a89d7.js');
|
|
6
|
+
|
|
7
|
+
const colorPickerCss = ".picker-trigger[style=\"--background:lime-magenta;\"]:after,.chosen-color-preview[style=\"--background:lime-magenta;\"]:after{background-color:var(--lime-magenta)}.picker-trigger[style=\"--background:lime-blue;\"]:after,.chosen-color-preview[style=\"--background:lime-blue;\"]:after{background-color:var(--lime-blue)}.picker-trigger[style=\"--background:lime-orange;\"]:after,.chosen-color-preview[style=\"--background:lime-orange;\"]:after{background-color:var(--lime-orange)}.picker-trigger[style=\"--background:lime-green;\"]:after,.chosen-color-preview[style=\"--background:lime-green;\"]:after{background-color:var(--lime-green)}.picker-trigger[style=\"--background:lime-red;\"]:after,.chosen-color-preview[style=\"--background:lime-red;\"]:after{background-color:var(--lime-red)}.picker-trigger[style=\"--background:lime-dark-blue;\"]:after,.chosen-color-preview[style=\"--background:lime-dark-blue;\"]:after{background-color:var(--lime-dark-blue)}.picker-trigger[style=\"--background:lime-turquoise;\"]:after,.chosen-color-preview[style=\"--background:lime-turquoise;\"]:after{background-color:var(--lime-turquoise)}.picker-trigger[style=\"--background:lime-yellow;\"]:after,.chosen-color-preview[style=\"--background:lime-yellow;\"]:after{background-color:var(--lime-yellow)}.picker-trigger[style=\"--background:lime-light-grey;\"]:after,.chosen-color-preview[style=\"--background:lime-light-grey;\"]:after{background-color:var(--lime-light-grey)}:host{--popover-surface-width:50rem;--color-picker-default-background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill-opacity='0.1' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\")}.color-picker{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.chosen-color-preview,.picker-trigger{box-sizing:border-box;position:relative;isolation:isolate;width:3.5rem;height:3.5rem}.chosen-color-preview:before,.chosen-color-preview:after,.picker-trigger:before,.picker-trigger:after{content:\"\";position:absolute;inset:0;border-radius:inherit}.chosen-color-preview:before,.picker-trigger:before{background:var(--color-picker-default-background);background-size:0.5rem;z-index:0}.chosen-color-preview:after,.picker-trigger:after{background:var(--background);z-index:1}.picker-trigger{border-radius:0.5rem;cursor:pointer;transition:background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;box-shadow:var(--button-shadow-normal)}.picker-trigger:hover{box-shadow:var(--button-shadow-hovered)}.picker-trigger:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.picker-trigger:after{box-shadow:0 0 0 0.25rem rgb(var(--contrast-100)) inset}:host([readonly]) .picker-trigger:hover,:host([readonly]) .picker-trigger:active{cursor:default;box-shadow:var(--button-shadow-normal);transform:none}.chosen-color-input[readonly]{transform:translateY(1rem)}";
|
|
8
|
+
|
|
9
|
+
let ColorPicker = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.change = index.createEvent(this, "change", 7);
|
|
13
|
+
this.isOpen = false;
|
|
14
|
+
this.renderTooltip = () => {
|
|
15
|
+
if (!this.readonly && this.tooltipLabel) {
|
|
16
|
+
return (index.h("limel-tooltip", { label: this.tooltipLabel, elementId: "tooltip-button" }));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
this.renderPickerPalette = () => {
|
|
20
|
+
if (this.readonly) {
|
|
21
|
+
return this.renderPickerTrigger();
|
|
22
|
+
}
|
|
23
|
+
return (index.h("limel-popover", { open: this.isOpen, onClose: this.onPopoverClose }, this.renderPickerTrigger(), index.h("limel-color-picker-palette", { value: this.value, label: this.label, helperText: this.helperText, onChange: this.handleChange, required: this.required })));
|
|
24
|
+
};
|
|
25
|
+
this.renderPickerTrigger = () => {
|
|
26
|
+
const background = this.value ? { '--background': this.value } : {};
|
|
27
|
+
return (index.h("div", { class: "picker-trigger", slot: "trigger", style: background, role: "button", tabindex: "0", onClick: this.openPopover, id: "tooltip-button" }));
|
|
28
|
+
};
|
|
29
|
+
this.openPopover = (event) => {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
this.isOpen = true;
|
|
32
|
+
};
|
|
33
|
+
this.onPopoverClose = (event) => {
|
|
34
|
+
event.stopPropagation();
|
|
35
|
+
this.isOpen = false;
|
|
36
|
+
};
|
|
37
|
+
this.handleChange = (event) => {
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
this.change.emit(event.detail);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return [
|
|
44
|
+
this.renderTooltip(),
|
|
45
|
+
index.h("div", { class: "color-picker" }, this.renderPickerPalette(), index.h("limel-input-field", { label: this.label, helperText: this.helperText, value: this.value, onChange: this.handleChange, required: this.required, readonly: this.readonly, class: "chosen-color-input" })),
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
ColorPicker.style = colorPickerCss;
|
|
50
|
+
|
|
51
|
+
exports.limel_color_picker = ColorPicker;
|
|
@@ -474,7 +474,7 @@ let File = class {
|
|
|
474
474
|
'is-file-picker': true,
|
|
475
475
|
'shows-dropzone': true,
|
|
476
476
|
'highlight-dropzone': this.isDraggingOverDropZone,
|
|
477
|
-
}, disabled: this.disabled, readonly: this.readonly, label: this.label, leadingIcon: "upload_to_cloud", onChange: this.handleChipSetChange, onClick: this.handleFileSelection, onInteract: this.handleChipInteract, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, required: this.required, type: "input", value: this.chipArray, title: this.getTranslation('drag-and-drop-tips'), onDragEnter: this.handleDragEnter, onDragOver: this.preventAndStop, onDragLeave: this.handleDragLeave, onDrop: this.handleFileDrop }),
|
|
477
|
+
}, disabled: this.disabled, readonly: this.readonly, label: this.label, leadingIcon: "upload_to_cloud", language: this.language, onChange: this.handleChipSetChange, onClick: this.handleFileSelection, onInteract: this.handleChipInteract, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, required: this.required, type: "input", value: this.chipArray, title: this.getTranslation('drag-and-drop-tips'), onDragEnter: this.handleDragEnter, onDragOver: this.preventAndStop, onDragLeave: this.handleDragLeave, onDrop: this.handleFileDrop }),
|
|
478
478
|
];
|
|
479
479
|
}
|
|
480
480
|
get chipArray() {
|