@crowdstrike/glide-core 0.19.5 → 0.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/README.md +7 -26
- package/dist/accordion.d.ts +13 -4
- package/dist/accordion.js +1 -1
- package/dist/button-group.button.d.ts +16 -3
- package/dist/button-group.button.js +1 -1
- package/dist/button-group.d.ts +16 -5
- package/dist/button-group.js +1 -1
- package/dist/button.d.ts +16 -3
- package/dist/button.js +1 -1
- package/dist/checkbox-group.d.ts +49 -6
- package/dist/checkbox-group.js +16 -5
- package/dist/checkbox-group.styles.js +1 -1
- package/dist/checkbox.d.ts +50 -8
- package/dist/checkbox.js +22 -9
- package/dist/checkbox.styles.js +1 -1
- package/dist/drawer.d.ts +13 -3
- package/dist/drawer.js +1 -1
- package/dist/drawer.styles.js +6 -1
- package/dist/dropdown.d.ts +78 -11
- package/dist/dropdown.js +83 -55
- package/dist/dropdown.option.d.ts +31 -4
- package/dist/dropdown.option.js +1 -1
- package/dist/dropdown.option.styles.js +1 -1
- package/dist/dropdown.styles.js +14 -12
- package/dist/form-controls-layout.d.ts +10 -2
- package/dist/form-controls-layout.js +1 -1
- package/dist/icon-button.d.ts +12 -2
- package/dist/icon-button.js +1 -1
- package/dist/icon-button.styles.js +8 -8
- package/dist/icons/checked.js +1 -1
- package/dist/icons/chevron.js +1 -1
- package/dist/icons/magnifying-glass.js +1 -1
- package/dist/icons/pencil.js +1 -1
- package/dist/icons/severity-critical.d.ts +2 -0
- package/dist/icons/severity-critical.js +1 -0
- package/dist/icons/severity-informational.d.ts +2 -0
- package/dist/icons/severity-informational.js +1 -0
- package/dist/icons/severity-medium.d.ts +2 -0
- package/dist/icons/severity-medium.js +1 -0
- package/dist/icons/x.js +1 -1
- package/dist/inline-alert.d.ts +9 -10
- package/dist/inline-alert.js +1 -1
- package/dist/inline-alert.styles.js +3 -3
- package/dist/input.d.ts +53 -12
- package/dist/input.js +32 -13
- package/dist/input.styles.js +6 -3
- package/dist/label.d.ts +13 -7
- package/dist/label.js +1 -1
- package/dist/label.styles.js +10 -14
- package/dist/library/assert-slot.d.ts +2 -3
- package/dist/library/assert-slot.js +1 -1
- package/dist/library/assert-slot.test.js +10 -21
- package/dist/library/expect-unhandled-rejection.d.ts +1 -1
- package/dist/library/final.d.ts +3 -0
- package/dist/library/final.js +1 -0
- package/dist/library/final.test.d.ts +1 -0
- package/dist/library/final.test.js +44 -0
- package/dist/library/form-control.d.ts +7 -8
- package/dist/library/get-parent-class-name.d.ts +3 -0
- package/dist/library/get-parent-class-name.js +1 -0
- package/dist/library/localize.test.js +9 -12
- package/dist/library/on-resize.d.ts +12 -0
- package/dist/library/on-resize.js +1 -0
- package/dist/library/required.d.ts +2 -0
- package/dist/library/required.js +1 -0
- package/dist/library/required.test.d.ts +1 -0
- package/dist/library/required.test.js +47 -0
- package/dist/menu.button.d.ts +10 -1
- package/dist/menu.button.js +1 -1
- package/dist/menu.button.styles.js +3 -3
- package/dist/menu.d.ts +23 -7
- package/dist/menu.js +1 -1
- package/dist/menu.link.d.ts +11 -1
- package/dist/menu.link.js +1 -1
- package/dist/menu.link.styles.js +3 -3
- package/dist/menu.options.d.ts +8 -2
- package/dist/menu.options.js +1 -1
- package/dist/menu.options.styles.js +7 -7
- package/dist/modal.d.ts +19 -6
- package/dist/modal.icon-button.d.ts +7 -3
- package/dist/modal.icon-button.js +1 -1
- package/dist/modal.icon-button.styles.js +1 -1
- package/dist/modal.js +1 -1
- package/dist/modal.styles.js +26 -8
- package/dist/popover.d.ts +20 -3
- package/dist/popover.js +1 -1
- package/dist/popover.styles.js +6 -6
- package/dist/radio-group.d.ts +48 -6
- package/dist/radio-group.js +15 -6
- package/dist/radio-group.radio.d.ts +26 -2
- package/dist/radio-group.radio.js +1 -1
- package/dist/split-button.d.ts +15 -5
- package/dist/split-button.js +1 -1
- package/dist/split-button.primary-button.d.ts +10 -1
- package/dist/split-button.primary-button.js +1 -1
- package/dist/split-button.primary-link.d.ts +8 -1
- package/dist/split-button.primary-link.js +1 -1
- package/dist/split-button.secondary-button.d.ts +9 -1
- package/dist/split-button.secondary-button.js +1 -1
- package/dist/split-button.secondary-button.styles.js +2 -2
- package/dist/styles/variables.css +1 -1
- package/dist/tab.d.ts +16 -5
- package/dist/tab.group.d.ts +14 -15
- package/dist/tab.group.js +1 -1
- package/dist/tab.group.styles.js +8 -3
- package/dist/tab.js +1 -1
- package/dist/tab.panel.d.ts +11 -5
- package/dist/tab.panel.js +1 -1
- package/dist/tab.panel.styles.js +9 -2
- package/dist/tag.d.ts +11 -2
- package/dist/tag.js +1 -1
- package/dist/tag.styles.js +4 -4
- package/dist/textarea.d.ts +46 -6
- package/dist/textarea.js +12 -4
- package/dist/toasts.d.ts +18 -16
- package/dist/toasts.js +1 -1
- package/dist/toasts.toast.d.ts +11 -5
- package/dist/toasts.toast.js +1 -1
- package/dist/toasts.toast.styles.js +1 -1
- package/dist/toggle.d.ts +13 -4
- package/dist/toggle.js +1 -1
- package/dist/toggle.styles.js +3 -3
- package/dist/tooltip.container.d.ts +11 -2
- package/dist/tooltip.container.js +1 -1
- package/dist/tooltip.d.ts +40 -3
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.styles.js +7 -7
- package/dist/tree.d.ts +7 -1
- package/dist/tree.item.d.ts +30 -12
- package/dist/tree.item.icon-button.d.ts +7 -2
- package/dist/tree.item.icon-button.js +1 -1
- package/dist/tree.item.icon-button.styles.js +3 -3
- package/dist/tree.item.js +1 -1
- package/dist/tree.item.menu.d.ts +9 -3
- package/dist/tree.item.menu.js +1 -1
- package/dist/tree.item.menu.styles.js +3 -3
- package/dist/tree.item.styles.js +10 -5
- package/dist/tree.js +1 -1
- package/package.json +81 -54
package/dist/checkbox.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,t,i,
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,i,r){var o,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(a<3?o(s):a>3?o(t,i,s):o(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};import"./label.js";import"./tooltip.js";import{html,LitElement}from"lit";import{classMap}from"lit/directives/class-map.js";import{createRef,ref}from"lit/directives/ref.js";import{customElement,property,state}from"lit/decorators.js";import{ifDefined}from"lit/directives/if-defined.js";import{styleMap}from"lit/directives/style-map.js";import{when}from"lit/directives/when.js";import{unsafeHTML}from"lit/directives/unsafe-html.js";import packageJson from"../package.json"with{type:"json"};import checkedIcon from"./icons/checked.js";import styles from"./checkbox.styles.js";import shadowRootMode from"./library/shadow-root-mode.js";import final from"./library/final.js";import required from"./library/required.js";let GlideCoreCheckbox=class GlideCoreCheckbox extends LitElement{static{this.formAssociated=!0}static{this.shadowRootOptions={...LitElement.shadowRootOptions,mode:shadowRootMode}}static{this.styles=styles}get label(){return this.#e}set label(e){this.#e=e,setTimeout((()=>{this.#t()}))}get value(){return this.#i}set value(e){const t=this.#i;this.#i=e,this.dispatchEvent(new CustomEvent("private-value-change",{bubbles:!0,detail:{old:t,new:e}}))}get form(){return this.#r.form}checkValidity(){this.isCheckingValidity=!0;const e=this.#r.checkValidity();return this.isCheckingValidity=!1,e}click(){this.#o.value?.click()}connectedCallback(){super.connectedCallback(),this.#a=new IntersectionObserver((()=>{this.checkVisibility()&&this.#t()})),this.#a.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.form?.removeEventListener("formdata",this.#s),this.#a?.disconnect()}get validity(){return"minimal"===this.privateVariant?this.#r.validity:this.required&&!this.checked?(this.#r.setValidity({customError:Boolean(this.validityMessage),valueMissing:!0}," ",this.#o.value),this.#r.validity):this.required&&this.#r.validity.valueMissing&&this.checked?(this.#r.setValidity({}),this.#r.validity):(this.required||!this.#r.validity.valueMissing||this.checked||this.#r.setValidity({}),this.#r.validity)}focus(e){this.#o.value?.focus(e)}formAssociatedCallback(){this.form?.addEventListener("formdata",this.#s)}formResetCallback(){this.checked=""===this.getAttribute("checked"),this.indeterminate=""===this.getAttribute("indeterminate")}render(){return html`<div class="component" data-test="component">
|
2
2
|
${when("minimal"===this.privateVariant,(()=>html`
|
3
3
|
<label
|
4
4
|
class=${classMap({"label-and-input-and-checkbox":!0,[this.privateSize]:!0})}
|
@@ -11,13 +11,13 @@ var __decorate=this&&this.__decorate||function(e,t,i,o){var r,a=arguments.length
|
|
11
11
|
data-test="input"
|
12
12
|
type="checkbox"
|
13
13
|
.checked=${this.checked}
|
14
|
-
.inert=${this.
|
14
|
+
.inert=${this.privateInternallyInert}
|
15
15
|
?disabled=${this.disabled}
|
16
16
|
?required=${this.required}
|
17
17
|
@change=${this.#n}
|
18
18
|
@input=${this.#n}
|
19
19
|
@keydown=${this.#d}
|
20
|
-
${ref(this.#
|
20
|
+
${ref(this.#o)}
|
21
21
|
/>
|
22
22
|
|
23
23
|
<div
|
@@ -29,12 +29,14 @@ var __decorate=this&&this.__decorate||function(e,t,i,o){var r,a=arguments.length
|
|
29
29
|
</div>
|
30
30
|
|
31
31
|
<div class="icon-and-label">
|
32
|
-
<slot name="private-icon"
|
32
|
+
<slot name="private-icon">
|
33
|
+
<!-- @type {Element} -->
|
34
|
+
</slot>
|
33
35
|
|
34
36
|
<glide-core-tooltip
|
35
37
|
class="label-tooltip"
|
36
38
|
data-test="label-tooltip"
|
37
|
-
label=${ifDefined(this.
|
39
|
+
label=${ifDefined(this.label)}
|
38
40
|
offset=${this.privateLabelTooltipOffset}
|
39
41
|
?disabled=${!this.isLabelOverflow||this.privateDisableLabelTooltip}
|
40
42
|
?open=${this.privateShowLabelTooltip}
|
@@ -51,6 +53,7 @@ var __decorate=this&&this.__decorate||function(e,t,i,o){var r,a=arguments.length
|
|
51
53
|
</div>
|
52
54
|
</label>
|
53
55
|
`),(()=>html`<glide-core-private-label
|
56
|
+
label=${ifDefined(this.label)}
|
54
57
|
orientation=${this.orientation}
|
55
58
|
split=${ifDefined(this.privateSplit??void 0)}
|
56
59
|
tooltip=${ifDefined(this.tooltip)}
|
@@ -81,7 +84,7 @@ var __decorate=this&&this.__decorate||function(e,t,i,o){var r,a=arguments.length
|
|
81
84
|
@change=${this.#n}
|
82
85
|
@input=${this.#n}
|
83
86
|
@keydown=${this.#d}
|
84
|
-
${ref(this.#
|
87
|
+
${ref(this.#o)}
|
85
88
|
/>
|
86
89
|
|
87
90
|
<div
|
@@ -92,13 +95,23 @@ var __decorate=this&&this.__decorate||function(e,t,i,o){var r,a=arguments.length
|
|
92
95
|
</div>
|
93
96
|
</div>
|
94
97
|
|
95
|
-
|
98
|
+
${when(this.summary,(()=>html`<div id="summary" slot="summary">${this.summary}</div>`))}
|
96
99
|
|
97
100
|
<div id="description" slot="description">
|
101
|
+
<!--
|
102
|
+
Additional information or context
|
103
|
+
@type {Element | string}
|
104
|
+
-->
|
98
105
|
<slot
|
99
106
|
class=${classMap({description:!0,hidden:Boolean(this.#l&&this.validityMessage)})}
|
100
107
|
name="description"
|
101
|
-
|
108
|
+
>
|
109
|
+
<!--
|
110
|
+
Additional information or context
|
111
|
+
@type {Element | string}
|
112
|
+
-->
|
113
|
+
</slot>
|
114
|
+
|
102
115
|
${when(this.#l&&this.validityMessage,(()=>html`<span
|
103
116
|
class="validity-message"
|
104
117
|
data-test="validity-message"
|
@@ -106,7 +119,7 @@ var __decorate=this&&this.__decorate||function(e,t,i,o){var r,a=arguments.length
|
|
106
119
|
>`))}
|
107
120
|
</div>
|
108
121
|
</glide-core-private-label>`))}
|
109
|
-
</div>`}reportValidity(){this.privateIsReportValidityOrSubmit=!0;const e=this.#
|
122
|
+
</div>`}reportValidity(){this.privateIsReportValidityOrSubmit=!0;const e=this.#r.reportValidity();return this.requestUpdate(),e}resetValidityFeedback(){this.privateIsReportValidityOrSubmit=!1}setCustomValidity(e){this.validityMessage=e,""===e?this.#r.setValidity({customError:!1},"",this.#o.value):this.#r.setValidity({customError:!0,valueMissing:this.#r.validity.valueMissing}," ",this.#o.value)}setValidity(e,t){this.validityMessage=t,this.#r.setValidity(e," ",this.#o.value)}updated(){this.#o.value&&(this.#o.value.indeterminate=this.indeterminate)}constructor(){super(),this.checked=!1,this.privateInternallyInert=!1,this.disabled=!1,this.hideLabel=!1,this.indeterminate=!1,this.orientation="horizontal",this.name="",this.privateLabelTooltipOffset=4,this.privateShowLabelTooltip=!1,this.privateDisableLabelTooltip=!1,this.privateSize="large",this.required=!1,this.privateIsReportValidityOrSubmit=!1,this.version=packageJson.version,this.isBlurring=!1,this.isCheckingValidity=!1,this.isLabelOverflow=!1,this.#o=createRef(),this.#h=createRef(),this.#i="",this.#s=({formData:e})=>{this.checked&&this.name&&this.value&&!this.disabled&&e.append(this.name,this.value)},this.#r=this.attachInternals(),this.addEventListener("invalid",(e=>{if(e?.preventDefault(),this.isCheckingValidity||this.isBlurring)return;this.privateIsReportValidityOrSubmit=!0;this.form?.querySelector(":invalid")===this&&this.focus()}))}#o;#r;#a;#e;#h;#i;#s;get#l(){return"minimal"===this.privateVariant?!this.validity.valid&&this.privateIsReportValidityOrSubmit:!this.disabled&&!this.validity.valid&&this.privateIsReportValidityOrSubmit}#c(){this.isBlurring=!0,this.reportValidity(),this.isBlurring=!1}#n(e){e.target instanceof HTMLInputElement&&(this.checked=e.target.checked),this.indeterminate=!1,"change"===e.type&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#d(e){"Enter"===e.key&&this.form?.requestSubmit()}#t(){this.#h.value&&(this.isLabelOverflow=this.#h.value.scrollWidth>this.#h.value.clientWidth)}};__decorate([property({type:Boolean})],GlideCoreCheckbox.prototype,"checked",void 0),__decorate([property({attribute:"private-internally-inert",type:Boolean})],GlideCoreCheckbox.prototype,"privateInternallyInert",void 0),__decorate([property({reflect:!0,type:Boolean})],GlideCoreCheckbox.prototype,"disabled",void 0),__decorate([property({attribute:"hide-label",type:Boolean})],GlideCoreCheckbox.prototype,"hideLabel",void 0),__decorate([property({type:Boolean})],GlideCoreCheckbox.prototype,"indeterminate",void 0),__decorate([property({reflect:!0}),required],GlideCoreCheckbox.prototype,"label",null),__decorate([property({reflect:!0})],GlideCoreCheckbox.prototype,"orientation",void 0),__decorate([property({reflect:!0})],GlideCoreCheckbox.prototype,"name",void 0),__decorate([property({attribute:"private-label-tooltip-offset",reflect:!0,type:Number})],GlideCoreCheckbox.prototype,"privateLabelTooltipOffset",void 0),__decorate([property({attribute:"private-show-label-tooltip",reflect:!0,type:Boolean})],GlideCoreCheckbox.prototype,"privateShowLabelTooltip",void 0),__decorate([property({attribute:"private-disable-label-tooltip",reflect:!0,type:Boolean})],GlideCoreCheckbox.prototype,"privateDisableLabelTooltip",void 0),__decorate([property({attribute:"private-size"})],GlideCoreCheckbox.prototype,"privateSize",void 0),__decorate([property()],GlideCoreCheckbox.prototype,"privateSplit",void 0),__decorate([property({attribute:"private-variant"})],GlideCoreCheckbox.prototype,"privateVariant",void 0),__decorate([property({reflect:!0,type:Boolean})],GlideCoreCheckbox.prototype,"required",void 0),__decorate([property({reflect:!0})],GlideCoreCheckbox.prototype,"summary",void 0),__decorate([property({reflect:!0})],GlideCoreCheckbox.prototype,"tooltip",void 0),__decorate([property({reflect:!0})],GlideCoreCheckbox.prototype,"value",null),__decorate([property({type:Boolean})],GlideCoreCheckbox.prototype,"privateIsReportValidityOrSubmit",void 0),__decorate([property({reflect:!0})],GlideCoreCheckbox.prototype,"version",void 0),__decorate([state()],GlideCoreCheckbox.prototype,"isBlurring",void 0),__decorate([state()],GlideCoreCheckbox.prototype,"isCheckingValidity",void 0),__decorate([state()],GlideCoreCheckbox.prototype,"isLabelOverflow",void 0),__decorate([state()],GlideCoreCheckbox.prototype,"validityMessage",void 0),GlideCoreCheckbox=__decorate([customElement("glide-core-checkbox"),final],GlideCoreCheckbox);export default GlideCoreCheckbox;const icons={indeterminate:html`
|
110
123
|
<svg
|
111
124
|
style=${styleMap({height:"0.875rem",width:"0.875rem"})}
|
112
125
|
viewBox="0 0 14 14"
|
package/dist/checkbox.styles.js
CHANGED
package/dist/drawer.d.ts
CHANGED
@@ -5,11 +5,18 @@ declare global {
|
|
5
5
|
}
|
6
6
|
}
|
7
7
|
/**
|
8
|
-
* @
|
8
|
+
* @attr {string} label
|
9
|
+
* @attr {boolean} [open=false]
|
10
|
+
* @attr {boolean} [pinned=false]
|
9
11
|
*
|
10
|
-
* @
|
12
|
+
* @readonly
|
13
|
+
* @attr {0.19.5} [version]
|
11
14
|
*
|
12
|
-
* @slot - The content of the
|
15
|
+
* @slot {Element | string} - The content of the drawer
|
16
|
+
*
|
17
|
+
* @cssprop [--width=27.375rem] - The width the drawer
|
18
|
+
*
|
19
|
+
* @fires {Event} toggle
|
13
20
|
*/
|
14
21
|
export default class GlideCoreDrawer extends LitElement {
|
15
22
|
#private;
|
@@ -17,6 +24,9 @@ export default class GlideCoreDrawer extends LitElement {
|
|
17
24
|
static styles: import("lit").CSSResult[];
|
18
25
|
label?: string;
|
19
26
|
pinned: boolean;
|
27
|
+
/**
|
28
|
+
* @default false
|
29
|
+
*/
|
20
30
|
get open(): boolean;
|
21
31
|
set open(isOpen: boolean);
|
22
32
|
readonly version: string;
|
package/dist/drawer.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var __decorate=this&&this.__decorate||function(e,t,o,
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s};import{html,LitElement}from"lit";import{classMap}from"lit/directives/class-map.js";import{createRef,ref}from"lit/directives/ref.js";import{customElement,property}from"lit/decorators.js";import{ifDefined}from"lit/directives/if-defined.js";import packageJson from"../package.json"with{type:"json"};import styles from"./drawer.styles.js";import assertSlot from"./library/assert-slot.js";import shadowRootMode from"./library/shadow-root-mode.js";import final from"./library/final.js";import required from"./library/required.js";let GlideCoreDrawer=class GlideCoreDrawer extends LitElement{constructor(){super(...arguments),this.pinned=!1,this.version=packageJson.version,this.#e=createRef(),this.#t=createRef(),this.#o=!1}static{this.shadowRootOptions={...LitElement.shadowRootOptions,mode:shadowRootMode}}static{this.styles=styles}get open(){return this.#o}set open(e){const t=e!==this.#o;this.#o=e;const o=window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:300;this.#o&&t?(this.#i?.cancel(),this.#e?.value?.classList?.add("open"),this.#r=this.#e?.value?.animate({transform:["translateX(100%)","translateX(0)"]},{duration:o,fill:"forwards",easing:"cubic-bezier(0.33, 1, 0.68, 1)"}),this.#e?.value?.animate({opacity:[0,1]},{duration:o,fill:"forwards",easing:"ease-in",composite:"add"}),this.#r?.finished.then((()=>{this.#e?.value?.focus(),this.dispatchEvent(new Event("toggle",{bubbles:!0,composed:!0}))}))):t&&(this.#r?.cancel(),this.#i=this.#e?.value?.animate({transform:["translateX(0)","translateX(100%)"]},{duration:o,fill:"forwards",easing:"cubic-bezier(0.33, 1, 0.68, 1)"}),this.#e?.value?.animate({opacity:[1,0]},{duration:o,fill:"forwards",composite:"add"}),this.#i?.finished.then((()=>{this.#e.value?.classList?.remove("open"),this.dispatchEvent(new Event("toggle",{bubbles:!0,composed:!0}))})))}firstUpdated(){this.#o&&(this.#e?.value?.classList?.add("open"),this.#r=this.#e?.value?.animate({transform:"translateX(0)"},{duration:0,fill:"forwards"}),this.#e?.value?.animate({opacity:1},{duration:0,fill:"forwards",composite:"add"}))}render(){return html`<aside aria-label="${ifDefined(this.label)}" class="${classMap({component:!0,pinned:this.pinned})}" data-test="component" tabindex="-1" ${ref(this.#e)}><slot ${assertSlot()} ${ref(this.#t)}></slot></aside>`}#i;#e;#t;#o;#r};__decorate([property({reflect:!0}),required],GlideCoreDrawer.prototype,"label",void 0),__decorate([property({reflect:!0,type:Boolean})],GlideCoreDrawer.prototype,"pinned",void 0),__decorate([property({reflect:!0,type:Boolean})],GlideCoreDrawer.prototype,"open",null),__decorate([property({reflect:!0})],GlideCoreDrawer.prototype,"version",void 0),GlideCoreDrawer=__decorate([customElement("glide-core-drawer"),final],GlideCoreDrawer);export default GlideCoreDrawer;
|
package/dist/drawer.styles.js
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
import{css}from"lit";export default[css`
|
2
|
+
:host {
|
3
|
+
/* The width the drawer */
|
4
|
+
--width: 27.375rem;
|
5
|
+
}
|
6
|
+
|
2
7
|
.component {
|
3
8
|
background-color: var(--glide-core-surface-base-xlightest);
|
4
9
|
block-size: 0;
|
@@ -27,7 +32,7 @@ import{css}from"lit";export default[css`
|
|
27
32
|
.open {
|
28
33
|
backdrop-filter: blur(50px);
|
29
34
|
block-size: auto;
|
30
|
-
inline-size: var(--width
|
35
|
+
inline-size: var(--width);
|
31
36
|
inset: 0 0 0 auto;
|
32
37
|
visibility: visible;
|
33
38
|
}
|
package/dist/dropdown.d.ts
CHANGED
@@ -11,14 +11,64 @@ declare global {
|
|
11
11
|
}
|
12
12
|
}
|
13
13
|
/**
|
14
|
-
* @
|
15
|
-
* @
|
16
|
-
* @
|
17
|
-
* @
|
14
|
+
* @attr {string} label
|
15
|
+
* @attr {string} [add-button-label]
|
16
|
+
* @attr {boolean} [disabled=false]
|
17
|
+
* @attr {boolean} [filterable=false]
|
18
|
+
* @attr {boolean} [hide-label=false]
|
19
|
+
* @attr {boolean} [multiple=false]
|
20
|
+
* @attr {string} [name='']
|
21
|
+
* @attr {boolean} [open=false]
|
22
|
+
* @attr {'horizontal'|'vertical'} [orientation='horizontal']
|
23
|
+
* @attr {string} [placeholder]
|
24
|
+
* @attr {boolean} [readonly=false]
|
25
|
+
* @attr {boolean} [required=false]
|
26
|
+
* @attr {boolean} [select-all=false]
|
27
|
+
* @attr {'large'|'small'} [size='large']
|
28
|
+
* @attr {string} [tooltip]
|
29
|
+
* @attr {string[]} [value=[]]
|
30
|
+
* @attr {'quiet'} [variant]
|
18
31
|
*
|
19
|
-
* @
|
20
|
-
* @
|
21
|
-
*
|
32
|
+
* @readonly
|
33
|
+
* @attr {0.19.5} [version]
|
34
|
+
*
|
35
|
+
* @slot {GlideCoreDropdownOption}
|
36
|
+
* @slot {Element | string} [description] - Additional information or context
|
37
|
+
* @slot {Element} [icon:value] - Icons for the selected option or options. Slot one icon per option. `<value>` should be equal to the `value` of each option.
|
38
|
+
*
|
39
|
+
* @fires {Event} add
|
40
|
+
* @fires {Event} change
|
41
|
+
* @fires {Event} input
|
42
|
+
* @fires {Event} invalid
|
43
|
+
* @fires {Event} toggle
|
44
|
+
*
|
45
|
+
* @readonly
|
46
|
+
* @prop {HTMLFormElement | null} form
|
47
|
+
*
|
48
|
+
* @readonly
|
49
|
+
* @prop {ValidityState} validity
|
50
|
+
*
|
51
|
+
* @method checkValidity
|
52
|
+
* @returns boolean
|
53
|
+
*
|
54
|
+
* @method filter
|
55
|
+
* @param {string} query
|
56
|
+
* @returns Promise<GlideCoreDropdownOption[]>
|
57
|
+
*
|
58
|
+
* @method formAssociatedCallback
|
59
|
+
* @method formResetCallback
|
60
|
+
*
|
61
|
+
* @method reportValidity
|
62
|
+
* @returns boolean
|
63
|
+
*
|
64
|
+
* @method resetValidityFeedback
|
65
|
+
*
|
66
|
+
* @method setCustomValidity
|
67
|
+
* @param {string} message
|
68
|
+
*
|
69
|
+
* @method setValidity
|
70
|
+
* @param {ValidityStateFlags} [flags]
|
71
|
+
* @param {string} [message]
|
22
72
|
*/
|
23
73
|
export default class GlideCoreDropdown extends LitElement implements FormControl {
|
24
74
|
#private;
|
@@ -26,13 +76,22 @@ export default class GlideCoreDropdown extends LitElement implements FormControl
|
|
26
76
|
static shadowRootOptions: ShadowRootInit;
|
27
77
|
static styles: import("lit").CSSResult[];
|
28
78
|
addButtonLabel?: string;
|
79
|
+
/**
|
80
|
+
* @default false
|
81
|
+
*/
|
29
82
|
get disabled(): boolean;
|
30
83
|
set disabled(isDisabled: boolean);
|
84
|
+
/**
|
85
|
+
* @default false
|
86
|
+
*/
|
31
87
|
get filterable(): boolean;
|
32
88
|
set filterable(isFilterable: boolean);
|
33
89
|
hideLabel: boolean;
|
34
90
|
label?: string;
|
35
91
|
name: string;
|
92
|
+
/**
|
93
|
+
* @default false
|
94
|
+
*/
|
36
95
|
get open(): boolean;
|
37
96
|
set open(isOpen: boolean);
|
38
97
|
orientation: 'horizontal' | 'vertical';
|
@@ -40,12 +99,21 @@ export default class GlideCoreDropdown extends LitElement implements FormControl
|
|
40
99
|
privateSplit?: 'left' | 'middle';
|
41
100
|
readonly: boolean;
|
42
101
|
selectAll: boolean;
|
43
|
-
|
44
|
-
|
102
|
+
required: boolean;
|
103
|
+
/**
|
104
|
+
* @default false
|
105
|
+
*/
|
45
106
|
get multiple(): boolean;
|
46
107
|
set multiple(isMultiple: boolean);
|
47
|
-
|
108
|
+
/**
|
109
|
+
* @default 'large'
|
110
|
+
*/
|
111
|
+
get size(): 'large' | 'small';
|
112
|
+
set size(size: 'large' | 'small');
|
48
113
|
tooltip?: string;
|
114
|
+
/**
|
115
|
+
* @default []
|
116
|
+
*/
|
49
117
|
get value(): string[];
|
50
118
|
set value(value: string[]);
|
51
119
|
variant?: 'quiet';
|
@@ -66,7 +134,6 @@ export default class GlideCoreDropdown extends LitElement implements FormControl
|
|
66
134
|
focus(options?: FocusOptions): void;
|
67
135
|
get form(): HTMLFormElement | null;
|
68
136
|
get validity(): ValidityState;
|
69
|
-
get willValidate(): boolean;
|
70
137
|
formAssociatedCallback(): void;
|
71
138
|
formResetCallback(): void;
|
72
139
|
render(): import("lit").TemplateResult<1>;
|