@aurodesignsystem/auro-formkit 2.0.0-beta.2 → 2.0.0-beta.4
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/.turbo/cache/013a48308b893dac-meta.json +1 -1
- package/.turbo/cache/02244170c798a2bd-meta.json +1 -0
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/051ff97a20add0e2-meta.json +1 -0
- package/.turbo/cache/051ff97a20add0e2.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/0ea853339c064fa1-meta.json +1 -0
- package/.turbo/cache/0ea853339c064fa1.tar.zst +0 -0
- package/.turbo/cache/16658beec9f4a809-meta.json +1 -0
- package/.turbo/cache/16658beec9f4a809.tar.zst +0 -0
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
- package/.turbo/cache/1df4710eef8ed00d-meta.json +1 -0
- package/.turbo/cache/1df4710eef8ed00d.tar.zst +0 -0
- package/.turbo/cache/204b66d1b253e9cc-meta.json +1 -0
- package/.turbo/cache/204b66d1b253e9cc.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/2a5d0939d6fc1052-meta.json +1 -0
- package/.turbo/cache/2a5d0939d6fc1052.tar.zst +0 -0
- package/.turbo/cache/2e3b829fcf75c836-meta.json +1 -0
- package/.turbo/cache/2e3b829fcf75c836.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/3d380d0d40404cac-meta.json +1 -0
- package/.turbo/cache/3d380d0d40404cac.tar.zst +0 -0
- package/.turbo/cache/3e12285c614db539-meta.json +1 -0
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
- package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
- package/.turbo/cache/691a74627ec57993-meta.json +1 -1
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
- package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
- package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
- package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
- package/.turbo/cache/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/7ffd501e81790676-meta.json +1 -0
- package/.turbo/cache/7ffd501e81790676.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +1 -0
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
- package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
- package/.turbo/cache/8e9ebc3df0e18de0-meta.json +1 -0
- package/.turbo/cache/8e9ebc3df0e18de0.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/973d0eea26083f4b-meta.json +1 -0
- package/.turbo/cache/973d0eea26083f4b.tar.zst +0 -0
- package/.turbo/cache/9c6ad42729c7b2d8-meta.json +1 -0
- package/.turbo/cache/9c6ad42729c7b2d8.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/a9a9d012c83882d8-meta.json +1 -0
- package/.turbo/cache/a9a9d012c83882d8.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
- package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
- package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +1 -0
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
- package/.turbo/cache/db361cb6578dca84-meta.json +1 -0
- package/.turbo/cache/db361cb6578dca84.tar.zst +0 -0
- package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f3ff9040a2196834-meta.json +1 -0
- package/.turbo/cache/f3ff9040a2196834.tar.zst +0 -0
- package/.turbo/cache/f817d89688cefca8-meta.json +1 -0
- package/.turbo/cache/f817d89688cefca8.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fc57c17867dcac3d-meta.json +1 -0
- package/.turbo/cache/fc57c17867dcac3d.tar.zst +0 -0
- package/CHANGELOG.md +44 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/demo/api.md +4 -2
- package/components/checkbox/demo/api.min.js +31 -36
- package/components/checkbox/demo/index.min.js +31 -36
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/index.js +31 -36
- package/components/checkbox/src/auro-checkbox-group.js +2 -2
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +500 -218
- package/components/combobox/demo/index.min.js +500 -218
- package/components/combobox/dist/auro-combobox.d.ts +11 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +499 -217
- package/components/combobox/src/auro-combobox.js +22 -20
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/datepicker/.turbo/turbo-build.log +9 -8
- package/components/datepicker/demo/api.md +107 -87
- package/components/datepicker/demo/api.min.js +492 -232
- package/components/datepicker/demo/index.min.js +492 -232
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +492 -232
- package/components/datepicker/src/auro-datepicker.js +15 -35
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +2 -2
- package/components/dropdown/demo/api.md +4 -4
- package/components/dropdown/demo/api.min.js +166 -42
- package/components/dropdown/demo/index.min.js +166 -42
- package/components/dropdown/dist/auro-dropdown.d.ts +93 -34
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +9 -3
- package/components/dropdown/dist/auro-dropdownBib.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +166 -42
- package/components/dropdown/src/auro-dropdown.js +154 -39
- package/components/dropdown/src/auro-dropdownBib.js +12 -3
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +4 -0
- package/components/dropdown/src/styles/style.scss +5 -0
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
- package/components/input/.turbo/turbo-build.log +56 -6
- package/components/input/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
- package/components/input/demo/api.md +83 -81
- package/components/input/demo/api.min.js +282 -121
- package/components/input/demo/index.md +6 -6
- package/components/input/demo/index.min.js +282 -121
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +155 -84
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +282 -121
- package/components/input/dist/styles/mixins-css.d.ts +3 -0
- package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +252 -85
- package/components/input/src/styles/borders.scss +3 -19
- package/components/input/src/styles/color.css +1 -2
- package/components/input/src/styles/color.scss +3 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +1 -1
- package/components/input/src/styles/input.scss +4 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +1 -1
- package/components/input/src/styles/label.scss +4 -7
- package/components/input/src/styles/mixins-css.js +2 -0
- package/components/input/src/styles/mixins.css +1 -0
- package/components/input/src/styles/mixins.scss +45 -0
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +13 -12
- package/components/input/src/styles/notificationIcons.scss +17 -25
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +15 -17
- package/components/input/src/styles/style.scss +0 -4
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +30 -35
- package/components/radio/demo/index.min.js +30 -35
- package/components/radio/dist/index.js +30 -35
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build.log +7 -9
- package/components/select/demo/api.md +45 -110
- package/components/select/demo/api.min.js +320 -224
- package/components/select/demo/index.md +100 -43
- package/components/select/demo/index.min.js +320 -220
- package/components/select/dist/auro-select.d.ts +64 -51
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +314 -201
- package/components/select/src/auro-select.js +100 -118
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +7 -0
- package/components/select/src/styles/style.scss +11 -1
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +29 -34
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/1de15d89eed2d760-meta.json +0 -1
- package/.turbo/cache/1de15d89eed2d760.tar.zst +0 -0
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +0 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/47ba2b5ebdb579e9-meta.json +0 -1
- package/.turbo/cache/47ba2b5ebdb579e9.tar.zst +0 -0
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +0 -1
- package/.turbo/cache/4f92cea2d8c63de2.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +0 -1
- package/.turbo/cache/5c16ce3cff5c9dff.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/784c03fe9fd5ac05-meta.json +0 -1
- package/.turbo/cache/784c03fe9fd5ac05.tar.zst +0 -0
- package/.turbo/cache/87219c41a4ace9cd-meta.json +0 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8b735250fa5a62bf-meta.json +0 -1
- package/.turbo/cache/8b735250fa5a62bf.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/993dff2edb7b6766-meta.json +0 -1
- package/.turbo/cache/993dff2edb7b6766.tar.zst +0 -0
- package/.turbo/cache/9a097d6576dadd64-meta.json +0 -1
- package/.turbo/cache/9a097d6576dadd64.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +0 -1
- package/.turbo/cache/a6a56bb802e1c20f.tar.zst +0 -0
- package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
- package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
- package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
- package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
- package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
- package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d716cb7a08152beb-meta.json +0 -1
- package/.turbo/cache/d716cb7a08152beb.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +0 -1
- package/.turbo/cache/fbbe2704bf9cb90b.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
- /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
|
@@ -2402,7 +2402,7 @@ class AuroIcon extends BaseIcon {
|
|
|
2402
2402
|
|
|
2403
2403
|
var iconVersion = '6.1.2';
|
|
2404
2404
|
|
|
2405
|
-
var styleCss$1 = i$3`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2405
|
+
var styleCss$1 = i$3`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2406
2406
|
|
|
2407
2407
|
var colorCss$1 = i$3`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);outline:1px solid var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2408
2408
|
|
|
@@ -2426,9 +2426,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2426
2426
|
];
|
|
2427
2427
|
|
|
2428
2428
|
/**
|
|
2429
|
-
* @attr { Boolean } common - If declared, will apply all styles for the common theme.
|
|
2430
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
|
|
2431
|
-
* @attr { Boolean } inset - If declared, will apply extra padding to bib content.
|
|
2432
2429
|
* @prop { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2433
2430
|
* @csspart bibContainer - Apply css to the bib container.
|
|
2434
2431
|
*/
|
|
@@ -2454,14 +2451,26 @@ class AuroDropdownBib extends r {
|
|
|
2454
2451
|
|
|
2455
2452
|
static get properties() {
|
|
2456
2453
|
return {
|
|
2454
|
+
|
|
2455
|
+
/**
|
|
2456
|
+
* If declared, will apply all styles for the common theme.
|
|
2457
|
+
*/
|
|
2457
2458
|
common: {
|
|
2458
2459
|
type: Boolean,
|
|
2459
2460
|
reflect: true
|
|
2460
2461
|
},
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* If declared, will apply extra padding to bib content.
|
|
2465
|
+
*/
|
|
2461
2466
|
inset: {
|
|
2462
2467
|
type: Boolean,
|
|
2463
2468
|
reflect: true
|
|
2464
2469
|
},
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* If declared, will apply border-radius to the bib.
|
|
2473
|
+
*/
|
|
2465
2474
|
rounded: {
|
|
2466
2475
|
type: Boolean,
|
|
2467
2476
|
reflect: true
|
|
@@ -2505,22 +2514,7 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2505
2514
|
|
|
2506
2515
|
|
|
2507
2516
|
/**
|
|
2508
|
-
* @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
|
|
2509
|
-
* @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
|
|
2510
|
-
* @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
|
|
2511
|
-
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
2512
2517
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
2513
|
-
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
2514
|
-
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
2515
|
-
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
2516
|
-
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
2517
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
2518
|
-
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
2519
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
2520
|
-
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
2521
|
-
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
2522
|
-
* @attr { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2523
|
-
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
2524
2518
|
* @slot - Default slot for the popover content.
|
|
2525
2519
|
* @slot label - Defines the content of the label.
|
|
2526
2520
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -2558,6 +2552,16 @@ class AuroDropdown extends r {
|
|
|
2558
2552
|
this.tabIndex = 0;
|
|
2559
2553
|
this.noToggle = false;
|
|
2560
2554
|
|
|
2555
|
+
/**
|
|
2556
|
+
* @private
|
|
2557
|
+
*/
|
|
2558
|
+
this.hasTriggerContent = false;
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* @private
|
|
2562
|
+
*/
|
|
2563
|
+
this.triggerContentSlot = undefined;
|
|
2564
|
+
|
|
2561
2565
|
/**
|
|
2562
2566
|
* @private
|
|
2563
2567
|
*/
|
|
@@ -2604,89 +2608,166 @@ class AuroDropdown extends r {
|
|
|
2604
2608
|
// function to define props used within the scope of this component
|
|
2605
2609
|
static get properties() {
|
|
2606
2610
|
return {
|
|
2611
|
+
|
|
2612
|
+
/**
|
|
2613
|
+
* If declared, applies a border around the trigger slot.
|
|
2614
|
+
*/
|
|
2607
2615
|
bordered: {
|
|
2608
2616
|
type: Boolean,
|
|
2609
2617
|
reflect: true
|
|
2610
2618
|
},
|
|
2619
|
+
|
|
2620
|
+
/**
|
|
2621
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
2622
|
+
* @attr {Boolean} chevron
|
|
2623
|
+
*/
|
|
2611
2624
|
chevron: {
|
|
2612
2625
|
type: Boolean,
|
|
2613
2626
|
reflect: true
|
|
2614
2627
|
},
|
|
2615
|
-
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
2631
|
+
*/
|
|
2632
|
+
common: {
|
|
2616
2633
|
type: Boolean,
|
|
2617
2634
|
reflect: true
|
|
2618
2635
|
},
|
|
2619
|
-
|
|
2636
|
+
|
|
2637
|
+
/**
|
|
2638
|
+
* If declared, the dropdown is not interactive.
|
|
2639
|
+
*/
|
|
2640
|
+
disabled: {
|
|
2620
2641
|
type: Boolean,
|
|
2621
2642
|
reflect: true
|
|
2622
2643
|
},
|
|
2623
|
-
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* @private
|
|
2647
|
+
*/
|
|
2648
|
+
dropdownWidth: {
|
|
2649
|
+
type: Number
|
|
2650
|
+
},
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
2654
|
+
*/
|
|
2655
|
+
error: {
|
|
2624
2656
|
type: Boolean,
|
|
2625
|
-
reflect: true
|
|
2657
|
+
reflect: true
|
|
2626
2658
|
},
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
2662
|
+
*/
|
|
2627
2663
|
focusShow: {
|
|
2628
2664
|
type: Boolean,
|
|
2629
2665
|
reflect: true
|
|
2630
2666
|
},
|
|
2631
|
-
|
|
2667
|
+
|
|
2668
|
+
/**
|
|
2669
|
+
* Makes the trigger to be full width of its parent container.
|
|
2670
|
+
*/
|
|
2671
|
+
fluid: {
|
|
2632
2672
|
type: Boolean,
|
|
2633
2673
|
reflect: true
|
|
2634
2674
|
},
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* If declared, will apply padding around trigger slot content.
|
|
2678
|
+
*/
|
|
2635
2679
|
inset: {
|
|
2636
2680
|
type: Boolean,
|
|
2637
2681
|
reflect: true
|
|
2638
2682
|
},
|
|
2639
|
-
|
|
2683
|
+
|
|
2684
|
+
/**
|
|
2685
|
+
* If true, the dropdown bib is displayed.
|
|
2686
|
+
*/
|
|
2687
|
+
isPopoverVisible: {
|
|
2688
|
+
type: Boolean
|
|
2689
|
+
},
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
2693
|
+
*/
|
|
2694
|
+
hoverToggle: {
|
|
2640
2695
|
type: Boolean,
|
|
2641
2696
|
reflect: true
|
|
2642
2697
|
},
|
|
2643
|
-
|
|
2644
|
-
|
|
2698
|
+
|
|
2699
|
+
/**
|
|
2700
|
+
* @private
|
|
2701
|
+
*/
|
|
2702
|
+
hasTriggerContent: {
|
|
2703
|
+
type: Boolean
|
|
2704
|
+
},
|
|
2705
|
+
|
|
2706
|
+
/**
|
|
2707
|
+
* Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2708
|
+
*/
|
|
2709
|
+
mobileFullscreenBreakpoint: {
|
|
2710
|
+
type: String,
|
|
2645
2711
|
reflect: true
|
|
2646
2712
|
},
|
|
2647
|
-
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
2716
|
+
*/
|
|
2717
|
+
matchWidth: {
|
|
2648
2718
|
type: Boolean,
|
|
2649
2719
|
reflect: true
|
|
2650
2720
|
},
|
|
2651
|
-
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
2724
|
+
*/
|
|
2725
|
+
noHideOnThisFocusLoss: {
|
|
2652
2726
|
type: Boolean,
|
|
2653
2727
|
reflect: true
|
|
2654
2728
|
},
|
|
2655
|
-
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
2732
|
+
*/
|
|
2733
|
+
noToggle: {
|
|
2656
2734
|
type: Boolean,
|
|
2657
2735
|
reflect: true
|
|
2658
2736
|
},
|
|
2659
|
-
|
|
2737
|
+
|
|
2660
2738
|
onSlotChange: {
|
|
2661
2739
|
type: Function,
|
|
2662
2740
|
reflect: false
|
|
2663
2741
|
},
|
|
2664
|
-
mobileFullscreenBreakpoint: {
|
|
2665
|
-
type: String,
|
|
2666
|
-
reflect: true,
|
|
2667
|
-
},
|
|
2668
2742
|
|
|
2669
2743
|
/**
|
|
2670
2744
|
* @private
|
|
2671
2745
|
*/
|
|
2672
|
-
|
|
2746
|
+
placement: {
|
|
2747
|
+
type: String
|
|
2748
|
+
},
|
|
2673
2749
|
|
|
2674
2750
|
/**
|
|
2675
|
-
*
|
|
2751
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
2676
2752
|
*/
|
|
2677
|
-
|
|
2753
|
+
rounded: {
|
|
2754
|
+
type: Boolean,
|
|
2755
|
+
reflect: true
|
|
2756
|
+
},
|
|
2678
2757
|
|
|
2679
2758
|
/**
|
|
2680
2759
|
* @private
|
|
2681
2760
|
*/
|
|
2682
|
-
tabIndex: {
|
|
2761
|
+
tabIndex: {
|
|
2762
|
+
type: Number
|
|
2763
|
+
}
|
|
2683
2764
|
};
|
|
2684
2765
|
}
|
|
2685
2766
|
|
|
2686
2767
|
static get styles() {
|
|
2687
2768
|
return [
|
|
2688
|
-
styleCss$1,
|
|
2689
2769
|
colorCss$1,
|
|
2770
|
+
styleCss$1,
|
|
2690
2771
|
tokensCss
|
|
2691
2772
|
];
|
|
2692
2773
|
}
|
|
@@ -2717,6 +2798,12 @@ class AuroDropdown extends r {
|
|
|
2717
2798
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
2718
2799
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
2719
2800
|
}
|
|
2801
|
+
|
|
2802
|
+
// when trigger's content is changed without any attribute or node change,
|
|
2803
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
2804
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
2805
|
+
this.handleTriggerContentSlotChange();
|
|
2806
|
+
}
|
|
2720
2807
|
}
|
|
2721
2808
|
|
|
2722
2809
|
firstUpdated() {
|
|
@@ -2759,6 +2846,43 @@ class AuroDropdown extends r {
|
|
|
2759
2846
|
return inCustomSlot;
|
|
2760
2847
|
}
|
|
2761
2848
|
|
|
2849
|
+
/**
|
|
2850
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
2851
|
+
*
|
|
2852
|
+
* It first updates the floater settings
|
|
2853
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
2854
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
2855
|
+
*
|
|
2856
|
+
* @private
|
|
2857
|
+
* @method handleTriggerContentSlotChange
|
|
2858
|
+
* @param {Event} event - native slotchange event
|
|
2859
|
+
* @returns {void}
|
|
2860
|
+
*/
|
|
2861
|
+
handleTriggerContentSlotChange(event) {
|
|
2862
|
+
this.floater.handleTriggerTabIndex();
|
|
2863
|
+
|
|
2864
|
+
if (event) {
|
|
2865
|
+
this.triggerNode = event.target;
|
|
2866
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
if (this.triggerContentSlot) {
|
|
2870
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
2871
|
+
if (slot.textContent.trim()) {
|
|
2872
|
+
return true;
|
|
2873
|
+
}
|
|
2874
|
+
const slotInSlot = slot.querySelector('slot');
|
|
2875
|
+
if (!slotInSlot) {
|
|
2876
|
+
return false;
|
|
2877
|
+
}
|
|
2878
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
2879
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
2880
|
+
});
|
|
2881
|
+
} else {
|
|
2882
|
+
this.hasTriggerContent = false;
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2762
2886
|
/**
|
|
2763
2887
|
* Handles the default slot change event and updates the content.
|
|
2764
2888
|
*
|
|
@@ -2793,13 +2917,13 @@ class AuroDropdown extends r {
|
|
|
2793
2917
|
tabindex="${this.tabIndex}"
|
|
2794
2918
|
>
|
|
2795
2919
|
<div class="triggerContentWrapper">
|
|
2796
|
-
<label class="label" id="triggerLabel">
|
|
2920
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
2797
2921
|
<slot name="label"></slot>
|
|
2798
2922
|
</label>
|
|
2799
2923
|
<div class="triggerContent">
|
|
2800
2924
|
<slot
|
|
2801
2925
|
name="trigger"
|
|
2802
|
-
@slotchange="${() =>
|
|
2926
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
2803
2927
|
</div>
|
|
2804
2928
|
</div>
|
|
2805
2929
|
${this.chevron || this.common ? u$1`
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// ---------------------------------------------------------------------
|
|
5
5
|
|
|
6
6
|
/* eslint-disable max-lines, lit-a11y/accessible-name, lit/no-invalid-html, lit/binding-positions,
|
|
7
|
-
arrow-body-style, no-extra-parens, block-spacing, brace-style, curly, template-curly-spacing */
|
|
7
|
+
arrow-body-style, no-extra-parens, block-spacing, brace-style, curly, template-curly-spacing, no-underscore-dangle */
|
|
8
8
|
|
|
9
9
|
import { html } from "lit/static-html.js";
|
|
10
10
|
import { LitElement } from "lit";
|
|
@@ -24,22 +24,7 @@ import tokensCss from "./styles/tokens-css.js";
|
|
|
24
24
|
import './auro-dropdownBib.js';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* @attr { Boolean } bordered - If declared, applies a border around the trigger slot.
|
|
28
|
-
* @attr { Boolean } common - If declared, the dropdown will be styled with the common theme.
|
|
29
|
-
* @attr { Boolean } chevron - If declared, the dropdown displays an display state chevron on the right.
|
|
30
|
-
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
31
27
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
32
|
-
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
33
|
-
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
34
|
-
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
35
|
-
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
36
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
37
|
-
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
38
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
39
|
-
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
40
|
-
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
41
|
-
* @attr { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
42
|
-
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
43
28
|
* @slot - Default slot for the popover content.
|
|
44
29
|
* @slot label - Defines the content of the label.
|
|
45
30
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -77,6 +62,16 @@ export class AuroDropdown extends LitElement {
|
|
|
77
62
|
this.tabIndex = 0;
|
|
78
63
|
this.noToggle = false;
|
|
79
64
|
|
|
65
|
+
/**
|
|
66
|
+
* @private
|
|
67
|
+
*/
|
|
68
|
+
this.hasTriggerContent = false;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
this.triggerContentSlot = undefined;
|
|
74
|
+
|
|
80
75
|
/**
|
|
81
76
|
* @private
|
|
82
77
|
*/
|
|
@@ -123,89 +118,166 @@ export class AuroDropdown extends LitElement {
|
|
|
123
118
|
// function to define props used within the scope of this component
|
|
124
119
|
static get properties() {
|
|
125
120
|
return {
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* If declared, applies a border around the trigger slot.
|
|
124
|
+
*/
|
|
126
125
|
bordered: {
|
|
127
126
|
type: Boolean,
|
|
128
127
|
reflect: true
|
|
129
128
|
},
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* If declared, the dropdown displays a chevron on the right.
|
|
132
|
+
* @attr {Boolean} chevron
|
|
133
|
+
*/
|
|
130
134
|
chevron: {
|
|
131
135
|
type: Boolean,
|
|
132
136
|
reflect: true
|
|
133
137
|
},
|
|
134
|
-
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* If declared, the dropdown will be styled with the common theme.
|
|
141
|
+
*/
|
|
142
|
+
common: {
|
|
135
143
|
type: Boolean,
|
|
136
144
|
reflect: true
|
|
137
145
|
},
|
|
138
|
-
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* If declared, the dropdown is not interactive.
|
|
149
|
+
*/
|
|
150
|
+
disabled: {
|
|
139
151
|
type: Boolean,
|
|
140
152
|
reflect: true
|
|
141
153
|
},
|
|
142
|
-
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
dropdownWidth: {
|
|
159
|
+
type: Number
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
164
|
+
*/
|
|
165
|
+
error: {
|
|
143
166
|
type: Boolean,
|
|
144
|
-
reflect: true
|
|
167
|
+
reflect: true
|
|
145
168
|
},
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* If declared, the bib will display when focus is applied to the trigger.
|
|
172
|
+
*/
|
|
146
173
|
focusShow: {
|
|
147
174
|
type: Boolean,
|
|
148
175
|
reflect: true
|
|
149
176
|
},
|
|
150
|
-
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Makes the trigger to be full width of its parent container.
|
|
180
|
+
*/
|
|
181
|
+
fluid: {
|
|
151
182
|
type: Boolean,
|
|
152
183
|
reflect: true
|
|
153
184
|
},
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* If declared, will apply padding around trigger slot content.
|
|
188
|
+
*/
|
|
154
189
|
inset: {
|
|
155
190
|
type: Boolean,
|
|
156
191
|
reflect: true
|
|
157
192
|
},
|
|
158
|
-
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* If true, the dropdown bib is displayed.
|
|
196
|
+
*/
|
|
197
|
+
isPopoverVisible: {
|
|
198
|
+
type: Boolean
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* If declared, the trigger will toggle the dropdown on mouseover/mouseout.
|
|
203
|
+
*/
|
|
204
|
+
hoverToggle: {
|
|
159
205
|
type: Boolean,
|
|
160
206
|
reflect: true
|
|
161
207
|
},
|
|
162
|
-
|
|
163
|
-
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
hasTriggerContent: {
|
|
213
|
+
type: Boolean
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
218
|
+
*/
|
|
219
|
+
mobileFullscreenBreakpoint: {
|
|
220
|
+
type: String,
|
|
164
221
|
reflect: true
|
|
165
222
|
},
|
|
166
|
-
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
226
|
+
*/
|
|
227
|
+
matchWidth: {
|
|
167
228
|
type: Boolean,
|
|
168
229
|
reflect: true
|
|
169
230
|
},
|
|
170
|
-
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
234
|
+
*/
|
|
235
|
+
noHideOnThisFocusLoss: {
|
|
171
236
|
type: Boolean,
|
|
172
237
|
reflect: true
|
|
173
238
|
},
|
|
174
|
-
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* If declared, the trigger will only show the dropdown bib.
|
|
242
|
+
*/
|
|
243
|
+
noToggle: {
|
|
175
244
|
type: Boolean,
|
|
176
245
|
reflect: true
|
|
177
246
|
},
|
|
178
|
-
|
|
247
|
+
|
|
179
248
|
onSlotChange: {
|
|
180
249
|
type: Function,
|
|
181
250
|
reflect: false
|
|
182
251
|
},
|
|
183
|
-
mobileFullscreenBreakpoint: {
|
|
184
|
-
type: String,
|
|
185
|
-
reflect: true,
|
|
186
|
-
},
|
|
187
252
|
|
|
188
253
|
/**
|
|
189
254
|
* @private
|
|
190
255
|
*/
|
|
191
|
-
|
|
256
|
+
placement: {
|
|
257
|
+
type: String
|
|
258
|
+
},
|
|
192
259
|
|
|
193
260
|
/**
|
|
194
|
-
*
|
|
261
|
+
* If declared, will apply border-radius to trigger and default slots.
|
|
195
262
|
*/
|
|
196
|
-
|
|
263
|
+
rounded: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
reflect: true
|
|
266
|
+
},
|
|
197
267
|
|
|
198
268
|
/**
|
|
199
269
|
* @private
|
|
200
270
|
*/
|
|
201
|
-
tabIndex: {
|
|
271
|
+
tabIndex: {
|
|
272
|
+
type: Number
|
|
273
|
+
}
|
|
202
274
|
};
|
|
203
275
|
}
|
|
204
276
|
|
|
205
277
|
static get styles() {
|
|
206
278
|
return [
|
|
207
|
-
styleCss,
|
|
208
279
|
colorCss,
|
|
280
|
+
styleCss,
|
|
209
281
|
tokensCss
|
|
210
282
|
];
|
|
211
283
|
}
|
|
@@ -236,6 +308,12 @@ export class AuroDropdown extends LitElement {
|
|
|
236
308
|
if (changedProperties.has('mobileFullscreenBreakpoint')) {
|
|
237
309
|
this.bibContent.mobileFullscreenBreakpoint = this.mobileFullscreenBreakpoint;
|
|
238
310
|
}
|
|
311
|
+
|
|
312
|
+
// when trigger's content is changed without any attribute or node change,
|
|
313
|
+
// `requestUpdate` needs to be called to update hasTriggerContnet
|
|
314
|
+
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
315
|
+
this.handleTriggerContentSlotChange();
|
|
316
|
+
}
|
|
239
317
|
}
|
|
240
318
|
|
|
241
319
|
firstUpdated() {
|
|
@@ -280,6 +358,43 @@ export class AuroDropdown extends LitElement {
|
|
|
280
358
|
return inCustomSlot;
|
|
281
359
|
}
|
|
282
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Handles changes to the trigger content slot and updates related properties.
|
|
363
|
+
*
|
|
364
|
+
* It first updates the floater settings
|
|
365
|
+
* Then, it retrieves the assigned nodes from the event target and checks if any of
|
|
366
|
+
* the nodes contain non-empty text content, updating the `hasTriggerContent` property accordingly.
|
|
367
|
+
*
|
|
368
|
+
* @private
|
|
369
|
+
* @method handleTriggerContentSlotChange
|
|
370
|
+
* @param {Event} event - native slotchange event
|
|
371
|
+
* @returns {void}
|
|
372
|
+
*/
|
|
373
|
+
handleTriggerContentSlotChange(event) {
|
|
374
|
+
this.floater.handleTriggerTabIndex();
|
|
375
|
+
|
|
376
|
+
if (event) {
|
|
377
|
+
this.triggerNode = event.target;
|
|
378
|
+
this.triggerContentSlot = event.target.assignedNodes();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
if (this.triggerContentSlot) {
|
|
382
|
+
this.hasTriggerContent = this.triggerContentSlot.some((slot) => {
|
|
383
|
+
if (slot.textContent.trim()) {
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
386
|
+
const slotInSlot = slot.querySelector('slot');
|
|
387
|
+
if (!slotInSlot) {
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
390
|
+
const slotsInSlotNodes = slotInSlot.assignedNodes();
|
|
391
|
+
return slotsInSlotNodes.some((ss) => Boolean(ss.textContent.trim()));
|
|
392
|
+
});
|
|
393
|
+
} else {
|
|
394
|
+
this.hasTriggerContent = false;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
283
398
|
/**
|
|
284
399
|
* Handles the default slot change event and updates the content.
|
|
285
400
|
*
|
|
@@ -314,13 +429,13 @@ export class AuroDropdown extends LitElement {
|
|
|
314
429
|
tabindex="${this.tabIndex}"
|
|
315
430
|
>
|
|
316
431
|
<div class="triggerContentWrapper">
|
|
317
|
-
<label class="label" id="triggerLabel">
|
|
432
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
318
433
|
<slot name="label"></slot>
|
|
319
434
|
</label>
|
|
320
435
|
<div class="triggerContent">
|
|
321
436
|
<slot
|
|
322
437
|
name="trigger"
|
|
323
|
-
@slotchange="${() =>
|
|
438
|
+
@slotchange="${(event) => this.handleTriggerContentSlotChange(event)}"></slot>
|
|
324
439
|
</div>
|
|
325
440
|
</div>
|
|
326
441
|
${this.chevron || this.common ? html`
|
|
@@ -22,9 +22,6 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* @attr { Boolean } common - If declared, will apply all styles for the common theme.
|
|
26
|
-
* @attr { Boolean } rounded - If declared, will apply border-radius to the bib.
|
|
27
|
-
* @attr { Boolean } inset - If declared, will apply extra padding to bib content.
|
|
28
25
|
* @prop { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
29
26
|
* @csspart bibContainer - Apply css to the bib container.
|
|
30
27
|
*/
|
|
@@ -50,14 +47,26 @@ export class AuroDropdownBib extends LitElement {
|
|
|
50
47
|
|
|
51
48
|
static get properties() {
|
|
52
49
|
return {
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* If declared, will apply all styles for the common theme.
|
|
53
|
+
*/
|
|
53
54
|
common: {
|
|
54
55
|
type: Boolean,
|
|
55
56
|
reflect: true
|
|
56
57
|
},
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* If declared, will apply extra padding to bib content.
|
|
61
|
+
*/
|
|
57
62
|
inset: {
|
|
58
63
|
type: Boolean,
|
|
59
64
|
reflect: true
|
|
60
65
|
},
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* If declared, will apply border-radius to the bib.
|
|
69
|
+
*/
|
|
61
70
|
rounded: {
|
|
62
71
|
type: Boolean,
|
|
63
72
|
reflect: true
|