@aurodesignsystem/auro-formkit 5.9.0 → 5.9.2
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 +13 -4
- package/README.md +4 -4
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +2 -2
- package/components/bibtemplate/dist/registered.js +2 -2
- package/components/checkbox/README.md +62 -62
- package/components/checkbox/demo/api.js +1 -1
- package/components/checkbox/demo/api.md +127 -84
- package/components/checkbox/demo/api.min.js +125 -42
- package/components/checkbox/demo/index.md +9 -281
- package/components/checkbox/demo/index.min.js +125 -42
- package/components/checkbox/demo/readme.html +3 -4
- package/components/checkbox/demo/readme.md +62 -62
- package/components/checkbox/dist/auro-checkbox-group.d.ts +7 -8
- package/components/checkbox/dist/auro-checkbox.d.ts +74 -20
- package/components/checkbox/dist/index.js +125 -42
- package/components/checkbox/dist/registered.js +125 -42
- package/components/combobox/README.md +76 -74
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +11 -12
- package/components/combobox/demo/api.md +1302 -875
- package/components/combobox/demo/api.min.js +416 -492
- package/components/combobox/demo/index.html +1 -7
- package/components/combobox/demo/index.js +0 -19
- package/components/combobox/demo/index.md +43 -723
- package/components/combobox/demo/index.min.js +369 -302
- package/components/combobox/demo/readme.html +3 -4
- package/components/combobox/demo/readme.md +76 -74
- package/components/combobox/dist/auro-combobox.d.ts +42 -42
- package/components/combobox/dist/index.js +204 -210
- package/components/combobox/dist/registered.js +204 -210
- package/components/counter/README.md +81 -66
- package/components/counter/demo/api.html +1 -2
- package/components/counter/demo/api.js +2 -2
- package/components/counter/demo/api.md +777 -259
- package/components/counter/demo/api.min.js +119 -171
- package/components/counter/demo/index.html +0 -2
- package/components/counter/demo/index.md +20 -329
- package/components/counter/demo/index.min.js +117 -152
- package/components/counter/demo/readme.html +3 -4
- package/components/counter/demo/readme.md +81 -66
- package/components/counter/dist/auro-counter-group.d.ts +21 -36
- package/components/counter/dist/auro-counter-wrapper.d.ts +1 -6
- package/components/counter/dist/auro-counter.d.ts +5 -8
- package/components/counter/dist/index.js +117 -152
- package/components/counter/dist/registered.js +117 -152
- package/components/datepicker/README.md +57 -61
- package/components/datepicker/demo/api.js +8 -8
- package/components/datepicker/demo/api.md +720 -561
- package/components/datepicker/demo/api.min.js +678 -2769
- package/components/datepicker/demo/index.md +65 -117
- package/components/datepicker/demo/index.min.js +678 -2769
- package/components/datepicker/demo/readme.html +3 -4
- package/components/datepicker/demo/readme.md +57 -61
- package/components/datepicker/dist/auro-calendar.d.ts +60 -34
- package/components/datepicker/dist/auro-datepicker.d.ts +32 -32
- package/components/datepicker/dist/iconVersion.d.ts +1 -1
- package/components/datepicker/dist/index.js +505 -2596
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +505 -2596
- package/components/dropdown/README.md +78 -62
- package/components/dropdown/demo/api.js +4 -4
- package/components/dropdown/demo/api.md +520 -478
- package/components/dropdown/demo/api.min.js +80 -95
- package/components/dropdown/demo/index.md +65 -119
- package/components/dropdown/demo/index.min.js +70 -85
- package/components/dropdown/demo/readme.html +3 -4
- package/components/dropdown/demo/readme.md +78 -62
- package/components/dropdown/dist/auro-dropdown.d.ts +42 -33
- package/components/dropdown/dist/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +70 -85
- package/components/dropdown/dist/registered.js +70 -85
- package/components/form/README.md +16 -58
- package/components/form/demo/api.md +16 -21
- package/components/form/demo/api.min.js +13 -8
- package/components/form/demo/index.md +38 -39
- package/components/form/demo/index.min.js +13 -8
- package/components/form/demo/readme.md +16 -58
- package/components/form/demo/working.html +1 -1
- package/components/form/dist/auro-form.d.ts +15 -3
- package/components/form/dist/index.js +13 -8
- package/components/form/dist/registered.js +13 -8
- package/components/input/README.md +55 -60
- package/components/input/demo/api.js +3 -5
- package/components/input/demo/api.md +558 -537
- package/components/input/demo/api.min.js +102 -115
- package/components/input/demo/index.js +0 -1
- package/components/input/demo/index.md +90 -203
- package/components/input/demo/index.min.js +87 -99
- package/components/input/demo/readme.html +3 -4
- package/components/input/demo/readme.md +55 -60
- package/components/input/dist/auro-input.d.ts +6 -5
- package/components/input/dist/base-input.d.ts +68 -69
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +87 -82
- package/components/input/dist/registered.js +87 -82
- package/components/menu/README.md +61 -61
- package/components/menu/demo/api.js +6 -8
- package/components/menu/demo/api.md +520 -577
- package/components/menu/demo/api.min.js +199 -97
- package/components/menu/demo/index.js +0 -5
- package/components/menu/demo/index.md +36 -119
- package/components/menu/demo/index.min.js +164 -101
- package/components/menu/demo/readme.html +3 -4
- package/components/menu/demo/readme.md +61 -61
- package/components/menu/dist/auro-menu.context.d.ts +5 -0
- package/components/menu/dist/auro-menu.d.ts +75 -37
- package/components/menu/dist/auro-menuoption.d.ts +38 -13
- package/components/menu/dist/index.js +164 -50
- package/components/menu/dist/registered.js +164 -50
- package/components/radio/README.md +61 -57
- package/components/radio/demo/api.js +2 -2
- package/components/radio/demo/api.md +241 -170
- package/components/radio/demo/api.min.js +154 -77
- package/components/radio/demo/index.md +22 -99
- package/components/radio/demo/index.min.js +145 -68
- package/components/radio/demo/readme.html +3 -4
- package/components/radio/demo/readme.md +61 -57
- package/components/radio/dist/auro-radio-group.d.ts +67 -35
- package/components/radio/dist/auro-radio.d.ts +56 -33
- package/components/radio/dist/index.js +145 -68
- package/components/radio/dist/registered.js +145 -68
- package/components/select/README.md +68 -65
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +7 -7
- package/components/select/demo/api.md +1305 -625
- package/components/select/demo/api.min.js +357 -262
- package/components/select/demo/index.html +0 -2
- package/components/select/demo/index.md +25 -833
- package/components/select/demo/index.min.js +356 -230
- package/components/select/demo/readme.html +3 -4
- package/components/select/demo/readme.md +68 -65
- package/components/select/dist/auro-select.d.ts +99 -90
- package/components/select/dist/index.js +192 -180
- package/components/select/dist/registered.js +192 -180
- package/package.json +9 -4
|
@@ -131,9 +131,8 @@ function getOppositeAxis(axis) {
|
|
|
131
131
|
function getAxisLength(axis) {
|
|
132
132
|
return axis === 'y' ? 'height' : 'width';
|
|
133
133
|
}
|
|
134
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
135
134
|
function getSideAxis(placement) {
|
|
136
|
-
return
|
|
135
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
137
136
|
}
|
|
138
137
|
function getAlignmentAxis(placement) {
|
|
139
138
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -158,19 +157,19 @@ function getExpandedPlacements(placement) {
|
|
|
158
157
|
function getOppositeAlignmentPlacement(placement) {
|
|
159
158
|
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
160
159
|
}
|
|
161
|
-
const lrPlacement = ['left', 'right'];
|
|
162
|
-
const rlPlacement = ['right', 'left'];
|
|
163
|
-
const tbPlacement = ['top', 'bottom'];
|
|
164
|
-
const btPlacement = ['bottom', 'top'];
|
|
165
160
|
function getSideList(side, isStart, rtl) {
|
|
161
|
+
const lr = ['left', 'right'];
|
|
162
|
+
const rl = ['right', 'left'];
|
|
163
|
+
const tb = ['top', 'bottom'];
|
|
164
|
+
const bt = ['bottom', 'top'];
|
|
166
165
|
switch (side) {
|
|
167
166
|
case 'top':
|
|
168
167
|
case 'bottom':
|
|
169
|
-
if (rtl) return isStart ?
|
|
170
|
-
return isStart ?
|
|
168
|
+
if (rtl) return isStart ? rl : lr;
|
|
169
|
+
return isStart ? lr : rl;
|
|
171
170
|
case 'left':
|
|
172
171
|
case 'right':
|
|
173
|
-
return isStart ?
|
|
172
|
+
return isStart ? tb : bt;
|
|
174
173
|
default:
|
|
175
174
|
return [];
|
|
176
175
|
}
|
|
@@ -611,22 +610,16 @@ const flip$1 = function (options) {
|
|
|
611
610
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
612
611
|
const nextPlacement = placements[nextIndex];
|
|
613
612
|
if (nextPlacement) {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
reset: {
|
|
626
|
-
placement: nextPlacement
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
}
|
|
613
|
+
// Try next placement and re-run the lifecycle.
|
|
614
|
+
return {
|
|
615
|
+
data: {
|
|
616
|
+
index: nextIndex,
|
|
617
|
+
overflows: overflowsData
|
|
618
|
+
},
|
|
619
|
+
reset: {
|
|
620
|
+
placement: nextPlacement
|
|
621
|
+
}
|
|
622
|
+
};
|
|
630
623
|
}
|
|
631
624
|
|
|
632
625
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
@@ -672,8 +665,6 @@ const flip$1 = function (options) {
|
|
|
672
665
|
};
|
|
673
666
|
};
|
|
674
667
|
|
|
675
|
-
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
676
|
-
|
|
677
668
|
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
678
669
|
// Derivable.
|
|
679
670
|
|
|
@@ -687,7 +678,7 @@ async function convertValueToCoords(state, options) {
|
|
|
687
678
|
const side = getSide(placement);
|
|
688
679
|
const alignment = getAlignment(placement);
|
|
689
680
|
const isVertical = getSideAxis(placement) === 'y';
|
|
690
|
-
const mainAxisMulti =
|
|
681
|
+
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
691
682
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
692
683
|
const rawValue = evaluate(options, state);
|
|
693
684
|
|
|
@@ -880,7 +871,6 @@ function isShadowRoot(value) {
|
|
|
880
871
|
}
|
|
881
872
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
882
873
|
}
|
|
883
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
884
874
|
function isOverflowElement(element) {
|
|
885
875
|
const {
|
|
886
876
|
overflow,
|
|
@@ -888,32 +878,27 @@ function isOverflowElement(element) {
|
|
|
888
878
|
overflowY,
|
|
889
879
|
display
|
|
890
880
|
} = getComputedStyle$1(element);
|
|
891
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
881
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
|
|
892
882
|
}
|
|
893
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
894
883
|
function isTableElement(element) {
|
|
895
|
-
return
|
|
884
|
+
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
896
885
|
}
|
|
897
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
898
886
|
function isTopLayer(element) {
|
|
899
|
-
return
|
|
887
|
+
return [':popover-open', ':modal'].some(selector => {
|
|
900
888
|
try {
|
|
901
889
|
return element.matches(selector);
|
|
902
|
-
} catch (
|
|
890
|
+
} catch (e) {
|
|
903
891
|
return false;
|
|
904
892
|
}
|
|
905
893
|
});
|
|
906
894
|
}
|
|
907
|
-
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
908
|
-
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
909
|
-
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
910
895
|
function isContainingBlock(elementOrCss) {
|
|
911
896
|
const webkit = isWebKit();
|
|
912
897
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
913
898
|
|
|
914
899
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
915
900
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
916
|
-
return
|
|
901
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
917
902
|
}
|
|
918
903
|
function getContainingBlock(element) {
|
|
919
904
|
let currentNode = getParentNode(element);
|
|
@@ -931,9 +916,8 @@ function isWebKit() {
|
|
|
931
916
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
932
917
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
933
918
|
}
|
|
934
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
935
919
|
function isLastTraversableNode(node) {
|
|
936
|
-
return
|
|
920
|
+
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
937
921
|
}
|
|
938
922
|
function getComputedStyle$1(element) {
|
|
939
923
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -1238,7 +1222,6 @@ function getViewportRect(element, strategy) {
|
|
|
1238
1222
|
};
|
|
1239
1223
|
}
|
|
1240
1224
|
|
|
1241
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
1242
1225
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
1243
1226
|
function getInnerBoundingClientRect(element, strategy) {
|
|
1244
1227
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -1303,7 +1286,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
1303
1286
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
1304
1287
|
currentContainingBlockComputedStyle = null;
|
|
1305
1288
|
}
|
|
1306
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
1289
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1307
1290
|
if (shouldDropCurrentNode) {
|
|
1308
1291
|
// Drop non-containing blocks.
|
|
1309
1292
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -1366,12 +1349,6 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1366
1349
|
scrollTop: 0
|
|
1367
1350
|
};
|
|
1368
1351
|
const offsets = createCoords(0);
|
|
1369
|
-
|
|
1370
|
-
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1371
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1372
|
-
function setLeftRTLScrollbarOffset() {
|
|
1373
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1374
|
-
}
|
|
1375
1352
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1376
1353
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
1377
1354
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -1381,12 +1358,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1381
1358
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1382
1359
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1383
1360
|
} else if (documentElement) {
|
|
1384
|
-
|
|
1361
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1362
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1363
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1385
1364
|
}
|
|
1386
1365
|
}
|
|
1387
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
1388
|
-
setLeftRTLScrollbarOffset();
|
|
1389
|
-
}
|
|
1390
1366
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1391
1367
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1392
1368
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -1563,7 +1539,7 @@ function observeMove(element, onMove) {
|
|
|
1563
1539
|
// Handle <iframe>s
|
|
1564
1540
|
root: root.ownerDocument
|
|
1565
1541
|
});
|
|
1566
|
-
} catch (
|
|
1542
|
+
} catch (e) {
|
|
1567
1543
|
io = new IntersectionObserver(handleObserve, options);
|
|
1568
1544
|
}
|
|
1569
1545
|
io.observe(element);
|
|
@@ -2653,7 +2629,7 @@ class AuroDependencyVersioning {
|
|
|
2653
2629
|
}
|
|
2654
2630
|
}
|
|
2655
2631
|
|
|
2656
|
-
class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';class m extends LitElement{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const g=new Map,f=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g.has(t)||g.set(t,fetch(t).then(e)),g.get(t)};var w=css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;
|
|
2632
|
+
class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';class m extends LitElement{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const g=new Map,f=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g.has(t)||g.set(t,fetch(t).then(e)),g.get(t)};var w=css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
|
|
2657
2633
|
`;class z extends m{constructor(){super(),this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w}async fetchIcon(t,a){let e="";e="logos"===t?await f(`${this.uri}/${t}/${a}.svg`):await f(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}}css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
|
|
2658
2634
|
`;var y=css`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
|
|
2659
2635
|
`;var k=css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
|
|
@@ -2677,7 +2653,7 @@ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,cl
|
|
|
2677
2653
|
</div>
|
|
2678
2654
|
`}}
|
|
2679
2655
|
|
|
2680
|
-
var iconVersion = '9.1.
|
|
2656
|
+
var iconVersion = '9.1.1';
|
|
2681
2657
|
|
|
2682
2658
|
var styleCss$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
2683
2659
|
|
|
@@ -3118,7 +3094,7 @@ class AuroHelpText extends LitElement {
|
|
|
3118
3094
|
}
|
|
3119
3095
|
}
|
|
3120
3096
|
|
|
3121
|
-
var formkitVersion = '
|
|
3097
|
+
var formkitVersion = '202601271813';
|
|
3122
3098
|
|
|
3123
3099
|
class AuroElement extends LitElement {
|
|
3124
3100
|
static get properties() {
|
|
@@ -3224,12 +3200,14 @@ class AuroElement extends LitElement {
|
|
|
3224
3200
|
}
|
|
3225
3201
|
}
|
|
3226
3202
|
|
|
3227
|
-
// Copyright (c)
|
|
3203
|
+
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3228
3204
|
// See LICENSE in the project root for license information.
|
|
3229
3205
|
|
|
3230
3206
|
|
|
3231
|
-
|
|
3232
|
-
|
|
3207
|
+
/**
|
|
3208
|
+
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3209
|
+
* @customElement auro-dropdown
|
|
3210
|
+
*
|
|
3233
3211
|
* @slot - Default slot for the popover content.
|
|
3234
3212
|
* @slot helpText - Defines the content of the helpText.
|
|
3235
3213
|
* @slot trigger - Defines the content of the trigger.
|
|
@@ -3265,7 +3243,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3265
3243
|
/** @private */
|
|
3266
3244
|
this.bibElement = createRef();
|
|
3267
3245
|
|
|
3268
|
-
this.
|
|
3246
|
+
this._intializeDefaults();
|
|
3269
3247
|
}
|
|
3270
3248
|
|
|
3271
3249
|
/**
|
|
@@ -3286,7 +3264,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3286
3264
|
* @private
|
|
3287
3265
|
* @returns {void} Internal defaults.
|
|
3288
3266
|
*/
|
|
3289
|
-
|
|
3267
|
+
_intializeDefaults() {
|
|
3290
3268
|
this.appearance = 'default';
|
|
3291
3269
|
this.chevron = false;
|
|
3292
3270
|
this.disabled = false;
|
|
@@ -3407,9 +3385,18 @@ class AuroDropdown extends AuroElement {
|
|
|
3407
3385
|
static get properties() {
|
|
3408
3386
|
return {
|
|
3409
3387
|
|
|
3388
|
+
/**
|
|
3389
|
+
* The value for the role attribute of the trigger element.
|
|
3390
|
+
*/
|
|
3391
|
+
a11yRole: {
|
|
3392
|
+
type: String || undefined,
|
|
3393
|
+
attribute: false,
|
|
3394
|
+
reflect: false
|
|
3395
|
+
},
|
|
3396
|
+
|
|
3410
3397
|
/**
|
|
3411
3398
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
3412
|
-
* @
|
|
3399
|
+
* @type {'default' | 'inverse'}
|
|
3413
3400
|
* @default 'default'
|
|
3414
3401
|
*/
|
|
3415
3402
|
appearance: {
|
|
@@ -3419,7 +3406,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3419
3406
|
|
|
3420
3407
|
/**
|
|
3421
3408
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
3422
|
-
* @default false
|
|
3423
3409
|
*/
|
|
3424
3410
|
autoPlacement: {
|
|
3425
3411
|
type: Boolean,
|
|
@@ -3428,7 +3414,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3428
3414
|
|
|
3429
3415
|
/**
|
|
3430
3416
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
3431
|
-
* @default false
|
|
3432
3417
|
*/
|
|
3433
3418
|
disableEventShow: {
|
|
3434
3419
|
type: Boolean,
|
|
@@ -3445,11 +3430,11 @@ class AuroDropdown extends AuroElement {
|
|
|
3445
3430
|
|
|
3446
3431
|
/**
|
|
3447
3432
|
* If declared, the dropdown displays a chevron on the right.
|
|
3448
|
-
* @attr {Boolean} chevron
|
|
3449
3433
|
*/
|
|
3450
3434
|
chevron: {
|
|
3451
3435
|
type: Boolean,
|
|
3452
|
-
reflect: true
|
|
3436
|
+
reflect: true,
|
|
3437
|
+
attribute: 'chevron'
|
|
3453
3438
|
},
|
|
3454
3439
|
|
|
3455
3440
|
/**
|
|
@@ -3486,7 +3471,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3486
3471
|
},
|
|
3487
3472
|
|
|
3488
3473
|
/**
|
|
3489
|
-
* If declared
|
|
3474
|
+
* If declared, will apply error UI to the dropdown.
|
|
3490
3475
|
*/
|
|
3491
3476
|
error: {
|
|
3492
3477
|
type: Boolean,
|
|
@@ -3541,18 +3526,28 @@ class AuroDropdown extends AuroElement {
|
|
|
3541
3526
|
},
|
|
3542
3527
|
|
|
3543
3528
|
/**
|
|
3544
|
-
* Defines the screen size breakpoint
|
|
3545
|
-
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3529
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3546
3530
|
*
|
|
3547
3531
|
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3548
3532
|
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3549
|
-
* @
|
|
3533
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
3534
|
+
* @default 'sm'
|
|
3550
3535
|
*/
|
|
3551
3536
|
fullscreenBreakpoint: {
|
|
3552
3537
|
type: String,
|
|
3553
3538
|
reflect: true
|
|
3554
3539
|
},
|
|
3555
3540
|
|
|
3541
|
+
/**
|
|
3542
|
+
* Sets the layout of the dropdown.
|
|
3543
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
3544
|
+
* @default 'classic'
|
|
3545
|
+
*/
|
|
3546
|
+
layout: {
|
|
3547
|
+
type: String,
|
|
3548
|
+
reflect: true
|
|
3549
|
+
},
|
|
3550
|
+
|
|
3556
3551
|
/**
|
|
3557
3552
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
3558
3553
|
* @private
|
|
@@ -3573,7 +3568,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3573
3568
|
/**
|
|
3574
3569
|
* If declared, the bib will NOT flip to an alternate position
|
|
3575
3570
|
* when there isn't enough space in the specified `placement`.
|
|
3576
|
-
* @default false
|
|
3577
3571
|
*/
|
|
3578
3572
|
noFlip: {
|
|
3579
3573
|
type: Boolean,
|
|
@@ -3582,7 +3576,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3582
3576
|
|
|
3583
3577
|
/**
|
|
3584
3578
|
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
3585
|
-
* @default false
|
|
3586
3579
|
*/
|
|
3587
3580
|
shift: {
|
|
3588
3581
|
type: Boolean,
|
|
@@ -3615,7 +3608,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3615
3608
|
},
|
|
3616
3609
|
|
|
3617
3610
|
/**
|
|
3618
|
-
* DEPRECATED - use `appearance` instead.
|
|
3611
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
3619
3612
|
*/
|
|
3620
3613
|
onDark: {
|
|
3621
3614
|
type: Boolean,
|
|
@@ -3632,7 +3625,8 @@ class AuroDropdown extends AuroElement {
|
|
|
3632
3625
|
|
|
3633
3626
|
/**
|
|
3634
3627
|
* Position where the bib should appear relative to the trigger.
|
|
3635
|
-
* @
|
|
3628
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
3629
|
+
* @default 'bottom-start'
|
|
3636
3630
|
*/
|
|
3637
3631
|
placement: {
|
|
3638
3632
|
type: String,
|
|
@@ -3644,15 +3638,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3644
3638
|
*/
|
|
3645
3639
|
tabIndex: {
|
|
3646
3640
|
type: Number
|
|
3647
|
-
},
|
|
3648
|
-
|
|
3649
|
-
/**
|
|
3650
|
-
* The value for the role attribute of the trigger element.
|
|
3651
|
-
*/
|
|
3652
|
-
a11yRole: {
|
|
3653
|
-
type: String || undefined,
|
|
3654
|
-
attribute: false,
|
|
3655
|
-
reflect: false
|
|
3656
3641
|
}
|
|
3657
3642
|
};
|
|
3658
3643
|
}
|
|
@@ -3679,7 +3664,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3679
3664
|
|
|
3680
3665
|
/**
|
|
3681
3666
|
* This will register this element with the browser.
|
|
3682
|
-
* @param {string} [name="auro-dropdown"] - The name of element that you want to register
|
|
3667
|
+
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
3683
3668
|
*
|
|
3684
3669
|
* @example
|
|
3685
3670
|
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
@@ -18,6 +18,7 @@ The following sections are editable by making changes to the following files:
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Form
|
|
21
|
+
|
|
21
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
24
|
`<auro-form>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) designed to
|
|
@@ -31,7 +32,15 @@ them (along with events) to the parent form element as a JSON object.
|
|
|
31
32
|
<!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
|
|
32
33
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
33
34
|
|
|
35
|
+
## Form Use Cases
|
|
36
|
+
|
|
37
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
38
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
39
|
+
The `<auro-form>` element should be used in situations where users want to build HTML forms.
|
|
40
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
|
+
|
|
34
42
|
## Getting Started
|
|
43
|
+
|
|
35
44
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
36
45
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
37
46
|
|
|
@@ -44,30 +53,7 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
44
53
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
45
54
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
46
55
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
#### Automatic Registration
|
|
50
|
-
|
|
51
|
-
For automatic registration, simply import the component:
|
|
52
|
-
|
|
53
|
-
```javascript
|
|
54
|
-
// Registers <auro-form> automatically
|
|
55
|
-
import '@aurodesignsystem/auro-formkit/auro-form';
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
#### Custom Registration
|
|
59
|
-
|
|
60
|
-
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroForm.register('custom-form')` method on the component class and pass in a unique name.
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
// Import the class only
|
|
64
|
-
import { AuroForm } from '@aurodesignsystem/auro-formkit/auro-form/class';
|
|
65
|
-
|
|
66
|
-
// Register with a custom name if desired
|
|
67
|
-
AuroForm.register('custom-form');
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
#### TypeScript Module Resolution
|
|
56
|
+
### TypeScript Module Resolution
|
|
71
57
|
|
|
72
58
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
73
59
|
|
|
@@ -80,30 +66,10 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
80
66
|
```
|
|
81
67
|
|
|
82
68
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
83
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
84
|
-
**Reference component in HTML**
|
|
85
|
-
|
|
86
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
87
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
88
|
-
|
|
89
|
-
```html
|
|
90
|
-
<auro-form>
|
|
91
|
-
<auro-input id="search-box" name="searchBox" required>
|
|
92
|
-
<span slot="label">Search flights</span>
|
|
93
|
-
</auro-input>
|
|
94
|
-
<auro-button type="submit">Submit</auro-button>
|
|
95
|
-
</auro-form>
|
|
96
|
-
```
|
|
97
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
98
|
-
|
|
99
|
-
### Design Token CSS Custom Property dependency
|
|
100
|
-
|
|
101
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
102
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
103
|
-
|
|
104
69
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
70
|
|
|
106
71
|
## Install from CDN
|
|
72
|
+
|
|
107
73
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
108
74
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
109
75
|
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.
|
|
@@ -113,19 +79,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
113
79
|
```
|
|
114
80
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
115
81
|
|
|
116
|
-
##
|
|
117
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
118
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
119
|
-
|
|
120
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
121
|
-
|
|
122
|
-
## auro-form use cases
|
|
123
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
124
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
125
|
-
The `<auro-form>` element should be used in situations where users want to build HTML forms.
|
|
126
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
127
|
-
|
|
128
|
-
## Formkit development
|
|
82
|
+
## Formkit Development
|
|
129
83
|
|
|
130
84
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
131
85
|
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
@@ -139,4 +93,8 @@ To only develop a single component, use the `--filter` flag:
|
|
|
139
93
|
```shell
|
|
140
94
|
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
141
95
|
```
|
|
96
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
97
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
98
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
99
|
+
The `auro-form` component does not support custom registration at this time.
|
|
142
100
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -3,30 +3,25 @@
|
|
|
3
3
|
|
|
4
4
|
# auro-form
|
|
5
5
|
|
|
6
|
-
The auro-form element provides users a way to
|
|
6
|
+
The `auro-form` element provides users a way to create and manage forms in a consistent manner.
|
|
7
7
|
|
|
8
|
-
## Attributes
|
|
9
|
-
|
|
10
|
-
| Attribute | Type | Description |
|
|
11
|
-
|------------|-----------|--------------------------------------------------|
|
|
12
|
-
| [cssClass](#cssClass) | `String` | Applies designated CSS class to demo element - you want to delete me! |
|
|
13
|
-
| [fixed](#fixed) | `Boolean` | Uses fixed pixel values for element shape |
|
|
14
|
-
|
|
15
8
|
## Properties
|
|
16
9
|
|
|
17
|
-
| Property | Modifiers | Type | Default | Description |
|
|
18
|
-
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
10
|
+
| Property | Attribute | Modifiers | Type | Default | Description |
|
|
11
|
+
|----------------------------|------------|-----------|--------------------------------------------------|---------|--------------------------------------------------|
|
|
12
|
+
| [cssClass](#cssClass) | `cssClass` | | `boolean` | | Applies designated CSS class to demo element - you want to delete me! |
|
|
13
|
+
| [fixed](#fixed) | `fixed` | | `boolean` | | If declared, use fixed pixel values for element shape. |
|
|
14
|
+
| [formState](#formState) | | | `FormState` | {} | |
|
|
15
|
+
| [isInitialState](#isInitialState) | | readonly | `boolean` | | Mostly internal way to determine if a form is in the initial state. |
|
|
16
|
+
| [mutationEventListener](#mutationEventListener) | | | | | |
|
|
17
|
+
| [reset](#reset) | | | | | |
|
|
18
|
+
| [resetElements](#resetElements) | | readonly | `HTMLButtonElement[]` | | Returns a collection of elements that will reset the form. |
|
|
19
|
+
| [sharedInputListener](#sharedInputListener) | | | | | |
|
|
20
|
+
| [sharedValidationListener](#sharedValidationListener) | | | | | |
|
|
21
|
+
| [submit](#submit) | | | | | |
|
|
22
|
+
| [submitElements](#submitElements) | | readonly | `HTMLButtonElement[]` | | Getter for internal _submitElements. |
|
|
23
|
+
| [validity](#validity) | | readonly | `"valid" \| "invalid"` | | Current validity state of the form, based on form element events. |
|
|
24
|
+
| [value](#value) | | readonly | `Record<string, string \| number \| boolean \| string[] \| null>` | | Reduce the form value into a key-value pair.<br /><br />NOTE: form keys use `name` first, and `id` second if `name` is not available.<br />This follows standard HTML5 form behavior - submission uses `name` by default when creating<br />the FormData object. |
|
|
30
25
|
|
|
31
26
|
## Methods
|
|
32
27
|
|
|
@@ -109,7 +109,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
/* eslint-disable no-underscore-dangle,max-lines */
|
|
112
|
+
/* eslint-disable no-underscore-dangle, max-lines, object-property-newline */
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
/**
|
|
@@ -124,20 +124,25 @@ class AuroLibraryRuntimeUtils {
|
|
|
124
124
|
* @typedef {Object.<string, FormStateMember>} FormState - The form state.
|
|
125
125
|
*/
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
129
127
|
/**
|
|
130
|
-
* The auro-form element provides users a way to
|
|
128
|
+
* The `auro-form` element provides users a way to create and manage forms in a consistent manner.
|
|
129
|
+
* @customElement auro-form
|
|
131
130
|
*
|
|
132
|
-
* @attr {Boolean} fixed - Uses fixed pixel values for element shape
|
|
133
|
-
* @attr {String} cssClass - Applies designated CSS class to demo element - you want to delete me!
|
|
134
131
|
* @event {Event} change - Fires when form state changes.
|
|
135
132
|
*/
|
|
136
|
-
|
|
137
|
-
// build the component class
|
|
138
133
|
class AuroForm extends i {
|
|
139
134
|
static get properties() {
|
|
140
135
|
return {
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Applies designated CSS class to demo element - you want to delete me!
|
|
139
|
+
*/
|
|
140
|
+
cssClass: { type: Boolean },
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* If declared, use fixed pixel values for element shape.
|
|
144
|
+
*/
|
|
145
|
+
fixed: { type: Boolean, reflect: true },
|
|
141
146
|
formState: { attribute: false },
|
|
142
147
|
_validity: { attribute: false },
|
|
143
148
|
_isInitialState: { attribute: false },
|