@scouterna/ui-webc 2.2.7 → 3.1.0
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/dist/cjs/{index-DpSUh0CA.js → index-BPpKjjvS.js} +51 -1
- package/dist/cjs/{inputMixin-BEUFwoun.js → inputMixin-D0IzcaXz.js} +27 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/scout-app-bar.cjs.entry.js +1 -1
- package/dist/cjs/scout-bottom-bar-item.cjs.entry.js +1 -1
- package/dist/cjs/scout-bottom-bar.cjs.entry.js +1 -1
- package/dist/cjs/scout-button.cjs.entry.js +1 -1
- package/dist/cjs/scout-card.cjs.entry.js +1 -1
- package/dist/cjs/scout-checkbox_2.cjs.entry.js +16 -4
- package/dist/cjs/scout-divider.cjs.entry.js +1 -1
- package/dist/cjs/scout-field.cjs.entry.js +2 -2
- package/dist/cjs/scout-input.cjs.entry.js +9 -3
- package/dist/cjs/scout-link.cjs.entry.js +1 -1
- package/dist/cjs/scout-list-view-item.cjs.entry.js +1 -1
- package/dist/cjs/scout-list-view-subheader.cjs.entry.js +1 -1
- package/dist/cjs/scout-list-view.cjs.entry.js +1 -1
- package/dist/cjs/scout-loader.cjs.entry.js +1 -1
- package/dist/cjs/scout-select.cjs.entry.js +10 -4
- package/dist/cjs/scout-stack.cjs.entry.js +1 -1
- package/dist/cjs/scout-switch.cjs.entry.js +9 -3
- package/dist/cjs/scout-tabs-tab.cjs.entry.js +18 -0
- package/dist/cjs/scout-tabs.cjs.entry.js +74 -0
- package/dist/cjs/ui-webc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/field/field.js +2 -2
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/tabs/tabs.css +17 -0
- package/dist/collection/components/tabs/tabs.js +142 -0
- package/dist/collection/components/tabs-tab/tabs-tab.css +44 -0
- package/dist/collection/components/tabs-tab/tabs-tab.js +19 -0
- package/dist/collection/mixins/inputMixin.js +63 -22
- package/dist/components/index.js +1 -1
- package/dist/components/p-B72iGJNe.js +1 -0
- package/dist/components/{p-CmHrcz9s.js → p-CXXyN7aY.js} +1 -1
- package/dist/components/p-DxVqa2PR.js +1 -0
- package/dist/components/p-Qv5q0SGa.js +1 -0
- package/dist/components/scout-app-bar.js +1 -1
- package/dist/components/scout-bottom-bar-item.js +1 -1
- package/dist/components/scout-bottom-bar.js +1 -1
- package/dist/components/scout-button.js +1 -1
- package/dist/components/scout-card.js +1 -1
- package/dist/components/scout-checkbox.js +1 -1
- package/dist/components/scout-divider.js +1 -1
- package/dist/components/scout-field.js +1 -1
- package/dist/components/scout-input.js +1 -1
- package/dist/components/scout-link.js +1 -1
- package/dist/components/scout-list-view-item.js +1 -1
- package/dist/components/scout-list-view-subheader.js +1 -1
- package/dist/components/scout-list-view.js +1 -1
- package/dist/components/scout-loader.js +1 -1
- package/dist/components/scout-radio-button.js +1 -1
- package/dist/components/scout-select.js +1 -1
- package/dist/components/scout-stack.js +1 -1
- package/dist/components/scout-switch.js +1 -1
- package/dist/components/scout-tabs-tab.d.ts +11 -0
- package/dist/components/scout-tabs-tab.js +1 -0
- package/dist/components/scout-tabs.d.ts +11 -0
- package/dist/components/scout-tabs.js +1 -0
- package/dist/custom-elements.json +231 -42
- package/dist/esm/{index-xD2pOo_x.js → index-CBq_WkdR.js} +51 -1
- package/dist/esm/{inputMixin-BuDdNX3m.js → inputMixin-CArDsEiI.js} +27 -14
- package/dist/esm/loader.js +3 -3
- package/dist/esm/scout-app-bar.entry.js +1 -1
- package/dist/esm/scout-bottom-bar-item.entry.js +1 -1
- package/dist/esm/scout-bottom-bar.entry.js +1 -1
- package/dist/esm/scout-button.entry.js +1 -1
- package/dist/esm/scout-card.entry.js +1 -1
- package/dist/esm/scout-checkbox_2.entry.js +16 -4
- package/dist/esm/scout-divider.entry.js +1 -1
- package/dist/esm/scout-field.entry.js +2 -2
- package/dist/esm/scout-input.entry.js +9 -3
- package/dist/esm/scout-link.entry.js +1 -1
- package/dist/esm/scout-list-view-item.entry.js +1 -1
- package/dist/esm/scout-list-view-subheader.entry.js +1 -1
- package/dist/esm/scout-list-view.entry.js +1 -1
- package/dist/esm/scout-loader.entry.js +1 -1
- package/dist/esm/scout-select.entry.js +10 -4
- package/dist/esm/scout-stack.entry.js +1 -1
- package/dist/esm/scout-switch.entry.js +9 -3
- package/dist/esm/scout-tabs-tab.entry.js +16 -0
- package/dist/esm/scout-tabs.entry.js +72 -0
- package/dist/esm/ui-webc.js +3 -3
- package/dist/types/components/tabs/tabs.d.ts +31 -0
- package/dist/types/components/tabs-tab/tabs-tab.d.ts +3 -0
- package/dist/types/components.d.ts +183 -30
- package/dist/ui-webc/p-0e444b1f.entry.js +1 -0
- package/dist/ui-webc/p-189879c2.entry.js +1 -0
- package/dist/ui-webc/p-60cd6c7e.entry.js +1 -0
- package/dist/ui-webc/{p-8da4cdaa.entry.js → p-6287efe7.entry.js} +1 -1
- package/dist/ui-webc/{p-bf96d820.entry.js → p-6825e415.entry.js} +1 -1
- package/dist/ui-webc/p-6xDaXBJm.js +1 -0
- package/dist/ui-webc/{p-186ee2d2.entry.js → p-78126f74.entry.js} +1 -1
- package/dist/ui-webc/{p-cdce9596.entry.js → p-8f5965aa.entry.js} +1 -1
- package/dist/ui-webc/{p-xD2pOo_x.js → p-CBq_WkdR.js} +2 -2
- package/dist/ui-webc/p-a153023c.entry.js +1 -0
- package/dist/ui-webc/{p-94f1aa41.entry.js → p-a2c09e05.entry.js} +1 -1
- package/dist/ui-webc/{p-802ce20c.entry.js → p-b699617e.entry.js} +1 -1
- package/dist/ui-webc/p-c0696c1f.entry.js +1 -0
- package/dist/ui-webc/{p-f3ff75c8.entry.js → p-c4f7cfa2.entry.js} +1 -1
- package/dist/ui-webc/{p-594f0ba6.entry.js → p-cdc127de.entry.js} +1 -1
- package/dist/ui-webc/p-db40c987.entry.js +1 -0
- package/dist/ui-webc/{p-66f2d080.entry.js → p-ef34d84c.entry.js} +1 -1
- package/dist/ui-webc/{p-db9e3e2d.entry.js → p-f799b2d8.entry.js} +1 -1
- package/dist/ui-webc/{p-d7430470.entry.js → p-f8099e5b.entry.js} +1 -1
- package/dist/ui-webc/{p-eaec31f1.entry.js → p-f8a4ef3d.entry.js} +1 -1
- package/dist/ui-webc/{p-5b96b509.entry.js → p-ff537388.entry.js} +1 -1
- package/dist/ui-webc/ui-webc.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-CTivgs5a.js +0 -1
- package/dist/components/p-R-tzZ3cs.js +0 -1
- package/dist/components/p-vLvmwbzB.js +0 -1
- package/dist/ui-webc/p-061e3457.entry.js +0 -1
- package/dist/ui-webc/p-0dd7cda5.entry.js +0 -1
- package/dist/ui-webc/p-24ccd3fc.entry.js +0 -1
- package/dist/ui-webc/p-BuuT2Uz3.js +0 -1
- package/dist/ui-webc/p-a92dd367.entry.js +0 -1
|
@@ -122,9 +122,9 @@ export namespace Components {
|
|
|
122
122
|
"label": string;
|
|
123
123
|
"name": string;
|
|
124
124
|
/**
|
|
125
|
-
* Custom validation
|
|
125
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
126
126
|
*/
|
|
127
|
-
"
|
|
127
|
+
"validity"?: string;
|
|
128
128
|
"value": string;
|
|
129
129
|
}
|
|
130
130
|
interface ScoutDivider {
|
|
@@ -180,9 +180,9 @@ export namespace Components {
|
|
|
180
180
|
*/
|
|
181
181
|
"type": InputType;
|
|
182
182
|
/**
|
|
183
|
-
* Custom validation
|
|
183
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
184
184
|
*/
|
|
185
|
-
"
|
|
185
|
+
"validity"?: string;
|
|
186
186
|
/**
|
|
187
187
|
* Value of the input element, in case you want to control it yourself.
|
|
188
188
|
* @default ""
|
|
@@ -272,9 +272,9 @@ export namespace Components {
|
|
|
272
272
|
"label": string;
|
|
273
273
|
"name": string;
|
|
274
274
|
/**
|
|
275
|
-
* Custom validation
|
|
275
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
276
276
|
*/
|
|
277
|
-
"
|
|
277
|
+
"validity"?: string;
|
|
278
278
|
"value": string;
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
@@ -290,9 +290,9 @@ export namespace Components {
|
|
|
290
290
|
"disabled": boolean;
|
|
291
291
|
"name": string;
|
|
292
292
|
/**
|
|
293
|
-
* Custom validation
|
|
293
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
294
294
|
*/
|
|
295
|
-
"
|
|
295
|
+
"validity"?: string;
|
|
296
296
|
/**
|
|
297
297
|
* Value of the select element, in case you want to control it yourself.
|
|
298
298
|
* @default ""
|
|
@@ -332,9 +332,25 @@ export namespace Components {
|
|
|
332
332
|
*/
|
|
333
333
|
"toggled": boolean;
|
|
334
334
|
/**
|
|
335
|
-
* Custom validation
|
|
335
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
336
336
|
*/
|
|
337
|
-
"
|
|
337
|
+
"validity"?: string;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* The tabs component is used to create a tabbed interface. It manages the state
|
|
341
|
+
* of which tab is active and displays an indicator under the active tab. Use
|
|
342
|
+
* `ScoutTabsTab` components to define the individual tabs.
|
|
343
|
+
* Currently there is no support for navigational tabs. Navigation has to be
|
|
344
|
+
* handled programmatically for now.
|
|
345
|
+
*/
|
|
346
|
+
interface ScoutTabs {
|
|
347
|
+
/**
|
|
348
|
+
* Zero-based index of the currently active tab.
|
|
349
|
+
* @default 0
|
|
350
|
+
*/
|
|
351
|
+
"value": number;
|
|
352
|
+
}
|
|
353
|
+
interface ScoutTabsTab {
|
|
338
354
|
}
|
|
339
355
|
}
|
|
340
356
|
export interface ScoutBottomBarItemCustomEvent<T> extends CustomEvent<T> {
|
|
@@ -373,6 +389,10 @@ export interface ScoutSwitchCustomEvent<T> extends CustomEvent<T> {
|
|
|
373
389
|
detail: T;
|
|
374
390
|
target: HTMLScoutSwitchElement;
|
|
375
391
|
}
|
|
392
|
+
export interface ScoutTabsCustomEvent<T> extends CustomEvent<T> {
|
|
393
|
+
detail: T;
|
|
394
|
+
target: HTMLScoutTabsElement;
|
|
395
|
+
}
|
|
376
396
|
declare global {
|
|
377
397
|
/**
|
|
378
398
|
* The App Bar component is used at the top of a page to display a title and
|
|
@@ -453,7 +473,11 @@ declare global {
|
|
|
453
473
|
element: HTMLElement;
|
|
454
474
|
};
|
|
455
475
|
"scoutBlur": void;
|
|
456
|
-
"
|
|
476
|
+
"scoutValidate": {
|
|
477
|
+
value: string;
|
|
478
|
+
element: HTMLElement;
|
|
479
|
+
};
|
|
480
|
+
"_scoutValidityChanged": { element: HTMLElement };
|
|
457
481
|
"_scoutInvalid": void;
|
|
458
482
|
"_scoutFieldId": string;
|
|
459
483
|
"scoutChecked": {
|
|
@@ -504,7 +528,11 @@ declare global {
|
|
|
504
528
|
element: HTMLElement;
|
|
505
529
|
};
|
|
506
530
|
"scoutBlur": void;
|
|
507
|
-
"
|
|
531
|
+
"scoutValidate": {
|
|
532
|
+
value: string;
|
|
533
|
+
element: HTMLElement;
|
|
534
|
+
};
|
|
535
|
+
"_scoutValidityChanged": { element: HTMLElement };
|
|
508
536
|
"_scoutInvalid": void;
|
|
509
537
|
"_scoutFieldId": string;
|
|
510
538
|
}
|
|
@@ -586,7 +614,11 @@ declare global {
|
|
|
586
614
|
element: HTMLElement;
|
|
587
615
|
};
|
|
588
616
|
"scoutBlur": void;
|
|
589
|
-
"
|
|
617
|
+
"scoutValidate": {
|
|
618
|
+
value: string;
|
|
619
|
+
element: HTMLElement;
|
|
620
|
+
};
|
|
621
|
+
"_scoutValidityChanged": { element: HTMLElement };
|
|
590
622
|
"_scoutInvalid": void;
|
|
591
623
|
"_scoutFieldId": string;
|
|
592
624
|
"scoutChecked": {
|
|
@@ -619,7 +651,11 @@ declare global {
|
|
|
619
651
|
element: HTMLElement;
|
|
620
652
|
};
|
|
621
653
|
"scoutBlur": void;
|
|
622
|
-
"
|
|
654
|
+
"scoutValidate": {
|
|
655
|
+
value: string;
|
|
656
|
+
element: HTMLElement;
|
|
657
|
+
};
|
|
658
|
+
"_scoutValidityChanged": { element: HTMLElement };
|
|
623
659
|
"_scoutInvalid": void;
|
|
624
660
|
"_scoutFieldId": string;
|
|
625
661
|
}
|
|
@@ -654,7 +690,11 @@ declare global {
|
|
|
654
690
|
element: HTMLElement;
|
|
655
691
|
};
|
|
656
692
|
"scoutBlur": void;
|
|
657
|
-
"
|
|
693
|
+
"scoutValidate": {
|
|
694
|
+
value: string;
|
|
695
|
+
element: HTMLElement;
|
|
696
|
+
};
|
|
697
|
+
"_scoutValidityChanged": { element: HTMLElement };
|
|
658
698
|
"_scoutInvalid": void;
|
|
659
699
|
"_scoutFieldId": string;
|
|
660
700
|
"scoutChecked": {
|
|
@@ -681,6 +721,36 @@ declare global {
|
|
|
681
721
|
prototype: HTMLScoutSwitchElement;
|
|
682
722
|
new (): HTMLScoutSwitchElement;
|
|
683
723
|
};
|
|
724
|
+
interface HTMLScoutTabsElementEventMap {
|
|
725
|
+
"scoutChange": { value: number };
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* The tabs component is used to create a tabbed interface. It manages the state
|
|
729
|
+
* of which tab is active and displays an indicator under the active tab. Use
|
|
730
|
+
* `ScoutTabsTab` components to define the individual tabs.
|
|
731
|
+
* Currently there is no support for navigational tabs. Navigation has to be
|
|
732
|
+
* handled programmatically for now.
|
|
733
|
+
*/
|
|
734
|
+
interface HTMLScoutTabsElement extends Components.ScoutTabs, HTMLStencilElement {
|
|
735
|
+
addEventListener<K extends keyof HTMLScoutTabsElementEventMap>(type: K, listener: (this: HTMLScoutTabsElement, ev: ScoutTabsCustomEvent<HTMLScoutTabsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
736
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
737
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
738
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
739
|
+
removeEventListener<K extends keyof HTMLScoutTabsElementEventMap>(type: K, listener: (this: HTMLScoutTabsElement, ev: ScoutTabsCustomEvent<HTMLScoutTabsElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
740
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
741
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
742
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
743
|
+
}
|
|
744
|
+
var HTMLScoutTabsElement: {
|
|
745
|
+
prototype: HTMLScoutTabsElement;
|
|
746
|
+
new (): HTMLScoutTabsElement;
|
|
747
|
+
};
|
|
748
|
+
interface HTMLScoutTabsTabElement extends Components.ScoutTabsTab, HTMLStencilElement {
|
|
749
|
+
}
|
|
750
|
+
var HTMLScoutTabsTabElement: {
|
|
751
|
+
prototype: HTMLScoutTabsTabElement;
|
|
752
|
+
new (): HTMLScoutTabsTabElement;
|
|
753
|
+
};
|
|
684
754
|
interface HTMLElementTagNameMap {
|
|
685
755
|
"scout-app-bar": HTMLScoutAppBarElement;
|
|
686
756
|
"scout-bottom-bar": HTMLScoutBottomBarElement;
|
|
@@ -700,6 +770,8 @@ declare global {
|
|
|
700
770
|
"scout-select": HTMLScoutSelectElement;
|
|
701
771
|
"scout-stack": HTMLScoutStackElement;
|
|
702
772
|
"scout-switch": HTMLScoutSwitchElement;
|
|
773
|
+
"scout-tabs": HTMLScoutTabsElement;
|
|
774
|
+
"scout-tabs-tab": HTMLScoutTabsTabElement;
|
|
703
775
|
}
|
|
704
776
|
}
|
|
705
777
|
declare namespace LocalJSX {
|
|
@@ -815,9 +887,19 @@ declare namespace LocalJSX {
|
|
|
815
887
|
checked: boolean;
|
|
816
888
|
element: HTMLInputElement;
|
|
817
889
|
}>) => void;
|
|
890
|
+
/**
|
|
891
|
+
* Event emitted when the input value changes. If you want to do custom validation, use the `scoutValidate` event instead to ensure forms are blocked by the browser when invalid.
|
|
892
|
+
*/
|
|
818
893
|
"onScoutInputChange"?: (event: ScoutCheckboxCustomEvent<{
|
|
819
894
|
value: string;
|
|
820
895
|
element: HTMLElement;
|
|
896
|
+
}>) => void;
|
|
897
|
+
/**
|
|
898
|
+
* Event emitted when the input needs to be validated. This is where you implement your custom validation. Set any possible validation message using the `validity` prop.
|
|
899
|
+
*/
|
|
900
|
+
"onScoutValidate"?: (event: ScoutCheckboxCustomEvent<{
|
|
901
|
+
value: string;
|
|
902
|
+
element: HTMLElement;
|
|
821
903
|
}>) => void;
|
|
822
904
|
/**
|
|
823
905
|
* Internal event used for form field association.
|
|
@@ -830,11 +912,11 @@ declare namespace LocalJSX {
|
|
|
830
912
|
/**
|
|
831
913
|
* Internal event used for form field validation.
|
|
832
914
|
*/
|
|
833
|
-
"
|
|
915
|
+
"on_scoutValidityChanged"?: (event: ScoutCheckboxCustomEvent<{ element: HTMLElement }>) => void;
|
|
834
916
|
/**
|
|
835
|
-
* Custom validation
|
|
917
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
836
918
|
*/
|
|
837
|
-
"
|
|
919
|
+
"validity"?: string;
|
|
838
920
|
"value"?: string;
|
|
839
921
|
}
|
|
840
922
|
interface ScoutDivider {
|
|
@@ -872,9 +954,19 @@ declare namespace LocalJSX {
|
|
|
872
954
|
"inputmode"?: InputMode;
|
|
873
955
|
"name"?: string;
|
|
874
956
|
"onScoutBlur"?: (event: ScoutInputCustomEvent<void>) => void;
|
|
957
|
+
/**
|
|
958
|
+
* Event emitted when the input value changes. If you want to do custom validation, use the `scoutValidate` event instead to ensure forms are blocked by the browser when invalid.
|
|
959
|
+
*/
|
|
875
960
|
"onScoutInputChange"?: (event: ScoutInputCustomEvent<{
|
|
876
961
|
value: string;
|
|
877
962
|
element: HTMLElement;
|
|
963
|
+
}>) => void;
|
|
964
|
+
/**
|
|
965
|
+
* Event emitted when the input needs to be validated. This is where you implement your custom validation. Set any possible validation message using the `validity` prop.
|
|
966
|
+
*/
|
|
967
|
+
"onScoutValidate"?: (event: ScoutInputCustomEvent<{
|
|
968
|
+
value: string;
|
|
969
|
+
element: HTMLElement;
|
|
878
970
|
}>) => void;
|
|
879
971
|
/**
|
|
880
972
|
* Internal event used for form field association.
|
|
@@ -887,7 +979,7 @@ declare namespace LocalJSX {
|
|
|
887
979
|
/**
|
|
888
980
|
* Internal event used for form field validation.
|
|
889
981
|
*/
|
|
890
|
-
"
|
|
982
|
+
"on_scoutValidityChanged"?: (event: ScoutInputCustomEvent<{ element: HTMLElement }>) => void;
|
|
891
983
|
/**
|
|
892
984
|
* Regex pattern for input validation.
|
|
893
985
|
*/
|
|
@@ -907,9 +999,9 @@ declare namespace LocalJSX {
|
|
|
907
999
|
*/
|
|
908
1000
|
"type"?: InputType;
|
|
909
1001
|
/**
|
|
910
|
-
* Custom validation
|
|
1002
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
911
1003
|
*/
|
|
912
|
-
"
|
|
1004
|
+
"validity"?: string;
|
|
913
1005
|
/**
|
|
914
1006
|
* Value of the input element, in case you want to control it yourself.
|
|
915
1007
|
* @default ""
|
|
@@ -1008,9 +1100,19 @@ declare namespace LocalJSX {
|
|
|
1008
1100
|
checked: boolean;
|
|
1009
1101
|
element: HTMLInputElement;
|
|
1010
1102
|
}>) => void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Event emitted when the input value changes. If you want to do custom validation, use the `scoutValidate` event instead to ensure forms are blocked by the browser when invalid.
|
|
1105
|
+
*/
|
|
1011
1106
|
"onScoutInputChange"?: (event: ScoutRadioButtonCustomEvent<{
|
|
1012
1107
|
value: string;
|
|
1013
1108
|
element: HTMLElement;
|
|
1109
|
+
}>) => void;
|
|
1110
|
+
/**
|
|
1111
|
+
* Event emitted when the input needs to be validated. This is where you implement your custom validation. Set any possible validation message using the `validity` prop.
|
|
1112
|
+
*/
|
|
1113
|
+
"onScoutValidate"?: (event: ScoutRadioButtonCustomEvent<{
|
|
1114
|
+
value: string;
|
|
1115
|
+
element: HTMLElement;
|
|
1014
1116
|
}>) => void;
|
|
1015
1117
|
/**
|
|
1016
1118
|
* Internal event used for form field association.
|
|
@@ -1023,11 +1125,11 @@ declare namespace LocalJSX {
|
|
|
1023
1125
|
/**
|
|
1024
1126
|
* Internal event used for form field validation.
|
|
1025
1127
|
*/
|
|
1026
|
-
"
|
|
1128
|
+
"on_scoutValidityChanged"?: (event: ScoutRadioButtonCustomEvent<{ element: HTMLElement }>) => void;
|
|
1027
1129
|
/**
|
|
1028
|
-
* Custom validation
|
|
1130
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
1029
1131
|
*/
|
|
1030
|
-
"
|
|
1132
|
+
"validity"?: string;
|
|
1031
1133
|
"value"?: string;
|
|
1032
1134
|
}
|
|
1033
1135
|
/**
|
|
@@ -1043,9 +1145,19 @@ declare namespace LocalJSX {
|
|
|
1043
1145
|
"disabled"?: boolean;
|
|
1044
1146
|
"name"?: string;
|
|
1045
1147
|
"onScoutBlur"?: (event: ScoutSelectCustomEvent<void>) => void;
|
|
1148
|
+
/**
|
|
1149
|
+
* Event emitted when the input value changes. If you want to do custom validation, use the `scoutValidate` event instead to ensure forms are blocked by the browser when invalid.
|
|
1150
|
+
*/
|
|
1046
1151
|
"onScoutInputChange"?: (event: ScoutSelectCustomEvent<{
|
|
1047
1152
|
value: string;
|
|
1048
1153
|
element: HTMLElement;
|
|
1154
|
+
}>) => void;
|
|
1155
|
+
/**
|
|
1156
|
+
* Event emitted when the input needs to be validated. This is where you implement your custom validation. Set any possible validation message using the `validity` prop.
|
|
1157
|
+
*/
|
|
1158
|
+
"onScoutValidate"?: (event: ScoutSelectCustomEvent<{
|
|
1159
|
+
value: string;
|
|
1160
|
+
element: HTMLElement;
|
|
1049
1161
|
}>) => void;
|
|
1050
1162
|
/**
|
|
1051
1163
|
* Internal event used for form field association.
|
|
@@ -1058,11 +1170,11 @@ declare namespace LocalJSX {
|
|
|
1058
1170
|
/**
|
|
1059
1171
|
* Internal event used for form field validation.
|
|
1060
1172
|
*/
|
|
1061
|
-
"
|
|
1173
|
+
"on_scoutValidityChanged"?: (event: ScoutSelectCustomEvent<{ element: HTMLElement }>) => void;
|
|
1062
1174
|
/**
|
|
1063
|
-
* Custom validation
|
|
1175
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
1064
1176
|
*/
|
|
1065
|
-
"
|
|
1177
|
+
"validity"?: string;
|
|
1066
1178
|
/**
|
|
1067
1179
|
* Value of the select element, in case you want to control it yourself.
|
|
1068
1180
|
* @default ""
|
|
@@ -1101,9 +1213,19 @@ declare namespace LocalJSX {
|
|
|
1101
1213
|
checked: boolean;
|
|
1102
1214
|
element: HTMLInputElement;
|
|
1103
1215
|
}>) => void;
|
|
1216
|
+
/**
|
|
1217
|
+
* Event emitted when the input value changes. If you want to do custom validation, use the `scoutValidate` event instead to ensure forms are blocked by the browser when invalid.
|
|
1218
|
+
*/
|
|
1104
1219
|
"onScoutInputChange"?: (event: ScoutSwitchCustomEvent<{
|
|
1105
1220
|
value: string;
|
|
1106
1221
|
element: HTMLElement;
|
|
1222
|
+
}>) => void;
|
|
1223
|
+
/**
|
|
1224
|
+
* Event emitted when the input needs to be validated. This is where you implement your custom validation. Set any possible validation message using the `validity` prop.
|
|
1225
|
+
*/
|
|
1226
|
+
"onScoutValidate"?: (event: ScoutSwitchCustomEvent<{
|
|
1227
|
+
value: string;
|
|
1228
|
+
element: HTMLElement;
|
|
1107
1229
|
}>) => void;
|
|
1108
1230
|
/**
|
|
1109
1231
|
* Internal event used for form field association.
|
|
@@ -1116,16 +1238,36 @@ declare namespace LocalJSX {
|
|
|
1116
1238
|
/**
|
|
1117
1239
|
* Internal event used for form field validation.
|
|
1118
1240
|
*/
|
|
1119
|
-
"
|
|
1241
|
+
"on_scoutValidityChanged"?: (event: ScoutSwitchCustomEvent<{ element: HTMLElement }>) => void;
|
|
1120
1242
|
/**
|
|
1121
1243
|
* Indicates whether the switch is toggled on or off.
|
|
1122
1244
|
* @default false
|
|
1123
1245
|
*/
|
|
1124
1246
|
"toggled"?: boolean;
|
|
1125
1247
|
/**
|
|
1126
|
-
* Custom validation
|
|
1248
|
+
* Custom validation message. If set, the input is considered invalid by the browser, and if wrapped by a field component, the message is displayed. If not set, the input is considered valid.
|
|
1127
1249
|
*/
|
|
1128
|
-
"
|
|
1250
|
+
"validity"?: string;
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* The tabs component is used to create a tabbed interface. It manages the state
|
|
1254
|
+
* of which tab is active and displays an indicator under the active tab. Use
|
|
1255
|
+
* `ScoutTabsTab` components to define the individual tabs.
|
|
1256
|
+
* Currently there is no support for navigational tabs. Navigation has to be
|
|
1257
|
+
* handled programmatically for now.
|
|
1258
|
+
*/
|
|
1259
|
+
interface ScoutTabs {
|
|
1260
|
+
/**
|
|
1261
|
+
* Emitted when the active tab changes as a result of a user click. The `value` in the event detail is the zero-based index of the newly selected tab.
|
|
1262
|
+
*/
|
|
1263
|
+
"onScoutChange"?: (event: ScoutTabsCustomEvent<{ value: number }>) => void;
|
|
1264
|
+
/**
|
|
1265
|
+
* Zero-based index of the currently active tab.
|
|
1266
|
+
* @default 0
|
|
1267
|
+
*/
|
|
1268
|
+
"value"?: number;
|
|
1269
|
+
}
|
|
1270
|
+
interface ScoutTabsTab {
|
|
1129
1271
|
}
|
|
1130
1272
|
interface IntrinsicElements {
|
|
1131
1273
|
"scout-app-bar": ScoutAppBar;
|
|
@@ -1146,6 +1288,8 @@ declare namespace LocalJSX {
|
|
|
1146
1288
|
"scout-select": ScoutSelect;
|
|
1147
1289
|
"scout-stack": ScoutStack;
|
|
1148
1290
|
"scout-switch": ScoutSwitch;
|
|
1291
|
+
"scout-tabs": ScoutTabs;
|
|
1292
|
+
"scout-tabs-tab": ScoutTabsTab;
|
|
1149
1293
|
}
|
|
1150
1294
|
}
|
|
1151
1295
|
export { LocalJSX as JSX };
|
|
@@ -1223,6 +1367,15 @@ declare module "@stencil/core" {
|
|
|
1223
1367
|
* component to display a label, help text, and error messages.
|
|
1224
1368
|
*/
|
|
1225
1369
|
"scout-switch": LocalJSX.ScoutSwitch & JSXBase.HTMLAttributes<HTMLScoutSwitchElement>;
|
|
1370
|
+
/**
|
|
1371
|
+
* The tabs component is used to create a tabbed interface. It manages the state
|
|
1372
|
+
* of which tab is active and displays an indicator under the active tab. Use
|
|
1373
|
+
* `ScoutTabsTab` components to define the individual tabs.
|
|
1374
|
+
* Currently there is no support for navigational tabs. Navigation has to be
|
|
1375
|
+
* handled programmatically for now.
|
|
1376
|
+
*/
|
|
1377
|
+
"scout-tabs": LocalJSX.ScoutTabs & JSXBase.HTMLAttributes<HTMLScoutTabsElement>;
|
|
1378
|
+
"scout-tabs-tab": LocalJSX.ScoutTabsTab & JSXBase.HTMLAttributes<HTMLScoutTabsTabElement>;
|
|
1226
1379
|
}
|
|
1227
1380
|
}
|
|
1228
1381
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as r}from"./p-CBq_WkdR.js";const a=class{constructor(r){t(this,r)}render(){return r("button",{key:"59f92f5a3d9b5a022a78d9adc7756bda10b68be3",class:"button-native",type:"button"},r("div",{key:"96fc99711da308360451041dd44e21391c08d6eb",class:"inner-container"},r("slot",{key:"83234bf67c2605179c7d80febbc6d0fbff730670"})))}static get delegatesFocus(){return!0}};a.style=":host{flex:1;display:block;width:auto}.button-native{position:relative;display:block;width:100%;height:100%;color:var(--color-gray-600);background-color:transparent;border:none;cursor:pointer;padding:var(--spacing-1) var(--spacing-1) calc(var(--spacing-1) + var(--tabs-indicator-height)) var(--spacing-1);font-weight:500;text-transform:uppercase;font-size:0.875rem;letter-spacing:0.04em}.inner-container{display:flex;justify-content:center;align-items:center;width:100%;height:100%;border-radius:var(--spacing-2);background-color:transparent}.button-native:hover{color:var(--color-text-base)}.button-native:hover .inner-container{background-color:var(--color-background-brand-subtle-hovered)}:host([data-active]) .button-native{color:var(--color-text-base)}";export{a as scout_tabs_tab}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as e,r as a,c as s,h as t}from"./p-CBq_WkdR.js";import{i}from"./p-6xDaXBJm.js";const c=class extends(e(i)){constructor(e){super(),a(this,e),this.scoutInputChange=s(this,"scoutInputChange"),this.scoutBlur=s(this,"scoutBlur"),this.scoutValidate=s(this,"scoutValidate"),this._scoutValidityChanged=s(this,"_scoutValidityChanged"),this._scoutInvalid=s(this,"_scoutInvalid"),this._scoutFieldId=s(this,"_scoutFieldId")}value="";disabled=!1;name;render(){return t("div",{key:"12bf95188935ab6b11101c829970800199b53e9a",class:"select-wrapper"},t("select",{key:"23b78d816a0f95c659ce2d97fadd7e7ca413c521",ref:e=>this.setInputRef(e),id:this.ariaId,name:this.name,class:"select",disabled:this.disabled,onChange:()=>this.onInput(),onBlur:()=>this.onBlur(),onInvalid:()=>this.onInvalid()},t("slot",{key:"652f8938b7bc8c32e2a2976e024e36a07afc8f5a"})),t("span",{key:"f2e2dd4d5266145c6a854a3e5610c887d7e1e259",class:"select-icon",style:{"--icon-chevron":"url(data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIyNCIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgZmlsbD0ibm9uZSIKICBzdHJva2U9ImN1cnJlbnRDb2xvciIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItY2hldnJvbi1kb3duIgo+CiAgPHBhdGggc3Ryb2tlPSJub25lIiBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+CiAgPHBhdGggZD0iTTYgOWw2IDZsNiAtNiIgLz4KPC9zdmc+)"},"aria-hidden":"true"}))}static get watchers(){return{validity:[{runValidation:0}]}}};c.style=".select-wrapper.sc-scout-select{position:relative;display:inline-flex;width:100%}.select.sc-scout-select{width:100%;height:var(--spacing-10);padding:var(--spacing-2);padding-right:var(--spacing-8);font:var(--type-body-base);border:1px solid var(--color-gray-300);border-radius:var(--spacing-2);background-color:var(--color-white);color:var(--color-text-base);-moz-appearance:none;appearance:none;-webkit-appearance:none;cursor:pointer}@media (hover: hover){.select.sc-scout-select:hover:not(:disabled){border-color:var(--color-gray-400)}}.select.sc-scout-select:focus{outline:2px solid var(--color-background-brand-base);outline-offset:1px}.select.sc-scout-select:disabled{background-color:var(--color-gray-100);color:var(--color-gray-700);cursor:not-allowed}.select-icon.sc-scout-select{position:absolute;right:var(--spacing-2);top:50%;transform:translateY(-50%);width:var(--spacing-5);height:var(--spacing-5);background-color:var(--color-text-base);-webkit-mask-image:var(--icon-chevron);mask-image:var(--icon-chevron);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;pointer-events:none}.select.sc-scout-select:disabled+.select-icon.sc-scout-select{background-color:var(--color-gray-500)}";export{c as scout_select}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as a,r,c as e,h as t}from"./p-CBq_WkdR.js";import{i}from"./p-6xDaXBJm.js";const o=class extends(a(i)){constructor(a){super(),r(this,a),this.scoutInputChange=e(this,"scoutInputChange"),this.scoutBlur=e(this,"scoutBlur"),this.scoutValidate=e(this,"scoutValidate"),this._scoutValidityChanged=e(this,"_scoutValidityChanged"),this._scoutInvalid=e(this,"_scoutInvalid"),this._scoutFieldId=e(this,"_scoutFieldId"),this.scoutChecked=e(this,"scoutChecked")}toggled=!1;disabled=!1;ariaLabelledby;label;scoutChecked;onChange(a){const r=a.target;this.scoutChecked.emit({checked:r.checked,element:r})}render(){return t(this.label?.length?"label":"div",{key:"b577bb6c1a4bde37ea76ae1c14bbdad4e3c11200"},this.label,t("span",{key:"b93dc86e4fa270efb3e8983c957731015d9709b4",class:"inlineDivider"}),t("input",{key:"ca377aea983a9702fe9f292908048746c31433b9",ref:a=>this.setInputRef(a),id:this.ariaId,type:"checkbox",class:"switch","aria-labelledby":this.ariaLabelledby,"aria-disabled":this.disabled,disabled:this.disabled,checked:this.toggled,onChange:a=>{this.onInput(),this.onChange(a)},onBlur:()=>this.onBlur(),onInvalid:()=>this.onInvalid()}))}static get delegatesFocus(){return!0}static get watchers(){return{validity:[{runValidation:0}]}}};o.style='.switch{width:var(--spacing-10);height:var(--spacing-6);-moz-appearance:none;appearance:none;-webkit-appearance:none;border-radius:var(--spacing-8);background-color:var(--color-text-brand-inverse);border:2px solid var(--color-gray-300);position:relative;display:flex;align-content:center;justify-content:center;transition-property:border-color;transition-duration:0.3s;transition-timing-function:ease-in-out;cursor:pointer;--switch-ball-padding:calc(var(--spacing-1) / 4);--switch-ball-size:calc(var(--spacing-5) - var(--switch-ball-padding) * 2)}@media (hover: hover){.switch:hover{transition-property:none;border-color:var(--color-gray-400);background-color:var(--color-background-brand-subtle-hovered)}}.switch:active{background-color:var(--color-background-brand-subtle-pressed)}.switch:checked{border-color:var(--color-background-brand-base)}@media (hover: hover){.switch:hover::before{background-color:var(--color-gray-400)}}.switch::before{content:"";background-color:var(--color-gray-300);width:var(--switch-ball-size);height:var(--switch-ball-size);border-radius:50%;position:absolute;top:var(--switch-ball-padding);left:var(--switch-ball-padding);transition-duration:0.3s;transition-property:left, right}.switch:checked::before{content:"";background-color:var(--color-background-brand-base);left:calc(100% - (var(--switch-ball-size) + var(--switch-ball-padding)));left:calc(100% - calc(var(--switch-ball-size) + var(--switch-ball-padding)))}.switch:disabled{pointer-events:none;background-color:var(--color-gray-100);border-color:var(--color-gray-100)}.switch:disabled::before{background-color:var(--color-gray-300)}label{display:flex;flex-direction:row-reverse;align-items:center;font:var(--type-label-base);color:var(--color-text-base)}.inlineDivider{width:var(--spacing-2)}';export{o as scout_switch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,a as t,h as a}from"./p-
|
|
1
|
+
import{r as e,a as t,h as a}from"./p-CBq_WkdR.js";const l=class{constructor(t){e(this,t)}label;helpText;inputId;errorText=null;errorHidden=!1;get hostElement(){return t(this)}catchFieldId(e){e.stopPropagation(),this.inputId=e.detail}handleValidation(e){const{element:t}=e.detail;this.errorHidden=!0,this.errorText=t.validity.valid?null:t.validationMessage}showError(){this.errorHidden=!1}render(){return a("div",{key:"b2b20acd9c1e41294bfbb8ce7e450e23142c5606",class:"field"},a("label",{key:"7b375df7d5a5e4bbe44ae963775c58a6c27b5479",htmlFor:this.inputId,class:"label"},this.label),a("slot",{key:"c5783c044aa82977cd21a56df4f838af95bc0bf3"}),a("p",{key:"38df5a4f28432e046bb95fed66d6c1972e1d7adc",class:"error-text","aria-live":"polite"},!this.errorHidden&&this.errorText),this.helpText&&a("p",{key:"1f84da3fad92b45ac1cf3b8d1fad75276b7f8359",class:"help-text"},this.helpText))}};l.style=".field.sc-scout-field{display:flex;flex-direction:column}.label.sc-scout-field{font:var(--type-label-sm);font-weight:600;color:var(--color-text-base)}.error-text.sc-scout-field{font:var(--type-label-sm);color:var(--color-text-danger-base);margin:var(--spacing-1) 0 0 0}.error-text.sc-scout-field:empty{margin:0}.help-text.sc-scout-field{font:var(--type-label-sm);color:var(--color-gray-600);margin:var(--spacing-1) 0 0 0}";export{l as scout_field}
|