@commmerce/ui 1.3.0 → 1.5.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.
Files changed (106) hide show
  1. package/THIRD_PARTY_NOTICES.txt +101 -0
  2. package/dist/calendar.js +15 -19
  3. package/dist/cdn.js +1669 -1193
  4. package/dist/components/accordion.js +9 -8
  5. package/dist/components/action-bar.js +15 -15
  6. package/dist/components/action-menu.js +10 -9
  7. package/dist/components/app-card.js +15 -14
  8. package/dist/components/app-frame.d.ts +15 -0
  9. package/dist/components/app-frame.js +22 -2
  10. package/dist/components/badge.d.ts +2 -1
  11. package/dist/components/badge.js +4 -3
  12. package/dist/components/banner.js +6 -5
  13. package/dist/components/board.js +18 -18
  14. package/dist/components/bottom-navigation.d.ts +1 -1
  15. package/dist/components/bottom-navigation.js +9 -7
  16. package/dist/components/bottom-sheet.d.ts +1 -1
  17. package/dist/components/bottom-sheet.js +9 -8
  18. package/dist/components/button.d.ts +3 -3
  19. package/dist/components/button.js +22 -19
  20. package/dist/components/calendar.d.ts +380 -0
  21. package/dist/components/calendar.js +1480 -0
  22. package/dist/components/card.d.ts +1 -1
  23. package/dist/components/card.js +18 -12
  24. package/dist/components/checkbox.js +8 -7
  25. package/dist/components/color-field.js +9 -13
  26. package/dist/components/combobox.d.ts +8 -0
  27. package/dist/components/combobox.js +18 -18
  28. package/dist/components/comment.d.ts +1 -1
  29. package/dist/components/comment.js +12 -13
  30. package/dist/components/data-table.js +12 -11
  31. package/dist/components/date-picker.js +1 -1
  32. package/dist/components/date-range-picker.js +7 -7
  33. package/dist/components/empty-state.d.ts +1 -1
  34. package/dist/components/empty-state.js +16 -16
  35. package/dist/components/file-upload.js +18 -16
  36. package/dist/components/filter-panel.js +1 -1
  37. package/dist/components/flash-offer-bar.js +8 -7
  38. package/dist/components/global-search.d.ts +1 -1
  39. package/dist/components/global-search.js +12 -9
  40. package/dist/components/grid.d.ts +1 -1
  41. package/dist/components/grid.js +1 -1
  42. package/dist/components/header-bar.js +38 -31
  43. package/dist/components/info-panel.d.ts +1 -1
  44. package/dist/components/info-panel.js +11 -10
  45. package/dist/components/layout.d.ts +1 -1
  46. package/dist/components/layout.js +1 -1
  47. package/dist/components/link-tabs.js +8 -7
  48. package/dist/components/metric.js +4 -4
  49. package/dist/components/mobile-menu.js +16 -15
  50. package/dist/components/modal.js +2 -1
  51. package/dist/components/nested-list.d.ts +2 -2
  52. package/dist/components/nested-list.js +21 -22
  53. package/dist/components/notification-panel.js +12 -11
  54. package/dist/components/option-group.js +10 -11
  55. package/dist/components/page-header.js +16 -15
  56. package/dist/components/page.d.ts +18 -4
  57. package/dist/components/page.js +22 -7
  58. package/dist/components/pagination.d.ts +1 -1
  59. package/dist/components/pagination.js +16 -9
  60. package/dist/components/progress-bar.js +4 -3
  61. package/dist/components/radio.js +12 -12
  62. package/dist/components/report-tile.d.ts +2 -2
  63. package/dist/components/report-tile.js +18 -18
  64. package/dist/components/resource-list.d.ts +22 -6
  65. package/dist/components/resource-list.js +92 -52
  66. package/dist/components/save-bar.js +8 -8
  67. package/dist/components/search.d.ts +5 -2
  68. package/dist/components/search.js +20 -14
  69. package/dist/components/segmented-control.d.ts +67 -0
  70. package/dist/components/segmented-control.js +76 -0
  71. package/dist/components/select.d.ts +8 -0
  72. package/dist/components/select.js +18 -18
  73. package/dist/components/side-navigation.js +20 -17
  74. package/dist/components/side-panel.js +4 -3
  75. package/dist/components/signature-field.d.ts +153 -0
  76. package/dist/components/signature-field.js +728 -0
  77. package/dist/components/skeleton-display.js +4 -4
  78. package/dist/components/skeleton.d.ts +1 -1
  79. package/dist/components/skeleton.js +2 -2
  80. package/dist/components/smart-tip.d.ts +1 -1
  81. package/dist/components/smart-tip.js +16 -16
  82. package/dist/components/spinner.js +1 -1
  83. package/dist/components/stack.d.ts +1 -1
  84. package/dist/components/stack.js +1 -1
  85. package/dist/components/status-tabs.d.ts +4 -3
  86. package/dist/components/status-tabs.js +26 -12
  87. package/dist/components/table-header.d.ts +4 -3
  88. package/dist/components/table-header.js +22 -15
  89. package/dist/components/tag.js +3 -4
  90. package/dist/components/text-field.d.ts +1 -1
  91. package/dist/components/text-field.js +8 -15
  92. package/dist/components/thumbnail.js +1 -1
  93. package/dist/components/timeline.js +12 -11
  94. package/dist/components/toast.js +6 -6
  95. package/dist/components/toggle.js +12 -11
  96. package/dist/components/tooltip.js +4 -3
  97. package/dist/custom-elements.json +13655 -9770
  98. package/dist/field.d.ts +15 -0
  99. package/dist/field.js +47 -0
  100. package/dist/index.d.ts +4 -0
  101. package/dist/index.js +3 -0
  102. package/dist/overlay.js +5 -4
  103. package/dist/popover.js +8 -8
  104. package/dist/spacing.d.ts +14 -4
  105. package/dist/spacing.js +13 -4
  106. package/package.json +3 -3
@@ -11,6 +11,8 @@ lit, lit-html, lit-element, 3.x BSD-3-Clause Dependency of @commme
11
11
  @lit/react 1.0.6 BSD-3-Clause Dependency of @commmerce/ui-react
12
12
  Poppins typeface - OFL-1.1 Font files in @commmerce/tokens, the hosted
13
13
  files and the Flutter package commmerce_ui
14
+ Dancing Script typeface - OFL-1.1 Font file in @commmerce/tokens and the hosted
15
+ files: typed signatures in cm-signature-field
14
16
  path_drawing (Dart) 1.0.1 MIT Dependency of the Flutter package commmerce_ui
15
17
 
16
18
  The line icons in @commmerce/icons and the design tokens are original
@@ -151,6 +153,105 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
151
153
 
152
154
  ==============================================================================
153
155
 
156
+ Dancing Script typeface
157
+ https://github.com/googlefonts/DancingScript
158
+
159
+ Copyright 2016 The Dancing Script Project Authors (https://github.com/googlefonts/DancingScript), with Reserved Font Name 'Dancing Script'.
160
+
161
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
162
+ This license is copied below, and is also available with a FAQ at:
163
+ http://scripts.sil.org/OFL
164
+
165
+
166
+ -----------------------------------------------------------
167
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
168
+ -----------------------------------------------------------
169
+
170
+ PREAMBLE
171
+ The goals of the Open Font License (OFL) are to stimulate worldwide
172
+ development of collaborative font projects, to support the font creation
173
+ efforts of academic and linguistic communities, and to provide a free and
174
+ open framework in which fonts may be shared and improved in partnership
175
+ with others.
176
+
177
+ The OFL allows the licensed fonts to be used, studied, modified and
178
+ redistributed freely as long as they are not sold by themselves. The
179
+ fonts, including any derivative works, can be bundled, embedded,
180
+ redistributed and/or sold with any software provided that any reserved
181
+ names are not used by derivative works. The fonts and derivatives,
182
+ however, cannot be released under any other type of license. The
183
+ requirement for fonts to remain under this license does not apply
184
+ to any document created using the fonts or their derivatives.
185
+
186
+ DEFINITIONS
187
+ "Font Software" refers to the set of files released by the Copyright
188
+ Holder(s) under this license and clearly marked as such. This may
189
+ include source files, build scripts and documentation.
190
+
191
+ "Reserved Font Name" refers to any names specified as such after the
192
+ copyright statement(s).
193
+
194
+ "Original Version" refers to the collection of Font Software components as
195
+ distributed by the Copyright Holder(s).
196
+
197
+ "Modified Version" refers to any derivative made by adding to, deleting,
198
+ or substituting -- in part or in whole -- any of the components of the
199
+ Original Version, by changing formats or by porting the Font Software to a
200
+ new environment.
201
+
202
+ "Author" refers to any designer, engineer, programmer, technical
203
+ writer or other person who contributed to the Font Software.
204
+
205
+ PERMISSION & CONDITIONS
206
+ Permission is hereby granted, free of charge, to any person obtaining
207
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
208
+ redistribute, and sell modified and unmodified copies of the Font
209
+ Software, subject to the following conditions:
210
+
211
+ 1) Neither the Font Software nor any of its individual components,
212
+ in Original or Modified Versions, may be sold by itself.
213
+
214
+ 2) Original or Modified Versions of the Font Software may be bundled,
215
+ redistributed and/or sold with any software, provided that each copy
216
+ contains the above copyright notice and this license. These can be
217
+ included either as stand-alone text files, human-readable headers or
218
+ in the appropriate machine-readable metadata fields within text or
219
+ binary files as long as those fields can be easily viewed by the user.
220
+
221
+ 3) No Modified Version of the Font Software may use the Reserved Font
222
+ Name(s) unless explicit written permission is granted by the corresponding
223
+ Copyright Holder. This restriction only applies to the primary font name as
224
+ presented to the users.
225
+
226
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
227
+ Software shall not be used to promote, endorse or advertise any
228
+ Modified Version, except to acknowledge the contribution(s) of the
229
+ Copyright Holder(s) and the Author(s) or with their explicit written
230
+ permission.
231
+
232
+ 5) The Font Software, modified or unmodified, in part or in whole,
233
+ must be distributed entirely under this license, and must not be
234
+ distributed under any other license. The requirement for fonts to
235
+ remain under this license does not apply to any document created
236
+ using the Font Software.
237
+
238
+ TERMINATION
239
+ This license becomes null and void if any of the above conditions are
240
+ not met.
241
+
242
+ DISCLAIMER
243
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
244
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
245
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
246
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
247
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
248
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
249
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
250
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
251
+ OTHER DEALINGS IN THE FONT SOFTWARE.
252
+
253
+ ==============================================================================
254
+
154
255
  path_drawing
155
256
  https://pub.dev/packages/path_drawing
156
257
 
package/dist/calendar.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { html, css, nothing } from 'lit';
2
2
  import { localeFor, formatDate } from './localize.js';
3
+ import { fieldStyles } from './field.js';
3
4
  import './components/icon.js';
4
5
  /*
5
6
  * Shared, internal helpers for cm-date-picker and cm-date-range-picker: ISO date maths, locale-aware formatting
@@ -307,14 +308,14 @@ export function renderGrid(o) {
307
308
  /** Styles for the popover and grid. Hosts render `.pop[role=dialog]` around `renderGrid`. */
308
309
  export const calendarStyles = css `
309
310
  .pop {
310
- position: absolute; z-index: 20; inset-block-start: calc(100% + var(--cm-space-10)); inset-inline-start: 0;
311
- width: max-content; max-width: calc(100vw - 32px); padding: var(--cm-space-15);
311
+ position: absolute; z-index: 20; inset-block-start: calc(100% + var(--cm-space-8)); inset-inline-start: 0;
312
+ width: max-content; max-width: calc(100vw - 32px); padding: var(--cm-space-12);
312
313
  background: var(--cm-bg-surface); color: var(--cm-text-default);
313
- border: var(--cm-border-1) solid var(--cm-border-default); border-radius: var(--cm-radius-md); box-shadow: var(--cm-shadow-100);
314
+ border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md); box-shadow: var(--cm-shadow-md);
314
315
  }
315
316
  .pop[hidden] { display: none; }
316
317
  .cal { width: 280px; max-width: 100%; }
317
- .cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--cm-space-10); margin-block-end: var(--cm-space-10); }
318
+ .cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--cm-space-8); margin-block-end: var(--cm-space-8); }
318
319
  .cal-title { flex: 1; margin: 0; text-align: center; font-size: 14px; line-height: 20px; font-weight: 500; }
319
320
  .cal-nav {
320
321
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--cm-radius-sm);
@@ -352,38 +353,33 @@ export function trapTab(e, pop) {
352
353
  }
353
354
  /** Shared field and popover styles of the two date pickers. */
354
355
  export const dateFieldStyles = css `
356
+ ${fieldStyles}
355
357
  :host { display: block; position: relative; }
356
- .field { display: flex; flex-direction: column; gap: var(--cm-space-10); }
357
- .label { font-size: var(--cm-type-label-size); color: var(--cm-text-default); }
358
- .req { color: var(--cm-text-critical); margin-inline-start: 2px; }
359
358
  .wrap { position: relative; }
360
359
  .box {
361
- display: flex; align-items: center; gap: 4px; width: 100%; height: 42px; padding-block: 0; padding-inline: var(--cm-space-10) 4px;
360
+ display: flex; align-items: center; gap: var(--cm-space-4); width: 100%; height: var(--_cm-field-h); padding-block: 0; padding-inline: var(--_cm-field-pad) var(--cm-space-4);
362
361
  background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-input); border-radius: var(--cm-radius-sm);
363
362
  }
364
363
  .box:focus-within { border-color: var(--cm-border-strong); box-shadow: 0 0 0 1px var(--cm-border-strong); }
365
364
  input {
366
365
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none;
367
- font: inherit; font-size: 16px; color: var(--cm-text-default);
366
+ font: inherit; font-size: var(--_cm-field-font); color: var(--cm-text-default);
368
367
  }
369
368
  input::placeholder { color: var(--cm-text-tertiary); }
370
369
  .trigger {
371
- flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0;
372
- border-radius: var(--cm-radius-sm); background: none; color: var(--cm-icon-selected); cursor: pointer;
370
+ flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0;
371
+ border-radius: var(--cm-radius-xs); background: none; color: var(--cm-icon-selected); cursor: pointer;
373
372
  }
373
+ :host([size='small']) .trigger { width: 24px; height: 24px; }
374
+ @media (pointer: coarse) { .trigger, :host([size='small']) .trigger { width: 36px; height: 36px; } }
374
375
  .trigger:hover { background: var(--cm-bg-hover); }
375
376
  .trigger:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 0; }
376
377
  :host([error]:not([error=''])) .box { border-color: var(--cm-border-critical); }
377
- :host([disabled]) .box { background: var(--cm-bg-input-filled); border-color: var(--cm-border-default); }
378
+ :host([disabled]) .box { background: var(--cm-bg-input-filled); border-color: var(--cm-border-subtle); }
378
379
  :host([disabled]) input, :host([disabled]) .trigger { color: var(--cm-text-secondary); cursor: not-allowed; }
379
380
  :host([disabled]) .trigger:hover { background: none; }
380
- .help, .error { margin: 0; font-size: 12px; color: var(--cm-text-tertiary); }
381
- .error { color: var(--cm-text-critical); }
382
- :host([size='small']) .field { gap: 6px; }
383
- :host([size='small']) .label { font-size: 12px; }
384
- :host([size='small']) input { font-size: 14px; }
385
381
  /* cm-date-picker with \`time\`: the date box and a time box side by side, wrapping onto two rows when narrow. */
386
- .wrap.timed { display: flex; flex-wrap: wrap; gap: var(--cm-space-10); }
382
+ .wrap.timed { display: flex; flex-wrap: wrap; gap: var(--cm-space-8); }
387
383
  .wrap.timed .box { width: auto; min-inline-size: 0; flex: 2 1 10.5rem; }
388
- .wrap.timed .box.time { flex: 1 1 7.5rem; padding-inline: var(--cm-space-10); }
384
+ .wrap.timed .box.time { flex: 1 1 7.5rem; padding-inline: var(--_cm-field-pad); }
389
385
  `;