@ganpatiinfo/gids-core-web 8.2.0 → 9.0.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/css/index.css +475 -0
- package/dist/css/index.css.map +1 -1
- package/dist/custom-elements.json +332 -0
- package/dist/gids-field.js +1 -1
- package/dist/gids-icon.js +1 -1
- package/dist/gids-input.js +1 -1
- package/dist/gids-overflow-container.js +1 -1
- package/dist/gids-overlay-provider.js +1 -1
- package/dist/gids-password-field.js +1 -1
- package/dist/gids-popover.d.ts +11 -0
- package/dist/gids-popover.js +1 -0
- package/dist/gids-scrim.js +1 -1
- package/dist/gids-text-field.js +1 -1
- package/dist/gids-toggle-button.js +1 -1
- package/dist/gids-tooltip.d.ts +11 -0
- package/dist/gids-tooltip.js +1 -0
- package/dist/index.js +1 -1
- package/dist/p-B8kX8Vqv.js +1 -0
- package/dist/p-CFw4_-5A.js +1 -0
- package/dist/{p-Bg3lw2Ae.js → p-DvoHLz_5.js} +1 -1
- package/dist/p-a3JfEYJp.js +1 -0
- package/dist/{p-DjvDBWCb.js → p-iCAclJND.js} +1 -1
- package/dist/types/components/html/GidsButton/GidsButton.d.ts +1 -1
- package/dist/types/components/html/GidsDropdownItem/GidsDropdownItem.d.ts +9 -0
- package/dist/types/components/html/GidsDropdownMenu/GidsDropdownMenu.d.ts +6 -0
- package/dist/types/components/html/GidsDropdownMenuGroup/GidsDropdownMenuGroup.d.ts +5 -0
- package/dist/types/components/html/GidsEditButton/GidsEditButton.d.ts +7 -0
- package/dist/types/components/html/GidsListItem/GidsListItem.d.ts +11 -0
- package/dist/types/components/html/GidsMenu/GidsMenu.d.ts +6 -0
- package/dist/types/components/html/GidsMenuGroup/GidsMenuGroup.d.ts +5 -0
- package/dist/types/components/shared/GidsFloatingElementManager.d.ts +57 -0
- package/dist/types/components/shared/GidsFloatingElementTypes.d.ts +4 -0
- package/dist/types/components/webComponents/GidsPopover/GidsPopover.d.ts +24 -0
- package/dist/types/components/webComponents/GidsTooltip/GidsTooltip.d.ts +23 -0
- package/dist/types/components.d.ts +77 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/childrenValidityUtils.d.ts +8 -0
- package/dist-bundled/es/gids-field.js +1 -1
- package/dist-bundled/es/gids-icon.js +9 -9
- package/dist-bundled/es/gids-input.js +4 -4
- package/dist-bundled/es/gids-overflow-container.js +4 -4
- package/dist-bundled/es/gids-overlay-provider.js +3 -3
- package/dist-bundled/es/gids-password-field.js +19 -19
- package/dist-bundled/es/gids-popover.js +110 -0
- package/dist-bundled/es/gids-scrim.js +3 -3
- package/dist-bundled/es/gids-text-field.js +7 -7
- package/dist-bundled/es/gids-toggle-button.js +5 -5
- package/dist-bundled/es/gids-tooltip.js +66 -0
- package/dist-bundled/es/index.js +33 -19
- package/dist-bundled/es/p-B8kX8Vqv-trBz4jdS.js +7 -0
- package/dist-bundled/es/p-CFw4_-5A-Dzvju3VE.js +25 -0
- package/dist-bundled/es/{p-DijVkS9b-CtFkEtlE.js → p-DijVkS9b-CeV1i4T-.js} +1 -1
- package/dist-bundled/es/{p-Bg3lw2Ae-CkC8nUqv.js → p-DvoHLz_5-C5EvA91N.js} +7 -7
- package/dist-bundled/es/p-a3JfEYJp-DyhDK6VZ.js +1128 -0
- package/dist-bundled/es/{p-DjvDBWCb-C9js0PPL.js → p-iCAclJND-Bmsvd-W1.js} +10 -10
- package/dist-bundled/es/{p-veoOgDXg-DElc87c0.js → p-veoOgDXg-fRinub-C.js} +12 -5
- package/dist-bundled/umd/gids-field.umd.js +1 -1
- package/dist-bundled/umd/gids-icon.umd.js +2 -2
- package/dist-bundled/umd/gids-input.umd.js +1 -1
- package/dist-bundled/umd/gids-overflow-container.umd.js +1 -1
- package/dist-bundled/umd/gids-overlay-provider.umd.js +2 -2
- package/dist-bundled/umd/gids-password-field.umd.js +1 -1
- package/dist-bundled/umd/gids-popover.umd.js +5 -0
- package/dist-bundled/umd/gids-scrim.umd.js +1 -1
- package/dist-bundled/umd/gids-text-field.umd.js +1 -1
- package/dist-bundled/umd/gids-toggle-button.umd.js +2 -2
- package/dist-bundled/umd/gids-tooltip.umd.js +5 -0
- package/dist-bundled/umd/index.umd.js +2 -2
- package/dist-bundled/umd-complete/gids-core-web.umd.js +3 -3
- package/package.json +278 -262
- package/dist/p-CWdkmFbc.js +0 -1
- package/dist-bundled/es/p-CWdkmFbc-D89ZE8Mi.js +0 -24
|
@@ -23,6 +23,22 @@
|
|
|
23
23
|
"module": "src/utils/assets.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "js",
|
|
28
|
+
"name": "*",
|
|
29
|
+
"declaration": {
|
|
30
|
+
"name": "*",
|
|
31
|
+
"module": "src/utils/childrenValidityUtils.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "js",
|
|
36
|
+
"name": "GidsFloatingElementType",
|
|
37
|
+
"declaration": {
|
|
38
|
+
"name": "GidsFloatingElementType",
|
|
39
|
+
"module": "./components/shared/GidsFloatingElementTypes.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
26
42
|
{
|
|
27
43
|
"kind": "js",
|
|
28
44
|
"name": "*",
|
|
@@ -180,6 +196,34 @@
|
|
|
180
196
|
}
|
|
181
197
|
]
|
|
182
198
|
},
|
|
199
|
+
{
|
|
200
|
+
"kind": "javascript-module",
|
|
201
|
+
"path": "src/utils/childrenValidityUtils.ts",
|
|
202
|
+
"declarations": [
|
|
203
|
+
{
|
|
204
|
+
"kind": "function",
|
|
205
|
+
"name": "testHtmlChildrenValidity",
|
|
206
|
+
"parameters": [
|
|
207
|
+
{
|
|
208
|
+
"name": "{\n\tchildren,\n\tclassNameToBeValidated,\n\tchildrenToBeValidated,\n\tcurrentComponentName,\n}",
|
|
209
|
+
"type": {
|
|
210
|
+
"text": "TestHtmlChildrenValidity<T>"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"exports": [
|
|
217
|
+
{
|
|
218
|
+
"kind": "js",
|
|
219
|
+
"name": "testHtmlChildrenValidity",
|
|
220
|
+
"declaration": {
|
|
221
|
+
"name": "testHtmlChildrenValidity",
|
|
222
|
+
"module": "src/utils/childrenValidityUtils.ts"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
183
227
|
{
|
|
184
228
|
"kind": "javascript-module",
|
|
185
229
|
"path": "src/utils/constructedGidsStylesheet.ts",
|
|
@@ -222,6 +266,294 @@
|
|
|
222
266
|
}
|
|
223
267
|
]
|
|
224
268
|
},
|
|
269
|
+
{
|
|
270
|
+
"kind": "javascript-module",
|
|
271
|
+
"path": "src/components/shared/GidsFloatingElementManager.ts",
|
|
272
|
+
"declarations": [
|
|
273
|
+
{
|
|
274
|
+
"kind": "class",
|
|
275
|
+
"description": "",
|
|
276
|
+
"name": "GidsFloatingElementManager",
|
|
277
|
+
"members": [
|
|
278
|
+
{
|
|
279
|
+
"kind": "field",
|
|
280
|
+
"name": "anchorElement",
|
|
281
|
+
"type": {
|
|
282
|
+
"text": "HTMLElement | null | Element | undefined"
|
|
283
|
+
},
|
|
284
|
+
"privacy": "private"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"kind": "field",
|
|
288
|
+
"name": "floatingElement",
|
|
289
|
+
"type": {
|
|
290
|
+
"text": "HTMLElement"
|
|
291
|
+
},
|
|
292
|
+
"privacy": "private"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"kind": "field",
|
|
296
|
+
"name": "arrowEl",
|
|
297
|
+
"type": {
|
|
298
|
+
"text": "HTMLElement | null"
|
|
299
|
+
},
|
|
300
|
+
"privacy": "private"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"kind": "field",
|
|
304
|
+
"name": "hoverTimeout",
|
|
305
|
+
"type": {
|
|
306
|
+
"text": "ReturnType<typeof setTimeout>"
|
|
307
|
+
},
|
|
308
|
+
"privacy": "private"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"kind": "field",
|
|
312
|
+
"name": "hoverOutTimeout",
|
|
313
|
+
"type": {
|
|
314
|
+
"text": "ReturnType<typeof setTimeout>"
|
|
315
|
+
},
|
|
316
|
+
"privacy": "private"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"kind": "field",
|
|
320
|
+
"name": "currentPlacement",
|
|
321
|
+
"type": {
|
|
322
|
+
"text": "GidsFloatingElementPlacement"
|
|
323
|
+
},
|
|
324
|
+
"privacy": "private"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"kind": "field",
|
|
328
|
+
"name": "currentFloatingElements",
|
|
329
|
+
"type": {
|
|
330
|
+
"text": "Map<\n\t\tGidsFloatingElementType,\n\t\tGidsFloatingElementManager\n\t>"
|
|
331
|
+
},
|
|
332
|
+
"privacy": "private",
|
|
333
|
+
"static": true,
|
|
334
|
+
"default": "new Map()"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"kind": "field",
|
|
338
|
+
"name": "cleanup",
|
|
339
|
+
"type": {
|
|
340
|
+
"text": "(() => void) | null"
|
|
341
|
+
},
|
|
342
|
+
"privacy": "private",
|
|
343
|
+
"default": "null"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"kind": "field",
|
|
347
|
+
"name": "offset",
|
|
348
|
+
"type": {
|
|
349
|
+
"text": "number"
|
|
350
|
+
},
|
|
351
|
+
"privacy": "private",
|
|
352
|
+
"default": "10"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"kind": "field",
|
|
356
|
+
"name": "timeBeforeElementShows",
|
|
357
|
+
"type": {
|
|
358
|
+
"text": "number"
|
|
359
|
+
},
|
|
360
|
+
"privacy": "private"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"kind": "field",
|
|
364
|
+
"name": "timeOfAnimation",
|
|
365
|
+
"type": {
|
|
366
|
+
"text": "number"
|
|
367
|
+
},
|
|
368
|
+
"privacy": "private"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"kind": "field",
|
|
372
|
+
"name": "timeDelayBeforeFadingOut",
|
|
373
|
+
"type": {
|
|
374
|
+
"text": "number"
|
|
375
|
+
},
|
|
376
|
+
"privacy": "private",
|
|
377
|
+
"default": "50"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"kind": "field",
|
|
381
|
+
"name": "popoverMainAxisEnabled",
|
|
382
|
+
"type": {
|
|
383
|
+
"text": "boolean"
|
|
384
|
+
},
|
|
385
|
+
"privacy": "private",
|
|
386
|
+
"default": "true"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"kind": "method",
|
|
390
|
+
"name": "setCommonTimingConfig"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "method",
|
|
394
|
+
"name": "initialize"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"kind": "method",
|
|
398
|
+
"name": "getAnchorElement",
|
|
399
|
+
"return": {
|
|
400
|
+
"type": {
|
|
401
|
+
"text": "HTMLElement | Element | null | undefined"
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"kind": "method",
|
|
407
|
+
"name": "updateConfig",
|
|
408
|
+
"parameters": [
|
|
409
|
+
{
|
|
410
|
+
"name": "newConfig",
|
|
411
|
+
"type": {
|
|
412
|
+
"text": "Partial<GidsFloatingElementConfig>"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"kind": "method",
|
|
419
|
+
"name": "getConfig",
|
|
420
|
+
"return": {
|
|
421
|
+
"type": {
|
|
422
|
+
"text": "GidsFloatingElementConfig"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"kind": "method",
|
|
428
|
+
"name": "getCurrentPlacement",
|
|
429
|
+
"return": {
|
|
430
|
+
"type": {
|
|
431
|
+
"text": "GidsFloatingElementPlacement"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"kind": "method",
|
|
437
|
+
"name": "reposition"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"kind": "method",
|
|
441
|
+
"name": "forceUpdate",
|
|
442
|
+
"privacy": "private"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"kind": "method",
|
|
446
|
+
"name": "setupPositioning",
|
|
447
|
+
"privacy": "private"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"kind": "method",
|
|
451
|
+
"name": "setupAutoUpdate",
|
|
452
|
+
"privacy": "private"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"kind": "method",
|
|
456
|
+
"name": "cleanupAutoUpdate",
|
|
457
|
+
"privacy": "private"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"kind": "method",
|
|
461
|
+
"name": "updatePosition",
|
|
462
|
+
"privacy": "private"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"kind": "method",
|
|
466
|
+
"name": "applyViewportMaxWidth",
|
|
467
|
+
"privacy": "private"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"kind": "method",
|
|
471
|
+
"name": "normalizeFloatingElementStacking",
|
|
472
|
+
"privacy": "private",
|
|
473
|
+
"return": {
|
|
474
|
+
"type": {
|
|
475
|
+
"text": "{\n\t\tcontentZIndex: number;\n\t\tarrowZIndex: number;\n\t}"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"kind": "method",
|
|
481
|
+
"name": "hideFloatingElement",
|
|
482
|
+
"privacy": "private"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"kind": "method",
|
|
486
|
+
"name": "showFloatingElement",
|
|
487
|
+
"privacy": "private"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"kind": "method",
|
|
491
|
+
"name": "isVisible",
|
|
492
|
+
"return": {
|
|
493
|
+
"type": {
|
|
494
|
+
"text": "boolean"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"kind": "method",
|
|
500
|
+
"name": "show"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"kind": "method",
|
|
504
|
+
"name": "hide"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"kind": "method",
|
|
508
|
+
"name": "toggle"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"kind": "method",
|
|
512
|
+
"name": "showAfterDelay"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"kind": "method",
|
|
516
|
+
"name": "hideAfterDelay"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"kind": "method",
|
|
520
|
+
"name": "cancelDelayedActions"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"kind": "method",
|
|
524
|
+
"name": "destroy"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"kind": "method",
|
|
528
|
+
"name": "isAnchorInViewport",
|
|
529
|
+
"privacy": "private",
|
|
530
|
+
"return": {
|
|
531
|
+
"type": {
|
|
532
|
+
"text": "boolean"
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"events": []
|
|
538
|
+
}
|
|
539
|
+
],
|
|
540
|
+
"exports": [
|
|
541
|
+
{
|
|
542
|
+
"kind": "js",
|
|
543
|
+
"name": "GidsFloatingElementManager",
|
|
544
|
+
"declaration": {
|
|
545
|
+
"name": "GidsFloatingElementManager",
|
|
546
|
+
"module": "src/components/shared/GidsFloatingElementManager.ts"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
]
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"kind": "javascript-module",
|
|
553
|
+
"path": "src/components/shared/GidsFloatingElementTypes.ts",
|
|
554
|
+
"declarations": [],
|
|
555
|
+
"exports": []
|
|
556
|
+
},
|
|
225
557
|
{
|
|
226
558
|
"kind": "javascript-module",
|
|
227
559
|
"path": "src/components/webComponents/GidsOverlayProvider/GidsOverlayProviderUtils.ts",
|
package/dist/gids-field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-iCAclJND.js";const p=o,r=s;export{p as GidsField,r as defineCustomElement}
|
package/dist/gids-icon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as s,H as t,h as e}from"./p-ibikYq-w.js";import{g as o}from"./p-B2zUuNXz.js";import{G as
|
|
1
|
+
import{t as i,p as s,H as t,h as e}from"./p-ibikYq-w.js";import{g as o}from"./p-B2zUuNXz.js";import{G as c}from"./p-veoOgDXg.js";const n=s(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}connectedCallback(){const i=o();void 0!==i&&this._el.shadowRoot?.adoptedStyleSheets.push(i)}render(){return e(c,{key:"3033afda529cd2143bd0d3c3ca5c985b4b950eae",name:this.name,size:this.size,appearance:this.appearance,alt:this.alt,titleId:this.titleId})}get _el(){return this}static get style(){return".gids-icon{color:var(--gidsIcon-color, var(--gids-color-icon-default));fill:var(--gidsIcon-color, var(--gids-color-icon-default));width:auto;height:var(--gidsIcon-height, 100%);flex-shrink:0}.gids-icon--xs{--gidsIcon-height:var(--gids-size-120)}.gids-icon--sm{--gidsIcon-height:var(--gids-size-160)}.gids-icon--md{--gidsIcon-height:var(--gids-size-240)}.gids-icon--lg{--gidsIcon-height:var(--gids-size-320)}"}},[1,"gids-icon",{name:[1],size:[1],appearance:[1],alt:[1],titleId:[1,"title-id"]}]);function d(){"undefined"!=typeof customElements&&["gids-icon"].forEach((s=>{"gids-icon"===s&&(customElements.get(i(s))||customElements.define(i(s),n))}))}d();const r=n,a=d;export{r as GidsIcon,a as defineCustomElement}
|
package/dist/gids-input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as o,d as s}from"./p-
|
|
1
|
+
import{G as o,d as s}from"./p-DvoHLz_5.js";const p=o,r=s;export{p as GidsInput,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as o,H as i,h as
|
|
1
|
+
import{t,p as o,H as i,h as e}from"./p-ibikYq-w.js";import{g as s}from"./p-B2zUuNXz.js";import{GidsOverflowContainerCommonUtils as a}from"@ganpatiinfo/gids-core-shared";const{showGidsOverflowContainerBottomShadow:r,showGidsOverflowContainerTopShadow:n}=a,h=o(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.shadowLocation="bottom"}connectedCallback(){const t=s();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){this._textArea=this._el.shadowRoot?.querySelector(".gids-overflow-container__text-area"),r(this.shadowLocation)&&this._textArea.scrollHeight>this._textArea.offsetHeight&&this._el.style.setProperty("--gidsOverflowContainer-after-opacity","1")}calculateShadows(){const t=this._textArea.scrollTop<=0?0:this._textArea.scrollTop;this._textArea.scrollTop+this._textArea.offsetHeight>=this._textArea.scrollHeight?this._el.style.setProperty("--gidsOverflowContainer-after-opacity","0"):0!==t?t>0&&(n(this.shadowLocation)&&this._el.style.setProperty("--gidsOverflowContainer-before-opacity",""+Math.min(t/20,1)),r(this.shadowLocation)&&this._el.style.setProperty("--gidsOverflowContainer-after-opacity",""+Math.min((this._textArea.scrollHeight-(this._textArea.scrollTop+this._textArea.offsetHeight))/20,1))):this._el.style.setProperty("--gidsOverflowContainer-after-opacity","0")}render(){return e("div",{key:"0a7916237558157e7122aeb05de6bf2eaaf5df77",class:"gids-overflow-container__text-area",onScroll:this.calculateShadows.bind(this)},e("slot",{key:"fda73f846c0ec7371d57b7a8e379c028e0feaa98"}))}get _el(){return this}},[257,"gids-overflow-container",{shadowLocation:[513,"shadow-location"]}]);function c(){"undefined"!=typeof customElements&&["gids-overflow-container"].forEach((o=>{"gids-overflow-container"===o&&(customElements.get(t(o))||customElements.define(t(o),h))}))}c();const d=h,f=c;export{d as GidsOverflowContainer,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,t as i,p as n,H as e,F as a}from"./p-ibikYq-w.js";import{g as o}from"./p-B2zUuNXz.js";import{g as s,a as r}from"./p-CVtNa0cL.js";import{GidsSnackbarContainerWebUtils as l,GidsNotificationContainerWebUtils as m,GidsOverlayProviderWebUtils as c}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-veoOgDXg.js";import{G as p}from"./p-CWdkmFbc.js";const{getGidsSnackbarContainerClassNames:f,getSnackbarContainerIconNames:u}=l,g=({appearance:i="default",children:n,button:e,class:a,...o})=>{const s=u(i);return t("div",{...o,class:f({appearance:i},a)},t("div",{class:"gids-snackbar-container__content"},"default"!==i&&null!=s?t(d,{name:s,alt:"",appearance:"filled",size:"md",class:"gids-snackbar-container__icon"}):null,"string"==typeof n?t("p",null,n):n),e)},{getGidsNotificationContainerClassNames:h,getNotificationContainerIconNames:b}=m,v=({notificationTitle:i,children:n,button:e,appearance:a="default",pronunciation:o="standard",onCloseNotificationClick:s,class:r,...l})=>{const m=b(a);return t("div",{class:h({appearance:a},r),...l},"default"!==a&&m?t("div",{class:"gids-notification-container__leading-icon-wrapper"},t(d,{size:"md",name:m,alt:"",appearance:"filled"})):null,t("div",{class:"gids-notification-container__content-wrapper"},t("div",{class:"gids-notification-container__top-content"},t("div",{class:"gids-notification-container__text-content"},null!=i&&""!==i?t("span",{class:"gids-notification-container__title"},i):null,n?"string"==typeof n?t("p",null,n):n:null),"standard"===o?t("div",{class:"gids-notification-container__cross-btn-wrapper"},t(p,{size:"sm",appearance:"subtle",width:"intrinsic",leadingIcon:t(d,{name:"cross",size:"md",appearance:"regular"}),onClick:s})):null),e?t("div",{class:"gids-notification-container__bottom-content"},e):null))},{getComponentClasses:y,getComponentStackClasses:k}=c,w=n(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this._parentOverlayProvider=null,this._componentQueue=[],this._allowedComponentQueue=[],this._exitingComponents=[],this._renderSnackbar=(i,n)=>{const{id:e,message:a,appearance:o,buttonLabel:s,onButtonClick:r}=i;return t(g,{key:e,class:n,children:a,appearance:o,button:null!=s&&""!==s?t(p,{appearance:"subtle",onClick:r},s):void 0})},this._renderNotification=(i,n)=>{const{id:e,notificationTitle:a,message:o,pronunciation:s,appearance:r,buttonLabel:l,onButtonClick:m,timerInMs:c}=i;return t(v,{key:e,class:n,notificationTitle:a,children:o,pronunciation:s,appearance:r,onCloseNotificationClick:()=>this.removeComponent(i,c||0,!0),button:null!=l&&""!==l?t(p,{appearance:"default",size:"sm",onClick:m},l):void 0})},this._renderComponent=t=>{const{componentName:i,position:n="bottom-center",id:e}=t,a=y({position:n,id:e,exitingComponents:this._exitingComponents});return null==i||"snackbar"===i?this._renderSnackbar(t,a):"notification"===i?this._renderNotification(t,a):null}}connectedCallback(){const t=o();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t),this._parentOverlayProvider=s(this._el)}_isRoot(){return null===this._parentOverlayProvider}async getRootOverlayProvider(){return this._isRoot()?this._el:this._parentOverlayProvider}autoHide(t){return new Promise((i=>{const n=setTimeout((()=>(clearTimeout(n),i({isTimeout:!0}))),t)}))}async _queueSnackbar(t){const{appearance:i,message:n,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r}=t,l={id:""+(Date.now()+Math.random()),message:n,appearance:i,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r};this._componentQueue=[...this._componentQueue,l],this.processSingleComponentQueue()}async _queueNotification(t){const{appearance:i,notificationTitle:n,pronunciation:e,message:a,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m}=t,c={id:""+(Date.now()+Math.random()),notificationTitle:n,message:a,pronunciation:e,appearance:i,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m};this._componentQueue=[...this._componentQueue,c],this.processMultiComponentQueue()}async queueComponent(t){if(await this._isRoot()){const{componentName:i}=t;null!=i&&"snackbar"!==i||this._queueSnackbar(t),"notification"===i&&this._queueNotification(t)}else(await this.getRootOverlayProvider()).queueComponent(t)}async removeComponent(t,i,n){return n||await this.autoHide(i),this._exitingComponents=[...this._exitingComponents,t.id],new Promise((i=>{setTimeout((()=>{this._componentQueue=this._componentQueue.filter((i=>i.id!==t.id)),this._exitingComponents=this._exitingComponents.filter((i=>i!==t.id)),this._allowedComponentQueue=[],i()}),500)}))}async processSingleComponentQueue(){if(0===this._componentQueue.length)return;const t=this._componentQueue[0];if(!t)return;this._allowedComponentQueue=[t],await new Promise((t=>requestAnimationFrame((()=>t()))));const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1),this.processSingleComponentQueue()}async processMultiComponentQueue(){const t=this._componentQueue;0!==t.length&&(this._allowedComponentQueue=t,await new Promise((t=>requestAnimationFrame((()=>t())))),this._allowedComponentQueue.map((async t=>{const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1)})),this.processMultiComponentQueue())}render(){const i=this._allowedComponentQueue[0]?.position||"bottom-center";return t(a,{key:"f80c6557d382dc5af3ddcb77f20c58ffa9acbd53"},t("slot",{key:"1d763f5cedecd8b8a2e0b7d1fb207e9ffde7ad97"}),this._isRoot()?t("div",{class:k({position:i})},[...this._allowedComponentQueue].reverse().map((t=>this._renderComponent(t)))):null)}get _el(){return this}static get style(){return".common-component-stack{display:flex;flex-direction:column;position:fixed;gap:var(--gids-gap-200);min-width:var(--gids-width-2-xs);max-width:var(--gids-width-md);width:100%}.component-stack-bottom-left{justify-self:left;bottom:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-right{justify-self:right;bottom:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-left{top:50%;justify-self:left;align-self:center;left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-right{top:50%;justify-self:right;align-self:center;right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-center{justify-self:center;top:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-left{justify-self:left;top:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-right{justify-self:right;top:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-center{justify-self:center;bottom:var(--gids-padding-vertical-edge-to-element-250)}.component-enter-bottom-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-center{animation-name:slide-up-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-center{animation-name:slide-up-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-center{animation-name:slide-down-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-center{animation-name:slide-down-invisible;animation-duration:0.3s;animation-fill-mode:forwards}@keyframes slide-up-visible{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-invisible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(100%)}}@keyframes slide-up-invisible{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-visible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-100%)}}@keyframes left-to-right-visible{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@keyframes right-to-left-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-100%)}}@keyframes right-to-left-visible{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@keyframes left-to-right-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(100%)}}"}},[257,"gids-overlay-provider",{_componentQueue:[32],_allowedComponentQueue:[32],_exitingComponents:[32],queueComponent:[64]}]);function C(){"undefined"!=typeof customElements&&["gids-overlay-provider"].forEach((t=>{"gids-overlay-provider"===t&&(customElements.get(i(t))||customElements.define(i(t),w))}))}C();const _=w,N=C;export{_ as GidsOverlayProvider,N as defineCustomElement}
|
|
1
|
+
import{h as t,t as i,p as n,H as e,F as a}from"./p-ibikYq-w.js";import{g as o}from"./p-B2zUuNXz.js";import{g as s,a as r}from"./p-CVtNa0cL.js";import{GidsSnackbarContainerWebUtils as l,GidsNotificationContainerWebUtils as m,GidsOverlayProviderWebUtils as c}from"@ganpatiinfo/gids-web-shared";import{G as d}from"./p-veoOgDXg.js";import{G as p}from"./p-CFw4_-5A.js";const{getGidsSnackbarContainerClassNames:f,getSnackbarContainerIconNames:u}=l,g=({appearance:i="default",children:n,button:e,class:a,...o})=>{const s=u(i);return t("div",{...o,class:f({appearance:i},a)},t("div",{class:"gids-snackbar-container__content"},"default"!==i&&null!=s?t(d,{name:s,alt:"",appearance:"filled",size:"md",class:"gids-snackbar-container__icon"}):null,"string"==typeof n?t("p",null,n):n),e)},{getGidsNotificationContainerClassNames:h,getNotificationContainerIconNames:v}=m,b=({notificationTitle:i,children:n,button:e,appearance:a="default",pronunciation:o="standard",onCloseNotificationClick:s,class:r,...l})=>{const m=v(a);return t("div",{class:h({appearance:a},r),...l},"default"!==a&&m?t("div",{class:"gids-notification-container__leading-icon-wrapper"},t(d,{size:"md",name:m,alt:"",appearance:"filled"})):null,t("div",{class:"gids-notification-container__content-wrapper"},t("div",{class:"gids-notification-container__top-content"},t("div",{class:"gids-notification-container__text-content"},null!=i&&""!==i?t("span",{class:"gids-notification-container__title"},i):null,n?"string"==typeof n?t("p",null,n):n:null),"standard"===o?t("div",{class:"gids-notification-container__cross-btn-wrapper"},t(p,{size:"sm",appearance:"subtle",width:"intrinsic",leadingIcon:t(d,{name:"cross",size:"md",appearance:"regular"}),onClick:s})):null),e?t("div",{class:"gids-notification-container__bottom-content"},e):null))},{getComponentClasses:y,getComponentStackClasses:k}=c,w=n(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this._parentOverlayProvider=null,this._componentQueue=[],this._allowedComponentQueue=[],this._exitingComponents=[],this._renderSnackbar=(i,n)=>{const{id:e,message:a,appearance:o,buttonLabel:s,onButtonClick:r}=i;return t(g,{key:e,class:n,children:a,appearance:o,button:null!=s&&""!==s?t(p,{appearance:"subtle",onClick:r},s):void 0})},this._renderNotification=(i,n)=>{const{id:e,notificationTitle:a,message:o,pronunciation:s,appearance:r,buttonLabel:l,onButtonClick:m,timerInMs:c}=i;return t(b,{key:e,class:n,notificationTitle:a,children:o,pronunciation:s,appearance:r,onCloseNotificationClick:()=>this.removeComponent(i,c||0,!0),button:null!=l&&""!==l?t(p,{appearance:"default",size:"sm",onClick:m},l):void 0})},this._renderComponent=t=>{const{componentName:i,position:n="bottom-center",id:e}=t,a=y({position:n,id:e,exitingComponents:this._exitingComponents});return null==i||"snackbar"===i?this._renderSnackbar(t,a):"notification"===i?this._renderNotification(t,a):null}}connectedCallback(){const t=o();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t),this._parentOverlayProvider=s(this._el)}_isRoot(){return null===this._parentOverlayProvider}async getRootOverlayProvider(){return this._isRoot()?this._el:this._parentOverlayProvider}autoHide(t){return new Promise((i=>{const n=setTimeout((()=>(clearTimeout(n),i({isTimeout:!0}))),t)}))}async _queueSnackbar(t){const{appearance:i,message:n,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r}=t,l={id:""+(Date.now()+Math.random()),message:n,appearance:i,buttonLabel:e,onButtonClick:a,position:o,componentName:s,...r};this._componentQueue=[...this._componentQueue,l],this.processSingleComponentQueue()}async _queueNotification(t){const{appearance:i,notificationTitle:n,pronunciation:e,message:a,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m}=t,c={id:""+(Date.now()+Math.random()),notificationTitle:n,message:a,pronunciation:e,appearance:i,buttonLabel:o,onButtonClick:s,position:r,componentName:l,...m};this._componentQueue=[...this._componentQueue,c],this.processMultiComponentQueue()}async queueComponent(t){if(await this._isRoot()){const{componentName:i}=t;null!=i&&"snackbar"!==i||this._queueSnackbar(t),"notification"===i&&this._queueNotification(t)}else(await this.getRootOverlayProvider()).queueComponent(t)}async removeComponent(t,i,n){return n||await this.autoHide(i),this._exitingComponents=[...this._exitingComponents,t.id],new Promise((i=>{setTimeout((()=>{this._componentQueue=this._componentQueue.filter((i=>i.id!==t.id)),this._exitingComponents=this._exitingComponents.filter((i=>i!==t.id)),this._allowedComponentQueue=[],i()}),500)}))}async processSingleComponentQueue(){if(0===this._componentQueue.length)return;const t=this._componentQueue[0];if(!t)return;this._allowedComponentQueue=[t],await new Promise((t=>requestAnimationFrame((()=>t()))));const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1),this.processSingleComponentQueue()}async processMultiComponentQueue(){const t=this._componentQueue;0!==t.length&&(this._allowedComponentQueue=t,await new Promise((t=>requestAnimationFrame((()=>t())))),this._allowedComponentQueue.map((async t=>{const i=r({componentName:t?.componentName??"snackbar",timerInMs:t?.timerInMs??0});await this.removeComponent(t,i,!1)})),this.processMultiComponentQueue())}render(){const i=this._allowedComponentQueue[0]?.position||"bottom-center";return t(a,{key:"cfacf71807978b22d6f2a9e33c0518e9aefc3a58"},t("slot",{key:"4b4fa08f00a46a95ed4af543f85aad06affee847"}),this._isRoot()?t("div",{class:k({position:i})},[...this._allowedComponentQueue].reverse().map((t=>this._renderComponent(t)))):null)}get _el(){return this}static get style(){return".common-component-stack{display:flex;flex-direction:column;position:fixed;gap:var(--gids-gap-200);min-width:var(--gids-width-2-xs);max-width:var(--gids-width-md);width:100%}.component-stack-bottom-left{justify-self:left;bottom:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-right{justify-self:right;bottom:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-left{top:50%;justify-self:left;align-self:center;left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-middle-right{top:50%;justify-self:right;align-self:center;right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-center{justify-self:center;top:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-left{justify-self:left;top:var(--gids-padding-vertical-edge-to-element-250);left:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-top-right{justify-self:right;top:var(--gids-padding-vertical-edge-to-element-250);right:var(--gids-padding-vertical-edge-to-element-250)}.component-stack-bottom-center{justify-self:center;bottom:var(--gids-padding-vertical-edge-to-element-250)}.component-enter-bottom-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-middle-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-center{animation-name:slide-up-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-left{animation-name:left-to-right-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-top-right{animation-name:right-to-left-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-enter-bottom-center{animation-name:slide-up-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-middle-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-center{animation-name:slide-down-visible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-left{animation-name:right-to-left-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-top-right{animation-name:left-to-right-invisible;animation-duration:0.3s;animation-fill-mode:forwards}.component-exit-bottom-center{animation-name:slide-down-invisible;animation-duration:0.3s;animation-fill-mode:forwards}@keyframes slide-up-visible{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-invisible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(100%)}}@keyframes slide-up-invisible{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@keyframes slide-down-visible{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-100%)}}@keyframes left-to-right-visible{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@keyframes right-to-left-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-100%)}}@keyframes right-to-left-visible{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@keyframes left-to-right-invisible{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(100%)}}"}},[257,"gids-overlay-provider",{_componentQueue:[32],_allowedComponentQueue:[32],_exitingComponents:[32],queueComponent:[64]}]);function C(){"undefined"!=typeof customElements&&["gids-overlay-provider"].forEach((t=>{"gids-overlay-provider"===t&&(customElements.get(i(t))||customElements.define(i(t),w))}))}C();const _=w,N=C;export{_ as GidsOverlayProvider,N as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,t,p as s,H as i,c as n,f as a,F as r}from"./p-ibikYq-w.js";import{GidsStrengthMeterWebUtils as
|
|
1
|
+
import{h as e,t,p as s,H as i,c as n,f as a,F as r}from"./p-ibikYq-w.js";import{GidsStrengthMeterWebUtils as l,GidsRequirementsMeterLabelWebUtils as d,GidsRequirementsMeterWebUtils as o,generateId as h,GidsPasswordFieldWebUtils as u}from"@ganpatiinfo/gids-web-shared";import{g as c}from"./p-B2zUuNXz.js";import{G as m,a as f}from"./p-DijVkS9b.js";import{G as g}from"./p-CFw4_-5A.js";import{minLengthRuleCanBeApplied as p,getMeterRulesFromRequirements as b,getDefaultRulesAndRequirementsForMeters as x}from"@ganpatiinfo/gids-core-shared/dist/components/GidsRequirementsMeter/GidsRequirementsMeterCommonUtils.js";import{GidsStrengthMeterCommonUtils as q,GidsRequirementsMeterLabelCommonUtils as R,GidsRequirementsMeterCommonUtils as w}from"@ganpatiinfo/gids-core-shared";import{minLengthRuleCanBeApplied as v}from"@ganpatiinfo/gids-core-shared/dist/components/GidsRequirementsMeter/GidsRequirementsMeterCommonUtils";import{G as L}from"./p-veoOgDXg.js";import{d as y}from"./p-iCAclJND.js";import{d as M}from"./p-DvoHLz_5.js";const{getGidsStrengthMeterClassNames:k}=l,{getStrengthMeterScore:C,getColorModifierByScore:_}=q,S=({text:t,textMinLength:s,meterRules:i=["1-uppercase","1-lowercase","1-digit","1-special-character","include-min-length"],class:n})=>{const a=(t,s,i)=>e("div",{key:t,class:["gids-strength-meter__strength-"+t,i?"is-active":"",i?s:""].filter(Boolean).join(" ")});return i.length>0?e("div",{class:k(n)},(()=>{const e=i.length,n=C({text:t,textMinLength:s,meterRules:i}),r=_({textScore:n,maxScore:e});return Array.from({length:e},((e,t)=>{const l=t+1,d=l<=n;return"include-min-length"===i[l]?v({requirementRule:"include-min-length",textMinLength:s})?a(l,r,d):null:a(l,r,d)}))})()):null},{getGidsRequirementsMeterLabelClassNames:F}=d,{getRequirementsMeterLabelLeadingIcon:G}=R,P=t=>{const{label:s,status:i="default",leadingIconVisible:n=!0,class:a}=t,r=G(i);return e("div",{class:F({status:i},a)},n&&i&&r?e(L,{name:r,size:"sm",appearance:"filled"}):null,s&&""!==s?e("span",null,s):null)},{checkRequirementRuleSatisfied:T}=w,{getGidsRequirementsMeterClassNames:j}=o,E=({requirements:t=[],text:s,textMinLength:i,class:n})=>{const a=(t,s)=>e(P,{status:s?"success":"error",label:t.requirementText});return e("div",{class:j(n)},t.map((e=>{if(null!=e?.requirementText&&null!=e?.requirementRule){const t=T({rule:e.requirementRule,textMinLength:i,text:s});return"include-min-length"===e.requirementRule?!0===p({requirementRule:e.requirementRule,textMinLength:i})?a(e,t):null:a(e,t)}return null})))},{inputToGidsFieldStatusForPassword:B}=u,O=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.gidsPasswordFieldClear=n(this,"gidsPasswordFieldClear"),this.gidsPasswordFieldRevealPassword=n(this,"gidsPasswordFieldRevealPassword"),this.isPasswordRevealed=!1,this.meterRules=[],this.requirementsMeterRequirements=[],this.requirements=[],this.#e=h(),this._handleDismiss=()=>{const e=this.#t?.querySelector("input.gids-input__control");e&&(e.value="",e.dispatchEvent(new globalThis.Event("input",{bubbles:!0}))),this.value="",this.gidsPasswordFieldClear.emit()},this._handleRevealPassword=()=>{const e=this.#t?.querySelector("input.gids-input__control");this.isPasswordRevealed=null!=e?.value&&""!==e.value&&!1===this.isPasswordRevealed,this._el.dispatchEvent(new CustomEvent("gidsPasswordFieldRevealPassword",{detail:{passwordRevealed:this.isPasswordRevealed},bubbles:!0,composed:!0}))},this._handleInput=e=>{this.value=e.target?.value},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))},this._isRequirementAndStrengthMeterVisible=()=>{const e=this.requirements;return!!(e&&e.length>0)},this._handleRequirementsMeter=()=>{const e=this._isRequirementAndStrengthMeterVisible();this.requirementsMeterRequirements=this.requirements&&this.requirements.length>0?this.requirements:[],this.meterRules=e?b(this.requirements):[]}}_startSlotContentObserver(){this._slotContentObserver=new MutationObserver((()=>{a(this)})),this._slotContentObserver.observe(this._el,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}handleRequirementsChange(e){void 0===e&&(this.requirements=x(this.textMinLength).defaultRequirementsMeterRules),this._handleRequirementsMeter()}componentWillLoad(){this.requirements||(this.requirements=x(this.textMinLength).defaultRequirementsMeterRules),this._handleRequirementsMeter()}connectedCallback(){const e=c();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e),this._handleRequirementsMeter(),this._startSlotContentObserver()}disconnectedCallback(){this._slotContentObserver?.disconnect(),this._slotContentObserver=void 0}#e;#t;render(){const{id:t,...s}=this.inputProps??{},i=t??this.#e,n=this.showClearButton&&void 0!==this.value&&this.value.length>0,a=this.showRevealPasswordButton,l={...s},d=void 0!==l?.placeholder&&null!==l.placeholder&&""!=l.placeholder?l.placeholder:"Enter password",o=this.isPasswordRevealed,h=this.meterRules,u=void 0!==this.textMinLength?this.textMinLength:8;return e(r,{key:"674d6baf90ed0a3b9bf6821fb288972ffe255909"},e("gids-field",{key:"2b1f7f67ef3616edf29843b663c4e1efa8ce416a",disabled:this.disabled,count:void 0,helperText:this.helperText,statusText:this.statusText,status:B(this.status)},e(m,{key:"ccd09eba06b8876d216181b8dd7fbcb1ff742d86",slot:"label",disabled:this.disabled,info:e("slot",{name:"info"}),fieldRequirement:this.fieldRequirement,fieldRequirementOptionalText:this.fieldRequirementOptionalText,fieldRequirementRequiredText:this.fieldRequirementRequiredText,isLabelSentence:this.isLabelSentence,htmlFor:i},this.label),e("gids-input",{key:"f9a8c8f13347b5dd7620e8498aeb85ec646f000f",ref:e=>this.#t=e,appearance:"default",status:this.status,loading:this.loading,value:this.value,defaultValue:this.defaultValue,name:this.name,required:this.required,disabled:this.disabled,readOnly:this.readOnly,leadingLabel:void 0,trailingLabel:void 0,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur,onInput:this._handleInput,inputProps:{...l,placeholder:d,type:o?"text":"password",id:i,maxLength:this.maxLength}},e("slot",{key:"56c43774f755d7ae1ac6e633e39426d2b489414a",name:"leadingIcon"}),e("slot",{key:"1e964257af8f053e0d7c9de51fc0ec48a38b6d18",name:"leadingAccessory"}),e("div",{key:"f453197e76a4c8c01f1fa12a6f0c551a14f71f5d",slot:"trailingAccessory",class:"gids-password-field__trailing-accessory"},n&&e(f,{key:"3127641007c6eb5db4e9b8c6bd521e6cdf80e59b",label:"clear text",size:"lg",onPressDismiss:this._handleDismiss}),a&&e(g,{key:"bc537fa18fabe13e16ec2a7c8b5f4611e589c4c7",appearance:"default",size:"xs",width:"intrinsic",disabled:this.disabled,onClick:this._handleRevealPassword},o?"Hide":"Show")))),e("div",{key:"355033afd60090f7b04e48db5c1d675f29663e18",class:"gids-password-field__meters-container"},e(S,{key:"fb407fffb5de91b9bc30c1e7593fee01b5fa2a09",meterRules:h,text:this.value,textMinLength:u}),e(E,{key:"6888d147c99ea7902954e55ad91a5d64d7c1a031",requirements:this.requirementsMeterRequirements,text:this.value,textMinLength:u})))}get _el(){return this}static get watchers(){return{requirements:[{handleRequirementsChange:0}],textMinLength:[{handleRequirementsChange:0}]}}},[260,"gids-password-field",{label:[513],showClearButton:[516,"show-clear-button"],showRevealPasswordButton:[516,"show-reveal-password-button"],helperText:[513,"helper-text"],statusText:[513,"status-text"],status:[513],loading:[516],name:[513],required:[516],maxLength:[514,"maxlength"],value:[1],defaultValue:[513,"default-value"],disabled:[516],readOnly:[516,"readonly"],inputProps:[16],fieldRequirement:[513,"field-requirement"],fieldRequirementOptionalText:[1,"field-requirement-optional-text"],fieldRequirementRequiredText:[1,"field-requirement-required-text"],isLabelSentence:[16],textMinLength:[514,"text-min-length"],requirements:[16],isPasswordRevealed:[32],meterRules:[32],requirementsMeterRequirements:[32]},void 0,{requirements:[{handleRequirementsChange:0}],textMinLength:[{handleRequirementsChange:0}]}]);function z(){"undefined"!=typeof customElements&&["gids-password-field","gids-field","gids-input"].forEach((e=>{switch(e){case"gids-password-field":customElements.get(t(e))||customElements.define(t(e),O);break;case"gids-field":customElements.get(t(e))||y();break;case"gids-input":customElements.get(t(e))||M()}}))}z();const A=O,D=z;export{A as GidsPasswordField,D as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist-dev/types/components";
|
|
2
|
+
|
|
3
|
+
interface GidsPopover extends Components.GidsPopover, HTMLElement {}
|
|
4
|
+
export const GidsPopover: {
|
|
5
|
+
prototype: GidsPopover;
|
|
6
|
+
new (): GidsPopover;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as e,H as o,h as i,F as s}from"./p-ibikYq-w.js";import{G as r}from"./p-a3JfEYJp.js";import{G as a}from"./p-B8kX8Vqv.js";const n=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="bottom",this.previouslyFocusedElement=null,this.focusableElements=[],this.handleToggleEvent=t=>{t.stopPropagation();const e=this.floatingElementManager.isVisible();this.floatingElementManager.toggle(),!e&&this.floatingElementManager.isVisible()?this.onPopoverShow():e&&!this.floatingElementManager.isVisible()&&this.onPopoverHide()},this.handleDocumentClick=t=>{this.floatingElementManager.isVisible()&&!this._el.contains(t.target)&&(this.floatingElementManager.hide(),this.onPopoverHide())},this.handleKeyDown=t=>{if(this.floatingElementManager.isVisible())return"Escape"===t.key?(t.preventDefault(),this.floatingElementManager.hide(),void this.onPopoverHide()):void("Tab"===t.key&&this.trapFocus(t))}}componentDidLoad(){this.floatingElementManager=new r(this._el,{htmlFor:this.htmlFor,placement:this.placement,showWithoutDelay:!0,floatingElementSelector:"#popover",arrowElementSelector:"#arrow",visibilityClass:"gids-popover--visible",elementType:a.POPOVER,getAnchorElementFromSlot:t=>{const e=t.querySelector('slot[name="anchor"]');return e?.assignedElements()[0]||null}}),this.floatingElementManager.initialize(),this.setupEventListeners()}setupEventListeners(){const t=this.floatingElementManager.getAnchorElement();t&&(t.addEventListener("click",this.handleToggleEvent),document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleKeyDown))}onPopoverShow(){this.previouslyFocusedElement=document.activeElement,this.updateFocusableElements(),setTimeout((()=>{this.focusableElements.length>0&&this.focusableElements[0]&&this.focusableElements[0].focus()}),50)}onPopoverHide(){this.previouslyFocusedElement&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}updateFocusableElements(){const t=this._el.shadowRoot?.querySelector("#popover");if(!t)return;const e=[],o=l(t);e.push(...o);const i=this._el.shadowRoot?.querySelector("slot:not([name])");i&&i.assignedElements({flatten:!0}).forEach((t=>{const o=l(t);e.push(...o)})),this.focusableElements=e.sort(((t,e)=>{const o=t.compareDocumentPosition(e),i=!!(o&Node.DOCUMENT_POSITION_FOLLOWING),s=!!(o&Node.DOCUMENT_POSITION_PRECEDING);return i?-1:s?1:0}))}trapFocus(t){if(0===this.focusableElements.length)return;const e=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];let i=document.activeElement;if(i===this._el){const t=this._el.shadowRoot?.activeElement;null!==t&&(i=t)}const s=-1!==this.focusableElements.indexOf(i);t.shiftKey?i!==e&&s||(t.preventDefault(),o&&o.focus()):i!==o&&s||(t.preventDefault(),e&&e.focus())}placementChanged(t){this.floatingElementManager?.updateConfig({placement:t}),this.floatingElementManager?.isVisible()&&this.floatingElementManager?.reposition()}htmlForChanged(t){this.floatingElementManager?.updateConfig({htmlFor:t}),this.cleanupEventListeners(),this.floatingElementManager?.initialize(),this.setupEventListeners()}cleanupEventListeners(){const t=this.floatingElementManager?.getAnchorElement();t&&t.removeEventListener("click",this.handleToggleEvent),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleKeyDown)}render(){return i(s,{key:"da6cbab41d3390a940444809d9fe809225c9426e"},i("slot",{key:"5a5e5f72ab9c793e02b7bd633381363ab37cbf22",name:"anchor"}),i("div",{key:"49ab365961e8a3d9bf0e6ac67f2c73fda1eb7bb3",id:"popover",part:"popover",role:"dialog","aria-modal":"true",tabindex:"-1"},i("span",{key:"9815148f291ebca88b4a2bbe09b0e93fcbaab4a7",id:"arrow"}),i("div",{key:"b6d83da9bd180933b5f2453f3e66f66f692e35c1"},i("slot",{key:"90aaeadfe9d09ebdd6534afa762b35c38a5cc57f"}))))}disconnectedCallback(){this.cleanupEventListeners(),this.floatingElementManager?.destroy()}get _el(){return this}static get watchers(){return{placement:[{placementChanged:0}],htmlFor:[{htmlForChanged:0}]}}static get style(){return"gids-popover{--gidsPopover-background:var(--gids-elevation-surface-overlay-default);--gidsPopover-text-color:var(--gids-color-text-default);--gidsPopover-padding:var(--gids-padding-vertical-edge-to-element-200) var(--gids-padding-horizontal-edge-to-element-300);--gidsPopover-border-radius:var(--gids-border-radius-lg);--gidsPopover-tip-border-radius:2px;--gidsPopover-tip-size:12px;--gidsPopover-shadow:var(--gids-elevation-shadow-overlay);--gidsFloatingElement-background:var(--gidsPopover-background);--gidsFloatingElement-tip-border-radius:var(--gidsPopover-tip-border-radius)}[part=popover]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;background-color:var(--gidsPopover-background);color:var(--gidsPopover-text-color);border-radius:var(--gidsPopover-border-radius);box-shadow:var(--gidsPopover-shadow);z-index:1000;opacity:0;pointer-events:none;outline:none}[part=popover]:focus{outline:none}[part=popover].gids-popover--visible{pointer-events:initial;opacity:1}[part=popover] span#arrow{position:absolute;height:var(--gidsPopover-tip-size);width:var(--gidsPopover-tip-size);background-color:var(--gidsPopover-background)}"}},[257,"gids-popover",{htmlFor:[513,"for"],placement:[513]},void 0,{placement:[{placementChanged:0}],htmlFor:[{htmlForChanged:0}]}]),d=t=>{if(!(t instanceof o))return!1;if(-1===t.tabIndex)return!1;if(t.hasAttribute("disabled"))return!1;const e=getComputedStyle(t);if("none"===e.display||"hidden"===e.visibility||t.hidden)return!1;try{const e=t.tabIndex;t.tabIndex=-1,t.focus();const o=document.activeElement===t;return t.tabIndex=e,o&&t.blur(),o}catch{return!1}},l=t=>{const e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>d(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),o=[];d(t)&&o.push(t);let i=e.nextNode();for(;null!==i;)o.push(i),i=e.nextNode();return o};function p(){"undefined"!=typeof customElements&&["gids-popover"].forEach((e=>{"gids-popover"===e&&(customElements.get(t(e))||customElements.define(t(e),n))}))}p();const h=n,c=p;export{h as GidsPopover,c as defineCustomElement}
|
package/dist/gids-scrim.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as
|
|
1
|
+
import{t as s,p as e,H as t,h as a}from"./p-ibikYq-w.js";import{g as i}from"./p-B2zUuNXz.js";import{GidsScrimWebUtils as r}from"@ganpatiinfo/gids-web-shared";const{getGidsScrimClassNames:o}=r,n=e(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.activeClasses=""}handleExtraClassesChange(s){this.activeClasses=o(s)}connectedCallback(){const s=i();void 0!==s&&this._el.shadowRoot?.adoptedStyleSheets.push(s),this.activeClasses=o(this.extraClasses)}render(){return a("div",{key:"da4b587303359a6075411a1843e03eff6eed68ce",class:this.activeClasses,part:"root"},a("slot",{key:"5a52f6e5628c771b2dd0f5a6221005a0ed8b9fbb"}))}get _el(){return this}static get watchers(){return{extraClasses:[{handleExtraClassesChange:0}]}}static get style(){return".gids-scrim{display:flex;flex-direction:column;background-color:var(--gids-color-background-scrim);height:100vh !important;position:absolute;top:0;bottom:0;left:0;right:0;z-index:1001;align-items:center;justify-content:center;backdrop-filter:blur(12)}"}},[257,"gids-scrim",{extraClasses:[513,"extra-classes"],activeClasses:[32]},void 0,{extraClasses:[{handleExtraClassesChange:0}]}]);function c(){"undefined"!=typeof customElements&&["gids-scrim"].forEach((e=>{"gids-scrim"===e&&(customElements.get(s(e))||customElements.define(s(e),n))}))}c();const l=n,d=c;export{l as GidsScrim,d as defineCustomElement}
|
package/dist/gids-text-field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,c as s,f as a,h as l}from"./p-ibikYq-w.js";import{GidsTextFieldCommonUtils as n}from"@ganpatiinfo/gids-core-shared";import{generateId as d,GidsTextFieldWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{g as o}from"./p-B2zUuNXz.js";import{a as h,G as
|
|
1
|
+
import{t as e,p as t,H as i,c as s,f as a,h as l}from"./p-ibikYq-w.js";import{GidsTextFieldCommonUtils as n}from"@ganpatiinfo/gids-core-shared";import{generateId as d,GidsTextFieldWebUtils as r}from"@ganpatiinfo/gids-web-shared";import{g as o}from"./p-B2zUuNXz.js";import{a as h,G as c}from"./p-DijVkS9b.js";import{d as u}from"./p-iCAclJND.js";import{d as f}from"./p-DvoHLz_5.js";const{formatCharCount:m}=n,{inputToGidsFieldStatus:b}=r,p=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.gidsTextFieldClear=s(this,"gidsTextFieldClear"),this.#e=d(),this._handleDismiss=()=>{const e=this.#t?.querySelector("input.gids-input__control");e&&(e.value="",e.dispatchEvent(new globalThis.Event("input",{bubbles:!0}))),this.value="",this.gidsTextFieldClear.emit()},this._handleInput=e=>{this.value=e.target?.value},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))}}_startSlotContentObserver(){this._slotContentObserver=new MutationObserver((()=>{a(this)})),this._slotContentObserver.observe(this._el,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}connectedCallback(){const e=o();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e),this._startSlotContentObserver()}disconnectedCallback(){this._slotContentObserver?.disconnect(),this._slotContentObserver=void 0}#e;#t;render(){const{id:e,...t}=this.inputProps??{},i=e??this.#e,s=this.showClearButton&&void 0!==this.value&&this.value.length>0;return l("gids-field",{key:"80f1981d584f417e010322b2c5ec07a60dc1f388",disabled:this.disabled,count:m(this.value?.length,this.maxLength),helperText:this.helperText,statusText:this.statusText,status:b(this.status)},l(c,{key:"f222a99181809cf9ccdc1ad9ceed98c985681553",slot:"label",disabled:this.disabled,info:l("slot",{name:"info"}),fieldRequirement:this.fieldRequirement,fieldRequirementOptionalText:this.fieldRequirementOptionalText,fieldRequirementRequiredText:this.fieldRequirementRequiredText,isLabelSentence:this.isLabelSentence,htmlFor:i},this.label),l("gids-input",{key:"7ff6cf33f16be119ecc705af8a7fb8965b01b74c",ref:e=>this.#t=e,appearance:this.appearance,status:this.status,loading:this.loading,value:this.value,defaultValue:this.defaultValue,name:this.name,required:this.required,disabled:this.disabled,readOnly:this.readOnly,leadingLabel:this.leadingLabel,trailingLabel:this.trailingLabel,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur,onInput:this._handleInput,inputProps:{...t,type:this.type,id:i,maxLength:this.maxLength}},l("slot",{key:"d3e260125c8d8f56870e6f484894bd1a1aa8e03b",name:"leadingIcon"}),l("slot",{key:"0445885d41f43d6a76f48ed482673a266b6a0182",name:"leadingAccessory"}),s&&l(h,{key:"be16083a8e414be66ceb37e076f9ebc01cc4fc8f",label:"clear text",slot:"trailingAccessory",size:"lg",onPressDismiss:this._handleDismiss}),l("slot",{key:"0dc7436a9ca21e57409cc18340747295915d2d5f",name:"trailingIcon"})))}get _el(){return this}},[260,"gids-text-field",{label:[513],showClearButton:[516,"show-clear-button"],helperText:[513,"helper-text"],statusText:[513,"status-text"],appearance:[513],status:[513],leadingLabel:[513,"leading-label"],trailingLabel:[513,"trailing-label"],loading:[516],type:[513],name:[513],required:[516],maxLength:[514,"maxlength"],value:[1],defaultValue:[513,"default-value"],disabled:[516],readOnly:[516,"readonly"],inputProps:[16],fieldRequirement:[513,"field-requirement"],fieldRequirementOptionalText:[1,"field-requirement-optional-text"],fieldRequirementRequiredText:[1,"field-requirement-required-text"],isLabelSentence:[16]}]);function g(){"undefined"!=typeof customElements&&["gids-text-field","gids-field","gids-input"].forEach((t=>{switch(t){case"gids-text-field":customElements.get(e(t))||customElements.define(e(t),p);break;case"gids-field":customElements.get(e(t))||u();break;case"gids-input":customElements.get(e(t))||f()}}))}g();const x=p,q=g;export{x as GidsTextField,q as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,c as i,h as
|
|
1
|
+
import{t as e,p as t,H as s,c as i,h as n,d as o}from"./p-ibikYq-w.js";import{G as c}from"./p-CFw4_-5A.js";import{g as l}from"./p-B2zUuNXz.js";const a=t(class extends s{get selected(){return this.#e??this.defaultSelected}set selected(e){this.#e=void 0===e?void 0:!!e}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.select=i(this,"select"),this._toggle=this._toggle.bind(this)}#e;connectedCallback(){const e=l();void 0!==e&&this._el.shadowRoot?.adoptedStyleSheets.push(e)}_toggle(){const e=!this.selected;this._el.selected=e,this.select?.emit(e)}render(){return n(o,{key:"56bc99780f392c4d5064eaa47819ee1ff0897c79"},n("style",{key:"e330f982d625eeb7f72ede3f382231fb5791ec47"},`:host {\n display: ${"full"===this.width?"block":"inline-block"}\n }`),n(c,{key:"ccef97603f645ba92fd4180263d2cbeff0a54a07",appearance:this.appearance,size:this.size,width:this.width,disabled:this.disabled,onClick:this._toggle,"aria-pressed":this.selected?"true":"false",leadingIcon:n("slot",{name:"leadingIcon"}),trailingIcon:n("slot",{name:"trailingIcon"}),forceIconOnly:this._onlyHasLeadingIcon()},n("slot",{key:"7094015cf47ef8d045955419aa43f03174145928"})))}_onlyHasLeadingIcon(){const e=this._el.childNodes;return 1===e.length&&e[0]instanceof window.Element&&"leadingIcon"===e[0].slot}get _el(){return this}},[257,"gids-toggle-button",{disabled:[516],appearance:[513],size:[513],width:[513],defaultSelected:[516,"default-selected"],selected:[6660]}]);function d(){"undefined"!=typeof customElements&&["gids-toggle-button"].forEach((t=>{"gids-toggle-button"===t&&(customElements.get(e(t))||customElements.define(e(t),a))}))}d();const r=a,f=d;export{r as GidsToggleButton,f as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist-dev/types/components";
|
|
2
|
+
|
|
3
|
+
interface GidsTooltip extends Components.GidsTooltip, HTMLElement {}
|
|
4
|
+
export const GidsTooltip: {
|
|
5
|
+
prototype: GidsTooltip;
|
|
6
|
+
new (): GidsTooltip;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as i,H as o,h as e,F as s}from"./p-ibikYq-w.js";import{G as a}from"./p-a3JfEYJp.js";import{g as l}from"./p-B2zUuNXz.js";import{G as r}from"./p-B8kX8Vqv.js";const n=i(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="bottom",this.showWithoutDelay=!1,this.lockToMainAxis=!1,this.handleShowEvent=()=>{this.floatingElementManager.showAfterDelay()},this.handleHideEvent=()=>{this.floatingElementManager.hideAfterDelay()}}connectedCallback(){const t=l();void 0!==t&&this._el.shadowRoot?.adoptedStyleSheets.push(t)}componentDidLoad(){this.floatingElementManager=new a(this._el,{htmlFor:this.htmlFor,placement:this.placement,showWithoutDelay:this.showWithoutDelay,lockToMainAxis:this.lockToMainAxis,floatingElementSelector:"#tooltip",arrowElementSelector:"#arrow",visibilityClass:"gids-tooltip--visible",elementType:r.TOOLTIP,getAnchorElementFromSlot:t=>{const i=t.querySelector("slot");return i?.assignedElements()[0]||null}}),this.floatingElementManager.initialize(),this.setupEventListeners()}setupEventListeners(){const t=this.floatingElementManager.getAnchorElement();t&&(t.addEventListener("mouseenter",this.handleShowEvent),t.addEventListener("focus",this.handleShowEvent),t.addEventListener("mouseleave",this.handleHideEvent),t.addEventListener("blur",this.handleHideEvent))}placementChanged(t){this.floatingElementManager?.updateConfig({placement:t}),this.floatingElementManager?.isVisible()&&this.floatingElementManager?.reposition()}showWithoutDelayChanged(t){this.floatingElementManager?.updateConfig({showWithoutDelay:t})}lockToMainAxisChanged(t){this.floatingElementManager?.updateConfig({lockToMainAxis:t})}htmlForChanged(t){this.floatingElementManager?.updateConfig({htmlFor:t}),this.cleanupEventListeners(),this.floatingElementManager?.initialize(),this.setupEventListeners()}cleanupEventListeners(){const t=this.floatingElementManager?.getAnchorElement();t&&(t.removeEventListener("mouseenter",this.handleShowEvent),t.removeEventListener("focus",this.handleShowEvent),t.removeEventListener("mouseleave",this.handleHideEvent),t.removeEventListener("blur",this.handleHideEvent))}render(){return e(s,{key:"49747828eaa09ead2d1e2f6d9d28b66c2db76103"},e("slot",{key:"9ad53320553f1377f01f026a95f7cb894d91c98a"}),e("span",{key:"6116e418faa09d82975a3830f7e0bedcbdd8e87f",id:"tooltip",part:"tooltip",role:"tooltip"},e("span",{key:"677d275b2e161441d76315c50a60a941d6dd010a",id:"arrow"}),this.tooltipText))}disconnectedCallback(){this.cleanupEventListeners(),this.floatingElementManager?.destroy()}get _el(){return this}static get watchers(){return{placement:[{placementChanged:0}],showWithoutDelay:[{showWithoutDelayChanged:0}],lockToMainAxis:[{lockToMainAxisChanged:0}],htmlFor:[{htmlForChanged:0}]}}static get style(){return"gids-tooltip{--gidsTooltip-background:var(--gids-color-background-neutral-bold-default);--gidsTooltip-text-color:var(--gids-color-text-inverse);--gidsTooltip-padding:var(--gids-padding-vertical-edge-to-element-100) var(--gids-padding-horizontal-edge-to-element-200);--gidsTooltip-border-radius:var(--gids-border-radius-sm);--gidsTooltip-tip-border-radius:2px;--gidsTooltip-tip-size:12px;--gidsFloatingElement-background:var(--gidsTooltip-background);--gidsFloatingElement-tip-border-radius:var(--gidsTooltip-tip-border-radius)}[part=tooltip]{font-family:var(--gids-typography-label-small__font-family);font-size:var(--gids-typography-label-small__font-size);font-weight:var(--gids-typography-label-small__font-weight);letter-spacing:var(--gids-typography-label-small__letter-spacing);line-height:var(--gids-typography-label-small__line-height);text-transform:var(--gids-typography-label-small__text-transform, inherit);font-variant-caps:var(--gids-typography-label-small__font-variant-caps, inherit);position:absolute;display:inline-block;hyphens:auto;background-color:var(--gidsTooltip-background);color:var(--gidsTooltip-text-color);padding:var(--gidsTooltip-padding);border-radius:var(--gidsTooltip-border-radius);z-index:1000;opacity:0;pointer-events:none}[part=tooltip].gids-tooltip--visible{pointer-events:initial;opacity:1}[part=tooltip] span#arrow{position:absolute;height:var(--gidsTooltip-tip-size);width:var(--gidsTooltip-tip-size)}"}},[257,"gids-tooltip",{htmlFor:[513,"for"],tooltipText:[513,"tooltip-text"],placement:[513],showWithoutDelay:[516,"show-without-delay"],lockToMainAxis:[4,"lock-to-main-axis"]},void 0,{placement:[{placementChanged:0}],showWithoutDelay:[{showWithoutDelayChanged:0}],lockToMainAxis:[{lockToMainAxisChanged:0}],htmlFor:[{htmlForChanged:0}]}]);function d(){"undefined"!=typeof customElements&&["gids-tooltip"].forEach((i=>{"gids-tooltip"===i&&(customElements.get(t(i))||customElements.define(t(i),n))}))}d();const h=n,p=d;export{h as GidsTooltip,p as defineCustomElement}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-ibikYq-w.js";export{g as getConstructedGidsStylesheet,r as refreshConstructedGidsStylesheet}from"./p-B2zUuNXz.js";import{setGidsAssetPaths as
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-ibikYq-w.js";export{g as getConstructedGidsStylesheet,r as refreshConstructedGidsStylesheet}from"./p-B2zUuNXz.js";import{setGidsAssetPaths as e}from"@ganpatiinfo/gids-web-shared";export{G as GidsFloatingElementType}from"./p-B8kX8Vqv.js";function t(t,s){e(t,s)}const o=e=>{t(e)},n=e=>{t(e)},i=({children:e,classNameToBeValidated:t,childrenToBeValidated:s,currentComponentName:r})=>{if(null!=e){const o=Array.isArray(e)?e:[e];for(const e of o){if(!e||"object"!=typeof e||!("vtag"in e))throw Error(`HTML/JSX Render Error: Invalid child type passed to ${r}. Expected ${s}.`);{const o=e.vtag;if(o!==t&&o!==s)throw Error(`HTML/JSX Render Error: <${r}> only accepts <${s}> as direct children. Received element tag: "${"function"==typeof o?o.name:o}".`)}}}};export{o as setGidsAssetFilePaths,t as setGidsAssetPaths,n as setGidsDefaultAssetDirPath,i as testHtmlChildrenValidity}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o;!function(o){o.TOOLTIP="tooltip",o.POPOVER="popover"}(o||(o={}));export{o as G}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t}from"./p-ibikYq-w.js";import{GidsButtonWebUtils as i,nonEmpty as s}from"@ganpatiinfo/gids-web-shared";import{G as e}from"./p-DybsMR13.js";const{getGidsButtonClassNames:n}=i,o=({appearance:i,size:o,destructive:a,positive:d,loading:r,width:p,leadingIcon:c,trailingIcon:l,as:b,disabled:g,class:m,forceIconOnly:u=!1,...v},f)=>{const w=b||"button",h="lg"===o||void 0===o?"md":o;return"button"!==w||"type"in v||(v.type="button"),t(w,{class:n({appearance:i,size:o,destructive:a,loading:r,width:p,positive:d},u||0===f.length&&s(c)&&!s(l),m),disabled:"button"===w?g:void 0,...v},t("span",{class:"gids-button__content"},c,f),r&&t(e,{size:h,indeterminate:!0}),l)};export{o as G}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,h as s,F as a}from"./p-ibikYq-w.js";import{isInteractiveElement as n}from"@ganpatiinfo/gids-web-shared";import{G as
|
|
1
|
+
import{t as e,p as t,H as i,h as s,F as a}from"./p-ibikYq-w.js";import{isInteractiveElement as n}from"@ganpatiinfo/gids-web-shared";import{G as c}from"./p-veoOgDXg.js";import{G as d}from"./p-DybsMR13.js";const l=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.#e={},this._focusInput=e=>{const t=e.target;t===this.#t||this._isWithinInteractiveElement(t)||this.#t?.focus()},this._handleInputFocusAndBlur=e=>{this._el.dispatchEvent(new FocusEvent(e.type,{relatedTarget:e.relatedTarget}))}}get defaultValue(){return this.#t?.defaultValue??this.#e.defaultValue??""}set defaultValue(e){this.#t?this.#t.defaultValue=e:this.#e.defaultValue=e}get value(){return this.#t?.value??this.#e.value??this.#e.defaultValue??""}set value(e){this.#t?this.#t.value=e:this.#e.value=e}#t;#e;_isWithinInteractiveElement(e){if(null===e||e===this._el||!this._el.contains(e))return!1;if(n(e))return!0;{const t=e.parentElement;if(t)return this._isWithinInteractiveElement(t)}return!1}connectedCallback(){this._el.addEventListener("click",this._focusInput)}disconnectedCallback(){this._el.removeEventListener("click",this._focusInput)}render(){return s(a,{key:"c1e035111a8a80ef0b442bc0298785f0c7445113"},s("slot",{key:"49bd52d5bbc7c9b962b27f6404ca9817de699b31",name:"leadingIcon"}),this.leadingLabel&&s("span",{key:"2863a61da1f009b7287af508d9809d66787ddaf7",class:"gids-input__label"},this.leadingLabel),s("slot",{key:"f74e8993fb8b1dd186a53c4557ceffac681f2881",name:"leadingAccessory"}),s("input",{key:"2bc7f84858a8533f33c66834ad212c38ad698075",...this.inputProps,ref:e=>{this.#t=e,void 0!==this.#e.value&&(this.#t.value=this.#e.value,delete this.#e.value),void 0!==this.#e.defaultValue&&(this.#t.defaultValue=this.#e.defaultValue,delete this.#e.defaultValue)},class:"gids-input__control",name:this.name,disabled:this.disabled,readOnly:this.readOnly,required:this.required,onFocus:this._handleInputFocusAndBlur,onBlur:this._handleInputFocusAndBlur}),s("slot",{key:"2116db712ac02853ae4974b4ad618b5eee372b3f",name:"trailingAccessory"}),this.trailingLabel&&s("span",{key:"35dc9b1c2bd2ef493b0ce1a602688f41854c922d",class:"gids-input__label"},this.trailingLabel),s("slot",{key:"6cc1b37e9a0b979f04de753d8527aaae2970762c",name:"trailingIcon"}),"incomplete"===this.status&&s(c,{key:"8c963877cee9bc941b1236a6b647fc1790a41cdc",name:"warning",appearance:"filled",class:"gids-input__warning-icon"}),"complete"===this.status&&s(c,{key:"a2c401261ff8defa2802b5bbc336a6b4cc177ff4",name:"positive",appearance:"filled",class:"gids-input__positive-icon"}),this.loading&&s(d,{key:"4dd22cd62d87ff444794fc8f1c4f0cc78e14738a",size:"md",indeterminate:!0}))}get _el(){return this}},[260,"gids-input",{appearance:[513],defaultValue:[6657,"default-value"],disabled:[516],inputProps:[16],leadingLabel:[513,"leading-label"],trailingLabel:[513,"trailing-label"],loading:[516],name:[513],readOnly:[516,"readonly"],required:[516],status:[513],value:[6145]}]);function r(){"undefined"!=typeof customElements&&["gids-input"].forEach((t=>{"gids-input"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}r();export{l as G,r as d}
|