@aurodesignsystem/auro-formkit 2.1.0 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -2
- package/components/bibtemplate/dist/index.js +2 -2
- package/components/bibtemplate/dist/registered.js +2 -2
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/readme.md +1 -1
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.md +122 -19
- package/components/combobox/demo/api.min.js +160 -24
- package/components/combobox/demo/index.min.js +160 -24
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +42 -0
- package/components/combobox/dist/index.js +160 -24
- package/components/combobox/dist/registered.js +160 -24
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.md +113 -10
- package/components/counter/demo/api.min.js +178 -47
- package/components/counter/demo/index.min.js +178 -47
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/auro-counter-group.d.ts +55 -17
- package/components/counter/dist/index.js +178 -47
- package/components/counter/dist/registered.js +178 -47
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +61 -0
- package/components/datepicker/demo/api.min.js +162 -25
- package/components/datepicker/demo/index.min.js +162 -25
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +42 -0
- package/components/datepicker/dist/index.js +162 -25
- package/components/datepicker/dist/registered.js +162 -25
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.md +166 -19
- package/components/dropdown/demo/api.min.js +106 -22
- package/components/dropdown/demo/index.min.js +106 -22
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +63 -7
- package/components/dropdown/dist/index.js +106 -22
- package/components/dropdown/dist/registered.js +106 -22
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/readme.md +1 -1
- package/components/menu/README.md +1 -1
- package/components/menu/demo/readme.md +1 -1
- package/components/radio/README.md +1 -1
- package/components/radio/demo/readme.md +1 -1
- package/components/select/README.md +2 -1
- package/components/select/demo/api.md +142 -17
- package/components/select/demo/api.min.js +160 -24
- package/components/select/demo/index.md +14 -0
- package/components/select/demo/index.min.js +160 -24
- package/components/select/demo/readme.md +2 -1
- package/components/select/dist/auro-select.d.ts +42 -0
- package/components/select/dist/index.js +160 -24
- package/components/select/dist/registered.js +160 -24
- package/package.json +1 -1
|
@@ -4560,7 +4560,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
4560
4560
|
|
|
4561
4561
|
var dropdownVersion$1 = '3.0.0';
|
|
4562
4562
|
|
|
4563
|
-
var styleCss$1$1 = css`: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}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@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)}: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)}`;
|
|
4563
|
+
var styleCss$1$1 = css`: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}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@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)}: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([inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
4564
4564
|
|
|
4565
4565
|
var colorCss$1$1 = css`.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);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8);--ds-auro-dropdown-trigger-outline-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);--ds-auro-dropdown-trigger-outline-color: 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))}: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-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)}`;
|
|
4566
4566
|
|
|
@@ -4820,10 +4820,16 @@ class AuroDropdown extends LitElement {
|
|
|
4820
4820
|
this.disabled = false;
|
|
4821
4821
|
this.error = false;
|
|
4822
4822
|
this.inset = false;
|
|
4823
|
-
this.placement = 'bottom-start';
|
|
4824
4823
|
this.rounded = false;
|
|
4825
4824
|
this.tabIndex = 0;
|
|
4826
4825
|
this.noToggle = false;
|
|
4826
|
+
this.labeled = true;
|
|
4827
|
+
|
|
4828
|
+
// floaterConfig
|
|
4829
|
+
this.placement = 'bottom-start';
|
|
4830
|
+
this.offset = 0;
|
|
4831
|
+
this.noFlip = false;
|
|
4832
|
+
this.autoPlacement = false;
|
|
4827
4833
|
|
|
4828
4834
|
/**
|
|
4829
4835
|
* @private
|
|
@@ -4845,16 +4851,6 @@ class AuroDropdown extends LitElement {
|
|
|
4845
4851
|
*/
|
|
4846
4852
|
this.floater = new AuroFloatingUI();
|
|
4847
4853
|
|
|
4848
|
-
/**
|
|
4849
|
-
* @private
|
|
4850
|
-
*/
|
|
4851
|
-
this.floaterConfig = {
|
|
4852
|
-
placement: 'bottom-start',
|
|
4853
|
-
flip: true,
|
|
4854
|
-
autoPlacement: false,
|
|
4855
|
-
offset: 0,
|
|
4856
|
-
};
|
|
4857
|
-
|
|
4858
4854
|
/**
|
|
4859
4855
|
* Generate unique names for dependency components.
|
|
4860
4856
|
*/
|
|
@@ -4876,6 +4872,18 @@ class AuroDropdown extends LitElement {
|
|
|
4876
4872
|
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4877
4873
|
}
|
|
4878
4874
|
|
|
4875
|
+
/**
|
|
4876
|
+
* @ignore
|
|
4877
|
+
*/
|
|
4878
|
+
get floaterConfig() {
|
|
4879
|
+
return {
|
|
4880
|
+
placement: this.placement,
|
|
4881
|
+
flip: !this.noFlip,
|
|
4882
|
+
autoPlacement: this.autoPlacement,
|
|
4883
|
+
offset: this.offset,
|
|
4884
|
+
};
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4879
4887
|
/**
|
|
4880
4888
|
* Public method to hide the dropdown.
|
|
4881
4889
|
* @returns {void}
|
|
@@ -4896,6 +4904,15 @@ class AuroDropdown extends LitElement {
|
|
|
4896
4904
|
static get properties() {
|
|
4897
4905
|
return {
|
|
4898
4906
|
|
|
4907
|
+
/**
|
|
4908
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
4909
|
+
* @default false
|
|
4910
|
+
*/
|
|
4911
|
+
autoPlacement: {
|
|
4912
|
+
type: Boolean,
|
|
4913
|
+
reflect: true
|
|
4914
|
+
},
|
|
4915
|
+
|
|
4899
4916
|
/**
|
|
4900
4917
|
* If declared, applies a border around the trigger slot.
|
|
4901
4918
|
*/
|
|
@@ -4976,11 +4993,11 @@ class AuroDropdown extends LitElement {
|
|
|
4976
4993
|
},
|
|
4977
4994
|
|
|
4978
4995
|
/**
|
|
4979
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
4996
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
4980
4997
|
*/
|
|
4981
4998
|
isBibFullscreen: {
|
|
4982
4999
|
type: Boolean,
|
|
4983
|
-
reflect: true
|
|
5000
|
+
reflect: true
|
|
4984
5001
|
},
|
|
4985
5002
|
|
|
4986
5003
|
/**
|
|
@@ -5006,6 +5023,15 @@ class AuroDropdown extends LitElement {
|
|
|
5006
5023
|
reflect: true
|
|
5007
5024
|
},
|
|
5008
5025
|
|
|
5026
|
+
/**
|
|
5027
|
+
* Defines if there is a label preset.
|
|
5028
|
+
* @private
|
|
5029
|
+
*/
|
|
5030
|
+
labeled: {
|
|
5031
|
+
type: Boolean,
|
|
5032
|
+
reflect: true
|
|
5033
|
+
},
|
|
5034
|
+
|
|
5009
5035
|
/**
|
|
5010
5036
|
* If declared, the popover and trigger will be set to the same width.
|
|
5011
5037
|
*/
|
|
@@ -5014,6 +5040,16 @@ class AuroDropdown extends LitElement {
|
|
|
5014
5040
|
reflect: true
|
|
5015
5041
|
},
|
|
5016
5042
|
|
|
5043
|
+
/**
|
|
5044
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
5045
|
+
* when there isn't enough space in the specified `placement`.
|
|
5046
|
+
* @default false
|
|
5047
|
+
*/
|
|
5048
|
+
noFlip: {
|
|
5049
|
+
type: Boolean,
|
|
5050
|
+
reflect: true
|
|
5051
|
+
},
|
|
5052
|
+
|
|
5017
5053
|
/**
|
|
5018
5054
|
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
5019
5055
|
*/
|
|
@@ -5030,16 +5066,32 @@ class AuroDropdown extends LitElement {
|
|
|
5030
5066
|
reflect: true
|
|
5031
5067
|
},
|
|
5032
5068
|
|
|
5069
|
+
/**
|
|
5070
|
+
* Gap between the trigger element and bib.
|
|
5071
|
+
* @default 0
|
|
5072
|
+
*/
|
|
5073
|
+
offset: {
|
|
5074
|
+
type: Number,
|
|
5075
|
+
reflect: true
|
|
5076
|
+
},
|
|
5077
|
+
|
|
5033
5078
|
onSlotChange: {
|
|
5034
5079
|
type: Function,
|
|
5035
5080
|
reflect: false
|
|
5036
5081
|
},
|
|
5037
5082
|
|
|
5038
5083
|
/**
|
|
5039
|
-
*
|
|
5084
|
+
* Position where the bib should appear relative to the trigger.
|
|
5085
|
+
* Accepted values:
|
|
5086
|
+
* "top" | "right" | "bottom" | "left" |
|
|
5087
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
5088
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
5089
|
+
* "left-start" | "left-end"
|
|
5090
|
+
* @default bottom-start
|
|
5040
5091
|
*/
|
|
5041
5092
|
placement: {
|
|
5042
|
-
type: String
|
|
5093
|
+
type: String,
|
|
5094
|
+
reflect: true
|
|
5043
5095
|
},
|
|
5044
5096
|
|
|
5045
5097
|
/**
|
|
@@ -5085,6 +5137,7 @@ class AuroDropdown extends LitElement {
|
|
|
5085
5137
|
|
|
5086
5138
|
disconnectedCallback() {
|
|
5087
5139
|
super.disconnectedCallback();
|
|
5140
|
+
this.floater.disconnect();
|
|
5088
5141
|
}
|
|
5089
5142
|
|
|
5090
5143
|
updated(changedProperties) {
|
|
@@ -5214,13 +5267,21 @@ class AuroDropdown extends LitElement {
|
|
|
5214
5267
|
handleTriggerContentSlotChange(event) {
|
|
5215
5268
|
this.floater.handleTriggerTabIndex();
|
|
5216
5269
|
|
|
5217
|
-
const
|
|
5270
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
5271
|
+
|
|
5272
|
+
if (triggerSlot) {
|
|
5273
|
+
|
|
5274
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
5218
5275
|
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5276
|
+
if (triggerContentNodes) {
|
|
5277
|
+
|
|
5278
|
+
triggerContentNodes.forEach((node) => {
|
|
5279
|
+
if (!this.triggerContentFocusable) {
|
|
5280
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
5281
|
+
}
|
|
5282
|
+
});
|
|
5222
5283
|
}
|
|
5223
|
-
}
|
|
5284
|
+
}
|
|
5224
5285
|
|
|
5225
5286
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5226
5287
|
|
|
@@ -5274,6 +5335,29 @@ class AuroDropdown extends LitElement {
|
|
|
5274
5335
|
}
|
|
5275
5336
|
}
|
|
5276
5337
|
|
|
5338
|
+
/**
|
|
5339
|
+
* @private
|
|
5340
|
+
* @method handleLabelSlotChange
|
|
5341
|
+
* @param {event} event - The event object representing the slot change.
|
|
5342
|
+
* @description Handles the slot change event for the label slot.
|
|
5343
|
+
*/
|
|
5344
|
+
handleLabelSlotChange (event) {
|
|
5345
|
+
|
|
5346
|
+
// Get the nodes from the event
|
|
5347
|
+
const nodes = event.target.assignedNodes();
|
|
5348
|
+
|
|
5349
|
+
// Guard clause for no nodes
|
|
5350
|
+
if (!nodes) {
|
|
5351
|
+
return;
|
|
5352
|
+
}
|
|
5353
|
+
|
|
5354
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
5355
|
+
const nodesArr = Array.from(nodes);
|
|
5356
|
+
|
|
5357
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
5358
|
+
this.labeled = nodesArr.length > 0;
|
|
5359
|
+
}
|
|
5360
|
+
|
|
5277
5361
|
// function that renders the HTML and CSS into the scope of the component
|
|
5278
5362
|
render() {
|
|
5279
5363
|
return html$1`
|
|
@@ -5288,7 +5372,7 @@ class AuroDropdown extends LitElement {
|
|
|
5288
5372
|
>
|
|
5289
5373
|
<div class="triggerContentWrapper">
|
|
5290
5374
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5291
|
-
<slot name="label"></slot>
|
|
5375
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5292
5376
|
</label>
|
|
5293
5377
|
<div class="triggerContent">
|
|
5294
5378
|
<slot
|
|
@@ -6174,11 +6258,11 @@ class AuroBibtemplate extends LitElement {
|
|
|
6174
6258
|
return {
|
|
6175
6259
|
isFullscreen: {
|
|
6176
6260
|
type: Boolean,
|
|
6177
|
-
reflect: true
|
|
6261
|
+
reflect: true
|
|
6178
6262
|
},
|
|
6179
6263
|
large: {
|
|
6180
6264
|
type: Boolean,
|
|
6181
|
-
reflect: true
|
|
6265
|
+
reflect: true
|
|
6182
6266
|
}
|
|
6183
6267
|
};
|
|
6184
6268
|
}
|
|
@@ -6265,7 +6349,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
6265
6349
|
|
|
6266
6350
|
var bibTemplateVersion = '1.0.0';
|
|
6267
6351
|
|
|
6268
|
-
var styleCss = css
|
|
6352
|
+
var styleCss = css`.wrapper{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.wrapper ::slotted(*:not(:first-child)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
6269
6353
|
|
|
6270
6354
|
var colorCss = css`:host ::slotted(*:not(:first-child)){border-color:var(--ds-color-border-divider-default, rgba(0, 0, 0, 0.12))}`;
|
|
6271
6355
|
|
|
@@ -6304,7 +6388,7 @@ class AuroCounterWrapper extends LitElement {
|
|
|
6304
6388
|
|
|
6305
6389
|
// function that renders the HTML and CSS into the scope of the component
|
|
6306
6390
|
render() {
|
|
6307
|
-
return html$1`<slot></slot>`;
|
|
6391
|
+
return html$1`<div class="wrapper"><slot></slot></div>`;
|
|
6308
6392
|
}
|
|
6309
6393
|
}
|
|
6310
6394
|
|
|
@@ -6392,6 +6476,25 @@ class AuroCounterGroup extends LitElement {
|
|
|
6392
6476
|
static get properties() {
|
|
6393
6477
|
return {
|
|
6394
6478
|
|
|
6479
|
+
/**
|
|
6480
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
6481
|
+
* @default false
|
|
6482
|
+
*/
|
|
6483
|
+
autoPlacement: {
|
|
6484
|
+
type: Boolean,
|
|
6485
|
+
reflect: true
|
|
6486
|
+
},
|
|
6487
|
+
|
|
6488
|
+
/**
|
|
6489
|
+
* Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile.
|
|
6490
|
+
* When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
6491
|
+
* @default sm
|
|
6492
|
+
*/
|
|
6493
|
+
fullscreenBreakpoint: {
|
|
6494
|
+
type: String,
|
|
6495
|
+
reflect: true
|
|
6496
|
+
},
|
|
6497
|
+
|
|
6395
6498
|
/**
|
|
6396
6499
|
* Indicates if the counter group is displayed as a dropdown.
|
|
6397
6500
|
*/
|
|
@@ -6416,45 +6519,68 @@ class AuroCounterGroup extends LitElement {
|
|
|
6416
6519
|
},
|
|
6417
6520
|
|
|
6418
6521
|
/**
|
|
6419
|
-
*
|
|
6522
|
+
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
6523
|
+
* Otherwise, Heading 600
|
|
6420
6524
|
*/
|
|
6421
|
-
|
|
6422
|
-
type:
|
|
6423
|
-
reflect: true
|
|
6525
|
+
largeFullscreenHeadline: {
|
|
6526
|
+
type: Boolean,
|
|
6527
|
+
reflect: true
|
|
6424
6528
|
},
|
|
6425
6529
|
|
|
6426
6530
|
/**
|
|
6427
|
-
*
|
|
6531
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
6532
|
+
* when there isn't enough space in the specified `placement`.
|
|
6533
|
+
* @default false
|
|
6428
6534
|
*/
|
|
6429
|
-
|
|
6430
|
-
type:
|
|
6535
|
+
noFlip: {
|
|
6536
|
+
type: Boolean,
|
|
6537
|
+
reflect: true
|
|
6431
6538
|
},
|
|
6432
6539
|
|
|
6433
6540
|
/**
|
|
6434
|
-
*
|
|
6541
|
+
* Gap between the trigger element and bib.
|
|
6542
|
+
* @default 0
|
|
6435
6543
|
*/
|
|
6436
|
-
|
|
6437
|
-
type:
|
|
6544
|
+
offset: {
|
|
6545
|
+
type: Number,
|
|
6546
|
+
reflect: true
|
|
6438
6547
|
},
|
|
6439
6548
|
|
|
6440
6549
|
/**
|
|
6441
|
-
*
|
|
6442
|
-
*
|
|
6550
|
+
* Position where the bib should appear relative to the trigger.
|
|
6551
|
+
* Accepted values:
|
|
6552
|
+
* "top" | "right" | "bottom" | "left" |
|
|
6553
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
6554
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
6555
|
+
* "left-start" | "left-end"
|
|
6556
|
+
* @default bottom-start
|
|
6443
6557
|
*/
|
|
6444
|
-
|
|
6445
|
-
type:
|
|
6558
|
+
placement: {
|
|
6559
|
+
type: String,
|
|
6446
6560
|
reflect: true
|
|
6447
6561
|
},
|
|
6448
6562
|
|
|
6449
6563
|
/**
|
|
6450
|
-
*
|
|
6451
|
-
* When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
6452
|
-
* @default sm
|
|
6564
|
+
* The total value of the counters.
|
|
6453
6565
|
*/
|
|
6454
|
-
|
|
6566
|
+
total: {
|
|
6567
|
+
type: Number,
|
|
6568
|
+
},
|
|
6569
|
+
|
|
6570
|
+
/**
|
|
6571
|
+
* Reflects the validity state.
|
|
6572
|
+
*/
|
|
6573
|
+
validity: {
|
|
6455
6574
|
type: String,
|
|
6456
|
-
reflect: true
|
|
6457
|
-
}
|
|
6575
|
+
reflect: true,
|
|
6576
|
+
},
|
|
6577
|
+
|
|
6578
|
+
/**
|
|
6579
|
+
* The current individual values of the nested counters.
|
|
6580
|
+
*/
|
|
6581
|
+
value: {
|
|
6582
|
+
type: Object,
|
|
6583
|
+
},
|
|
6458
6584
|
};
|
|
6459
6585
|
}
|
|
6460
6586
|
|
|
@@ -6697,7 +6823,12 @@ class AuroCounterGroup extends LitElement {
|
|
|
6697
6823
|
render() {
|
|
6698
6824
|
return html$1`
|
|
6699
6825
|
${this.isDropdown
|
|
6700
|
-
? html$1`<${this.dropdownTag} common chevron
|
|
6826
|
+
? html$1`<${this.dropdownTag} common chevron
|
|
6827
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
6828
|
+
.placement="${this.placement}"
|
|
6829
|
+
.offset="${this.offset}"
|
|
6830
|
+
?autoPlacement="${this.autoPlacement}"
|
|
6831
|
+
?noFlip="${this.noFlip}">
|
|
6701
6832
|
<div slot="trigger"><slot name="valueText">
|
|
6702
6833
|
${this.counters && Array.from(this.counters).map((counter, index) => `${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
6703
6834
|
</slot></div>
|
|
@@ -104,7 +104,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
104
104
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
105
105
|
|
|
106
106
|
```html
|
|
107
|
-
<script type="module
|
|
107
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0/auro-datepicker/+esm"></script>
|
|
108
108
|
```
|
|
109
109
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
110
110
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
9
9
|
|-----------------------------------|-----------------------------------|-----------|------------|--------------------------------------------------|--------------------------------------------------|
|
|
10
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
10
11
|
| [calendarEndDate](#calendarEndDate) | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
|
|
11
12
|
| [calendarFocusDate](#calendarFocusDate) | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
|
|
12
13
|
| [calendarStartDate](#calendarStartDate) | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
|
|
@@ -18,7 +19,10 @@
|
|
|
18
19
|
| [maxDate](#maxDate) | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
|
|
19
20
|
| [minDate](#minDate) | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
|
|
20
21
|
| [monthNames](#monthNames) | `monthNames` | | `array` | ["January","February","March","April","May","June","July","August","September","October","November","December"] | Names of all 12 months to render in the calendar, used for localization of date string in mobile layout. |
|
|
22
|
+
| [noFlip](#noFlip) | `noFlip` | | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
|
|
21
23
|
| [noValidate](#noValidate) | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
|
|
24
|
+
| [offset](#offset) | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
|
|
25
|
+
| [placement](#placement) | `placement` | | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
|
|
22
26
|
| [range](#range) | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
|
|
23
27
|
| [required](#required) | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
24
28
|
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
@@ -603,6 +607,63 @@ Set stacked attribute to make range datepicker stacked style.
|
|
|
603
607
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
604
608
|
</auro-accordion>
|
|
605
609
|
|
|
610
|
+
### Customized bib position
|
|
611
|
+
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
612
|
+
|
|
613
|
+
- `placement` specifies the preferred position where the bib should appear relative to the trigger.
|
|
614
|
+
- `offset` sets the distance between the trigger and the bib.
|
|
615
|
+
- When `autoPlacement` is enabled, smart positioning logic is applied to determine the best placement for the bib. If all sides have sufficient space, the bib will appear in the position specified by `placement`.
|
|
616
|
+
- Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
|
|
617
|
+
|
|
618
|
+
<div class="exampleWrapper">
|
|
619
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
|
|
620
|
+
<!-- The below content is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
621
|
+
<div style="width: 400px">
|
|
622
|
+
<auro-datepicker offset="20" placement="bottom-start" noFlip>
|
|
623
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
624
|
+
<span slot="fromLabel">bottom-start with 20px offset and noFlip</span>
|
|
625
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
626
|
+
</auro-datepicker>
|
|
627
|
+
<auro-datepicker offset="20" placement="bottom-start">
|
|
628
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
629
|
+
<span slot="fromLabel">bottom-start with 20px offset and flip</span>
|
|
630
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
631
|
+
</auro-datepicker>
|
|
632
|
+
<auro-datepicker offset="20" placement="right" autoPlacement noFlip>
|
|
633
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
634
|
+
<span slot="fromLabel">right with 20px offset, noFlip and autoPlacement</span>
|
|
635
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
636
|
+
</auro-datepicker>
|
|
637
|
+
</div>
|
|
638
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
639
|
+
</div>
|
|
640
|
+
<auro-accordion alignRight>
|
|
641
|
+
<span slot="trigger">See code</span>
|
|
642
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floaterConfig.html) -->
|
|
643
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
644
|
+
|
|
645
|
+
```html
|
|
646
|
+
<div style="width: 400px">
|
|
647
|
+
<auro-datepicker offset="20" placement="bottom-start" noFlip>
|
|
648
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
649
|
+
<span slot="fromLabel">bottom-start with 20px offset and noFlip</span>
|
|
650
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
651
|
+
</auro-datepicker>
|
|
652
|
+
<auro-datepicker offset="20" placement="bottom-start">
|
|
653
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
654
|
+
<span slot="fromLabel">bottom-start with 20px offset and flip</span>
|
|
655
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
656
|
+
</auro-datepicker>
|
|
657
|
+
<auro-datepicker offset="20" placement="right" autoPlacement noFlip>
|
|
658
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
659
|
+
<span slot="fromLabel">right with 20px offset, noFlip and autoPlacement</span>
|
|
660
|
+
<span slot="bib.fullscreen.dateLabel">Choose a date</span>
|
|
661
|
+
</auro-datepicker>
|
|
662
|
+
</div>
|
|
663
|
+
```
|
|
664
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
665
|
+
</auro-accordion>
|
|
666
|
+
|
|
606
667
|
#### validity
|
|
607
668
|
|
|
608
669
|
Specifies the `validityState` the element is in. Upon first interaction, or presetting the `error` attribute, the component will validate on `focusout`. After validation, `validityState` can be queried from the component by using the following JavaScript.
|