@limetech/lime-elements 37.57.3 → 37.57.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/limel-dock.cjs.entry.js +1 -1
- package/dist/cjs/limel-dock.cjs.entry.js.map +1 -1
- package/dist/collection/components/dock/dock.css +7 -4
- package/dist/esm/limel-dock.entry.js +1 -1
- package/dist/esm/limel-dock.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-eb5ff7ca.entry.js +2 -0
- package/dist/lime-elements/p-eb5ff7ca.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-65018bde.entry.js +0 -2
- package/dist/lime-elements/p-65018bde.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [37.57.4](https://github.com/Lundalogik/lime-elements/compare/v37.57.3...v37.57.4) (2024-09-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **dock:** prevent button shadow from cut-off ([54059c2](https://github.com/Lundalogik/lime-elements/commit/54059c2cf5ecda3f8da5dd450792b6f15cfa473b))
|
|
8
|
+
|
|
1
9
|
## [37.57.3](https://github.com/Lundalogik/lime-elements/compare/v37.57.2...v37.57.3) (2024-09-03)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d1052409.js');
|
|
6
6
|
|
|
7
|
-
const dockCss = "@charset \"UTF-8\";:host(limel-dock){--badge-background-color:rgb(var(--color-red-default));--badge-text-color:rgb(var(--color-white));--dock-item-height:2.75rem;--dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:var(--shadow-depth-8);padding-top:var(--dock-padding-top);padding-right:var(--dock-padding-right);padding-bottom:var(--dock-padding-bottom);padding-left:var(--dock-padding-left)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}limel-dock-button:first-of-type{--limel-custom-home-icon-enabler:var(--crm-custom-home-icon-enabler);--limel-custom-home-icon:var(--crm-custom-home-icon)}.expand-shrink{all:unset;box-sizing:border-box;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--dock-padding);border-radius:0.375rem}.expand-shrink:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}";
|
|
7
|
+
const dockCss = "@charset \"UTF-8\";:host(limel-dock){--badge-background-color:rgb(var(--color-red-default));--badge-text-color:rgb(var(--color-white));--dock-item-height:2.75rem;--limel-dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:var(--shadow-depth-8);padding-top:var(--dock-padding-top);padding-right:var(--dock-padding-right);padding-bottom:var(--dock-padding-bottom);padding-left:var(--dock-padding-left)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--limel-dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock:not(.has-mobile-layout)) nav{padding-bottom:calc(var(--limel-dock-padding) + 0.25rem)}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--limel-dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}limel-dock-button:first-of-type{--limel-custom-home-icon-enabler:var(--crm-custom-home-icon-enabler);--limel-custom-home-icon:var(--crm-custom-home-icon)}.expand-shrink{all:unset;box-sizing:border-box;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--limel-dock-padding);border-radius:0.375rem}.expand-shrink:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}";
|
|
8
8
|
|
|
9
9
|
const DEFAULT_MOBILE_BREAKPOINT = 700;
|
|
10
10
|
const Dock = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"limel-dock.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,OAAO,GAAG,2+EAA2+E;;ACW3/E,MAAM,yBAAyB,GAAG,GAAG,CAAC;MAezB,IAAI;;;;;;;IAmHL,oBAAe,GAAG;MACtB,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,GAAGA,kBAAM,KAAK,EAAC,kBAAkB,GAAG,CAAC;KAC1E,CAAC;IAEM,mBAAc,GAAG,CAAC,IAAc;MACpC,QACIA,+BACI,KAAK,EAAE;UACH,WAAW,EAAE,IAAI;UACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,EACD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,eAAe,EAChD,eAAe,EAAE,IAAI,CAAC,eAAe,GACvC,EACJ;KACL,CAAC;IAEM,iBAAY,GAAG;MACnB,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC5C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;OAC/B;WAAM;QACH,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;OAChC;KACJ,CAAC;IAoBM,oBAAe,GAAG;MACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;MAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACzC,CAAC;qBA7J6B,EAAE;2BAOK,EAAE;;oBAqBrB,KAAK;uBAUF,IAAI;4BASS,yBAAyB;2BA+BlC,KAAK;;EAIxB,gBAAgB;IACnB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;GAC9C;EAED,oBAAoB;IAChB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;GACpC;EAEM,MAAM;IACT,QACIA,QAACC,UAAI,IACD,KAAK,EAAE;QACH,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,mBAAmB,EAAE,IAAI,CAAC,eAAe;OAC5C,IAEDD,+BAAiB,IAAI,CAAC,eAAe,IAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,EACvC,IAAI,CAAC,eAAe,EAAE,EACtB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAC5C,EACL,IAAI,CAAC,wBAAwB,EAAE,CAC7B,EACT;GACL;EA4BO,wBAAwB;IAC5B,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;MAC3C,OAAO;KACV;IAED,QACIA,oBACI,KAAK,EAAE;QACH,eAAe,EAAE,IAAI;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;OAC1B,EACD,OAAO,EAAE,IAAI,CAAC,eAAe,IAE7BA,wBAAY,IAAI,EAAC,aAAa,GAAG,CAC5B,EACX;GACL;;;;;;","names":["h","Host"],"sources":["./src/components/dock/dock.scss?tag=limel-dock&encapsulation=shadow","./src/components/dock/dock.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '../../style/internal/variables';\n\n/**\n* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.\n* @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.\n* @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.\n* @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.\n* @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.\n* @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.\n* @prop --dock-padding-top: Space of top side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-top)`.\n* @prop --dock-padding-right: Space of the right side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-right)`.\n* @prop --dock-padding-bottom: Space of the bottom side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-bottom)`.\n* @prop --dock-padding-left: Space of the left side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-left)`.\n* @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.\n*/\n\n:host(limel-dock) {\n --badge-background-color: rgb(var(--color-red-default));\n --badge-text-color: rgb(var(--color-white));\n\n --dock-item-height: 2.75rem;\n --dock-padding: 0.25rem;\n --dock-expand-shrink-button-height: 1rem;\n\n --limel-dock-item-text-color: var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );\n --limel-dock-item-text-color--selected: var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );\n\n isolation: isolate;\n position: relative;\n\n display: inline-flex;\n flex-direction: column;\n\n background-color: var(--dock-background-color, rgb(var(--contrast-100)));\n box-shadow: var(--shadow-depth-8);\n\n padding-top: var(--dock-padding-top);\n padding-right: var(--dock-padding-right);\n padding-bottom: var(--dock-padding-bottom);\n padding-left: var(--dock-padding-left);\n}\n\n:host(limel-dock:not(.has-mobile-layout)) {\n height: 100%;\n width: calc((var(--dock-padding) * 2) + var(--dock-item-height));\n}\n\n:host(limel-dock.expanded) {\n width: var(--dock-expanded-max-width, max-content);\n}\n\n.footer-separator {\n margin-top: auto;\n justify-self: flex-end;\n}\n\nnav {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n gap: functions.pxToRem(6);\n flex-grow: 1;\n\n padding: var(--dock-padding); // needed for the focus effect\n\n overflow-y: auto;\n scrollbar-width: none; // This hides the scrollbars appearing under in Firefox\n -ms-overflow-style: none; // Same as above for IE 11\n &::-webkit-scrollbar {\n display: none; // This hides the scrollbars appearing under in Chrome\n }\n\n :host(limel-dock.has-mobile-layout) & {\n justify-content: space-between;\n flex-direction: row;\n }\n}\n\n// 👇 Below is a hidden and private prop\n// only for usage in Lime CRM components.\n// It enables our customers to override\n// the default Home icon, using an external URL\n// or an SVG code.\nlimel-dock-button {\n &:first-of-type {\n // `--crm-custom-home-icon-enabler`: in the CRM must be set to `''`\n --limel-custom-home-icon-enabler: var(--crm-custom-home-icon-enabler);\n // `--crm-custom-home-icon` in the CRM must be set to a url to an image file, or an SVG code\n --limel-custom-home-icon: var(--crm-custom-home-icon);\n }\n}\n\n@import './partial-styles/shrink-expand-button';\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { DockItem } from './dock.types';\n\nconst DEFAULT_MOBILE_BREAKPOINT = 700;\n\n/**\n * @exampleComponent limel-example-dock-basic\n * @exampleComponent limel-example-dock-custom-component\n * @exampleComponent limel-example-dock-notification\n * @exampleComponent limel-example-dock-mobile\n * @exampleComponent limel-example-dock-expanded\n * @exampleComponent limel-example-dock-colors-css\n */\n@Component({\n tag: 'limel-dock',\n shadow: true,\n styleUrl: 'dock.scss',\n})\nexport class Dock {\n /**\n * Items that are placed in the dock.\n */\n @Prop()\n public dockItems: DockItem[] = [];\n\n /**\n * Items that are placed at the bottom of the dock. (Or at the end in mobile\n * layout.)\n */\n @Prop()\n public dockFooterItems?: DockItem[] = [];\n\n /**\n * A label used to describe the purpose of the navigation element to users\n * of assistive technologies, like screen readers. Especially useful when\n * there are multiple navigation elements in the user interface.\n * Example value: \"Primary navigation\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * Defines the width of the component, when it loads.\n * - `true`: shows both icons and labels of the Dock items.\n * - `false`: only shows icons of the doc items, and displays\n * their labels as tooltip.\n *\n * Note: when `useMobileLayout` is `true`, labels will always\n * be shown as tooltips. Read more below…\n */\n @Prop({ reflect: true })\n public expanded? = false;\n\n /**\n * Set to `false` if you do not want to allow end-users\n * to exapnd or shrink the Dock. This will hide the\n * expand/shrink button, and the only things that defines\n * the layout will be the `expanded` property, and\n * the `mobileBreakPoint`.\n */\n @Prop({ reflect: true })\n public allowResize? = true;\n\n /**\n * Defines the breakpoint in pixles, at which the component will be rendered\n * in a hoizontal layout. Default breakpoint is `700` pixels, which means\n * when the screen size is smaller than `700px`, the component will automatically\n * switch to a horizontal layout.\n */\n @Prop({ reflect: true })\n public mobileBreakPoint?: number = DEFAULT_MOBILE_BREAKPOINT;\n\n /**\n * Fired when a dock item has been selected from the dock.\n */\n @Event()\n public itemSelected: EventEmitter<DockItem>;\n\n /**\n * Fired when a dock menu is opened.\n */\n @Event()\n public menuOpen: EventEmitter<DockItem>;\n\n /**\n * Fired when the popover is closed.\n */\n @Event()\n public close: EventEmitter<void>;\n\n /**\n * Fired when a Dock is expanded or collapsed.\n */\n @Event()\n private dockExpanded: EventEmitter<boolean>;\n\n /**\n * Is used to render the component horizontally, and place\n * the Dock items in a row.\n */\n @State()\n private useMobileLayout = false;\n\n private resizeObserver: ResizeObserver;\n\n public componentDidLoad() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(document.body);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n public render() {\n return (\n <Host\n class={{\n dock: true,\n expanded: this.expanded,\n 'has-mobile-layout': this.useMobileLayout,\n }}\n >\n <nav aria-label={this.accessibleLabel}>\n {this.dockItems.map(this.renderDockItem)}\n {this.renderSeparator()}\n {this.dockFooterItems.map(this.renderDockItem)}\n </nav>\n {this.renderExpandShrinkToggle()}\n </Host>\n );\n }\n\n private renderSeparator = () => {\n return this.useMobileLayout ? null : <span class=\"footer-separator\" />;\n };\n\n private renderDockItem = (item: DockItem) => {\n return (\n <limel-dock-button\n class={{\n 'dock-item': true,\n selected: item.selected,\n }}\n item={item}\n expanded={this.expanded && !this.useMobileLayout}\n useMobileLayout={this.useMobileLayout}\n />\n );\n };\n\n private handleResize = () => {\n if (window.innerWidth <= this.mobileBreakPoint) {\n this.useMobileLayout = true;\n } else {\n this.useMobileLayout = false;\n }\n };\n\n private renderExpandShrinkToggle() {\n if (this.useMobileLayout || !this.allowResize) {\n return;\n }\n\n return (\n <button\n class={{\n 'expand-shrink': true,\n expanded: this.expanded,\n }}\n onClick={this.toggleDockWidth}\n >\n <limel-icon name=\"angle_right\" />\n </button>\n );\n }\n\n private toggleDockWidth = () => {\n this.expanded = !this.expanded;\n this.dockExpanded.emit(this.expanded);\n };\n}\n"],"version":3}
|
|
1
|
+
{"file":"limel-dock.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,OAAO,GAAG,0mFAA0mF;;ACW1nF,MAAM,yBAAyB,GAAG,GAAG,CAAC;MAezB,IAAI;;;;;;;IAmHL,oBAAe,GAAG;MACtB,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,GAAGA,kBAAM,KAAK,EAAC,kBAAkB,GAAG,CAAC;KAC1E,CAAC;IAEM,mBAAc,GAAG,CAAC,IAAc;MACpC,QACIA,+BACI,KAAK,EAAE;UACH,WAAW,EAAE,IAAI;UACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,EACD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,eAAe,EAChD,eAAe,EAAE,IAAI,CAAC,eAAe,GACvC,EACJ;KACL,CAAC;IAEM,iBAAY,GAAG;MACnB,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC5C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;OAC/B;WAAM;QACH,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;OAChC;KACJ,CAAC;IAoBM,oBAAe,GAAG;MACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;MAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACzC,CAAC;qBA7J6B,EAAE;2BAOK,EAAE;;oBAqBrB,KAAK;uBAUF,IAAI;4BASS,yBAAyB;2BA+BlC,KAAK;;EAIxB,gBAAgB;IACnB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;GAC9C;EAED,oBAAoB;IAChB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;GACpC;EAEM,MAAM;IACT,QACIA,QAACC,UAAI,IACD,KAAK,EAAE;QACH,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,mBAAmB,EAAE,IAAI,CAAC,eAAe;OAC5C,IAEDD,+BAAiB,IAAI,CAAC,eAAe,IAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,EACvC,IAAI,CAAC,eAAe,EAAE,EACtB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAC5C,EACL,IAAI,CAAC,wBAAwB,EAAE,CAC7B,EACT;GACL;EA4BO,wBAAwB;IAC5B,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;MAC3C,OAAO;KACV;IAED,QACIA,oBACI,KAAK,EAAE;QACH,eAAe,EAAE,IAAI;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;OAC1B,EACD,OAAO,EAAE,IAAI,CAAC,eAAe,IAE7BA,wBAAY,IAAI,EAAC,aAAa,GAAG,CAC5B,EACX;GACL;;;;;;","names":["h","Host"],"sources":["./src/components/dock/dock.scss?tag=limel-dock&encapsulation=shadow","./src/components/dock/dock.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '../../style/internal/variables';\n\n/**\n* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.\n* @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.\n* @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.\n* @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.\n* @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.\n* @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.\n* @prop --dock-padding-top: Space of top side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-top)`.\n* @prop --dock-padding-right: Space of the right side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-right)`.\n* @prop --dock-padding-bottom: Space of the bottom side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-bottom)`.\n* @prop --dock-padding-left: Space of the left side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-left)`.\n* @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.\n*/\n\n:host(limel-dock) {\n --badge-background-color: rgb(var(--color-red-default));\n --badge-text-color: rgb(var(--color-white));\n\n --dock-item-height: 2.75rem;\n --limel-dock-padding: 0.25rem;\n --dock-expand-shrink-button-height: 1rem;\n\n --limel-dock-item-text-color: var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );\n --limel-dock-item-text-color--selected: var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );\n\n isolation: isolate;\n position: relative;\n\n display: inline-flex;\n flex-direction: column;\n\n background-color: var(--dock-background-color, rgb(var(--contrast-100)));\n box-shadow: var(--shadow-depth-8);\n\n padding-top: var(--dock-padding-top);\n padding-right: var(--dock-padding-right);\n padding-bottom: var(--dock-padding-bottom);\n padding-left: var(--dock-padding-left);\n}\n\n:host(limel-dock:not(.has-mobile-layout)) {\n height: 100%;\n width: calc((var(--limel-dock-padding) * 2) + var(--dock-item-height));\n nav {\n padding-bottom: calc((var(--limel-dock-padding) + 0.25rem));\n }\n}\n\n:host(limel-dock.expanded) {\n width: var(--dock-expanded-max-width, max-content);\n}\n\n.footer-separator {\n margin-top: auto;\n justify-self: flex-end;\n}\n\nnav {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n gap: functions.pxToRem(6);\n flex-grow: 1;\n\n padding: var(--limel-dock-padding); // needed for the focus effect\n\n overflow-y: auto;\n scrollbar-width: none; // This hides the scrollbars appearing under in Firefox\n -ms-overflow-style: none; // Same as above for IE 11\n &::-webkit-scrollbar {\n display: none; // This hides the scrollbars appearing under in Chrome\n }\n\n :host(limel-dock.has-mobile-layout) & {\n justify-content: space-between;\n flex-direction: row;\n }\n}\n\n// 👇 Below is a hidden and private prop\n// only for usage in Lime CRM components.\n// It enables our customers to override\n// the default Home icon, using an external URL\n// or an SVG code.\nlimel-dock-button {\n &:first-of-type {\n // `--crm-custom-home-icon-enabler`: in the CRM must be set to `''`\n --limel-custom-home-icon-enabler: var(--crm-custom-home-icon-enabler);\n // `--crm-custom-home-icon` in the CRM must be set to a url to an image file, or an SVG code\n --limel-custom-home-icon: var(--crm-custom-home-icon);\n }\n}\n\n@import './partial-styles/shrink-expand-button';\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { DockItem } from './dock.types';\n\nconst DEFAULT_MOBILE_BREAKPOINT = 700;\n\n/**\n * @exampleComponent limel-example-dock-basic\n * @exampleComponent limel-example-dock-custom-component\n * @exampleComponent limel-example-dock-notification\n * @exampleComponent limel-example-dock-mobile\n * @exampleComponent limel-example-dock-expanded\n * @exampleComponent limel-example-dock-colors-css\n */\n@Component({\n tag: 'limel-dock',\n shadow: true,\n styleUrl: 'dock.scss',\n})\nexport class Dock {\n /**\n * Items that are placed in the dock.\n */\n @Prop()\n public dockItems: DockItem[] = [];\n\n /**\n * Items that are placed at the bottom of the dock. (Or at the end in mobile\n * layout.)\n */\n @Prop()\n public dockFooterItems?: DockItem[] = [];\n\n /**\n * A label used to describe the purpose of the navigation element to users\n * of assistive technologies, like screen readers. Especially useful when\n * there are multiple navigation elements in the user interface.\n * Example value: \"Primary navigation\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * Defines the width of the component, when it loads.\n * - `true`: shows both icons and labels of the Dock items.\n * - `false`: only shows icons of the doc items, and displays\n * their labels as tooltip.\n *\n * Note: when `useMobileLayout` is `true`, labels will always\n * be shown as tooltips. Read more below…\n */\n @Prop({ reflect: true })\n public expanded? = false;\n\n /**\n * Set to `false` if you do not want to allow end-users\n * to exapnd or shrink the Dock. This will hide the\n * expand/shrink button, and the only things that defines\n * the layout will be the `expanded` property, and\n * the `mobileBreakPoint`.\n */\n @Prop({ reflect: true })\n public allowResize? = true;\n\n /**\n * Defines the breakpoint in pixles, at which the component will be rendered\n * in a hoizontal layout. Default breakpoint is `700` pixels, which means\n * when the screen size is smaller than `700px`, the component will automatically\n * switch to a horizontal layout.\n */\n @Prop({ reflect: true })\n public mobileBreakPoint?: number = DEFAULT_MOBILE_BREAKPOINT;\n\n /**\n * Fired when a dock item has been selected from the dock.\n */\n @Event()\n public itemSelected: EventEmitter<DockItem>;\n\n /**\n * Fired when a dock menu is opened.\n */\n @Event()\n public menuOpen: EventEmitter<DockItem>;\n\n /**\n * Fired when the popover is closed.\n */\n @Event()\n public close: EventEmitter<void>;\n\n /**\n * Fired when a Dock is expanded or collapsed.\n */\n @Event()\n private dockExpanded: EventEmitter<boolean>;\n\n /**\n * Is used to render the component horizontally, and place\n * the Dock items in a row.\n */\n @State()\n private useMobileLayout = false;\n\n private resizeObserver: ResizeObserver;\n\n public componentDidLoad() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(document.body);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n public render() {\n return (\n <Host\n class={{\n dock: true,\n expanded: this.expanded,\n 'has-mobile-layout': this.useMobileLayout,\n }}\n >\n <nav aria-label={this.accessibleLabel}>\n {this.dockItems.map(this.renderDockItem)}\n {this.renderSeparator()}\n {this.dockFooterItems.map(this.renderDockItem)}\n </nav>\n {this.renderExpandShrinkToggle()}\n </Host>\n );\n }\n\n private renderSeparator = () => {\n return this.useMobileLayout ? null : <span class=\"footer-separator\" />;\n };\n\n private renderDockItem = (item: DockItem) => {\n return (\n <limel-dock-button\n class={{\n 'dock-item': true,\n selected: item.selected,\n }}\n item={item}\n expanded={this.expanded && !this.useMobileLayout}\n useMobileLayout={this.useMobileLayout}\n />\n );\n };\n\n private handleResize = () => {\n if (window.innerWidth <= this.mobileBreakPoint) {\n this.useMobileLayout = true;\n } else {\n this.useMobileLayout = false;\n }\n };\n\n private renderExpandShrinkToggle() {\n if (this.useMobileLayout || !this.allowResize) {\n return;\n }\n\n return (\n <button\n class={{\n 'expand-shrink': true,\n expanded: this.expanded,\n }}\n onClick={this.toggleDockWidth}\n >\n <limel-icon name=\"angle_right\" />\n </button>\n );\n }\n\n private toggleDockWidth = () => {\n this.expanded = !this.expanded;\n this.dockExpanded.emit(this.expanded);\n };\n}\n"],"version":3}
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
--badge-background-color: rgb(var(--color-red-default));
|
|
82
82
|
--badge-text-color: rgb(var(--color-white));
|
|
83
83
|
--dock-item-height: 2.75rem;
|
|
84
|
-
--dock-padding: 0.25rem;
|
|
84
|
+
--limel-dock-padding: 0.25rem;
|
|
85
85
|
--dock-expand-shrink-button-height: 1rem;
|
|
86
86
|
--limel-dock-item-text-color: var(
|
|
87
87
|
--dock-item-text-color,
|
|
@@ -105,7 +105,10 @@
|
|
|
105
105
|
|
|
106
106
|
:host(limel-dock:not(.has-mobile-layout)) {
|
|
107
107
|
height: 100%;
|
|
108
|
-
width: calc(var(--dock-padding) * 2 + var(--dock-item-height));
|
|
108
|
+
width: calc(var(--limel-dock-padding) * 2 + var(--dock-item-height));
|
|
109
|
+
}
|
|
110
|
+
:host(limel-dock:not(.has-mobile-layout)) nav {
|
|
111
|
+
padding-bottom: calc(var(--limel-dock-padding) + 0.25rem);
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
:host(limel-dock.expanded) {
|
|
@@ -123,7 +126,7 @@ nav {
|
|
|
123
126
|
flex-direction: column;
|
|
124
127
|
gap: 0.375rem;
|
|
125
128
|
flex-grow: 1;
|
|
126
|
-
padding: var(--dock-padding);
|
|
129
|
+
padding: var(--limel-dock-padding);
|
|
127
130
|
overflow-y: auto;
|
|
128
131
|
scrollbar-width: none;
|
|
129
132
|
-ms-overflow-style: none;
|
|
@@ -153,7 +156,7 @@ limel-dock-button:first-of-type {
|
|
|
153
156
|
align-items: center;
|
|
154
157
|
height: var(--dock-expand-shrink-button-height);
|
|
155
158
|
padding: 0 0.5rem;
|
|
156
|
-
margin: var(--dock-padding);
|
|
159
|
+
margin: var(--limel-dock-padding);
|
|
157
160
|
border-radius: 0.375rem;
|
|
158
161
|
}
|
|
159
162
|
.expand-shrink:hover {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-6156b4fd.js';
|
|
2
2
|
|
|
3
|
-
const dockCss = "@charset \"UTF-8\";:host(limel-dock){--badge-background-color:rgb(var(--color-red-default));--badge-text-color:rgb(var(--color-white));--dock-item-height:2.75rem;--dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:var(--shadow-depth-8);padding-top:var(--dock-padding-top);padding-right:var(--dock-padding-right);padding-bottom:var(--dock-padding-bottom);padding-left:var(--dock-padding-left)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}limel-dock-button:first-of-type{--limel-custom-home-icon-enabler:var(--crm-custom-home-icon-enabler);--limel-custom-home-icon:var(--crm-custom-home-icon)}.expand-shrink{all:unset;box-sizing:border-box;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--dock-padding);border-radius:0.375rem}.expand-shrink:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}";
|
|
3
|
+
const dockCss = "@charset \"UTF-8\";:host(limel-dock){--badge-background-color:rgb(var(--color-red-default));--badge-text-color:rgb(var(--color-white));--dock-item-height:2.75rem;--limel-dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:var(--shadow-depth-8);padding-top:var(--dock-padding-top);padding-right:var(--dock-padding-right);padding-bottom:var(--dock-padding-bottom);padding-left:var(--dock-padding-left)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--limel-dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock:not(.has-mobile-layout)) nav{padding-bottom:calc(var(--limel-dock-padding) + 0.25rem)}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--limel-dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}limel-dock-button:first-of-type{--limel-custom-home-icon-enabler:var(--crm-custom-home-icon-enabler);--limel-custom-home-icon:var(--crm-custom-home-icon)}.expand-shrink{all:unset;box-sizing:border-box;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--limel-dock-padding);border-radius:0.375rem}.expand-shrink:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}";
|
|
4
4
|
|
|
5
5
|
const DEFAULT_MOBILE_BREAKPOINT = 700;
|
|
6
6
|
const Dock = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"limel-dock.entry.js","mappings":";;AAAA,MAAM,OAAO,GAAG,2+EAA2+E;;ACW3/E,MAAM,yBAAyB,GAAG,GAAG,CAAC;MAezB,IAAI;;;;;;;IAmHL,oBAAe,GAAG;MACtB,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,YAAM,KAAK,EAAC,kBAAkB,GAAG,CAAC;KAC1E,CAAC;IAEM,mBAAc,GAAG,CAAC,IAAc;MACpC,QACI,yBACI,KAAK,EAAE;UACH,WAAW,EAAE,IAAI;UACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,EACD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,eAAe,EAChD,eAAe,EAAE,IAAI,CAAC,eAAe,GACvC,EACJ;KACL,CAAC;IAEM,iBAAY,GAAG;MACnB,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC5C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;OAC/B;WAAM;QACH,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;OAChC;KACJ,CAAC;IAoBM,oBAAe,GAAG;MACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;MAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACzC,CAAC;qBA7J6B,EAAE;2BAOK,EAAE;;oBAqBrB,KAAK;uBAUF,IAAI;4BASS,yBAAyB;2BA+BlC,KAAK;;EAIxB,gBAAgB;IACnB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;GAC9C;EAED,oBAAoB;IAChB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;GACpC;EAEM,MAAM;IACT,QACI,EAAC,IAAI,IACD,KAAK,EAAE;QACH,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,mBAAmB,EAAE,IAAI,CAAC,eAAe;OAC5C,IAED,yBAAiB,IAAI,CAAC,eAAe,IAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,EACvC,IAAI,CAAC,eAAe,EAAE,EACtB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAC5C,EACL,IAAI,CAAC,wBAAwB,EAAE,CAC7B,EACT;GACL;EA4BO,wBAAwB;IAC5B,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;MAC3C,OAAO;KACV;IAED,QACI,cACI,KAAK,EAAE;QACH,eAAe,EAAE,IAAI;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;OAC1B,EACD,OAAO,EAAE,IAAI,CAAC,eAAe,IAE7B,kBAAY,IAAI,EAAC,aAAa,GAAG,CAC5B,EACX;GACL;;;;;;","names":[],"sources":["./src/components/dock/dock.scss?tag=limel-dock&encapsulation=shadow","./src/components/dock/dock.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '../../style/internal/variables';\n\n/**\n* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.\n* @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.\n* @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.\n* @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.\n* @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.\n* @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.\n* @prop --dock-padding-top: Space of top side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-top)`.\n* @prop --dock-padding-right: Space of the right side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-right)`.\n* @prop --dock-padding-bottom: Space of the bottom side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-bottom)`.\n* @prop --dock-padding-left: Space of the left side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-left)`.\n* @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.\n*/\n\n:host(limel-dock) {\n --badge-background-color: rgb(var(--color-red-default));\n --badge-text-color: rgb(var(--color-white));\n\n --dock-item-height: 2.75rem;\n --dock-padding: 0.25rem;\n --dock-expand-shrink-button-height: 1rem;\n\n --limel-dock-item-text-color: var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );\n --limel-dock-item-text-color--selected: var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );\n\n isolation: isolate;\n position: relative;\n\n display: inline-flex;\n flex-direction: column;\n\n background-color: var(--dock-background-color, rgb(var(--contrast-100)));\n box-shadow: var(--shadow-depth-8);\n\n padding-top: var(--dock-padding-top);\n padding-right: var(--dock-padding-right);\n padding-bottom: var(--dock-padding-bottom);\n padding-left: var(--dock-padding-left);\n}\n\n:host(limel-dock:not(.has-mobile-layout)) {\n height: 100%;\n width: calc((var(--dock-padding) * 2) + var(--dock-item-height));\n}\n\n:host(limel-dock.expanded) {\n width: var(--dock-expanded-max-width, max-content);\n}\n\n.footer-separator {\n margin-top: auto;\n justify-self: flex-end;\n}\n\nnav {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n gap: functions.pxToRem(6);\n flex-grow: 1;\n\n padding: var(--dock-padding); // needed for the focus effect\n\n overflow-y: auto;\n scrollbar-width: none; // This hides the scrollbars appearing under in Firefox\n -ms-overflow-style: none; // Same as above for IE 11\n &::-webkit-scrollbar {\n display: none; // This hides the scrollbars appearing under in Chrome\n }\n\n :host(limel-dock.has-mobile-layout) & {\n justify-content: space-between;\n flex-direction: row;\n }\n}\n\n// 👇 Below is a hidden and private prop\n// only for usage in Lime CRM components.\n// It enables our customers to override\n// the default Home icon, using an external URL\n// or an SVG code.\nlimel-dock-button {\n &:first-of-type {\n // `--crm-custom-home-icon-enabler`: in the CRM must be set to `''`\n --limel-custom-home-icon-enabler: var(--crm-custom-home-icon-enabler);\n // `--crm-custom-home-icon` in the CRM must be set to a url to an image file, or an SVG code\n --limel-custom-home-icon: var(--crm-custom-home-icon);\n }\n}\n\n@import './partial-styles/shrink-expand-button';\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { DockItem } from './dock.types';\n\nconst DEFAULT_MOBILE_BREAKPOINT = 700;\n\n/**\n * @exampleComponent limel-example-dock-basic\n * @exampleComponent limel-example-dock-custom-component\n * @exampleComponent limel-example-dock-notification\n * @exampleComponent limel-example-dock-mobile\n * @exampleComponent limel-example-dock-expanded\n * @exampleComponent limel-example-dock-colors-css\n */\n@Component({\n tag: 'limel-dock',\n shadow: true,\n styleUrl: 'dock.scss',\n})\nexport class Dock {\n /**\n * Items that are placed in the dock.\n */\n @Prop()\n public dockItems: DockItem[] = [];\n\n /**\n * Items that are placed at the bottom of the dock. (Or at the end in mobile\n * layout.)\n */\n @Prop()\n public dockFooterItems?: DockItem[] = [];\n\n /**\n * A label used to describe the purpose of the navigation element to users\n * of assistive technologies, like screen readers. Especially useful when\n * there are multiple navigation elements in the user interface.\n * Example value: \"Primary navigation\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * Defines the width of the component, when it loads.\n * - `true`: shows both icons and labels of the Dock items.\n * - `false`: only shows icons of the doc items, and displays\n * their labels as tooltip.\n *\n * Note: when `useMobileLayout` is `true`, labels will always\n * be shown as tooltips. Read more below…\n */\n @Prop({ reflect: true })\n public expanded? = false;\n\n /**\n * Set to `false` if you do not want to allow end-users\n * to exapnd or shrink the Dock. This will hide the\n * expand/shrink button, and the only things that defines\n * the layout will be the `expanded` property, and\n * the `mobileBreakPoint`.\n */\n @Prop({ reflect: true })\n public allowResize? = true;\n\n /**\n * Defines the breakpoint in pixles, at which the component will be rendered\n * in a hoizontal layout. Default breakpoint is `700` pixels, which means\n * when the screen size is smaller than `700px`, the component will automatically\n * switch to a horizontal layout.\n */\n @Prop({ reflect: true })\n public mobileBreakPoint?: number = DEFAULT_MOBILE_BREAKPOINT;\n\n /**\n * Fired when a dock item has been selected from the dock.\n */\n @Event()\n public itemSelected: EventEmitter<DockItem>;\n\n /**\n * Fired when a dock menu is opened.\n */\n @Event()\n public menuOpen: EventEmitter<DockItem>;\n\n /**\n * Fired when the popover is closed.\n */\n @Event()\n public close: EventEmitter<void>;\n\n /**\n * Fired when a Dock is expanded or collapsed.\n */\n @Event()\n private dockExpanded: EventEmitter<boolean>;\n\n /**\n * Is used to render the component horizontally, and place\n * the Dock items in a row.\n */\n @State()\n private useMobileLayout = false;\n\n private resizeObserver: ResizeObserver;\n\n public componentDidLoad() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(document.body);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n public render() {\n return (\n <Host\n class={{\n dock: true,\n expanded: this.expanded,\n 'has-mobile-layout': this.useMobileLayout,\n }}\n >\n <nav aria-label={this.accessibleLabel}>\n {this.dockItems.map(this.renderDockItem)}\n {this.renderSeparator()}\n {this.dockFooterItems.map(this.renderDockItem)}\n </nav>\n {this.renderExpandShrinkToggle()}\n </Host>\n );\n }\n\n private renderSeparator = () => {\n return this.useMobileLayout ? null : <span class=\"footer-separator\" />;\n };\n\n private renderDockItem = (item: DockItem) => {\n return (\n <limel-dock-button\n class={{\n 'dock-item': true,\n selected: item.selected,\n }}\n item={item}\n expanded={this.expanded && !this.useMobileLayout}\n useMobileLayout={this.useMobileLayout}\n />\n );\n };\n\n private handleResize = () => {\n if (window.innerWidth <= this.mobileBreakPoint) {\n this.useMobileLayout = true;\n } else {\n this.useMobileLayout = false;\n }\n };\n\n private renderExpandShrinkToggle() {\n if (this.useMobileLayout || !this.allowResize) {\n return;\n }\n\n return (\n <button\n class={{\n 'expand-shrink': true,\n expanded: this.expanded,\n }}\n onClick={this.toggleDockWidth}\n >\n <limel-icon name=\"angle_right\" />\n </button>\n );\n }\n\n private toggleDockWidth = () => {\n this.expanded = !this.expanded;\n this.dockExpanded.emit(this.expanded);\n };\n}\n"],"version":3}
|
|
1
|
+
{"file":"limel-dock.entry.js","mappings":";;AAAA,MAAM,OAAO,GAAG,0mFAA0mF;;ACW1nF,MAAM,yBAAyB,GAAG,GAAG,CAAC;MAezB,IAAI;;;;;;;IAmHL,oBAAe,GAAG;MACtB,OAAO,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,YAAM,KAAK,EAAC,kBAAkB,GAAG,CAAC;KAC1E,CAAC;IAEM,mBAAc,GAAG,CAAC,IAAc;MACpC,QACI,yBACI,KAAK,EAAE;UACH,WAAW,EAAE,IAAI;UACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,EACD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,eAAe,EAChD,eAAe,EAAE,IAAI,CAAC,eAAe,GACvC,EACJ;KACL,CAAC;IAEM,iBAAY,GAAG;MACnB,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAC5C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;OAC/B;WAAM;QACH,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;OAChC;KACJ,CAAC;IAoBM,oBAAe,GAAG;MACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;MAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACzC,CAAC;qBA7J6B,EAAE;2BAOK,EAAE;;oBAqBrB,KAAK;uBAUF,IAAI;4BASS,yBAAyB;2BA+BlC,KAAK;;EAIxB,gBAAgB;IACnB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;GAC9C;EAED,oBAAoB;IAChB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;GACpC;EAEM,MAAM;IACT,QACI,EAAC,IAAI,IACD,KAAK,EAAE;QACH,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,mBAAmB,EAAE,IAAI,CAAC,eAAe;OAC5C,IAED,yBAAiB,IAAI,CAAC,eAAe,IAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,EACvC,IAAI,CAAC,eAAe,EAAE,EACtB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAC5C,EACL,IAAI,CAAC,wBAAwB,EAAE,CAC7B,EACT;GACL;EA4BO,wBAAwB;IAC5B,IAAI,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;MAC3C,OAAO;KACV;IAED,QACI,cACI,KAAK,EAAE;QACH,eAAe,EAAE,IAAI;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;OAC1B,EACD,OAAO,EAAE,IAAI,CAAC,eAAe,IAE7B,kBAAY,IAAI,EAAC,aAAa,GAAG,CAC5B,EACX;GACL;;;;;;","names":[],"sources":["./src/components/dock/dock.scss?tag=limel-dock&encapsulation=shadow","./src/components/dock/dock.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '../../style/internal/variables';\n\n/**\n* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.\n* @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.\n* @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.\n* @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.\n* @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.\n* @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.\n* @prop --dock-padding-top: Space of top side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-top)`.\n* @prop --dock-padding-right: Space of the right side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-right)`.\n* @prop --dock-padding-bottom: Space of the bottom side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-bottom)`.\n* @prop --dock-padding-left: Space of the left side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-left)`.\n* @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.\n*/\n\n:host(limel-dock) {\n --badge-background-color: rgb(var(--color-red-default));\n --badge-text-color: rgb(var(--color-white));\n\n --dock-item-height: 2.75rem;\n --limel-dock-padding: 0.25rem;\n --dock-expand-shrink-button-height: 1rem;\n\n --limel-dock-item-text-color: var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );\n --limel-dock-item-text-color--selected: var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );\n\n isolation: isolate;\n position: relative;\n\n display: inline-flex;\n flex-direction: column;\n\n background-color: var(--dock-background-color, rgb(var(--contrast-100)));\n box-shadow: var(--shadow-depth-8);\n\n padding-top: var(--dock-padding-top);\n padding-right: var(--dock-padding-right);\n padding-bottom: var(--dock-padding-bottom);\n padding-left: var(--dock-padding-left);\n}\n\n:host(limel-dock:not(.has-mobile-layout)) {\n height: 100%;\n width: calc((var(--limel-dock-padding) * 2) + var(--dock-item-height));\n nav {\n padding-bottom: calc((var(--limel-dock-padding) + 0.25rem));\n }\n}\n\n:host(limel-dock.expanded) {\n width: var(--dock-expanded-max-width, max-content);\n}\n\n.footer-separator {\n margin-top: auto;\n justify-self: flex-end;\n}\n\nnav {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n gap: functions.pxToRem(6);\n flex-grow: 1;\n\n padding: var(--limel-dock-padding); // needed for the focus effect\n\n overflow-y: auto;\n scrollbar-width: none; // This hides the scrollbars appearing under in Firefox\n -ms-overflow-style: none; // Same as above for IE 11\n &::-webkit-scrollbar {\n display: none; // This hides the scrollbars appearing under in Chrome\n }\n\n :host(limel-dock.has-mobile-layout) & {\n justify-content: space-between;\n flex-direction: row;\n }\n}\n\n// 👇 Below is a hidden and private prop\n// only for usage in Lime CRM components.\n// It enables our customers to override\n// the default Home icon, using an external URL\n// or an SVG code.\nlimel-dock-button {\n &:first-of-type {\n // `--crm-custom-home-icon-enabler`: in the CRM must be set to `''`\n --limel-custom-home-icon-enabler: var(--crm-custom-home-icon-enabler);\n // `--crm-custom-home-icon` in the CRM must be set to a url to an image file, or an SVG code\n --limel-custom-home-icon: var(--crm-custom-home-icon);\n }\n}\n\n@import './partial-styles/shrink-expand-button';\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { DockItem } from './dock.types';\n\nconst DEFAULT_MOBILE_BREAKPOINT = 700;\n\n/**\n * @exampleComponent limel-example-dock-basic\n * @exampleComponent limel-example-dock-custom-component\n * @exampleComponent limel-example-dock-notification\n * @exampleComponent limel-example-dock-mobile\n * @exampleComponent limel-example-dock-expanded\n * @exampleComponent limel-example-dock-colors-css\n */\n@Component({\n tag: 'limel-dock',\n shadow: true,\n styleUrl: 'dock.scss',\n})\nexport class Dock {\n /**\n * Items that are placed in the dock.\n */\n @Prop()\n public dockItems: DockItem[] = [];\n\n /**\n * Items that are placed at the bottom of the dock. (Or at the end in mobile\n * layout.)\n */\n @Prop()\n public dockFooterItems?: DockItem[] = [];\n\n /**\n * A label used to describe the purpose of the navigation element to users\n * of assistive technologies, like screen readers. Especially useful when\n * there are multiple navigation elements in the user interface.\n * Example value: \"Primary navigation\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * Defines the width of the component, when it loads.\n * - `true`: shows both icons and labels of the Dock items.\n * - `false`: only shows icons of the doc items, and displays\n * their labels as tooltip.\n *\n * Note: when `useMobileLayout` is `true`, labels will always\n * be shown as tooltips. Read more below…\n */\n @Prop({ reflect: true })\n public expanded? = false;\n\n /**\n * Set to `false` if you do not want to allow end-users\n * to exapnd or shrink the Dock. This will hide the\n * expand/shrink button, and the only things that defines\n * the layout will be the `expanded` property, and\n * the `mobileBreakPoint`.\n */\n @Prop({ reflect: true })\n public allowResize? = true;\n\n /**\n * Defines the breakpoint in pixles, at which the component will be rendered\n * in a hoizontal layout. Default breakpoint is `700` pixels, which means\n * when the screen size is smaller than `700px`, the component will automatically\n * switch to a horizontal layout.\n */\n @Prop({ reflect: true })\n public mobileBreakPoint?: number = DEFAULT_MOBILE_BREAKPOINT;\n\n /**\n * Fired when a dock item has been selected from the dock.\n */\n @Event()\n public itemSelected: EventEmitter<DockItem>;\n\n /**\n * Fired when a dock menu is opened.\n */\n @Event()\n public menuOpen: EventEmitter<DockItem>;\n\n /**\n * Fired when the popover is closed.\n */\n @Event()\n public close: EventEmitter<void>;\n\n /**\n * Fired when a Dock is expanded or collapsed.\n */\n @Event()\n private dockExpanded: EventEmitter<boolean>;\n\n /**\n * Is used to render the component horizontally, and place\n * the Dock items in a row.\n */\n @State()\n private useMobileLayout = false;\n\n private resizeObserver: ResizeObserver;\n\n public componentDidLoad() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(document.body);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n public render() {\n return (\n <Host\n class={{\n dock: true,\n expanded: this.expanded,\n 'has-mobile-layout': this.useMobileLayout,\n }}\n >\n <nav aria-label={this.accessibleLabel}>\n {this.dockItems.map(this.renderDockItem)}\n {this.renderSeparator()}\n {this.dockFooterItems.map(this.renderDockItem)}\n </nav>\n {this.renderExpandShrinkToggle()}\n </Host>\n );\n }\n\n private renderSeparator = () => {\n return this.useMobileLayout ? null : <span class=\"footer-separator\" />;\n };\n\n private renderDockItem = (item: DockItem) => {\n return (\n <limel-dock-button\n class={{\n 'dock-item': true,\n selected: item.selected,\n }}\n item={item}\n expanded={this.expanded && !this.useMobileLayout}\n useMobileLayout={this.useMobileLayout}\n />\n );\n };\n\n private handleResize = () => {\n if (window.innerWidth <= this.mobileBreakPoint) {\n this.useMobileLayout = true;\n } else {\n this.useMobileLayout = false;\n }\n };\n\n private renderExpandShrinkToggle() {\n if (this.useMobileLayout || !this.allowResize) {\n return;\n }\n\n return (\n <button\n class={{\n 'expand-shrink': true,\n expanded: this.expanded,\n }}\n onClick={this.toggleDockWidth}\n >\n <limel-icon name=\"angle_right\" />\n </button>\n );\n }\n\n private toggleDockWidth = () => {\n this.expanded = !this.expanded;\n this.dockExpanded.emit(this.expanded);\n };\n}\n"],"version":3}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-443111b3.js";export{s as setNonce}from"./p-443111b3.js";const i=()=>{const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};i().then((e=>l(JSON.parse('[["p-81c918c4",[[1,"limel-text-editor",{"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"value":[513],"required":[516],"allowResize":[516,"allow-resize"],"ui":[513]}]]],["p-6fc349f0",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"accept":[513],"language":[1]}]]],["p-b8bfe44d",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"invalid":[516],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["p-ab6eab16",[[17,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"items":[16]}]]],["p-43c83a69",[[1,"limel-file-viewer",{"url":[513],"filename":[513],"alt":[513],"allowFullscreen":[516,"allow-fullscreen"],"allowOpenInNewTab":[516,"allow-open-in-new-tab"],"allowDownload":[516,"allow-download"],"language":[1],"officeViewer":[513,"office-viewer"],"actions":[16],"isFullscreen":[32],"fileType":[32],"loading":[32],"fileUrl":[32]}]]],["p-48652dbe",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"readonly":[516],"isOpen":[32]}]]],["p-7603dc0d",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"internalFormat":[32],"showPortal":[32]}]]],["p-65018bde",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["p-25ff5385",[[1,"limel-snackbar",{"open":[516],"message":[1],"timeout":[514],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"offset":[32],"isOpen":[32],"closing":[32],"show":[64]},[[0,"changeOffset","onChangeIndex"]]]]],["p-3d6dc7de",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["p-ef5539b0",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]}]]],["p-3cd95c9f",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["p-768dc020",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"actions":[16]}]]],["p-5d01dc2a",[[1,"limel-help",{"value":[1],"trigger":[1],"readMoreLink":[16],"openDirection":[513,"open-direction"],"isOpen":[32]}]]],["p-c66da652",[[17,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-dynamic-label",{"value":[8],"defaultLabel":[16],"labels":[16]}],[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]],["p-c36a9afa",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"readonlyLabels":[16],"modified":[32]}]]],["p-178bbeb4",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"layout":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[4],"selection":[16]}]]],["p-5e0ee0be",[[1,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"badge":[520],"loading":[516],"link":[16],"progress":[16]}]]],["p-9b437537",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"invalid":[516],"value":[516],"helperText":[513,"helper-text"],"readonlyLabels":[16],"fieldId":[32]}]]],["p-d2077011",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["p-eb58b4b7",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["p-6b2bc81b",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["p-1bcdc70b",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["p-fe1decdc",[[1,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["p-9375145d",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]}]]],["p-11d775ca",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"fold":[4],"lint":[4],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["p-16e4ca3e",[[1,"limel-config",{"config":[16]}]]],["p-ea98795d",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["p-b3b87ff5",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16]}]]],["p-b5f723e2",[[1,"limel-grid"]]],["p-cb63f2d7",[[1,"limel-action-bar",{"actions":[16],"accessibleLabel":[513,"accessible-label"],"layout":[513],"openDirection":[513,"open-direction"],"overflowCutoff":[32]}],[1,"limel-text-editor-link-menu",{"link":[16],"language":[513],"isOpen":[516,"is-open"],"invalidLink":[32]}],[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"],"selected":[516]}]]],["p-cf66a132",[[1,"limel-prosemirror-adapter",{"contentType":[1,"content-type"],"value":[1],"language":[513],"view":[32],"actionBarItems":[32],"link":[32],"isLinkMenuOpen":[32]}]]],["p-7a202104",[[17,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"required":[516]}]]],["p-53fc6f0e",[[1,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["p-1367c295",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]}]]],["p-f1d08f33",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]]]]],["p-0fef416f",[[1,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"],"subheadingDivider":[1,"subheading-divider"]}]]],["p-d6660d2a",[[1,"limel-help-content",{"value":[1],"readMoreLink":[16]}]]],["p-bc63c12e",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4],"currentStep":[4,"current-step"]}]]],["p-f340d860",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["p-83648c76",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["p-347c1107",[[1,"limel-file-dropzone",{"accept":[513],"disabled":[4],"text":[1],"helperText":[1,"helper-text"],"hasFileToDrop":[32]}],[1,"limel-file-input",{"accept":[513],"disabled":[516],"multiple":[516]}]]],["p-19405595",[[1,"limel-markdown",{"value":[1]}]]],["p-d4d2593b",[[1,"limel-portal",{"openDirection":[513,"open-direction"],"position":[513],"containerId":[513,"container-id"],"containerStyle":[16],"parent":[16],"inheritParentWidth":[516,"inherit-parent-width"],"visible":[516],"anchor":[16]}],[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]}]]],["p-968c49d9",[[17,"limel-icon-button",{"icon":[513],"elevated":[516],"label":[513],"disabled":[516]}]]],["p-9605854b",[[1,"limel-linear-progress",{"value":[514],"indeterminate":[516]}]]],["p-d1838cf6",[[1,"limel-badge",{"label":[520]}],[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"openDirection":[513,"open-direction"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514]}]]],["p-edbb5903",[[1,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"surfaceWidth":[513,"surface-width"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"loading":[516],"currentSubMenu":[1040],"rootItem":[16],"searcher":[16],"emptyResultMessage":[1,"empty-result-message"],"loadingSubItems":[32],"searchValue":[32],"searchResults":[32]}],[1,"limel-breadcrumbs",{"items":[16],"divider":[1]}],[17,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"locale":[513],"isFocused":[32],"wasInvalid":[32],"showCompletions":[32]}],[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}]]],["p-2367b082",[[1,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"invalid":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"selectedChipIds":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]}],[17,"limel-chip",{"language":[513],"text":[513],"icon":[1],"image":[16],"link":[16],"badge":[520],"disabled":[516],"readonly":[516],"selected":[516],"invalid":[516],"removable":[516],"type":[513],"loading":[516],"progress":[514],"identifier":[520],"menuItems":[16]}]]],["p-89764bae",[[17,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]}]]]]'),e)));
|
|
1
|
+
import{p as e,b as l}from"./p-443111b3.js";export{s as setNonce}from"./p-443111b3.js";const i=()=>{const l=import.meta.url;const i={};if(l!==""){i.resourcesUrl=new URL(".",l).href}return e(i)};i().then((e=>l(JSON.parse('[["p-81c918c4",[[1,"limel-text-editor",{"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"value":[513],"required":[516],"allowResize":[516,"allow-resize"],"ui":[513]}]]],["p-6fc349f0",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"accept":[513],"language":[1]}]]],["p-b8bfe44d",[[1,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"invalid":[516],"value":[16],"searcher":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]}]]],["p-ab6eab16",[[17,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"items":[16]}]]],["p-43c83a69",[[1,"limel-file-viewer",{"url":[513],"filename":[513],"alt":[513],"allowFullscreen":[516,"allow-fullscreen"],"allowOpenInNewTab":[516,"allow-open-in-new-tab"],"allowDownload":[516,"allow-download"],"language":[1],"officeViewer":[513,"office-viewer"],"actions":[16],"isFullscreen":[32],"fileType":[32],"loading":[32],"fileUrl":[32]}]]],["p-48652dbe",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"readonly":[516],"isOpen":[32]}]]],["p-7603dc0d",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"internalFormat":[32],"showPortal":[32]}]]],["p-eb5ff7ca",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["p-25ff5385",[[1,"limel-snackbar",{"open":[516],"message":[1],"timeout":[514],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"offset":[32],"isOpen":[32],"closing":[32],"show":[64]},[[0,"changeOffset","onChangeIndex"]]]]],["p-3d6dc7de",[[1,"limel-tab-panel",{"tabs":[1040]}]]],["p-ef5539b0",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]}]]],["p-3cd95c9f",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]}]]],["p-768dc020",[[1,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"actions":[16]}]]],["p-5d01dc2a",[[1,"limel-help",{"value":[1],"trigger":[1],"readMoreLink":[16],"openDirection":[513,"open-direction"],"isOpen":[32]}]]],["p-c66da652",[[17,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-dynamic-label",{"value":[8],"defaultLabel":[16],"labels":[16]}],[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]],["p-c36a9afa",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"readonlyLabels":[16],"modified":[32]}]]],["p-178bbeb4",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"layout":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[4],"selection":[16]}]]],["p-5e0ee0be",[[1,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"badge":[520],"loading":[516],"link":[16],"progress":[16]}]]],["p-9b437537",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"invalid":[516],"value":[516],"helperText":[513,"helper-text"],"readonlyLabels":[16],"fieldId":[32]}]]],["p-d2077011",[[1,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]}]]],["p-eb58b4b7",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["p-6b2bc81b",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["p-1bcdc70b",[[1,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["p-fe1decdc",[[1,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["p-9375145d",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]}]]],["p-11d775ca",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[4],"lineNumbers":[4,"line-numbers"],"fold":[4],"lint":[4],"colorScheme":[1,"color-scheme"],"random":[32]}]]],["p-16e4ca3e",[[1,"limel-config",{"config":[16]}]]],["p-ea98795d",[[1,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["p-b3b87ff5",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16]}]]],["p-b5f723e2",[[1,"limel-grid"]]],["p-cb63f2d7",[[1,"limel-action-bar",{"actions":[16],"accessibleLabel":[513,"accessible-label"],"layout":[513],"openDirection":[513,"open-direction"],"overflowCutoff":[32]}],[1,"limel-text-editor-link-menu",{"link":[16],"language":[513],"isOpen":[516,"is-open"],"invalidLink":[32]}],[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"],"selected":[516]}]]],["p-cf66a132",[[1,"limel-prosemirror-adapter",{"contentType":[1,"content-type"],"value":[1],"language":[513],"view":[32],"actionBarItems":[32],"link":[32],"isLinkMenuOpen":[32]}]]],["p-7a202104",[[17,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"required":[516]}]]],["p-53fc6f0e",[[1,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["p-1367c295",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]}]]],["p-f1d08f33",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]]]]],["p-0fef416f",[[1,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"],"subheadingDivider":[1,"subheading-divider"]}]]],["p-d6660d2a",[[1,"limel-help-content",{"value":[1],"readMoreLink":[16]}]]],["p-bc63c12e",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4],"currentStep":[4,"current-step"]}]]],["p-f340d860",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["p-83648c76",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["p-347c1107",[[1,"limel-file-dropzone",{"accept":[513],"disabled":[4],"text":[1],"helperText":[1,"helper-text"],"hasFileToDrop":[32]}],[1,"limel-file-input",{"accept":[513],"disabled":[516],"multiple":[516]}]]],["p-19405595",[[1,"limel-markdown",{"value":[1]}]]],["p-d4d2593b",[[1,"limel-portal",{"openDirection":[513,"open-direction"],"position":[513],"containerId":[513,"container-id"],"containerStyle":[16],"parent":[16],"inheritParentWidth":[516,"inherit-parent-width"],"visible":[516],"anchor":[16]}],[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]}]]],["p-968c49d9",[[17,"limel-icon-button",{"icon":[513],"elevated":[516],"label":[513],"disabled":[516]}]]],["p-9605854b",[[1,"limel-linear-progress",{"value":[514],"indeterminate":[516]}]]],["p-d1838cf6",[[1,"limel-badge",{"label":[520]}],[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"openDirection":[513,"open-direction"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514]}]]],["p-edbb5903",[[1,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"surfaceWidth":[513,"surface-width"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"loading":[516],"currentSubMenu":[1040],"rootItem":[16],"searcher":[16],"emptyResultMessage":[1,"empty-result-message"],"loadingSubItems":[32],"searchValue":[32],"searchResults":[32]}],[1,"limel-breadcrumbs",{"items":[16],"divider":[1]}],[17,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]}],[1,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"locale":[513],"isFocused":[32],"wasInvalid":[32],"showCompletions":[32]}],[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}]]],["p-2367b082",[[1,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"invalid":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"selectedChipIds":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]}],[17,"limel-chip",{"language":[513],"text":[513],"icon":[1],"image":[16],"link":[16],"badge":[520],"disabled":[516],"readonly":[516],"selected":[516],"invalid":[516],"removable":[516],"type":[513],"loading":[516],"progress":[514],"identifier":[520],"menuItems":[16]}]]],["p-89764bae",[[17,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]}]]]]'),e)));
|
|
2
2
|
//# sourceMappingURL=lime-elements.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as o,h as t,H as i}from"./p-443111b3.js";const a='@charset "UTF-8";:host(limel-dock){--badge-background-color:rgb(var(--color-red-default));--badge-text-color:rgb(var(--color-white));--dock-item-height:2.75rem;--limel-dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:var(--shadow-depth-8);padding-top:var(--dock-padding-top);padding-right:var(--dock-padding-right);padding-bottom:var(--dock-padding-bottom);padding-left:var(--dock-padding-left)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--limel-dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock:not(.has-mobile-layout)) nav{padding-bottom:calc(var(--limel-dock-padding) + 0.25rem)}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--limel-dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}limel-dock-button:first-of-type{--limel-custom-home-icon-enabler:var(--crm-custom-home-icon-enabler);--limel-custom-home-icon:var(--crm-custom-home-icon)}.expand-shrink{all:unset;box-sizing:border-box;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--limel-dock-padding);border-radius:0.375rem}.expand-shrink:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}';const r=700;const n=class{constructor(i){e(this,i);this.itemSelected=o(this,"itemSelected",7);this.menuOpen=o(this,"menuOpen",7);this.close=o(this,"close",7);this.dockExpanded=o(this,"dockExpanded",7);this.renderSeparator=()=>this.useMobileLayout?null:t("span",{class:"footer-separator"});this.renderDockItem=e=>t("limel-dock-button",{class:{"dock-item":true,selected:e.selected},item:e,expanded:this.expanded&&!this.useMobileLayout,useMobileLayout:this.useMobileLayout});this.handleResize=()=>{if(window.innerWidth<=this.mobileBreakPoint){this.useMobileLayout=true}else{this.useMobileLayout=false}};this.toggleDockWidth=()=>{this.expanded=!this.expanded;this.dockExpanded.emit(this.expanded)};this.dockItems=[];this.dockFooterItems=[];this.accessibleLabel=undefined;this.expanded=false;this.allowResize=true;this.mobileBreakPoint=r;this.useMobileLayout=false}componentDidLoad(){this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(document.body)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){return t(i,{class:{dock:true,expanded:this.expanded,"has-mobile-layout":this.useMobileLayout}},t("nav",{"aria-label":this.accessibleLabel},this.dockItems.map(this.renderDockItem),this.renderSeparator(),this.dockFooterItems.map(this.renderDockItem)),this.renderExpandShrinkToggle())}renderExpandShrinkToggle(){if(this.useMobileLayout||!this.allowResize){return}return t("button",{class:{"expand-shrink":true,expanded:this.expanded},onClick:this.toggleDockWidth},t("limel-icon",{name:"angle_right"}))}};n.style=a;export{n as limel_dock};
|
|
2
|
+
//# sourceMappingURL=p-eb5ff7ca.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dockCss","DEFAULT_MOBILE_BREAKPOINT","Dock","this","renderSeparator","useMobileLayout","h","class","renderDockItem","item","selected","expanded","handleResize","window","innerWidth","mobileBreakPoint","toggleDockWidth","dockExpanded","emit","componentDidLoad","resizeObserver","ResizeObserver","observe","document","body","disconnectedCallback","disconnect","render","Host","dock","accessibleLabel","dockItems","map","dockFooterItems","renderExpandShrinkToggle","allowResize","onClick","name"],"sources":["./src/components/dock/dock.scss?tag=limel-dock&encapsulation=shadow","./src/components/dock/dock.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '../../style/internal/variables';\n\n/**\n* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.\n* @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.\n* @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.\n* @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.\n* @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.\n* @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.\n* @prop --dock-padding-top: Space of top side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-top)`.\n* @prop --dock-padding-right: Space of the right side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-right)`.\n* @prop --dock-padding-bottom: Space of the bottom side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-bottom)`.\n* @prop --dock-padding-left: Space of the left side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-left)`.\n* @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.\n*/\n\n:host(limel-dock) {\n --badge-background-color: rgb(var(--color-red-default));\n --badge-text-color: rgb(var(--color-white));\n\n --dock-item-height: 2.75rem;\n --limel-dock-padding: 0.25rem;\n --dock-expand-shrink-button-height: 1rem;\n\n --limel-dock-item-text-color: var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );\n --limel-dock-item-text-color--selected: var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );\n\n isolation: isolate;\n position: relative;\n\n display: inline-flex;\n flex-direction: column;\n\n background-color: var(--dock-background-color, rgb(var(--contrast-100)));\n box-shadow: var(--shadow-depth-8);\n\n padding-top: var(--dock-padding-top);\n padding-right: var(--dock-padding-right);\n padding-bottom: var(--dock-padding-bottom);\n padding-left: var(--dock-padding-left);\n}\n\n:host(limel-dock:not(.has-mobile-layout)) {\n height: 100%;\n width: calc((var(--limel-dock-padding) * 2) + var(--dock-item-height));\n nav {\n padding-bottom: calc((var(--limel-dock-padding) + 0.25rem));\n }\n}\n\n:host(limel-dock.expanded) {\n width: var(--dock-expanded-max-width, max-content);\n}\n\n.footer-separator {\n margin-top: auto;\n justify-self: flex-end;\n}\n\nnav {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n gap: functions.pxToRem(6);\n flex-grow: 1;\n\n padding: var(--limel-dock-padding); // needed for the focus effect\n\n overflow-y: auto;\n scrollbar-width: none; // This hides the scrollbars appearing under in Firefox\n -ms-overflow-style: none; // Same as above for IE 11\n &::-webkit-scrollbar {\n display: none; // This hides the scrollbars appearing under in Chrome\n }\n\n :host(limel-dock.has-mobile-layout) & {\n justify-content: space-between;\n flex-direction: row;\n }\n}\n\n// 👇 Below is a hidden and private prop\n// only for usage in Lime CRM components.\n// It enables our customers to override\n// the default Home icon, using an external URL\n// or an SVG code.\nlimel-dock-button {\n &:first-of-type {\n // `--crm-custom-home-icon-enabler`: in the CRM must be set to `''`\n --limel-custom-home-icon-enabler: var(--crm-custom-home-icon-enabler);\n // `--crm-custom-home-icon` in the CRM must be set to a url to an image file, or an SVG code\n --limel-custom-home-icon: var(--crm-custom-home-icon);\n }\n}\n\n@import './partial-styles/shrink-expand-button';\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { DockItem } from './dock.types';\n\nconst DEFAULT_MOBILE_BREAKPOINT = 700;\n\n/**\n * @exampleComponent limel-example-dock-basic\n * @exampleComponent limel-example-dock-custom-component\n * @exampleComponent limel-example-dock-notification\n * @exampleComponent limel-example-dock-mobile\n * @exampleComponent limel-example-dock-expanded\n * @exampleComponent limel-example-dock-colors-css\n */\n@Component({\n tag: 'limel-dock',\n shadow: true,\n styleUrl: 'dock.scss',\n})\nexport class Dock {\n /**\n * Items that are placed in the dock.\n */\n @Prop()\n public dockItems: DockItem[] = [];\n\n /**\n * Items that are placed at the bottom of the dock. (Or at the end in mobile\n * layout.)\n */\n @Prop()\n public dockFooterItems?: DockItem[] = [];\n\n /**\n * A label used to describe the purpose of the navigation element to users\n * of assistive technologies, like screen readers. Especially useful when\n * there are multiple navigation elements in the user interface.\n * Example value: \"Primary navigation\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * Defines the width of the component, when it loads.\n * - `true`: shows both icons and labels of the Dock items.\n * - `false`: only shows icons of the doc items, and displays\n * their labels as tooltip.\n *\n * Note: when `useMobileLayout` is `true`, labels will always\n * be shown as tooltips. Read more below…\n */\n @Prop({ reflect: true })\n public expanded? = false;\n\n /**\n * Set to `false` if you do not want to allow end-users\n * to exapnd or shrink the Dock. This will hide the\n * expand/shrink button, and the only things that defines\n * the layout will be the `expanded` property, and\n * the `mobileBreakPoint`.\n */\n @Prop({ reflect: true })\n public allowResize? = true;\n\n /**\n * Defines the breakpoint in pixles, at which the component will be rendered\n * in a hoizontal layout. Default breakpoint is `700` pixels, which means\n * when the screen size is smaller than `700px`, the component will automatically\n * switch to a horizontal layout.\n */\n @Prop({ reflect: true })\n public mobileBreakPoint?: number = DEFAULT_MOBILE_BREAKPOINT;\n\n /**\n * Fired when a dock item has been selected from the dock.\n */\n @Event()\n public itemSelected: EventEmitter<DockItem>;\n\n /**\n * Fired when a dock menu is opened.\n */\n @Event()\n public menuOpen: EventEmitter<DockItem>;\n\n /**\n * Fired when the popover is closed.\n */\n @Event()\n public close: EventEmitter<void>;\n\n /**\n * Fired when a Dock is expanded or collapsed.\n */\n @Event()\n private dockExpanded: EventEmitter<boolean>;\n\n /**\n * Is used to render the component horizontally, and place\n * the Dock items in a row.\n */\n @State()\n private useMobileLayout = false;\n\n private resizeObserver: ResizeObserver;\n\n public componentDidLoad() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(document.body);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n public render() {\n return (\n <Host\n class={{\n dock: true,\n expanded: this.expanded,\n 'has-mobile-layout': this.useMobileLayout,\n }}\n >\n <nav aria-label={this.accessibleLabel}>\n {this.dockItems.map(this.renderDockItem)}\n {this.renderSeparator()}\n {this.dockFooterItems.map(this.renderDockItem)}\n </nav>\n {this.renderExpandShrinkToggle()}\n </Host>\n );\n }\n\n private renderSeparator = () => {\n return this.useMobileLayout ? null : <span class=\"footer-separator\" />;\n };\n\n private renderDockItem = (item: DockItem) => {\n return (\n <limel-dock-button\n class={{\n 'dock-item': true,\n selected: item.selected,\n }}\n item={item}\n expanded={this.expanded && !this.useMobileLayout}\n useMobileLayout={this.useMobileLayout}\n />\n );\n };\n\n private handleResize = () => {\n if (window.innerWidth <= this.mobileBreakPoint) {\n this.useMobileLayout = true;\n } else {\n this.useMobileLayout = false;\n }\n };\n\n private renderExpandShrinkToggle() {\n if (this.useMobileLayout || !this.allowResize) {\n return;\n }\n\n return (\n <button\n class={{\n 'expand-shrink': true,\n expanded: this.expanded,\n }}\n onClick={this.toggleDockWidth}\n >\n <limel-icon name=\"angle_right\" />\n </button>\n );\n }\n\n private toggleDockWidth = () => {\n this.expanded = !this.expanded;\n this.dockExpanded.emit(this.expanded);\n };\n}\n"],"mappings":"yDAAA,MAAMA,EAAU,ymFCWhB,MAAMC,EAA4B,I,MAerBC,EAAI,M,+KAmHLC,KAAAC,gBAAkB,IACfD,KAAKE,gBAAkB,KAAOC,EAAA,QAAMC,MAAM,qBAG7CJ,KAAAK,eAAkBC,GAElBH,EAAA,qBACIC,MAAO,CACH,YAAa,KACbG,SAAUD,EAAKC,UAEnBD,KAAMA,EACNE,SAAUR,KAAKQ,WAAaR,KAAKE,gBACjCA,gBAAiBF,KAAKE,kBAK1BF,KAAAS,aAAe,KACnB,GAAIC,OAAOC,YAAcX,KAAKY,iBAAkB,CAC5CZ,KAAKE,gBAAkB,I,KACpB,CACHF,KAAKE,gBAAkB,K,GAsBvBF,KAAAa,gBAAkB,KACtBb,KAAKQ,UAAYR,KAAKQ,SACtBR,KAAKc,aAAaC,KAAKf,KAAKQ,SAAS,E,eA5JV,G,qBAOO,G,6CAqBnB,M,iBAUG,K,sBASaV,E,qBA+BT,K,CAInBkB,mBACHhB,KAAKiB,eAAiB,IAAIC,eAAelB,KAAKS,cAC9CT,KAAKiB,eAAeE,QAAQC,SAASC,K,CAGzCC,uBACItB,KAAKiB,eAAeM,Y,CAGjBC,SACH,OACIrB,EAACsB,EAAI,CACDrB,MAAO,CACHsB,KAAM,KACNlB,SAAUR,KAAKQ,SACf,oBAAqBR,KAAKE,kBAG9BC,EAAA,oBAAiBH,KAAK2B,iBACjB3B,KAAK4B,UAAUC,IAAI7B,KAAKK,gBACxBL,KAAKC,kBACLD,KAAK8B,gBAAgBD,IAAI7B,KAAKK,iBAElCL,KAAK+B,2B,CA+BVA,2BACJ,GAAI/B,KAAKE,kBAAoBF,KAAKgC,YAAa,CAC3C,M,CAGJ,OACI7B,EAAA,UACIC,MAAO,CACH,gBAAiB,KACjBI,SAAUR,KAAKQ,UAEnByB,QAASjC,KAAKa,iBAEdV,EAAA,cAAY+B,KAAK,gB"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as o,h as t,H as i}from"./p-443111b3.js";const r='@charset "UTF-8";:host(limel-dock){--badge-background-color:rgb(var(--color-red-default));--badge-text-color:rgb(var(--color-white));--dock-item-height:2.75rem;--dock-padding:0.25rem;--dock-expand-shrink-button-height:1rem;--limel-dock-item-text-color:var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );--limel-dock-item-text-color--selected:var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );isolation:isolate;position:relative;display:inline-flex;flex-direction:column;background-color:var(--dock-background-color, rgb(var(--contrast-100)));box-shadow:var(--shadow-depth-8);padding-top:var(--dock-padding-top);padding-right:var(--dock-padding-right);padding-bottom:var(--dock-padding-bottom);padding-left:var(--dock-padding-left)}:host(limel-dock:not(.has-mobile-layout)){height:100%;width:calc(var(--dock-padding) * 2 + var(--dock-item-height))}:host(limel-dock.expanded){width:var(--dock-expanded-max-width, max-content)}.footer-separator{margin-top:auto;justify-self:flex-end}nav{box-sizing:border-box;display:inline-flex;flex-direction:column;gap:0.375rem;flex-grow:1;padding:var(--dock-padding);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}nav::-webkit-scrollbar{display:none}:host(limel-dock.has-mobile-layout) nav{justify-content:space-between;flex-direction:row}limel-dock-button:first-of-type{--limel-custom-home-icon-enabler:var(--crm-custom-home-icon-enabler);--limel-custom-home-icon:var(--crm-custom-home-icon)}.expand-shrink{all:unset;box-sizing:border-box;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent;display:flex;justify-content:center;align-items:center;height:var(--dock-expand-shrink-button-height);padding:0 0.5rem;margin:var(--dock-padding);border-radius:0.375rem}.expand-shrink:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.expand-shrink:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.expand-shrink:focus{outline:none}.expand-shrink:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.expand-shrink.expanded{justify-content:flex-end}.expand-shrink.expanded limel-icon{transform:rotateY(180deg)}.expand-shrink limel-icon{width:calc(var(--dock-expand-shrink-button-height) - 0.25rem);color:var(--dock-item-icon-color, var(--limel-dock-item-text-color))}';const a=700;const n=class{constructor(i){e(this,i);this.itemSelected=o(this,"itemSelected",7);this.menuOpen=o(this,"menuOpen",7);this.close=o(this,"close",7);this.dockExpanded=o(this,"dockExpanded",7);this.renderSeparator=()=>this.useMobileLayout?null:t("span",{class:"footer-separator"});this.renderDockItem=e=>t("limel-dock-button",{class:{"dock-item":true,selected:e.selected},item:e,expanded:this.expanded&&!this.useMobileLayout,useMobileLayout:this.useMobileLayout});this.handleResize=()=>{if(window.innerWidth<=this.mobileBreakPoint){this.useMobileLayout=true}else{this.useMobileLayout=false}};this.toggleDockWidth=()=>{this.expanded=!this.expanded;this.dockExpanded.emit(this.expanded)};this.dockItems=[];this.dockFooterItems=[];this.accessibleLabel=undefined;this.expanded=false;this.allowResize=true;this.mobileBreakPoint=a;this.useMobileLayout=false}componentDidLoad(){this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(document.body)}disconnectedCallback(){this.resizeObserver.disconnect()}render(){return t(i,{class:{dock:true,expanded:this.expanded,"has-mobile-layout":this.useMobileLayout}},t("nav",{"aria-label":this.accessibleLabel},this.dockItems.map(this.renderDockItem),this.renderSeparator(),this.dockFooterItems.map(this.renderDockItem)),this.renderExpandShrinkToggle())}renderExpandShrinkToggle(){if(this.useMobileLayout||!this.allowResize){return}return t("button",{class:{"expand-shrink":true,expanded:this.expanded},onClick:this.toggleDockWidth},t("limel-icon",{name:"angle_right"}))}};n.style=r;export{n as limel_dock};
|
|
2
|
-
//# sourceMappingURL=p-65018bde.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["dockCss","DEFAULT_MOBILE_BREAKPOINT","Dock","this","renderSeparator","useMobileLayout","h","class","renderDockItem","item","selected","expanded","handleResize","window","innerWidth","mobileBreakPoint","toggleDockWidth","dockExpanded","emit","componentDidLoad","resizeObserver","ResizeObserver","observe","document","body","disconnectedCallback","disconnect","render","Host","dock","accessibleLabel","dockItems","map","dockFooterItems","renderExpandShrinkToggle","allowResize","onClick","name"],"sources":["./src/components/dock/dock.scss?tag=limel-dock&encapsulation=shadow","./src/components/dock/dock.tsx"],"sourcesContent":["@use '../../style/mixins';\n@use '../../style/functions';\n@use '../../style/internal/variables';\n\n/**\n* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.\n* @prop --dock-background-color: Background color of the whole component, defaults to `--contrast-100`.\n* @prop --dock-item-background-color--selected: Background color of selected dock item, defaults to `--contrast-200`.\n* @prop --dock-item-text-color: Text of dock items, defaults to `--contrast-1100`.\n* @prop --dock-item-text-color--selected: Text color of selected dock item, defaults to `--contrast-1300`.\n* @prop --dock-item-icon-color: Color of the optional icons used in each dock item. Only affects inactive dock items, defaults to text colors for default or selected states.\n* @prop --dock-padding-top: Space of top side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-top)`.\n* @prop --dock-padding-right: Space of the right side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-right)`.\n* @prop --dock-padding-bottom: Space of the bottom side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-bottom)`.\n* @prop --dock-padding-left: Space of the left side of the Dock. Can be used with environment variables, to take into account safe areas on mobile devices with rounded screen corners or those that have a \"notch\". For instance can be set to `env(safe-area-inset-left)`.\n* @prop --popover-surface-width: Defines the width of the popover that is opened for dock items with custom components. Defaults to `auto`.\n*/\n\n:host(limel-dock) {\n --badge-background-color: rgb(var(--color-red-default));\n --badge-text-color: rgb(var(--color-white));\n\n --dock-item-height: 2.75rem;\n --dock-padding: 0.25rem;\n --dock-expand-shrink-button-height: 1rem;\n\n --limel-dock-item-text-color: var(\n --dock-item-text-color,\n rgb(var(--contrast-1100))\n );\n --limel-dock-item-text-color--selected: var(\n --dock-item-text-color--selected,\n rgb(var(--contrast-1300))\n );\n\n isolation: isolate;\n position: relative;\n\n display: inline-flex;\n flex-direction: column;\n\n background-color: var(--dock-background-color, rgb(var(--contrast-100)));\n box-shadow: var(--shadow-depth-8);\n\n padding-top: var(--dock-padding-top);\n padding-right: var(--dock-padding-right);\n padding-bottom: var(--dock-padding-bottom);\n padding-left: var(--dock-padding-left);\n}\n\n:host(limel-dock:not(.has-mobile-layout)) {\n height: 100%;\n width: calc((var(--dock-padding) * 2) + var(--dock-item-height));\n}\n\n:host(limel-dock.expanded) {\n width: var(--dock-expanded-max-width, max-content);\n}\n\n.footer-separator {\n margin-top: auto;\n justify-self: flex-end;\n}\n\nnav {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n gap: functions.pxToRem(6);\n flex-grow: 1;\n\n padding: var(--dock-padding); // needed for the focus effect\n\n overflow-y: auto;\n scrollbar-width: none; // This hides the scrollbars appearing under in Firefox\n -ms-overflow-style: none; // Same as above for IE 11\n &::-webkit-scrollbar {\n display: none; // This hides the scrollbars appearing under in Chrome\n }\n\n :host(limel-dock.has-mobile-layout) & {\n justify-content: space-between;\n flex-direction: row;\n }\n}\n\n// 👇 Below is a hidden and private prop\n// only for usage in Lime CRM components.\n// It enables our customers to override\n// the default Home icon, using an external URL\n// or an SVG code.\nlimel-dock-button {\n &:first-of-type {\n // `--crm-custom-home-icon-enabler`: in the CRM must be set to `''`\n --limel-custom-home-icon-enabler: var(--crm-custom-home-icon-enabler);\n // `--crm-custom-home-icon` in the CRM must be set to a url to an image file, or an SVG code\n --limel-custom-home-icon: var(--crm-custom-home-icon);\n }\n}\n\n@import './partial-styles/shrink-expand-button';\n","import {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { DockItem } from './dock.types';\n\nconst DEFAULT_MOBILE_BREAKPOINT = 700;\n\n/**\n * @exampleComponent limel-example-dock-basic\n * @exampleComponent limel-example-dock-custom-component\n * @exampleComponent limel-example-dock-notification\n * @exampleComponent limel-example-dock-mobile\n * @exampleComponent limel-example-dock-expanded\n * @exampleComponent limel-example-dock-colors-css\n */\n@Component({\n tag: 'limel-dock',\n shadow: true,\n styleUrl: 'dock.scss',\n})\nexport class Dock {\n /**\n * Items that are placed in the dock.\n */\n @Prop()\n public dockItems: DockItem[] = [];\n\n /**\n * Items that are placed at the bottom of the dock. (Or at the end in mobile\n * layout.)\n */\n @Prop()\n public dockFooterItems?: DockItem[] = [];\n\n /**\n * A label used to describe the purpose of the navigation element to users\n * of assistive technologies, like screen readers. Especially useful when\n * there are multiple navigation elements in the user interface.\n * Example value: \"Primary navigation\"\n */\n @Prop({ reflect: true })\n public accessibleLabel?: string;\n\n /**\n * Defines the width of the component, when it loads.\n * - `true`: shows both icons and labels of the Dock items.\n * - `false`: only shows icons of the doc items, and displays\n * their labels as tooltip.\n *\n * Note: when `useMobileLayout` is `true`, labels will always\n * be shown as tooltips. Read more below…\n */\n @Prop({ reflect: true })\n public expanded? = false;\n\n /**\n * Set to `false` if you do not want to allow end-users\n * to exapnd or shrink the Dock. This will hide the\n * expand/shrink button, and the only things that defines\n * the layout will be the `expanded` property, and\n * the `mobileBreakPoint`.\n */\n @Prop({ reflect: true })\n public allowResize? = true;\n\n /**\n * Defines the breakpoint in pixles, at which the component will be rendered\n * in a hoizontal layout. Default breakpoint is `700` pixels, which means\n * when the screen size is smaller than `700px`, the component will automatically\n * switch to a horizontal layout.\n */\n @Prop({ reflect: true })\n public mobileBreakPoint?: number = DEFAULT_MOBILE_BREAKPOINT;\n\n /**\n * Fired when a dock item has been selected from the dock.\n */\n @Event()\n public itemSelected: EventEmitter<DockItem>;\n\n /**\n * Fired when a dock menu is opened.\n */\n @Event()\n public menuOpen: EventEmitter<DockItem>;\n\n /**\n * Fired when the popover is closed.\n */\n @Event()\n public close: EventEmitter<void>;\n\n /**\n * Fired when a Dock is expanded or collapsed.\n */\n @Event()\n private dockExpanded: EventEmitter<boolean>;\n\n /**\n * Is used to render the component horizontally, and place\n * the Dock items in a row.\n */\n @State()\n private useMobileLayout = false;\n\n private resizeObserver: ResizeObserver;\n\n public componentDidLoad() {\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(document.body);\n }\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n }\n\n public render() {\n return (\n <Host\n class={{\n dock: true,\n expanded: this.expanded,\n 'has-mobile-layout': this.useMobileLayout,\n }}\n >\n <nav aria-label={this.accessibleLabel}>\n {this.dockItems.map(this.renderDockItem)}\n {this.renderSeparator()}\n {this.dockFooterItems.map(this.renderDockItem)}\n </nav>\n {this.renderExpandShrinkToggle()}\n </Host>\n );\n }\n\n private renderSeparator = () => {\n return this.useMobileLayout ? null : <span class=\"footer-separator\" />;\n };\n\n private renderDockItem = (item: DockItem) => {\n return (\n <limel-dock-button\n class={{\n 'dock-item': true,\n selected: item.selected,\n }}\n item={item}\n expanded={this.expanded && !this.useMobileLayout}\n useMobileLayout={this.useMobileLayout}\n />\n );\n };\n\n private handleResize = () => {\n if (window.innerWidth <= this.mobileBreakPoint) {\n this.useMobileLayout = true;\n } else {\n this.useMobileLayout = false;\n }\n };\n\n private renderExpandShrinkToggle() {\n if (this.useMobileLayout || !this.allowResize) {\n return;\n }\n\n return (\n <button\n class={{\n 'expand-shrink': true,\n expanded: this.expanded,\n }}\n onClick={this.toggleDockWidth}\n >\n <limel-icon name=\"angle_right\" />\n </button>\n );\n }\n\n private toggleDockWidth = () => {\n this.expanded = !this.expanded;\n this.dockExpanded.emit(this.expanded);\n };\n}\n"],"mappings":"yDAAA,MAAMA,EAAU,0+ECWhB,MAAMC,EAA4B,I,MAerBC,EAAI,M,+KAmHLC,KAAAC,gBAAkB,IACfD,KAAKE,gBAAkB,KAAOC,EAAA,QAAMC,MAAM,qBAG7CJ,KAAAK,eAAkBC,GAElBH,EAAA,qBACIC,MAAO,CACH,YAAa,KACbG,SAAUD,EAAKC,UAEnBD,KAAMA,EACNE,SAAUR,KAAKQ,WAAaR,KAAKE,gBACjCA,gBAAiBF,KAAKE,kBAK1BF,KAAAS,aAAe,KACnB,GAAIC,OAAOC,YAAcX,KAAKY,iBAAkB,CAC5CZ,KAAKE,gBAAkB,I,KACpB,CACHF,KAAKE,gBAAkB,K,GAsBvBF,KAAAa,gBAAkB,KACtBb,KAAKQ,UAAYR,KAAKQ,SACtBR,KAAKc,aAAaC,KAAKf,KAAKQ,SAAS,E,eA5JV,G,qBAOO,G,6CAqBnB,M,iBAUG,K,sBASaV,E,qBA+BT,K,CAInBkB,mBACHhB,KAAKiB,eAAiB,IAAIC,eAAelB,KAAKS,cAC9CT,KAAKiB,eAAeE,QAAQC,SAASC,K,CAGzCC,uBACItB,KAAKiB,eAAeM,Y,CAGjBC,SACH,OACIrB,EAACsB,EAAI,CACDrB,MAAO,CACHsB,KAAM,KACNlB,SAAUR,KAAKQ,SACf,oBAAqBR,KAAKE,kBAG9BC,EAAA,oBAAiBH,KAAK2B,iBACjB3B,KAAK4B,UAAUC,IAAI7B,KAAKK,gBACxBL,KAAKC,kBACLD,KAAK8B,gBAAgBD,IAAI7B,KAAKK,iBAElCL,KAAK+B,2B,CA+BVA,2BACJ,GAAI/B,KAAKE,kBAAoBF,KAAKgC,YAAa,CAC3C,M,CAGJ,OACI7B,EAAA,UACIC,MAAO,CACH,gBAAiB,KACjBI,SAAUR,KAAKQ,UAEnByB,QAASjC,KAAKa,iBAEdV,EAAA,cAAY+B,KAAK,gB"}
|