@warp-ds/elements 2.3.0 → 2.3.1

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.
@@ -3256,384 +3256,15 @@
3256
3256
  },
3257
3257
  {
3258
3258
  "kind": "javascript-module",
3259
- "path": "packages/datepicker/datepicker.ts",
3260
- "declarations": [
3261
- {
3262
- "kind": "class",
3263
- "description": "An input for dates.\n\nUses the `lang` attribute on either the element or on `<html>` to determine the locale options.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-datepicker--docs)",
3264
- "name": "WarpDatepicker",
3265
- "members": [
3266
- {
3267
- "kind": "field",
3268
- "name": "shadowRootOptions",
3269
- "type": {
3270
- "text": "object"
3271
- },
3272
- "static": true,
3273
- "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
3274
- },
3275
- {
3276
- "kind": "field",
3277
- "name": "label",
3278
- "type": {
3279
- "text": "string"
3280
- },
3281
- "attribute": "label",
3282
- "reflects": true
3283
- },
3284
- {
3285
- "kind": "field",
3286
- "name": "lang",
3287
- "type": {
3288
- "text": "string"
3289
- },
3290
- "description": "Takes precedence over the `<html>` lang attribute.",
3291
- "attribute": "lang",
3292
- "reflects": true
3293
- },
3294
- {
3295
- "kind": "field",
3296
- "name": "name",
3297
- "type": {
3298
- "text": "string"
3299
- },
3300
- "attribute": "name",
3301
- "reflects": true
3302
- },
3303
- {
3304
- "kind": "field",
3305
- "name": "value",
3306
- "type": {
3307
- "text": "string"
3308
- },
3309
- "attribute": "value",
3310
- "reflects": true
3311
- },
3312
- {
3313
- "kind": "field",
3314
- "name": "headerFormat",
3315
- "type": {
3316
- "text": "string"
3317
- },
3318
- "default": "'MMMM yyyy'",
3319
- "description": "Decides the format of the date as shown in the calendar header.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
3320
- "attribute": "header-format"
3321
- },
3322
- {
3323
- "kind": "field",
3324
- "name": "weekdayFormat",
3325
- "type": {
3326
- "text": "string"
3327
- },
3328
- "default": "'EEEEEE'",
3329
- "description": "Decides the format of the weekday as shown above the grid of dates in the calendar.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
3330
- "attribute": "weekday-format"
3331
- },
3332
- {
3333
- "kind": "field",
3334
- "name": "isDayDisabled",
3335
- "type": {
3336
- "text": "(day: Date) => boolean"
3337
- },
3338
- "description": "Lets you control if a date in the calendar should be disabled.\n\nThis needs to be set on the element instance in JavaScript, not as an HTML attribute."
3339
- },
3340
- {
3341
- "kind": "field",
3342
- "name": "dayFormat",
3343
- "type": {
3344
- "text": "string"
3345
- },
3346
- "default": "'PPPP'",
3347
- "description": "Decides the format of the day in the calendar as read to screen readers.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
3348
- "attribute": "day-format"
3349
- },
3350
- {
3351
- "kind": "field",
3352
- "name": "isCalendarOpen",
3353
- "type": {
3354
- "text": "boolean"
3355
- },
3356
- "default": "false"
3357
- },
3358
- {
3359
- "kind": "field",
3360
- "name": "navigationDate",
3361
- "type": {
3362
- "text": "Date"
3363
- }
3364
- },
3365
- {
3366
- "kind": "field",
3367
- "name": "selectedDate",
3368
- "type": {
3369
- "text": "Date | null"
3370
- },
3371
- "readonly": true
3372
- },
3373
- {
3374
- "kind": "field",
3375
- "name": "month",
3376
- "readonly": true
3377
- },
3378
- {
3379
- "kind": "field",
3380
- "name": "#initialValue",
3381
- "privacy": "private",
3382
- "type": {
3383
- "text": "string | null"
3384
- },
3385
- "default": "null"
3386
- },
3387
- {
3388
- "kind": "field",
3389
- "name": "weeks",
3390
- "readonly": true
3391
- },
3392
- {
3393
- "kind": "field",
3394
- "name": "calendar",
3395
- "type": {
3396
- "text": "HTMLDivElement"
3397
- }
3398
- },
3399
- {
3400
- "kind": "field",
3401
- "name": "input",
3402
- "type": {
3403
- "text": "HTMLInputElement"
3404
- }
3405
- },
3406
- {
3407
- "kind": "field",
3408
- "name": "toggleButton",
3409
- "type": {
3410
- "text": "HTMLButtonElement"
3411
- }
3412
- },
3413
- {
3414
- "kind": "field",
3415
- "name": "wrapper",
3416
- "type": {
3417
- "text": "HTMLDivElement"
3418
- }
3419
- },
3420
- {
3421
- "kind": "field",
3422
- "name": "previousMonthButton",
3423
- "type": {
3424
- "text": "HTMLButtonElement"
3425
- },
3426
- "description": "This is the first focusable element, needed for the modal focus trap.\n\nDon't cache this and other `@query` fields from inside the calendar modal.\nThey work the first time, but once the calendar is closed and reopened\nthe query will point to an element that doesn't exist anymore."
3427
- },
3428
- {
3429
- "kind": "field",
3430
- "name": "todayCell",
3431
- "type": {
3432
- "text": "HTMLTableCellElement"
3433
- }
3434
- },
3435
- {
3436
- "kind": "field",
3437
- "name": "selectedCell",
3438
- "type": {
3439
- "text": "HTMLTableCellElement"
3440
- }
3441
- },
3442
- {
3443
- "kind": "method",
3444
- "name": "resetFormControl",
3445
- "return": {
3446
- "type": {
3447
- "text": "void"
3448
- }
3449
- },
3450
- "type": {
3451
- "text": "resetFormControl() => void"
3452
- }
3453
- },
3454
- {
3455
- "kind": "method",
3456
- "name": "#toggleCalendarOpen",
3457
- "privacy": "private",
3458
- "parameters": [
3459
- {
3460
- "name": "e",
3461
- "type": {
3462
- "text": "MouseEvent | KeyboardEvent"
3463
- }
3464
- }
3465
- ]
3466
- },
3467
- {
3468
- "kind": "method",
3469
- "name": "#nextMonth",
3470
- "privacy": "private"
3471
- },
3472
- {
3473
- "kind": "method",
3474
- "name": "#previousMonth",
3475
- "privacy": "private"
3476
- },
3477
- {
3478
- "kind": "method",
3479
- "name": "#dispatchChangeEvent",
3480
- "privacy": "private"
3481
- },
3482
- {
3483
- "kind": "method",
3484
- "name": "#onInput",
3485
- "privacy": "private",
3486
- "parameters": [
3487
- {
3488
- "name": "e",
3489
- "type": {
3490
- "text": "InputEvent"
3491
- }
3492
- }
3493
- ]
3494
- },
3495
- {
3496
- "kind": "method",
3497
- "name": "#onInputClick",
3498
- "privacy": "private",
3499
- "parameters": [
3500
- {
3501
- "name": "e",
3502
- "type": {
3503
- "text": "PointerEvent"
3504
- }
3505
- }
3506
- ]
3507
- },
3508
- {
3509
- "kind": "method",
3510
- "name": "#onInputKeyDown",
3511
- "privacy": "private",
3512
- "parameters": [
3513
- {
3514
- "name": "e",
3515
- "type": {
3516
- "text": "KeyboardEvent"
3517
- }
3518
- }
3519
- ]
3520
- },
3521
- {
3522
- "kind": "method",
3523
- "name": "#onCalendarKeyDown",
3524
- "privacy": "private",
3525
- "parameters": [
3526
- {
3527
- "name": "e",
3528
- "type": {
3529
- "text": "KeyboardEvent"
3530
- }
3531
- }
3532
- ]
3533
- },
3534
- {
3535
- "kind": "method",
3536
- "name": "#onCalendarSelect",
3537
- "privacy": "private",
3538
- "parameters": [
3539
- {
3540
- "name": "event",
3541
- "type": {
3542
- "text": "MouseEvent | KeyboardEvent"
3543
- }
3544
- }
3545
- ]
3546
- }
3547
- ],
3548
- "attributes": [
3549
- {
3550
- "name": "label",
3551
- "type": {
3552
- "text": "string"
3553
- },
3554
- "fieldName": "label"
3555
- },
3556
- {
3557
- "name": "lang",
3558
- "type": {
3559
- "text": "string"
3560
- },
3561
- "description": "Takes precedence over the `<html>` lang attribute.",
3562
- "fieldName": "lang"
3563
- },
3564
- {
3565
- "name": "name",
3566
- "type": {
3567
- "text": "string"
3568
- },
3569
- "fieldName": "name"
3570
- },
3571
- {
3572
- "name": "value",
3573
- "type": {
3574
- "text": "string"
3575
- },
3576
- "fieldName": "value"
3577
- },
3578
- {
3579
- "name": "header-format",
3580
- "type": {
3581
- "text": "string"
3582
- },
3583
- "default": "'MMMM yyyy'",
3584
- "description": "Decides the format of the date as shown in the calendar header.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
3585
- "fieldName": "headerFormat"
3586
- },
3587
- {
3588
- "name": "weekday-format",
3589
- "type": {
3590
- "text": "string"
3591
- },
3592
- "default": "'EEEEEE'",
3593
- "description": "Decides the format of the weekday as shown above the grid of dates in the calendar.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
3594
- "fieldName": "weekdayFormat"
3595
- },
3596
- {
3597
- "name": "day-format",
3598
- "type": {
3599
- "text": "string"
3600
- },
3601
- "default": "'PPPP'",
3602
- "description": "Decides the format of the day in the calendar as read to screen readers.\n\nThe syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).",
3603
- "fieldName": "dayFormat"
3604
- }
3605
- ],
3606
- "mixins": [
3607
- {
3608
- "name": "FormControlMixin",
3609
- "package": "@open-wc/form-control"
3610
- }
3611
- ],
3612
- "superclass": {
3613
- "name": "LitElement",
3614
- "package": "lit"
3615
- },
3616
- "tagName": "w-datepicker",
3617
- "customElement": true,
3618
- "modulePath": "packages/datepicker/datepicker.ts",
3619
- "definitionPath": "packages/datepicker/datepicker.ts"
3620
- }
3621
- ],
3259
+ "path": "packages/datepicker/index.ts",
3260
+ "declarations": [],
3622
3261
  "exports": [
3623
- {
3624
- "kind": "custom-element-definition",
3625
- "name": "w-datepicker",
3626
- "declaration": {
3627
- "name": "WarpDatepicker",
3628
- "module": "packages/datepicker/datepicker.ts"
3629
- }
3630
- },
3631
3262
  {
3632
3263
  "kind": "js",
3633
- "name": "WarpDatepicker",
3264
+ "name": "*",
3634
3265
  "declaration": {
3635
- "name": "WarpDatepicker",
3636
- "module": "packages/datepicker/datepicker.ts"
3266
+ "name": "*",
3267
+ "module": "packages/datepicker/datepicker.js"
3637
3268
  }
3638
3269
  }
3639
3270
  ]
package/dist/index.d.ts CHANGED
@@ -16,7 +16,6 @@ import type { ModalFooter } from "./packages/modal/modal-footer.ts";
16
16
  import type { ModalHeader } from "./packages/modal/modal-header.ts";
17
17
  import type { ModalMain } from "./packages/modal/modal-main.ts";
18
18
  import type { WarpToastContainer } from "./packages/toast/toast-container.ts";
19
- import type { WarpDatepicker } from "./packages/datepicker/datepicker.ts";
20
19
 
21
20
  /**
22
21
  * This type can be used to create scoped tags for your components.
@@ -505,70 +504,6 @@ export type ModalMainProps = {
505
504
  export type WarpToastContainerProps = {
506
505
 
507
506
 
508
- }
509
-
510
-
511
- export type WarpDatepickerProps = {
512
- /** */
513
- "label"?: WarpDatepicker['label'];
514
- /** Takes precedence over the `<html>` lang attribute. */
515
- "lang"?: WarpDatepicker['lang'];
516
- /** */
517
- "name"?: WarpDatepicker['name'];
518
- /** */
519
- "value"?: WarpDatepicker['value'];
520
- /** Decides the format of the date as shown in the calendar header.
521
-
522
- The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
523
- "header-format"?: WarpDatepicker['headerFormat'];
524
- /** Decides the format of the date as shown in the calendar header.
525
-
526
- The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
527
- "headerFormat"?: WarpDatepicker['headerFormat'];
528
- /** Decides the format of the weekday as shown above the grid of dates in the calendar.
529
-
530
- The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
531
- "weekday-format"?: WarpDatepicker['weekdayFormat'];
532
- /** Decides the format of the weekday as shown above the grid of dates in the calendar.
533
-
534
- The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
535
- "weekdayFormat"?: WarpDatepicker['weekdayFormat'];
536
- /** Decides the format of the day in the calendar as read to screen readers.
537
-
538
- The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
539
- "day-format"?: WarpDatepicker['dayFormat'];
540
- /** Decides the format of the day in the calendar as read to screen readers.
541
-
542
- The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
543
- "dayFormat"?: WarpDatepicker['dayFormat'];
544
- /** Lets you control if a date in the calendar should be disabled.
545
-
546
- This needs to be set on the element instance in JavaScript, not as an HTML attribute. */
547
- "isDayDisabled"?: WarpDatepicker['isDayDisabled'];
548
- /** */
549
- "isCalendarOpen"?: WarpDatepicker['isCalendarOpen'];
550
- /** */
551
- "navigationDate"?: WarpDatepicker['navigationDate'];
552
- /** */
553
- "calendar"?: WarpDatepicker['calendar'];
554
- /** */
555
- "input"?: WarpDatepicker['input'];
556
- /** */
557
- "toggleButton"?: WarpDatepicker['toggleButton'];
558
- /** */
559
- "wrapper"?: WarpDatepicker['wrapper'];
560
- /** This is the first focusable element, needed for the modal focus trap.
561
-
562
- Don't cache this and other `@query` fields from inside the calendar modal.
563
- They work the first time, but once the calendar is closed and reopened
564
- the query will point to an element that doesn't exist anymore. */
565
- "previousMonthButton"?: WarpDatepicker['previousMonthButton'];
566
- /** */
567
- "todayCell"?: WarpDatepicker['todayCell'];
568
- /** */
569
- "selectedCell"?: WarpDatepicker['selectedCell'];
570
-
571
-
572
507
  }
573
508
 
574
509
  export type CustomElements = {
@@ -1021,59 +956,6 @@ the query will point to an element that doesn't exist anymore. */
1021
956
  * - `del(id: string | number) => Promise<boolean>`: undefined
1022
957
  */
1023
958
  "w-toast-container": Partial<WarpToastContainerProps & BaseProps<WarpToastContainer> & BaseEvents>;
1024
-
1025
-
1026
- /**
1027
- * An input for dates.
1028
- *
1029
- * Uses the `lang` attribute on either the element or on `<html>` to determine the locale options.
1030
- *
1031
- * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-datepicker--docs)
1032
- *
1033
- * ## Attributes & Properties
1034
- *
1035
- * Component attributes and properties that can be applied to the element or by using JavaScript.
1036
- *
1037
- * - `label`: undefined
1038
- * - `lang`: Takes precedence over the `<html>` lang attribute.
1039
- * - `name`: undefined
1040
- * - `value`: undefined
1041
- * - `header-format`/`headerFormat`: Decides the format of the date as shown in the calendar header.
1042
- *
1043
- * The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
1044
- * - `weekday-format`/`weekdayFormat`: Decides the format of the weekday as shown above the grid of dates in the calendar.
1045
- *
1046
- * The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
1047
- * - `day-format`/`dayFormat`: Decides the format of the day in the calendar as read to screen readers.
1048
- *
1049
- * The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
1050
- * - `isDayDisabled`: Lets you control if a date in the calendar should be disabled.
1051
- *
1052
- * This needs to be set on the element instance in JavaScript, not as an HTML attribute. (property only)
1053
- * - `isCalendarOpen`: undefined (property only)
1054
- * - `navigationDate`: undefined (property only)
1055
- * - `selectedDate`: undefined (property only) (readonly)
1056
- * - `month`: undefined (property only) (readonly)
1057
- * - `weeks`: undefined (property only) (readonly)
1058
- * - `calendar`: undefined (property only)
1059
- * - `input`: undefined (property only)
1060
- * - `toggleButton`: undefined (property only)
1061
- * - `wrapper`: undefined (property only)
1062
- * - `previousMonthButton`: This is the first focusable element, needed for the modal focus trap.
1063
- *
1064
- * Don't cache this and other `@query` fields from inside the calendar modal.
1065
- * They work the first time, but once the calendar is closed and reopened
1066
- * the query will point to an element that doesn't exist anymore. (property only)
1067
- * - `todayCell`: undefined (property only)
1068
- * - `selectedCell`: undefined (property only)
1069
- *
1070
- * ## Methods
1071
- *
1072
- * Methods that can be called to access component functionality.
1073
- *
1074
- * - `resetFormControl() => void`: undefined
1075
- */
1076
- "w-datepicker": Partial<WarpDatepickerProps & BaseProps<WarpDatepicker> & BaseEvents>;
1077
959
  }
1078
960
 
1079
961
  export type CustomCssProperties = {