@tylertech/forge 2.18.1 → 2.19.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/custom-elements.json +1523 -310
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/button-area/index.js +7 -0
- package/dist/esm/button-area/index.js.map +7 -0
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.KCC3C3WH.js → chunk.2EAQ36QO.js} +2 -2
- package/dist/esm/chunks/{chunk.3DYMGITQ.js → chunk.3NHRJPT4.js} +2 -2
- package/dist/esm/chunks/{chunk.ETJMASRZ.js → chunk.AD4NVLFA.js} +2 -2
- package/dist/esm/chunks/chunk.AHDIUCUB.js +7 -0
- package/dist/esm/chunks/chunk.AHDIUCUB.js.map +7 -0
- package/dist/esm/chunks/{chunk.Z4HBPQ42.js → chunk.BJRQ67AD.js} +2 -2
- package/dist/esm/chunks/chunk.DBKVUCUQ.js +7 -0
- package/dist/esm/chunks/chunk.DBKVUCUQ.js.map +7 -0
- package/dist/esm/chunks/{chunk.J2FXLTZT.js → chunk.IASYHPZ4.js} +2 -2
- package/dist/esm/chunks/{chunk.J2FXLTZT.js.map → chunk.IASYHPZ4.js.map} +1 -1
- package/dist/esm/chunks/{chunk.7LX3X2DU.js → chunk.JMRXBELV.js} +2 -2
- package/dist/esm/chunks/{chunk.F7ZYEFH5.js → chunk.K55FBLTW.js} +2 -2
- package/dist/esm/chunks/chunk.P4VJUJQN.js +7 -0
- package/dist/esm/chunks/{chunk.K4SWLH26.js.map → chunk.P4VJUJQN.js.map} +3 -3
- package/dist/esm/chunks/{chunk.2NA4LVTZ.js → chunk.P67RC5S3.js} +2 -2
- package/dist/esm/chunks/chunk.PAH2OIYV.js +12 -0
- package/dist/esm/chunks/chunk.PAH2OIYV.js.map +7 -0
- package/dist/esm/chunks/chunk.PBWUHK7Q.js +7 -0
- package/dist/esm/chunks/chunk.PBWUHK7Q.js.map +7 -0
- package/dist/esm/chunks/{chunk.55HRCXPA.js → chunk.PILDKQOE.js} +2 -2
- package/dist/esm/chunks/chunk.RH4E52PS.js +7 -0
- package/dist/esm/chunks/chunk.RH4E52PS.js.map +7 -0
- package/dist/esm/chunks/{chunk.GBUXAJPY.js → chunk.ROWBKHIO.js} +2 -2
- package/dist/esm/chunks/{chunk.AMES2WWC.js → chunk.XAPKK4ZJ.js} +2 -2
- package/dist/esm/chunks/{chunk.NOXJK2U7.js → chunk.ZDTJPNFM.js} +2 -2
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-label/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/esm/button-area/button-area-adapter.d.ts +45 -0
- package/esm/button-area/button-area-adapter.js +106 -0
- package/esm/button-area/button-area-constants.d.ts +24 -0
- package/esm/button-area/button-area-constants.js +30 -0
- package/esm/button-area/button-area-foundation.d.ts +29 -0
- package/esm/button-area/button-area-foundation.js +93 -0
- package/esm/button-area/button-area.d.ts +29 -0
- package/esm/button-area/button-area.js +55 -0
- package/esm/button-area/index.d.ts +10 -0
- package/esm/button-area/index.js +14 -0
- package/esm/expansion-panel/expansion-panel-adapter.d.ts +1 -0
- package/esm/expansion-panel/expansion-panel-adapter.js +7 -2
- package/esm/field/field-foundation.d.ts +1 -0
- package/esm/field/field-foundation.js +17 -7
- package/esm/floating-label/floating-label-foundation.d.ts +4 -1
- package/esm/floating-label/floating-label-foundation.js +9 -6
- package/esm/floating-label/floating-label.d.ts +6 -2
- package/esm/floating-label/floating-label.js +2 -2
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -0
- package/esm/paginator/paginator-adapter.d.ts +27 -25
- package/esm/paginator/paginator-adapter.js +4 -6
- package/esm/paginator/paginator-foundation.d.ts +33 -80
- package/esm/paginator/paginator-foundation.js +218 -255
- package/esm/paginator/paginator.d.ts +0 -2
- package/esm/paginator/paginator.js +0 -2
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +1 -1
- package/styles/button-area/_mixins.scss +47 -0
- package/styles/button-area/button-area.scss +16 -0
- package/dist/esm/chunks/chunk.7G53ACL4.js +0 -7
- package/dist/esm/chunks/chunk.7G53ACL4.js.map +0 -7
- package/dist/esm/chunks/chunk.AMWDVFAU.js +0 -7
- package/dist/esm/chunks/chunk.AMWDVFAU.js.map +0 -7
- package/dist/esm/chunks/chunk.K4SWLH26.js +0 -7
- package/dist/esm/chunks/chunk.TOM77CWD.js +0 -7
- package/dist/esm/chunks/chunk.TOM77CWD.js.map +0 -7
- package/dist/esm/chunks/chunk.U773QUMB.js +0 -12
- package/dist/esm/chunks/chunk.U773QUMB.js.map +0 -7
- /package/dist/esm/chunks/{chunk.KCC3C3WH.js.map → chunk.2EAQ36QO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3DYMGITQ.js.map → chunk.3NHRJPT4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ETJMASRZ.js.map → chunk.AD4NVLFA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z4HBPQ42.js.map → chunk.BJRQ67AD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7LX3X2DU.js.map → chunk.JMRXBELV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.F7ZYEFH5.js.map → chunk.K55FBLTW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2NA4LVTZ.js.map → chunk.P67RC5S3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.55HRCXPA.js.map → chunk.PILDKQOE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GBUXAJPY.js.map → chunk.ROWBKHIO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AMES2WWC.js.map → chunk.XAPKK4ZJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NOXJK2U7.js.map → chunk.ZDTJPNFM.js.map} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ICustomElement } from '@tylertech/forge-core';
|
|
7
|
+
export interface IButtonAreaComponent extends ICustomElement {
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare global {
|
|
11
|
+
interface HTMLElementTagNameMap {
|
|
12
|
+
'forge-button-area': IButtonAreaComponent;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The custom element class behind the `<forge-button-area>` element.
|
|
17
|
+
*
|
|
18
|
+
* @tag forge-button-area
|
|
19
|
+
*/
|
|
20
|
+
export declare class ButtonAreaComponent extends HTMLElement implements IButtonAreaComponent {
|
|
21
|
+
static get observedAttributes(): string[];
|
|
22
|
+
private _foundation;
|
|
23
|
+
constructor();
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
27
|
+
/** Controls whether the component and associated button element are disabled. */
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';
|
|
8
|
+
import { ButtonAreaAdapter } from './button-area-adapter';
|
|
9
|
+
import { ButtonAreaFoundation } from './button-area-foundation';
|
|
10
|
+
import { BUTTON_AREA_CONSTANTS } from './button-area-constants';
|
|
11
|
+
import { RippleComponent } from '../ripple';
|
|
12
|
+
const template = '<template><div class=\"forge-button-area\" id=\"root\" part=\"root\"><div class=\"forge-button-area__button\" id=\"button\" part=\"button\"><slot name=\"button\"></slot></div><slot></slot></div></template>';
|
|
13
|
+
const styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-button-area{overflow:hidden}.forge-button-area:not(.forge-button-area--disabled).forge-button-area{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;cursor:pointer}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-button-area__button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{display:block}:host([hidden]){display:none}';
|
|
14
|
+
/**
|
|
15
|
+
* The custom element class behind the `<forge-button-area>` element.
|
|
16
|
+
*
|
|
17
|
+
* @tag forge-button-area
|
|
18
|
+
*/
|
|
19
|
+
let ButtonAreaComponent = class ButtonAreaComponent extends HTMLElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
attachShadowTemplate(this, template, styles);
|
|
23
|
+
this._foundation = new ButtonAreaFoundation(new ButtonAreaAdapter(this));
|
|
24
|
+
}
|
|
25
|
+
static get observedAttributes() {
|
|
26
|
+
return [
|
|
27
|
+
BUTTON_AREA_CONSTANTS.attributes.DISABLED
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
this._foundation.initialize();
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this._foundation.disconnect();
|
|
35
|
+
}
|
|
36
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
37
|
+
switch (name) {
|
|
38
|
+
case BUTTON_AREA_CONSTANTS.attributes.DISABLED:
|
|
39
|
+
this.disabled = coerceBoolean(newValue);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
__decorate([
|
|
45
|
+
FoundationProperty()
|
|
46
|
+
], ButtonAreaComponent.prototype, "disabled", void 0);
|
|
47
|
+
ButtonAreaComponent = __decorate([
|
|
48
|
+
CustomElement({
|
|
49
|
+
name: BUTTON_AREA_CONSTANTS.elementName,
|
|
50
|
+
dependencies: [
|
|
51
|
+
RippleComponent
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
], ButtonAreaComponent);
|
|
55
|
+
export { ButtonAreaComponent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export * from './button-area-adapter';
|
|
7
|
+
export * from './button-area-constants';
|
|
8
|
+
export * from './button-area-foundation';
|
|
9
|
+
export * from './button-area';
|
|
10
|
+
export declare function defineButtonAreaComponent(): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { defineCustomElement } from '@tylertech/forge-core';
|
|
7
|
+
import { ButtonAreaComponent } from './button-area';
|
|
8
|
+
export * from './button-area-adapter';
|
|
9
|
+
export * from './button-area-constants';
|
|
10
|
+
export * from './button-area-foundation';
|
|
11
|
+
export * from './button-area';
|
|
12
|
+
export function defineButtonAreaComponent() {
|
|
13
|
+
defineCustomElement(ButtonAreaComponent);
|
|
14
|
+
}
|
|
@@ -20,6 +20,7 @@ export declare class ExpansionPanelAdapter extends BaseAdapter<IExpansionPanelCo
|
|
|
20
20
|
private _headerElement;
|
|
21
21
|
private _contentElement;
|
|
22
22
|
private _headerSlotElement;
|
|
23
|
+
private _activeAnimationFrame;
|
|
23
24
|
constructor(component: IExpansionPanelComponent);
|
|
24
25
|
initialize(open: boolean, orientation?: string): void;
|
|
25
26
|
setHeaderVisibility(visible: boolean): void;
|
|
@@ -98,8 +98,9 @@ export class ExpansionPanelAdapter extends BaseAdapter {
|
|
|
98
98
|
else {
|
|
99
99
|
this._contentElement.style.transition = EXPANSION_PANEL_CONSTANTS.strings.EXPANSION_VERTICAL_TRANSITION;
|
|
100
100
|
}
|
|
101
|
-
window.requestAnimationFrame(() => {
|
|
102
|
-
window.requestAnimationFrame(() => {
|
|
101
|
+
this._activeAnimationFrame = window.requestAnimationFrame(() => {
|
|
102
|
+
this._activeAnimationFrame = window.requestAnimationFrame(() => {
|
|
103
|
+
this._activeAnimationFrame = undefined;
|
|
103
104
|
if (opening) {
|
|
104
105
|
if (orientation === EXPANSION_PANEL_CONSTANTS.strings.ORIENTATION_HORIZONTAL) {
|
|
105
106
|
this._contentElement.style.width = `${this._contentElement.scrollWidth}px`;
|
|
@@ -130,6 +131,10 @@ export class ExpansionPanelAdapter extends BaseAdapter {
|
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
133
|
else {
|
|
134
|
+
if (this._activeAnimationFrame) {
|
|
135
|
+
window.cancelAnimationFrame(this._activeAnimationFrame);
|
|
136
|
+
this._activeAnimationFrame = undefined;
|
|
137
|
+
}
|
|
133
138
|
this._contentElement.style.removeProperty('transition');
|
|
134
139
|
if (opening) {
|
|
135
140
|
if (orientation === EXPANSION_PANEL_CONSTANTS.strings.ORIENTATION_HORIZONTAL) {
|
|
@@ -51,6 +51,7 @@ export declare class FieldFoundation {
|
|
|
51
51
|
protected _onTrailingSlotChanged(evt: Event): void;
|
|
52
52
|
protected _onAddonEndSlotChanged(evt: Event): void;
|
|
53
53
|
protected _initializeLabel(): void;
|
|
54
|
+
private _destroyFloatingLabel;
|
|
54
55
|
protected _detectLeadingContent(): void;
|
|
55
56
|
protected _detectTrailingContent(): void;
|
|
56
57
|
protected _detectAddonEndContent(): void;
|
|
@@ -85,10 +85,16 @@ export class FieldFoundation {
|
|
|
85
85
|
}
|
|
86
86
|
set density(value) {
|
|
87
87
|
if (this._density !== value) {
|
|
88
|
+
const prevDensity = this._density;
|
|
88
89
|
this._density = value;
|
|
89
90
|
if (this._isInitialized) {
|
|
90
91
|
this._applyDensity();
|
|
91
|
-
this.
|
|
92
|
+
if (this._density === 'dense') {
|
|
93
|
+
this._destroyFloatingLabel({ cancelFloat: true });
|
|
94
|
+
}
|
|
95
|
+
else if (prevDensity === 'dense') {
|
|
96
|
+
this._initializeLabel();
|
|
97
|
+
}
|
|
92
98
|
}
|
|
93
99
|
this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.DENSITY, this._density.toString());
|
|
94
100
|
}
|
|
@@ -186,9 +192,8 @@ export class FieldFoundation {
|
|
|
186
192
|
this._detectAddonEndContent();
|
|
187
193
|
}
|
|
188
194
|
_initializeLabel() {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
195
|
+
var _a;
|
|
196
|
+
(_a = this._floatingLabel) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
192
197
|
this._adapter.detectLabel();
|
|
193
198
|
if (this._adapter.hasLabel() && this._density !== 'dense') {
|
|
194
199
|
this._floatingLabel = this._adapter.initializeFloatingLabel();
|
|
@@ -197,11 +202,16 @@ export class FieldFoundation {
|
|
|
197
202
|
this._adapter.setRootClass(FIELD_CONSTANTS.classes.LABEL);
|
|
198
203
|
}
|
|
199
204
|
else {
|
|
200
|
-
this.
|
|
201
|
-
this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);
|
|
202
|
-
this._floatingLabel = undefined;
|
|
205
|
+
this._destroyFloatingLabel();
|
|
203
206
|
}
|
|
204
207
|
}
|
|
208
|
+
_destroyFloatingLabel({ cancelFloat = false } = {}) {
|
|
209
|
+
var _a;
|
|
210
|
+
this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);
|
|
211
|
+
this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);
|
|
212
|
+
(_a = this._floatingLabel) === null || _a === void 0 ? void 0 : _a.destroy({ cancelFloat });
|
|
213
|
+
this._floatingLabel = undefined;
|
|
214
|
+
}
|
|
205
215
|
_detectLeadingContent() {
|
|
206
216
|
if (this._adapter.hasLeadingNodes()) {
|
|
207
217
|
this._adapter.setRootClass(FIELD_CONSTANTS.classes.LEADING);
|
|
@@ -7,9 +7,12 @@ import { IFloatingLabelAdapter } from './floating-label-adapter';
|
|
|
7
7
|
export declare class FloatingLabelFoundation {
|
|
8
8
|
protected _adapter: IFloatingLabelAdapter;
|
|
9
9
|
private _floatAnimationEndHandler;
|
|
10
|
+
private _activeFrame;
|
|
10
11
|
constructor(_adapter: IFloatingLabelAdapter);
|
|
11
12
|
initialize(): void;
|
|
12
|
-
disconnect(
|
|
13
|
+
disconnect({ cancelFloat }?: {
|
|
14
|
+
cancelFloat?: boolean | undefined;
|
|
15
|
+
}): void;
|
|
13
16
|
float(shouldFloat: boolean, alwaysFloat?: boolean): void;
|
|
14
17
|
getWidth(): number;
|
|
15
18
|
get isFloating(): boolean;
|
|
@@ -18,7 +18,10 @@ export class FloatingLabelFoundation {
|
|
|
18
18
|
this._adapter.addLabelListener('transitionend', this._floatAnimationEndHandler);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
disconnect() {
|
|
21
|
+
disconnect({ cancelFloat = false } = {}) {
|
|
22
|
+
if (cancelFloat && this._activeFrame) {
|
|
23
|
+
window.cancelAnimationFrame(this._activeFrame);
|
|
24
|
+
}
|
|
22
25
|
this._adapter.removeLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOATING_LABEL);
|
|
23
26
|
this._adapter.removeLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOAT_ABOVE);
|
|
24
27
|
this._adapter.removeLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOAT_ABOVE_END_KEYFRAME);
|
|
@@ -32,9 +35,9 @@ export class FloatingLabelFoundation {
|
|
|
32
35
|
if (this._adapter.hasLabelClass(FLOATING_LABEL_CONSTANTS.classes.UNFLOAT_ABOVE_START_KEYFRAME)) {
|
|
33
36
|
this._adapter.removeLabelClass(FLOATING_LABEL_CONSTANTS.classes.UNFLOAT_ABOVE_START_KEYFRAME);
|
|
34
37
|
}
|
|
35
|
-
requestAnimationFrame(() => {
|
|
36
|
-
requestAnimationFrame(() => {
|
|
37
|
-
if (alwaysFloat || this.
|
|
38
|
+
this._activeFrame = window.requestAnimationFrame(() => {
|
|
39
|
+
this._activeFrame = window.requestAnimationFrame(() => {
|
|
40
|
+
if (alwaysFloat || this.isFloating) {
|
|
38
41
|
this._adapter.addLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOAT_ABOVE_END_KEYFRAME);
|
|
39
42
|
}
|
|
40
43
|
this._adapter.addLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOAT_ABOVE);
|
|
@@ -46,8 +49,8 @@ export class FloatingLabelFoundation {
|
|
|
46
49
|
if (this._adapter.hasLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOAT_ABOVE_END_KEYFRAME)) {
|
|
47
50
|
this._adapter.removeLabelClass(FLOATING_LABEL_CONSTANTS.classes.FLOAT_ABOVE_END_KEYFRAME);
|
|
48
51
|
this._adapter.addLabelClass(FLOATING_LABEL_CONSTANTS.classes.UNFLOAT_ABOVE_START_KEYFRAME);
|
|
49
|
-
requestAnimationFrame(() => {
|
|
50
|
-
requestAnimationFrame(() => {
|
|
52
|
+
this._activeFrame = window.requestAnimationFrame(() => {
|
|
53
|
+
this._activeFrame = window.requestAnimationFrame(() => {
|
|
51
54
|
this._adapter.removeLabelClass(FLOATING_LABEL_CONSTANTS.classes.UNFLOAT_ABOVE_START_KEYFRAME);
|
|
52
55
|
});
|
|
53
56
|
});
|
|
@@ -7,7 +7,9 @@ export interface IFloatingLabel {
|
|
|
7
7
|
isFloating: boolean;
|
|
8
8
|
float(float: boolean, alwaysFloat?: boolean): void;
|
|
9
9
|
getWidth(): number;
|
|
10
|
-
destroy(
|
|
10
|
+
destroy(opts?: {
|
|
11
|
+
cancelFloat?: boolean;
|
|
12
|
+
}): void;
|
|
11
13
|
}
|
|
12
14
|
export declare class FloatingLabel implements IFloatingLabel {
|
|
13
15
|
private _labelElement;
|
|
@@ -15,7 +17,9 @@ export declare class FloatingLabel implements IFloatingLabel {
|
|
|
15
17
|
constructor(_labelElement: HTMLLabelElement);
|
|
16
18
|
/** Returns the current label floating state. */
|
|
17
19
|
get isFloating(): boolean;
|
|
18
|
-
destroy(
|
|
20
|
+
destroy({ cancelFloat }?: {
|
|
21
|
+
cancelFloat?: boolean | undefined;
|
|
22
|
+
}): void;
|
|
19
23
|
/**
|
|
20
24
|
* Sets the floating state of the label element.
|
|
21
25
|
* @param shouldFloat If true, sets the label to float, otherwise un-float.
|
|
@@ -15,8 +15,8 @@ export class FloatingLabel {
|
|
|
15
15
|
get isFloating() {
|
|
16
16
|
return this._foundation.isFloating;
|
|
17
17
|
}
|
|
18
|
-
destroy() {
|
|
19
|
-
this._foundation.disconnect();
|
|
18
|
+
destroy({ cancelFloat = false } = {}) {
|
|
19
|
+
this._foundation.disconnect({ cancelFloat });
|
|
20
20
|
this._labelElement = undefined;
|
|
21
21
|
}
|
|
22
22
|
/**
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
|
@@ -70,6 +70,7 @@ import { ViewComponent, ViewSwitcherComponent } from './view-switcher';
|
|
|
70
70
|
import { IconComponent } from './icon';
|
|
71
71
|
import { SelectDropdownComponent } from './select/select-dropdown';
|
|
72
72
|
import { StackComponent } from './stack';
|
|
73
|
+
import { ButtonAreaComponent } from './button-area';
|
|
73
74
|
export * from './accordion';
|
|
74
75
|
export * from './app-bar';
|
|
75
76
|
export * from './autocomplete';
|
|
@@ -80,6 +81,7 @@ export * from './banner';
|
|
|
80
81
|
export * from './bottom-sheet';
|
|
81
82
|
export * from './busy-indicator';
|
|
82
83
|
export * from './button';
|
|
84
|
+
export * from './button-area';
|
|
83
85
|
export * from './button-toggle';
|
|
84
86
|
export * from './calendar';
|
|
85
87
|
export * from './card';
|
|
@@ -142,6 +144,7 @@ const CUSTOM_ELEMENTS = [
|
|
|
142
144
|
BottomSheetComponent,
|
|
143
145
|
BusyIndicatorComponent,
|
|
144
146
|
ButtonComponent,
|
|
147
|
+
ButtonAreaComponent,
|
|
145
148
|
ButtonToggleComponent,
|
|
146
149
|
ButtonToggleGroupComponent,
|
|
147
150
|
CalendarComponent,
|
|
@@ -7,40 +7,42 @@ import { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';
|
|
|
7
7
|
import { ISelectOption } from '../select';
|
|
8
8
|
import { IPaginatorComponent } from './paginator';
|
|
9
9
|
import { PaginatorAlternativeAlignment } from './paginator-constants';
|
|
10
|
+
export declare type PaginatorFieldIdentifier = 'first' | 'last' | 'previous' | 'next' | 'page-size';
|
|
10
11
|
export interface IPaginatorAdapter extends IBaseAdapter {
|
|
11
|
-
setLabel
|
|
12
|
-
setPageSizeOptions
|
|
13
|
-
setPageSize
|
|
14
|
-
setRangeLabel
|
|
12
|
+
setLabel(value: string): void;
|
|
13
|
+
setPageSizeOptions(options: ISelectOption[]): void;
|
|
14
|
+
setPageSize(value: number): void;
|
|
15
|
+
setRangeLabel(value: string): void;
|
|
15
16
|
hasFirstPageButton(): boolean;
|
|
16
17
|
showFirstPageButton(): void;
|
|
17
18
|
hideFirstPageButton(): void;
|
|
18
19
|
hasLastPageButton(): boolean;
|
|
19
20
|
showLastPageButton(): void;
|
|
20
21
|
hideLastPageButton(): void;
|
|
21
|
-
attachPageSizeChangeListener
|
|
22
|
-
attachFirstPageListener
|
|
23
|
-
attachPreviousPageListener
|
|
24
|
-
attachNextPageListener
|
|
25
|
-
attachLastPageListener
|
|
26
|
-
detachPageSizeChangeListener
|
|
27
|
-
detachFirstPageListener
|
|
28
|
-
detachPreviousPageListener
|
|
29
|
-
detachNextPageListener
|
|
30
|
-
detachLastPageListener
|
|
31
|
-
disableFirstPageButton
|
|
32
|
-
enableFirstPageButton
|
|
33
|
-
disablePreviousPageButton
|
|
34
|
-
enablePreviousPageButton
|
|
35
|
-
disableNextPageButton
|
|
36
|
-
enableNextPageButton
|
|
22
|
+
attachPageSizeChangeListener(listener: (evt: CustomEvent) => void): void;
|
|
23
|
+
attachFirstPageListener(listener: (evt: Event) => void): void;
|
|
24
|
+
attachPreviousPageListener(listener: (evt: Event) => void): void;
|
|
25
|
+
attachNextPageListener(listener: (evt: Event) => void): void;
|
|
26
|
+
attachLastPageListener(listener: (evt: Event) => void): void;
|
|
27
|
+
detachPageSizeChangeListener(listener: (evt: CustomEvent) => void): void;
|
|
28
|
+
detachFirstPageListener(listener: (evt: Event) => void): void;
|
|
29
|
+
detachPreviousPageListener(listener: (evt: Event) => void): void;
|
|
30
|
+
detachNextPageListener(listener: (evt: Event) => void): void;
|
|
31
|
+
detachLastPageListener(listener: (evt: Event) => void): void;
|
|
32
|
+
disableFirstPageButton(): void;
|
|
33
|
+
enableFirstPageButton(): void;
|
|
34
|
+
disablePreviousPageButton(): void;
|
|
35
|
+
enablePreviousPageButton(): void;
|
|
36
|
+
disableNextPageButton(): void;
|
|
37
|
+
enableNextPageButton(): void;
|
|
37
38
|
disablePageSizeSelect(): void;
|
|
38
39
|
enablePageSizeSelect(): void;
|
|
39
40
|
setPageSizeVisibility(visible: boolean): void;
|
|
40
|
-
disableLastPageButton
|
|
41
|
-
enableLastPageButton
|
|
42
|
-
setAlternative
|
|
43
|
-
setAlignment
|
|
41
|
+
disableLastPageButton(): void;
|
|
42
|
+
enableLastPageButton(): void;
|
|
43
|
+
setAlternative(alternative: boolean): void;
|
|
44
|
+
setAlignment(alignment: PaginatorAlternativeAlignment): void;
|
|
45
|
+
handleFocusMove(from: PaginatorFieldIdentifier): void;
|
|
44
46
|
}
|
|
45
47
|
/**
|
|
46
48
|
* Provides facilities for interacting with the internal DOM of `PaginatorComponent`.
|
|
@@ -93,6 +95,6 @@ export declare class PaginatorAdapter extends BaseAdapter<IPaginatorComponent> i
|
|
|
93
95
|
enableLastPageButton(): void;
|
|
94
96
|
setAlternative(alternative: boolean): void;
|
|
95
97
|
setAlignment(alignment: PaginatorAlternativeAlignment): void;
|
|
96
|
-
|
|
98
|
+
handleFocusMove(from: PaginatorFieldIdentifier): void;
|
|
97
99
|
private _tryFocus;
|
|
98
100
|
}
|
|
@@ -87,28 +87,24 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
87
87
|
this._lastPageButton.removeEventListener('click', listener);
|
|
88
88
|
}
|
|
89
89
|
disableFirstPageButton() {
|
|
90
|
-
this._handleFocusMove('first');
|
|
91
90
|
this._firstPageButton.setAttribute('disabled', 'disabled');
|
|
92
91
|
}
|
|
93
92
|
enableFirstPageButton() {
|
|
94
93
|
this._firstPageButton.removeAttribute('disabled');
|
|
95
94
|
}
|
|
96
95
|
disablePreviousPageButton() {
|
|
97
|
-
this._handleFocusMove('previous');
|
|
98
96
|
this._previousPageButton.setAttribute('disabled', 'disabled');
|
|
99
97
|
}
|
|
100
98
|
enablePreviousPageButton() {
|
|
101
99
|
this._previousPageButton.removeAttribute('disabled');
|
|
102
100
|
}
|
|
103
101
|
disableNextPageButton() {
|
|
104
|
-
this._handleFocusMove('next');
|
|
105
102
|
this._nextPageButton.setAttribute('disabled', 'disabled');
|
|
106
103
|
}
|
|
107
104
|
enableNextPageButton() {
|
|
108
105
|
this._nextPageButton.removeAttribute('disabled');
|
|
109
106
|
}
|
|
110
107
|
disablePageSizeSelect() {
|
|
111
|
-
this._handleFocusMove('page-size');
|
|
112
108
|
this._pageSizeSelect.setAttribute('disabled', 'disabled');
|
|
113
109
|
}
|
|
114
110
|
enablePageSizeSelect() {
|
|
@@ -123,7 +119,6 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
123
119
|
}
|
|
124
120
|
}
|
|
125
121
|
disableLastPageButton() {
|
|
126
|
-
this._handleFocusMove('last');
|
|
127
122
|
this._lastPageButton.setAttribute('disabled', 'disabled');
|
|
128
123
|
}
|
|
129
124
|
enableLastPageButton() {
|
|
@@ -151,7 +146,10 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
151
146
|
break;
|
|
152
147
|
}
|
|
153
148
|
}
|
|
154
|
-
|
|
149
|
+
handleFocusMove(from) {
|
|
150
|
+
if (!this._component.matches(':focus')) {
|
|
151
|
+
return; // We can only move focus elsewhere within the element if the element already contains focus
|
|
152
|
+
}
|
|
155
153
|
switch (from) {
|
|
156
154
|
case 'first':
|
|
157
155
|
this._tryFocus([
|
|
@@ -13,15 +13,12 @@ export interface IPaginatorFoundation extends ICustomElementFoundation {
|
|
|
13
13
|
total: number;
|
|
14
14
|
pageSizeOptions: number[] | boolean;
|
|
15
15
|
pageSizeLabel: string;
|
|
16
|
-
initialize(): void;
|
|
17
16
|
}
|
|
18
|
-
/**
|
|
19
|
-
* The foundation class behind the `<forge-paginator>` component.
|
|
20
|
-
*/
|
|
21
17
|
export declare class PaginatorFoundation {
|
|
22
18
|
private _adapter;
|
|
23
19
|
private _pageIndex;
|
|
24
20
|
private _pageSize;
|
|
21
|
+
private _offset;
|
|
25
22
|
private _total;
|
|
26
23
|
private _pageSizeOptions;
|
|
27
24
|
private _label;
|
|
@@ -30,103 +27,59 @@ export declare class PaginatorFoundation {
|
|
|
30
27
|
private _disabled;
|
|
31
28
|
private _alternative;
|
|
32
29
|
private _alignment;
|
|
30
|
+
private _rangeLabel;
|
|
33
31
|
private _firstPageListener;
|
|
34
32
|
private _previousPageListener;
|
|
35
33
|
private _nextPageListener;
|
|
36
34
|
private _lastPageListener;
|
|
37
35
|
private _pageSizeListener;
|
|
38
|
-
private _rangeLabel;
|
|
39
36
|
constructor(_adapter: IPaginatorAdapter);
|
|
40
|
-
/** The zero-based page index. Default is 0. */
|
|
41
|
-
set pageIndex(value: number);
|
|
42
|
-
get pageIndex(): number;
|
|
43
|
-
/** Number of items to display on a page. By default set to 25. */
|
|
44
|
-
set pageSize(value: number);
|
|
45
|
-
get pageSize(): number;
|
|
46
|
-
/** Sets page index by providing the number of items to skip. */
|
|
47
|
-
set offset(value: number);
|
|
48
|
-
get offset(): number;
|
|
49
|
-
/** The total number of items to be paginated. Default is 0. */
|
|
50
|
-
set total(value: number);
|
|
51
|
-
get total(): number;
|
|
52
|
-
/** The set of provided page size options to display to the user. */
|
|
53
|
-
set pageSizeOptions(options: number[] | boolean);
|
|
54
|
-
get pageSizeOptions(): number[] | boolean;
|
|
55
|
-
/** A label for the paginator. Default is "Rows per page:". */
|
|
56
|
-
set label(value: string);
|
|
57
|
-
get label(): string;
|
|
58
|
-
/** Whether to show the first page and last page buttons. Default is false. */
|
|
59
|
-
set firstLast(value: boolean);
|
|
60
|
-
get firstLast(): boolean;
|
|
61
|
-
/** Whether to show the first page button. Default is false. */
|
|
62
|
-
set first(value: boolean);
|
|
63
|
-
get first(): boolean;
|
|
64
|
-
/** Whether the paginator is disabled. Default is false. */
|
|
65
|
-
set disabled(value: boolean);
|
|
66
|
-
get disabled(): boolean;
|
|
67
|
-
get alternative(): boolean;
|
|
68
|
-
set alternative(value: boolean);
|
|
69
|
-
get alignment(): PaginatorAlternativeAlignment;
|
|
70
|
-
set alignment(value: PaginatorAlternativeAlignment);
|
|
71
|
-
private _applyAlternativeAlignment;
|
|
72
|
-
private _applyAlternative;
|
|
73
|
-
/**
|
|
74
|
-
* Intializes the internal state when the component loads.
|
|
75
|
-
*/
|
|
76
37
|
initialize(): void;
|
|
77
38
|
disconnect(): void;
|
|
78
39
|
private _attachListeners;
|
|
79
40
|
private _detachListeners;
|
|
80
|
-
/**
|
|
81
|
-
* Handles clicking the first page button.
|
|
82
|
-
* @param evt The click event.
|
|
83
|
-
*/
|
|
84
41
|
private _onFirstPage;
|
|
85
|
-
/**
|
|
86
|
-
* Handles clicking the previous page button.
|
|
87
|
-
* @param evt The click event.
|
|
88
|
-
*/
|
|
89
42
|
private _onPreviousPage;
|
|
90
|
-
/**
|
|
91
|
-
* Handles clicking the next page button.
|
|
92
|
-
* @param evt The click event.
|
|
93
|
-
*/
|
|
94
43
|
private _onNextPage;
|
|
95
|
-
/**
|
|
96
|
-
* Handles clicking the last page button.
|
|
97
|
-
* @param evt The click event.
|
|
98
|
-
*/
|
|
99
44
|
private _onLastPage;
|
|
100
|
-
/**
|
|
101
|
-
* Handles selecting a new item in the page size options.
|
|
102
|
-
* @param evt The select custom event.
|
|
103
|
-
*/
|
|
104
45
|
private _onPageSizeChanged;
|
|
105
46
|
private _emitChangeEvent;
|
|
106
|
-
/**
|
|
107
|
-
* Returns the max number of pages based on our current parameters.
|
|
108
|
-
*/
|
|
109
47
|
private _getMaxPages;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*/
|
|
113
|
-
private _update;
|
|
114
|
-
/**
|
|
115
|
-
* Toggle showing/hiding first and last buttons based on the show first/last buttons flag.
|
|
116
|
-
*/
|
|
48
|
+
private _updateRangeLabel;
|
|
49
|
+
private _syncInteractionState;
|
|
117
50
|
private _toggleFirstLastButtons;
|
|
118
|
-
/**
|
|
119
|
-
* Toggle showing/hiding first button based on the show first or first/last buttons flags.
|
|
120
|
-
*/
|
|
121
51
|
private _toggleFirstButton;
|
|
122
|
-
/** Checks if a first page exists. */
|
|
123
52
|
private _hasFirstPage;
|
|
124
|
-
/**
|
|
125
|
-
* Checks if a previous page exists.
|
|
126
|
-
*/
|
|
127
53
|
private _hasPreviousPage;
|
|
128
|
-
/** Checks if a next page exists */
|
|
129
54
|
private _hasNextPage;
|
|
130
|
-
/** Checks if a last page exists. */
|
|
131
55
|
private _hasLastPage;
|
|
56
|
+
private _computePageIndexFromOffset;
|
|
57
|
+
private _computeOffset;
|
|
58
|
+
private _applyPageIndex;
|
|
59
|
+
private _applyPageSize;
|
|
60
|
+
private _applyTotal;
|
|
61
|
+
private _applyAlternativeAlignment;
|
|
62
|
+
private _applyDisabled;
|
|
63
|
+
get pageIndex(): number;
|
|
64
|
+
set pageIndex(value: number);
|
|
65
|
+
get pageSize(): number;
|
|
66
|
+
set pageSize(value: number);
|
|
67
|
+
get offset(): number;
|
|
68
|
+
set offset(value: number);
|
|
69
|
+
get total(): number;
|
|
70
|
+
set total(value: number);
|
|
71
|
+
get pageSizeOptions(): number[] | boolean;
|
|
72
|
+
set pageSizeOptions(options: number[] | boolean);
|
|
73
|
+
get label(): string;
|
|
74
|
+
set label(value: string);
|
|
75
|
+
get firstLast(): boolean;
|
|
76
|
+
set firstLast(value: boolean);
|
|
77
|
+
get first(): boolean;
|
|
78
|
+
set first(value: boolean);
|
|
79
|
+
get disabled(): boolean;
|
|
80
|
+
set disabled(value: boolean);
|
|
81
|
+
get alternative(): boolean;
|
|
82
|
+
set alternative(value: boolean);
|
|
83
|
+
get alignment(): PaginatorAlternativeAlignment;
|
|
84
|
+
set alignment(value: PaginatorAlternativeAlignment);
|
|
132
85
|
}
|