@genesislcap/foundation-ui 14.410.0 → 14.412.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/custom-elements.json +232 -182
- package/dist/dts/text-field/text-field.d.ts +21 -0
- package/dist/dts/text-field/text-field.d.ts.map +1 -1
- package/dist/dts/text-field/text-field.styles.d.ts.map +1 -1
- package/dist/dts/text-field/text-field.template.d.ts.map +1 -1
- package/dist/esm/text-field/text-field.js +48 -0
- package/dist/esm/text-field/text-field.styles.js +57 -0
- package/dist/esm/text-field/text-field.template.js +69 -48
- package/package.json +19 -19
|
@@ -2271,6 +2271,188 @@
|
|
|
2271
2271
|
}
|
|
2272
2272
|
]
|
|
2273
2273
|
},
|
|
2274
|
+
{
|
|
2275
|
+
"kind": "javascript-module",
|
|
2276
|
+
"path": "src/accordion/accordion.styles.ts",
|
|
2277
|
+
"declarations": [
|
|
2278
|
+
{
|
|
2279
|
+
"kind": "function",
|
|
2280
|
+
"name": "foundationAccordionStyles",
|
|
2281
|
+
"return": {
|
|
2282
|
+
"type": {
|
|
2283
|
+
"text": "ElementStyles"
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
"parameters": [
|
|
2287
|
+
{
|
|
2288
|
+
"name": "context",
|
|
2289
|
+
"type": {
|
|
2290
|
+
"text": "ElementDefinitionContext"
|
|
2291
|
+
}
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
"name": "definition",
|
|
2295
|
+
"type": {
|
|
2296
|
+
"text": "FoundationElementDefinition"
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
]
|
|
2300
|
+
}
|
|
2301
|
+
],
|
|
2302
|
+
"exports": [
|
|
2303
|
+
{
|
|
2304
|
+
"kind": "js",
|
|
2305
|
+
"name": "foundationAccordionStyles",
|
|
2306
|
+
"declaration": {
|
|
2307
|
+
"name": "foundationAccordionStyles",
|
|
2308
|
+
"module": "src/accordion/accordion.styles.ts"
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
]
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"kind": "javascript-module",
|
|
2315
|
+
"path": "src/accordion/accordion.template.ts",
|
|
2316
|
+
"declarations": [
|
|
2317
|
+
{
|
|
2318
|
+
"kind": "function",
|
|
2319
|
+
"name": "foundationAccordionTemplate",
|
|
2320
|
+
"return": {
|
|
2321
|
+
"type": {
|
|
2322
|
+
"text": "ViewTemplate<Accordion>"
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
"parameters": [
|
|
2326
|
+
{
|
|
2327
|
+
"name": "context",
|
|
2328
|
+
"type": {
|
|
2329
|
+
"text": "ElementDefinitionContext"
|
|
2330
|
+
}
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
"name": "definition",
|
|
2334
|
+
"type": {
|
|
2335
|
+
"text": "FoundationElementDefinition"
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
]
|
|
2339
|
+
}
|
|
2340
|
+
],
|
|
2341
|
+
"exports": [
|
|
2342
|
+
{
|
|
2343
|
+
"kind": "js",
|
|
2344
|
+
"name": "foundationAccordionTemplate",
|
|
2345
|
+
"declaration": {
|
|
2346
|
+
"name": "foundationAccordionTemplate",
|
|
2347
|
+
"module": "src/accordion/accordion.template.ts"
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
]
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"kind": "javascript-module",
|
|
2354
|
+
"path": "src/accordion/accordion.ts",
|
|
2355
|
+
"declarations": [
|
|
2356
|
+
{
|
|
2357
|
+
"kind": "class",
|
|
2358
|
+
"description": "",
|
|
2359
|
+
"name": "Accordion",
|
|
2360
|
+
"superclass": {
|
|
2361
|
+
"name": "FASTAccordion",
|
|
2362
|
+
"package": "@microsoft/fast-foundation"
|
|
2363
|
+
},
|
|
2364
|
+
"tagName": "%%prefix%%-accordion",
|
|
2365
|
+
"customElement": true
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"kind": "variable",
|
|
2369
|
+
"name": "foundationAccordionShadowOptions",
|
|
2370
|
+
"type": {
|
|
2371
|
+
"text": "ShadowRootInit"
|
|
2372
|
+
},
|
|
2373
|
+
"default": "{\n delegatesFocus: true,\n mode: 'open',\n}"
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
"kind": "variable",
|
|
2377
|
+
"name": "defaultAccordionConfig",
|
|
2378
|
+
"type": {
|
|
2379
|
+
"text": "object"
|
|
2380
|
+
},
|
|
2381
|
+
"default": "{}"
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
"kind": "variable",
|
|
2385
|
+
"name": "foundationAccordion",
|
|
2386
|
+
"description": "The Foundation Accordion",
|
|
2387
|
+
"privacy": "public"
|
|
2388
|
+
}
|
|
2389
|
+
],
|
|
2390
|
+
"exports": [
|
|
2391
|
+
{
|
|
2392
|
+
"kind": "js",
|
|
2393
|
+
"name": "Accordion",
|
|
2394
|
+
"declaration": {
|
|
2395
|
+
"name": "Accordion",
|
|
2396
|
+
"module": "src/accordion/accordion.ts"
|
|
2397
|
+
}
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
"kind": "js",
|
|
2401
|
+
"name": "foundationAccordionShadowOptions",
|
|
2402
|
+
"declaration": {
|
|
2403
|
+
"name": "foundationAccordionShadowOptions",
|
|
2404
|
+
"module": "src/accordion/accordion.ts"
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"kind": "js",
|
|
2409
|
+
"name": "defaultAccordionConfig",
|
|
2410
|
+
"declaration": {
|
|
2411
|
+
"name": "defaultAccordionConfig",
|
|
2412
|
+
"module": "src/accordion/accordion.ts"
|
|
2413
|
+
}
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
"kind": "js",
|
|
2417
|
+
"name": "foundationAccordion",
|
|
2418
|
+
"declaration": {
|
|
2419
|
+
"name": "foundationAccordion",
|
|
2420
|
+
"module": "src/accordion/accordion.ts"
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
]
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"kind": "javascript-module",
|
|
2427
|
+
"path": "src/accordion/index.ts",
|
|
2428
|
+
"declarations": [],
|
|
2429
|
+
"exports": [
|
|
2430
|
+
{
|
|
2431
|
+
"kind": "js",
|
|
2432
|
+
"name": "*",
|
|
2433
|
+
"declaration": {
|
|
2434
|
+
"name": "*",
|
|
2435
|
+
"package": "./accordion.template"
|
|
2436
|
+
}
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
"kind": "js",
|
|
2440
|
+
"name": "*",
|
|
2441
|
+
"declaration": {
|
|
2442
|
+
"name": "*",
|
|
2443
|
+
"package": "./accordion.styles"
|
|
2444
|
+
}
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
"kind": "js",
|
|
2448
|
+
"name": "*",
|
|
2449
|
+
"declaration": {
|
|
2450
|
+
"name": "*",
|
|
2451
|
+
"package": "./accordion"
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
]
|
|
2455
|
+
},
|
|
2274
2456
|
{
|
|
2275
2457
|
"kind": "javascript-module",
|
|
2276
2458
|
"path": "src/ai-criteria-search/ai-criteria-search.styles.ts",
|
|
@@ -2812,188 +2994,6 @@
|
|
|
2812
2994
|
}
|
|
2813
2995
|
]
|
|
2814
2996
|
},
|
|
2815
|
-
{
|
|
2816
|
-
"kind": "javascript-module",
|
|
2817
|
-
"path": "src/accordion/accordion.styles.ts",
|
|
2818
|
-
"declarations": [
|
|
2819
|
-
{
|
|
2820
|
-
"kind": "function",
|
|
2821
|
-
"name": "foundationAccordionStyles",
|
|
2822
|
-
"return": {
|
|
2823
|
-
"type": {
|
|
2824
|
-
"text": "ElementStyles"
|
|
2825
|
-
}
|
|
2826
|
-
},
|
|
2827
|
-
"parameters": [
|
|
2828
|
-
{
|
|
2829
|
-
"name": "context",
|
|
2830
|
-
"type": {
|
|
2831
|
-
"text": "ElementDefinitionContext"
|
|
2832
|
-
}
|
|
2833
|
-
},
|
|
2834
|
-
{
|
|
2835
|
-
"name": "definition",
|
|
2836
|
-
"type": {
|
|
2837
|
-
"text": "FoundationElementDefinition"
|
|
2838
|
-
}
|
|
2839
|
-
}
|
|
2840
|
-
]
|
|
2841
|
-
}
|
|
2842
|
-
],
|
|
2843
|
-
"exports": [
|
|
2844
|
-
{
|
|
2845
|
-
"kind": "js",
|
|
2846
|
-
"name": "foundationAccordionStyles",
|
|
2847
|
-
"declaration": {
|
|
2848
|
-
"name": "foundationAccordionStyles",
|
|
2849
|
-
"module": "src/accordion/accordion.styles.ts"
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
|
-
]
|
|
2853
|
-
},
|
|
2854
|
-
{
|
|
2855
|
-
"kind": "javascript-module",
|
|
2856
|
-
"path": "src/accordion/accordion.template.ts",
|
|
2857
|
-
"declarations": [
|
|
2858
|
-
{
|
|
2859
|
-
"kind": "function",
|
|
2860
|
-
"name": "foundationAccordionTemplate",
|
|
2861
|
-
"return": {
|
|
2862
|
-
"type": {
|
|
2863
|
-
"text": "ViewTemplate<Accordion>"
|
|
2864
|
-
}
|
|
2865
|
-
},
|
|
2866
|
-
"parameters": [
|
|
2867
|
-
{
|
|
2868
|
-
"name": "context",
|
|
2869
|
-
"type": {
|
|
2870
|
-
"text": "ElementDefinitionContext"
|
|
2871
|
-
}
|
|
2872
|
-
},
|
|
2873
|
-
{
|
|
2874
|
-
"name": "definition",
|
|
2875
|
-
"type": {
|
|
2876
|
-
"text": "FoundationElementDefinition"
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
]
|
|
2880
|
-
}
|
|
2881
|
-
],
|
|
2882
|
-
"exports": [
|
|
2883
|
-
{
|
|
2884
|
-
"kind": "js",
|
|
2885
|
-
"name": "foundationAccordionTemplate",
|
|
2886
|
-
"declaration": {
|
|
2887
|
-
"name": "foundationAccordionTemplate",
|
|
2888
|
-
"module": "src/accordion/accordion.template.ts"
|
|
2889
|
-
}
|
|
2890
|
-
}
|
|
2891
|
-
]
|
|
2892
|
-
},
|
|
2893
|
-
{
|
|
2894
|
-
"kind": "javascript-module",
|
|
2895
|
-
"path": "src/accordion/accordion.ts",
|
|
2896
|
-
"declarations": [
|
|
2897
|
-
{
|
|
2898
|
-
"kind": "class",
|
|
2899
|
-
"description": "",
|
|
2900
|
-
"name": "Accordion",
|
|
2901
|
-
"superclass": {
|
|
2902
|
-
"name": "FASTAccordion",
|
|
2903
|
-
"package": "@microsoft/fast-foundation"
|
|
2904
|
-
},
|
|
2905
|
-
"tagName": "%%prefix%%-accordion",
|
|
2906
|
-
"customElement": true
|
|
2907
|
-
},
|
|
2908
|
-
{
|
|
2909
|
-
"kind": "variable",
|
|
2910
|
-
"name": "foundationAccordionShadowOptions",
|
|
2911
|
-
"type": {
|
|
2912
|
-
"text": "ShadowRootInit"
|
|
2913
|
-
},
|
|
2914
|
-
"default": "{\n delegatesFocus: true,\n mode: 'open',\n}"
|
|
2915
|
-
},
|
|
2916
|
-
{
|
|
2917
|
-
"kind": "variable",
|
|
2918
|
-
"name": "defaultAccordionConfig",
|
|
2919
|
-
"type": {
|
|
2920
|
-
"text": "object"
|
|
2921
|
-
},
|
|
2922
|
-
"default": "{}"
|
|
2923
|
-
},
|
|
2924
|
-
{
|
|
2925
|
-
"kind": "variable",
|
|
2926
|
-
"name": "foundationAccordion",
|
|
2927
|
-
"description": "The Foundation Accordion",
|
|
2928
|
-
"privacy": "public"
|
|
2929
|
-
}
|
|
2930
|
-
],
|
|
2931
|
-
"exports": [
|
|
2932
|
-
{
|
|
2933
|
-
"kind": "js",
|
|
2934
|
-
"name": "Accordion",
|
|
2935
|
-
"declaration": {
|
|
2936
|
-
"name": "Accordion",
|
|
2937
|
-
"module": "src/accordion/accordion.ts"
|
|
2938
|
-
}
|
|
2939
|
-
},
|
|
2940
|
-
{
|
|
2941
|
-
"kind": "js",
|
|
2942
|
-
"name": "foundationAccordionShadowOptions",
|
|
2943
|
-
"declaration": {
|
|
2944
|
-
"name": "foundationAccordionShadowOptions",
|
|
2945
|
-
"module": "src/accordion/accordion.ts"
|
|
2946
|
-
}
|
|
2947
|
-
},
|
|
2948
|
-
{
|
|
2949
|
-
"kind": "js",
|
|
2950
|
-
"name": "defaultAccordionConfig",
|
|
2951
|
-
"declaration": {
|
|
2952
|
-
"name": "defaultAccordionConfig",
|
|
2953
|
-
"module": "src/accordion/accordion.ts"
|
|
2954
|
-
}
|
|
2955
|
-
},
|
|
2956
|
-
{
|
|
2957
|
-
"kind": "js",
|
|
2958
|
-
"name": "foundationAccordion",
|
|
2959
|
-
"declaration": {
|
|
2960
|
-
"name": "foundationAccordion",
|
|
2961
|
-
"module": "src/accordion/accordion.ts"
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
]
|
|
2965
|
-
},
|
|
2966
|
-
{
|
|
2967
|
-
"kind": "javascript-module",
|
|
2968
|
-
"path": "src/accordion/index.ts",
|
|
2969
|
-
"declarations": [],
|
|
2970
|
-
"exports": [
|
|
2971
|
-
{
|
|
2972
|
-
"kind": "js",
|
|
2973
|
-
"name": "*",
|
|
2974
|
-
"declaration": {
|
|
2975
|
-
"name": "*",
|
|
2976
|
-
"package": "./accordion.template"
|
|
2977
|
-
}
|
|
2978
|
-
},
|
|
2979
|
-
{
|
|
2980
|
-
"kind": "js",
|
|
2981
|
-
"name": "*",
|
|
2982
|
-
"declaration": {
|
|
2983
|
-
"name": "*",
|
|
2984
|
-
"package": "./accordion.styles"
|
|
2985
|
-
}
|
|
2986
|
-
},
|
|
2987
|
-
{
|
|
2988
|
-
"kind": "js",
|
|
2989
|
-
"name": "*",
|
|
2990
|
-
"declaration": {
|
|
2991
|
-
"name": "*",
|
|
2992
|
-
"package": "./accordion"
|
|
2993
|
-
}
|
|
2994
|
-
}
|
|
2995
|
-
]
|
|
2996
|
-
},
|
|
2997
2997
|
{
|
|
2998
2998
|
"kind": "javascript-module",
|
|
2999
2999
|
"path": "src/ai-indicator/ai-indicator.styles.ts",
|
|
@@ -49710,6 +49710,31 @@
|
|
|
49710
49710
|
"text": "number"
|
|
49711
49711
|
}
|
|
49712
49712
|
},
|
|
49713
|
+
{
|
|
49714
|
+
"kind": "field",
|
|
49715
|
+
"name": "prefix",
|
|
49716
|
+
"type": {
|
|
49717
|
+
"text": "string"
|
|
49718
|
+
},
|
|
49719
|
+
"description": "Optional non-editable label shown on the left inside the field, before the input."
|
|
49720
|
+
},
|
|
49721
|
+
{
|
|
49722
|
+
"kind": "field",
|
|
49723
|
+
"name": "suffix",
|
|
49724
|
+
"type": {
|
|
49725
|
+
"text": "string"
|
|
49726
|
+
},
|
|
49727
|
+
"description": "Optional non-editable suffix (e.g. unit label) shown on the right inside the field."
|
|
49728
|
+
},
|
|
49729
|
+
{
|
|
49730
|
+
"kind": "field",
|
|
49731
|
+
"name": "hideAffixFromScreenReader",
|
|
49732
|
+
"type": {
|
|
49733
|
+
"text": "boolean"
|
|
49734
|
+
},
|
|
49735
|
+
"default": "false",
|
|
49736
|
+
"description": "When true, prefix/suffix are not exposed to assistive technology (`aria-hidden` on affixes, and their ids are omitted from the control’s `aria-describedby`).\nUse only when the unit or symbol is redundant with the visible label or other text."
|
|
49737
|
+
},
|
|
49713
49738
|
{
|
|
49714
49739
|
"kind": "field",
|
|
49715
49740
|
"name": "readOnly",
|
|
@@ -50154,6 +50179,31 @@
|
|
|
50154
50179
|
},
|
|
50155
50180
|
"fieldName": "step"
|
|
50156
50181
|
},
|
|
50182
|
+
{
|
|
50183
|
+
"name": "prefix",
|
|
50184
|
+
"type": {
|
|
50185
|
+
"text": "string"
|
|
50186
|
+
},
|
|
50187
|
+
"description": "Optional non-editable label shown on the left inside the field, before the input.",
|
|
50188
|
+
"fieldName": "prefix"
|
|
50189
|
+
},
|
|
50190
|
+
{
|
|
50191
|
+
"name": "suffix",
|
|
50192
|
+
"type": {
|
|
50193
|
+
"text": "string"
|
|
50194
|
+
},
|
|
50195
|
+
"description": "Optional non-editable suffix (e.g. unit label) shown on the right inside the field.",
|
|
50196
|
+
"fieldName": "suffix"
|
|
50197
|
+
},
|
|
50198
|
+
{
|
|
50199
|
+
"name": "hide-affix-from-screen-reader",
|
|
50200
|
+
"type": {
|
|
50201
|
+
"text": "boolean"
|
|
50202
|
+
},
|
|
50203
|
+
"default": "false",
|
|
50204
|
+
"description": "When true, prefix/suffix are not exposed to assistive technology (`aria-hidden` on affixes, and their ids are omitted from the control’s `aria-describedby`).\nUse only when the unit or symbol is redundant with the visible label or other text.",
|
|
50205
|
+
"fieldName": "hideAffixFromScreenReader"
|
|
50206
|
+
},
|
|
50157
50207
|
{
|
|
50158
50208
|
"name": "readonly",
|
|
50159
50209
|
"type": {
|
|
@@ -8,6 +8,27 @@ export declare class TextField extends FASTTextField {
|
|
|
8
8
|
autocapitalize: string;
|
|
9
9
|
private autocapitalizeChanged;
|
|
10
10
|
step: number;
|
|
11
|
+
/**
|
|
12
|
+
* Optional non-editable label shown on the left inside the field, before the input.
|
|
13
|
+
*/
|
|
14
|
+
prefix: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optional non-editable suffix (e.g. unit label) shown on the right inside the field.
|
|
17
|
+
*/
|
|
18
|
+
suffix: string;
|
|
19
|
+
/**
|
|
20
|
+
* When true, prefix/suffix are not exposed to assistive technology (`aria-hidden` on affixes, and their ids are omitted from the control’s `aria-describedby`).
|
|
21
|
+
* Use only when the unit or symbol is redundant with the visible label or other text.
|
|
22
|
+
* @remarks
|
|
23
|
+
* By default, affix text is **included** for screen readers: stable ids are assigned to the affix nodes and referenced from the input’s `aria-describedby` (merged with any author `aria-describedby`), which announces them as supplementary description after the field name from the label.
|
|
24
|
+
* For cases where the affix should be part of the accessible **name** instead (e.g. currency code read as part of the label), set `hide-affix-from-screen-reader` and wire `aria-labelledby` on the host to reference the label slot and your own elements, or provide a single `aria-label` that includes the full name.
|
|
25
|
+
*/
|
|
26
|
+
hideAffixFromScreenReader: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Merges the host `aria-describedby` with ids of the prefix/suffix nodes when those affixes are exposed to SRs.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
get controlAriaDescribedby(): string | undefined;
|
|
11
32
|
}
|
|
12
33
|
export declare const foundationTextFieldShadowOptions: ShadowRootInit;
|
|
13
34
|
export declare const defaultTextFieldConfig: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/text-field/text-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAOxE;;GAEG;AACH,qBAAa,SAAU,SAAQ,aAAa;IACpC,YAAY,EAAE,MAAM,CAAS;IACnC,OAAO,CAAC,mBAAmB;IAKrB,cAAc,EAAE,MAAM,CAAS;IACrC,OAAO,CAAC,qBAAqB;IAKvB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/text-field/text-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAOxE;;GAEG;AACH,qBAAa,SAAU,SAAQ,aAAa;IACpC,YAAY,EAAE,MAAM,CAAS;IACnC,OAAO,CAAC,mBAAmB;IAKrB,cAAc,EAAE,MAAM,CAAS;IACrC,OAAO,CAAC,qBAAqB;IAKvB,IAAI,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACG,MAAM,EAAE,MAAM,CAAC;IAErB;;OAEG;IACG,MAAM,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IAEH,yBAAyB,EAAE,OAAO,CAAS;IAE3C;;;OAGG;IACH,IAAI,sBAAsB,IAAI,MAAM,GAAG,SAAS,CAyB/C;CACF;AAGD,eAAO,MAAM,gCAAgC,EAAE,cAG9C,CAAC;AAEF,eAAO,MAAM,sBAAsB,IAAK,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,yTAM9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.styles.d.ts","sourceRoot":"","sources":["../../../src/text-field/text-field.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,yBAAyB,GACpC,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,
|
|
1
|
+
{"version":3,"file":"text-field.styles.d.ts","sourceRoot":"","sources":["../../../src/text-field/text-field.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAM,yBAAyB,GACpC,SAAS,wBAAwB,EACjC,YAAY,2BAA2B,KACtC,aAmEF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.template.d.ts","sourceRoot":"","sources":["../../../src/text-field/text-field.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAEL,yBAAyB,EAEzB,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"text-field.template.d.ts","sourceRoot":"","sources":["../../../src/text-field/text-field.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAEL,yBAAyB,EAEzB,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,yBAAyB,CACjE,YAAY,CAAC,SAAS,CAAC,EACvB,gBAAgB,CA2FjB,CAAC"}
|
|
@@ -12,6 +12,14 @@ export class TextField extends FASTTextField {
|
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.autocomplete = 'off';
|
|
14
14
|
this.autocapitalize = 'off';
|
|
15
|
+
/**
|
|
16
|
+
* When true, prefix/suffix are not exposed to assistive technology (`aria-hidden` on affixes, and their ids are omitted from the control’s `aria-describedby`).
|
|
17
|
+
* Use only when the unit or symbol is redundant with the visible label or other text.
|
|
18
|
+
* @remarks
|
|
19
|
+
* By default, affix text is **included** for screen readers: stable ids are assigned to the affix nodes and referenced from the input’s `aria-describedby` (merged with any author `aria-describedby`), which announces them as supplementary description after the field name from the label.
|
|
20
|
+
* For cases where the affix should be part of the accessible **name** instead (e.g. currency code read as part of the label), set `hide-affix-from-screen-reader` and wire `aria-labelledby` on the host to reference the label slot and your own elements, or provide a single `aria-label` that includes the full name.
|
|
21
|
+
*/
|
|
22
|
+
this.hideAffixFromScreenReader = false;
|
|
15
23
|
}
|
|
16
24
|
autocompleteChanged() {
|
|
17
25
|
if (this.proxy instanceof HTMLInputElement) {
|
|
@@ -23,6 +31,37 @@ export class TextField extends FASTTextField {
|
|
|
23
31
|
this.proxy.autocapitalize = this.autocapitalize;
|
|
24
32
|
}
|
|
25
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Merges the host `aria-describedby` with ids of the prefix/suffix nodes when those affixes are exposed to SRs.
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
get controlAriaDescribedby() {
|
|
39
|
+
var _a;
|
|
40
|
+
const hostIds = (_a = this.ariaDescribedby) === null || _a === void 0 ? void 0 : _a.trim();
|
|
41
|
+
const parts = [];
|
|
42
|
+
if (hostIds) {
|
|
43
|
+
parts.push(...hostIds.split(/\s+/).filter(Boolean));
|
|
44
|
+
}
|
|
45
|
+
if (!this.hideAffixFromScreenReader) {
|
|
46
|
+
const base = this.id || 'control';
|
|
47
|
+
if (this.prefix) {
|
|
48
|
+
parts.push(`${base}-prefix`);
|
|
49
|
+
}
|
|
50
|
+
if (this.suffix) {
|
|
51
|
+
parts.push(`${base}-suffix`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const seen = new Set();
|
|
55
|
+
const deduped = [];
|
|
56
|
+
for (const id of parts) {
|
|
57
|
+
if (!seen.has(id)) {
|
|
58
|
+
seen.add(id);
|
|
59
|
+
deduped.push(id);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const merged = deduped.join(' ');
|
|
63
|
+
return merged || undefined;
|
|
64
|
+
}
|
|
26
65
|
}
|
|
27
66
|
__decorate([
|
|
28
67
|
attr
|
|
@@ -33,6 +72,15 @@ __decorate([
|
|
|
33
72
|
__decorate([
|
|
34
73
|
attr
|
|
35
74
|
], TextField.prototype, "step", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
attr
|
|
77
|
+
], TextField.prototype, "prefix", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
attr
|
|
80
|
+
], TextField.prototype, "suffix", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
attr({ attribute: 'hide-affix-from-screen-reader', mode: 'boolean' })
|
|
83
|
+
], TextField.prototype, "hideAffixFromScreenReader", void 0);
|
|
36
84
|
// explicitly declaring for extensibility
|
|
37
85
|
export const foundationTextFieldShadowOptions = {
|
|
38
86
|
mode: 'open',
|
|
@@ -4,6 +4,63 @@ import { css } from '@microsoft/fast-element';
|
|
|
4
4
|
export const foundationTextFieldStyles = (context, definition) => css `
|
|
5
5
|
${fastTextFieldStyles(context, definition)}
|
|
6
6
|
|
|
7
|
+
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
8
|
+
.control-field {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex: 1 1 0%;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
align-self: stretch;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.control-field .control {
|
|
17
|
+
flex: 1 1 auto;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
width: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.prefix,
|
|
23
|
+
.suffix {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
padding: 0 calc(var(--design-unit) * 2px);
|
|
29
|
+
user-select: none;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
background-color: var(--neutral-fill-rest);
|
|
32
|
+
color: var(--neutral-foreground-hint);
|
|
33
|
+
font-size: var(--type-ramp-base-font-size);
|
|
34
|
+
font-family: inherit;
|
|
35
|
+
line-height: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.prefix {
|
|
39
|
+
border-right: 1px solid var(--neutral-stroke-divider-rest);
|
|
40
|
+
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
41
|
+
calc(var(--control-corner-radius) * 1px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.suffix {
|
|
45
|
+
border-left: 1px solid var(--neutral-stroke-divider-rest);
|
|
46
|
+
border-radius: 0 calc(var(--control-corner-radius) * 1px)
|
|
47
|
+
calc(var(--control-corner-radius) * 1px) 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host(.has-prefix:not(.has-suffix)) .control-field .control {
|
|
51
|
+
border-radius: 0 calc(var(--control-corner-radius) * 1px)
|
|
52
|
+
calc(var(--control-corner-radius) * 1px) 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host(.has-suffix:not(.has-prefix)) .control-field .control {
|
|
56
|
+
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
57
|
+
calc(var(--control-corner-radius) * 1px);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host(.has-prefix.has-suffix) .control-field .control {
|
|
61
|
+
border-radius: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
7
64
|
input {
|
|
8
65
|
color-scheme: ${activeColorScheme};
|
|
9
66
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { html, ref, slotted } from '@microsoft/fast-element';
|
|
1
|
+
import { html, ref, slotted, when } from '@microsoft/fast-element';
|
|
2
2
|
import { endSlotTemplate, startSlotTemplate, whitespaceFilter, } from '@microsoft/fast-foundation';
|
|
3
|
+
import { classNames } from '@microsoft/fast-web-utilities';
|
|
3
4
|
/**
|
|
4
5
|
* @privateRemarks TODO: Raise PR against FAST
|
|
5
6
|
* Unfortunately this template is almost a complete duplicate of the original fast version, just with additional
|
|
@@ -8,9 +9,7 @@ import { endSlotTemplate, startSlotTemplate, whitespaceFilter, } from '@microsof
|
|
|
8
9
|
*/
|
|
9
10
|
export const foundationTextFieldTemplate = (context, definition) => html `
|
|
10
11
|
<template
|
|
11
|
-
class="
|
|
12
|
-
${(x) => (x.readOnly ? 'readonly' : '')}
|
|
13
|
-
"
|
|
12
|
+
class="${(x) => classNames(['readonly', x.readOnly], ['has-prefix', !!x.prefix], ['has-suffix', !!x.suffix])}"
|
|
14
13
|
>
|
|
15
14
|
<label
|
|
16
15
|
part="label"
|
|
@@ -21,50 +20,72 @@ export const foundationTextFieldTemplate = (context, definition) => html `
|
|
|
21
20
|
</label>
|
|
22
21
|
<div class="root" part="root">
|
|
23
22
|
${startSlotTemplate(context, definition)}
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
23
|
+
<div class="control-field">
|
|
24
|
+
${when((x) => x.prefix, html `
|
|
25
|
+
<span
|
|
26
|
+
class="prefix"
|
|
27
|
+
part="prefix"
|
|
28
|
+
id="${(x) => `${x.id || 'control'}-prefix`}"
|
|
29
|
+
?aria-hidden="${(x) => x.hideAffixFromScreenReader}"
|
|
30
|
+
>
|
|
31
|
+
${(x) => x.prefix}
|
|
32
|
+
</span>
|
|
33
|
+
`)}
|
|
34
|
+
<input
|
|
35
|
+
name="${(x) => x.name}"
|
|
36
|
+
autocomplete="${(x) => x.autocomplete}"
|
|
37
|
+
autocapitalize="${(x) => x.autocapitalize}"
|
|
38
|
+
id="${(x) => (x.id ? x.id : 'control')}"
|
|
39
|
+
class="control"
|
|
40
|
+
part="control"
|
|
41
|
+
@input="${(x) => x.handleTextInput()}"
|
|
42
|
+
@change="${(x) => x.handleChange()}"
|
|
43
|
+
step="${(x) => x.step}"
|
|
44
|
+
?autofocus="${(x) => x.autofocus}"
|
|
45
|
+
?disabled="${(x) => x.disabled}"
|
|
46
|
+
list="${(x) => x.list}"
|
|
47
|
+
maxlength="${(x) => x.maxlength}"
|
|
48
|
+
minlength="${(x) => x.minlength}"
|
|
49
|
+
pattern="${(x) => x.pattern}"
|
|
50
|
+
placeholder="${(x) => x.placeholder}"
|
|
51
|
+
?readonly="${(x) => x.readOnly}"
|
|
52
|
+
?required="${(x) => x.required}"
|
|
53
|
+
size="${(x) => x.size}"
|
|
54
|
+
?spellcheck="${(x) => x.spellcheck}"
|
|
55
|
+
:value="${(x) => x.value}"
|
|
56
|
+
type="${(x) => x.type}"
|
|
57
|
+
aria-atomic="${(x) => x.ariaAtomic}"
|
|
58
|
+
aria-busy="${(x) => x.ariaBusy}"
|
|
59
|
+
aria-controls="${(x) => x.ariaControls}"
|
|
60
|
+
aria-current="${(x) => x.ariaCurrent}"
|
|
61
|
+
aria-describedby="${(x) => x.controlAriaDescribedby}"
|
|
62
|
+
aria-details="${(x) => x.ariaDetails}"
|
|
63
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
64
|
+
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
65
|
+
aria-flowto="${(x) => x.ariaFlowto}"
|
|
66
|
+
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
67
|
+
aria-hidden="${(x) => x.ariaHidden}"
|
|
68
|
+
aria-invalid="${(x) => x.ariaInvalid}"
|
|
69
|
+
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
70
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
71
|
+
aria-labelledby="${(x) => x.ariaLabelledby}"
|
|
72
|
+
aria-live="${(x) => x.ariaLive}"
|
|
73
|
+
aria-owns="${(x) => x.ariaOwns}"
|
|
74
|
+
aria-relevant="${(x) => x.ariaRelevant}"
|
|
75
|
+
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
76
|
+
${ref('control')}
|
|
77
|
+
/>
|
|
78
|
+
${when((x) => x.suffix, html `
|
|
79
|
+
<span
|
|
80
|
+
class="suffix"
|
|
81
|
+
part="suffix"
|
|
82
|
+
id="${(x) => `${x.id || 'control'}-suffix`}"
|
|
83
|
+
?aria-hidden="${(x) => x.hideAffixFromScreenReader}"
|
|
84
|
+
>
|
|
85
|
+
${(x) => x.suffix}
|
|
86
|
+
</span>
|
|
87
|
+
`)}
|
|
88
|
+
</div>
|
|
68
89
|
${endSlotTemplate(context, definition)}
|
|
69
90
|
</div>
|
|
70
91
|
</template>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.412.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@genesislcap/foundation-testing": "14.
|
|
89
|
-
"@genesislcap/genx": "14.
|
|
90
|
-
"@genesislcap/rollup-builder": "14.
|
|
91
|
-
"@genesislcap/ts-builder": "14.
|
|
92
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
93
|
-
"@genesislcap/vite-builder": "14.
|
|
94
|
-
"@genesislcap/webpack-builder": "14.
|
|
88
|
+
"@genesislcap/foundation-testing": "14.412.0",
|
|
89
|
+
"@genesislcap/genx": "14.412.0",
|
|
90
|
+
"@genesislcap/rollup-builder": "14.412.0",
|
|
91
|
+
"@genesislcap/ts-builder": "14.412.0",
|
|
92
|
+
"@genesislcap/uvu-playwright-builder": "14.412.0",
|
|
93
|
+
"@genesislcap/vite-builder": "14.412.0",
|
|
94
|
+
"@genesislcap/webpack-builder": "14.412.0",
|
|
95
95
|
"copyfiles": "^2.4.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
@@ -100,16 +100,16 @@
|
|
|
100
100
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
101
101
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
102
102
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
103
|
-
"@genesislcap/expression-builder": "14.
|
|
104
|
-
"@genesislcap/foundation-ai": "14.
|
|
105
|
-
"@genesislcap/foundation-comms": "14.
|
|
106
|
-
"@genesislcap/foundation-criteria": "14.
|
|
107
|
-
"@genesislcap/foundation-errors": "14.
|
|
108
|
-
"@genesislcap/foundation-events": "14.
|
|
109
|
-
"@genesislcap/foundation-logger": "14.
|
|
110
|
-
"@genesislcap/foundation-notifications": "14.
|
|
111
|
-
"@genesislcap/foundation-user": "14.
|
|
112
|
-
"@genesislcap/foundation-utils": "14.
|
|
103
|
+
"@genesislcap/expression-builder": "14.412.0",
|
|
104
|
+
"@genesislcap/foundation-ai": "14.412.0",
|
|
105
|
+
"@genesislcap/foundation-comms": "14.412.0",
|
|
106
|
+
"@genesislcap/foundation-criteria": "14.412.0",
|
|
107
|
+
"@genesislcap/foundation-errors": "14.412.0",
|
|
108
|
+
"@genesislcap/foundation-events": "14.412.0",
|
|
109
|
+
"@genesislcap/foundation-logger": "14.412.0",
|
|
110
|
+
"@genesislcap/foundation-notifications": "14.412.0",
|
|
111
|
+
"@genesislcap/foundation-user": "14.412.0",
|
|
112
|
+
"@genesislcap/foundation-utils": "14.412.0",
|
|
113
113
|
"@microsoft/fast-colors": "5.3.1",
|
|
114
114
|
"@microsoft/fast-components": "2.30.6",
|
|
115
115
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"access": "public"
|
|
132
132
|
},
|
|
133
133
|
"customElements": "dist/custom-elements.json",
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "b759370097c295bea2a87d6f3a132ec6dba807ca"
|
|
135
135
|
}
|