@aurodesignsystem-dev/auro-tabs 0.0.0-pr87.1 → 0.0.0-pr87.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/demo/api.html CHANGED
@@ -17,12 +17,18 @@
17
17
  <meta charset="UTF-8" />
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
19
  <title>Auro Web Component Generator | auro-tabs custom element</title>
20
- <link
21
- rel="stylesheet"
22
- type="text/css"
23
- href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
24
- />
25
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@alaskaairux/design-tokens@latest/dist/tokens/CSSCustomProperties.css">
20
+
21
+ <!-- Prism.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-button's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+ <!-- Webcore Stylesheet Alaska Theme -->
30
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
31
+ <!-- Demo Specific Styles -->
26
32
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
27
33
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
28
34
  </head>
package/demo/api.md CHANGED
@@ -6,13 +6,23 @@
6
6
  Represents a tab within an auro-tabgroup element. When selected, displays the corresponding AuroTabpanel.
7
7
  The auro-tabpanel element should only be used inside an AuroTabgroup element.
8
8
 
9
- ## Properties
9
+ ### Properties & Attributes
10
10
 
11
- | Property | Attribute | Type | Default | Description |
12
- |------------|------------|-----------|---------|-------------------------------|
13
- | [disabled](#disabled) | `disabled` | `Boolean` | "false" | Mark the tab as disabled tab. |
14
- | [selected](#selected) | `selected` | `Boolean` | "false" | Mark the tab as selected tab. |
15
- | [variant](#variant) | `variant` | `string` | "false" | |
11
+ | Properties | Attributes | Type | Default | Description |
12
+ | ---------- | ---------- | --------------------------------- | --------- | ----------------------------------------------------------------------- |
13
+ | appearance | appearance | "default" \| "inverse" \| string | "default" | Defines whether the component will be on lighter or darker backgrounds. |
14
+ | disabled | disabled | boolean | false | Indicates whether the tab is disabled. |
15
+ | selected | selected | boolean | false | Indicates whether the tab is selected. |
16
+ | variant | variant | "default" \| "unstyled" \| string | "default" | The variant of the tab. |
17
+ | | focused | boolean | false | Indicates whether the tab is focused. |
18
+
19
+ ### Methods
20
+
21
+ | Name | Parameters | Return | Description |
22
+ | -------- | ------------------------------------------------------------------- | ------ | ------------------------------------------------- |
23
+ | register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser. |
24
+
25
+ ---
16
26
 
17
27
  # auro-tabgroup
18
28
 
@@ -21,49 +31,53 @@ All children of `<auro-tabgroup>` should be either `<auro-tab>` or
21
31
  `<auro-tabpanel>`. This element is stateless, meaning that no values are
22
32
  cached and therefore, changes during runtime work.
23
33
 
24
- ## Properties
34
+ ### Properties & Attributes
35
+
36
+ | Properties | Attributes | Type | Default | Description |
37
+ | ---------- | ---------- | -------------------------------- | --------- | ----------------------------------------------------------------------- |
38
+ | appearance | appearance | "default" \| "inverse" \| string | 'default' | Defines whether the component will be on lighter or darker backgrounds. |
25
39
 
26
- | Property | Attribute | Type | Default |
27
- |-----------------|-----------------|-----------|---------|
28
- | [busy](#busy) | | `boolean` | |
29
- | [panels](#panels) | | | |
30
- | [selectOnFocus](#selectOnFocus) | `selectOnFocus` | `boolean` | "false" |
31
- | [tabs](#tabs) | | | |
40
+ ### Methods
32
41
 
33
- ## Methods
42
+ | Name | Parameters | Return | Description |
43
+ | -------- | ------------------------------------------------------------------- | ------ | ------------------------------------------------- |
44
+ | register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser. |
34
45
 
35
- | Method | Type | Description |
36
- |--------------------|-------------------------------|--------------------------------------------|
37
- | [selectTab](#selectTab) | `(newTab: HTMLElement): void` | **newTab**: Selected auro-tab. |
38
- | [selectTabByIndex](#selectTabByIndex) | `(index: number): void` | **index**: The index of the tab to select. |
46
+ ### Slots
39
47
 
40
- ## Slots
48
+ | Name | Description |
49
+ | ----- | --------------------------------------- |
50
+ | panel | Slot component named for auro-tabpanel. |
51
+ | tab | Slot component named for auro-tab. |
41
52
 
42
- | Name | Description |
43
- |---------|-----------------------------------------|
44
- | [panel](#panel) | Slot component named for auro-tabpanel. |
45
- | [tab](#tab) | Slot component named for auro-tab. |
53
+ ### CSS Shadow Parts
46
54
 
47
- ## CSS Shadow Parts
55
+ | Name | Description |
56
+ | ----------------- | ------------------------------------------------------------------------------ |
57
+ | slider | The slider element. |
58
+ | slider-positioner | The slider positioner element (non-visual, only used to center slider on tab). |
59
+ | tabgroup__panels | The panel wrapper element. |
60
+ | tabgroup__root | The root element of the tab group. |
61
+ | tabgroup__tabs | The "tabs list" internal wrapper element. |
48
62
 
49
- | Part | Description |
50
- |---------------------|--------------------------------------------------|
51
- | [slider](#slider) | The slider element. |
52
- | `slider-positioner` | The slider positioner element (non-visual, only used to center slider on tab). |
53
- | `tabgroup__panels` | The panel wrapper element. |
54
- | `tabgroup__root` | The root element of the tab group. |
55
- | `tabgroup__tabs` | The "tabs list" internal wrapper element. |
63
+ ---
56
64
 
57
65
  # auro-tabpanel
58
66
 
59
67
  Represents a panel to be displayed when the corresponding tab is selected in an AuroTabgroup element.
60
68
  The auro-tabpanel element should only be used inside an AuroTabgroup element.
61
69
 
62
- ## Properties
70
+ ### Properties & Attributes
63
71
 
64
- | Property | Attribute | Type | Default |
65
- |----------|-----------|-----------|---------|
66
- | [hidden](#hidden) | `hidden` | `boolean` | "false" |
72
+ | Properties | Attributes | Type | Default | Description |
73
+ | ---------- | ---------- | ------- | ------- | -------------------------------------- |
74
+ | hidden | hidden | boolean | false | Indicates whether the panel is hidden. |
75
+
76
+ ### Methods
77
+
78
+ | Name | Parameters | Return | Description |
79
+ | -------- | ------------------------------------------------------------------- | ------ | ------------------------------------------------- |
80
+ | register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser. |
67
81
  <!-- AURO-GENERATED-CONTENT:END -->
68
82
 
69
83
  ## API Examples
@@ -73,7 +87,7 @@ The auro-tabpanel element should only be used inside an AuroTabgroup element.
73
87
  <div class="exampleWrapper">
74
88
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
75
89
  <!-- The below content is automatically added from ./../apiExamples/basic.html -->
76
- <auro-tabgroup variant="unstyled">>
90
+ <auro-tabgroup variant="unstyled">
77
91
  <div slot="tabs">
78
92
  <auro-tab>
79
93
  Baggage Info
@@ -104,7 +118,7 @@ The auro-tabpanel element should only be used inside an AuroTabgroup element.
104
118
  <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
105
119
 
106
120
  ```html
107
- <auro-tabgroup variant="unstyled">>
121
+ <auro-tabgroup variant="unstyled">
108
122
  <div slot="tabs">
109
123
  <auro-tab>
110
124
  Baggage Info
@@ -310,14 +324,12 @@ export function removeListener() {
310
324
 
311
325
  ### Slot Examples
312
326
 
313
- #### <a name="tab"></a>`tab`<a href="#" style="float: right; font-size: 1rem; font-weight: 100;">back to top</a> - `tabpanel`
314
-
315
- `<auro-tab slot=tab>` & `<auro-tabpanel slot=tabpanel>` needs to be sibling next to each other to be linked.
327
+ #### <a name="tabs"></a>`tabs`<a href="#" style="float: right; font-size: 1rem; font-weight: 100;">back to top</a> - `panels`
316
328
 
317
329
  <div class="exampleWrapper">
318
330
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
319
331
  <!-- The below content is automatically added from ./../apiExamples/basic.html -->
320
- <auro-tabgroup variant="unstyled">>
332
+ <auro-tabgroup variant="unstyled">
321
333
  <div slot="tabs">
322
334
  <auro-tab>
323
335
  Baggage Info
@@ -348,7 +360,7 @@ export function removeListener() {
348
360
  <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
349
361
 
350
362
  ```html
351
- <auro-tabgroup variant="unstyled">>
363
+ <auro-tabgroup variant="unstyled">
352
364
  <div slot="tabs">
353
365
  <auro-tab>
354
366
  Baggage Info
@@ -373,4 +385,73 @@ export function removeListener() {
373
385
  </auro-tabgroup>
374
386
  ```
375
387
  <!-- AURO-GENERATED-CONTENT:END -->
388
+ </auro-accordion>
389
+
390
+ ### Visual State on Dark Background
391
+
392
+ Set when the tabgroup is used on a dark background.
393
+
394
+ <div class="exampleWrapper--ondark">
395
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inverseAppearance.html) -->
396
+ <!-- The below content is automatically added from ./../apiExamples/inverseAppearance.html -->
397
+ <div style="color: white;">
398
+ <auro-tabgroup variant="unstyled" appearance="inverse">
399
+ <div slot="tabs">
400
+ <auro-tab>
401
+ Baggage Info
402
+ </auro-tab>
403
+ <auro-tab>
404
+ Help
405
+ </auro-tab>
406
+ <auro-tab>
407
+ More
408
+ </auro-tab>
409
+ <auro-tab>
410
+ No Panel
411
+ </auro-tab>
412
+ </div>
413
+ <div slot="panels">
414
+ <auro-tabpanel>
415
+ <span>Tab 1 Content</span>
416
+ </auro-tabpanel>
417
+ <auro-tabpanel><span>Tab 2 Content</span></auro-tabpanel>
418
+ <auro-tabpanel><span>Tab 3 Content</span></auro-tabpanel>
419
+ </div>
420
+ </auro-tabgroup>
421
+ </div>
422
+ <!-- AURO-GENERATED-CONTENT:END -->
423
+ </div>
424
+ <auro-accordion lowProfile justifyRight>
425
+ <span slot="trigger">See code</span>
426
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inverseAppearance.html) -->
427
+ <!-- The below code snippet is automatically added from ./../apiExamples/inverseAppearance.html -->
428
+
429
+ ```html
430
+ <div style="color: white;">
431
+ <auro-tabgroup variant="unstyled" appearance="inverse">
432
+ <div slot="tabs">
433
+ <auro-tab>
434
+ Baggage Info
435
+ </auro-tab>
436
+ <auro-tab>
437
+ Help
438
+ </auro-tab>
439
+ <auro-tab>
440
+ More
441
+ </auro-tab>
442
+ <auro-tab>
443
+ No Panel
444
+ </auro-tab>
445
+ </div>
446
+ <div slot="panels">
447
+ <auro-tabpanel>
448
+ <span>Tab 1 Content</span>
449
+ </auro-tabpanel>
450
+ <auro-tabpanel><span>Tab 2 Content</span></auro-tabpanel>
451
+ <auro-tabpanel><span>Tab 3 Content</span></auro-tabpanel>
452
+ </div>
453
+ </auro-tabgroup>
454
+ </div>
455
+ ```
456
+ <!-- AURO-GENERATED-CONTENT:END -->
376
457
  </auro-accordion>
@@ -68,6 +68,19 @@ class AuroLibraryRuntimeUtils {
68
68
 
69
69
  return elemTag === tag || elem.hasAttribute(tag);
70
70
  }
71
+
72
+ /**
73
+ * Gets the text content of a named slot.
74
+ * @returns {String}
75
+ * @private
76
+ */
77
+ getSlotText(elem, name) {
78
+ const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
79
+ const nodes = slot?.assignedNodes({ flatten: true }) || [];
80
+ const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
81
+
82
+ return text || null;
83
+ }
71
84
  }
72
85
 
73
86
  /**
@@ -77,7 +90,7 @@ class AuroLibraryRuntimeUtils {
77
90
  */
78
91
  const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},l=new Map,n$1=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n$1(x);
79
92
 
80
- var styleCss$2 = i$2`:host #tab-root{cursor:pointer;white-space:nowrap}:host([disabled]){pointer-events:none}:host(:focus-within),:host(:focus:not(:focus-visible)){position:relative;outline:none}:host(:focus-within):before,:host(:focus:not(:focus-visible)):before{position:absolute;top:0;left:50%;display:inline-block;width:100%;height:calc(100% + var(--ds-size-50, .25rem));border:1px solid var(--ds-color-border-active-default, #0074c8);border-radius:var(--ds-border-radius, .375rem);content:"";transform:translate(-50%)}
93
+ var styleCss$2 = i$2`:host #tab-root{cursor:pointer;white-space:nowrap}:host([disabled]){pointer-events:none}:host(:focus-within),:host(:focus:not(:focus-visible)){position:relative;outline-color:unset;outline-style:none;outline-width:unset}:host(:focus-within):before,:host(:focus:not(:focus-visible)):before{position:absolute;top:0;left:50%;display:inline-block;width:100%;height:calc(100% + var(--ds-size-50, .25rem));border:1px solid var(--ds-color-border-active-default, #0074c8);border-radius:var(--ds-border-radius, .375rem);content:"";transform:translate(-50%)}:host([onDark]:focus-within):before,:host([onDark]:focus:not(:focus-visible)):before,:host([appearance=inverse]:focus-within):before,:host([appearance=inverse]:focus:not(:focus-visible)):before{border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host(:not([onDark]):focus-within):before,:host(:not([onDark]):focus:not(:focus-visible)):before,:host(:not([appearance=inverse]):focus-within):before,:host(:not([appearance=inverse]):focus:not(:focus-visible)):before{border-color:var(--ds-advanced-color-state-focused, #01426a)}
81
94
  `;
82
95
 
83
96
  /* eslint-disable no-magic-numbers */
@@ -88,15 +101,25 @@ var styleCss$2 = i$2`:host #tab-root{cursor:pointer;white-space:nowrap}:host([di
88
101
  /**
89
102
  * Represents a tab within an auro-tabgroup element. When selected, displays the corresponding AuroTabpanel.
90
103
  * The auro-tabpanel element should only be used inside an AuroTabgroup element.
91
- *
92
- * @attr {Boolean} selected - Mark the tab as selected tab.
93
- * @attr {Boolean} disabled - Mark the tab as disabled tab.
94
104
  */
95
105
  class AuroTab extends i$3 {
96
106
  static get properties() {
97
107
  return {
98
108
  /**
99
- * @property {boolean} selected - Indicates whether the tab is selected.
109
+ * Defines whether the component will be on lighter or darker backgrounds.
110
+ * @type {"default" | "inverse" | string}
111
+ * @prop {String} appearance
112
+ * @default "default"
113
+ */
114
+ appearance: {
115
+ type: String,
116
+ reflect: true,
117
+ default: "default"
118
+ },
119
+
120
+ /**
121
+ * Indicates whether the tab is selected.
122
+ * @prop {boolean} selected
100
123
  * @default false
101
124
  */
102
125
  selected: {
@@ -105,7 +128,8 @@ class AuroTab extends i$3 {
105
128
  },
106
129
 
107
130
  /**
108
- * @property {boolean} focused - Indicates whether the tab is focused.
131
+ * Indicates whether the tab is focused.
132
+ * @property {boolean} focused
109
133
  * @default false
110
134
  * @private
111
135
  */
@@ -115,7 +139,8 @@ class AuroTab extends i$3 {
115
139
  },
116
140
 
117
141
  /**
118
- * @property {boolean} disabled - Indicates whether the tab is disabled.
142
+ * Indicates whether the tab is disabled.
143
+ * @property {boolean} disabled
119
144
  * @default false
120
145
  */
121
146
  disabled: {
@@ -124,8 +149,10 @@ class AuroTab extends i$3 {
124
149
  },
125
150
 
126
151
  /**
127
- * @property {"default" | "unstyled" | string} variant - The variant of the tab.
128
- * @default false
152
+ * The variant of the tab.
153
+ * @type {"default" | "unstyled" | string}
154
+ * @property {String} variant
155
+ * @default "default"
129
156
  */
130
157
  variant: {
131
158
  type: String,
@@ -212,6 +239,7 @@ class AuroTab extends i$3 {
212
239
  setInitialValues() {
213
240
  // Dynamic properties
214
241
  this.disabled = false;
242
+ this.appearance = "default";
215
243
 
216
244
  // Static properties
217
245
  /**
@@ -533,7 +561,7 @@ class ChildItemService {
533
561
  }
534
562
  }
535
563
 
536
- var styleCss$1 = i$2`::slotted(auro-tabpanel){flex-basis:100%}:host{position:relative;display:block}.tabgroupContainer{display:flex;flex-direction:column;transition:scroll .5s ease-in-out}.tabgroup{position:relative;padding-bottom:0}.tabgroup ::slotted([slot=tabs]){display:flex;overflow:unset;width:fit-content;flex-wrap:nowrap}.sliderPositioner{position:absolute;bottom:-1px;left:0;display:flex;width:0;height:calc(var(--ds-size-25, .125rem) + 1px);align-items:center;justify-content:center;transition:all .25s}.slider{width:100%;height:100%;background-color:var(--ds-color-ui-active-default, #054687)}
564
+ var styleCss$1 = i$2`::slotted(auro-tabpanel){flex-basis:100%}:host{position:relative;display:block}.tabgroupContainer{display:flex;flex-direction:column;transition:scroll .5s ease-in-out}.tabgroup{position:relative;padding-bottom:0}.tabgroup ::slotted([slot=tabs]){display:flex;overflow:unset;width:fit-content;flex-wrap:nowrap}.sliderPositioner{position:absolute;bottom:-1px;left:0;display:flex;width:0;height:calc(var(--ds-size-25, .125rem) + 1px);align-items:center;justify-content:center;transition:all .25s}.slider{width:100%;height:100%}:host(:not([onDark])) .slider,:host(:not([appearance=inverse])) .slider{background-color:var(--ds-advanced-color-state-focused, #01426a)}:host([onDark]) .slider,:host([appearance=inverse]) .slider{background-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}
537
565
  `;
538
566
 
539
567
  class TabIndexUtil {
@@ -605,10 +633,22 @@ const KEYCODE = {
605
633
  * @csspart tabgroup__panels - The panel wrapper element.
606
634
  * @csspart slider-positioner - The slider positioner element (non-visual, only used to center slider on tab).
607
635
  * @csspart slider - The slider element.
636
+ * @attr {Boolean} ondark - DEPRECATED - use `appearance` instead.
608
637
  */
609
638
  class AuroTabgroup extends i$3 {
610
639
  static get properties() {
611
640
  return {
641
+ /**
642
+ * Defines whether the component will be on lighter or darker backgrounds.
643
+ * @type {"default" | "inverse" | string}
644
+ * @property {String} appearance
645
+ * @default 'default'
646
+ */
647
+ appearance: {
648
+ type: String,
649
+ reflect: true,
650
+ },
651
+
612
652
  /**
613
653
  * @property {number} scrollPosition - The current scroll position of the tab group container.
614
654
  * @default 0
@@ -658,6 +698,15 @@ class AuroTabgroup extends i$3 {
658
698
  attribute: false,
659
699
  reflect: false,
660
700
  },
701
+
702
+ /**
703
+ * @property {boolean} ondark - DEPRECATED - use `appearance` instead.
704
+ * @default false
705
+ */
706
+ ondark: {
707
+ type: Boolean,
708
+ reflect: true,
709
+ },
661
710
  };
662
711
  }
663
712
 
@@ -768,6 +817,7 @@ class AuroTabgroup extends i$3 {
768
817
  this.scrollPosition = 0;
769
818
  this.sliderStyles = {};
770
819
  this.selectOnFocus = false;
820
+ this.appearance = "default";
771
821
 
772
822
  // Static Properties
773
823
  /**
@@ -807,6 +857,23 @@ class AuroTabgroup extends i$3 {
807
857
  AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroTabgroup);
808
858
  }
809
859
 
860
+ /**
861
+ * @description Propagates the ondark attribute to child tabs.
862
+ * @method propagateOnDarkToTabs
863
+ * @private
864
+ */
865
+ propagateOnDarkToTabs() {
866
+ this.allTabs.forEach((tab) => {
867
+ if (this.ondark) {
868
+ tab.setAttribute("ondark", "");
869
+ } else {
870
+ tab.removeAttribute("ondark");
871
+ }
872
+
873
+ tab.setAttribute("appearance", this.appearance);
874
+ });
875
+ }
876
+
810
877
  /**
811
878
  * Loop through tabs and match with same-index panels.
812
879
  * @private
@@ -867,6 +934,7 @@ class AuroTabgroup extends i$3 {
867
934
  this.busy = true;
868
935
 
869
936
  this.#associateTabsWithPanels();
937
+ this.propagateOnDarkToTabs();
870
938
 
871
939
  // If none of the tabs were set to be focused, focus the first tab
872
940
  if (this.focusedTabIdx === -1 && this.allTabs[0]?.panel) {
@@ -1153,8 +1221,15 @@ class AuroTabgroup extends i$3 {
1153
1221
  this.setResizeObserver(this.tabGroupContainer);
1154
1222
  }
1155
1223
 
1156
- updated() {
1224
+ updated(changedProperties) {
1157
1225
  this.updateChevronVisibility();
1226
+
1227
+ if (
1228
+ changedProperties.has("appearance") ||
1229
+ changedProperties.has("ondark")
1230
+ ) {
1231
+ this.propagateOnDarkToTabs();
1232
+ }
1158
1233
  }
1159
1234
 
1160
1235
  connectedCallback() {
@@ -1221,7 +1296,8 @@ class AuroTabpanel extends i$3 {
1221
1296
  static get properties() {
1222
1297
  return {
1223
1298
  /**
1224
- * @property {boolean} hidden - Indicates whether the panel is hidden.
1299
+ * Indicates whether the panel is hidden.
1300
+ * @property {boolean} hidden
1225
1301
  * @default false
1226
1302
  */
1227
1303
  hidden: {
package/demo/index.html CHANGED
@@ -17,29 +17,23 @@
17
17
  <meta charset="UTF-8" />
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
19
  <title>Auro Web Component Generator | auro-tabs custom element</title>
20
- <link
21
- rel="stylesheet"
22
- type="text/css"
23
- href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
24
- />
25
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.13.0/dist/tokens/CSSCustomProperties.css">
20
+
21
+ <!-- Prism.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-button's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+ <!-- Webcore Stylesheet Alaska Theme -->
30
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
31
+ <!-- Demo Specific Styles -->
26
32
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
27
33
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
28
34
 
29
- <!-- Auro radio group for examples -->
30
35
  <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-radio/+esm"></script>
31
36
 
32
-
33
- <style>
34
- /*
35
- For demo purposes only, the above elementDemoStyles
36
- has a star selector that's really hard to overwrite from shadow dom
37
- */
38
-
39
- auro-tab:focus{
40
- outline: none;
41
- }
42
- </style>
43
37
  </head>
44
38
  <body class="auro-markdown">
45
39
  <main></main>
@@ -119,6 +113,6 @@
119
113
 
120
114
 
121
115
  <!-- If additional elements are needed for the demo, add them here. -->
122
- <script src="https://cdn.jsdelivr.net/npm/@alaskaairux/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
116
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
123
117
  </body>
124
118
  </html>
package/demo/index.md CHANGED
@@ -39,7 +39,7 @@ ship are focus borders and active-tab slider colors.
39
39
  <div class="exampleWrapper">
40
40
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/basic.html) -->
41
41
  <!-- The below content is automatically added from ../apiExamples/basic.html -->
42
- <auro-tabgroup variant="unstyled">>
42
+ <auro-tabgroup variant="unstyled">
43
43
  <div slot="tabs">
44
44
  <auro-tab>
45
45
  Baggage Info
@@ -70,7 +70,7 @@ ship are focus borders and active-tab slider colors.
70
70
  <!-- The below code snippet is automatically added from ../apiExamples/basic.html -->
71
71
 
72
72
  ```html
73
- <auro-tabgroup variant="unstyled">>
73
+ <auro-tabgroup variant="unstyled">
74
74
  <div slot="tabs">
75
75
  <auro-tab>
76
76
  Baggage Info
@@ -354,62 +354,69 @@ A: Because auro-tab is currently extends the [auro-hyperlink](https://auro.alask
354
354
 
355
355
  There are two important parts of every Auro component. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom clement. The class is exported and then used as part of defining the Web Component. When importing this component as described in the <a href="#install">install</a> section, the class is imported and the `auro-tabs` custom element is defined automatically.
356
356
 
357
- To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `registerComponent(name, type)` method and pass in a unique name.
358
-
359
- `type` can be either `'group(default)' | 'tab' | 'panel'`
357
+ To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `register(name)` method and pass in a unique name.
360
358
 
361
359
  ```js
362
- import '@alaskaairux/auro-tabs';
363
- registerComponent('custom-tabgroup');
364
- registerComponent('custom-tab', 'tab');
365
- registerComponent('custom-tabpanel', 'tabpanel');
360
+ import { AuroTab, AuroTabgroup, AuroTabpanel } '@aurodesignsystem/auro-tabs';
361
+
362
+ AuroTab.register('custom-tab');
363
+ AuroTabgroup.register('custom-tabgroup');
364
+ AuroTabpanel.register('custom-tabpanel');
366
365
  ```
367
366
 
368
367
  This will create a new custom element that you can use in your HTML that will function identically to the `auro-tabgroup` element.
369
368
 
370
369
  <div class="exampleWrapper">
371
- <custom-tabgroup>
372
- <auro-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
373
- Baggage Info
374
- </auro-tab>
375
- <auro-tabpanel slot="panel">
376
- <span>Tab 1 Content</span>
377
- </auro-tabpanel>
378
- <auro-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
379
- Help
380
- </auro-tab>
381
- <auro-tabpanel slot="panel"><span>Tab 2 Content</span></auro-tabpanel>
382
- <auro-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
383
- More
384
- </auro-tab>
385
- <auro-tabpanel slot="panel"><span>Tab 3 Content</span></auro-tabpanel>
386
- <auro-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
387
- No Panel
388
- </auro-tab>
370
+ <custom-tabgroup variant="unstyled">
371
+ <div slot="tabs">
372
+ <custom-tab>
373
+ Baggage Info
374
+ </custom-tab>
375
+ <custom-tab>
376
+ Help
377
+ </custom-tab>
378
+ <custom-tab>
379
+ More
380
+ </custom-tab>
381
+ <custom-tab>
382
+ No Panel
383
+ </custom-tab>
384
+ </div>
385
+ <div slot="panels">
386
+ <custom-tabpanel>
387
+ <span>Tab 1 Content</span>
388
+ </custom-tabpanel>
389
+ <custom-tabpanel><span>Tab 2 Content</span></custom-tabpanel>
390
+ <custom-tabpanel><span>Tab 3 Content</span></custom-tabpanel>
391
+ </div>
389
392
  </custom-tabgroup>
390
393
  </div>
391
394
  <auro-accordion lowProfile justifyRight>
392
395
  <span slot="trigger">See code</span>
393
396
 
394
397
  ```html
395
- <custom-tabgroup class="compact-default">
396
- <custom-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
397
- Baggage Info
398
- </custom-tab>
399
- <custom-tabpanel slot="panel">
400
- <span>Tab 1 Content</span>
401
- </custom-tabpanel>
402
- <custom-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
403
- Help
404
- </custom-tab>
405
- <custom-tabpanel slot="panel"><span>Tab 2 Content</span></custom-tabpanel>
406
- <custom-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
407
- More
408
- </custom-tab>
409
- <custom-tabpanel slot="panel"><span>Tab 3 Content</span></custom-tabpanel>
410
- <custom-tab href="#/" relative="http://localhost:8000/demo" slot="tab">
411
- No Panel
412
- </custom-tab>
413
- </custom-tabgroup>
398
+ <custom-tabgroup variant="unstyled">
399
+ <div slot="tabs">
400
+ <custom-tab>
401
+ Baggage Info
402
+ </custom-tab>
403
+ <custom-tab>
404
+ Help
405
+ </custom-tab>
406
+ <custom-tab>
407
+ More
408
+ </custom-tab>
409
+ <custom-tab>
410
+ No Panel
411
+ </custom-tab>
412
+ </div>
413
+ <div slot="panels">
414
+ <custom-tabpanel>
415
+ <span>Tab 1 Content</span>
416
+ </custom-tabpanel>
417
+ <custom-tabpanel><span>Tab 2 Content</span></custom-tabpanel>
418
+ <custom-tabpanel><span>Tab 3 Content</span></custom-tabpanel>
419
+ </div>
420
+ </custom-tabgroup>
414
421
  ```
415
422
  </auro-accordion>