@tylertech/forge 2.19.0 → 2.20.0
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 +122 -21
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/button-area/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chunks/{chunk.P4VJUJQN.js → chunk.2T6HVSO4.js} +2 -2
- package/dist/esm/chunks/{chunk.GEWDZDXN.js → chunk.6G4DOKR2.js} +2 -2
- package/dist/esm/chunks/{chunk.GEWDZDXN.js.map → chunk.6G4DOKR2.js.map} +3 -3
- package/dist/esm/chunks/{chunk.4DKCMH6P.js → chunk.AHDIUCUB.js} +1 -1
- package/dist/esm/chunks/{chunk.4DKCMH6P.js.map → chunk.AHDIUCUB.js.map} +2 -2
- package/dist/esm/chunks/chunk.CD33V3IO.js +7 -0
- package/dist/esm/chunks/chunk.CD33V3IO.js.map +7 -0
- package/dist/esm/chunks/{chunk.XAPKK4ZJ.js → chunk.G6GRI7UL.js} +2 -2
- package/dist/esm/chunks/{chunk.GSFM6MH4.js → chunk.IDMAZQXY.js} +2 -2
- package/dist/esm/chunks/chunk.IX2UHMIM.js +7 -0
- package/dist/esm/chunks/chunk.IX2UHMIM.js.map +7 -0
- package/dist/esm/chunks/{chunk.P67RC5S3.js → chunk.L3SL4NW6.js} +2 -2
- package/dist/esm/chunks/chunk.L52XPVYZ.js +7 -0
- package/dist/esm/chunks/chunk.L52XPVYZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.3NHRJPT4.js → chunk.LM57IEFE.js} +2 -2
- package/dist/esm/chunks/{chunk.BJRQ67AD.js → chunk.M2ATVI24.js} +2 -2
- package/dist/esm/chunks/{chunk.YG2UMTJN.js → chunk.TVI6D4GA.js} +2 -2
- package/dist/esm/chunks/{chunk.2EAQ36QO.js → chunk.VFRPE3S3.js} +2 -2
- package/dist/esm/chunks/chunk.XY3WCDVX.js +7 -0
- package/dist/esm/chunks/chunk.XY3WCDVX.js.map +7 -0
- package/dist/esm/chunks/{chunk.SNVWMZNK.js → chunk.YW3PMPBB.js} +2 -2
- package/dist/esm/chunks/{chunk.SNVWMZNK.js.map → chunk.YW3PMPBB.js.map} +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/paginator/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/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/table/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/forge.css +1 -1
- package/dist/table/forge-table.css +1 -1
- package/esm/button-area/button-area.d.ts +5 -0
- package/esm/button-area/button-area.js +5 -0
- package/esm/chip-field/chip-field-constants.d.ts +3 -0
- package/esm/chip-field/chip-field-constants.js +4 -0
- package/esm/chip-field/chip-field-foundation.d.ts +5 -0
- package/esm/chip-field/chip-field-foundation.js +20 -1
- package/esm/chip-field/chip-field.d.ts +5 -0
- package/esm/chip-field/chip-field.js +19 -1
- package/esm/field/field-constants.d.ts +8 -0
- package/esm/field/field-constants.js +10 -8
- package/esm/paginator/paginator-adapter.d.ts +4 -2
- package/esm/paginator/paginator-adapter.js +21 -8
- package/esm/paginator/paginator-foundation.d.ts +2 -0
- package/esm/paginator/paginator-foundation.js +19 -16
- package/esm/paginator/paginator.d.ts +1 -0
- package/esm/paginator/paginator.js +3 -0
- package/esm/select/core/base-select-foundation.js +3 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/table/table-foundation.d.ts +2 -0
- package/esm/table/table-foundation.js +16 -1
- package/esm/table/table-utils.js +13 -1
- package/esm/table/types.d.ts +1 -0
- package/package.json +1 -1
- package/styles/table/_mixins.scss +20 -2
- package/dist/esm/chunks/chunk.GO5A4GKZ.js +0 -7
- package/dist/esm/chunks/chunk.GO5A4GKZ.js.map +0 -7
- package/dist/esm/chunks/chunk.PBWUHK7Q.js +0 -7
- package/dist/esm/chunks/chunk.PBWUHK7Q.js.map +0 -7
- package/dist/esm/chunks/chunk.PILDKQOE.js +0 -7
- package/dist/esm/chunks/chunk.PILDKQOE.js.map +0 -7
- package/dist/esm/chunks/chunk.ROWBKHIO.js +0 -7
- package/dist/esm/chunks/chunk.ROWBKHIO.js.map +0 -7
- /package/dist/esm/chunks/{chunk.P4VJUJQN.js.map → chunk.2T6HVSO4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XAPKK4ZJ.js.map → chunk.G6GRI7UL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GSFM6MH4.js.map → chunk.IDMAZQXY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.P67RC5S3.js.map → chunk.L3SL4NW6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3NHRJPT4.js.map → chunk.LM57IEFE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BJRQ67AD.js.map → chunk.M2ATVI24.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YG2UMTJN.js.map → chunk.TVI6D4GA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2EAQ36QO.js.map → chunk.VFRPE3S3.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { __decorate } from "tslib";
|
|
7
|
-
import { CustomElement, attachShadowTemplate } from '@tylertech/forge-core';
|
|
7
|
+
import { CustomElement, FoundationProperty, attachShadowTemplate, coerceBoolean } from '@tylertech/forge-core';
|
|
8
8
|
import { ChipFieldAdapter } from './chip-field-adapter';
|
|
9
9
|
import { ChipFieldFoundation } from './chip-field-foundation';
|
|
10
10
|
import { CHIP_FIELD_CONSTANTS } from './chip-field-constants';
|
|
@@ -12,18 +12,36 @@ import { ChipComponent } from '../chips';
|
|
|
12
12
|
import { FieldComponent } from '../field/field';
|
|
13
13
|
const template = '<template><div class=\"forge-chip-field__wrapper\" part=\"root\"><div class=\"forge-chip-field forge-field\" part=\"container\"><div class=\"forge-field__leading-container\" part=\"leading-container\"><slot name=\"leading\"></slot></div><div class=\"forge-field__label-input-container\" part=\"label-input-container\"><slot name=\"label\"></slot><div class=\"forge-field__input-container\" part=\"input-container\"><slot name=\"member\"></slot><slot></slot></div></div><div class=\"forge-field__trailing-container\" part=\"trailing-container\"><slot name=\"trailing\"></slot></div><div class=\"forge-field__addon-end-container\" part=\"addon-end-container\"><slot name=\"addon-end\"></slot></div></div><slot name=\"helper-text\"></slot></div></template>';
|
|
14
14
|
const styles = '.forge-field::before{content:\"\";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-style:var(--forge-chip-field-border-style,solid);border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-chip-field-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field ::slotted(label){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field ::slotted(label[dir=rtl]),[dir=rtl] .forge-field ::slotted(label){right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) ::slotted(label){display:none}.forge-field--required ::slotted(label)::after{content:none}.forge-field--required ::slotted(label)::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\"*\";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){font-size:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){font-size:1rem}.forge-field--disabled ::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label){top:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(label){top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) ::slotted(label){left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) ::slotted(label){left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) ::slotted(label){padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded ::slotted(label){padding-right:32px}.forge-field ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled ::slotted(label.forge-floating-label--float-above){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) ::slotted(label.forge-floating-label--float-above){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above){-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe){-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) ::slotted(label.forge-floating-label--unfloat-above-start-keyframe){-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field ::slotted([slot=trailing]){align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=trailing]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=trailing]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=trailing]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=trailing]){margin:0 4px}.forge-field ::slotted([slot=trailing]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-chip-field{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-chip-field-margin-top,0);display:grid;grid-template-columns:[leading] -webkit-min-content [input] 1fr [trailing] -webkit-min-content [addon-end] -webkit-min-content [end];grid-template-columns:[leading] min-content [input] 1fr [trailing] min-content [addon-end] min-content [end]}.forge-chip-field.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-chip-field:not(.forge-field--dense):not(.forge-field--roomy){height:auto;min-height:46px;min-height:var(--forge-chip-field-height,46px)}.forge-chip-field.forge-field--roomy:not(.forge-field--dense){height:auto;min-height:3.5rem;min-height:var(--forge-chip-field-height,3.5rem)}.forge-chip-field.forge-field--dense:not(.forge-field--roomy){height:auto;min-height:1.5rem;min-height:var(--forge-chip-field-height,1.5rem)}.forge-field__label-input-container{grid-column-start:input;grid-column-end:trailing}.forge-field__input-container{-webkit-box-flex:1;flex:1 1 0.0001px;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap;-webkit-box-align:start;align-items:flex-start;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field__input-container{padding:2px 12px}.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-top:22px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-field__input-container{padding-left:32px}.forge-field--leading:not(.forge-field--shape-rounded) .forge-field__input-container{padding-left:0}.forge-field--shape-rounded.forge-field--leading .forge-field__input-container{padding-left:0}.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--roomy.forge-field--label .forge-field__input-container{padding-bottom:2px}.forge-field--shape-rounded:not(.forge-field--trailing):not(.forge-field--addon-end) .forge-field__input-container{padding-right:32px}.forge-field--addon-end:not(.forge-field--shape-rounded) .forge-field__input-container,.forge-field--trailing:not(.forge-field--shape-rounded) .forge-field__input-container{padding-right:0}.forge-field--shape-rounded.forge-field--addon-end .forge-field__input-container,.forge-field--shape-rounded.forge-field--trailing .forge-field__input-container{padding-right:0}.forge-field ::slotted([slot=member]){display:block}.forge-field--disabled ::slotted([slot=member]){--mdc-theme-primary:rgba(0, 0, 0, 0.38);--mdc-theme-primary:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38));cursor:not-allowed;pointer-events:none}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 8px 2px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=member]){margin:6px 12px 6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){margin:2px 6px 2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:20px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=member]){--forge-chip-min-height:16px}.forge-field ::slotted(input){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0}.forge-field ::slotted(input)::-webkit-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-moz-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::-ms-input-placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input)::placeholder{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field ::slotted(input):invalid{-webkit-box-shadow:none;box-shadow:none}.forge-field ::slotted(input):-webkit-autofill{z-index:auto!important}.forge-field:not(.forge-field--disabled) ::slotted(input){color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled ::slotted(input){color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){font-size:1rem;font-size:var(--forge-chip-field-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){font-size:.875rem;font-size:var(--forge-chip-field-font-size, .875rem)}.forge-field ::slotted(input){-webkit-box-flex:1;flex:1 1 0.0001px;min-width:40px;display:block;align-self:flex-start;padding:0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){margin:4px 0}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){margin:6px 0}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){margin:2px 0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field--roomy:not(.forge-field--dense) ::slotted(input){height:1.25rem;line-height:1.25rem}.forge-field--dense:not(.forge-field--roomy) ::slotted(input){height:1rem;line-height:1rem}.forge-field--leading .forge-field__leading-container{grid-column-start:leading;grid-column-end:input;align-self:flex-start;display:-webkit-box;display:flex}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=leading]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=leading]){padding-top:0;padding-bottom:0}.forge-field--trailing .forge-field__trailing-container{grid-column-start:trailing;grid-column-end:addon-end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=trailing]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){margin-top:0;margin-bottom:0}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=trailing]){padding-top:0;padding-bottom:0}.forge-field--addon-end .forge-field__addon-end-container{grid-column-start:addon-end;grid-column-end:end;display:-webkit-box;display:flex;-webkit-box-align:start;align-items:flex-start;align-self:flex-start}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:5px;margin-bottom:5px}.forge-field--roomy:not(.forge-field--dense) ::slotted([slot=addon-end]){margin-top:10px;margin-bottom:10px}.forge-field--dense:not(.forge-field--roomy) ::slotted([slot=addon-end]){margin-top:0;margin-bottom:0}.forge-field ::slotted(forge-icon-button){display:-webkit-inline-box!important;display:inline-flex!important}:host{display:block;contain:layout}:host([hidden]){display:none}';
|
|
15
|
+
import { FIELD_CONSTANTS } from '../field/field-constants';
|
|
15
16
|
/**
|
|
16
17
|
* The web component class behind the `<forge-chip-field>` custom element.
|
|
17
18
|
*
|
|
18
19
|
* @tag forge-chip-field
|
|
19
20
|
*/
|
|
20
21
|
let ChipFieldComponent = class ChipFieldComponent extends FieldComponent {
|
|
22
|
+
static get observedAttributes() {
|
|
23
|
+
return [
|
|
24
|
+
...Object.values(FIELD_CONSTANTS.attributes),
|
|
25
|
+
CHIP_FIELD_CONSTANTS.attributes.ADD_ON_BLUR
|
|
26
|
+
];
|
|
27
|
+
}
|
|
21
28
|
constructor() {
|
|
22
29
|
super();
|
|
23
30
|
attachShadowTemplate(this, template, styles);
|
|
24
31
|
this._foundation = new ChipFieldFoundation(new ChipFieldAdapter(this));
|
|
25
32
|
}
|
|
33
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
34
|
+
switch (name) {
|
|
35
|
+
case CHIP_FIELD_CONSTANTS.attributes.ADD_ON_BLUR:
|
|
36
|
+
this.addOnBlur = coerceBoolean(newValue);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
40
|
+
}
|
|
26
41
|
};
|
|
42
|
+
__decorate([
|
|
43
|
+
FoundationProperty()
|
|
44
|
+
], ChipFieldComponent.prototype, "addOnBlur", void 0);
|
|
27
45
|
ChipFieldComponent = __decorate([
|
|
28
46
|
CustomElement({
|
|
29
47
|
name: CHIP_FIELD_CONSTANTS.elementName,
|
|
@@ -12,6 +12,14 @@ export declare const FIELD_CONSTANTS: {
|
|
|
12
12
|
REQUIRED: string;
|
|
13
13
|
HOST_LABEL_FLOATING: string;
|
|
14
14
|
};
|
|
15
|
+
observedAttributes: {
|
|
16
|
+
DENSITY: string;
|
|
17
|
+
FLOAT_LABEL_TYPE: string;
|
|
18
|
+
SHAPE: string;
|
|
19
|
+
INVALID: string;
|
|
20
|
+
REQUIRED: string;
|
|
21
|
+
HOST_LABEL_FLOATING: string;
|
|
22
|
+
};
|
|
15
23
|
observedInputAttributes: string[];
|
|
16
24
|
selectors: {
|
|
17
25
|
INPUT: string;
|
|
@@ -3,14 +3,6 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
const attributes = {
|
|
7
|
-
DENSITY: 'density',
|
|
8
|
-
FLOAT_LABEL_TYPE: 'float-label-type',
|
|
9
|
-
SHAPE: 'shape',
|
|
10
|
-
INVALID: 'invalid',
|
|
11
|
-
REQUIRED: 'required',
|
|
12
|
-
HOST_LABEL_FLOATING: `forge-label-floating`
|
|
13
|
-
};
|
|
14
6
|
const selectors = {
|
|
15
7
|
INPUT: 'input,textarea'
|
|
16
8
|
};
|
|
@@ -32,8 +24,18 @@ const classes = {
|
|
|
32
24
|
ROOMY: 'forge-field--roomy',
|
|
33
25
|
LABEL: 'forge-field--label'
|
|
34
26
|
};
|
|
27
|
+
const observedAttributes = {
|
|
28
|
+
DENSITY: 'density',
|
|
29
|
+
FLOAT_LABEL_TYPE: 'float-label-type',
|
|
30
|
+
SHAPE: 'shape',
|
|
31
|
+
INVALID: 'invalid',
|
|
32
|
+
REQUIRED: 'required',
|
|
33
|
+
HOST_LABEL_FLOATING: `forge-label-floating`
|
|
34
|
+
};
|
|
35
|
+
const attributes = Object.assign({}, observedAttributes);
|
|
35
36
|
export const FIELD_CONSTANTS = {
|
|
36
37
|
attributes,
|
|
38
|
+
observedAttributes,
|
|
37
39
|
observedInputAttributes,
|
|
38
40
|
selectors,
|
|
39
41
|
classes
|
|
@@ -42,7 +42,8 @@ export interface IPaginatorAdapter extends IBaseAdapter {
|
|
|
42
42
|
enableLastPageButton(): void;
|
|
43
43
|
setAlternative(alternative: boolean): void;
|
|
44
44
|
setAlignment(alignment: PaginatorAlternativeAlignment): void;
|
|
45
|
-
|
|
45
|
+
hasFocus(): boolean;
|
|
46
|
+
handleFocusMove(from?: PaginatorFieldIdentifier | null, options?: FocusOptions): void;
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* Provides facilities for interacting with the internal DOM of `PaginatorComponent`.
|
|
@@ -95,6 +96,7 @@ export declare class PaginatorAdapter extends BaseAdapter<IPaginatorComponent> i
|
|
|
95
96
|
enableLastPageButton(): void;
|
|
96
97
|
setAlternative(alternative: boolean): void;
|
|
97
98
|
setAlignment(alignment: PaginatorAlternativeAlignment): void;
|
|
98
|
-
|
|
99
|
+
hasFocus(): boolean;
|
|
100
|
+
handleFocusMove(from?: PaginatorFieldIdentifier, options?: FocusOptions): void;
|
|
99
101
|
private _tryFocus;
|
|
100
102
|
}
|
|
@@ -146,8 +146,11 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
hasFocus() {
|
|
150
|
+
return this._component.matches(':focus');
|
|
151
|
+
}
|
|
152
|
+
handleFocusMove(from, options) {
|
|
153
|
+
if (from && !this.hasFocus()) {
|
|
151
154
|
return; // We can only move focus elsewhere within the element if the element already contains focus
|
|
152
155
|
}
|
|
153
156
|
switch (from) {
|
|
@@ -157,7 +160,7 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
157
160
|
this._lastPageButton,
|
|
158
161
|
this._previousPageButton,
|
|
159
162
|
this._pageSizeSelect
|
|
160
|
-
]);
|
|
163
|
+
], options);
|
|
161
164
|
break;
|
|
162
165
|
case 'last':
|
|
163
166
|
this._tryFocus([
|
|
@@ -165,7 +168,7 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
165
168
|
this._firstPageButton,
|
|
166
169
|
this._nextPageButton,
|
|
167
170
|
this._pageSizeSelect
|
|
168
|
-
]);
|
|
171
|
+
], options);
|
|
169
172
|
break;
|
|
170
173
|
case 'previous':
|
|
171
174
|
this._tryFocus([
|
|
@@ -181,7 +184,7 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
181
184
|
this._firstPageButton,
|
|
182
185
|
this._lastPageButton,
|
|
183
186
|
this._pageSizeSelect
|
|
184
|
-
]);
|
|
187
|
+
], options);
|
|
185
188
|
break;
|
|
186
189
|
case 'page-size':
|
|
187
190
|
this._tryFocus([
|
|
@@ -189,14 +192,24 @@ export class PaginatorAdapter extends BaseAdapter {
|
|
|
189
192
|
this._lastPageButton,
|
|
190
193
|
this._firstPageButton,
|
|
191
194
|
this._previousPageButton
|
|
192
|
-
]);
|
|
195
|
+
], options);
|
|
196
|
+
break;
|
|
197
|
+
default:
|
|
198
|
+
this._tryFocus([
|
|
199
|
+
this._firstPageButton,
|
|
200
|
+
this._previousPageButton,
|
|
201
|
+
this._nextPageButton,
|
|
202
|
+
this._lastPageButton,
|
|
203
|
+
this._pageSizeSelect
|
|
204
|
+
], options);
|
|
193
205
|
break;
|
|
194
206
|
}
|
|
195
207
|
}
|
|
196
|
-
_tryFocus(elements) {
|
|
208
|
+
_tryFocus(elements, options) {
|
|
209
|
+
const preventScroll = typeof (options === null || options === void 0 ? void 0 : options.preventScroll) === 'boolean' ? options.preventScroll : true;
|
|
197
210
|
for (const el of elements) {
|
|
198
211
|
if (el && el.isConnected && !el.disabled) {
|
|
199
|
-
el.focus();
|
|
212
|
+
el.focus(Object.assign(Object.assign({}, options), { preventScroll }));
|
|
200
213
|
return;
|
|
201
214
|
}
|
|
202
215
|
}
|
|
@@ -13,6 +13,7 @@ export interface IPaginatorFoundation extends ICustomElementFoundation {
|
|
|
13
13
|
total: number;
|
|
14
14
|
pageSizeOptions: number[] | boolean;
|
|
15
15
|
pageSizeLabel: string;
|
|
16
|
+
focus(options?: FocusOptions): void;
|
|
16
17
|
}
|
|
17
18
|
export declare class PaginatorFoundation {
|
|
18
19
|
private _adapter;
|
|
@@ -36,6 +37,7 @@ export declare class PaginatorFoundation {
|
|
|
36
37
|
constructor(_adapter: IPaginatorAdapter);
|
|
37
38
|
initialize(): void;
|
|
38
39
|
disconnect(): void;
|
|
40
|
+
focus(options?: FocusOptions): void;
|
|
39
41
|
private _attachListeners;
|
|
40
42
|
private _detachListeners;
|
|
41
43
|
private _onFirstPage;
|
|
@@ -36,6 +36,9 @@ export class PaginatorFoundation {
|
|
|
36
36
|
disconnect() {
|
|
37
37
|
this._detachListeners();
|
|
38
38
|
}
|
|
39
|
+
focus(options) {
|
|
40
|
+
this._adapter.handleFocusMove(null, options);
|
|
41
|
+
}
|
|
39
42
|
_attachListeners() {
|
|
40
43
|
this._adapter.attachPageSizeChangeListener(this._pageSizeListener);
|
|
41
44
|
this._adapter.attachFirstPageListener(this._firstPageListener);
|
|
@@ -58,7 +61,7 @@ export class PaginatorFoundation {
|
|
|
58
61
|
const firstPage = 0;
|
|
59
62
|
const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.FIRST_PAGE, { pageIndex: firstPage });
|
|
60
63
|
if (canPage) {
|
|
61
|
-
this._applyPageIndex(firstPage
|
|
64
|
+
this._applyPageIndex(firstPage);
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
_onPreviousPage(evt) {
|
|
@@ -69,7 +72,7 @@ export class PaginatorFoundation {
|
|
|
69
72
|
const prevPage = this._pageIndex - 1;
|
|
70
73
|
const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.PREVIOUS_PAGE, { pageIndex: prevPage });
|
|
71
74
|
if (canPage) {
|
|
72
|
-
this._applyPageIndex(prevPage
|
|
75
|
+
this._applyPageIndex(prevPage);
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
_onNextPage(evt) {
|
|
@@ -80,7 +83,7 @@ export class PaginatorFoundation {
|
|
|
80
83
|
const nextPage = this._pageIndex + 1;
|
|
81
84
|
const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.NEXT_PAGE, { pageIndex: nextPage });
|
|
82
85
|
if (canPage) {
|
|
83
|
-
this._applyPageIndex(nextPage
|
|
86
|
+
this._applyPageIndex(nextPage);
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
_onLastPage(evt) {
|
|
@@ -91,7 +94,7 @@ export class PaginatorFoundation {
|
|
|
91
94
|
const lastPage = this._getMaxPages();
|
|
92
95
|
const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.LAST_PAGE, { pageIndex: lastPage });
|
|
93
96
|
if (canPage) {
|
|
94
|
-
this._applyPageIndex(lastPage
|
|
97
|
+
this._applyPageIndex(lastPage);
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
_onPageSizeChanged(evt) {
|
|
@@ -99,7 +102,7 @@ export class PaginatorFoundation {
|
|
|
99
102
|
const pageSize = Number(evt.detail);
|
|
100
103
|
const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.PAGE_SIZE, { pageIndex: 0, pageSize });
|
|
101
104
|
if (canPage) {
|
|
102
|
-
this._applyPageIndex(0
|
|
105
|
+
this._applyPageIndex(0);
|
|
103
106
|
this._applyPageSize(pageSize);
|
|
104
107
|
}
|
|
105
108
|
else {
|
|
@@ -127,32 +130,32 @@ export class PaginatorFoundation {
|
|
|
127
130
|
}
|
|
128
131
|
this._adapter.setRangeLabel(this._rangeLabel);
|
|
129
132
|
}
|
|
130
|
-
_syncInteractionState(
|
|
133
|
+
_syncInteractionState() {
|
|
131
134
|
this._adapter.enableFirstPageButton();
|
|
132
135
|
this._adapter.enablePreviousPageButton();
|
|
133
136
|
this._adapter.enableNextPageButton();
|
|
134
137
|
this._adapter.enableLastPageButton();
|
|
135
138
|
if (!this._hasFirstPage()) {
|
|
136
|
-
if (
|
|
137
|
-
this._adapter.handleFocusMove(
|
|
139
|
+
if (this._adapter.hasFocus()) {
|
|
140
|
+
this._adapter.handleFocusMove('first');
|
|
138
141
|
}
|
|
139
142
|
this._adapter.disableFirstPageButton();
|
|
140
143
|
}
|
|
141
144
|
if (!this._hasPreviousPage()) {
|
|
142
|
-
if (
|
|
143
|
-
this._adapter.handleFocusMove(
|
|
145
|
+
if (this._adapter.hasFocus()) {
|
|
146
|
+
this._adapter.handleFocusMove('previous');
|
|
144
147
|
}
|
|
145
148
|
this._adapter.disablePreviousPageButton();
|
|
146
149
|
}
|
|
147
150
|
if (!this._hasNextPage()) {
|
|
148
|
-
if (
|
|
149
|
-
this._adapter.handleFocusMove(
|
|
151
|
+
if (this._adapter.hasFocus()) {
|
|
152
|
+
this._adapter.handleFocusMove('next');
|
|
150
153
|
}
|
|
151
154
|
this._adapter.disableNextPageButton();
|
|
152
155
|
}
|
|
153
156
|
if (!this._hasLastPage()) {
|
|
154
|
-
if (
|
|
155
|
-
this._adapter.handleFocusMove(
|
|
157
|
+
if (this._adapter.hasFocus()) {
|
|
158
|
+
this._adapter.handleFocusMove('last');
|
|
156
159
|
}
|
|
157
160
|
this._adapter.disableLastPageButton();
|
|
158
161
|
}
|
|
@@ -213,11 +216,11 @@ export class PaginatorFoundation {
|
|
|
213
216
|
this._offset = this._pageIndex * this._pageSize;
|
|
214
217
|
}
|
|
215
218
|
}
|
|
216
|
-
_applyPageIndex(value
|
|
219
|
+
_applyPageIndex(value) {
|
|
217
220
|
this._pageIndex = value;
|
|
218
221
|
this._computeOffset();
|
|
219
222
|
this._updateRangeLabel();
|
|
220
|
-
this._syncInteractionState(
|
|
223
|
+
this._syncInteractionState();
|
|
221
224
|
this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_INDEX, this._pageIndex != null, this._pageIndex.toString());
|
|
222
225
|
}
|
|
223
226
|
_applyPageSize(value) {
|
|
@@ -445,7 +445,9 @@ export class BaseSelectFoundation extends ListDropdownAwareFoundation {
|
|
|
445
445
|
}, 300);
|
|
446
446
|
this._options = this._adapter.getOptions();
|
|
447
447
|
// TODO: Enhance this to cycle through closest matches (see the native select)
|
|
448
|
-
const matchedOption = this._flatOptions.find(
|
|
448
|
+
const matchedOption = this._flatOptions.find(({ disabled, label }) => {
|
|
449
|
+
return !disabled && label.trim().toLowerCase().startsWith(this._filterString.trim().toLowerCase());
|
|
450
|
+
});
|
|
449
451
|
if (matchedOption) {
|
|
450
452
|
const optionIndex = this._flatOptions.indexOf(matchedOption);
|
|
451
453
|
if (this._open) {
|
|
@@ -14,7 +14,7 @@ import { SplitViewPanelAdapter } from './split-view-panel-adapter';
|
|
|
14
14
|
import { IconComponent, IconRegistry } from '../../icon';
|
|
15
15
|
import { RippleComponent } from '../../ripple';
|
|
16
16
|
const template = '<template><div class=\"forge-split-view-panel\" id=\"root\" part=\"root\"><div class=\"forge-split-view-panel__handle\" id=\"handle\" part=\"handle\" role=\"separator\" aria-controls=\"content\" aria-grabbed=\"false\" tabindex=\"0\"><forge-icon class=\"forge-split-view-panel__icon\" id=\"icon\" part=\"icon\"></forge-icon><forge-ripple id=\"ripple\" part=\"ripple\"></forge-ripple></div><div class=\"forge-split-view-panel__content\" id=\"content\" part=\"content\" role=\"group\"><slot></slot></div></div></template>';
|
|
17
|
-
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-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ui4b8kp;animation-name:ui4b8kp;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ui4b8kp{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ui4b8kp{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:ui4b8li;animation-name:ui4b8li;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ui4b8li{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ui4b8li{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ui4b8m0;animation-name:ui4b8m0;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ui4b8m0{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ui4b8m0{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:ui4b8mv;animation-name:ui4b8mv;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ui4b8mv{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ui4b8mv{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ui4b8nm;animation-name:ui4b8nm;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ui4b8nm{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ui4b8nm{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:ui4b8o1;animation-name:ui4b8o1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ui4b8o1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ui4b8o1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ui4b8om;animation-name:ui4b8om;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ui4b8om{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ui4b8om{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:ui4b8pg;animation-name:ui4b8pg;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ui4b8pg{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ui4b8pg{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}';
|
|
17
|
+
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-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uexlbyk;animation-name:uexlbyk;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uexlbyk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uexlbyk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:uexlbyl;animation-name:uexlbyl;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uexlbyl{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uexlbyl{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uexlbze;animation-name:uexlbze;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uexlbze{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uexlbze{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:uexlbzw;animation-name:uexlbzw;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uexlbzw{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uexlbzw{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uexlc0b;animation-name:uexlc0b;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uexlc0b{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uexlc0b{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:uexlc0o;animation-name:uexlc0o;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uexlc0o{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uexlc0o{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uexlc1h;animation-name:uexlc1h;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uexlc1h{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uexlc1h{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:uexlc24;animation-name:uexlc24;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uexlc24{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uexlc24{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}';
|
|
18
18
|
/**
|
|
19
19
|
* The custom element class behind the `<forge-split-view-panel>` element.
|
|
20
20
|
*
|
|
@@ -76,6 +76,7 @@ export declare class TableFoundation implements ITableFoundation {
|
|
|
76
76
|
private _rowDoubleClickListener;
|
|
77
77
|
private _selectRowListener;
|
|
78
78
|
private _selectAllListener;
|
|
79
|
+
private _sortableHeadCellKeydownListener;
|
|
79
80
|
private _headRowMouseDownListener;
|
|
80
81
|
private _headRowContextMenuListener;
|
|
81
82
|
private _documentMouseMoveListener;
|
|
@@ -259,6 +260,7 @@ export declare class TableFoundation implements ITableFoundation {
|
|
|
259
260
|
private _onHeadRowMouseDown;
|
|
260
261
|
private _onMouseMove;
|
|
261
262
|
private _onMouseUp;
|
|
263
|
+
private _onSortableHeadCellKeydown;
|
|
262
264
|
/**
|
|
263
265
|
* Called when a click event is triggered on the table header row.
|
|
264
266
|
* We use this to capture all click events on the row, and determine which
|
|
@@ -42,6 +42,7 @@ export class TableFoundation {
|
|
|
42
42
|
this._rowDoubleClickListener = evt => this._onRowDoubleClick(evt);
|
|
43
43
|
this._selectRowListener = evt => this._onRowSelected(evt);
|
|
44
44
|
this._selectAllListener = evt => this._onSelectAll(evt);
|
|
45
|
+
this._sortableHeadCellKeydownListener = (evt) => this._onSortableHeadCellKeydown(evt);
|
|
45
46
|
this._headRowMouseDownListener = evt => this._onHeadRowMouseDown(evt);
|
|
46
47
|
this._headRowContextMenuListener = evt => this._onHeadRowContextMenu(evt);
|
|
47
48
|
this._documentMouseMoveListener = evt => this._onMouseMove(evt);
|
|
@@ -124,6 +125,7 @@ export class TableFoundation {
|
|
|
124
125
|
doubleClickListener: this._allowRowClick ? this._rowDoubleClickListener : null,
|
|
125
126
|
selectListener: this._select ? this._selectRowListener : null,
|
|
126
127
|
selectAllListener: this._multiselect ? this._selectAllListener : null,
|
|
128
|
+
sortableHeadCellKeydownListener: this._sortableHeadCellKeydownListener,
|
|
127
129
|
headRowMouseDownListener: this._headRowMouseDownListener,
|
|
128
130
|
headRowContextMenuListener: this._headRowContextMenuListener,
|
|
129
131
|
filterListener: this._filter ? this._filterListener : null,
|
|
@@ -699,7 +701,11 @@ export class TableFoundation {
|
|
|
699
701
|
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SELECT_ALL, data, true, false);
|
|
700
702
|
}
|
|
701
703
|
_onHeadRowContextMenu(evt) {
|
|
702
|
-
|
|
704
|
+
// We only handle this event on MacOS due to the `ctrl+click` combination triggering the contextmenu event...
|
|
705
|
+
// So we only detect that scenario here to still allow for the default context menu on Mac when right-clicking
|
|
706
|
+
if (evt.ctrlKey) {
|
|
707
|
+
evt.preventDefault();
|
|
708
|
+
}
|
|
703
709
|
}
|
|
704
710
|
_onHeadRowMouseDown(evt) {
|
|
705
711
|
if (evt.button !== 0) {
|
|
@@ -764,6 +770,15 @@ export class TableFoundation {
|
|
|
764
770
|
}
|
|
765
771
|
this._headCellMouseDownIndex = undefined;
|
|
766
772
|
}
|
|
773
|
+
_onSortableHeadCellKeydown(evt) {
|
|
774
|
+
if (evt.key === ' ' || evt.key === 'Enter') {
|
|
775
|
+
const composedPath = getEventPath(evt);
|
|
776
|
+
const rowElement = composedPath.find(el => el.tagName === 'TR');
|
|
777
|
+
const thElement = composedPath.find(el => el.tagName === 'TH');
|
|
778
|
+
const cellIndex = Array.from(rowElement.cells).findIndex(c => c === thElement);
|
|
779
|
+
this._onSort(cellIndex);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
767
782
|
/**
|
|
768
783
|
* Called when a click event is triggered on the table header row.
|
|
769
784
|
* We use this to capture all click events on the row, and determine which
|
package/esm/table/table-utils.js
CHANGED
|
@@ -141,7 +141,15 @@ export class TableUtils {
|
|
|
141
141
|
th.scope = 'col';
|
|
142
142
|
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL], th);
|
|
143
143
|
// We wrap the header text in a div for ease of alignment
|
|
144
|
-
|
|
144
|
+
let cellContainer;
|
|
145
|
+
if (columnConfig.sortable) {
|
|
146
|
+
cellContainer = document.createElement('button');
|
|
147
|
+
cellContainer.type = 'button';
|
|
148
|
+
cellContainer.addEventListener('keydown', tableConfiguration.sortableHeadCellKeydownListener);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
cellContainer = document.createElement('div');
|
|
152
|
+
}
|
|
145
153
|
cellContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_CONTAINER);
|
|
146
154
|
// Add tooltip for multisort
|
|
147
155
|
if (tableConfiguration.multiColumnSort) {
|
|
@@ -236,6 +244,7 @@ export class TableUtils {
|
|
|
236
244
|
*/
|
|
237
245
|
static setSortDirection(tableElement, columnIndex, sortDirection) {
|
|
238
246
|
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
247
|
+
tableElement.querySelectorAll('th[aria-sort]').forEach(th => th.removeAttribute('aria-sort'));
|
|
239
248
|
TableUtils._setColumnSortDirection(cell, sortDirection);
|
|
240
249
|
}
|
|
241
250
|
/**
|
|
@@ -251,9 +260,11 @@ export class TableUtils {
|
|
|
251
260
|
thElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
252
261
|
}
|
|
253
262
|
if (!sortDirection || sortDirection === SortDirection.Descending) {
|
|
263
|
+
thElement.setAttribute('aria-sort', 'descending');
|
|
254
264
|
thElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
255
265
|
}
|
|
256
266
|
else {
|
|
267
|
+
thElement.setAttribute('aria-sort', 'ascending');
|
|
257
268
|
thElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
|
258
269
|
}
|
|
259
270
|
}
|
|
@@ -885,6 +896,7 @@ export class TableUtils {
|
|
|
885
896
|
*/
|
|
886
897
|
static removeColumnSort(tableElement, columnIndex) {
|
|
887
898
|
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
899
|
+
cell.removeAttribute('aria-sort');
|
|
888
900
|
// Remove any existing sort direction classes from the existing th element
|
|
889
901
|
if (cell.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)) {
|
|
890
902
|
cell.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
package/esm/table/types.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface ITableConfiguration {
|
|
|
38
38
|
doubleClickListener: ((evt: Event) => void) | null;
|
|
39
39
|
selectListener: ((evt: Event) => void) | null;
|
|
40
40
|
selectAllListener: ((evt: Event) => void) | null;
|
|
41
|
+
sortableHeadCellKeydownListener: EventListener;
|
|
41
42
|
headRowMouseDownListener: (evt: Event) => void;
|
|
42
43
|
headRowContextMenuListener: (evt: Event) => void;
|
|
43
44
|
filterListener: ((value: any, columnIndex: number) => void) | null;
|
package/package.json
CHANGED
|
@@ -113,10 +113,14 @@
|
|
|
113
113
|
display: none;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
&--sortable {
|
|
118
118
|
@include head-cell-sortable(forge-table-head__cell-sort-icon, forge-table-head__cell__sort-order);
|
|
119
|
-
|
|
119
|
+
|
|
120
|
+
button {
|
|
121
|
+
@include head-cell-sortable-button;
|
|
122
|
+
}
|
|
123
|
+
|
|
120
124
|
&.forge-table-head__cell--sorted-ascending {
|
|
121
125
|
.forge-table-head__cell-sort-icon {
|
|
122
126
|
@include head-cell-sort-icon-ascending;
|
|
@@ -438,6 +442,20 @@
|
|
|
438
442
|
}
|
|
439
443
|
}
|
|
440
444
|
|
|
445
|
+
@mixin head-cell-sortable-button {
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
border: none;
|
|
448
|
+
background: transparent;
|
|
449
|
+
text-align: inherit;
|
|
450
|
+
margin: inherit;
|
|
451
|
+
padding-block: 4px;
|
|
452
|
+
padding-inline: 0;
|
|
453
|
+
font: inherit;
|
|
454
|
+
color: inherit;
|
|
455
|
+
width: 100%;
|
|
456
|
+
outline-offset: 4px;
|
|
457
|
+
}
|
|
458
|
+
|
|
441
459
|
/// The base table body row styles for row interactions.
|
|
442
460
|
@mixin body-row() {
|
|
443
461
|
height: variables.$tbody-row-height;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
var e={DENSITY:"density",FLOAT_LABEL_TYPE:"float-label-type",SHAPE:"shape",INVALID:"invalid",REQUIRED:"required",HOST_LABEL_FLOATING:"forge-label-floating"},d={INPUT:"input,textarea"},l=["disabled","readonly","value","placeholder"],o={DISABLED:"forge-field--disabled",READONLY:"forge-field--readonly",INPUT_FOCUSED:"forge-field__input--focused",LEADING:"forge-field--leading",TRAILING:"forge-field--trailing",ADDON_END:"forge-field--addon-end",ADDON_END_CONTAINER:"forge-field__addon-end-container",FOCUSED:"forge-field--focused",LABEL_FOCUSED:"forge-field__label--focused",SHAPE_ROUNDED:"forge-field--shape-rounded",INVALID:"forge-field--invalid",REQUIRED:"forge-field--required",DENSE:"forge-field--dense",ROOMY:"forge-field--roomy",LABEL:"forge-field--label"},f={attributes:e,observedInputAttributes:l,selectors:d,classes:o};export{f as a};
|
|
7
|
-
//# sourceMappingURL=chunk.GO5A4GKZ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/field/field-constants.ts"],
|
|
4
|
-
"sourcesContent": ["const attributes = {\n DENSITY: 'density',\n FLOAT_LABEL_TYPE: 'float-label-type',\n SHAPE: 'shape',\n INVALID: 'invalid',\n REQUIRED: 'required',\n HOST_LABEL_FLOATING: `forge-label-floating`\n};\n\nconst selectors = {\n INPUT: 'input,textarea'\n};\n\nconst observedInputAttributes = ['disabled', 'readonly', 'value', 'placeholder'];\n\nconst classes = {\n DISABLED: 'forge-field--disabled',\n READONLY: 'forge-field--readonly',\n INPUT_FOCUSED: 'forge-field__input--focused',\n LEADING: 'forge-field--leading',\n TRAILING: 'forge-field--trailing',\n ADDON_END: 'forge-field--addon-end',\n ADDON_END_CONTAINER: 'forge-field__addon-end-container',\n FOCUSED: 'forge-field--focused',\n LABEL_FOCUSED: 'forge-field__label--focused',\n SHAPE_ROUNDED: 'forge-field--shape-rounded',\n INVALID: 'forge-field--invalid',\n REQUIRED: 'forge-field--required',\n DENSE: 'forge-field--dense',\n ROOMY: 'forge-field--roomy',\n LABEL: 'forge-field--label'\n};\n\nexport const FIELD_CONSTANTS = {\n attributes,\n observedInputAttributes,\n selectors,\n classes\n};\n\nexport type FieldDensityType = 'roomy' | 'default' | 'dense';\nexport type FieldFloatLabelType = 'always' | 'auto';\nexport type FieldShapeType = 'default' | 'rounded';\n"],
|
|
5
|
-
"mappings": "AAAA,IAAMA,EAAa,CACjB,QAAS,UACT,iBAAkB,mBAClB,MAAO,QACP,QAAS,UACT,SAAU,WACV,oBAAqB,sBACvB,EAEMC,EAAY,CAChB,MAAO,gBACT,EAEMC,EAA0B,CAAC,WAAY,WAAY,QAAS,aAAa,EAEzEC,EAAU,CACd,SAAU,wBACV,SAAU,wBACV,cAAe,8BACf,QAAS,uBACT,SAAU,wBACV,UAAW,yBACX,oBAAqB,mCACrB,QAAS,uBACT,cAAe,8BACf,cAAe,6BACf,QAAS,uBACT,SAAU,wBACV,MAAO,qBACP,MAAO,qBACP,MAAO,oBACT,EAEaC,EAAkB,CAC7B,WAAAJ,EACA,wBAAAE,EACA,UAAAD,EACA,QAAAE,CACF",
|
|
6
|
-
"names": ["attributes", "selectors", "observedInputAttributes", "classes", "FIELD_CONSTANTS"]
|
|
7
|
-
}
|