@commmerce/ui 1.14.0 → 1.16.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.
@@ -15250,13 +15250,17 @@
15250
15250
  "type": {
15251
15251
  "text": "(key: string) => string"
15252
15252
  }
15253
+ },
15254
+ {
15255
+ "name": "firstDayOfWeek",
15256
+ "default": "0"
15253
15257
  }
15254
15258
  ],
15255
- "description": "Resolves a preset key or object to a label and ISO dates (relative to today). Unknown keys return null.\n`label` translates a key's label (it gets the key in camelCase, e.g. `last7Days`); English otherwise."
15259
+ "description": "Resolves a preset key or object to a label and ISO dates (relative to today). Unknown keys and `custom` return null.\n`label` translates a key's label (it gets the key in camelCase, e.g. `last7Days`); English otherwise.\n`firstDayOfWeek` (0 Sunday … 6 Saturday, default 0) sets where `this-week` and `last-week` start."
15256
15260
  },
15257
15261
  {
15258
15262
  "kind": "class",
15259
- "description": "Date range field for report and order filters: type a start and end date or pick them in a calendar, or choose\na preset range such as \"Last 7 days\". The calendar is the same APG date picker grid as `cm-date-picker`: the first\ndate picked is the start, the second the end. Participates in native forms: submits `<name>-start` and\n`<name>-end` (or `start-name` / `end-name`) as ISO `yyyy-mm-dd`.",
15263
+ "description": "Date range field for report and order filters: type a start and end date or pick them in a calendar, or choose\na preset range such as \"Last 7 days\". The calendar is the same APG date picker grid as `cm-date-picker`: the first\ndate picked is the start, the second the end. Participates in native forms: submits `<name>-start` and\n`<name>-end` (or `start-name` / `end-name`) as ISO `yyyy-mm-dd`.\n\nFor reports (since 1.16), like an analytics date picker: add `custom` to `presets`, `months=\"2\"` to show two months\nside by side, and `confirm` so presets and dates are only a draft until Apply.",
15260
15264
  "name": "CmDateRangePicker",
15261
15265
  "cssParts": [
15262
15266
  {
@@ -15270,6 +15274,10 @@
15270
15274
  {
15271
15275
  "description": "The list of preset ranges.",
15272
15276
  "name": "presets"
15277
+ },
15278
+ {
15279
+ "description": "With `confirm`: the line with the draft range and the Cancel and Apply buttons.",
15280
+ "name": "footer"
15273
15281
  }
15274
15282
  ],
15275
15283
  "members": [
@@ -15468,6 +15476,42 @@
15468
15476
  "description": "Preset ranges shown beside the calendar: keys (`today`, `yesterday`, `last-7-days`, `last-30-days`, `last-90-days`,\n`this-month`, `last-month`) or `{ label, start, end }` objects. In HTML, a space-separated list of keys.",
15469
15477
  "attribute": "presets"
15470
15478
  },
15479
+ {
15480
+ "kind": "field",
15481
+ "name": "preset",
15482
+ "privacy": "public",
15483
+ "type": {
15484
+ "text": "string"
15485
+ },
15486
+ "default": "''",
15487
+ "description": "Key of the preset the range came from (`last-7-days`), or empty for dates picked or typed. Set it to a key to\nchoose that range relative to today, e.g. a report that opens on \"Last 28 days\"; the picker keeps it up to date\nwhen people change the range. The key need not be in `presets`.",
15488
+ "attribute": "preset",
15489
+ "reflects": true
15490
+ },
15491
+ {
15492
+ "kind": "field",
15493
+ "name": "months",
15494
+ "privacy": "public",
15495
+ "type": {
15496
+ "text": "number"
15497
+ },
15498
+ "default": "1",
15499
+ "description": "Months shown side by side in the calendar: 1 (default) or 2. Phones (640px or narrower) always show one.",
15500
+ "attribute": "months",
15501
+ "reflects": true
15502
+ },
15503
+ {
15504
+ "kind": "field",
15505
+ "name": "confirm",
15506
+ "privacy": "public",
15507
+ "type": {
15508
+ "text": "boolean"
15509
+ },
15510
+ "default": "false",
15511
+ "description": "Presets and dates picked in the calendar are a draft until Apply; Cancel, Escape or a click outside drop it.\nWithout it, choosing a preset or the end date changes the range at once.",
15512
+ "attribute": "confirm",
15513
+ "reflects": true
15514
+ },
15471
15515
  {
15472
15516
  "kind": "field",
15473
15517
  "name": "startLabel",
@@ -15596,6 +15640,27 @@
15596
15640
  "default": "null",
15597
15641
  "attribute": "_hover"
15598
15642
  },
15643
+ {
15644
+ "kind": "field",
15645
+ "name": "_view",
15646
+ "privacy": "public",
15647
+ "type": {
15648
+ "text": "Date"
15649
+ },
15650
+ "description": "First month shown.",
15651
+ "attribute": "_view"
15652
+ },
15653
+ {
15654
+ "kind": "field",
15655
+ "name": "_draftPreset",
15656
+ "privacy": "public",
15657
+ "type": {
15658
+ "text": "string"
15659
+ },
15660
+ "default": "''",
15661
+ "description": "With `confirm`: the preset key of the draft range.",
15662
+ "attribute": "_draftPreset"
15663
+ },
15599
15664
  {
15600
15665
  "kind": "field",
15601
15666
  "name": "#internals",
@@ -15617,10 +15682,30 @@
15617
15682
  "name": "#default",
15618
15683
  "privacy": "private",
15619
15684
  "type": {
15620
- "text": "[string, string] | null"
15685
+ "text": "[string, string, string] | null"
15621
15686
  },
15622
15687
  "default": "null"
15623
15688
  },
15689
+ {
15690
+ "kind": "field",
15691
+ "name": "#ownPreset",
15692
+ "privacy": "private",
15693
+ "type": {
15694
+ "text": "boolean"
15695
+ },
15696
+ "default": "false",
15697
+ "description": "The preset key was set by the picker itself (not by the app), so it must not move the range."
15698
+ },
15699
+ {
15700
+ "kind": "field",
15701
+ "name": "#custom",
15702
+ "privacy": "private",
15703
+ "type": {
15704
+ "text": "boolean"
15705
+ },
15706
+ "default": "false",
15707
+ "description": "\"Custom\" was pressed in the open calendar."
15708
+ },
15624
15709
  {
15625
15710
  "kind": "field",
15626
15711
  "name": "#keepText",
@@ -15716,6 +15801,43 @@
15716
15801
  "name": "show",
15717
15802
  "description": "Opens the calendar."
15718
15803
  },
15804
+ {
15805
+ "kind": "field",
15806
+ "name": "#monthCount",
15807
+ "privacy": "private",
15808
+ "description": "Months side by side: `months` (1 or 2), one on phones.",
15809
+ "readonly": true
15810
+ },
15811
+ {
15812
+ "kind": "method",
15813
+ "name": "#show",
15814
+ "privacy": "private",
15815
+ "parameters": [
15816
+ {
15817
+ "name": "d",
15818
+ "type": {
15819
+ "text": "Date"
15820
+ }
15821
+ }
15822
+ ],
15823
+ "description": "Moves the months shown so `d` is in view."
15824
+ },
15825
+ {
15826
+ "kind": "field",
15827
+ "name": "#listed",
15828
+ "privacy": "private",
15829
+ "type": {
15830
+ "text": "ListedPreset[]"
15831
+ },
15832
+ "description": "The listed presets, resolved relative to today, without `custom`.",
15833
+ "readonly": true
15834
+ },
15835
+ {
15836
+ "kind": "field",
15837
+ "name": "#hasCustom",
15838
+ "privacy": "private",
15839
+ "readonly": true
15840
+ },
15719
15841
  {
15720
15842
  "kind": "method",
15721
15843
  "name": "close",
@@ -15789,8 +15911,16 @@
15789
15911
  "type": {
15790
15912
  "text": "string"
15791
15913
  }
15914
+ },
15915
+ {
15916
+ "name": "key",
15917
+ "optional": true,
15918
+ "type": {
15919
+ "text": "string"
15920
+ }
15792
15921
  }
15793
- ]
15922
+ ],
15923
+ "description": "Sets the range the person chose. `key` is the preset it came from; without one, a listed preset with the same dates."
15794
15924
  },
15795
15925
  {
15796
15926
  "kind": "method",
@@ -15826,11 +15956,28 @@
15826
15956
  {
15827
15957
  "name": "p",
15828
15958
  "type": {
15829
- "text": "DateRangePreset"
15959
+ "text": "ListedPreset"
15830
15960
  }
15831
15961
  }
15832
15962
  ]
15833
15963
  },
15964
+ {
15965
+ "kind": "method",
15966
+ "name": "#pickCustom",
15967
+ "privacy": "private",
15968
+ "description": "\"Custom\": the dates come from the calendar; the next day picked starts a new range."
15969
+ },
15970
+ {
15971
+ "kind": "method",
15972
+ "name": "#apply",
15973
+ "privacy": "private",
15974
+ "description": "With `confirm`: Apply makes the draft the range."
15975
+ },
15976
+ {
15977
+ "kind": "method",
15978
+ "name": "#cancel",
15979
+ "privacy": "private"
15980
+ },
15834
15981
  {
15835
15982
  "kind": "method",
15836
15983
  "name": "#focusTrigger",
@@ -16101,6 +16248,33 @@
16101
16248
  "description": "Preset ranges shown beside the calendar: keys (`today`, `yesterday`, `last-7-days`, `last-30-days`, `last-90-days`,\n`this-month`, `last-month`) or `{ label, start, end }` objects. In HTML, a space-separated list of keys.",
16102
16249
  "fieldName": "presets"
16103
16250
  },
16251
+ {
16252
+ "name": "preset",
16253
+ "type": {
16254
+ "text": "string"
16255
+ },
16256
+ "default": "''",
16257
+ "description": "Key of the preset the range came from (`last-7-days`), or empty for dates picked or typed. Set it to a key to\nchoose that range relative to today, e.g. a report that opens on \"Last 28 days\"; the picker keeps it up to date\nwhen people change the range. The key need not be in `presets`.",
16258
+ "fieldName": "preset"
16259
+ },
16260
+ {
16261
+ "name": "months",
16262
+ "type": {
16263
+ "text": "number"
16264
+ },
16265
+ "default": "1",
16266
+ "description": "Months shown side by side in the calendar: 1 (default) or 2. Phones (640px or narrower) always show one.",
16267
+ "fieldName": "months"
16268
+ },
16269
+ {
16270
+ "name": "confirm",
16271
+ "type": {
16272
+ "text": "boolean"
16273
+ },
16274
+ "default": "false",
16275
+ "description": "Presets and dates picked in the calendar are a draft until Apply; Cancel, Escape or a click outside drop it.\nWithout it, choosing a preset or the end date changes the range at once.",
16276
+ "fieldName": "confirm"
16277
+ },
16104
16278
  {
16105
16279
  "name": "start-label",
16106
16280
  "type": {
@@ -16201,6 +16375,23 @@
16201
16375
  "default": "null",
16202
16376
  "fieldName": "_hover"
16203
16377
  },
16378
+ {
16379
+ "name": "_view",
16380
+ "type": {
16381
+ "text": "Date"
16382
+ },
16383
+ "description": "First month shown.",
16384
+ "fieldName": "_view"
16385
+ },
16386
+ {
16387
+ "name": "_draftPreset",
16388
+ "type": {
16389
+ "text": "string"
16390
+ },
16391
+ "default": "''",
16392
+ "description": "With `confirm`: the preset key of the draft range.",
16393
+ "fieldName": "_draftPreset"
16394
+ },
16204
16395
  {
16205
16396
  "name": "strings",
16206
16397
  "type": {
@@ -34321,6 +34512,17 @@
34321
34512
  "description": "Native autocomplete hint, e.g. `email`, `postal-code`.",
34322
34513
  "attribute": "autocomplete"
34323
34514
  },
34515
+ {
34516
+ "kind": "field",
34517
+ "name": "inputMode",
34518
+ "privacy": "public",
34519
+ "type": {
34520
+ "text": "string"
34521
+ },
34522
+ "default": "''",
34523
+ "description": "Which on-screen keyboard phones open: `email`, `url`, `tel`, `numeric`, `decimal`, `search` or `text`, passed to the\ninner input. Use it with `type=\"text\"` when your own check replaces the browser's (for example an email rule that\nmatches your server), so the box still opens the right keyboard. Since 1.15.",
34524
+ "attribute": "inputmode"
34525
+ },
34324
34526
  {
34325
34527
  "kind": "field",
34326
34528
  "name": "size",
@@ -34774,6 +34976,15 @@
34774
34976
  "description": "Native autocomplete hint, e.g. `email`, `postal-code`.",
34775
34977
  "fieldName": "autocomplete"
34776
34978
  },
34979
+ {
34980
+ "name": "inputmode",
34981
+ "type": {
34982
+ "text": "string"
34983
+ },
34984
+ "default": "''",
34985
+ "description": "Which on-screen keyboard phones open: `email`, `url`, `tel`, `numeric`, `decimal`, `search` or `text`, passed to the\ninner input. Use it with `type=\"text\"` when your own check replaces the browser's (for example an email rule that\nmatches your server), so the box still opens the right keyboard. Since 1.15.",
34986
+ "fieldName": "inputMode"
34987
+ },
34777
34988
  {
34778
34989
  "name": "size",
34779
34990
  "type": {
@@ -35110,6 +35321,819 @@
35110
35321
  }
35111
35322
  ]
35112
35323
  },
35324
+ {
35325
+ "kind": "javascript-module",
35326
+ "path": "src/components/time-picker.ts",
35327
+ "declarations": [
35328
+ {
35329
+ "kind": "class",
35330
+ "description": "Time field: type a time or choose one from a list. Shows the 12-hour clock with am/pm or the 24-hour clock,\nfollowing the locale or `hour-cycle`; the value is always 24-hour ISO `hh:mm`. Follows the WAI-ARIA APG\n\"combobox\" pattern (a text box with a list of suggested times; any time can be typed). Participates in native forms.",
35331
+ "name": "CmTimePicker",
35332
+ "cssParts": [
35333
+ {
35334
+ "description": "The visible label.",
35335
+ "name": "label"
35336
+ },
35337
+ {
35338
+ "description": "The bordered box around the input and the clock button.",
35339
+ "name": "box"
35340
+ },
35341
+ {
35342
+ "description": "The text input.",
35343
+ "name": "input"
35344
+ },
35345
+ {
35346
+ "description": "The clock button.",
35347
+ "name": "trigger"
35348
+ },
35349
+ {
35350
+ "description": "The dropdown that holds the list.",
35351
+ "name": "popover"
35352
+ },
35353
+ {
35354
+ "description": "The list of times.",
35355
+ "name": "listbox"
35356
+ }
35357
+ ],
35358
+ "members": [
35359
+ {
35360
+ "kind": "field",
35361
+ "name": "formAssociated",
35362
+ "type": {
35363
+ "text": "boolean"
35364
+ },
35365
+ "static": true,
35366
+ "default": "true"
35367
+ },
35368
+ {
35369
+ "kind": "field",
35370
+ "name": "shadowRootOptions",
35371
+ "type": {
35372
+ "text": "object"
35373
+ },
35374
+ "static": true,
35375
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true }"
35376
+ },
35377
+ {
35378
+ "kind": "field",
35379
+ "name": "label",
35380
+ "privacy": "public",
35381
+ "type": {
35382
+ "text": "string"
35383
+ },
35384
+ "default": "''",
35385
+ "description": "Visible label above the box, e.g. \"Pickup time\". Required for accessibility unless the element has an aria-label.",
35386
+ "attribute": "label"
35387
+ },
35388
+ {
35389
+ "kind": "field",
35390
+ "name": "helpText",
35391
+ "privacy": "public",
35392
+ "type": {
35393
+ "text": "string"
35394
+ },
35395
+ "default": "''",
35396
+ "description": "One sentence under the box in text-tertiary.",
35397
+ "attribute": "help-text"
35398
+ },
35399
+ {
35400
+ "kind": "field",
35401
+ "name": "error",
35402
+ "privacy": "public",
35403
+ "type": {
35404
+ "text": "string"
35405
+ },
35406
+ "default": "''",
35407
+ "description": "Error message; turns the border critical and sets aria-invalid.",
35408
+ "attribute": "error",
35409
+ "reflects": true
35410
+ },
35411
+ {
35412
+ "kind": "field",
35413
+ "name": "name",
35414
+ "privacy": "public",
35415
+ "type": {
35416
+ "text": "string"
35417
+ },
35418
+ "default": "''",
35419
+ "description": "Form field name.",
35420
+ "attribute": "name",
35421
+ "reflects": true
35422
+ },
35423
+ {
35424
+ "kind": "field",
35425
+ "name": "value",
35426
+ "privacy": "public",
35427
+ "type": {
35428
+ "text": "string"
35429
+ },
35430
+ "default": "''",
35431
+ "description": "The time as 24-hour ISO `hh:mm` (`15:30`), whichever clock is shown; empty when not set.",
35432
+ "attribute": "value"
35433
+ },
35434
+ {
35435
+ "kind": "field",
35436
+ "name": "placeholder",
35437
+ "privacy": "public",
35438
+ "type": {
35439
+ "text": "string"
35440
+ },
35441
+ "default": "''",
35442
+ "description": "Placeholder. Default: the format, e.g. \"hh:mm am\" or \"hh:mm\".",
35443
+ "attribute": "placeholder"
35444
+ },
35445
+ {
35446
+ "kind": "field",
35447
+ "name": "min",
35448
+ "privacy": "public",
35449
+ "type": {
35450
+ "text": "string"
35451
+ },
35452
+ "default": "''",
35453
+ "description": "Earliest time that can be chosen, `hh:mm`. The list starts here.",
35454
+ "attribute": "min"
35455
+ },
35456
+ {
35457
+ "kind": "field",
35458
+ "name": "max",
35459
+ "privacy": "public",
35460
+ "type": {
35461
+ "text": "string"
35462
+ },
35463
+ "default": "''",
35464
+ "description": "Latest time that can be chosen, `hh:mm`. The list ends here.",
35465
+ "attribute": "max"
35466
+ },
35467
+ {
35468
+ "kind": "field",
35469
+ "name": "step",
35470
+ "privacy": "public",
35471
+ "type": {
35472
+ "text": "number"
35473
+ },
35474
+ "default": "1",
35475
+ "description": "Minutes between allowed times, counted from midnight (15 allows :00, :15, :30, :45). A typed time off the step is invalid. Default 1.",
35476
+ "attribute": "step"
35477
+ },
35478
+ {
35479
+ "kind": "field",
35480
+ "name": "interval",
35481
+ "privacy": "public",
35482
+ "type": {
35483
+ "text": "number | undefined"
35484
+ },
35485
+ "description": "Minutes between the times in the list. Default: `step` when it is 5 or more, else 30. Any allowed time can still be typed.",
35486
+ "attribute": "interval"
35487
+ },
35488
+ {
35489
+ "kind": "field",
35490
+ "name": "hourCycle",
35491
+ "privacy": "public",
35492
+ "type": {
35493
+ "text": "'' | 'h12' | 'h23'"
35494
+ },
35495
+ "default": "''",
35496
+ "description": "`h12` (am/pm) or `h23` (24-hour) to force a clock. Empty: the locale's clock (12-hour for `en-IN` and `en-US`, 24-hour for `en-GB` and most of Europe).",
35497
+ "attribute": "hour-cycle"
35498
+ },
35499
+ {
35500
+ "kind": "field",
35501
+ "name": "#localeProp",
35502
+ "privacy": "private",
35503
+ "type": {
35504
+ "text": "string"
35505
+ },
35506
+ "default": "''"
35507
+ },
35508
+ {
35509
+ "kind": "field",
35510
+ "name": "locale",
35511
+ "privacy": "protected",
35512
+ "description": "BCP 47 language for the clock and am/pm words. Empty: the same language as every other component.",
35513
+ "readonly": true,
35514
+ "type": {
35515
+ "text": "string"
35516
+ },
35517
+ "attribute": "locale",
35518
+ "inheritedFrom": {
35519
+ "name": "CmLocalizedElement",
35520
+ "module": "src/localize.ts"
35521
+ }
35522
+ },
35523
+ {
35524
+ "kind": "field",
35525
+ "name": "required",
35526
+ "privacy": "public",
35527
+ "type": {
35528
+ "text": "boolean"
35529
+ },
35530
+ "default": "false",
35531
+ "description": "The form will not submit until a time is set.",
35532
+ "attribute": "required",
35533
+ "reflects": true
35534
+ },
35535
+ {
35536
+ "kind": "field",
35537
+ "name": "disabled",
35538
+ "privacy": "public",
35539
+ "type": {
35540
+ "text": "boolean"
35541
+ },
35542
+ "default": "false",
35543
+ "description": "Blocks interaction. Also set by a disabled `<fieldset>`.",
35544
+ "attribute": "disabled",
35545
+ "reflects": true
35546
+ },
35547
+ {
35548
+ "kind": "field",
35549
+ "name": "open",
35550
+ "privacy": "public",
35551
+ "type": {
35552
+ "text": "boolean"
35553
+ },
35554
+ "default": "false",
35555
+ "description": "Whether the list of times is showing.",
35556
+ "attribute": "open",
35557
+ "reflects": true
35558
+ },
35559
+ {
35560
+ "kind": "field",
35561
+ "name": "size",
35562
+ "privacy": "public",
35563
+ "type": {
35564
+ "text": "'default' | 'medium' | 'small'"
35565
+ },
35566
+ "default": "'default'",
35567
+ "description": "`small`: a 32px box (filter rows); `medium`: 36px. Default 40px. On touch screens all are 44px.",
35568
+ "attribute": "size",
35569
+ "reflects": true
35570
+ },
35571
+ {
35572
+ "kind": "field",
35573
+ "name": "_text",
35574
+ "privacy": "public",
35575
+ "type": {
35576
+ "text": "string"
35577
+ },
35578
+ "default": "''",
35579
+ "attribute": "_text"
35580
+ },
35581
+ {
35582
+ "kind": "field",
35583
+ "name": "_active",
35584
+ "privacy": "public",
35585
+ "type": {
35586
+ "text": "number"
35587
+ },
35588
+ "default": "-1",
35589
+ "description": "Index of the keyboard-active time in the list, or -1.",
35590
+ "attribute": "_active"
35591
+ },
35592
+ {
35593
+ "kind": "field",
35594
+ "name": "#internals",
35595
+ "privacy": "private"
35596
+ },
35597
+ {
35598
+ "kind": "field",
35599
+ "name": "#v",
35600
+ "privacy": "private",
35601
+ "default": "new FieldValidity(this, this.#internals)"
35602
+ },
35603
+ {
35604
+ "kind": "field",
35605
+ "name": "#id",
35606
+ "privacy": "private"
35607
+ },
35608
+ {
35609
+ "kind": "field",
35610
+ "name": "#default",
35611
+ "privacy": "private",
35612
+ "type": {
35613
+ "text": "string | null"
35614
+ },
35615
+ "default": "null"
35616
+ },
35617
+ {
35618
+ "kind": "field",
35619
+ "name": "#keepText",
35620
+ "privacy": "private",
35621
+ "type": {
35622
+ "text": "boolean"
35623
+ },
35624
+ "default": "false"
35625
+ },
35626
+ {
35627
+ "kind": "field",
35628
+ "name": "#layer",
35629
+ "privacy": "private",
35630
+ "default": "new TopLayer()"
35631
+ },
35632
+ {
35633
+ "kind": "field",
35634
+ "name": "#locale",
35635
+ "privacy": "private",
35636
+ "readonly": true
35637
+ },
35638
+ {
35639
+ "kind": "field",
35640
+ "name": "#tf",
35641
+ "privacy": "private",
35642
+ "type": {
35643
+ "text": "TimeFormat"
35644
+ },
35645
+ "readonly": true
35646
+ },
35647
+ {
35648
+ "kind": "field",
35649
+ "name": "#stepMinutes",
35650
+ "privacy": "private",
35651
+ "readonly": true
35652
+ },
35653
+ {
35654
+ "kind": "field",
35655
+ "name": "#listEvery",
35656
+ "privacy": "private",
35657
+ "readonly": true
35658
+ },
35659
+ {
35660
+ "kind": "field",
35661
+ "name": "#pattern",
35662
+ "privacy": "private",
35663
+ "readonly": true
35664
+ },
35665
+ {
35666
+ "kind": "method",
35667
+ "name": "#format",
35668
+ "privacy": "private",
35669
+ "parameters": [
35670
+ {
35671
+ "name": "v",
35672
+ "type": {
35673
+ "text": "string"
35674
+ }
35675
+ }
35676
+ ]
35677
+ },
35678
+ {
35679
+ "kind": "field",
35680
+ "name": "#times",
35681
+ "privacy": "private",
35682
+ "type": {
35683
+ "text": "number[]"
35684
+ },
35685
+ "description": "The times in the list, as minutes since midnight: every `interval` from `min` (or midnight) to `max`, on the step.",
35686
+ "readonly": true
35687
+ },
35688
+ {
35689
+ "kind": "field",
35690
+ "name": "valueAsNumber",
35691
+ "type": {
35692
+ "text": "number | null"
35693
+ },
35694
+ "description": "The value as minutes since midnight, or null.",
35695
+ "readonly": true
35696
+ },
35697
+ {
35698
+ "kind": "field",
35699
+ "name": "form",
35700
+ "readonly": true
35701
+ },
35702
+ {
35703
+ "kind": "field",
35704
+ "name": "validity",
35705
+ "readonly": true
35706
+ },
35707
+ {
35708
+ "kind": "field",
35709
+ "name": "validationMessage",
35710
+ "readonly": true
35711
+ },
35712
+ {
35713
+ "kind": "method",
35714
+ "name": "checkValidity"
35715
+ },
35716
+ {
35717
+ "kind": "method",
35718
+ "name": "reportValidity"
35719
+ },
35720
+ {
35721
+ "kind": "method",
35722
+ "name": "formResetCallback"
35723
+ },
35724
+ {
35725
+ "kind": "method",
35726
+ "name": "formDisabledCallback",
35727
+ "parameters": [
35728
+ {
35729
+ "name": "d",
35730
+ "type": {
35731
+ "text": "boolean"
35732
+ }
35733
+ }
35734
+ ]
35735
+ },
35736
+ {
35737
+ "kind": "method",
35738
+ "name": "formStateRestoreCallback",
35739
+ "parameters": [
35740
+ {
35741
+ "name": "state",
35742
+ "type": {
35743
+ "text": "string"
35744
+ }
35745
+ }
35746
+ ]
35747
+ },
35748
+ {
35749
+ "kind": "method",
35750
+ "name": "show",
35751
+ "description": "Shows the list of times, with the chosen time (or the one nearest to now) active and scrolled into view."
35752
+ },
35753
+ {
35754
+ "kind": "method",
35755
+ "name": "close",
35756
+ "description": "Hides the list without changing the time."
35757
+ },
35758
+ {
35759
+ "kind": "method",
35760
+ "name": "#now",
35761
+ "privacy": "private"
35762
+ },
35763
+ {
35764
+ "kind": "method",
35765
+ "name": "#nearest",
35766
+ "privacy": "private",
35767
+ "parameters": [
35768
+ {
35769
+ "name": "t",
35770
+ "type": {
35771
+ "text": "string | null"
35772
+ }
35773
+ }
35774
+ ],
35775
+ "description": "Index of the first listed time at or after `t` (the last one if none), or -1 for an empty list."
35776
+ },
35777
+ {
35778
+ "kind": "method",
35779
+ "name": "#scrollToActive",
35780
+ "privacy": "private",
35781
+ "parameters": [
35782
+ {
35783
+ "name": "center",
35784
+ "type": {
35785
+ "text": "boolean"
35786
+ }
35787
+ }
35788
+ ],
35789
+ "description": "Keeps the active time in view: in the middle of the list when it opens, else just inside its edge. Only the list scrolls."
35790
+ },
35791
+ {
35792
+ "kind": "method",
35793
+ "name": "#setValue",
35794
+ "privacy": "private",
35795
+ "parameters": [
35796
+ {
35797
+ "name": "v",
35798
+ "type": {
35799
+ "text": "string"
35800
+ }
35801
+ }
35802
+ ]
35803
+ },
35804
+ {
35805
+ "kind": "method",
35806
+ "name": "#commitText",
35807
+ "privacy": "private",
35808
+ "description": "Reads the typed text: a real time becomes the value, shown in the field's clock; anything else stays as typed and is invalid."
35809
+ },
35810
+ {
35811
+ "kind": "method",
35812
+ "name": "#pick",
35813
+ "privacy": "private",
35814
+ "parameters": [
35815
+ {
35816
+ "name": "minutes",
35817
+ "type": {
35818
+ "text": "number"
35819
+ }
35820
+ }
35821
+ ]
35822
+ },
35823
+ {
35824
+ "kind": "field",
35825
+ "name": "#onKey",
35826
+ "privacy": "private"
35827
+ },
35828
+ {
35829
+ "kind": "field",
35830
+ "name": "#onInput",
35831
+ "privacy": "private"
35832
+ },
35833
+ {
35834
+ "kind": "field",
35835
+ "name": "#toggle",
35836
+ "privacy": "private"
35837
+ },
35838
+ {
35839
+ "kind": "field",
35840
+ "name": "#onOutside",
35841
+ "privacy": "private"
35842
+ },
35843
+ {
35844
+ "kind": "method",
35845
+ "name": "finalize",
35846
+ "static": true,
35847
+ "description": "A property declared with `string: 'key'` (e.g. `saveLabel: { attribute: 'save-label', string: 'save' }`) reads\nas that built-in string until it is set, so `el.saveLabel` is \"Save\" in English and the translation elsewhere.\nSetting it overrides the string for this element; setting `undefined` goes back to the built-in one.",
35848
+ "inheritedFrom": {
35849
+ "name": "CmLocalizedElement",
35850
+ "module": "src/localize.ts"
35851
+ }
35852
+ },
35853
+ {
35854
+ "kind": "field",
35855
+ "name": "strings",
35856
+ "privacy": "public",
35857
+ "type": {
35858
+ "text": "Record<string, Message> | null | undefined"
35859
+ },
35860
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
35861
+ "attribute": "strings",
35862
+ "inheritedFrom": {
35863
+ "name": "CmLocalizedElement",
35864
+ "module": "src/localize.ts"
35865
+ }
35866
+ },
35867
+ {
35868
+ "kind": "field",
35869
+ "name": "stringsNamespace",
35870
+ "privacy": "protected",
35871
+ "description": "The string namespace: the tag name without `cm-`, in camelCase.",
35872
+ "readonly": true,
35873
+ "inheritedFrom": {
35874
+ "name": "CmLocalizedElement",
35875
+ "module": "src/localize.ts"
35876
+ }
35877
+ },
35878
+ {
35879
+ "kind": "method",
35880
+ "name": "t",
35881
+ "privacy": "protected",
35882
+ "parameters": [
35883
+ {
35884
+ "name": "key",
35885
+ "type": {
35886
+ "text": "string"
35887
+ }
35888
+ },
35889
+ {
35890
+ "name": "vars",
35891
+ "optional": true,
35892
+ "type": {
35893
+ "text": "MessageVars"
35894
+ }
35895
+ }
35896
+ ],
35897
+ "description": "The component's text for `key`, in its language, with `{placeholders}` filled from `vars`.",
35898
+ "inheritedFrom": {
35899
+ "name": "CmLocalizedElement",
35900
+ "module": "src/localize.ts"
35901
+ }
35902
+ },
35903
+ {
35904
+ "kind": "method",
35905
+ "name": "formatNumber",
35906
+ "privacy": "protected",
35907
+ "parameters": [
35908
+ {
35909
+ "name": "n",
35910
+ "type": {
35911
+ "text": "number"
35912
+ }
35913
+ },
35914
+ {
35915
+ "name": "options",
35916
+ "optional": true,
35917
+ "type": {
35918
+ "text": "Intl.NumberFormatOptions"
35919
+ }
35920
+ }
35921
+ ],
35922
+ "description": "A number formatted for the component's locale.",
35923
+ "inheritedFrom": {
35924
+ "name": "CmLocalizedElement",
35925
+ "module": "src/localize.ts"
35926
+ }
35927
+ }
35928
+ ],
35929
+ "events": [
35930
+ {
35931
+ "name": "input",
35932
+ "type": {
35933
+ "text": "Event"
35934
+ },
35935
+ "description": "Same moment as `change`."
35936
+ },
35937
+ {
35938
+ "name": "change",
35939
+ "type": {
35940
+ "text": "Event"
35941
+ },
35942
+ "description": "When the time changes: a time chosen from the list, or typed text read on Enter or on leaving the box."
35943
+ }
35944
+ ],
35945
+ "attributes": [
35946
+ {
35947
+ "name": "label",
35948
+ "type": {
35949
+ "text": "string"
35950
+ },
35951
+ "default": "''",
35952
+ "description": "Visible label above the box, e.g. \"Pickup time\". Required for accessibility unless the element has an aria-label.",
35953
+ "fieldName": "label"
35954
+ },
35955
+ {
35956
+ "name": "help-text",
35957
+ "type": {
35958
+ "text": "string"
35959
+ },
35960
+ "default": "''",
35961
+ "description": "One sentence under the box in text-tertiary.",
35962
+ "fieldName": "helpText"
35963
+ },
35964
+ {
35965
+ "name": "error",
35966
+ "type": {
35967
+ "text": "string"
35968
+ },
35969
+ "default": "''",
35970
+ "description": "Error message; turns the border critical and sets aria-invalid.",
35971
+ "fieldName": "error"
35972
+ },
35973
+ {
35974
+ "name": "name",
35975
+ "type": {
35976
+ "text": "string"
35977
+ },
35978
+ "default": "''",
35979
+ "description": "Form field name.",
35980
+ "fieldName": "name"
35981
+ },
35982
+ {
35983
+ "name": "value",
35984
+ "type": {
35985
+ "text": "string"
35986
+ },
35987
+ "default": "''",
35988
+ "description": "The time as 24-hour ISO `hh:mm` (`15:30`), whichever clock is shown; empty when not set.",
35989
+ "fieldName": "value"
35990
+ },
35991
+ {
35992
+ "name": "placeholder",
35993
+ "type": {
35994
+ "text": "string"
35995
+ },
35996
+ "default": "''",
35997
+ "description": "Placeholder. Default: the format, e.g. \"hh:mm am\" or \"hh:mm\".",
35998
+ "fieldName": "placeholder"
35999
+ },
36000
+ {
36001
+ "name": "min",
36002
+ "type": {
36003
+ "text": "string"
36004
+ },
36005
+ "default": "''",
36006
+ "description": "Earliest time that can be chosen, `hh:mm`. The list starts here.",
36007
+ "fieldName": "min"
36008
+ },
36009
+ {
36010
+ "name": "max",
36011
+ "type": {
36012
+ "text": "string"
36013
+ },
36014
+ "default": "''",
36015
+ "description": "Latest time that can be chosen, `hh:mm`. The list ends here.",
36016
+ "fieldName": "max"
36017
+ },
36018
+ {
36019
+ "name": "step",
36020
+ "type": {
36021
+ "text": "number"
36022
+ },
36023
+ "default": "1",
36024
+ "description": "Minutes between allowed times, counted from midnight (15 allows :00, :15, :30, :45). A typed time off the step is invalid. Default 1.",
36025
+ "fieldName": "step"
36026
+ },
36027
+ {
36028
+ "name": "interval",
36029
+ "type": {
36030
+ "text": "number | undefined"
36031
+ },
36032
+ "description": "Minutes between the times in the list. Default: `step` when it is 5 or more, else 30. Any allowed time can still be typed.",
36033
+ "fieldName": "interval"
36034
+ },
36035
+ {
36036
+ "name": "hour-cycle",
36037
+ "type": {
36038
+ "text": "'' | 'h12' | 'h23'"
36039
+ },
36040
+ "default": "''",
36041
+ "description": "`h12` (am/pm) or `h23` (24-hour) to force a clock. Empty: the locale's clock (12-hour for `en-IN` and `en-US`, 24-hour for `en-GB` and most of Europe).",
36042
+ "fieldName": "hourCycle"
36043
+ },
36044
+ {
36045
+ "name": "locale",
36046
+ "type": {
36047
+ "text": "string"
36048
+ },
36049
+ "description": "BCP 47 language for the clock and am/pm words. Empty: the same language as every other component.",
36050
+ "fieldName": "locale"
36051
+ },
36052
+ {
36053
+ "name": "required",
36054
+ "type": {
36055
+ "text": "boolean"
36056
+ },
36057
+ "default": "false",
36058
+ "description": "The form will not submit until a time is set.",
36059
+ "fieldName": "required"
36060
+ },
36061
+ {
36062
+ "name": "disabled",
36063
+ "type": {
36064
+ "text": "boolean"
36065
+ },
36066
+ "default": "false",
36067
+ "description": "Blocks interaction. Also set by a disabled `<fieldset>`.",
36068
+ "fieldName": "disabled"
36069
+ },
36070
+ {
36071
+ "name": "open",
36072
+ "type": {
36073
+ "text": "boolean"
36074
+ },
36075
+ "default": "false",
36076
+ "description": "Whether the list of times is showing.",
36077
+ "fieldName": "open"
36078
+ },
36079
+ {
36080
+ "name": "size",
36081
+ "type": {
36082
+ "text": "'default' | 'medium' | 'small'"
36083
+ },
36084
+ "default": "'default'",
36085
+ "description": "`small`: a 32px box (filter rows); `medium`: 36px. Default 40px. On touch screens all are 44px.",
36086
+ "fieldName": "size"
36087
+ },
36088
+ {
36089
+ "name": "_text",
36090
+ "type": {
36091
+ "text": "string"
36092
+ },
36093
+ "default": "''",
36094
+ "fieldName": "_text"
36095
+ },
36096
+ {
36097
+ "name": "_active",
36098
+ "type": {
36099
+ "text": "number"
36100
+ },
36101
+ "default": "-1",
36102
+ "description": "Index of the keyboard-active time in the list, or -1.",
36103
+ "fieldName": "_active"
36104
+ },
36105
+ {
36106
+ "name": "strings",
36107
+ "type": {
36108
+ "text": "Record<string, Message> | null | undefined"
36109
+ },
36110
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
36111
+ "fieldName": "strings",
36112
+ "inheritedFrom": {
36113
+ "name": "CmLocalizedElement",
36114
+ "module": "src/localize.ts"
36115
+ }
36116
+ }
36117
+ ],
36118
+ "superclass": {
36119
+ "name": "CmLocalizedElement",
36120
+ "module": "/src/localize.js"
36121
+ },
36122
+ "tagName": "cm-time-picker",
36123
+ "customElement": true
36124
+ }
36125
+ ],
36126
+ "exports": [
36127
+ {
36128
+ "kind": "js",
36129
+ "name": "CmTimePicker",
36130
+ "declaration": {
36131
+ "name": "CmTimePicker",
36132
+ "module": "src/components/time-picker.ts"
36133
+ }
36134
+ }
36135
+ ]
36136
+ },
35113
36137
  {
35114
36138
  "kind": "javascript-module",
35115
36139
  "path": "src/components/timeline.ts",