@aurodesignsystem-dev/auro-formkit 0.0.0-pr1451.22 → 0.0.0-pr1451.24
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/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/getting-started.md +154 -0
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +3 -3
- package/components/combobox/demo/customize.min.js +3 -3
- package/components/combobox/demo/getting-started.min.js +3 -3
- package/components/combobox/demo/index.min.js +3 -3
- package/components/combobox/dist/index.js +3 -3
- package/components/combobox/dist/registered.js +3 -3
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/getting-started.md +150 -0
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.min.js +3 -3
- package/components/datepicker/demo/index.min.js +3 -3
- package/components/datepicker/dist/index.js +3 -3
- package/components/datepicker/dist/registered.js +3 -3
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/getting-started.md +146 -0
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/api.min.js +13 -13
- package/components/form/demo/getting-started.md +143 -0
- package/components/form/demo/index.min.js +13 -13
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/customize.md +0 -2
- package/components/menu/demo/getting-started.md +153 -0
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/getting-started.md +154 -0
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +2 -2
- package/components/select/demo/getting-started.min.js +2 -2
- package/components/select/demo/index.min.js +2 -2
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/package.json +1 -1
|
@@ -1690,7 +1690,7 @@ class AuroHelpText extends i$2 {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
|
-
var formkitVersion = '
|
|
1693
|
+
var formkitVersion = '202605050131';
|
|
1694
1694
|
|
|
1695
1695
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1696
1696
|
// See LICENSE in the project root for license information.
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
<auro-anchorlink fluid href="#recommendedSetup" class="level2 body-xs" onclick="openAccordion('recommendedAccordion')">Recommended</auro-anchorlink>
|
|
9
9
|
<auro-anchorlink fluid href="#autoSetup" class="level2 body-xs" onclick="openAccordion('autoAccordion')">Auto</auro-anchorlink>
|
|
10
10
|
<auro-anchorlink fluid href="#cdnSetup" class="level2 body-xs" onclick="openAccordion('cdnAccordion')">CDN</auro-anchorlink>
|
|
11
|
+
<auro-anchorlink fluid href="#frameworks">Frameworks</auro-anchorlink>
|
|
12
|
+
<auro-anchorlink fluid href="#react" class="level2 body-xs" onclick="openAccordion('react')">React</auro-anchorlink>
|
|
13
|
+
<auro-anchorlink fluid href="#svelte" class="level2 body-xs" onclick="openAccordion('svelte')">Svelte</auro-anchorlink>
|
|
11
14
|
<auro-anchorlink fluid href="#minimalConfig">Minimal Config</auro-anchorlink>
|
|
12
15
|
<auro-anchorlink fluid href="#slots">Slots</auro-anchorlink>
|
|
13
16
|
<auro-anchorlink fluid href="#slotsGroup" class="level2 body-xs">auro-checkbox-group</auro-anchorlink>
|
|
@@ -120,6 +123,157 @@ This will create a new custom element <code>>custom-checkbox<</code> and <
|
|
|
120
123
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
121
124
|
</section>
|
|
122
125
|
<section>
|
|
126
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/frameworks.md) -->
|
|
127
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/frameworks.md -->
|
|
128
|
+
<auro-header level="2" id="frameworks">Frameworks</auro-header>
|
|
129
|
+
<auro-accordion-group Emphasis>
|
|
130
|
+
<auro-accordion class="section" id="react">
|
|
131
|
+
<span slot="trigger">React</span>
|
|
132
|
+
<div class="accordion-content">
|
|
133
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/react.md) -->
|
|
134
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/react.md -->
|
|
135
|
+
React 19 includes <a href="https://react.dev/blog/2024/12/05/react-19#support-for-custom-elements">native support for custom elements</a>, so <code><auro-checkbox></code> works directly in JSX without any wrapper library.
|
|
136
|
+
|
|
137
|
+
<auro-header level="3" id="reactImport">Import the Component</auro-header>
|
|
138
|
+
Import and register the components at the top level of your application (e.g. in your root `main.tsx` or `App.tsx`):
|
|
139
|
+
|
|
140
|
+
<pre class="language-js"><code class="language-js">import { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
141
|
+
|
|
142
|
+
AuroCheckbox.register('[custom]-checkbox');
|
|
143
|
+
AuroCheckboxGroup.register('[custom]-checkbox-group');</code></pre>
|
|
144
|
+
|
|
145
|
+
<auro-header level="3" id="reactTypeScript">TypeScript Declarations</auro-header>
|
|
146
|
+
The component ships with TypeScript type definitions for the `AuroCheckbox` class. However, React's JSX does not automatically map custom element tag names to their types. To get type checking for `<auro-checkbox>` in JSX, add the following declaration to a `.d.ts` file in your project:
|
|
147
|
+
|
|
148
|
+
<pre class="language-js"><code class="language-js">import type { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
149
|
+
|
|
150
|
+
declare global {
|
|
151
|
+
namespace JSX {
|
|
152
|
+
interface IntrinsicElements {
|
|
153
|
+
'[custom]-checkbox': React.HTMLAttributes<AuroCheckbox> & Partial<AuroCheckbox>;
|
|
154
|
+
'[custom]-checkbox-group': React.HTMLAttributes<AuroCheckboxGroup> & Partial<AuroCheckboxGroup>;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}</code></pre>
|
|
158
|
+
|
|
159
|
+
<auro-header level="3" id="reactEvents">Event Handling</auro-header>
|
|
160
|
+
Auro components emit native `CustomEvent`s. Use a `ref` to attach event listeners in a `useEffect`:
|
|
161
|
+
|
|
162
|
+
<pre class="language-js"><code class="language-js">import { useRef, useEffect } from 'react';
|
|
163
|
+
|
|
164
|
+
function MyCheckboxGroup() {
|
|
165
|
+
const groupRef = useRef<HTMLElement>(null);
|
|
166
|
+
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
const el = groupRef.current;
|
|
169
|
+
if (!el) return;
|
|
170
|
+
|
|
171
|
+
const handleInput = () => {
|
|
172
|
+
console.log('Selected values:', (el as any).value);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
el.addEventListener('input', handleInput);
|
|
176
|
+
return () => el.removeEventListener('input', handleInput);
|
|
177
|
+
}, []);
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
<custom-checkbox-group ref={groupRef}>
|
|
181
|
+
<span slot="legend">Select options</span>
|
|
182
|
+
<custom-checkbox value="option1" name="example">Option 1</custom-checkbox>
|
|
183
|
+
<custom-checkbox value="option2" name="example">Option 2</custom-checkbox>
|
|
184
|
+
</custom-checkbox-group>
|
|
185
|
+
);
|
|
186
|
+
}</code></pre>
|
|
187
|
+
|
|
188
|
+
<auro-header level="3" id="reactModuleResolution">Module Resolution</auro-header>
|
|
189
|
+
Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript can resolve the component's package exports:
|
|
190
|
+
|
|
191
|
+
<pre class="language-js"><code class="language-js">{
|
|
192
|
+
"compilerOptions": {
|
|
193
|
+
"moduleResolution": "bundler"
|
|
194
|
+
}
|
|
195
|
+
}</code></pre>
|
|
196
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
197
|
+
</div>
|
|
198
|
+
</auro-accordion>
|
|
199
|
+
<auro-accordion class="section" id="svelte">
|
|
200
|
+
<span slot="trigger">Svelte</span>
|
|
201
|
+
<div class="accordion-content">
|
|
202
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/svelte.md) -->
|
|
203
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/svelte.md -->
|
|
204
|
+
Svelte has <a href="https://svelte.dev/docs/svelte/custom-elements">native support for custom elements</a>, so <code><auro-checkbox></code> works directly in Svelte templates without any wrapper or configuration.
|
|
205
|
+
|
|
206
|
+
<auro-header level="3" id="svelteImport">Import the Component</auro-header>
|
|
207
|
+
Import and register the components in the `<script>` block:
|
|
208
|
+
|
|
209
|
+
<pre class="language-html"><code class="language-html"><script lang="ts">
|
|
210
|
+
import { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
211
|
+
|
|
212
|
+
AuroCheckbox.register('[custom]-checkbox');
|
|
213
|
+
AuroCheckboxGroup.register('[custom]-checkbox-group');
|
|
214
|
+
</script></code></pre>
|
|
215
|
+
|
|
216
|
+
<auro-header level="3" id="svelteUsage">Basic Usage</auro-header>
|
|
217
|
+
Use `<auro-checkbox-group>` directly in your Svelte template:
|
|
218
|
+
|
|
219
|
+
<pre class="language-html"><code class="language-html"><script lang="ts">
|
|
220
|
+
import { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
221
|
+
|
|
222
|
+
AuroCheckbox.register('[custom]-checkbox');
|
|
223
|
+
AuroCheckboxGroup.register('[custom]-checkbox-group');
|
|
224
|
+
</script>
|
|
225
|
+
<custom-checkbox-group>
|
|
226
|
+
<span slot="legend">Select options</span>
|
|
227
|
+
<custom-checkbox value="option1" name="example">Option 1</custom-checkbox>
|
|
228
|
+
<custom-checkbox value="option2" name="example">Option 2</custom-checkbox>
|
|
229
|
+
</custom-checkbox-group></code></pre>
|
|
230
|
+
|
|
231
|
+
<auro-header level="3" id="svelteTypeScript">TypeScript Declarations</auro-header>
|
|
232
|
+
Svelte does not automatically know about custom element attributes. To get autocomplete and type checking for `<auro-checkbox>` props in templates, add the following to a `.d.ts` file in your project (e.g. `src/auro-elements.d.ts`):
|
|
233
|
+
|
|
234
|
+
<pre class="language-js"><code class="language-js">import type { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
235
|
+
|
|
236
|
+
declare namespace svelteHTML {
|
|
237
|
+
interface IntrinsicElements {
|
|
238
|
+
'[custom]-checkbox': Partial<AuroCheckbox> & svelteHTML.HTMLAttributes<AuroCheckbox>;
|
|
239
|
+
'[custom]-checkbox-group': Partial<AuroCheckboxGroup> & svelteHTML.HTMLAttributes<AuroCheckboxGroup>;
|
|
240
|
+
}
|
|
241
|
+
}</code></pre>
|
|
242
|
+
|
|
243
|
+
This enables prop hinting for attributes like `value`, `checked`, `disabled`, and others directly in Svelte templates.
|
|
244
|
+
|
|
245
|
+
<auro-header level="3" id="svelteEvents">Event Handling</auro-header>
|
|
246
|
+
Auro components emit native `CustomEvent`s. Use the `oninput` handler directly on the group element:
|
|
247
|
+
|
|
248
|
+
<pre class="language-html"><code class="language-html"><script lang="ts">
|
|
249
|
+
let values = $state<string[]>([]);
|
|
250
|
+
|
|
251
|
+
function handleInput(e: Event) {
|
|
252
|
+
values = (e.target as HTMLElement & { value: string[] }).value;
|
|
253
|
+
}
|
|
254
|
+
</script>
|
|
255
|
+
<custom-checkbox-group oninput={handleInput}>
|
|
256
|
+
<span slot="legend">Select options</span>
|
|
257
|
+
<custom-checkbox value="option1" name="example">Option 1</custom-checkbox>
|
|
258
|
+
<custom-checkbox value="option2" name="example">Option 2</custom-checkbox>
|
|
259
|
+
</custom-checkbox-group>
|
|
260
|
+
<p>Selected: {values}</p></code></pre>
|
|
261
|
+
|
|
262
|
+
<auro-header level="3" id="svelteModuleResolution">Module Resolution</auro-header>
|
|
263
|
+
Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript can resolve the component's package exports:
|
|
264
|
+
|
|
265
|
+
<pre class="language-js"><code class="language-js">{
|
|
266
|
+
"compilerOptions": {
|
|
267
|
+
"moduleResolution": "bundler"
|
|
268
|
+
}
|
|
269
|
+
}</code></pre>
|
|
270
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
271
|
+
</div>
|
|
272
|
+
</auro-accordion>
|
|
273
|
+
</auro-accordion-group>
|
|
274
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
275
|
+
</section>
|
|
276
|
+
<section>
|
|
123
277
|
<auro-header level="3" id="minimalConfig">Minimal Configuration</auro-header>
|
|
124
278
|
<p>Every <code><auro-checkbox-group></code> implementation requires:</p>
|
|
125
279
|
<ol>
|
|
@@ -1682,7 +1682,7 @@ class AuroHelpText extends i$2 {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
1684
|
|
|
1685
|
-
var formkitVersion = '
|
|
1685
|
+
var formkitVersion = '202605050131';
|
|
1686
1686
|
|
|
1687
1687
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1688
1688
|
// See LICENSE in the project root for license information.
|
|
@@ -1635,7 +1635,7 @@ class AuroHelpText extends LitElement {
|
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
1637
|
|
|
1638
|
-
var formkitVersion = '
|
|
1638
|
+
var formkitVersion = '202605050131';
|
|
1639
1639
|
|
|
1640
1640
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1641
1641
|
// See LICENSE in the project root for license information.
|
|
@@ -1635,7 +1635,7 @@ class AuroHelpText extends LitElement {
|
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
1637
|
|
|
1638
|
-
var formkitVersion = '
|
|
1638
|
+
var formkitVersion = '202605050131';
|
|
1639
1639
|
|
|
1640
1640
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1641
1641
|
// See LICENSE in the project root for license information.
|
|
@@ -5229,7 +5229,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5229
5229
|
}
|
|
5230
5230
|
};
|
|
5231
5231
|
|
|
5232
|
-
var formkitVersion$2 = '
|
|
5232
|
+
var formkitVersion$2 = '202605050131';
|
|
5233
5233
|
|
|
5234
5234
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5235
5235
|
static get properties() {
|
|
@@ -12981,7 +12981,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12981
12981
|
}
|
|
12982
12982
|
};
|
|
12983
12983
|
|
|
12984
|
-
var formkitVersion$1 = '
|
|
12984
|
+
var formkitVersion$1 = '202605050131';
|
|
12985
12985
|
|
|
12986
12986
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12987
12987
|
// See LICENSE in the project root for license information.
|
|
@@ -14046,7 +14046,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
14046
14046
|
}
|
|
14047
14047
|
}
|
|
14048
14048
|
|
|
14049
|
-
var formkitVersion = '
|
|
14049
|
+
var formkitVersion = '202605050131';
|
|
14050
14050
|
|
|
14051
14051
|
var styleCss$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
14052
14052
|
|
|
@@ -5140,7 +5140,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5140
5140
|
}
|
|
5141
5141
|
};
|
|
5142
5142
|
|
|
5143
|
-
var formkitVersion$2 = '
|
|
5143
|
+
var formkitVersion$2 = '202605050131';
|
|
5144
5144
|
|
|
5145
5145
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5146
5146
|
static get properties() {
|
|
@@ -12892,7 +12892,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12892
12892
|
}
|
|
12893
12893
|
};
|
|
12894
12894
|
|
|
12895
|
-
var formkitVersion$1 = '
|
|
12895
|
+
var formkitVersion$1 = '202605050131';
|
|
12896
12896
|
|
|
12897
12897
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12898
12898
|
// See LICENSE in the project root for license information.
|
|
@@ -13957,7 +13957,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13957
13957
|
}
|
|
13958
13958
|
}
|
|
13959
13959
|
|
|
13960
|
-
var formkitVersion = '
|
|
13960
|
+
var formkitVersion = '202605050131';
|
|
13961
13961
|
|
|
13962
13962
|
var styleCss$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13963
13963
|
|
|
@@ -5140,7 +5140,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5140
5140
|
}
|
|
5141
5141
|
};
|
|
5142
5142
|
|
|
5143
|
-
var formkitVersion$2 = '
|
|
5143
|
+
var formkitVersion$2 = '202605050131';
|
|
5144
5144
|
|
|
5145
5145
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5146
5146
|
static get properties() {
|
|
@@ -12892,7 +12892,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12892
12892
|
}
|
|
12893
12893
|
};
|
|
12894
12894
|
|
|
12895
|
-
var formkitVersion$1 = '
|
|
12895
|
+
var formkitVersion$1 = '202605050131';
|
|
12896
12896
|
|
|
12897
12897
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12898
12898
|
// See LICENSE in the project root for license information.
|
|
@@ -13957,7 +13957,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13957
13957
|
}
|
|
13958
13958
|
}
|
|
13959
13959
|
|
|
13960
|
-
var formkitVersion = '
|
|
13960
|
+
var formkitVersion = '202605050131';
|
|
13961
13961
|
|
|
13962
13962
|
var styleCss$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13963
13963
|
|
|
@@ -5155,7 +5155,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
5155
5155
|
}
|
|
5156
5156
|
};
|
|
5157
5157
|
|
|
5158
|
-
var formkitVersion$2 = '
|
|
5158
|
+
var formkitVersion$2 = '202605050131';
|
|
5159
5159
|
|
|
5160
5160
|
let AuroElement$2 = class AuroElement extends i$4 {
|
|
5161
5161
|
static get properties() {
|
|
@@ -12907,7 +12907,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
12907
12907
|
}
|
|
12908
12908
|
};
|
|
12909
12909
|
|
|
12910
|
-
var formkitVersion$1 = '
|
|
12910
|
+
var formkitVersion$1 = '202605050131';
|
|
12911
12911
|
|
|
12912
12912
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12913
12913
|
// See LICENSE in the project root for license information.
|
|
@@ -13972,7 +13972,7 @@ class AuroBibtemplate extends i$4 {
|
|
|
13972
13972
|
}
|
|
13973
13973
|
}
|
|
13974
13974
|
|
|
13975
|
-
var formkitVersion = '
|
|
13975
|
+
var formkitVersion = '202605050131';
|
|
13976
13976
|
|
|
13977
13977
|
var styleCss$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13978
13978
|
|
|
@@ -5073,7 +5073,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
5073
5073
|
}
|
|
5074
5074
|
};
|
|
5075
5075
|
|
|
5076
|
-
var formkitVersion$2 = '
|
|
5076
|
+
var formkitVersion$2 = '202605050131';
|
|
5077
5077
|
|
|
5078
5078
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
5079
5079
|
static get properties() {
|
|
@@ -12818,7 +12818,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
12818
12818
|
}
|
|
12819
12819
|
};
|
|
12820
12820
|
|
|
12821
|
-
var formkitVersion$1 = '
|
|
12821
|
+
var formkitVersion$1 = '202605050131';
|
|
12822
12822
|
|
|
12823
12823
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12824
12824
|
// See LICENSE in the project root for license information.
|
|
@@ -13883,7 +13883,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13883
13883
|
}
|
|
13884
13884
|
}
|
|
13885
13885
|
|
|
13886
|
-
var formkitVersion = '
|
|
13886
|
+
var formkitVersion = '202605050131';
|
|
13887
13887
|
|
|
13888
13888
|
var styleCss$1 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13889
13889
|
|
|
@@ -5073,7 +5073,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
|
|
|
5073
5073
|
}
|
|
5074
5074
|
};
|
|
5075
5075
|
|
|
5076
|
-
var formkitVersion$2 = '
|
|
5076
|
+
var formkitVersion$2 = '202605050131';
|
|
5077
5077
|
|
|
5078
5078
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
5079
5079
|
static get properties() {
|
|
@@ -12818,7 +12818,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
12818
12818
|
}
|
|
12819
12819
|
};
|
|
12820
12820
|
|
|
12821
|
-
var formkitVersion$1 = '
|
|
12821
|
+
var formkitVersion$1 = '202605050131';
|
|
12822
12822
|
|
|
12823
12823
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12824
12824
|
// See LICENSE in the project root for license information.
|
|
@@ -13883,7 +13883,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
13883
13883
|
}
|
|
13884
13884
|
}
|
|
13885
13885
|
|
|
13886
|
-
var formkitVersion = '
|
|
13886
|
+
var formkitVersion = '202605050131';
|
|
13887
13887
|
|
|
13888
13888
|
var styleCss$1 = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
13889
13889
|
|
|
@@ -1521,7 +1521,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
};
|
|
1523
1523
|
|
|
1524
|
-
var formkitVersion$1 = '
|
|
1524
|
+
var formkitVersion$1 = '202605050131';
|
|
1525
1525
|
|
|
1526
1526
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1527
1527
|
// See LICENSE in the project root for license information.
|
|
@@ -5729,7 +5729,7 @@ class AuroHelpText extends i$2 {
|
|
|
5729
5729
|
}
|
|
5730
5730
|
}
|
|
5731
5731
|
|
|
5732
|
-
var formkitVersion = '
|
|
5732
|
+
var formkitVersion = '202605050131';
|
|
5733
5733
|
|
|
5734
5734
|
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5735
5735
|
static get properties() {
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
<auro-anchorlink fluid href="#recommendedSetup" class="level2 body-xs" onclick="openAccordion('recommendedAccordion')">Recommended</auro-anchorlink>
|
|
9
9
|
<auro-anchorlink fluid href="#autoSetup" class="level2 body-xs" onclick="openAccordion('autoAccordion')">Auto</auro-anchorlink>
|
|
10
10
|
<auro-anchorlink fluid href="#cdnSetup" class="level2 body-xs" onclick="openAccordion('cdnAccordion')">CDN</auro-anchorlink>
|
|
11
|
+
<auro-anchorlink fluid href="#frameworks">Frameworks</auro-anchorlink>
|
|
12
|
+
<auro-anchorlink fluid href="#react" class="level2 body-xs" onclick="openAccordion('react')">React</auro-anchorlink>
|
|
13
|
+
<auro-anchorlink fluid href="#svelte" class="level2 body-xs" onclick="openAccordion('svelte')">Svelte</auro-anchorlink>
|
|
11
14
|
<auro-anchorlink fluid href="#minimalConfig">Minimal Config</auro-anchorlink>
|
|
12
15
|
<auro-anchorlink fluid href="#slots">Slots</auro-anchorlink>
|
|
13
16
|
<auro-anchorlink fluid href="#slotsGroup" class="level2 body-xs">auro-counter-group</auro-anchorlink>
|
|
@@ -125,6 +128,153 @@ Then use the elements in your HTML:
|
|
|
125
128
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
126
129
|
</section>
|
|
127
130
|
<section>
|
|
131
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/frameworks.md) -->
|
|
132
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/frameworks.md -->
|
|
133
|
+
<auro-header level="2" id="frameworks">Frameworks</auro-header>
|
|
134
|
+
<auro-accordion-group Emphasis>
|
|
135
|
+
<auro-accordion class="section" id="react">
|
|
136
|
+
<span slot="trigger">React</span>
|
|
137
|
+
<div class="accordion-content">
|
|
138
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/react.md) -->
|
|
139
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/react.md -->
|
|
140
|
+
React 19 includes <a href="https://react.dev/blog/2024/12/05/react-19#support-for-custom-elements">native support for custom elements</a>, so <code><auro-counter></code> works directly in JSX without any wrapper library.
|
|
141
|
+
|
|
142
|
+
<auro-header level="3" id="reactImport">Import the Component</auro-header>
|
|
143
|
+
Import and register the components at the top level of your application (e.g. in your root `main.tsx` or `App.tsx`):
|
|
144
|
+
|
|
145
|
+
<pre class="language-js"><code class="language-js">import { AuroCounter, AuroCounterGroup } from '@aurodesignsystem/auro-formkit/auro-counter/class';
|
|
146
|
+
|
|
147
|
+
AuroCounter.register('[custom]-counter');
|
|
148
|
+
AuroCounterGroup.register('[custom]-counter-group');</code></pre>
|
|
149
|
+
|
|
150
|
+
<auro-header level="3" id="reactTypeScript">TypeScript Declarations</auro-header>
|
|
151
|
+
The component ships with TypeScript type definitions for the `AuroCounter` class. However, React's JSX does not automatically map custom element tag names to their types. To get type checking for `<auro-counter>` in JSX, add the following declaration to a `.d.ts` file in your project:
|
|
152
|
+
|
|
153
|
+
<pre class="language-js"><code class="language-js">import type { AuroCounter, AuroCounterGroup } from '@aurodesignsystem/auro-formkit/auro-counter/class';
|
|
154
|
+
|
|
155
|
+
declare global {
|
|
156
|
+
namespace JSX {
|
|
157
|
+
interface IntrinsicElements {
|
|
158
|
+
'[custom]-counter': React.HTMLAttributes<AuroCounter> & Partial<AuroCounter>;
|
|
159
|
+
'[custom]-counter-group': React.HTMLAttributes<AuroCounterGroup> & Partial<AuroCounterGroup>;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}</code></pre>
|
|
163
|
+
|
|
164
|
+
<auro-header level="3" id="reactEvents">Event Handling</auro-header>
|
|
165
|
+
Auro components emit native `CustomEvent`s. Use a `ref` to attach event listeners in a `useEffect`:
|
|
166
|
+
|
|
167
|
+
<pre class="language-js"><code class="language-js">import { useRef, useEffect } from 'react';
|
|
168
|
+
|
|
169
|
+
function MyCounterGroup() {
|
|
170
|
+
const groupRef = useRef<HTMLElement>(null);
|
|
171
|
+
|
|
172
|
+
useEffect(() => {
|
|
173
|
+
const el = groupRef.current;
|
|
174
|
+
if (!el) return;
|
|
175
|
+
|
|
176
|
+
const handleInput = () => {
|
|
177
|
+
console.log('Counter value:', (el as any).value);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
el.addEventListener('countChanged', handleInput);
|
|
181
|
+
return () => el.removeEventListener('countChanged', handleInput);
|
|
182
|
+
}, []);
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
<custom-counter-group>
|
|
186
|
+
<span slot="label">Passengers</span>
|
|
187
|
+
<custom-counter ref={groupRef}>Adults</custom-counter>
|
|
188
|
+
<custom-counter>Children</custom-counter>
|
|
189
|
+
</custom-counter-group>
|
|
190
|
+
);
|
|
191
|
+
}</code></pre>
|
|
192
|
+
|
|
193
|
+
<auro-header level="3" id="reactModuleResolution">Module Resolution</auro-header>
|
|
194
|
+
Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript can resolve the component's package exports:
|
|
195
|
+
|
|
196
|
+
<pre class="language-js"><code class="language-js">{
|
|
197
|
+
"compilerOptions": {
|
|
198
|
+
"moduleResolution": "bundler"
|
|
199
|
+
}
|
|
200
|
+
}</code></pre>
|
|
201
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
202
|
+
</div>
|
|
203
|
+
</auro-accordion>
|
|
204
|
+
<auro-accordion class="section" id="svelte">
|
|
205
|
+
<span slot="trigger">Svelte</span>
|
|
206
|
+
<div class="accordion-content">
|
|
207
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/svelte.md) -->
|
|
208
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/svelte.md -->
|
|
209
|
+
Svelte has <a href="https://svelte.dev/docs/svelte/custom-elements">native support for custom elements</a>, so <code><auro-counter></code> works directly in Svelte templates without any wrapper or configuration.
|
|
210
|
+
|
|
211
|
+
<auro-header level="3" id="svelteImport">Import the Component</auro-header>
|
|
212
|
+
Import and register the components in the `<script>` block:
|
|
213
|
+
|
|
214
|
+
<pre class="language-html"><code class="language-html"><script lang="ts">
|
|
215
|
+
import { AuroCounter, AuroCounterGroup } from '@aurodesignsystem/auro-formkit/auro-counter/class';
|
|
216
|
+
|
|
217
|
+
AuroCounter.register('[custom]-counter');
|
|
218
|
+
AuroCounterGroup.register('[custom]-counter-group');
|
|
219
|
+
</script></code></pre>
|
|
220
|
+
|
|
221
|
+
<auro-header level="3" id="svelteUsage">Basic Usage</auro-header>
|
|
222
|
+
Use `<auro-counter-group>` directly in your Svelte template:
|
|
223
|
+
|
|
224
|
+
<pre class="language-html"><code class="language-html"><script lang="ts">
|
|
225
|
+
import { AuroCounter, AuroCounterGroup } from '@aurodesignsystem/auro-formkit/auro-counter/class';
|
|
226
|
+
|
|
227
|
+
AuroCounter.register('[custom]-counter');
|
|
228
|
+
AuroCounterGroup.register('[custom]-counter-group');
|
|
229
|
+
</script>
|
|
230
|
+
<custom-counter-group>
|
|
231
|
+
<span slot="label">Passengers</span>
|
|
232
|
+
<custom-counter>Adults</custom-counter>
|
|
233
|
+
<custom-counter>Children</custom-counter>
|
|
234
|
+
</custom-counter-group></code></pre>
|
|
235
|
+
|
|
236
|
+
<auro-header level="3" id="svelteTypeScript">TypeScript Declarations</auro-header>
|
|
237
|
+
Svelte does not automatically know about custom element attributes. To get autocomplete and type checking for `<auro-counter>` props in templates, add the following to a `.d.ts` file in your project (e.g. `src/auro-elements.d.ts`):
|
|
238
|
+
|
|
239
|
+
<pre class="language-js"><code class="language-js">import type { AuroCounter, AuroCounterGroup } from '@aurodesignsystem/auro-formkit/auro-counter/class';
|
|
240
|
+
|
|
241
|
+
declare namespace svelteHTML {
|
|
242
|
+
interface IntrinsicElements {
|
|
243
|
+
'[custom]-counter': Partial<AuroCounter> & svelteHTML.HTMLAttributes<AuroCounter>;
|
|
244
|
+
'[custom]-counter-group': Partial<AuroCounterGroup> & svelteHTML.HTMLAttributes<AuroCounterGroup>;
|
|
245
|
+
}
|
|
246
|
+
}</code></pre>
|
|
247
|
+
|
|
248
|
+
This enables prop hinting for attributes like `value`, `min`, `max`, `disabled`, and others directly in Svelte templates.
|
|
249
|
+
|
|
250
|
+
<auro-header level="3" id="svelteEvents">Event Handling</auro-header>
|
|
251
|
+
Auro components emit native `CustomEvent`s. Listen for the `countChanged` event on the element:
|
|
252
|
+
|
|
253
|
+
<pre class="language-html"><code class="language-html"><script lang="ts">
|
|
254
|
+
let count = $state(0);
|
|
255
|
+
|
|
256
|
+
function handleChange(e: Event) {
|
|
257
|
+
count = (e.target as HTMLElement & { value: number }).value;
|
|
258
|
+
}
|
|
259
|
+
</script>
|
|
260
|
+
<custom-counter on:countChanged={handleChange}>Adults</custom-counter>
|
|
261
|
+
<p>Count: {count}</p></code></pre>
|
|
262
|
+
|
|
263
|
+
<auro-header level="3" id="svelteModuleResolution">Module Resolution</auro-header>
|
|
264
|
+
Ensure your `tsconfig.json` uses `"moduleResolution": "bundler"` so TypeScript can resolve the component's package exports:
|
|
265
|
+
|
|
266
|
+
<pre class="language-js"><code class="language-js">{
|
|
267
|
+
"compilerOptions": {
|
|
268
|
+
"moduleResolution": "bundler"
|
|
269
|
+
}
|
|
270
|
+
}</code></pre>
|
|
271
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
272
|
+
</div>
|
|
273
|
+
</auro-accordion>
|
|
274
|
+
</auro-accordion-group>
|
|
275
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
276
|
+
</section>
|
|
277
|
+
<section>
|
|
128
278
|
<auro-header level="3" id="minimalConfig">Minimal Configuration</auro-header>
|
|
129
279
|
<p>A standalone <code><auro-counter></code> requires only a label in the default slot:</p>
|
|
130
280
|
<pre class="language-html"><code class="language-html"><auro-counter>
|
|
@@ -1521,7 +1521,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
};
|
|
1523
1523
|
|
|
1524
|
-
var formkitVersion$1 = '
|
|
1524
|
+
var formkitVersion$1 = '202605050131';
|
|
1525
1525
|
|
|
1526
1526
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1527
1527
|
// See LICENSE in the project root for license information.
|
|
@@ -5729,7 +5729,7 @@ class AuroHelpText extends i$2 {
|
|
|
5729
5729
|
}
|
|
5730
5730
|
}
|
|
5731
5731
|
|
|
5732
|
-
var formkitVersion = '
|
|
5732
|
+
var formkitVersion = '202605050131';
|
|
5733
5733
|
|
|
5734
5734
|
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5735
5735
|
static get properties() {
|
|
@@ -1471,7 +1471,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
};
|
|
1473
1473
|
|
|
1474
|
-
var formkitVersion$1 = '
|
|
1474
|
+
var formkitVersion$1 = '202605050131';
|
|
1475
1475
|
|
|
1476
1476
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1477
1477
|
// See LICENSE in the project root for license information.
|
|
@@ -5661,7 +5661,7 @@ class AuroHelpText extends LitElement {
|
|
|
5661
5661
|
}
|
|
5662
5662
|
}
|
|
5663
5663
|
|
|
5664
|
-
var formkitVersion = '
|
|
5664
|
+
var formkitVersion = '202605050131';
|
|
5665
5665
|
|
|
5666
5666
|
let AuroElement$1 = class AuroElement extends LitElement {
|
|
5667
5667
|
static get properties() {
|
|
@@ -1471,7 +1471,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
};
|
|
1473
1473
|
|
|
1474
|
-
var formkitVersion$1 = '
|
|
1474
|
+
var formkitVersion$1 = '202605050131';
|
|
1475
1475
|
|
|
1476
1476
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1477
1477
|
// See LICENSE in the project root for license information.
|
|
@@ -5661,7 +5661,7 @@ class AuroHelpText extends LitElement {
|
|
|
5661
5661
|
}
|
|
5662
5662
|
}
|
|
5663
5663
|
|
|
5664
|
-
var formkitVersion = '
|
|
5664
|
+
var formkitVersion = '202605050131';
|
|
5665
5665
|
|
|
5666
5666
|
let AuroElement$1 = class AuroElement extends LitElement {
|
|
5667
5667
|
static get properties() {
|