@limetech/lime-elements 40.10.1 → 40.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon.cjs.entry.js +35 -1
- package/dist/cjs/limel-side-panel.cjs.entry.js +67 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/icon/icon.js +41 -1
- package/dist/collection/components/side-panel/side-panel.css +176 -1
- package/dist/collection/components/side-panel/side-panel.js +197 -22
- package/dist/collection/components/side-panel/side-panel.types.js +1 -0
- package/dist/collection/interface.js +1 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-button.entry.js +1 -1
- package/dist/esm/limel-icon.entry.js +35 -1
- package/dist/esm/limel-side-panel.entry.js +67 -22
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-0f18981d.entry.js +1 -0
- package/dist/lime-elements/p-26813b2c.entry.js +1 -0
- package/dist/lime-elements/p-82c65f70.entry.js +1 -0
- package/dist/types/components/icon/icon.d.ts +11 -0
- package/dist/types/components/side-panel/side-panel.d.ts +89 -8
- package/dist/types/components/side-panel/side-panel.types.d.ts +83 -0
- package/dist/types/components.d.ts +235 -4
- package/dist/types/interface.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-06cd9512.entry.js +0 -1
- package/dist/lime-elements/p-566750e5.entry.js +0 -1
- package/dist/lime-elements/p-abcc451a.entry.js +0 -1
|
@@ -49,6 +49,7 @@ import { ContentType } from "./components/text-editor/prosemirror-adapter/editor
|
|
|
49
49
|
import { EditorImage, EditorMetadata, ImageInserter, InlineImages, TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types";
|
|
50
50
|
import { EditorUiType } from "./components/text-editor/types";
|
|
51
51
|
import { Option } from "./components/select/option.types";
|
|
52
|
+
import { SidePanelAction, SidePanelActionSelect, SidePanelEntry } from "./components/side-panel/side-panel.types";
|
|
52
53
|
import { SpinnerSize } from "./components/spinner/spinner.types";
|
|
53
54
|
import { Tab } from "./components/tab-bar/tab.types";
|
|
54
55
|
import { Column, ColumnAggregate, ColumnSorter, RowData, RowReorderEvent, TableParams } from "./components/table/table.types";
|
|
@@ -98,6 +99,7 @@ export { ContentType } from "./components/text-editor/prosemirror-adapter/editor
|
|
|
98
99
|
export { EditorImage, EditorMetadata, ImageInserter, InlineImages, TriggerCharacter, TriggerEventDetail } from "./components/text-editor/text-editor.types";
|
|
99
100
|
export { EditorUiType } from "./components/text-editor/types";
|
|
100
101
|
export { Option } from "./components/select/option.types";
|
|
102
|
+
export { SidePanelAction, SidePanelActionSelect, SidePanelEntry } from "./components/side-panel/side-panel.types";
|
|
101
103
|
export { SpinnerSize } from "./components/spinner/spinner.types";
|
|
102
104
|
export { Tab } from "./components/tab-bar/tab.types";
|
|
103
105
|
export { Column, ColumnAggregate, ColumnSorter, RowData, RowReorderEvent, TableParams } from "./components/table/table.types";
|
|
@@ -2119,6 +2121,11 @@ export namespace Components {
|
|
|
2119
2121
|
* :::
|
|
2120
2122
|
* The size and color of the icon is normally set in CSS, however there are a few
|
|
2121
2123
|
* standard sizes defined that can be used with the `size` property.
|
|
2124
|
+
* ## Accessibility
|
|
2125
|
+
* An icon with an `aria-label`, an `aria-labelledby` or a `title` is an image
|
|
2126
|
+
* for assistive technology, and that is its name. An icon with none of them is
|
|
2127
|
+
* decorative, and is hidden from assistive technology. To change that, set
|
|
2128
|
+
* `role` or `aria-hidden` on the icon yourself.
|
|
2122
2129
|
* @exampleComponent limel-example-icon-name
|
|
2123
2130
|
* @exampleComponent limel-example-icon-size
|
|
2124
2131
|
* @exampleComponent limel-example-icon-color
|
|
@@ -3605,7 +3612,7 @@ export namespace Components {
|
|
|
3605
3612
|
}
|
|
3606
3613
|
/**
|
|
3607
3614
|
* A resizable panel that is displayed on top of the right side of the page.
|
|
3608
|
-
* The content is placed in the default slot, below a toolbar
|
|
3615
|
+
* The content is placed in the default slot, below a toolbar and a header.
|
|
3609
3616
|
* The panel is positioned relative to its nearest positioned ancestor. Set
|
|
3610
3617
|
* `position: relative` on that element. Use `--side-panel-top-inset`,
|
|
3611
3618
|
* `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
|
|
@@ -3620,12 +3627,63 @@ export namespace Components {
|
|
|
3620
3627
|
* The user can resize the panel by dragging its left edge, or with the arrow
|
|
3621
3628
|
* keys. The panel emits `changeWidth` when a resize is finished.
|
|
3622
3629
|
* See the examples for how closing and resizing work in detail.
|
|
3630
|
+
* ## Header
|
|
3631
|
+
* The header shows the heading, subheading and icon of the last entry in
|
|
3632
|
+
* `stack`. When the entry has a `color`, the header gets that background color,
|
|
3633
|
+
* and the headings are white with a text shadow. When `stack` is empty, the
|
|
3634
|
+
* panel has no header.
|
|
3635
|
+
* Put controls for the header, for example a follow button or a menu, in the
|
|
3636
|
+
* `header-actions` slot. They are shown at the right end of the header. When
|
|
3637
|
+
* `stack` is empty, there is no header, and the slot content is not shown.
|
|
3638
|
+
* The slot is for small controls. It is at most half as wide as the header,
|
|
3639
|
+
* and at most as tall as the heading and subheading together. Larger content
|
|
3640
|
+
* is cut off, so that the header keeps its size.
|
|
3641
|
+
* The slot content is not tied to an entry in `stack`. When the last entry
|
|
3642
|
+
* changes, the consumer must also change the slot content.
|
|
3643
|
+
* The slot content keeps its own colors. Use `--side-panel-header-text-color`
|
|
3644
|
+
* to match the text color of the header. It is white when the header has a
|
|
3645
|
+
* `color`. It can also be used as the `color` of an `Icon`.
|
|
3646
|
+
* ## Actions
|
|
3647
|
+
* The toolbar has a close button on the left. Other buttons are set with
|
|
3648
|
+
* `actions`, and are shown on the right. The `type` of an action decides its
|
|
3649
|
+
* icon. When the user clicks an action, the panel emits `selectAction` with the
|
|
3650
|
+
* `id` of the action and the click event. The consumer decides what the action
|
|
3651
|
+
* does.
|
|
3652
|
+
* An action with an `href` is a link, so the user can open it in a new tab.
|
|
3653
|
+
* To handle the navigation in another way, for example with the router of the
|
|
3654
|
+
* application, call `preventDefault` on the click event in `selectAction`. Do
|
|
3655
|
+
* this only for a plain click with the primary button. Let the browser handle
|
|
3656
|
+
* all other clicks, so that Ctrl-click and Cmd-click still open the link in a
|
|
3657
|
+
* new tab:
|
|
3658
|
+
* ```ts
|
|
3659
|
+
* function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
|
|
3660
|
+
* const click = event.detail.event;
|
|
3661
|
+
* const isPlainClick =
|
|
3662
|
+
* click.button === 0 &&
|
|
3663
|
+
* !click.metaKey &&
|
|
3664
|
+
* !click.ctrlKey &&
|
|
3665
|
+
* !click.shiftKey &&
|
|
3666
|
+
* !click.altKey;
|
|
3667
|
+
* if (!isPlainClick) {
|
|
3668
|
+
* return;
|
|
3669
|
+
* }
|
|
3670
|
+
* click.preventDefault();
|
|
3671
|
+
* router.navigate(event.detail.id);
|
|
3672
|
+
* }
|
|
3673
|
+
* ```
|
|
3623
3674
|
* @exampleComponent limel-example-side-panel-basic
|
|
3624
3675
|
* @exampleComponent limel-example-side-panel-insets
|
|
3625
3676
|
* @exampleComponent limel-example-side-panel-escape
|
|
3677
|
+
* @exampleComponent limel-example-side-panel-actions
|
|
3678
|
+
* @exampleComponent limel-example-side-panel-header-actions
|
|
3626
3679
|
* @private
|
|
3627
3680
|
*/
|
|
3628
3681
|
interface LimelSidePanel {
|
|
3682
|
+
/**
|
|
3683
|
+
* Buttons in the toolbar, to the right of the close button.
|
|
3684
|
+
* @default []
|
|
3685
|
+
*/
|
|
3686
|
+
"actions": SidePanelAction[];
|
|
3629
3687
|
/**
|
|
3630
3688
|
* Label of the close button. Shown as a tooltip and used as the accessible name.
|
|
3631
3689
|
* @default 'Close'
|
|
@@ -3645,6 +3703,11 @@ export namespace Components {
|
|
|
3645
3703
|
* @default 'Resize'
|
|
3646
3704
|
*/
|
|
3647
3705
|
"resizeLabel": string;
|
|
3706
|
+
/**
|
|
3707
|
+
* The panels in the stack, outermost first. The last entry is the panel that is displayed. Its heading, subheading and icon are shown in the header.
|
|
3708
|
+
* @default []
|
|
3709
|
+
*/
|
|
3710
|
+
"stack": SidePanelEntry[];
|
|
3648
3711
|
}
|
|
3649
3712
|
/**
|
|
3650
3713
|
* @exampleComponent limel-example-slider-basic
|
|
@@ -5753,6 +5816,11 @@ declare global {
|
|
|
5753
5816
|
* :::
|
|
5754
5817
|
* The size and color of the icon is normally set in CSS, however there are a few
|
|
5755
5818
|
* standard sizes defined that can be used with the `size` property.
|
|
5819
|
+
* ## Accessibility
|
|
5820
|
+
* An icon with an `aria-label`, an `aria-labelledby` or a `title` is an image
|
|
5821
|
+
* for assistive technology, and that is its name. An icon with none of them is
|
|
5822
|
+
* decorative, and is hidden from assistive technology. To change that, set
|
|
5823
|
+
* `role` or `aria-hidden` on the icon yourself.
|
|
5756
5824
|
* @exampleComponent limel-example-icon-name
|
|
5757
5825
|
* @exampleComponent limel-example-icon-size
|
|
5758
5826
|
* @exampleComponent limel-example-icon-color
|
|
@@ -6590,11 +6658,12 @@ declare global {
|
|
|
6590
6658
|
};
|
|
6591
6659
|
interface HTMLLimelSidePanelElementEventMap {
|
|
6592
6660
|
"close": void;
|
|
6661
|
+
"selectAction": SidePanelActionSelect;
|
|
6593
6662
|
"changeWidth": number;
|
|
6594
6663
|
}
|
|
6595
6664
|
/**
|
|
6596
6665
|
* A resizable panel that is displayed on top of the right side of the page.
|
|
6597
|
-
* The content is placed in the default slot, below a toolbar
|
|
6666
|
+
* The content is placed in the default slot, below a toolbar and a header.
|
|
6598
6667
|
* The panel is positioned relative to its nearest positioned ancestor. Set
|
|
6599
6668
|
* `position: relative` on that element. Use `--side-panel-top-inset`,
|
|
6600
6669
|
* `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
|
|
@@ -6609,9 +6678,55 @@ declare global {
|
|
|
6609
6678
|
* The user can resize the panel by dragging its left edge, or with the arrow
|
|
6610
6679
|
* keys. The panel emits `changeWidth` when a resize is finished.
|
|
6611
6680
|
* See the examples for how closing and resizing work in detail.
|
|
6681
|
+
* ## Header
|
|
6682
|
+
* The header shows the heading, subheading and icon of the last entry in
|
|
6683
|
+
* `stack`. When the entry has a `color`, the header gets that background color,
|
|
6684
|
+
* and the headings are white with a text shadow. When `stack` is empty, the
|
|
6685
|
+
* panel has no header.
|
|
6686
|
+
* Put controls for the header, for example a follow button or a menu, in the
|
|
6687
|
+
* `header-actions` slot. They are shown at the right end of the header. When
|
|
6688
|
+
* `stack` is empty, there is no header, and the slot content is not shown.
|
|
6689
|
+
* The slot is for small controls. It is at most half as wide as the header,
|
|
6690
|
+
* and at most as tall as the heading and subheading together. Larger content
|
|
6691
|
+
* is cut off, so that the header keeps its size.
|
|
6692
|
+
* The slot content is not tied to an entry in `stack`. When the last entry
|
|
6693
|
+
* changes, the consumer must also change the slot content.
|
|
6694
|
+
* The slot content keeps its own colors. Use `--side-panel-header-text-color`
|
|
6695
|
+
* to match the text color of the header. It is white when the header has a
|
|
6696
|
+
* `color`. It can also be used as the `color` of an `Icon`.
|
|
6697
|
+
* ## Actions
|
|
6698
|
+
* The toolbar has a close button on the left. Other buttons are set with
|
|
6699
|
+
* `actions`, and are shown on the right. The `type` of an action decides its
|
|
6700
|
+
* icon. When the user clicks an action, the panel emits `selectAction` with the
|
|
6701
|
+
* `id` of the action and the click event. The consumer decides what the action
|
|
6702
|
+
* does.
|
|
6703
|
+
* An action with an `href` is a link, so the user can open it in a new tab.
|
|
6704
|
+
* To handle the navigation in another way, for example with the router of the
|
|
6705
|
+
* application, call `preventDefault` on the click event in `selectAction`. Do
|
|
6706
|
+
* this only for a plain click with the primary button. Let the browser handle
|
|
6707
|
+
* all other clicks, so that Ctrl-click and Cmd-click still open the link in a
|
|
6708
|
+
* new tab:
|
|
6709
|
+
* ```ts
|
|
6710
|
+
* function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
|
|
6711
|
+
* const click = event.detail.event;
|
|
6712
|
+
* const isPlainClick =
|
|
6713
|
+
* click.button === 0 &&
|
|
6714
|
+
* !click.metaKey &&
|
|
6715
|
+
* !click.ctrlKey &&
|
|
6716
|
+
* !click.shiftKey &&
|
|
6717
|
+
* !click.altKey;
|
|
6718
|
+
* if (!isPlainClick) {
|
|
6719
|
+
* return;
|
|
6720
|
+
* }
|
|
6721
|
+
* click.preventDefault();
|
|
6722
|
+
* router.navigate(event.detail.id);
|
|
6723
|
+
* }
|
|
6724
|
+
* ```
|
|
6612
6725
|
* @exampleComponent limel-example-side-panel-basic
|
|
6613
6726
|
* @exampleComponent limel-example-side-panel-insets
|
|
6614
6727
|
* @exampleComponent limel-example-side-panel-escape
|
|
6728
|
+
* @exampleComponent limel-example-side-panel-actions
|
|
6729
|
+
* @exampleComponent limel-example-side-panel-header-actions
|
|
6615
6730
|
* @private
|
|
6616
6731
|
*/
|
|
6617
6732
|
interface HTMLLimelSidePanelElement extends Components.LimelSidePanel, HTMLStencilElement {
|
|
@@ -9251,6 +9366,11 @@ declare namespace LocalJSX {
|
|
|
9251
9366
|
* :::
|
|
9252
9367
|
* The size and color of the icon is normally set in CSS, however there are a few
|
|
9253
9368
|
* standard sizes defined that can be used with the `size` property.
|
|
9369
|
+
* ## Accessibility
|
|
9370
|
+
* An icon with an `aria-label`, an `aria-labelledby` or a `title` is an image
|
|
9371
|
+
* for assistive technology, and that is its name. An icon with none of them is
|
|
9372
|
+
* decorative, and is hidden from assistive technology. To change that, set
|
|
9373
|
+
* `role` or `aria-hidden` on the icon yourself.
|
|
9254
9374
|
* @exampleComponent limel-example-icon-name
|
|
9255
9375
|
* @exampleComponent limel-example-icon-size
|
|
9256
9376
|
* @exampleComponent limel-example-icon-color
|
|
@@ -10818,7 +10938,7 @@ declare namespace LocalJSX {
|
|
|
10818
10938
|
}
|
|
10819
10939
|
/**
|
|
10820
10940
|
* A resizable panel that is displayed on top of the right side of the page.
|
|
10821
|
-
* The content is placed in the default slot, below a toolbar
|
|
10941
|
+
* The content is placed in the default slot, below a toolbar and a header.
|
|
10822
10942
|
* The panel is positioned relative to its nearest positioned ancestor. Set
|
|
10823
10943
|
* `position: relative` on that element. Use `--side-panel-top-inset`,
|
|
10824
10944
|
* `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
|
|
@@ -10833,12 +10953,63 @@ declare namespace LocalJSX {
|
|
|
10833
10953
|
* The user can resize the panel by dragging its left edge, or with the arrow
|
|
10834
10954
|
* keys. The panel emits `changeWidth` when a resize is finished.
|
|
10835
10955
|
* See the examples for how closing and resizing work in detail.
|
|
10956
|
+
* ## Header
|
|
10957
|
+
* The header shows the heading, subheading and icon of the last entry in
|
|
10958
|
+
* `stack`. When the entry has a `color`, the header gets that background color,
|
|
10959
|
+
* and the headings are white with a text shadow. When `stack` is empty, the
|
|
10960
|
+
* panel has no header.
|
|
10961
|
+
* Put controls for the header, for example a follow button or a menu, in the
|
|
10962
|
+
* `header-actions` slot. They are shown at the right end of the header. When
|
|
10963
|
+
* `stack` is empty, there is no header, and the slot content is not shown.
|
|
10964
|
+
* The slot is for small controls. It is at most half as wide as the header,
|
|
10965
|
+
* and at most as tall as the heading and subheading together. Larger content
|
|
10966
|
+
* is cut off, so that the header keeps its size.
|
|
10967
|
+
* The slot content is not tied to an entry in `stack`. When the last entry
|
|
10968
|
+
* changes, the consumer must also change the slot content.
|
|
10969
|
+
* The slot content keeps its own colors. Use `--side-panel-header-text-color`
|
|
10970
|
+
* to match the text color of the header. It is white when the header has a
|
|
10971
|
+
* `color`. It can also be used as the `color` of an `Icon`.
|
|
10972
|
+
* ## Actions
|
|
10973
|
+
* The toolbar has a close button on the left. Other buttons are set with
|
|
10974
|
+
* `actions`, and are shown on the right. The `type` of an action decides its
|
|
10975
|
+
* icon. When the user clicks an action, the panel emits `selectAction` with the
|
|
10976
|
+
* `id` of the action and the click event. The consumer decides what the action
|
|
10977
|
+
* does.
|
|
10978
|
+
* An action with an `href` is a link, so the user can open it in a new tab.
|
|
10979
|
+
* To handle the navigation in another way, for example with the router of the
|
|
10980
|
+
* application, call `preventDefault` on the click event in `selectAction`. Do
|
|
10981
|
+
* this only for a plain click with the primary button. Let the browser handle
|
|
10982
|
+
* all other clicks, so that Ctrl-click and Cmd-click still open the link in a
|
|
10983
|
+
* new tab:
|
|
10984
|
+
* ```ts
|
|
10985
|
+
* function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
|
|
10986
|
+
* const click = event.detail.event;
|
|
10987
|
+
* const isPlainClick =
|
|
10988
|
+
* click.button === 0 &&
|
|
10989
|
+
* !click.metaKey &&
|
|
10990
|
+
* !click.ctrlKey &&
|
|
10991
|
+
* !click.shiftKey &&
|
|
10992
|
+
* !click.altKey;
|
|
10993
|
+
* if (!isPlainClick) {
|
|
10994
|
+
* return;
|
|
10995
|
+
* }
|
|
10996
|
+
* click.preventDefault();
|
|
10997
|
+
* router.navigate(event.detail.id);
|
|
10998
|
+
* }
|
|
10999
|
+
* ```
|
|
10836
11000
|
* @exampleComponent limel-example-side-panel-basic
|
|
10837
11001
|
* @exampleComponent limel-example-side-panel-insets
|
|
10838
11002
|
* @exampleComponent limel-example-side-panel-escape
|
|
11003
|
+
* @exampleComponent limel-example-side-panel-actions
|
|
11004
|
+
* @exampleComponent limel-example-side-panel-header-actions
|
|
10839
11005
|
* @private
|
|
10840
11006
|
*/
|
|
10841
11007
|
interface LimelSidePanel {
|
|
11008
|
+
/**
|
|
11009
|
+
* Buttons in the toolbar, to the right of the close button.
|
|
11010
|
+
* @default []
|
|
11011
|
+
*/
|
|
11012
|
+
"actions"?: SidePanelAction[];
|
|
10842
11013
|
/**
|
|
10843
11014
|
* Label of the close button. Shown as a tooltip and used as the accessible name.
|
|
10844
11015
|
* @default 'Close'
|
|
@@ -10861,11 +11032,20 @@ declare namespace LocalJSX {
|
|
|
10861
11032
|
* Emitted when the close button is clicked, or when Escape is pressed and `closeOnEscape` is `true`.
|
|
10862
11033
|
*/
|
|
10863
11034
|
"onClose"?: (event: LimelSidePanelCustomEvent<void>) => void;
|
|
11035
|
+
/**
|
|
11036
|
+
* Emitted when an action in the toolbar is clicked. The detail has the `id` of the action, or its `type` if it has no `id`, and the click event.
|
|
11037
|
+
*/
|
|
11038
|
+
"onSelectAction"?: (event: LimelSidePanelCustomEvent<SidePanelActionSelect>) => void;
|
|
10864
11039
|
/**
|
|
10865
11040
|
* Label of the resize handle. Used as the accessible name.
|
|
10866
11041
|
* @default 'Resize'
|
|
10867
11042
|
*/
|
|
10868
11043
|
"resizeLabel"?: string;
|
|
11044
|
+
/**
|
|
11045
|
+
* The panels in the stack, outermost first. The last entry is the panel that is displayed. Its heading, subheading and icon are shown in the header.
|
|
11046
|
+
* @default []
|
|
11047
|
+
*/
|
|
11048
|
+
"stack"?: SidePanelEntry[];
|
|
10869
11049
|
}
|
|
10870
11050
|
/**
|
|
10871
11051
|
* @exampleComponent limel-example-slider-basic
|
|
@@ -13097,6 +13277,11 @@ declare module "@stencil/core" {
|
|
|
13097
13277
|
* :::
|
|
13098
13278
|
* The size and color of the icon is normally set in CSS, however there are a few
|
|
13099
13279
|
* standard sizes defined that can be used with the `size` property.
|
|
13280
|
+
* ## Accessibility
|
|
13281
|
+
* An icon with an `aria-label`, an `aria-labelledby` or a `title` is an image
|
|
13282
|
+
* for assistive technology, and that is its name. An icon with none of them is
|
|
13283
|
+
* decorative, and is hidden from assistive technology. To change that, set
|
|
13284
|
+
* `role` or `aria-hidden` on the icon yourself.
|
|
13100
13285
|
* @exampleComponent limel-example-icon-name
|
|
13101
13286
|
* @exampleComponent limel-example-icon-size
|
|
13102
13287
|
* @exampleComponent limel-example-icon-color
|
|
@@ -13595,7 +13780,7 @@ declare module "@stencil/core" {
|
|
|
13595
13780
|
"limel-shortcut": LocalJSX.IntrinsicElements["limel-shortcut"] & JSXBase.HTMLAttributes<HTMLLimelShortcutElement>;
|
|
13596
13781
|
/**
|
|
13597
13782
|
* A resizable panel that is displayed on top of the right side of the page.
|
|
13598
|
-
* The content is placed in the default slot, below a toolbar
|
|
13783
|
+
* The content is placed in the default slot, below a toolbar and a header.
|
|
13599
13784
|
* The panel is positioned relative to its nearest positioned ancestor. Set
|
|
13600
13785
|
* `position: relative` on that element. Use `--side-panel-top-inset`,
|
|
13601
13786
|
* `--side-panel-right-inset` and `--side-panel-bottom-inset` to keep parts of
|
|
@@ -13610,9 +13795,55 @@ declare module "@stencil/core" {
|
|
|
13610
13795
|
* The user can resize the panel by dragging its left edge, or with the arrow
|
|
13611
13796
|
* keys. The panel emits `changeWidth` when a resize is finished.
|
|
13612
13797
|
* See the examples for how closing and resizing work in detail.
|
|
13798
|
+
* ## Header
|
|
13799
|
+
* The header shows the heading, subheading and icon of the last entry in
|
|
13800
|
+
* `stack`. When the entry has a `color`, the header gets that background color,
|
|
13801
|
+
* and the headings are white with a text shadow. When `stack` is empty, the
|
|
13802
|
+
* panel has no header.
|
|
13803
|
+
* Put controls for the header, for example a follow button or a menu, in the
|
|
13804
|
+
* `header-actions` slot. They are shown at the right end of the header. When
|
|
13805
|
+
* `stack` is empty, there is no header, and the slot content is not shown.
|
|
13806
|
+
* The slot is for small controls. It is at most half as wide as the header,
|
|
13807
|
+
* and at most as tall as the heading and subheading together. Larger content
|
|
13808
|
+
* is cut off, so that the header keeps its size.
|
|
13809
|
+
* The slot content is not tied to an entry in `stack`. When the last entry
|
|
13810
|
+
* changes, the consumer must also change the slot content.
|
|
13811
|
+
* The slot content keeps its own colors. Use `--side-panel-header-text-color`
|
|
13812
|
+
* to match the text color of the header. It is white when the header has a
|
|
13813
|
+
* `color`. It can also be used as the `color` of an `Icon`.
|
|
13814
|
+
* ## Actions
|
|
13815
|
+
* The toolbar has a close button on the left. Other buttons are set with
|
|
13816
|
+
* `actions`, and are shown on the right. The `type` of an action decides its
|
|
13817
|
+
* icon. When the user clicks an action, the panel emits `selectAction` with the
|
|
13818
|
+
* `id` of the action and the click event. The consumer decides what the action
|
|
13819
|
+
* does.
|
|
13820
|
+
* An action with an `href` is a link, so the user can open it in a new tab.
|
|
13821
|
+
* To handle the navigation in another way, for example with the router of the
|
|
13822
|
+
* application, call `preventDefault` on the click event in `selectAction`. Do
|
|
13823
|
+
* this only for a plain click with the primary button. Let the browser handle
|
|
13824
|
+
* all other clicks, so that Ctrl-click and Cmd-click still open the link in a
|
|
13825
|
+
* new tab:
|
|
13826
|
+
* ```ts
|
|
13827
|
+
* function handleSelectAction(event: CustomEvent<SidePanelActionSelect>) {
|
|
13828
|
+
* const click = event.detail.event;
|
|
13829
|
+
* const isPlainClick =
|
|
13830
|
+
* click.button === 0 &&
|
|
13831
|
+
* !click.metaKey &&
|
|
13832
|
+
* !click.ctrlKey &&
|
|
13833
|
+
* !click.shiftKey &&
|
|
13834
|
+
* !click.altKey;
|
|
13835
|
+
* if (!isPlainClick) {
|
|
13836
|
+
* return;
|
|
13837
|
+
* }
|
|
13838
|
+
* click.preventDefault();
|
|
13839
|
+
* router.navigate(event.detail.id);
|
|
13840
|
+
* }
|
|
13841
|
+
* ```
|
|
13613
13842
|
* @exampleComponent limel-example-side-panel-basic
|
|
13614
13843
|
* @exampleComponent limel-example-side-panel-insets
|
|
13615
13844
|
* @exampleComponent limel-example-side-panel-escape
|
|
13845
|
+
* @exampleComponent limel-example-side-panel-actions
|
|
13846
|
+
* @exampleComponent limel-example-side-panel-header-actions
|
|
13616
13847
|
* @private
|
|
13617
13848
|
*/
|
|
13618
13849
|
"limel-side-panel": LocalJSX.IntrinsicElements["limel-side-panel"] & JSXBase.HTMLAttributes<HTMLLimelSidePanelElement>;
|
|
@@ -35,6 +35,7 @@ export * from './components/picker/searcher.types';
|
|
|
35
35
|
export * from './components/picker/value.types';
|
|
36
36
|
export * from './components/progress-flow/progress-flow.types';
|
|
37
37
|
export * from './components/select/option.types';
|
|
38
|
+
export * from './components/side-panel/side-panel.types';
|
|
38
39
|
export * from './components/spinner/spinner.types';
|
|
39
40
|
export * from './components/tab-bar/tab.types';
|
|
40
41
|
export * from './components/tab-panel/tab-panel.types';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,a as s}from"./p-BU9IJqli.js";import{g as r}from"./p-Dnt5w_Bp.js";class e{constructor(t){this.promises={},this.cache=t}async get(t,i=""){const s=await this.cache,r=this.getUrl(t,i);let e=await s.match(r);return e||(e=await this.fetchData(r,s)),this.getIcon(e)}async fetchData(t,i){let s=this.promises[t];return void 0===s&&(s=i.add(t),this.promises[t]=s),await s,i.match(t)}async getIcon(t){let i=await t.text();if(i=i.replaceAll("#000000","currentColor"),!this.validSvg(i))throw new Error("Invalid SVG");return i}validSvg(t){return"svg"===(new DOMParser).parseFromString(t,"image/svg+xml").documentElement.tagName.toLowerCase()}getUrl(t,i){let s=i||"";return i&&!i.endsWith("/")&&(s=`${i}/`),`${s}assets/icons/${t}.svg`}}class n{constructor(){this.cache={},this.resolveFunctions={}}async get(t,i=""){return this.cache[t]||(this.cache[t]=await this.getIcon(t,i)),this.cache[t]}getIcon(t,i){return new Promise((s=>{this.resolveFunctions[t]||(this.resolveFunctions[t]=[],this.fetchData(t,i)),this.resolveFunctions[t].push(s)}))}async fetchData(t,i){let s=i||"";i&&!i.endsWith("/")&&(s=`${i}/`);const r=await fetch(`${s}assets/icons/${t}.svg`);let e=await r.text();if(e=e.replaceAll("#000000","currentColor"),!this.validSvg(e))throw new Error("Invalid SVG");this.resolvePromises(t,e)}validSvg(t){return"svg"===(new DOMParser).parseFromString(t,"image/svg+xml").documentElement.tagName.toLowerCase()}resolvePromises(t,i){const s=this.resolveFunctions[t];for(const t of s)t(i);this.resolveFunctions[t]=null}}const a=function(){try{const t=caches.open("@limetech/lime-elements/icons");return new e(t)}catch(t){return new n}}(),o=class{constructor(i){t(this,i)}componentDidLoad(){this.loadIcon(this.name)}render(){return i("div",{key:"6d01432082e0272137562dd22ab309b75ce95504",class:"container"})}async loadIcon(t){if(void 0===t||""===t)return;const i=await this.loadSvg(t);this.renderSvg(i)}loadSvg(t){return a.get(t,r.iconPath)}renderSvg(t){const i=this.host.shadowRoot.querySelector("div.container");i&&(i.innerHTML=t,void 0!==this.svgClass&&this.applySvgClass(this.svgClass))}applySvgClass(t){var i;const s=null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector("svg");s&&(void 0===t?s.removeAttribute("class"):s.setAttribute("class",t))}get host(){return s(this)}static get watchers(){return{name:[{loadIcon:0}],svgClass:[{applySvgClass:0}]}}};o.style=":host{background-color:var(--icon-background-color, transparent);border-radius:50%;display:inline-block;line-height:0;box-sizing:border-box}:host svg{fill:currentColor;height:100%;pointer-events:none;width:100%}:host div{margin:var(--limel-icon-svg-margin, 0)}:host([hidden]){display:none}:host([size=x-small]){height:1rem !important;width:1rem !important}:host([size=small]){height:1.25rem !important;width:1.25rem !important}:host([size=medium]){height:1.5rem !important;width:1.5rem !important}:host([size=large]){height:1.75rem !important;width:1.75rem !important}:host([badge][size=x-small]){height:1.5rem !important;width:1.5rem !important;--limel-icon-svg-margin:0.25rem}:host([badge][size=small]){height:1.75rem !important;width:1.75rem !important;--limel-icon-svg-margin:0.25rem}:host([badge][size=medium]){height:2.5rem !important;width:2.5rem !important;--limel-icon-svg-margin:0.5rem}:host([badge][size=large]){height:2.75rem !important;width:2.75rem !important;--limel-icon-svg-margin:0.5rem}";export{o as limel_icon}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,H as s,a as o}from"./p-BU9IJqli.js";import{E as r}from"./p-Bu6-QXrA.js";import{c as a}from"./p-BrjD-ITe.js";const n=[];function l(e){e.stopPropagation()}const d=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.changeWidth=i(this,"changeWidth",7),this.closeLabel="Close",this.resizeLabel="Resize",this.closeOnEscape=!0,this.closeButtonId=a(),this.setBody=e=>{this.body=e,this.stopContentEventsInBody()},this.restoreFocus=()=>{const e=!document.activeElement||document.activeElement===document.body;if(this.host.isConnected||!e)return;const i=this.focusedBefore;this.focusedBefore=void 0,(null==i?void 0:i.isConnected)&&i.focus()},this.setPanel=e=>{this.panel=e},this.setMinLimit=e=>{this.minLimit=e},this.setMaxLimit=e=>{this.maxLimit=e},this.handleKeyDown=e=>{this.closeOnEscape&&e.key===r&&!e.defaultPrevented&&this.isLastOpened()&&(e.preventDefault(),this.close.emit())},this.handleChangeSize=e=>{this.rememberWidthBeforeResize(),this.setWidth(e.detail)},this.handleEndResize=()=>{if(!this.isResizing())return;const e=this.widthBeforeResize;this.widthBeforeResize=void 0,this.keepClampedWidth(),this.updateWidthRange(),this.emitWidthIfChanged(e)},this.handleSizeChange=e=>{e.every(this.isMeasured)||this.updateWidthRange()},this.isMeasured=e=>{var i;return e.target===this.panel&&Math.round(e.borderBoxSize[0].inlineSize)===(null===(i=this.widthRange)||void 0===i?void 0:i.now)},this.updateWidthRange=()=>{this.isResizing()||(this.widthRange=this.measureWidthRange())},this.handleClickClose=()=>{this.close.emit()}}connectedCallback(){n.push(this),window.addEventListener("keydown",this.handleKeyDown),this.rememberFocusedElement(),this.observeWidth()}componentDidLoad(){this.observeWidth(),this.moveFocusIntoPanel()}disconnectedCallback(){this.widthBeforeResize=void 0,this.stopObservingWidth(),window.removeEventListener("keydown",this.handleKeyDown),this.removeFromOpenPanels(),queueMicrotask(this.restoreFocus)}render(){return t(s,{key:"1c18f40fb45731bdf157d651d4e649446de5230b"},t("section",{key:"e8b41bded39732750ae3db9b1daf14dc742e1cb7",ref:this.setPanel,role:"dialog","aria-label":this.label,tabindex:"-1"},this.renderHandle(),t("div",{key:"3cba5523e0cbe45fa328daaa40136c063a8c3ac3",class:"content"},t("div",{key:"b5cbc1260b4e6f31ac789179ab4b5a0281b9133b",class:"toolbar"},this.renderCloseButton()),this.renderBody())),t("span",{key:"5fe872f05a6cc49027f84d71a765baa59a53adb9","data-limit":"min",ref:this.setMinLimit}),t("span",{key:"5042e7437e61ae5308e13b1a30f5df24747e2cdf","data-limit":"max",ref:this.setMaxLimit}))}renderCloseButton(){return t("button",{class:"close",id:this.closeButtonId,"aria-label":this.closeLabel,onClick:this.handleClickClose},t("limel-icon",{name:"multiply","aria-hidden":"true"}),t("limel-tooltip",{elementId:this.closeButtonId,label:this.closeLabel}))}renderHandle(){var e,i,s;return t("limel-resize-handle",{class:"handle",label:this.resizeLabel,value:null===(e=this.widthRange)||void 0===e?void 0:e.now,min:null===(i=this.widthRange)||void 0===i?void 0:i.min,max:null===(s=this.widthRange)||void 0===s?void 0:s.max,onChangeSize:this.handleChangeSize,onEndResize:this.handleEndResize})}renderBody(){return t("div",{class:"body",ref:this.setBody},t("slot",null))}stopContentEventsInBody(){var e,i;null===(e=this.body)||void 0===e||e.addEventListener("close",l),null===(i=this.body)||void 0===i||i.addEventListener("changeWidth",l)}stopContentEventAtHost(e){e.target!==this.host&&e.stopImmediatePropagation()}moveFocusIntoPanel(){this.panel.focus({preventScroll:!0})}rememberFocusedElement(){const e=function(){var e;let i=document.activeElement;for(;null===(e=null==i?void 0:i.shadowRoot)||void 0===e?void 0:e.activeElement;)i=i.shadowRoot.activeElement;return i}();e&&e!==document.body&&(this.focusedBefore=e)}removeFromOpenPanels(){const e=n.indexOf(this);-1!==e&&n.splice(e,1)}isLastOpened(){return n.at(-1)===this}setWidth(e){this.panel.style.width=`${e}px`}rememberWidthBeforeResize(){this.isResizing()||(this.widthBeforeResize=this.currentWidth())}isResizing(){return void 0!==this.widthBeforeResize}keepClampedWidth(){this.setWidth(this.currentWidth())}emitWidthIfChanged(e){const i=this.currentWidth();i!==e&&this.changeWidth.emit(i)}observeWidth(){if(this.stopObservingWidth(),this.panel){this.widthObserver=new ResizeObserver(this.handleSizeChange);for(const e of[this.panel,this.minLimit,this.maxLimit])e&&this.widthObserver.observe(e)}}stopObservingWidth(){var e;null===(e=this.widthObserver)||void 0===e||e.disconnect(),this.widthObserver=void 0}measureWidthRange(){const e=this.minLimit.offsetWidth,i=Math.max(e,this.maxLimit.offsetWidth);return{now:Math.round(this.currentWidth()),min:Math.round(e),max:Math.round(i)}}currentWidth(){return this.panel.offsetWidth}get host(){return o(this)}};d.style='@charset "UTF-8";:host(limel-side-panel){--_side-panel-width:var(--side-panel-width, 37.5rem);--_side-panel-min-width:var(--side-panel-min-width, 25rem);--_side-panel-top-inset:var(--side-panel-top-inset, 0px);--_side-panel-right-inset:var(--side-panel-right-inset, 0px);--_side-panel-bottom-inset:var(--side-panel-bottom-inset, 0px);--_side-panel-z-index:var(--side-panel-z-index, 6)}@keyframes show-side-panel{0%{transform:translate3d(12.5rem, 0, 0) scale(0.95);opacity:0}60%{opacity:1}100%{transform:translate3d(0, 0, 0) scale(1)}}section{position:absolute;z-index:var(--_side-panel-z-index);top:var(--_side-panel-top-inset);right:var(--_side-panel-right-inset);bottom:var(--_side-panel-bottom-inset);margin:0.5rem;display:flex;flex-direction:column;isolation:isolate;width:var(--_side-panel-width);min-width:min(var(--_side-panel-min-width), 100% - 1rem);max-width:min(100% - 1rem - 3rem, 60%);max-height:100%;border-radius:1rem;box-shadow:var(--shadow-depth-64);transform-origin:left center;transition:background-color 0.5s ease, transform 0.3s ease, opacity 0.2s ease, right 0.2s ease;animation:show-side-panel 0.46s cubic-bezier(0.08, 0.54, 0.06, 1.11) forwards}section:focus{outline:none}@media (prefers-reduced-motion){section{animation:none;transition:none}}.content{display:flex;flex-direction:column;flex-grow:1;min-height:0;overflow:hidden;border-radius:1rem;background-color:rgb(var(--contrast-100))}.toolbar{flex-shrink:0;display:flex;align-items:center;gap:0.25rem;box-sizing:border-box;min-height:2.375rem;padding:0.25rem 0.125rem;background-color:rgb(var(--contrast-300))}.close{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.close:hover,.close:focus,.close:focus-visible{will-change:color, background-color, box-shadow, transform}.close:hover,.close:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.close:hover{box-shadow:var(--button-shadow-hovered)}.close:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.close:hover,.close:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.close:focus{outline:none}.close:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.close{isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;border-radius:50%}.close limel-icon{width:1.25rem;transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{content:"";position:absolute;z-index:-1;inset:0;border-radius:50%;opacity:0;transition-delay:0.1s}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.body{flex-grow:1;min-height:0;display:flex;flex-direction:column;overflow:hidden auto}.handle{position:absolute;z-index:1;top:calc(2.375rem + 0.5rem);bottom:1rem;left:calc(0.5rem / -2);width:0.5rem}[data-limit]{position:absolute;visibility:hidden;pointer-events:none;height:0}[data-limit=min]{width:min(var(--_side-panel-min-width), 100% - 1rem)}[data-limit=max]{width:min(100% - 1rem - 3rem, 60%)}';export{d as limel_side_panel}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as o,a as i}from"./p-BU9IJqli.js";import{m as a,r}from"./p-CIf8aGSd.js";import{d as n,g as s}from"./p-CgNJbSP4.js";const l=class{constructor(t){e(this,t),this.primary=!1,this.outlined=!1,this.disabled=!1,this.loading=!1,this.loadingFailed=!1,this.justLoaded=!1,this.filterClickWhenDisabled=e=>{this.disabled&&e.preventDefault()}}componentWillLoad(){a(this.host)}disconnectedCallback(){r(this.host)}render(){return t(o,{key:"0c29dc9e776e7f8847c3c2b72c901f4c48614fe7",onClick:this.filterClickWhenDisabled},t("button",{key:"4b4ce07c60d70ee0586ede555a354f44a8c28502",class:{loading:this.loading,"just-loaded":this.justLoaded&&!this.loadingFailed,"just-failed":this.justLoaded&&this.loadingFailed,outlined:this.outlined},disabled:this.disabled||this.loading,"aria-busy":this.loading?"true":"false","aria-live":"polite"},this.renderIcon(this.icon),this.renderLabel(),this.renderSpinner(),t("svg",{key:"ec49bd0ef8920fd33b6db0d5e7b1569f756c5eeb",viewBox:"0 0 30 30"},this.renderLoadingIcons())))}loadingWatcher(e,t){this.hasFinishedLoading(e,t)?this.handleLoadingFinished():e&&this.handleLoadingStarted()}hasFinishedLoading(e,t){return t&&!e}handleLoadingFinished(){this.justLoaded=!0,this.justLoadedTimeout=window.setTimeout((()=>{this.justLoaded=!1}),2e3)}handleLoadingStarted(){this.justLoaded=!1,window.clearTimeout(this.justLoadedTimeout)}renderLoadingIcons(){return this.loadingFailed?[t("line",{x1:"9",y1:"9",x2:"21",y2:"21"}),t("line",{x1:"21",y1:"9",x2:"9",y2:"21"})]:[t("line",{x1:"8",y1:"14",x2:"15",y2:"20"}),t("line",{x1:"23",y1:"9",x2:"14",y2:"20"})]}renderIcon(e){const o=s(e);if(!o)return;const i=n(e);let a;return this.label||i||console.warn("⚠️ Accessibility warning: `limel-button` has no `label` and its `icon` has no `title`. This creates an inaccessible button for screen reader users. Please add either a `label`, a `title` to the `icon`, or use a `limel-tooltip`. See https://lundalogik.github.io/lime-elements/versions/latest/#/component/limel-button/ for more information."),"object"==typeof e&&(a=e.color),t("limel-icon",Object.assign({},{role:"presentation",name:o,"aria-label":i,"aria-hidden":i?null:"true",style:{color:a}}))}renderLabel(){if(this.label)return t("span",{class:"label"},this.label)}renderSpinner(){if(this.loading)return t("limel-spinner",{limeBranded:!1})}static get delegatesFocus(){return!0}get host(){return i(this)}static get watchers(){return{loading:[{loadingWatcher:0}]}}};l.style='@charset "UTF-8";@keyframes reduced-presence{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.7)}}:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded){animation:reduced-presence 0.3s ease forwards;transition:padding 0.3s ease, min-width 0.3s ease;transition-delay:0.3s;padding:0;min-width:0}:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) .label{transition:font-size 0.8s ease;transition-delay:0.3s;font-size:0;opacity:0}:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) limel-icon,:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) limel-spinner,:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) svg,:host(.has-reduced-presence) button[disabled]:not(.loading):not(.just-loaded) .icon{transition:all 0.3s ease;transition-delay:0.3s;opacity:0;width:0;height:0}:host{display:inline-block}:host([hidden]){display:none}:host([aria-expanded=true]) button,:host([aria-expanded]:not([aria-expanded=false])) button{box-shadow:var(--button-shadow-inset-pressed) !important}button.mdc-button{font-family:inherit}button{--_primary-color:var( --lime-primary-color, var(--limel-theme-primary-color) );display:flex;align-items:center;justify-content:center;gap:0.125rem;border:none;border-radius:0.4rem;padding-top:0;padding-right:var(--button-padding-right, 0.5rem);padding-bottom:0;padding-left:var(--button-padding-left, 0.5rem);min-height:2.25rem;width:100%}button:not(:disabled){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}button:not(:disabled):hover,button:not(:disabled):focus,button:not(:disabled):focus-visible{will-change:color, background-color, box-shadow, transform}button:not(:disabled):hover,button:not(:disabled):focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button:not(:disabled):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button:not(:disabled):hover,button:not(:disabled):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button:not(:disabled):focus{outline:none}button:not(:disabled):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button:disabled{cursor:not-allowed}:host(limel-button[primary]) button:not(:disabled){color:var(--lime-on-primary-color, var(--limel-theme-on-primary-color));background-color:var(--_primary-color)}:host(limel-button[primary]) button:disabled{background-color:color-mix(in srgb, var(--_primary-color), transparent 80%)}:host(limel-button:not([primary])) button:not(:disabled){color:var(--_primary-color)}:host(limel-button:not([primary])) button:disabled.outlined{color:color-mix(in srgb, var(--_primary-color), transparent 60%);border-color:color-mix(in srgb, var(--_primary-color), transparent 70%)}:host(limel-button:not([primary])) button:disabled:not(.outlined){color:rgba(var(--contrast-1100), 0.37);background-color:rgba(var(--contrast-900), 0.1)}.label{font-size:var(--limel-theme-default-font-size);font-weight:600;letter-spacing:0.03125rem;padding:0 0.25rem}limel-spinner{position:absolute}limel-icon{width:1.25rem;flex-shrink:0;vertical-align:top}svg{height:1.875rem;opacity:0;pointer-events:none;position:absolute;width:1.875rem}svg line{stroke:rgb(var(--contrast-600));stroke-width:2}limel-icon,.label,limel-spinner,svg{transition:opacity 300ms ease-in-out}.loading limel-icon,.loading .label{opacity:0}.loading limel-spinner{opacity:1}.just-loaded limel-icon,.just-loaded .label,.just-failed limel-icon,.just-failed .label{opacity:0}.just-loaded svg,.just-failed svg{opacity:1}.just-failed{background-color:var(--limel-theme-error-color) !important;animation:shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both}.outlined{border:1px solid;border-color:var(--_primary-color)}@keyframes shake{10%,90%{transform:translate3d(-0.0625rem, 0, 0)}20%,80%{transform:translate3d(0.125rem, 0, 0)}30%,50%,70%{transform:translate3d(-0.1875rem, 0, 0)}40%,60%{transform:translate3d(0.1875rem, 0, 0)}}';export{l as limel_button}
|