@commmerce/ui 1.17.1 → 1.19.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/README.md +2 -0
- package/dist/calendar.d.ts +5 -0
- package/dist/calendar.js +9 -4
- package/dist/cdn.js +709 -586
- package/dist/components/account-menu.js +1 -1
- package/dist/components/bottom-navigation.js +5 -2
- package/dist/components/button.d.ts +5 -2
- package/dist/components/button.js +8 -1
- package/dist/components/date-range-picker.d.ts +28 -1
- package/dist/components/date-range-picker.js +273 -14
- package/dist/components/mobile-menu.js +5 -0
- package/dist/custom-elements.json +190 -5
- package/package.json +79 -6
|
@@ -6286,10 +6286,10 @@
|
|
|
6286
6286
|
"name": "variant",
|
|
6287
6287
|
"privacy": "public",
|
|
6288
6288
|
"type": {
|
|
6289
|
-
"text": "'primary' | 'secondary'"
|
|
6289
|
+
"text": "'primary' | 'secondary' | 'tertiary'"
|
|
6290
6290
|
},
|
|
6291
6291
|
"default": "'secondary'",
|
|
6292
|
-
"description": "`primary` = black fill (one per group); `secondary` = white fill with a grey outline, like a field (since 1.5; was a black outline).",
|
|
6292
|
+
"description": "`primary` = black fill (one per group); `secondary` = white fill with a grey outline, like a field (since 1.5; was a black outline);\n`tertiary` (since 1.19) = no fill and no outline until hovered, for icon buttons in a header bar or a column heading.",
|
|
6293
6293
|
"attribute": "variant",
|
|
6294
6294
|
"reflects": true
|
|
6295
6295
|
},
|
|
@@ -6542,10 +6542,10 @@
|
|
|
6542
6542
|
{
|
|
6543
6543
|
"name": "variant",
|
|
6544
6544
|
"type": {
|
|
6545
|
-
"text": "'primary' | 'secondary'"
|
|
6545
|
+
"text": "'primary' | 'secondary' | 'tertiary'"
|
|
6546
6546
|
},
|
|
6547
6547
|
"default": "'secondary'",
|
|
6548
|
-
"description": "`primary` = black fill (one per group); `secondary` = white fill with a grey outline, like a field (since 1.5; was a black outline).",
|
|
6548
|
+
"description": "`primary` = black fill (one per group); `secondary` = white fill with a grey outline, like a field (since 1.5; was a black outline);\n`tertiary` (since 1.19) = no fill and no outline until hovered, for icon buttons in a header bar or a column heading.",
|
|
6549
6549
|
"fieldName": "variant"
|
|
6550
6550
|
},
|
|
6551
6551
|
{
|
|
@@ -16808,6 +16808,18 @@
|
|
|
16808
16808
|
"attribute": "confirm",
|
|
16809
16809
|
"reflects": true
|
|
16810
16810
|
},
|
|
16811
|
+
{
|
|
16812
|
+
"kind": "field",
|
|
16813
|
+
"name": "variant",
|
|
16814
|
+
"privacy": "public",
|
|
16815
|
+
"type": {
|
|
16816
|
+
"text": "'' | 'report'"
|
|
16817
|
+
},
|
|
16818
|
+
"default": "''",
|
|
16819
|
+
"description": "`report` (since 1.18): the layout for report and dashboard pages. The field is one button that shows the preset\nand the range (\"Last 28 days · 23 Oct – 19 Nov 2026\"); the popup has the presets on the left (\"Custom\" first, each\nwith its dates), start and end date boxes, months to scroll through, and Cancel and Apply. It always works as with\n`confirm`. Without `presets` it lists custom, today, yesterday, this week, last 7 days, last week, last 28 days,\nlast 30 days, this month, last month, last 90 days, quarter to date and this year.",
|
|
16820
|
+
"attribute": "variant",
|
|
16821
|
+
"reflects": true
|
|
16822
|
+
},
|
|
16811
16823
|
{
|
|
16812
16824
|
"kind": "field",
|
|
16813
16825
|
"name": "startLabel",
|
|
@@ -16957,6 +16969,27 @@
|
|
|
16957
16969
|
"description": "With `confirm`: the preset key of the draft range.",
|
|
16958
16970
|
"attribute": "_draftPreset"
|
|
16959
16971
|
},
|
|
16972
|
+
{
|
|
16973
|
+
"kind": "field",
|
|
16974
|
+
"name": "_dStartText",
|
|
16975
|
+
"privacy": "public",
|
|
16976
|
+
"type": {
|
|
16977
|
+
"text": "string"
|
|
16978
|
+
},
|
|
16979
|
+
"default": "''",
|
|
16980
|
+
"description": "`variant=\"report\"`: the text in the popup's start and end boxes (the draft, or what is being typed).",
|
|
16981
|
+
"attribute": "_dStartText"
|
|
16982
|
+
},
|
|
16983
|
+
{
|
|
16984
|
+
"kind": "field",
|
|
16985
|
+
"name": "_dEndText",
|
|
16986
|
+
"privacy": "public",
|
|
16987
|
+
"type": {
|
|
16988
|
+
"text": "string"
|
|
16989
|
+
},
|
|
16990
|
+
"default": "''",
|
|
16991
|
+
"attribute": "_dEndText"
|
|
16992
|
+
},
|
|
16960
16993
|
{
|
|
16961
16994
|
"kind": "field",
|
|
16962
16995
|
"name": "#internals",
|
|
@@ -17020,6 +17053,28 @@
|
|
|
17020
17053
|
},
|
|
17021
17054
|
"default": "false"
|
|
17022
17055
|
},
|
|
17056
|
+
{
|
|
17057
|
+
"kind": "field",
|
|
17058
|
+
"name": "#scrollMonths",
|
|
17059
|
+
"privacy": "private",
|
|
17060
|
+
"type": {
|
|
17061
|
+
"text": "boolean"
|
|
17062
|
+
},
|
|
17063
|
+
"default": "false",
|
|
17064
|
+
"description": "`variant=\"report\"`: scroll the months so the draft's first month is at the top after the next render."
|
|
17065
|
+
},
|
|
17066
|
+
{
|
|
17067
|
+
"kind": "field",
|
|
17068
|
+
"name": "#report",
|
|
17069
|
+
"privacy": "private",
|
|
17070
|
+
"readonly": true
|
|
17071
|
+
},
|
|
17072
|
+
{
|
|
17073
|
+
"kind": "field",
|
|
17074
|
+
"name": "#confirming",
|
|
17075
|
+
"privacy": "private",
|
|
17076
|
+
"readonly": true
|
|
17077
|
+
},
|
|
17023
17078
|
{
|
|
17024
17079
|
"kind": "field",
|
|
17025
17080
|
"name": "#locale",
|
|
@@ -17097,6 +17152,12 @@
|
|
|
17097
17152
|
"name": "show",
|
|
17098
17153
|
"description": "Opens the calendar."
|
|
17099
17154
|
},
|
|
17155
|
+
{
|
|
17156
|
+
"kind": "method",
|
|
17157
|
+
"name": "#syncDraftText",
|
|
17158
|
+
"privacy": "private",
|
|
17159
|
+
"description": "`variant=\"report\"`: the popup's date boxes show the draft."
|
|
17160
|
+
},
|
|
17100
17161
|
{
|
|
17101
17162
|
"kind": "field",
|
|
17102
17163
|
"name": "#monthCount",
|
|
@@ -17118,6 +17179,16 @@
|
|
|
17118
17179
|
],
|
|
17119
17180
|
"description": "Moves the months shown so `d` is in view."
|
|
17120
17181
|
},
|
|
17182
|
+
{
|
|
17183
|
+
"kind": "field",
|
|
17184
|
+
"name": "#presetList",
|
|
17185
|
+
"privacy": "private",
|
|
17186
|
+
"type": {
|
|
17187
|
+
"text": "Array<DateRangePresetKey | DateRangePreset>"
|
|
17188
|
+
},
|
|
17189
|
+
"description": "The listed presets, resolved relative to today, without `custom`.",
|
|
17190
|
+
"readonly": true
|
|
17191
|
+
},
|
|
17121
17192
|
{
|
|
17122
17193
|
"kind": "field",
|
|
17123
17194
|
"name": "#listed",
|
|
@@ -17125,7 +17196,6 @@
|
|
|
17125
17196
|
"type": {
|
|
17126
17197
|
"text": "ListedPreset[]"
|
|
17127
17198
|
},
|
|
17128
|
-
"description": "The listed presets, resolved relative to today, without `custom`.",
|
|
17129
17199
|
"readonly": true
|
|
17130
17200
|
},
|
|
17131
17201
|
{
|
|
@@ -17269,6 +17339,34 @@
|
|
|
17269
17339
|
"privacy": "private",
|
|
17270
17340
|
"description": "With `confirm`: Apply makes the draft the range."
|
|
17271
17341
|
},
|
|
17342
|
+
{
|
|
17343
|
+
"kind": "method",
|
|
17344
|
+
"name": "#commitDraftText",
|
|
17345
|
+
"privacy": "private",
|
|
17346
|
+
"parameters": [
|
|
17347
|
+
{
|
|
17348
|
+
"name": "which",
|
|
17349
|
+
"type": {
|
|
17350
|
+
"text": "'start' | 'end'"
|
|
17351
|
+
}
|
|
17352
|
+
}
|
|
17353
|
+
],
|
|
17354
|
+
"description": "`variant=\"report\"`: reads a typed start or end date into the draft. Text that isn't a date stays, marked invalid."
|
|
17355
|
+
},
|
|
17356
|
+
{
|
|
17357
|
+
"kind": "method",
|
|
17358
|
+
"name": "#draftBad",
|
|
17359
|
+
"privacy": "private",
|
|
17360
|
+
"parameters": [
|
|
17361
|
+
{
|
|
17362
|
+
"name": "which",
|
|
17363
|
+
"type": {
|
|
17364
|
+
"text": "'start' | 'end'"
|
|
17365
|
+
}
|
|
17366
|
+
}
|
|
17367
|
+
],
|
|
17368
|
+
"description": "A box of the report popup holds text that isn't an available date."
|
|
17369
|
+
},
|
|
17272
17370
|
{
|
|
17273
17371
|
"kind": "method",
|
|
17274
17372
|
"name": "#cancel",
|
|
@@ -17317,6 +17415,67 @@
|
|
|
17317
17415
|
}
|
|
17318
17416
|
]
|
|
17319
17417
|
},
|
|
17418
|
+
{
|
|
17419
|
+
"kind": "method",
|
|
17420
|
+
"name": "#span",
|
|
17421
|
+
"privacy": "private",
|
|
17422
|
+
"parameters": [
|
|
17423
|
+
{
|
|
17424
|
+
"name": "start",
|
|
17425
|
+
"type": {
|
|
17426
|
+
"text": "string"
|
|
17427
|
+
}
|
|
17428
|
+
},
|
|
17429
|
+
{
|
|
17430
|
+
"name": "end",
|
|
17431
|
+
"type": {
|
|
17432
|
+
"text": "string"
|
|
17433
|
+
}
|
|
17434
|
+
},
|
|
17435
|
+
{
|
|
17436
|
+
"name": "year",
|
|
17437
|
+
"type": {
|
|
17438
|
+
"text": "boolean"
|
|
17439
|
+
}
|
|
17440
|
+
}
|
|
17441
|
+
],
|
|
17442
|
+
"description": "A range as short text, e.g. \"23 Oct – 19 Nov 2026\", or one day when start and end are the same."
|
|
17443
|
+
},
|
|
17444
|
+
{
|
|
17445
|
+
"kind": "field",
|
|
17446
|
+
"name": "#reportMonths",
|
|
17447
|
+
"privacy": "private",
|
|
17448
|
+
"type": {
|
|
17449
|
+
"text": "Date[]"
|
|
17450
|
+
},
|
|
17451
|
+
"description": "`variant=\"report\"`: the months listed, a year before the range (or today) to two months after, within min and max.",
|
|
17452
|
+
"readonly": true
|
|
17453
|
+
},
|
|
17454
|
+
{
|
|
17455
|
+
"kind": "method",
|
|
17456
|
+
"name": "#renderReport",
|
|
17457
|
+
"privacy": "private",
|
|
17458
|
+
"parameters": [
|
|
17459
|
+
{
|
|
17460
|
+
"name": "name",
|
|
17461
|
+
"type": {
|
|
17462
|
+
"text": "string"
|
|
17463
|
+
}
|
|
17464
|
+
},
|
|
17465
|
+
{
|
|
17466
|
+
"name": "message",
|
|
17467
|
+
"type": {
|
|
17468
|
+
"text": "string"
|
|
17469
|
+
}
|
|
17470
|
+
},
|
|
17471
|
+
{
|
|
17472
|
+
"name": "described",
|
|
17473
|
+
"type": {
|
|
17474
|
+
"text": "string"
|
|
17475
|
+
}
|
|
17476
|
+
}
|
|
17477
|
+
]
|
|
17478
|
+
},
|
|
17320
17479
|
{
|
|
17321
17480
|
"kind": "method",
|
|
17322
17481
|
"name": "finalize",
|
|
@@ -17571,6 +17730,32 @@
|
|
|
17571
17730
|
"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.",
|
|
17572
17731
|
"fieldName": "confirm"
|
|
17573
17732
|
},
|
|
17733
|
+
{
|
|
17734
|
+
"name": "variant",
|
|
17735
|
+
"type": {
|
|
17736
|
+
"text": "'' | 'report'"
|
|
17737
|
+
},
|
|
17738
|
+
"default": "''",
|
|
17739
|
+
"description": "`report` (since 1.18): the layout for report and dashboard pages. The field is one button that shows the preset\nand the range (\"Last 28 days · 23 Oct – 19 Nov 2026\"); the popup has the presets on the left (\"Custom\" first, each\nwith its dates), start and end date boxes, months to scroll through, and Cancel and Apply. It always works as with\n`confirm`. Without `presets` it lists custom, today, yesterday, this week, last 7 days, last week, last 28 days,\nlast 30 days, this month, last month, last 90 days, quarter to date and this year.",
|
|
17740
|
+
"fieldName": "variant"
|
|
17741
|
+
},
|
|
17742
|
+
{
|
|
17743
|
+
"name": "_dStartText",
|
|
17744
|
+
"type": {
|
|
17745
|
+
"text": "string"
|
|
17746
|
+
},
|
|
17747
|
+
"default": "''",
|
|
17748
|
+
"description": "`variant=\"report\"`: the text in the popup's start and end boxes (the draft, or what is being typed).",
|
|
17749
|
+
"fieldName": "_dStartText"
|
|
17750
|
+
},
|
|
17751
|
+
{
|
|
17752
|
+
"name": "_dEndText",
|
|
17753
|
+
"type": {
|
|
17754
|
+
"text": "string"
|
|
17755
|
+
},
|
|
17756
|
+
"default": "''",
|
|
17757
|
+
"fieldName": "_dEndText"
|
|
17758
|
+
},
|
|
17574
17759
|
{
|
|
17575
17760
|
"name": "start-label",
|
|
17576
17761
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commmerce/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Commmerce UI web components: build apps that feel native to the Commmerce admin. Works in plain HTML, React, Vue and server-rendered pages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -42,21 +42,94 @@
|
|
|
42
42
|
"README.md"
|
|
43
43
|
],
|
|
44
44
|
"sideEffects": [
|
|
45
|
-
"./dist/components/*.js",
|
|
46
45
|
"./dist/index.js",
|
|
47
|
-
"./dist/cdn.js"
|
|
46
|
+
"./dist/cdn.js",
|
|
47
|
+
"./dist/components/accordion.js",
|
|
48
|
+
"./dist/components/account-menu.js",
|
|
49
|
+
"./dist/components/action-bar.js",
|
|
50
|
+
"./dist/components/action-menu.js",
|
|
51
|
+
"./dist/components/app-card.js",
|
|
52
|
+
"./dist/components/app-frame.js",
|
|
53
|
+
"./dist/components/avatar.js",
|
|
54
|
+
"./dist/components/badge.js",
|
|
55
|
+
"./dist/components/banner.js",
|
|
56
|
+
"./dist/components/board.js",
|
|
57
|
+
"./dist/components/bottom-navigation.js",
|
|
58
|
+
"./dist/components/bottom-sheet.js",
|
|
59
|
+
"./dist/components/button-group.js",
|
|
60
|
+
"./dist/components/button.js",
|
|
61
|
+
"./dist/components/calendar.js",
|
|
62
|
+
"./dist/components/card.js",
|
|
63
|
+
"./dist/components/checkbox.js",
|
|
64
|
+
"./dist/components/color-field.js",
|
|
65
|
+
"./dist/components/color-picker.js",
|
|
66
|
+
"./dist/components/combobox.js",
|
|
67
|
+
"./dist/components/command-palette.js",
|
|
68
|
+
"./dist/components/comment.js",
|
|
69
|
+
"./dist/components/data-table.js",
|
|
70
|
+
"./dist/components/date-picker.js",
|
|
71
|
+
"./dist/components/date-range-picker.js",
|
|
72
|
+
"./dist/components/empty-state.js",
|
|
73
|
+
"./dist/components/file-upload.js",
|
|
74
|
+
"./dist/components/filter-panel.js",
|
|
75
|
+
"./dist/components/flash-offer-bar.js",
|
|
76
|
+
"./dist/components/global-search.js",
|
|
77
|
+
"./dist/components/grid.js",
|
|
78
|
+
"./dist/components/header-bar.js",
|
|
79
|
+
"./dist/components/icon.js",
|
|
80
|
+
"./dist/components/info-panel.js",
|
|
81
|
+
"./dist/components/layout.js",
|
|
82
|
+
"./dist/components/link-tabs.js",
|
|
83
|
+
"./dist/components/menu-item.js",
|
|
84
|
+
"./dist/components/metric.js",
|
|
85
|
+
"./dist/components/mobile-menu.js",
|
|
86
|
+
"./dist/components/modal.js",
|
|
87
|
+
"./dist/components/nav-item.js",
|
|
88
|
+
"./dist/components/nested-list.js",
|
|
89
|
+
"./dist/components/notification-panel.js",
|
|
90
|
+
"./dist/components/option-group.js",
|
|
91
|
+
"./dist/components/page-header.js",
|
|
92
|
+
"./dist/components/page.js",
|
|
93
|
+
"./dist/components/pagination.js",
|
|
94
|
+
"./dist/components/progress-bar.js",
|
|
95
|
+
"./dist/components/radio.js",
|
|
96
|
+
"./dist/components/report-tile.js",
|
|
97
|
+
"./dist/components/resource-list.js",
|
|
98
|
+
"./dist/components/save-bar.js",
|
|
99
|
+
"./dist/components/search.js",
|
|
100
|
+
"./dist/components/segmented-control.js",
|
|
101
|
+
"./dist/components/select.js",
|
|
102
|
+
"./dist/components/side-navigation.js",
|
|
103
|
+
"./dist/components/side-panel.js",
|
|
104
|
+
"./dist/components/signature-field.js",
|
|
105
|
+
"./dist/components/skeleton-display.js",
|
|
106
|
+
"./dist/components/skeleton.js",
|
|
107
|
+
"./dist/components/smart-tip.js",
|
|
108
|
+
"./dist/components/sparkline.js",
|
|
109
|
+
"./dist/components/spinner.js",
|
|
110
|
+
"./dist/components/stack.js",
|
|
111
|
+
"./dist/components/status-tabs.js",
|
|
112
|
+
"./dist/components/table-header.js",
|
|
113
|
+
"./dist/components/tag.js",
|
|
114
|
+
"./dist/components/text-field.js",
|
|
115
|
+
"./dist/components/thumbnail.js",
|
|
116
|
+
"./dist/components/time-picker.js",
|
|
117
|
+
"./dist/components/timeline.js",
|
|
118
|
+
"./dist/components/toast.js",
|
|
119
|
+
"./dist/components/toggle.js",
|
|
120
|
+
"./dist/components/tooltip.js"
|
|
48
121
|
],
|
|
49
122
|
"customElements": "dist/custom-elements.json",
|
|
50
123
|
"publishConfig": {
|
|
51
124
|
"access": "public"
|
|
52
125
|
},
|
|
53
126
|
"scripts": {
|
|
54
|
-
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --minify --format=esm --target=es2021 --outfile=dist/cdn.js && cem analyze --litelement --globs \"src/components/*.ts\" \"src/localize.ts\" \"src/overlay.ts\" --outdir dist",
|
|
127
|
+
"build": "node ../../scripts/sync-side-effects.mjs && tsc -p tsconfig.json && esbuild src/index.ts --bundle --minify --format=esm --target=es2021 --outfile=dist/cdn.js && cem analyze --litelement --globs \"src/components/*.ts\" \"src/localize.ts\" \"src/overlay.ts\" --outdir dist",
|
|
55
128
|
"test": "vitest run"
|
|
56
129
|
},
|
|
57
130
|
"dependencies": {
|
|
58
|
-
"@commmerce/icons": "1.
|
|
59
|
-
"@commmerce/tokens": "1.
|
|
131
|
+
"@commmerce/icons": "1.19.0",
|
|
132
|
+
"@commmerce/tokens": "1.19.0",
|
|
60
133
|
"lit": "3.2.1"
|
|
61
134
|
},
|
|
62
135
|
"devDependencies": {
|