/* eslint-disable */ /* tslint:disable */ /** * This is an autogenerated file created by the Stencil compiler. * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime"; import { ActionBarItem } from "./components/action-bar/action-bar.types"; import { ListItem, ListSeparator } from "./components/list-item/list-item.types"; import { DateType, Languages } from "./components/date-picker/date.types"; import { MenuItem, MenuSearcher, OpenDirection, SurfaceWidth } from "./components/menu/menu.types"; import { Icon, IconName } from "./global/shared-types/icon.types"; import { BreadcrumbsItem } from "./components/breadcrumbs/breadcrumbs.types"; import { Button } from "./components/button/button.types"; import { CalloutType } from "./components/callout/callout.types"; import { Image } from "./global/shared-types/image.types"; import { ListSeparator as ListSeparator1 } from "./global/shared-types/separator.types"; import { ChartItem } from "./components/chart/chart.types"; import { Label, LabelValue } from "./components/dynamic-label/label.types"; import { Link } from "./global/shared-types/link.types"; import { Chip, ChipType } from "./components/chip-set/chip.types"; import { CircularProgressSize } from "./components/circular-progress/circular-progress.types"; import { ColorScheme, Language } from "./components/code-editor/code-editor.types"; import { Action } from "./components/collapsible-section/action"; import { CustomColorSwatch, CustomPalette } from "./components/color-picker/color-picker.types"; import { Config } from "./global/config"; import { ClosingActions, DialogHeading } from "./components/dialog/dialog.types"; import { DockItem } from "./components/dock/dock.types"; import { Email } from "./components/email-viewer/email-viewer.types"; import { FileInfo } from "./global/shared-types/file.types"; import { OfficeViewer } from "./components/file-viewer/file-viewer.types"; import { FlexContainerAlign, FlexContainerDirection, FlexContainerJustify } from "./components/flex-container/flex-container.types"; import { FormError, FormSchema, ValidationError, ValidationStatus } from "./components/form/form.types"; import { IconSize } from "./components/icon/icon.types"; import { InfoTileProgress } from "./components/info-tile/info-tile.types"; import { InputType } from "./components/input-field/input-field.types"; import { ListType } from "./components/list/list.types"; import { CustomElementDefinition } from "./global/shared-types/custom-element.types"; import { PickerValue } from "./components/picker/value.types"; import { Searcher } from "./components/picker/searcher.types"; import { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types"; import { ResizeOptions } from "./util/image-resize"; import { FlowItem } from "./components/progress-flow/progress-flow.types"; import { EditorImage, EditorMetadata, ImageInserter, TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types"; import { EditorUiType } from "./components/text-editor/types"; import { Option } from "./components/select/option.types"; import { SpinnerSize } from "./components/spinner/spinner.types"; import { Tab } from "./components/tab-bar/tab.types"; import { Column, ColumnAggregate, ColumnSorter, RowData, RowReorderEvent, TableParams } from "./components/table/table.types"; import { Layout } from "./components/table/layout"; import { EditorTextLink } from "./components/text-editor/prosemirror-adapter/menu/types"; export { ActionBarItem } from "./components/action-bar/action-bar.types"; export { ListItem, ListSeparator } from "./components/list-item/list-item.types"; export { DateType, Languages } from "./components/date-picker/date.types"; export { MenuItem, MenuSearcher, OpenDirection, SurfaceWidth } from "./components/menu/menu.types"; export { Icon, IconName } from "./global/shared-types/icon.types"; export { BreadcrumbsItem } from "./components/breadcrumbs/breadcrumbs.types"; export { Button } from "./components/button/button.types"; export { CalloutType } from "./components/callout/callout.types"; export { Image } from "./global/shared-types/image.types"; export { ListSeparator as ListSeparator1 } from "./global/shared-types/separator.types"; export { ChartItem } from "./components/chart/chart.types"; export { Label, LabelValue } from "./components/dynamic-label/label.types"; export { Link } from "./global/shared-types/link.types"; export { Chip, ChipType } from "./components/chip-set/chip.types"; export { CircularProgressSize } from "./components/circular-progress/circular-progress.types"; export { ColorScheme, Language } from "./components/code-editor/code-editor.types"; export { Action } from "./components/collapsible-section/action"; export { CustomColorSwatch, CustomPalette } from "./components/color-picker/color-picker.types"; export { Config } from "./global/config"; export { ClosingActions, DialogHeading } from "./components/dialog/dialog.types"; export { DockItem } from "./components/dock/dock.types"; export { Email } from "./components/email-viewer/email-viewer.types"; export { FileInfo } from "./global/shared-types/file.types"; export { OfficeViewer } from "./components/file-viewer/file-viewer.types"; export { FlexContainerAlign, FlexContainerDirection, FlexContainerJustify } from "./components/flex-container/flex-container.types"; export { FormError, FormSchema, ValidationError, ValidationStatus } from "./components/form/form.types"; export { IconSize } from "./components/icon/icon.types"; export { InfoTileProgress } from "./components/info-tile/info-tile.types"; export { InputType } from "./components/input-field/input-field.types"; export { ListType } from "./components/list/list.types"; export { CustomElementDefinition } from "./global/shared-types/custom-element.types"; export { PickerValue } from "./components/picker/value.types"; export { Searcher } from "./components/picker/searcher.types"; export { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types"; export { ResizeOptions } from "./util/image-resize"; export { FlowItem } from "./components/progress-flow/progress-flow.types"; export { EditorImage, EditorMetadata, ImageInserter, TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types"; export { EditorUiType } from "./components/text-editor/types"; export { Option } from "./components/select/option.types"; export { SpinnerSize } from "./components/spinner/spinner.types"; export { Tab } from "./components/tab-bar/tab.types"; export { Column, ColumnAggregate, ColumnSorter, RowData, RowReorderEvent, TableParams } from "./components/table/table.types"; export { Layout } from "./components/table/layout"; export { EditorTextLink } from "./components/text-editor/prosemirror-adapter/menu/types"; export namespace Components { /** * This component enhances the visual effects, when the `tiltFollowingTheCursor` * utility function from `3d-tilt-hover-effect.ts` is implemented in a component. * This component should be added to the HTML structure of the consumer component. * This component carries its own styles which are needed to create a glow effect on the * 3D element within the parent element, when the parent is hovered. * The parent element must be using the `tiltFollowingTheCursor` utility function * imported from `3d-tilt-hover-effect.ts`. This function will dynamically * affect parts of the styles of this 3D glow effect. * @private */ interface Limel3dHoverEffectGlow { } /** * An action bar is a user interface element commonly found in software applications and websites. * It typically appears at the top of the screen or within a specific section * and serves as a centralized hub for accessing various actions and commands * relevant to the current context or page. * The action bar often contains a set of clickable icons or buttons (icons + labels) * that represent specific actions, such as saving, deleting, editing, sharing, * or bulk operations for selected items. * The purpose of an action bar is to provide quick and convenient access to * frequently used functionalities, enabling users to perform common tasks efficiently. * It enhances usability by organizing important actions in a visually prominent and easily accessible location. * The action bar's design and layout can vary based on the platform or application, * but its primary goal remains consistent—to * empower users to interact with the software and perform desired actions effortlessly. * @exampleComponent limel-example-action-bar-basic * @exampleComponent limel-example-action-bar-overflow-menu * @exampleComponent limel-example-action-bar-selected-item * @exampleComponent limel-example-action-bar-colors * @exampleComponent limel-example-action-bar-floating * @exampleComponent limel-example-action-bar-styling * @exampleComponent limel-example-action-bar-as-primary-component * @exampleComponent limel-example-action-bar-icon-title */ interface LimelActionBar { /** * A label used to describe the purpose of the element to users of assistive technologies, like screen readers. If not set, a localized default ("Action bar" in English, translated via the `language` prop) is used, so the element is never announced without a name. Override this when a more specific label would help users tell multiple action bars apart — for example "Bulk actions" or "Contextual actions". */ "accessibleLabel"?: string; /** * Items that are placed in the action bar. These represent primary actions. * @default [] */ "actions": Array; /** * @deprecated The prop has no effect any longer. It will be removed in a future major version. If you need this behavior, implement the expand/shrink (or resize) in the consuming UI instead. * @default false */ "collapsible": boolean; /** * Defines the language for translations. * @default 'en' */ "language": Languages; /** * - When set to `fullWidth`, the component will take the entire width of its container. - When set to `floating`, the component will get basic stylings to visualize the floating state. :::note You should still properly position the component according to the structure of your user interface. For example, use an `absolute` or `fixed` position. ::: */ "layout"?: 'fullWidth' | 'floating'; /** * Defines the location that the content of the overflow menu appears, in relation to its trigger. */ "openDirection": OpenDirection; } /** * @private */ interface LimelActionBarItem { /** * When the item is displayed in the available width, this will be `false`. * @default true */ "isVisible": boolean; /** * Item that is placed in the action bar. */ "item": ActionBarItem | ListSeparator; /** * When the item is selected, this will be `true`. * @default false */ "selected": boolean; } /** * @private */ interface LimelActionBarOverflowMenu { /** * List of the items that should be rendered in the overflow menu. */ "items": Array; /** * Defines the location that the content of the overflow menu appears, in relation to its trigger. It defaults to `bottom-end`, since in normal scenarios (for example when the action bar is not floating at the bottom of the screen) this menu is the right-most item in the user interface of the component. * @default 'bottom-end' */ "openDirection": OpenDirection; } /** * This component displays an avatar, representing Lime AI assistants. * :::warning * This is a private component used internally in the Lime's various applications, * which is the reason for having it in Lime Elements —to ease the distribution * of the component across all our apps. * 3rd party developers are not allowed use this component directly. * ::: * @private * @exampleComponent limel-example-ai-avatar-basic * @exampleComponent limel-example-ai-avatar-colors * @exampleComponent limel-example-ai-avatar-white-background * @exampleComponent limel-example-ai-avatar-color-props */ interface LimelAiAvatar { /** * Set to `true` to trigger animations that indicate that the AI is "thinking" or processing something. * @default false */ "isThinking": boolean; /** * Defines the language for translations. * @default document.documentElement.lang as Languages */ "language": Languages; } /** * The Badge component can be used to display a notification badge, * optionally with a number or a text label. * @exampleComponent limel-example-badge-basic * @exampleComponent limel-example-badge-number * @exampleComponent limel-example-badge-string */ interface LimelBadge { /** * Label to display in the badge. Numeric labels larger than 999 will be rounded and abbreviated. String labels get truncated if their length is longer than six characters. */ "label"?: number | string; } /** * @exampleComponent limel-example-banner-basic */ interface LimelBanner { /** * Close the banner */ "close": () => Promise; /** * Set icon for the banner */ "icon": IconName; /** * The text to show on the banner. */ "message": string; /** * Open the banner */ "open": () => Promise; } /** * A Breadcrumb consists of a list of distinct "places" that a user has gone through, * before ending up where they are right now, in a website or an application. * These "places" can be for example _pages_ of a website, which are hierarchically * laid out before the current page that the user is looking at. * They could also be _steps_ which the user has gone through, which perhaps have no * hierarchical relation with each other, but has eventually led the user "here". * :::note * - Where the user currently is, is always the last step of the breadcrumb. * - A breadcrumbs never shows where users can go after this place. * It only illustrates where user has been before ending up here. * If the path that a user can take is not changing and if next steps are clear, * you can use the [Progress flow component](#/component/limel-progress-flow) instead. * ::: * Breadcrumbs are often placed horizontally before the main content of the current screen. * @exampleComponent limel-example-breadcrumbs-links * @exampleComponent limel-example-breadcrumbs-buttons * @exampleComponent limel-example-breadcrumbs-icons * @exampleComponent limel-example-breadcrumbs-divider * @exampleComponent limel-example-breadcrumbs-icon-color * @exampleComponent limel-example-breadcrumbs-styling */ interface LimelBreadcrumbs { /** * The visual divider that separates items. It must be a single character such as `-` or `,`. * @default '›' */ "divider": string; /** * List of items in the breadcrumbs, each representing a step or a page. */ "items": BreadcrumbsItem[]; } /** * Buttons allow users to take actions with a single tap or click. * They are intentionally designed to look and feel clickable, * and should clearly communicate the action that will happen * when the user interacts with them. * The component offers three visual variants — **default**, **primary**, * and **outlined** — that together establish a hierarchy of actions. * See the examples below for guidance on when to use each variant. * For more guidance on how to arrange buttons and choose between * primary and secondary actions, see our * [Action buttons design guidelines](#/DesignGuidelines/action-buttons.md/). * @exampleComponent limel-example-button-basic * @exampleComponent limel-example-button-primary * @exampleComponent limel-example-button-outlined * @exampleComponent limel-example-button-button-hierarchy * @exampleComponent limel-example-button-disabled * @exampleComponent limel-example-button-icon * @exampleComponent limel-example-button-loading * @exampleComponent limel-example-button-click-success * @exampleComponent limel-example-button-click-fail * @exampleComponent limel-example-button-reduce-presence * @exampleComponent limel-example-button-colors * @exampleComponent limel-example-button-composite */ interface LimelButton { /** * Set to `true` to disable the button. * @default false */ "disabled": boolean; /** * Set icon for the button */ "icon": IconName | Icon; /** * The text to show on the button. */ "label": string; /** * Set to `true` to put the button in the `loading` state. This also disables the button. * @default false */ "loading": boolean; /** * Set to `true` to indicate failure instead of success when the button is no longer in the `loading` state. * @default false */ "loadingFailed": boolean; /** * Set to `true` to make the button outlined. * @default false */ "outlined": boolean; /** * Set to `true` to make the button primary. * @default false */ "primary": boolean; } /** * A button group control is a linear set of two or more buttons. * ## Usage * Button groups are often used to display different views of the same thing. A * common example of this component is when you switch between [ Map | Transit * | Satellite ] views to look at an area on the map. * In some cases, button groups may serve as quick filters as well. For example * a list of contacts, in which the user can switch to [ All | Favorites * | Frequently contacted ] can incorporate a button group to quickly filter out * items and display subsets of them. * ## Layout * The button groups are usually placed in top headers and action bars, * sometimes with other elements. Since the group items will always be rendered * in a row, you must make sure not to have too many buttons in the group. * Because if the container of your button group does not get enough space to * fit in all its buttons, they will have to truncate their text and may appear * very cramped together. Always think about how your button group will appear * on a small screen such as phones. * :::note * Button can contain text or icons, but not both simultaneously! * ::: * Within the group, icon buttons will all have the same width, while each text button * inherits its width from its content. * @exampleComponent limel-example-button-group-icons * @exampleComponent limel-example-button-group-basic * @exampleComponent limel-example-button-group-mix * @exampleComponent limel-example-button-group-badges * @exampleComponent limel-example-button-group-composite */ interface LimelButtonGroup { /** * True if the button-group should be disabled * @default false */ "disabled": boolean; /** * List of buttons for the group * @default [] */ "value": Button[]; } /** * Callouts—also known as Admonitions—are useful for including supportive or * special content within a large piece of text, or even inside a user * interface. * When used in a document or text based user interface, the callout attracts * the reader's attention to a particular piece of information, without * significantly interrupting their flow of reading the document. * In a user interface, a callout is more intrusive to the end-user. Still, it * could be a good choice when you intend to slightly disturb the user's * attention, and challenge them to pay extra attention to the information * presented. In such cases, a callout should not be used as a static and * constantly present element of the UI. Rather, it should be displayed when * something unusual or remarkable demands the user's attention. * @exampleComponent limel-example-callout-note * @exampleComponent limel-example-callout-important * @exampleComponent limel-example-callout-tip * @exampleComponent limel-example-callout-caution * @exampleComponent limel-example-callout-warning * @exampleComponent limel-example-callout-rich-content * @exampleComponent limel-example-callout-custom-heading * @exampleComponent limel-example-callout-custom-icon * @exampleComponent limel-example-callout-styles * @exampleComponent limel-example-custom-type * @exampleComponent limel-example-callout-composite */ interface LimelCallout { /** * Heading of the callout, which can be used to override the default heading which is displayed based on the chosen `type`. */ "heading"?: string; /** * Icon of the callout, which can be used to override the default icon which is displayed based on the chosen `type`. */ "icon"?: string; /** * Defines the language for translations. Will translate the default headings for supported languages. * @default 'en' */ "language": Languages; /** * Defines how the component is visualized, for example which heading, color or icon is used in its user interface. * @default 'note' */ "type"?: CalloutType; } /** * Card is a component that displays content about a single topic, * in a structured way. It can contain a header, and some supporting media such * as an image or an icon, a body of text, or optional actions. * @exampleComponent limel-example-card-basic * @exampleComponent limel-example-card-image * @exampleComponent limel-example-card-actions * @exampleComponent limel-example-card-clickable * @exampleComponent limel-example-card-3d-effect * @exampleComponent limel-example-card-selected * @exampleComponent limel-example-card-orientation * @exampleComponent limel-example-card-slot * @exampleComponent limel-example-card-styling * @exampleComponent limel-example-card-scrollable-shadow */ interface LimelCard { /** * Actions to display in the card, to provide the user with options to interact with the content. * @default [] */ "actions"?: Array; /** * When true, improve the accessibility of the component and hints the user that the card can be interacted width. * @default false */ "clickable": boolean; /** * Heading of the card, to provide a short title about the context. */ "heading"?: string; /** * An icon, to display along with the heading and subheading. */ "icon"?: IconName | Icon; /** * A hero image to display in the card, to enrich the content with visual information. */ "image"?: Image; /** * The orientation of the card, specially useful when the card has an image. * @default 'portrait' */ "orientation": 'landscape' | 'portrait'; /** * When `true`, the card displays a visual selected state (highlighted border shadow). Should be used together with `clickable` to let users toggle selection. * @default false */ "selected": boolean; /** * When `true`, the card displays a glow effect on hover, following the 3D tilt hover effect. * @default true */ "show3dEffect": boolean; /** * Subheading of the card to provide a short description of the context. */ "subheading"?: string; /** * The content of the card. Supports markdown, to provide a rich text experience. */ "value"?: string; } /** * A chart is a graphical representation of data, in which * visual symbols such as such bars, dots, lines, or slices, represent * each data point, in comparison to others. * @exampleComponent limel-example-chart-stacked-bar * @exampleComponent limel-example-chart-orientation * @exampleComponent limel-example-chart-max-value * @exampleComponent limel-example-chart-type-bar * @exampleComponent limel-example-chart-type-dot * @exampleComponent limel-example-chart-type-area * @exampleComponent limel-example-chart-type-line * @exampleComponent limel-example-chart-type-pie * @exampleComponent limel-example-chart-type-doughnut * @exampleComponent limel-example-chart-type-ring * @exampleComponent limel-example-chart-type-gantt * @exampleComponent limel-example-chart-type-nps * @exampleComponent limel-example-chart-multi-axis * @exampleComponent limel-example-chart-multi-axis-with-negative-start-values * @exampleComponent limel-example-chart-multi-axis-area-with-negative-start-values * @exampleComponent limel-example-chart-axis-increment * @exampleComponent limel-example-chart-clickable-items * @exampleComponent limel-example-chart-accessibility * @exampleComponent limel-example-chart-axis-labels * @exampleComponent limel-example-chart-styling * @exampleComponent limel-example-chart-creative-styling * @beta */ interface LimelChart { /** * Helps users of assistive technologies to understand what the items in the chart represent. Defaults to the translation for "items" in the current language. */ "accessibleItemsLabel"?: string; /** * Helps users of assistive technologies to understand the context of the chart, and what is being displayed. */ "accessibleLabel"?: string; /** * Helps users of assistive technologies to understand what the values in the chart represent. Defaults to the translation for "value" in the current language. */ "accessibleValuesLabel"?: string; /** * Specifies the increment for the axis lines. */ "axisIncrement"?: number; /** * When set to true, renders visible labels for X and Y axes. Only affects chart types with X and Y axes, such as area, bar, and line charts. * @default false */ "displayAxisLabels": boolean; /** * Makes the `text` of chart items constantly visible, By default, item texts are displayed in a tooltip, when the item is hovered or focused. Only affects chart types with X and Y axes, such as area, bar, and line charts. * @default false */ "displayItemText": boolean; /** * Makes the `value` (or `formattedValue`) of chart items constantly visible, By default, item values are displayed in a tooltip, when the item is hovered or focused. Only affects chart types with X and Y axes, such as area, bar, and line charts. * @default false */ "displayItemValue": boolean; /** * List of items in the chart, each representing a data point. */ "items": ChartItem[]; /** * Defines the language for translations. Will translate the translatable strings on the components. * @default 'en' */ "language": Languages; /** * Indicates whether the chart is in a loading state. * @default false */ "loading": boolean; /** * Specifies the range that items' values could be in. This is used in calculation of the size of the items in the chart. When not provided, the sum of all values in the items will be considered as the range. */ "maxValue"?: number; /** * Defines whether the chart is intended to be displayed wide or tall. Does not have any effect on chart types which generate circular forms. * @default 'landscape' */ "orientation"?: 'landscape' | 'portrait'; /** * Defines how items are visualized in the chart. * @default 'stacked-bar' */ "type"?: | 'area' | 'bar' | 'doughnut' | 'line' | 'nps' | 'pie' | 'ring' | 'dot' | 'stacked-bar'; } /** * The Checkbox component is a classic and essential element in UI design that allows * users to make multiple selections from a predefined list of options. The Checkbox component is commonly used in forms and settings interfaces to enable users to * select one or more items from a list of choices. * ## States of a Checkbox * When a user clicks or taps on the box, it toggles between two states: * Checked and Unchecked. * However, a Checkbox can visualize a third state called the "Indeterminate" state. * In this state, the checkbox appears as a filled box with a horizontal line or dash inside it. * The Indeterminate state is typically used when dealing with checkbox groups * that have hierarchical relationships or when the group contains sub-items. * This state is used to indicate that that some, but not all, of the items in a group are selected. * :::important * Checkboxes are sometimes used interchangeably with switches in user interfaces. * But there is an important difference between the two! Please read our guidelines about * [Switch vs. Checkbox](#/DesignGuidelines/switch-vs-checkbox.md/). * @exampleComponent limel-example-checkbox-basic * @exampleComponent limel-example-checkbox-helper-text * @exampleComponent limel-example-checkbox-readonly */ interface LimelCheckbox { /** * The value of the checkbox. Set to `true` to make the checkbox checked. * @default false */ "checked": boolean; /** * Disables the checkbox when `true`. Works exactly the same as `readonly`. If either property is `true`, the checkbox will be disabled. * @default false */ "disabled": boolean; /** * Optional helper text to display below the checkbox */ "helperText": string; /** * Enables indeterminate state. Set to `true` to signal indeterminate check. * @default false */ "indeterminate": boolean; /** * Set to `true` to indicate that the current value is invalid. */ "invalid": boolean; /** * The checkbox label. */ "label": string; /** * Disables the checkbox when `true`. This visualizes the checkbox slightly differently. But shows no visual sign indicating that the checkbox is disabled or can ever become interactable. * @default false */ "readonly": boolean; /** * The labels to use to clarify what kind of data is being visualized, when the component is `readonly`. * @default [] */ "readonlyLabels"?: Array>; /** * Set to `true` to indicate that the checkbox must be checked. * @default false */ "required": boolean; } /** * Chips and buttons are both interactive elements in UI design, * but they serve different purposes and are used in different contexts. * :::warning * Do not use the chip component carelessly, as an alternative for * [`limel-button`](#/component/limel-button/) in the UI design! * **Buttons:** * Buttons are used to trigger actions. They are typically used to * submit forms, open dialogs, initiate a process, or perform any action * that changes the state of the application. * Buttons' labels usually contain action words, in other words, the labels is * a _verb in imperative mood_ such as "Submit" or "Delete". * Buttons are placed in areas where it's clear they will initiate * an action when clicked. * **Chips:** * Chips however are elements which may look like buttons, but they are * representing choices, filters, or tags, in a small block * or clearly bundled into a group. Chips are rarely used alone in the * user interface. * They are often used in a so called "chip-set", or placed together in * a section of the UI, where the user can expect more than one chip to be present. * For example, a chip may represent a filter in a filter bar, or a tag in a tag list, * or an item in a shopping list. * Clicking a chip can also trigger an action, for example toggling a filter ON or OFF, * or opening a page with all posts tagged with the tag represented by the chip, * or navigating to a page with more information about the item in the shopping list. * ::: * @exampleComponent limel-example-chip-button * @exampleComponent limel-example-chip-link * @exampleComponent limel-example-chip-icon-colors * @exampleComponent limel-example-chip-image * @exampleComponent limel-example-chip-badge * @exampleComponent limel-example-chip-filter * @exampleComponent limel-example-chip-removable * @exampleComponent limel-example-chip-menu * @exampleComponent limel-example-chip-loading * @exampleComponent limel-example-chip-progress * @exampleComponent limel-example-chip-size * @exampleComponent limel-example-chip-readonly-border * @exampleComponent limel-example-chip-aria-role */ interface LimelChip { /** * The value of the badge, displayed on the chip. */ "badge"?: string | number; /** * Set to `true` to disable the chip. * @default false */ "disabled": boolean; /** * Icon of the chip. */ "icon"?: IconName | Icon; /** * Identifier for the chip. Must be unique. * @default crypto.randomUUID() */ "identifier"?: number | string; /** * A picture to be displayed instead of the icon on the chip. */ "image"?: Image; /** * Set to `true` to visualize the chip in an "invalid" or "error" state. * @default false */ "invalid": boolean; /** * Defines the language for translations. Will translate the translatable strings on the components. * @default 'en' */ "language": Languages; /** * If supplied, the chip will become a clickable link. */ "link"?: Omit; /** * Set to `true` to put the component in the `loading` state, and render an indeterminate progress indicator inside the chip. This does _not_ disable the interactivity of the chip! * @default false */ "loading"?: boolean; /** * When provided, the chip will render an ellipsis menu with the supplied items. Also, this will hide the "remove button" when `removable={true}`, as the remove button will automatically become the last item in the menu. * @default [] */ "menuItems"?: Array; /** * Reflects the current value of a progress bar on the chip, visualizing the percentage of an ongoing process. Must be a number between `0` and `100`. */ "progress"?: number; /** * Set to `true` to render the chip as a static UI element. Useful when the parent component has a `readonly` state. * @default false */ "readonly": boolean; /** * Set to `true` to render a remove button on the chip. * @default false */ "removable": boolean; /** * Set to `true` to visualize the chip in a "selected" state. This is typically used when the chip is used in a chip-set along with other chips. * @default false */ "selected": boolean; /** * Defines the size of the chip. * @default 'default' */ "size": 'small' | 'default'; /** * Label displayed on the chip */ "text": string; /** * Set to `filter` to render the chip with a distinct style suitable for visualizing filters. * @default 'default' */ "type"?: ChipType; } /** * :::note * **Regarding `click` and `interact` events:** * The `interact` event is emitted when a chip is interacted with, and is * the recommended way to listen for chip interactions. * However, if you need to handle clicks differently depending on which chip * was clicked, or whether the click was on a chip or elsewhere, you need to * listen to the native `click` event instead. * Native `click` events are passed through, and if the click came from * a chip, the chip object is available in the event object under * `.Lime.chip`. * Example usage: * ```ts * private handleClick(event: Event) { * if (event && 'Lime' in event && (event.Lime as any).chip) { * if ((event.Lime as { chip: Chip }).chip.href) { * // Chip has href, so let the browser open the link. * return; * } * // handle click on chip without href * } else { * // handle click elsewhere * } * } * ``` * ::: * @exampleComponent limel-example-chip-set-basic * @exampleComponent limel-example-chip-set-choice * @exampleComponent limel-example-chip-set-filter * @exampleComponent limel-example-chip-set-filter-badge * @exampleComponent limel-example-chip-set-input * @exampleComponent limel-example-chip-set-invalid-chips * @exampleComponent limel-example-chip-set-input-type-with-menu-items * @exampleComponent limel-example-chip-set-input-type-text * @exampleComponent limel-example-chip-set-input-type-search * @exampleComponent limel-example-chip-set-input-non-removable * @exampleComponent limel-example-chip-icon-color * @exampleComponent limel-example-chip-set-image * @exampleComponent limel-example-chip-set-composite */ interface LimelChipSet { /** * For chip-set of type `input`, defines whether the input field should have autocomplete enabled. Read more about the `autocomplete` attribute [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete). * @default 'off' */ "autocomplete": string; /** * Whether the "Clear all" buttons should be shown * @default true */ "clearAllButton": boolean; /** * For chip-set of type `input`. Sets delimiters between chips. * @default null */ "delimiter": string; /** * True if the chip set should be disabled * @default false */ "disabled": boolean; /** * Used to empty the input field. Used in conjunction with `emptyInputOnBlur` to let the consumer control when the input is emptied. * @returns does not return anything, but methods have to be async */ "emptyInput": () => Promise; /** * Whether the input field should be emptied when the chip-set loses focus. * @default true */ "emptyInputOnBlur": boolean; /** * Used to find out whether the chip-set is in edit mode. * @returns `true` if the chip-set is in edit mode, `false` otherwise. */ "getEditMode": () => Promise; /** * Optional helper text to display below the chipset. When type is `input`, the helper text is displayed below the input field when it has focus. When type is not `input`, the helper text is always displayed if the device is touch screen; otherwise it is shown when chip-set is hovered or focused using keyboard navigation. */ "helperText": string; /** * For chip-sets of type `input`. Value to use for the `type` attribute on the input field inside the chip-set. * @default 'text' */ "inputType": 'search' | 'text'; /** * Set to `true` to indicate that the current value of the input field is invalid. * @default false */ "invalid": boolean; /** * Label for the chip-set */ "label": string; /** * Defines the language for translations. Will translate the translatable strings on the components. For example, the clear all chips label. * @default 'en' */ "language": Languages; /** * For chip-sets of type `input`. When the value is null, no leading icon is used. Leading icon to show to the far left in the text field * @default null */ "leadingIcon": IconName; /** * For chip-sets of type `input`. Limits the maximum number of chips. When the value is `0` or not set, no limit is applied. */ "maxItems": number; /** * For chip-sets of type `input`, set to `true` to disable adding and removing chips, but allow interaction with existing chips in the set. For any other types, setting either `readonly` or `disabled` disables the chip-set. * @default false */ "readonly": boolean; /** * True if the control requires a value * @default false */ "required": boolean; /** * Search label to display when type is `input` and component is in search mode */ "searchLabel": string; /** * Used to set focus to the chip-set input field. * @param emptyInput - if `true`, any text in the input is discarded * @returns does not return anything, but methods have to be async */ "setFocus": (emptyInput?: boolean) => Promise; /** * Type of chip set - `choice` renders a set of selectable chips where only one is selectable. The `removable` property is ignored - `filter` renders a set of selectable chips where all are selectable. - `input` renders a set of chips that can be used in conjunction with an input field If no type is set, a basic set of chips without additional functionality will be rendered */ "type"?: 'choice' | 'filter' | 'input'; /** * List of chips for the set * @default [] */ "value": Chip[]; } /** * The circular progress component can be used to visualize the curent state of * a progress in a scale; for example percentage of completion of a task. * Its compact UI makes the component suitable when there is not enough screen * space available to visualise such information. * This component allows you to define your scale, from `0` to a desired * `maxValue`; and also lets you chose a proper `suffix` for your scale. * :::note * The component will round up the value when it is displayed, and only shows * one decimal digit. * It also abbreviates large numbers. For example 1234 will be displayed as 1.2k. * Of course such numbers, if bigger than `maxValue` will be visualized as a * full progress. * ::: * @exampleComponent limel-example-circular-progress-basic * @exampleComponent limel-example-circular-progress-sizes * @exampleComponent limel-example-circular-progress-props * @exampleComponent limel-example-circular-progress-css-variables * @exampleComponent limel-example-circular-progress-percentage-colors */ interface LimelCircularProgress { /** * When set to `true`, makes the filled section showing the percentage colorful. Colors change with intervals of 10%. * @default false */ "displayPercentageColors": boolean; /** * The maximum value within the scale that the progress bar should visualize. Defaults to `100`. * @default PERCENT */ "maxValue": number; /** * The prefix which is displayed before the `value`, must be a few characters characters long. * @default null */ "prefix"?: string; /** * Determines the visual size of the visualization from a preset size. This property can override the `--circular-progress-size` variable if it is specified. */ "size": CircularProgressSize; /** * The suffix which is displayed after the `value`, must be one or two characters long. Defaults to `%` * @default '%' */ "suffix": string; /** * The value of the progress bar. * @default 0 */ "value": number; } /** * Displays a visual diff between two text values, modeled on * GitHub's code difference view. * Supports unified and split (side-by-side) views with line numbers, * color-coded additions and removals, word-level inline highlighting, * and collapsible unchanged context sections. * @beta * @exampleComponent limel-example-code-diff-basic * @exampleComponent limel-example-code-diff-headings * @exampleComponent limel-example-code-diff-json * @exampleComponent limel-example-code-diff-split * @exampleComponent limel-example-code-diff-line-wrap * @exampleComponent limel-example-code-diff-expand */ interface LimelCodeDiff { /** * Number of unchanged context lines to display around each change. * @default 3 */ "contextLines": number; /** * Language for syntax highlighting. Currently supports `"json"`. When set, code tokens are colorized (strings, numbers, keys, etc.) alongside the diff highlighting. */ "language"?: string; /** * The layout of the diff view. - `unified` — single column with interleaved additions and removals - `split` — side-by-side comparison with old on left, new on right * @default 'unified' */ "layout": 'unified' | 'split'; /** * When `true`, long lines are wrapped instead of causing horizontal scrolling. Useful when comparing prose or config files with long values. * @default true */ "lineWrapping": boolean; /** * Heading for the modified (after) version, displayed in the diff header. Defaults to `"Modified"`, localized via `translationLanguage`. */ "newHeading"?: string; /** * The "after" value to compare. Can be a string or an object (which will be serialized to JSON). * @default '' */ "newValue": string | object; /** * Heading for the original (before) version, displayed in the diff header. Defaults to `"Original"`, localized via `translationLanguage`. */ "oldHeading"?: string; /** * The "before" value to compare. Can be a string or an object (which will be serialized to JSON). * @default '' */ "oldValue": string | object; /** * When `true`, JSON values are parsed, keys are sorted, and indentation is normalized before diffing. This eliminates noise from formatting or key-order differences. * @default false */ "reformatJson": boolean; /** * Defines the language for translations. Will translate all visible labels and announcements. * @default 'en' */ "translationLanguage": Languages; } /** * @exampleComponent limel-example-code-editor-basic * @exampleComponent limel-example-code-editor-readonly-with-line-numbers * @exampleComponent limel-example-code-editor-fold-lint-wrap * @exampleComponent limel-example-code-editor-copy * @exampleComponent limel-example-code-editor-composite */ interface LimelCodeEditor { /** * Select color scheme for the editor * @default 'auto' */ "colorScheme": ColorScheme; /** * Set to `true` to disable the editor. Use `disabled` to indicate that the editor can normally be interacted with, but is currently disabled. This tells the user that if certain requirements are met, the editor may become enabled again. * @default false */ "disabled": boolean; /** * Allows the user to fold code * @default false */ "fold": boolean; /** * Optional helper text to display below the input field when it has focus */ "helperText"?: string; /** * Set to `true` to indicate that the current value of the input editor is invalid. * @default false */ "invalid": boolean; /** * The input label. */ "label"?: string; /** * The language of the code */ "language": Language; /** * Displays line numbers in the editor * @default false */ "lineNumbers": boolean; /** * Wraps long lines instead of showing horizontal scrollbar * @default false */ "lineWrapping": boolean; /** * Enables linting of JSON content * @default false */ "lint": boolean; /** * Set to `true` to make the editor read-only. Use `readonly` when the editor is only there to present the data it holds, and will not become possible for the current user to edit. * @default false */ "readonly": boolean; /** * Set to `true` to indicate that the field is required. * @default false */ "required": boolean; /** * Set to false to hide the copy button * @default true */ "showCopyButton": boolean; /** * Defines the language for translations. Will translate the translatable strings on the components. * @default 'en' */ "translationLanguage": Languages; /** * The code to be rendered * @default '' */ "value": string; } /** * A collapsible section can be used to group related content together * and hide the group when not needed. * Using this component can help to: * - Save vertical space by hiding non-essential content * - Improve content organization and scannability of the user interface * - Reduce cognitive load by displaying only a set of relevant information at a time * - Or disclose complex information, progressively to the user * @exampleComponent limel-example-collapsible-section-basic * @exampleComponent limel-example-collapsible-section-actions * @exampleComponent limel-example-collapsible-section-with-custom-header-component * @exampleComponent limel-example-collapsible-section-external-control * @exampleComponent limel-example-collapsible-section-with-slider * @exampleComponent limel-example-collapsible-section-invalid * @exampleComponent limel-example-collapsible-section-icon * @exampleComponent limel-example-collapsible-section-css-props */ interface LimelCollapsibleSection { /** * Actions to place to the far right inside the header */ "actions": Action[]; /** * Text to display in the header of the section */ "header": string; /** * Icon to display in the header of the section */ "icon"?: IconName | Icon; /** * `true` if the section is invalid, `false` if valid. This can be used to indicate that the content inside the section is invalid. * @default false */ "invalid": boolean; /** * `true` if the section is expanded, `false` if collapsed. * @default false */ "isOpen": boolean; /** * Defines the language for translations. Will translate the translatable strings on the components. * @default 'en' */ "language": Languages; } /** * This component enables you to select a swatch from out color palette, simply * by clicking on it. You can then copy the css variable name of the chosen color * and use it where desired. * The color picker can also show you a preview of any valid color name or color value. * :::note * Make sure to read our [guidelines about usage of colors](#/DesignGuidelines/color-system.md/) from our palette. * ::: * @exampleComponent limel-example-color-picker-basic * @exampleComponent limel-example-color-picker-custom-palette * @exampleComponent limel-example-color-picker-manual-input * @exampleComponent limel-example-color-picker-composite */ interface LimelColorPicker { /** * Set to `true` to disable the field. Use `disabled` to indicate that the field can normally be interacted with, but is currently disabled. This tells the user that if certain requirements are met, the field may become enabled again. * @default false */ "disabled": boolean; /** * Helper text of the input field */ "helperText": string; /** * Set to `true` to indicate that the current value of the input field is invalid. * @default false */ "invalid": boolean; /** * The label of the input field */ "label": string; /** * Set to `false` to disallow custom color values to be typed into the input field. Setting this to `false` does not completely disable the color picker. It will only allow users to pick from the provided color palette. * @default true */ "manualInput": boolean; /** * An array of either color value strings, or objects with a `name` and a `value`, which replaces the default palette. Any valid CSS color format is accepted as value (HEX, RGB/A, HSL, HWB, color-mix(), named colors, etc.). */ "palette"?: Array; /** * Defines the number of columns in the color swatch grid. If not provided, it will default to the number of colors in the palette; but stops at a maximum of 25 columns. */ "paletteColumnCount"?: number; /** * The placeholder text shown inside the input field, when the field is focused and empty. */ "placeholder": string; /** * Set to `true` to make the field read-only. Use `readonly` when the field is only there to present the data it holds, and will not become possible for the current user to edit. * @default false */ "readonly": boolean; /** * Set to `true` if a value is required */ "required": boolean; /** * Displayed as tooltips when picker is hovered. */ "tooltipLabel": string; /** * Name or code of the chosen color */ "value": string; } /** * @private */ interface LimelColorPickerPalette { /** * Defines the number of columns in the color swatch grid. If not provided, it will default to the number of colors in the palette. */ "columnCount"?: number; /** * Helper text of the input field */ "helperText": string; /** * Set to `true` to indicate that the current value of the input field is invalid. * @default false */ "invalid": boolean; /** * Label of the input field */ "label": string; /** * Set to `false` to disallow custom color values to be typed into the input field. * @default true */ "manualInput": boolean; /** * Custom color palette to use instead of Lime palette. Internal prop passed from parent. */ "palette"?: CustomPalette; /** * The placeholder text shown inside the input field, when the field is focused and empty. */ "placeholder": string; /** * Set to `true` if a value is required */ "required": boolean; /** * Color value that is manually typed by the user */ "value": string; } /** * Component used to set global configuration for Lime Elements. * :::warning * **Building something for Lime CRM?** Then you should _NOT_ use this component. * Lime CRM already uses this component to set the global configuration for * Lime Elements. No matter what problem you are facing at the moment, using * this component will not help, and might cause other problems. * ::: * Building your own software, which is using Lime Elements? * Then you _might_ need to use this component. * @private */ interface LimelConfig { /** * Global configuration for Lime Elements. */ "config": Config; } /** * @exampleComponent limel-example-date-picker-datetime * @exampleComponent limel-example-date-picker-date * @exampleComponent limel-example-date-picker-time * @exampleComponent limel-example-date-picker-week * @exampleComponent limel-example-date-picker-month * @exampleComponent limel-example-date-picker-quarter * @exampleComponent limel-example-date-picker-year * @exampleComponent limel-example-date-picker-formatted * @exampleComponent limel-example-date-picker-programmatic-change * @exampleComponent limel-example-date-picker-composite * @exampleComponent limel-example-date-picker-custom-formatter */ interface LimelDatePicker { /** * Set to `true` to disable the field. Use `disabled` to indicate that the field can normally be interacted with, but is currently disabled. This tells the user that if certain requirements are met, the field may become enabled again. * @default false */ "disabled": boolean; /** * Format to display the selected date in. */ "format": string; /** * Custom formatting function. Will be used for date formatting. :::note overrides `format` and `language` ::: */ "formatter"?: (date: Date) => string; /** * Optional helper text to display below the input field when it has focus */ "helperText": string; /** * Set to `true` to indicate that the current value of the date picker is invalid. * @default false */ "invalid": boolean; /** * Text to display next to the date picker */ "label": string; /** * Defines the localisation for translations and date formatting. Property `format` customizes the localized date format. * @default 'en' */ "language": Languages; /** * The placeholder text shown inside the input field, when the field is focused and empty */ "placeholder": string; /** * Set to `true` to make the field read-only. Use `readonly` when the field is only there to present the data it holds, and will not become possible for the current user to edit. * @default false */ "readonly": boolean; /** * Set to `true` to indicate that the field is required. * @default false */ "required": boolean; /** * Type of date picker. * @default 'datetime' */ "type": DateType; /** * The value of the field. */ "value": Date; } /** * :::note * Regarding the `close` event: When putting other elements that emit `close` * events inside a dialog, those events must be caught and stopped inside the * dialog. If not, they will bubble to the event handler listening for `close` * events on the dialog, which will close the dialog too. * See the example _Nested `close` events_. * ::: * :::important * Are you developing for * [Lime CRM](https://www.lime-technologies.com/en/lime-crm/)? Please note that * you should use the [DialogRenderer](https://lundalogik.github.io/lime-web-components/versions/latest/interfaces/DialogRenderer.html) * from Lime Web Components to open dialogs in Lime CRM. * ::: * @exampleComponent limel-example-dialog-basic * @exampleComponent limel-example-dialog-nested-close-events * @exampleComponent limel-example-dialog-heading * @exampleComponent limel-example-dialog-heading-actions * @exampleComponent limel-example-dialog-form * @exampleComponent limel-example-dialog-size * @exampleComponent limel-example-dialog-fullscreen * @exampleComponent limel-example-dialog-closing-actions * @exampleComponent limel-example-dialog-action-buttons */ interface LimelDialog { /** * Defines which action triggers a close-event. * @default { escapeKey: true, scrimClick: true, } */ "closingActions": ClosingActions; /** * Set to `true` to make the dialog "fullscreen". * @default false */ "fullscreen": boolean; /** * The heading for the dialog, if any. */ "heading": string | DialogHeading; /** * `true` if the dialog is open, `false` otherwise. * @default false */ "open": boolean; } /** * @exampleComponent limel-example-dock-basic * @exampleComponent limel-example-dock-custom-component * @exampleComponent limel-example-dock-notification * @exampleComponent limel-example-dock-mobile * @exampleComponent limel-example-dock-expanded * @exampleComponent limel-example-dock-colors-css */ interface LimelDock { /** * A label used to describe the purpose of the navigation element to users of assistive technologies, like screen readers. Especially useful when there are multiple navigation elements in the user interface. Example value: "Primary navigation" */ "accessibleLabel"?: string; /** * Set to `false` if you do not want to allow end-users to exapnd or shrink the Dock. This will hide the expand/shrink button, and the only things that defines the layout will be the `expanded` property, and the `mobileBreakPoint`. * @default true */ "allowResize"?: boolean; /** * Items that are placed at the bottom of the dock. (Or at the end in mobile layout.) * @default [] */ "dockFooterItems"?: DockItem[]; /** * Items that are placed in the dock. * @default [] */ "dockItems": DockItem[]; /** * Defines the width of the component, when it loads. - `true`: shows both icons and labels of the Dock items. - `false`: only shows icons of the doc items, and displays their labels as tooltip. Note: when `useMobileLayout` is `true`, labels will always be shown as tooltips. Read more below… * @default false */ "expanded"?: boolean; /** * Defines the breakpoint in pixles, at which the component will be rendered in a hoizontal layout. Default breakpoint is `700` pixels, which means when the screen size is smaller than `700px`, the component will automatically switch to a horizontal layout. * @default DEFAULT_MOBILE_BREAKPOINT */ "mobileBreakPoint"?: number; } /** * @private */ interface LimelDockButton { /** * When the dock is expanded or collapsed, dock items show labels and tooltips as suitable for the layout. * @default false */ "expanded"?: boolean; /** * Item that is placed in the dock. */ "item": DockItem; /** * When dock is using mobile layout, dock items show labels and tooltips as suitable for the layout. * @default false */ "useMobileLayout"?: boolean; } /** * This component resembles a drag handle button, but is implemented * as a `private` component to allow for easier styling and future extensions. * :::important * This component has its `shadow` set to `false` in order to * integrate well with the drag-and-drop functionality, as well as * providing a better accessibility. * Keep in mind that its styles might be affected by the consumer * component, due to its light dom. * ::: * :::tip * It's recommended to place the drag handle on the right side of * the item it is meant to reorder, to ensure consistent layout * design conventions. * ::: * @exampleComponent limel-example-drag-handle-basic * @exampleComponent limel-example-drag-handle-horizontal * @private */ interface LimelDragHandle { /** * The direction in which the drag handle can be used to reorder items. * @default 'vertical' */ "dragDirection": 'vertical' | 'horizontal'; /** * Language to use for translations. * @default 'en' */ "language": Languages; /** * The preferred direction for the tooltip to open. Defaults to 'left', as our recommended placement for a drag handle in the UI is on the far right side of draggable elements. * @default 'left' */ "tooltipOpenDirection": OpenDirection; } /** * This components displays a different label depending on the current given * value. A label can consist of a text and an optional icon. If no matching * label is found among the given `labels`, the `defaultLabel` will be displayed. * One use case of the component is to enhance the visualization of a `boolean` * field like a checkbox or switch in a `readonly` state. * The reason we offer this component is that the default styling * of the Checkbox or Toggle switch in the `readonly` state may not always * provide the best way of _visualizing information_, potentially leading to * confusion and negatively affecting the end-users' experience. * @exampleComponent limel-example-dynamic-label-basic * @exampleComponent limel-example-dynamic-label-readonly-boolean */ interface LimelDynamicLabel { /** * The label to display when no matching value is found in the `labels` array. This is a fallback label that ensures there's always a label displayed for the component. * @default {} */ "defaultLabel": Omit; /** * A list of available labels. Each label has a corresponding value that will be matched with the current `value` of the component to determine what label to display. * @default [] */ "labels": Label[]; /** * The current value of the component which is used to match with the given `labels` to determine what label to display. If not matching label is found, the `defaultLabel` is displayed. */ "value": LabelValue; } /** * This is a private component, used to render `.eml` files inside * `limel-file-viewer`. * :::note * If `bodyHtml` is provided, it will be rendered using `innerHTML`. * Consumers should pre-sanitize `bodyHtml` before passing it to the component. * ::: * @exampleComponent limel-example-email-viewer-plain-text * @exampleComponent limel-example-email-viewer-inline-image * @exampleComponent limel-example-email-viewer-remote-image-policy * @private */ interface LimelEmailViewer { /** * Controls whether remote images (http/https) are loaded. If omitted, the component treats this as a per-email setting. Consumers that want to remember the choice (per session/global) can provide this prop and listen for `allowRemoteImagesChange`. */ "allowRemoteImages"?: boolean; /** * The email message to display. If `email.bodyHtml` is set directly, consumers must provide sanitized HTML. */ "email"?: Email; /** * Optional URL to render as a final fallback using an ``. */ "fallbackUrl"?: string; /** * Defines the localization for translations. * @default 'en' */ "language": Languages; } /** * This component lets end-users select a *single* file from their device * storage. Regardless of the user's device or operating system, this component * opens up a file picker dialog that allows the user to choose a file. * ## Using correct labels * This file picker can be used in different contexts. The component's distinct * visual design including the upload icon hints end-users that this is not a * normal input field like other fields in the form for example. * :::important * you need to use a descriptive `label` that clarifies the * functionality of the file picker, and/or provides users with clear * instructions. * Depending on the context, you may need to avoid labels such as: * - File * - Document * and instead consider using labels like: * - Attach a file * - Upload a file * - Choose a document * - Choose a file * and similar phrases... * ::: * @exampleComponent limel-example-file-basic * @exampleComponent limel-example-file-custom-icon * @exampleComponent limel-example-file-menu-items * @exampleComponent limel-example-file-accepted-types * @exampleComponent limel-example-file-composite */ interface LimelFile { /** * The [accepted file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) * @default '*' */ "accept": string; /** * True if the input should be disabled * @default false */ "disabled": boolean; /** * Set to `true` to indicate that the current value of the chosen file is invalid. * @default false */ "invalid": boolean; /** * The input label. */ "label": string; /** * Defines the localisation for translations. * @default 'en' */ "language": Languages; /** * Set to `true` to disable adding and removing files, but allow interaction with any already existing file. * @default false */ "readonly": boolean; /** * Set to `true` to indicate that the field is required. * @default false */ "required": boolean; /** * The selected file. */ "value": FileInfo; } /** * This component enables you to seamlessly convert any region of the user interface into * a file dropzone area, just by wrapping it inside the `limel-file-dropzone`. * The file dropzone can then be used to allow end-users to upload files * by dragging and dropping them into the specified area, for example to trigger an upload process. * After receiving the files, the component emits a `filesSelected` event. For unsupported * files (specified with the `accept` prop) a `filesRejected` event will be emitted. * The event detail would be an array of `FileInfo` objects, * each representing a file dropped into the dropzone. * @exampleComponent limel-example-file-dropzone-basic * @exampleComponent limel-example-file-dropzone-type-filtering * @private */ interface LimelFileDropzone { /** * Specifies the types of files that the dropzone will accept. By default, all file types are accepted. For media files, formats can be specified using: `audio/*`, `video/*`, `image/*`. Unique file type specifiers can also be used, for example: `.jpg`, `.pdf`. A comma-separated list of file extensions or MIME types is also acceptable, e.g., `image/png, image/jpeg` or `.png, .jpg, .jpeg`. * @see [HTML attribute: accept](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept) for more details. * @default '*' */ "accept": string; /** * Set to `true` to disable the file dropzone. * @default false */ "disabled": boolean; /** * Is displayed to provide supplementary information to the end users, for instance, which filetypes or file sizes are accepted. * @default '' */ "helperText"?: string; /** * Is displayed when the user is dragging a file over the dropzone. A suitable text could for instance be "Drop your files here". */ "text": string; } /** * This component enables you to seamlessly transform any other clickable component that * generates a `click` event into a file input selector. * To use it, just wrap any clickable component inside the `limel-file-input` component. * Upon reception of the `click` event this component will open the native file selection * dialog. * After receiving the files, the component emits a `filesSelected` event. * The event detail would be an array of `FileInfo` objects, * each representing a file dropped into the dropzone. * @exampleComponent limel-example-file-input-basic * @exampleComponent limel-example-file-input-type-filtering * @private */ interface LimelFileInput { /** * Specifies the types of files that the dropzone will accept. By default, all file types are accepted. For media files, formats can be specified using: `audio/*`, `video/*`, `image/*`. Unique file type specifiers can also be used, for example: `.jpg`, `.pdf`. A comma-separated list of file extensions or MIME types is also acceptable, e.g., `image/png, image/jpeg` or `.png, .jpg, .jpeg`. * @see [HTML attribute: accept](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept) for more details. * @default '*' */ "accept": string; /** * Set to `true` to disable file input selection. * @default false */ "disabled": boolean; /** * Set to `true` to enable selection of multiple files * @default false */ "multiple": boolean; } /** * This is a smart component that automatically detects * the most common file types such as image, audio, video, and text, * and properly displays them in the browser. * The component is also capable to render the most common office files. * :::note * Image files will always be contained in their containers, which means * they automatically increase or decrease in size to fill their containing box * whilst preserving their aspect-ratio. * Text and PDF files will also always respect the width and height of the * container in which the `limel-file-viewer` is loaded. * ::: * For some file types such as text and images, the component will display a * download button and a button to open the file in a new browser tab. * This will allow users to preview the file in a fullscreen mode with the * browser and take advantage of for example native zooming and panning * functionalities. * @exampleComponent limel-example-file-viewer-basic * @exampleComponent limel-example-file-viewer-office * @exampleComponent limel-example-file-viewer-eml * @exampleComponent limel-example-file-viewer-filename * @exampleComponent limel-example-file-viewer-inbuilt-actions * @exampleComponent limel-example-file-viewer-custom-actions * @exampleComponent limel-example-file-viewer-with-picker * @beta */ interface LimelFileViewer { /** * An array of custom actions that can be displayed as an action menu on the file which is being displayed. */ "actions": ListItem[]; /** * Displays a button that allows the user to download the file. Note that due to the browser's security policies, the file should be hosted on the same domain for the download button to work properly. Not displayed for office files! * @default false */ "allowDownload"?: boolean; /** * Displays a button that allows the user to view the file in fullscreen mode. Not displayed for office files! * @default false */ "allowFullscreen"?: boolean; /** * Displays a button that allows the user to open the file in a new browser tab. Not displayed for office files! * @default false */ "allowOpenInNewTab"?: boolean; /** * An optional alternative text, mainly for assistive technologies and screen readers. It is used for only image files, as an `alt` attribute. Should optimally hold a description of the image, which is also displayed on the page if the image can't be loaded for some reason. */ "alt"?: string; /** * The name of the file that must also contains its extension. This overrides the filename that the `url` ends with. Useful when the `url` does not contain the filename. When specified, the `filename` will be used as filename of the downloaded file. */ "filename"?: string; /** * Defines the localization for translations. * @default 'en' */ "language": Languages; /** * Defines the third-party viewer that should be used to render the content of office files, such as word processing documents, presentations, or spreadsheets. * @default 'microsoft-office' */ "officeViewer": OfficeViewer; /** * Link to the file */ "url": string; } /** * This component is internal and only supposed to be used by * the limel-date-picker. This component is needed in order for us * to render the flatpickr calendar in a portal. * @private */ interface LimelFlatpickrAdapter { /** * Format to display the selected date in. */ "format": string; "formatter": (date: Date) => string; /** * The native input element to use with flatpickr. */ "inputElement": HTMLElement; /** * Set to `true` if the calendar should be open. */ "isOpen": boolean; /** * Defines the localisation for translations and date formatting. Property `format` customizes the localized date format. * @default 'en' */ "language": Languages; /** * Type of date picker. * @default 'datetime' */ "type": DateType; /** * The value of the field. */ "value": Date; } /** * This component is deprecated and will be removed in a future version of * Lime Elements. Please use CSS for your flexible container needs 🙂 * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox * @deprecated - Please use CSS instead https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox * @private */ interface LimelFlexContainer { /** * Specify how items are aligned along the cross axis * @default 'center' */ "align": FlexContainerAlign; /** * Direction of the main axis * @default 'horizontal' */ "direction": FlexContainerDirection; /** * Specify how items are aligned along the main axis * @default 'space-between' */ "justify": FlexContainerJustify; /** * Reverse the order of the items * @default false */ "reverse": boolean; } /** * @exampleComponent limel-example-form * @exampleComponent limel-example-nested-form * @exampleComponent limel-example-list-form * @exampleComponent limel-example-dynamic-form * @exampleComponent limel-example-custom-component-form * @exampleComponent limel-example-props-factory-form * @exampleComponent limel-example-form-layout * @exampleComponent limel-example-form-span-fields * @exampleComponent limel-example-custom-error-message * @exampleComponent limel-example-server-errors * @exampleComponent limel-example-form-array-item-controls * @exampleComponent limel-example-form-with-help * @exampleComponent limel-example-form-row-layout * @exampleComponent limel-example-builtin-field-types-form * @exampleComponent limel-example-code-editor-form */ interface LimelForm { /** * Set to `true` to disable the whole form. * @default false */ "disabled": boolean; /** * Extra errors to display in the form. Typical use case is asynchronous errors generated server side. */ "errors": ValidationError; /** * Factory for creating properties for custom form components When using custom components in the form some properties might have to be set dynamically. If this factory is set, it will be called with the current schema for the field for each custom component in the form. The factory must return an object where each key is the name of the property that should be set, along with its value. */ "propsFactory"?: (schema: FormSchema) => Record; /** * The schema used to render the form * @default {} */ "schema": FormSchema; /** * Custom function to customize the default error messages */ "transformErrors"?: (errors: FormError[]) => FormError[]; /** * Value of the form */ "value": object; } /** * This component is deprecated and will be removed in a future version of * Lime Elements. Please use CSS for your flexible container needs 🙂 * @deprecated Please use CSS instead https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout * @private */ interface LimelGrid { } /** * A header is the top most visual element in a component, page, card, or a view. * ## Usage * A header is the first thing that clarifies a context for users. * Due to their positions in the UI hierarchy, headers are the most * prominent elements of a user interface; and because of that, they carry both * vital information and fundamental controls for the area of the interface * they represent. * For example, when a header is placed on top of a card, it should quickly * explain the card to the user. When placed on top of a modal, it should easily * clarify what the modal is about. When displayed on top of a fullscreen view, * it should indicate where in the system users are, and what part of the app * they are looking at. * ## Layout * The vital information in a header is usually manifested in form of an icon, * and a heading. A subheading also could be added to provide supplementary * information. There is also a third place for displaying supplementary information * or "supporting text", which will be rendered as a part of the subheading. * Along with this information, headers can also include actions, controls, or * menus. * :::important * Such actions or menus must affect the entire section of the interface * which the header is representing. For example, a _Delete_ button on a card * header must delete that entire card and its respective contents all together, * not for example a selected item which is visible in the content of that card. * ::: * :::warning * Do not user background color on icons in the headers. It is much better and * much easier for the eye if your icon itself has a color. * Background colors behind icons make them look like "call to action" buttons * and take a lot of attention from users. * ::: * @exampleComponent limel-example-header-basic * @exampleComponent limel-example-header-slot-actions * @exampleComponent limel-example-header-colors * @exampleComponent limel-example-header-responsive * @exampleComponent limel-example-header-narrow */ interface LimelHeader { /** * Title to display */ "heading"?: string; /** * Icon to display */ "icon"?: IconName | Icon; /** * Subheading to display */ "subheading"?: string; /** * The visual divider that separates the `subheading` and the `supportingText`. It must be a single character such as `-` or `,`. * @default '·' */ "subheadingDivider"?: string; /** * An extra string of text to display along with with the Subheading */ "supportingText"?: string; } /** * A good design is self-explanatory! However, sometimes concepts are * too complex to understand, no matter how well-designed a user interface is. * In such cases, contextual help can be a great way to provide users with * help precisely where and when users need it. * In app interface design, providing contextual help emerges as a viable practice * for enhancing user experience and usability. * Contextual help serves as a quick-to-access guiding, * empowering users to more easily understand and navigate through * the intricacies of an application. * Using this component designers empower users to grasp the functionality * of an app more effortlessly, minimizes the learning curve, * transforming complex features into accessible opportunities for exploration. * @exampleComponent limel-example-help-basic * @exampleComponent limel-example-read-more * @exampleComponent limel-example-open-direction * @exampleComponent limel-example-placement */ interface LimelHelp { /** * {@inheritdoc Help.openDirection} * @default 'top-start' */ "openDirection": OpenDirection; /** * {@inheritdoc Help.readMoreLink} */ "readMoreLink"?: Link; /** * {@inheritdoc Help.trigger} * @default '?' */ "trigger": string; /** * {@inheritdoc Help.value} */ "value": string; } /** * Help content * This is scrollable content that is placed in the popover of the Help component. * Moved here mostly to avoid having inlined styles in the parent component. * Since you cannot send styles to the Portal component, we need to have this * child component. * @private */ interface LimelHelpContent { "readMoreLink"?: Link; "value": string; } /** * This is an internal and private component that many input fields * use to display a helper text, along with a character counter below the * input field. * We created this to keep the visual styles the same everywhere * and to avoid importing styles separately. * Also this enables us to open the helper line in limel-portal, * more easily without having to send the styles to the portal. * @exampleComponent limel-example-helper-line-basic * @exampleComponent limel-example-helper-line-invalid * @exampleComponent limel-example-helper-line-long-text * @exampleComponent limel-example-helper-line-long-text-no-counter * @exampleComponent limel-example-helper-line-character-counter * @exampleComponent limel-example-helper-line-empty * @exampleComponent limel-example-helper-line-animation * @private */ interface LimelHelperLine { /** * The helper text that is displayed on the left side. */ "helperText"?: string; /** * Used by `aria-controls` and `aria-describedby` in the parent component. */ "helperTextId"?: string; /** * Turns `true`, when the parent component is invalid. For example, when the parent component is `required` but is left empty. Or when the input format is invalid. * @default false */ "invalid"?: boolean; /** * Length of the current input value, coming from the parent component. Used in the character counter section on the right side. */ "length"?: number; /** * Maximum length of the characters, defined on the parent component. Used in the character counter section on the right side. */ "maxLength"?: number; } /** * This is a display-only component used to visualize keyboard shortcuts. * It renders hotkey strings as styled `` elements with * platform-aware glyphs (e.g. `⌘` on macOS, `⊞ Win` on Windows). * It does **not** listen for or handle any keyboard events. * Keyboard event handling is the responsibility of the parent component * (e.g. `limel-menu` or `limel-select`). * @exampleComponent limel-example-hotkey-basic * @exampleComponent limel-example-hotkey-disabled * @private */ interface LimelHotkey { /** * When `true`, the hotkey is rendered in a visually disabled state. * @default false */ "disabled": boolean; /** * The hotkey string to visualize, e.g. `"meta+c"` or `"shift+enter"`. */ "value": string; } /** * :::important * To install your icon set correctly, please read the [documentation here](#/). * ::: * The size and color of the icon is normally set in CSS, however there are a few * standard sizes defined that can be used with the `size` property. * @exampleComponent limel-example-icon-name * @exampleComponent limel-example-icon-size * @exampleComponent limel-example-icon-color */ interface LimelIcon { /** * Set to `true` to give the icon a round background with some padding. Only works when the `size` attribute is also set. */ "badge": boolean; /** * Name of the icon */ "name": string; /** * Size of the icon */ "size": IconSize; } /** * @exampleComponent limel-example-icon-button-basic * @exampleComponent limel-example-icon-button-disabled * @exampleComponent limel-example-icon-button-elevated * @exampleComponent limel-example-icon-button-toggle-state * @exampleComponent limel-example-icon-button-icon * @exampleComponent limel-example-icon-button-helper-label * @exampleComponent limel-example-icon-button-composite */ interface LimelIconButton { /** * Set to `true` to disable the button. * @default false */ "disabled": boolean; /** * Set to `true` to give the button our standard "elevated" look, lifting it off the flat layout. * @default false */ "elevated": boolean; /** * Additional helper text for the tooltip. Example usage can be a keyboard shortcut to activate the function of the button. */ "helperLabel"?: string; /** * The icon to display. */ "icon": IconName | Icon; /** * The text to show to screenreaders and other assistive tech. It is also displayed as a tooltip when the user hovers or focuses the button. */ "label": string; } /** * This component can be used on places such as a start page or a dashboard. * It offers features for visualizing aggregated data along with supplementary * information. * If clicking on the component should navigate the user to * a new screen or web page, you need to provide a URL, * using the `link` property. * @exampleComponent limel-example-info-tile-basic * @exampleComponent limel-example-info-tile-badge * @exampleComponent limel-example-info-tile-progress * @exampleComponent limel-example-info-tile-loading * @exampleComponent limel-example-info-tile-primary-slot * @exampleComponent limel-example-info-tile-styling */ interface LimelInfoTile { /** * If supplied, the info tile will display a notification badge. */ "badge"?: number | string; /** * Set to `true` if info tile is disabled. * @default false */ "disabled"?: boolean; /** * Name of icon for the info tile. */ "icon"?: string; /** * The text to show below the info tile. Long labels will be truncated. * @default null */ "label"?: string; /** * If supplied, the info tile will be a clickable link. Supplying a value also adds an elevated effect using a shadow, as well as `cursor: pointer`, which appears on hover. While we strongly recommend supplying a link whenever the component should act as a link, if this is not possible, and you need to provide interaction through a click handler, you can still get the correct styling by supplying a `Link` object with the `href` property set to `'#'`. */ "link"?: Link; /** * Set to `true` to put the component in the `loading` state. This does _not_ disable the link. To do so, the `disabled` property should be set to `true` as well. * @default false */ "loading"?: boolean; /** * A string of text that is visually placed before the value. */ "prefix"?: string; /** * Properties of the optional circular progress bar. Defaults: - `maxValue`: 100 - `suffix`: % - `displayPercentageColors`: false Colors change with intervals of 10 %. */ "progress"?: InfoTileProgress; /** * A string of text that is visually placed after the value. */ "suffix"?: string; /** * A piece of text or number that is the main piece of information which the component is intended to visualize. */ "value": number | string; } /** * @exampleComponent limel-example-input-field-text * @exampleComponent limel-example-input-field-placeholder * @exampleComponent limel-example-input-field-text-multiple * @exampleComponent limel-example-input-field-number * @exampleComponent limel-example-input-field-autocomplete * @exampleComponent limel-example-input-field-icon-leading * @exampleComponent limel-example-input-field-icon-trailing * @exampleComponent limel-example-input-field-icon-both * @exampleComponent limel-example-input-field-showlink * @exampleComponent limel-example-input-field-error-icon * @exampleComponent limel-example-input-field-textarea * @exampleComponent limel-example-input-field-suffix * @exampleComponent limel-example-input-field-prefix * @exampleComponent limel-example-input-field-search * @exampleComponent limel-example-input-field-pattern * @exampleComponent limel-example-input-field-focus * @exampleComponent limel-example-input-field-selection */ interface LimelInputField { /** * list of suggestions `value` can autocomplete to. * @default [] */ "completions": string[]; /** * Set to `true` to disable the field. Use `disabled` to indicate that the field can normally be interacted with, but is currently disabled. This tells the user that if certain requirements are met, the field may become enabled again. * @default false */ "disabled": boolean; /** * Set to `true` to format the current value of the input field only if the field is of type number. The number format is determined by the current language of the browser. * @default true */ "formatNumber": boolean; /** * Returns the direction of the current text selection. Can be `'forward'`, `'backward'`, or `'none'`. Returns `null` if the input element is not available or if the input type does not support selection (e.g., `number`). */ "getSelectionDirection": () => Promise<"forward" | "backward" | "none" | null>; /** * Returns the end position of the current text selection. Returns `null` if the input element is not available or if the input type does not support selection (e.g., `number`). */ "getSelectionEnd": () => Promise; /** * Returns the start position of the current text selection. Returns `null` if the input element is not available or if the input type does not support selection (e.g., `number`). */ "getSelectionStart": () => Promise; /** * Optional helper text to display below the input field when it has focus */ "helperText": string; /** * Set to `true` to indicate that the current value of the input field is invalid. * @default false */ "invalid": boolean; /** * The input label. */ "label": string; /** * Leading icon to show to the far left in the field. */ "leadingIcon": IconName; /** * The locale to use for formatting numbers. * @default globalConfig.defaultLocale */ "locale": string; /** * Maximum allowed value if input type is `number`. */ "max": number; /** * Maximum length of the value if type is `password`, `search`, `tel`, `text`, `url`, or `urlAsText`. */ "maxlength": number; /** * Minimum allowed value if input type is `number`. */ "min": number; /** * Minimum length of the value if type is `password`, `search`, `tel`, `text`, `url`, or `urlAsText`. */ "minlength": number; /** * Regular expression that the current value of the input field must match. No forward slashes should be specified around the pattern. Only used if type is `text`, `tel`, `email`, `url`, `urlAsText`, `password`, or `search`. */ "pattern": string; /** * The placeholder text shown inside the input field, when the field is focused and empty. */ "placeholder": string; /** * A short piece of text to display before the value inside the input field. Displayed for all types except `textarea`. */ "prefix": string; /** * Set to `true` to make the field read-only. Use `readonly` when the field is only there to present the data it holds, and will not become possible for the current user to edit. * @default false */ "readonly": boolean; /** * Set to `true` to indicate that the field is required. * @default false */ "required": boolean; /** * For inputs of type `email`, `tel`, `url`, and `urlAsText`, set this to `true` to show a trailing icon with a `mailto:`,`tel:`, or normal link, respectively. The default icon can be overridden using the `trailingIcon` property. * @default false */ "showLink": boolean; /** * Defines which numeric values are valid and the increment/decrement interval. For example, `step={0.1}` allows decimals and steps by 0.1. Set to `'any'` to allow any numeric value. Only applies when `type` is `number`. * @default 'any' */ "step": number | 'any'; /** * A short piece of text to display after the value inside the input field. Displayed for all types except `textarea`. */ "suffix": string; /** * Trailing icon to show to the far right in the field. */ "trailingIcon": IconName; /** * Type of input. Note** regarding type `url`: `limel-input` uses the native validation built into the browser for many types of input fields. The native validation for `url` is very strict, and does not allow relative urls, nor any other formats that are not a "fully qualified" url. To allow such urls, use the type `urlAsText` instead. `urlAsText` works exactly like `text` in all regards, except that it enables use of the `showLink` property. * @default 'text' */ "type": InputType; /** * The value of the field. */ "value": string; } /** * The linear progress component can be used to visualize the current state of a progress in a scale; * for example percentage of completion of a task. * @exampleComponent limel-example-linear-progress-basic * @exampleComponent limel-example-linear-progress-indeterminate * @exampleComponent limel-example-linear-progress-accessible-label * @exampleComponent limel-example-linear-progress-color */ interface LimelLinearProgress { /** * A label used to describe the purpose of the element to users of assistive technologies, like screen readers. If not provided, the generic word of "Progress bar" will be used. */ "accessibleLabel"?: string; /** * Puts the progress bar in an indeterminate state * @default false */ "indeterminate": boolean; /** * Defines the language for translations. Will translate the translatable strings on the components. * @default 'en' */ "language": Languages; /** * The value of the progress bar. Should be between `0` and `1`. * @default 0 */ "value": number; } /** * @exampleComponent limel-example-list-basic * @exampleComponent limel-example-list-secondary * @exampleComponent limel-example-list-separator * @exampleComponent limel-example-list-icons * @exampleComponent limel-example-list-badge-icons * @exampleComponent limel-example-list-pictures * @exampleComponent limel-example-list-selectable * @exampleComponent limel-example-list-checkbox-icons * @exampleComponent limel-example-list-radio-button-icons * @exampleComponent limel-example-list-action * @exampleComponent limel-example-list-striped * @exampleComponent limel-example-list-badge-icons-with-multiple-lines * @exampleComponent limel-example-list-grid * @exampleComponent limel-example-list-primary-component */ interface LimelList { /** * Set to `true` if the list should display larger icons with a background */ "badgeIcons": boolean; /** * Size of the icons in the list * @default 'small' */ "iconSize": IconSize; /** * List of items to display */ "items": Array; /** * By default, lists will display 3 lines of text, and then truncate the rest. Consumers can increase or decrease this number by specifying `maxLinesSecondaryText`. If consumer enters zero or negative numbers we default to 1; and if they type decimals we round up. * @default 3 */ "maxLinesSecondaryText": number; /** * The type of the list, omit to get a regular list. Available types are: `selectable`: regular list with single selection. `radio`: radio button list with single selection. `checkbox`: checkbox list with multiple selection. */ "type": ListType; } /** * This components displays the list item. * This centralizes styles and functionality, and helps reduce redundant code * in consumer components such as `limel-list` and `limel-menu-list`. * :::note * The component has `shadow: false`. There are a few reasons for it: * 1. This is to improve performance, and ensure that its internal elements are * considered as internal parts of the consumer's DOM. * 2. The consumer does not need to implement the interactive styles * (such as `visualize-keyboard-focus` mixin) on their own. Since there is no * shadow DOM, our mixins can be applied directly to the `limel-list-item` elements, * within the component's own styles. * 3. Most importantly, the MDCList checks the light DOM of each list item * to find native inputs to decide the list mode (checkbox/radio). * With `shadow: true`, those inputs would be hidden inside the `limel-list-items`’s * shadow DOM, so MDC wouldn’t detect them and therefore throw errors, when given * an array index (for the items). * With `shadow: false`, the native `` from this template * would be visible to MDC. * ::: * @exampleComponent limel-example-list-item-basic * @exampleComponent limel-example-list-item-icon * @exampleComponent limel-example-list-item-icon-size * @exampleComponent limel-example-list-item-pictures * @exampleComponent limel-example-list-item-multiple-lines * @exampleComponent limel-example-list-item-interactive * @exampleComponent limel-example-list-item-radio * @exampleComponent limel-example-list-item-checkbox * @exampleComponent limel-example-list-item-actions * @exampleComponent limel-example-list-item-primary-component * @exampleComponent limel-example-list-item-command-text * @private */ interface LimelListItem { /** * {@inheritdoc ListItem.selected} */ "actions"?: ListItem['actions']; /** * Set to `true` if the list should display larger icons with a background * @default false */ "badgeIcon": boolean; /** * {@inheritdoc ListItem.disabled} * @default false */ "disabled": boolean; /** * {@inheritdoc ListItem.icon} */ "icon"?: string | ListItem['icon']; /** * Size of the icon displayed for this item. * @default 'small' */ "iconSize": IconSize; /** * {@inheritdoc ListItem.image} */ "image"?: ListItem['image']; /** * Defines the language for translations. Will translate the translatable strings on the components. * @default 'en' */ "language": Languages; /** * {@inheritdoc ListItem.selected} */ "primaryComponent"?: ListItem['primaryComponent']; /** * {@inheritdoc ListItem.secondaryText} */ "secondaryText"?: string; /** * {@inheritdoc ListItem.selected} * @default false */ "selected": boolean; /** * {@inheritdoc ListItem.text} */ "text": string; /** * The semantic role of the list item. This affects the ARIA role and the interaction behavior. - 'option' → selectable via click/Enter/Space, aria-selected - 'radio'/'checkbox' → selectable, aria-checked - 'menuitem'/'listitem' → activation only, no selection toggle * @default 'listitem' */ "type": 'listitem' | 'menuitem' | 'option' | 'radio' | 'checkbox'; /** * {@inheritdoc ListItem.value} */ "value"?: any; } /** * The Markdown component receives markdown syntax * and renders it as HTML. * A built-in set of lime-elements components is whitelisted by default * and can be used directly in markdown content without any configuration. * Consumers can extend this list via the `whitelist` prop or `limel-config`. * When custom elements use JSON attribute values, any URL-bearing * properties (`href`, `src`, `cite`, `longDesc`) are automatically * sanitized using the same protocol allowlists as rehype-sanitize. * URLs with dangerous schemes (e.g. `javascript:`, `data:`) are * removed (with a console warning) to prevent script injection. * @exampleComponent limel-example-markdown-headings * @exampleComponent limel-example-markdown-emphasis * @exampleComponent limel-example-markdown-lists * @exampleComponent limel-example-markdown-links * @exampleComponent limel-example-markdown-images * @exampleComponent limel-example-markdown-code * @exampleComponent limel-example-markdown-footnotes * @exampleComponent limel-example-markdown-tables * @exampleComponent limel-example-markdown-html * @exampleComponent limel-example-markdown-keys * @exampleComponent limel-example-markdown-blockquotes * @exampleComponent limel-example-markdown-horizontal-rule * @exampleComponent limel-example-markdown-custom-component * @exampleComponent limel-example-markdown-custom-component-with-json-props * @exampleComponent limel-example-markdown-remove-empty-paragraphs * @exampleComponent limel-example-markdown-adapt-color-contrast * @exampleComponent limel-example-markdown-composite */ interface LimelMarkdown { /** * Adapt rendered inline `color:` declarations to the surrounding surface. After each markdown re-render the component walks the rendered DOM and removes any inline `color` whose contrast against the resolved background falls below WCAG 3:1, letting the surface's themed text color inherit through. Brand colors that already meet contrast are left alone. Default `false` so the component remains a neutral renderer; turn this on for surfaces that render externally-authored content (e.g. imported email bodies) where the host application's theme drives the surrounding text color. * @default false */ "adaptColorContrast": boolean; /** * Enable lazy loading for images * @default false */ "lazyLoadImages": boolean; /** * Set to `false` to preserve empty paragraphs before rendering. Empty paragraphs are paragraphs that do not contain any meaningful content (text, images, etc.), or only contain whitespace (`
` or ` `). * @default true */ "removeEmptyParagraphs": boolean; /** * The input text. Treated as GitHub Flavored Markdown, with the addition that any included HTML will be parsed and rendered as HTML, rather than as text. * @default '' */ "value": string; /** * Additional whitelisted custom elements to render inside markdown. A built-in set of lime-elements components (such as `limel-chip`, `limel-icon`, `limel-badge`, `limel-callout`, etc.) is always allowed by default. Any entries provided here are **merged** with those defaults — if both define the same `tagName`, their attributes are combined. Can also be set via `limel-config`. Setting this property will override the global config. JSON attribute values that contain URL-bearing properties (`href`, `src`, `cite`, `longDesc`) are automatically sanitized using the same protocol allowlists as rehype-sanitize. URLs with dangerous schemes (e.g. `javascript:`, `data:`) are removed (with a console warning). * @alpha * @default globalConfig.markdownWhitelist */ "whitelist"?: CustomElementDefinition[]; } /** * A responsive masonry grid layout component. * This component arranges slotted elements into a masonry-style grid, * where items are placed in the shortest column, resulting in a * Pinterest-like layout with minimal vertical gaps. * The component uses JavaScript to calculate positions, providing * reliable cross-browser support — unlike CSS-only approaches such as * `columns` or `grid-template-rows: masonry`, which have limited * browser support or produce poor results. * The number of columns is determined automatically based on the * available width and the minimum column width. * @exampleComponent limel-example-masonry-layout-basic * @exampleComponent limel-example-masonry-layout-images * @exampleComponent limel-example-masonry-layout-ordered * @beta */ interface LimelMasonryLayout { /** * When `true`, items are placed left-to-right in DOM order. When `false` (default), items are placed in the shortest column. * @default false */ "ordered": boolean; } /** * @exampleComponent limel-example-menu-basic * @exampleComponent limel-example-menu-disabled * @exampleComponent limel-example-menu-open-direction * @exampleComponent limel-example-menu-surface-width * @exampleComponent limel-example-menu-separators * @exampleComponent limel-example-menu-icons * @exampleComponent limel-example-menu-badge-icons * @exampleComponent limel-example-menu-grid * @exampleComponent limel-example-menu-secondary-text * @exampleComponent limel-example-menu-notification * @exampleComponent limel-example-menu-sub-menus * @exampleComponent limel-example-menu-sub-menu-lazy-loading * @exampleComponent limel-example-menu-sub-menu-lazy-loading-infinite * @exampleComponent limel-example-menu-searchable * @exampleComponent limel-example-menu-hotkeys * @exampleComponent limel-example-menu-searchable-hotkeys * @exampleComponent limel-example-menu-keep-open * @exampleComponent limel-example-menu-composite */ interface LimelMenu { /** * Defines whether the menu should show badges. * @default false */ "badgeIcons": boolean; /** * :::warning Internal Use Only This property is for internal use only. We need it for now, but want to find a better implementation of the functionality it currently enables. If and when we do so, this property will be removed without prior notice. If you use it, your code _will_ break in the future. ::: */ "currentSubMenu": MenuItem; /** * Sets the disabled state of the menu. * @default false */ "disabled": boolean; /** * Message to display when search returns 0 results. */ "emptyResultMessage"?: string; /** * Renders list items in a grid layout, rather than a vertical list * @default false */ "gridLayout": boolean; /** * A list of items and separators to show in the menu. * @default [] */ "items": Array; /** * When `true`, the menu stays open after an item is selected. * @default false */ "keepOpenOnSelect": boolean; /** * :::warning Internal Use Only This property is for internal use only. We need it for now, but want to find a better implementation of the functionality it currently enables. If and when we do so, this property will be removed without prior notice. If you use it, your code _will_ break in the future. ::: * @default false */ "loading": boolean; /** * Sets the open state of the menu. * @default false */ "open": boolean; /** * Decides the menu's location in relation to its trigger * @default 'bottom-start' */ "openDirection": OpenDirection; /** * A root breadcrumb item to show above the menu items. Clicking it navigates back from a sub-menu to the root menu. * @default DEFAULT_ROOT_BREADCRUMBS_ITEM */ "rootItem": BreadcrumbsItem; /** * Placeholder text for the search input field. */ "searchPlaceholder"?: string; /** * A search function that takes a search-string as an argument, and returns a promise that will eventually be resolved with an array of `MenuItem`:s. See the docs for the type `MenuSearcher` for type information on the searcher function itself. */ "searcher": MenuSearcher; /** * Decides the width of menu's dropdown * @default 'inherit-from-items' */ "surfaceWidth": SurfaceWidth; } /** * Meta content for menu list items * This sub-component is intended to be passed as `primaryComponent` * to `limel-list-item`, when it is used in the menu list. * It includes command text, badge, and chevron, which are the * features of menu list items. * @private */ interface LimelMenuItemMeta { /** * Optional badge value */ "badge"?: string | number; /** * Use to display optional keyboard shortcut or command hint, e.g. `⌘ + K` */ "commandText"?: string; /** * Will be set to `true` when the menu item is disabled. * @default false */ "disabled": boolean; /** * Hotkey to display. When provided, `commandText` is ignored. */ "hotkey"?: string; /** * Shows a submenu chevron to indicate nested items * @default false */ "showChevron": boolean; } /** * @private */ interface LimelMenuList { /** * Set to `true` if the list should display larger icons with a background */ "badgeIcons": boolean; /** * Size of the icons in the list * @default 'small' */ "iconSize": IconSize; /** * List of items to display */ "items": Array; } /** * @private */ interface LimelMenuSurface { /** * Clicks in this element should not be prevented when the menu surface is open */ "allowClicksElement": HTMLElement; /** * True if the menu surface is open, false otherwise * @default false */ "open": boolean; } /** * This is a private component, used to render a notched outline * around all input elements that can have a floating label. * Inspired by Material Design's styles for input fields. * We use it in various components to unify styles and avoid * repeating code. * :::note * The component has `shadow: false`. This is to improve performance, * and ensure that its internal elements are considered as internal parts * of the consumer's DOM. This way, the value `for` in `