viewkitjs 0.26.0 → 0.28.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/CHANGELOG.md +95 -0
- package/MIGRATION.md +122 -7
- package/package.json +1 -1
- package/views/dist/cells/cell-format.d.ts +3 -1
- package/views/dist/cells/cell-format.js +2 -2
- package/views/dist/cells/use-cell-format.d.ts +8 -1
- package/views/dist/cells/use-cell-format.js +13 -2
- package/views/dist/contract.d.ts +240 -3
- package/views/dist/contract.js +238 -0
- package/views/dist/controls/alert/alert.d.ts +46 -0
- package/views/dist/controls/alert/alert.js +11 -0
- package/views/dist/controls/alert/looks.d.ts +4 -0
- package/views/dist/controls/alert/looks.js +19 -0
- package/views/dist/controls/alert/tokens.d.ts +92 -0
- package/views/dist/controls/alert/tokens.js +25 -0
- package/views/dist/controls/alert-dialog/alert-dialog.d.ts +50 -0
- package/views/dist/controls/alert-dialog/alert-dialog.js +67 -0
- package/views/dist/controls/alert-dialog/confirm.d.ts +13 -0
- package/views/dist/controls/alert-dialog/confirm.js +11 -0
- package/views/dist/controls/alert-dialog/looks.d.ts +4 -0
- package/views/dist/controls/alert-dialog/looks.js +17 -0
- package/views/dist/controls/alert-dialog/tokens.d.ts +119 -0
- package/views/dist/controls/alert-dialog/tokens.js +32 -0
- package/views/dist/controls/alert-dialog.css +95 -0
- package/views/dist/controls/alert.css +51 -0
- package/views/dist/controls/collapsible/collapsible.d.ts +39 -0
- package/views/dist/controls/collapsible/collapsible.js +18 -0
- package/views/dist/controls/collapsible/looks.d.ts +4 -0
- package/views/dist/controls/collapsible/looks.js +5 -0
- package/views/dist/controls/collapsible/map-collapse.d.ts +2 -0
- package/views/dist/controls/collapsible/map-collapse.js +6 -0
- package/views/dist/controls/collapsible/tokens.d.ts +68 -0
- package/views/dist/controls/collapsible/tokens.js +19 -0
- package/views/dist/controls/collapsible.css +83 -0
- package/views/dist/controls/compound-editor/map-parts-body.js +2 -1
- package/views/dist/controls/compound-editor/name-parts.js +10 -2
- package/views/dist/controls/compound-editor/place-parts.js +5 -1
- package/views/dist/controls/compound-editor/place.d.ts +2 -1
- package/views/dist/controls/compound-editor/place.js +2 -0
- package/views/dist/controls/controls.d.ts +17 -0
- package/views/dist/controls/controls.js +17 -0
- package/views/dist/controls/date-editor/date-editor.d.ts +2 -1
- package/views/dist/controls/date-editor/map-calendar.js +3 -1
- package/views/dist/controls/filter-editor/filter-editor.d.ts +56 -0
- package/views/dist/controls/filter-editor/filter-editor.js +208 -0
- package/views/dist/controls/filter-editor/how.d.ts +23 -0
- package/views/dist/controls/filter-editor/how.js +13 -0
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +18 -0
- package/views/dist/controls/filter-editor/map-filter-body.js +164 -0
- package/views/dist/controls/filter-editor/map-rules.d.ts +85 -0
- package/views/dist/controls/filter-editor/map-rules.js +273 -0
- package/views/dist/controls/filter-editor/parts.d.ts +46 -0
- package/views/dist/controls/filter-editor/parts.js +75 -0
- package/views/dist/controls/filter-editor/rules.d.ts +104 -0
- package/views/dist/controls/filter-editor/rules.js +148 -0
- package/views/dist/controls/filter-editor/tokens.d.ts +83 -0
- package/views/dist/controls/filter-editor/tokens.js +23 -0
- package/views/dist/controls/filter-editor/words.d.ts +59 -0
- package/views/dist/controls/filter-editor/words.js +40 -0
- package/views/dist/controls/filter-editor.css +124 -0
- package/views/dist/controls/group-editor/group-editor.d.ts +56 -0
- package/views/dist/controls/group-editor/group-editor.js +126 -0
- package/views/dist/controls/group-editor/map-group-body.d.ts +19 -0
- package/views/dist/controls/group-editor/map-group-body.js +106 -0
- package/views/dist/controls/group-editor/rules.d.ts +48 -0
- package/views/dist/controls/group-editor/rules.js +41 -0
- package/views/dist/controls/group-editor/tokens.d.ts +15 -0
- package/views/dist/controls/group-editor/tokens.js +6 -0
- package/views/dist/controls/group-editor/words.d.ts +39 -0
- package/views/dist/controls/group-editor/words.js +21 -0
- package/views/dist/controls/group-editor.css +20 -0
- package/views/dist/controls/index.d.ts +35 -1
- package/views/dist/controls/index.js +35 -1
- package/views/dist/controls/internal/editor-parts.d.ts +47 -0
- package/views/dist/controls/internal/editor-parts.js +48 -0
- package/views/dist/controls/internal/step-return.d.ts +9 -0
- package/views/dist/controls/internal/step-return.js +27 -0
- package/views/dist/controls/links-editor/links-editor.d.ts +80 -0
- package/views/dist/controls/links-editor/links-editor.js +329 -0
- package/views/dist/controls/links-editor/links.d.ts +62 -0
- package/views/dist/controls/links-editor/links.js +50 -0
- package/views/dist/controls/links-editor/map-links-body.d.ts +10 -0
- package/views/dist/controls/links-editor/map-links-body.js +74 -0
- package/views/dist/controls/links-editor/tokens.d.ts +71 -0
- package/views/dist/controls/links-editor/tokens.js +20 -0
- package/views/dist/controls/links-editor/words.d.ts +56 -0
- package/views/dist/controls/links-editor/words.js +33 -0
- package/views/dist/controls/links-editor.css +132 -0
- package/views/dist/controls/menu-list/menu-list.d.ts +17 -2
- package/views/dist/controls/menu-list/menu-list.js +25 -16
- package/views/dist/controls/modal/looks.d.ts +4 -0
- package/views/dist/controls/modal/looks.js +25 -0
- package/views/dist/controls/modal/modal.d.ts +69 -0
- package/views/dist/controls/modal/modal.js +62 -0
- package/views/dist/controls/modal/tokens.d.ts +192 -0
- package/views/dist/controls/modal/tokens.js +50 -0
- package/views/dist/controls/modal.css +130 -0
- package/views/dist/controls/notice/notice.d.ts +49 -0
- package/views/dist/controls/notice/notice.js +35 -0
- package/views/dist/controls/notice/tokens.d.ts +99 -0
- package/views/dist/controls/notice/tokens.js +27 -0
- package/views/dist/controls/notice.css +100 -0
- package/views/dist/controls/number-editor/format.d.ts +31 -0
- package/views/dist/controls/number-editor/format.js +79 -0
- package/views/dist/controls/number-editor/looks.d.ts +14 -0
- package/views/dist/controls/number-editor/looks.js +17 -0
- package/views/dist/controls/number-editor/map-number-body.d.ts +16 -0
- package/views/dist/controls/number-editor/map-number-body.js +57 -0
- package/views/dist/controls/number-editor/number-editor.d.ts +72 -0
- package/views/dist/controls/number-editor/number-editor.js +202 -0
- package/views/dist/controls/number-editor/tokens.d.ts +28 -0
- package/views/dist/controls/number-editor/tokens.js +9 -0
- package/views/dist/controls/number-editor/words.d.ts +23 -0
- package/views/dist/controls/number-editor/words.js +13 -0
- package/views/dist/controls/number-editor.css +37 -0
- package/views/dist/controls/number-field/number-field.js +57 -5
- package/views/dist/controls/pane/looks.d.ts +4 -0
- package/views/dist/controls/pane/looks.js +11 -0
- package/views/dist/controls/pane/pane.d.ts +63 -0
- package/views/dist/controls/pane/pane.js +98 -0
- package/views/dist/controls/pane/state.d.ts +14 -0
- package/views/dist/controls/pane/state.js +7 -0
- package/views/dist/controls/pane/tokens.d.ts +79 -0
- package/views/dist/controls/pane/tokens.js +22 -0
- package/views/dist/controls/pane.css +104 -0
- package/views/dist/controls/picker/rows.d.ts +4 -2
- package/views/dist/controls/picker/rows.js +4 -3
- package/views/dist/controls/radio/radio.d.ts +33 -0
- package/views/dist/controls/radio/radio.js +19 -0
- package/views/dist/controls/radio/tokens.d.ts +127 -0
- package/views/dist/controls/radio/tokens.js +34 -0
- package/views/dist/controls/radio.css +104 -0
- package/views/dist/controls/sort-editor/map-sort-body.d.ts +9 -0
- package/views/dist/controls/sort-editor/map-sort-body.js +81 -0
- package/views/dist/controls/sort-editor/rules.d.ts +48 -0
- package/views/dist/controls/sort-editor/rules.js +24 -0
- package/views/dist/controls/sort-editor/sort-editor.d.ts +58 -0
- package/views/dist/controls/sort-editor/sort-editor.js +180 -0
- package/views/dist/controls/sort-editor/tokens.d.ts +79 -0
- package/views/dist/controls/sort-editor/tokens.js +22 -0
- package/views/dist/controls/sort-editor/words.d.ts +48 -0
- package/views/dist/controls/sort-editor/words.js +25 -0
- package/views/dist/controls/sort-editor.css +96 -0
- package/views/dist/controls/text-editor/phone-number.d.ts +4 -0
- package/views/dist/controls/text-editor/phone-number.js +20 -0
- package/views/dist/controls/text-editor/text-editor.js +2 -19
- package/views/dist/controls/toast/toast.d.ts +75 -0
- package/views/dist/controls/toast/toast.js +99 -0
- package/views/dist/controls/toast/tokens.d.ts +100 -0
- package/views/dist/controls/toast/tokens.js +27 -0
- package/views/dist/controls/toast.css +93 -0
- package/views/dist/controls/tokens.js +30 -0
- package/views/dist/controls/values-editor/looks.d.ts +16 -0
- package/views/dist/controls/values-editor/looks.js +19 -0
- package/views/dist/controls/values-editor/map-values-body.d.ts +12 -0
- package/views/dist/controls/values-editor/map-values-body.js +71 -0
- package/views/dist/controls/values-editor/tokens.d.ts +132 -0
- package/views/dist/controls/values-editor/tokens.js +35 -0
- package/views/dist/controls/values-editor/values-editor.d.ts +62 -0
- package/views/dist/controls/values-editor/values-editor.js +441 -0
- package/views/dist/controls/values-editor/values.d.ts +71 -0
- package/views/dist/controls/values-editor/values.js +59 -0
- package/views/dist/controls/values-editor/words.d.ts +50 -0
- package/views/dist/controls/values-editor/words.js +29 -0
- package/views/dist/controls/values-editor.css +207 -0
- package/views/dist/controls/views-list/looks.d.ts +13 -0
- package/views/dist/controls/views-list/looks.js +12 -0
- package/views/dist/controls/views-list/map-views-list-body.d.ts +19 -0
- package/views/dist/controls/views-list/map-views-list-body.js +65 -0
- package/views/dist/controls/views-list/rules.d.ts +72 -0
- package/views/dist/controls/views-list/rules.js +4 -0
- package/views/dist/controls/views-list/tokens.d.ts +11 -0
- package/views/dist/controls/views-list/tokens.js +5 -0
- package/views/dist/controls/views-list/views-list.d.ts +44 -0
- package/views/dist/controls/views-list/views-list.js +57 -0
- package/views/dist/controls/views-list/words.d.ts +22 -0
- package/views/dist/controls/views-list/words.js +3 -0
- package/views/dist/controls/views-list.css +8 -0
- package/views/dist/display/date.js +2 -2
- package/views/dist/display/format.js +10 -2
- package/views/dist/display/options.d.ts +3 -1
- package/views/dist/display/use-display-options.d.ts +3 -0
- package/views/dist/display/use-display-options.js +10 -2
- package/views/dist/display/viewer.d.ts +1 -1
- package/views/dist/display/viewer.js +1 -1
- package/views/dist/editors/DateEditor.js +11 -9
- package/views/dist/editors/NumberEditor.js +3 -1
- package/views/dist/editors/relation-panel.js +7 -1
- package/views/dist/editors/relation-picker.d.ts +2 -1
- package/views/dist/editors/relation-picker.js +4 -3
- package/views/dist/editors/relation-source.d.ts +4 -1
- package/views/dist/editors/relation-source.js +5 -2
- package/views/dist/field-row/editors/RowNumberEditor.js +2 -2
- package/views/dist/fields/number-edit.d.ts +6 -0
- package/views/dist/fields/number-edit.js +8 -1
- package/views/dist/grid/chrome/GridCellEditors.js +3 -3
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +4 -3
- package/views/dist/grid/chrome/GridColumnDateSection.js +4 -4
- package/views/dist/grid/chrome/GridColumnDurationSection.js +2 -2
- package/views/dist/grid/chrome/GridColumnMenu.js +6 -4
- package/views/dist/grid/chrome/GridDateEditor.d.ts +3 -1
- package/views/dist/grid/chrome/GridDateEditor.js +2 -1
- package/views/dist/grid/chrome/GridFooter.js +2 -2
- package/views/dist/grid/chrome/grid-column-menu-items.js +4 -2
- package/views/dist/grid/chrome/useGridBandFigures.js +2 -2
- package/views/dist/grid/chrome/useGridFittedWidths.d.ts +3 -0
- package/views/dist/grid/chrome/useGridFittedWidths.js +9 -3
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
- package/views/dist/grid/chrome/useGridKeyboard.js +5 -2
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -1
- package/views/dist/grid/core/commit-model.d.ts +7 -0
- package/views/dist/grid/core/commit-model.js +5 -1
- package/views/dist/grid/core/editing-controller.js +10 -2
- package/views/dist/grid/core/editing-model.js +3 -7
- package/views/dist/grid/core/undo-owner.d.ts +6 -0
- package/views/dist/grid/core/undo-owner.js +13 -0
- package/views/dist/grid/core/useGridEditing.d.ts +2 -0
- package/views/dist/grid/core/useGridEditing.js +4 -0
- package/views/dist/looks/index.d.ts +8 -0
- package/views/dist/looks/index.js +8 -0
- package/views/dist/looks/pieces.js +16 -0
- package/views/dist/panels/model.d.ts +6 -1
- package/views/dist/panels/react/customize-body.d.ts +4 -2
- package/views/dist/panels/react/customize-body.js +3 -3
- package/views/dist/panels/react/customize.js +4 -2
- package/views/dist/panels/react/filter/FilterEditor.js +2 -2
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +8 -2
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +9 -6
- package/views/dist/panels/react/filter/filter-body.d.ts +8 -5
- package/views/dist/panels/react/filter/filter-body.js +17 -6
- package/views/dist/panels/react/filter/filter-part-body.d.ts +4 -1
- package/views/dist/panels/react/filter/filter-part-body.js +3 -1
- package/views/dist/panels/react/panel-sheet.d.ts +5 -1
- package/views/dist/panels/react/panel-sheet.js +6 -2
- package/views/dist/panels/react/panel-step.d.ts +12 -0
- package/views/dist/panels/react/panel-step.js +26 -0
- package/views/dist/panels/react/sort/SortEditor.d.ts +4 -0
- package/views/dist/panels/react/sort/SortEditor.js +5 -2
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +8 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +84 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +16 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +49 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +3 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +4 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +36 -21
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +4 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +15 -6
- package/views/dist/panels/react/toolbar/panel-part.d.ts +5 -1
- package/views/dist/panels/react/toolbar/panel-part.js +2 -2
- package/views/dist/panels/react/toolbar/use-filter-add.d.ts +16 -0
- package/views/dist/panels/react/toolbar/use-filter-add.js +32 -0
- package/views/dist/panels/react.d.ts +1 -0
- package/views/dist/panels/react.js +1 -0
- package/views/dist/panels/settings/filter-groups.js +35 -1
- package/views/dist/panels/settings/group-buckets.js +1 -0
- package/views/dist/provider/ViewsProvider.d.ts +7 -1
- package/views/dist/provider/ViewsProvider.js +23 -3
- package/views/dist/provider/components.d.ts +34 -4
- package/views/dist/provider/moment.d.ts +6 -0
- package/views/dist/provider/moment.js +10 -0
- package/views/dist/styles.css +1276 -51
- package/views/dist/styles.unlayered.css +1277 -51
- package/views/docs/contract.md +23 -15
- package/views/docs/controls/alert-dialog.md +37 -0
- package/views/docs/controls/alert.md +30 -0
- package/views/docs/controls/collapsible.md +22 -0
- package/views/docs/controls/filter-editor.md +28 -0
- package/views/docs/controls/group-editor.md +11 -0
- package/views/docs/controls/links-editor.md +25 -0
- package/views/docs/controls/modal.md +55 -0
- package/views/docs/controls/notice.md +32 -0
- package/views/docs/controls/number-editor.md +12 -0
- package/views/docs/controls/pane.md +25 -0
- package/views/docs/controls/radio.md +39 -0
- package/views/docs/controls/sort-editor.md +27 -0
- package/views/docs/controls/toast.md +32 -0
- package/views/docs/controls/values-editor.md +40 -0
- package/views/docs/controls/views-list.md +8 -0
- package/views/docs/guides/cells.md +1 -1
- package/views/docs/guides/display.md +1 -1
- package/views/docs/guides/the-grid.md +1 -1
- package/views/docs/guides/the-provider.md +19 -0
- package/views/docs/reference/cells.md +2 -2
- package/views/docs/reference/controls.md +326 -8
- package/views/docs/reference/display.md +2 -2
- package/views/docs/reference/editors-relation.md +1 -1
- package/views/docs/reference/looks.md +20 -3
- package/views/docs/reference/panels-react.md +7 -6
- package/views/docs/reference/panels.md +1 -1
- package/views/docs/reference/react.md +8 -8
- package/views/docs/reference/views.md +1 -0
package/views/dist/contract.js
CHANGED
|
@@ -322,6 +322,8 @@ export const ATOM_SLOTS = [
|
|
|
322
322
|
"vk-sort-rule",
|
|
323
323
|
"vk-sort-aside",
|
|
324
324
|
"vk-sort-fields",
|
|
325
|
+
"vk-sort-head",
|
|
326
|
+
"vk-filter-head",
|
|
325
327
|
"vk-toolbar-quick",
|
|
326
328
|
"vk-toolbar-quick-panel",
|
|
327
329
|
"vk-quick-filters",
|
|
@@ -387,6 +389,8 @@ export const ATOM_STATES = [
|
|
|
387
389
|
"fold",
|
|
388
390
|
"icon-alone",
|
|
389
391
|
"aside",
|
|
392
|
+
"sort-step",
|
|
393
|
+
"filter-step",
|
|
390
394
|
"foot",
|
|
391
395
|
"at",
|
|
392
396
|
"joined",
|
|
@@ -506,6 +510,35 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
506
510
|
"views.editors.values-main",
|
|
507
511
|
"views.editors.values-make-main",
|
|
508
512
|
"views.editors.values-remove",
|
|
513
|
+
"views.editors.values-line-email",
|
|
514
|
+
"views.editors.values-line-link",
|
|
515
|
+
"views.editors.values-line-domain",
|
|
516
|
+
"views.editors.values-card-line-email",
|
|
517
|
+
"views.editors.values-card-line-link",
|
|
518
|
+
"views.editors.values-card-line-domain",
|
|
519
|
+
"views.editors.values-add-email",
|
|
520
|
+
"views.editors.values-add-phone",
|
|
521
|
+
"views.editors.values-add-link",
|
|
522
|
+
"views.editors.values-add-domain",
|
|
523
|
+
"views.editors.values-nth-email",
|
|
524
|
+
"views.editors.values-nth-phone",
|
|
525
|
+
"views.editors.values-nth-link",
|
|
526
|
+
"views.editors.values-nth-domain",
|
|
527
|
+
"views.editors.values-change",
|
|
528
|
+
"views.editors.values-copy",
|
|
529
|
+
"views.editors.values-move",
|
|
530
|
+
"views.editors.values-label-is",
|
|
531
|
+
"views.editors.values-no-label",
|
|
532
|
+
"views.editors.values-label-search",
|
|
533
|
+
"views.editors.values-label-find",
|
|
534
|
+
"views.editors.values-country-code",
|
|
535
|
+
"views.editors.values-country-is",
|
|
536
|
+
"views.editors.values-country-code-is",
|
|
537
|
+
"views.editors.values-back-to",
|
|
538
|
+
"views.editors.values-label-work",
|
|
539
|
+
"views.editors.values-label-personal",
|
|
540
|
+
"views.editors.values-label-mobile",
|
|
541
|
+
"views.editors.values-label-other",
|
|
509
542
|
"views.editors.discard",
|
|
510
543
|
"views.editors.save",
|
|
511
544
|
"views.editors.back",
|
|
@@ -542,6 +575,12 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
542
575
|
"views.editors.number-increase",
|
|
543
576
|
"views.editors.number-decrease",
|
|
544
577
|
"views.editors.number-field",
|
|
578
|
+
"views.editors.number-unit",
|
|
579
|
+
"views.editors.number-find-currency",
|
|
580
|
+
"views.editors.number-search-currency",
|
|
581
|
+
"views.editors.number-find-unit",
|
|
582
|
+
"views.editors.number-search-unit",
|
|
583
|
+
"views.editors.number-unit-named",
|
|
545
584
|
"views.editors.place-region-area",
|
|
546
585
|
"views.editors.place-region-county",
|
|
547
586
|
"views.editors.place-region-department",
|
|
@@ -736,6 +775,24 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
736
775
|
"views.picker.back",
|
|
737
776
|
"views.picker.row-actions",
|
|
738
777
|
"views.picker.you",
|
|
778
|
+
"views.editors.links-search",
|
|
779
|
+
"views.editors.links-roles",
|
|
780
|
+
"views.editors.links-add",
|
|
781
|
+
"views.editors.links-add-to",
|
|
782
|
+
"views.editors.links-link",
|
|
783
|
+
"views.editors.links-unlink",
|
|
784
|
+
"views.editors.links-unlink-record",
|
|
785
|
+
"views.editors.links-is-lead",
|
|
786
|
+
"views.editors.links-edit",
|
|
787
|
+
"views.editors.links-menu",
|
|
788
|
+
"views.editors.links-field-at",
|
|
789
|
+
"views.editors.links-search-roles",
|
|
790
|
+
"views.editors.links-none",
|
|
791
|
+
"views.editors.links-no-details",
|
|
792
|
+
"views.editors.links-yes",
|
|
793
|
+
"views.editors.links-no",
|
|
794
|
+
"views.editors.links-all-linked",
|
|
795
|
+
"views.editors.links-done",
|
|
739
796
|
"views.panels.date-range-all",
|
|
740
797
|
"views.panels.date-range-between",
|
|
741
798
|
"views.panels.date-range-from",
|
|
@@ -759,6 +816,7 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
759
816
|
"views.panels.view-change",
|
|
760
817
|
"views.panels.view-fallback",
|
|
761
818
|
"views.panels.views-search",
|
|
819
|
+
"views.panels.views-find",
|
|
762
820
|
"views.panels.views-list",
|
|
763
821
|
"views.panels.views-shared",
|
|
764
822
|
"views.panels.views-personal",
|
|
@@ -876,6 +934,9 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
876
934
|
"views.panels.sort-actions",
|
|
877
935
|
"views.panels.sort-search",
|
|
878
936
|
"views.panels.sort-done",
|
|
937
|
+
"views.panels.sort-field",
|
|
938
|
+
"views.panels.sort-clear-all-sorts",
|
|
939
|
+
"views.panels.sort-by-named",
|
|
879
940
|
"views.panels.quick-filters",
|
|
880
941
|
"views.panels.quick-fields",
|
|
881
942
|
"views.panels.quick-search",
|
|
@@ -933,6 +994,25 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
933
994
|
"views.panels.filter-delete",
|
|
934
995
|
"views.panels.filter-more",
|
|
935
996
|
"views.panels.filter-more-named",
|
|
997
|
+
"views.panels.filter-group-list",
|
|
998
|
+
"views.panels.filter-rule-named",
|
|
999
|
+
"views.panels.filter-way-named",
|
|
1000
|
+
"views.panels.filter-choose-date",
|
|
1001
|
+
"views.panels.filter-type-number",
|
|
1002
|
+
"views.panels.filter-type-value",
|
|
1003
|
+
"views.panels.filter-from-named",
|
|
1004
|
+
"views.panels.filter-to-named",
|
|
1005
|
+
"views.panels.filter-checked",
|
|
1006
|
+
"views.panels.filter-unchecked",
|
|
1007
|
+
"views.panels.filter-kit-way",
|
|
1008
|
+
"views.panels.group-order",
|
|
1009
|
+
"views.panels.group-date-step",
|
|
1010
|
+
"views.panels.group-order-own",
|
|
1011
|
+
"views.panels.group-own-no-direction",
|
|
1012
|
+
"views.panels.group-no-value",
|
|
1013
|
+
"views.panels.list-move-keys",
|
|
1014
|
+
"views.panels.list-move-hold",
|
|
1015
|
+
"views.panels.list-moved",
|
|
936
1016
|
"views.panels.group-order-date",
|
|
937
1017
|
"views.panels.group-order-lifecycle",
|
|
938
1018
|
"views.panels.granularity-relative",
|
|
@@ -1040,6 +1120,12 @@ function relationSentenceWords(values) {
|
|
|
1040
1120
|
}
|
|
1041
1121
|
}
|
|
1042
1122
|
const RELATION_CHOICE = { any: "Any", none: "No", every: "Every" };
|
|
1123
|
+
const KIT_WAYS = {
|
|
1124
|
+
is: "is", "is-not": "is not", "is-any-of": "is any of", "is-none-of": "is none of", empty: "empty", "not-empty": "not empty",
|
|
1125
|
+
"less-than": "less than", "greater-than": "greater than", contains: "contains", "does-not-contain": "does not contain",
|
|
1126
|
+
"starts-with": "starts with", "ends-with": "ends with", before: "before", after: "after",
|
|
1127
|
+
"any-part-between": "any part between", "entirely-within": "entirely within", includes: "includes", "at-least": "at least", "at-most": "at most",
|
|
1128
|
+
};
|
|
1043
1129
|
export function resolveViewsMessage(message) {
|
|
1044
1130
|
switch (message.key) {
|
|
1045
1131
|
case "views.editors.tag-remove":
|
|
@@ -1068,6 +1154,64 @@ export function resolveViewsMessage(message) {
|
|
|
1068
1154
|
return `Make ${message.values.value} the main one`;
|
|
1069
1155
|
case "views.editors.values-remove":
|
|
1070
1156
|
return `Remove ${message.values.value}`;
|
|
1157
|
+
case "views.editors.values-line-email":
|
|
1158
|
+
return "Add email…";
|
|
1159
|
+
case "views.editors.values-line-link":
|
|
1160
|
+
return "Add link…";
|
|
1161
|
+
case "views.editors.values-line-domain":
|
|
1162
|
+
return "Add domain…";
|
|
1163
|
+
case "views.editors.values-card-line-email":
|
|
1164
|
+
return "Add email";
|
|
1165
|
+
case "views.editors.values-card-line-link":
|
|
1166
|
+
return "Add link";
|
|
1167
|
+
case "views.editors.values-card-line-domain":
|
|
1168
|
+
return "Add domain";
|
|
1169
|
+
case "views.editors.values-add-email":
|
|
1170
|
+
return "Add an email";
|
|
1171
|
+
case "views.editors.values-add-phone":
|
|
1172
|
+
return "Add a phone";
|
|
1173
|
+
case "views.editors.values-add-link":
|
|
1174
|
+
return "Add a link";
|
|
1175
|
+
case "views.editors.values-add-domain":
|
|
1176
|
+
return "Add a domain";
|
|
1177
|
+
case "views.editors.values-nth-email":
|
|
1178
|
+
return `email ${message.values.n}`;
|
|
1179
|
+
case "views.editors.values-nth-phone":
|
|
1180
|
+
return `phone ${message.values.n}`;
|
|
1181
|
+
case "views.editors.values-nth-link":
|
|
1182
|
+
return `link ${message.values.n}`;
|
|
1183
|
+
case "views.editors.values-nth-domain":
|
|
1184
|
+
return `domain ${message.values.n}`;
|
|
1185
|
+
case "views.editors.values-change":
|
|
1186
|
+
return `Change ${message.values.value}`;
|
|
1187
|
+
case "views.editors.values-copy":
|
|
1188
|
+
return `Copy ${message.values.value}`;
|
|
1189
|
+
case "views.editors.values-move":
|
|
1190
|
+
return `Move ${message.values.value}`;
|
|
1191
|
+
case "views.editors.values-label-is":
|
|
1192
|
+
return `Label: ${message.values.label}`;
|
|
1193
|
+
case "views.editors.values-no-label":
|
|
1194
|
+
return "none";
|
|
1195
|
+
case "views.editors.values-label-search":
|
|
1196
|
+
return "Search or type a label";
|
|
1197
|
+
case "views.editors.values-label-find":
|
|
1198
|
+
return "Find or type a label";
|
|
1199
|
+
case "views.editors.values-country-code":
|
|
1200
|
+
return "Country code";
|
|
1201
|
+
case "views.editors.values-country-is":
|
|
1202
|
+
return `Country: ${message.values.country}`;
|
|
1203
|
+
case "views.editors.values-country-code-is":
|
|
1204
|
+
return `Country code: ${message.values.country}`;
|
|
1205
|
+
case "views.editors.values-back-to":
|
|
1206
|
+
return `Back to ${message.values.label}`;
|
|
1207
|
+
case "views.editors.values-label-work":
|
|
1208
|
+
return "Work";
|
|
1209
|
+
case "views.editors.values-label-personal":
|
|
1210
|
+
return "Personal";
|
|
1211
|
+
case "views.editors.values-label-mobile":
|
|
1212
|
+
return "Mobile";
|
|
1213
|
+
case "views.editors.values-label-other":
|
|
1214
|
+
return "Other";
|
|
1071
1215
|
case "views.editors.discard":
|
|
1072
1216
|
return "Discard";
|
|
1073
1217
|
case "views.editors.save":
|
|
@@ -1140,6 +1284,18 @@ export function resolveViewsMessage(message) {
|
|
|
1140
1284
|
return "Decrease";
|
|
1141
1285
|
case "views.editors.number-field":
|
|
1142
1286
|
return "Number field";
|
|
1287
|
+
case "views.editors.number-unit":
|
|
1288
|
+
return "Unit";
|
|
1289
|
+
case "views.editors.number-find-currency":
|
|
1290
|
+
return "Find a currency";
|
|
1291
|
+
case "views.editors.number-search-currency":
|
|
1292
|
+
return "Search for a currency";
|
|
1293
|
+
case "views.editors.number-find-unit":
|
|
1294
|
+
return "Find a unit";
|
|
1295
|
+
case "views.editors.number-search-unit":
|
|
1296
|
+
return "Search for a unit";
|
|
1297
|
+
case "views.editors.number-unit-named":
|
|
1298
|
+
return `${message.values.unit}: ${message.values.name}`;
|
|
1143
1299
|
case "views.editors.place-region-area":
|
|
1144
1300
|
return "Area";
|
|
1145
1301
|
case "views.editors.place-region-county":
|
|
@@ -1528,6 +1684,42 @@ export function resolveViewsMessage(message) {
|
|
|
1528
1684
|
return `Actions for ${message.values.label}`;
|
|
1529
1685
|
case "views.picker.you":
|
|
1530
1686
|
return "you";
|
|
1687
|
+
case "views.editors.links-search":
|
|
1688
|
+
return "Search…";
|
|
1689
|
+
case "views.editors.links-roles":
|
|
1690
|
+
return "Roles";
|
|
1691
|
+
case "views.editors.links-add":
|
|
1692
|
+
return "Add";
|
|
1693
|
+
case "views.editors.links-add-to":
|
|
1694
|
+
return `Add to ${message.values.label}`;
|
|
1695
|
+
case "views.editors.links-link":
|
|
1696
|
+
return `Link ${message.values.label}`;
|
|
1697
|
+
case "views.editors.links-unlink":
|
|
1698
|
+
return "Unlink";
|
|
1699
|
+
case "views.editors.links-unlink-record":
|
|
1700
|
+
return `Unlink ${message.values.label}`;
|
|
1701
|
+
case "views.editors.links-is-lead":
|
|
1702
|
+
return `${message.values.label} is the ${message.values.lead.toLowerCase()}`;
|
|
1703
|
+
case "views.editors.links-edit":
|
|
1704
|
+
return `Edit the link to ${message.values.label}`;
|
|
1705
|
+
case "views.editors.links-menu":
|
|
1706
|
+
return `the link to ${message.values.label}`;
|
|
1707
|
+
case "views.editors.links-field-at":
|
|
1708
|
+
return `${message.values.field} at ${message.values.label}`;
|
|
1709
|
+
case "views.editors.links-search-roles":
|
|
1710
|
+
return "Search roles…";
|
|
1711
|
+
case "views.editors.links-none":
|
|
1712
|
+
return "None";
|
|
1713
|
+
case "views.editors.links-no-details":
|
|
1714
|
+
return "No details";
|
|
1715
|
+
case "views.editors.links-yes":
|
|
1716
|
+
return "Yes";
|
|
1717
|
+
case "views.editors.links-no":
|
|
1718
|
+
return "No";
|
|
1719
|
+
case "views.editors.links-all-linked":
|
|
1720
|
+
return "Everything is linked.";
|
|
1721
|
+
case "views.editors.links-done":
|
|
1722
|
+
return "Done";
|
|
1531
1723
|
case "views.panels.relation-value-one":
|
|
1532
1724
|
return `${message.values.quantifier} · ${message.values.field}: ${message.values.value}`;
|
|
1533
1725
|
case "views.panels.relation-value-many":
|
|
@@ -1583,6 +1775,8 @@ export function resolveViewsMessage(message) {
|
|
|
1583
1775
|
return "View";
|
|
1584
1776
|
case "views.panels.views-search":
|
|
1585
1777
|
return "Search views…";
|
|
1778
|
+
case "views.panels.views-find":
|
|
1779
|
+
return "Find a view";
|
|
1586
1780
|
case "views.panels.views-list":
|
|
1587
1781
|
return "Views";
|
|
1588
1782
|
case "views.panels.views-shared":
|
|
@@ -1817,6 +2011,12 @@ export function resolveViewsMessage(message) {
|
|
|
1817
2011
|
return "Search fields";
|
|
1818
2012
|
case "views.panels.sort-done":
|
|
1819
2013
|
return "Done";
|
|
2014
|
+
case "views.panels.sort-field":
|
|
2015
|
+
return "Field";
|
|
2016
|
+
case "views.panels.sort-clear-all-sorts":
|
|
2017
|
+
return "Clear all sorts";
|
|
2018
|
+
case "views.panels.sort-by-named":
|
|
2019
|
+
return `the sort by ${message.values.label}`;
|
|
1820
2020
|
case "views.panels.quick-filters":
|
|
1821
2021
|
return "Quick filters";
|
|
1822
2022
|
case "views.panels.quick-fields":
|
|
@@ -1942,6 +2142,44 @@ export function resolveViewsMessage(message) {
|
|
|
1942
2142
|
return message.values.count === 1 ? "+1 filter" : `+${message.values.count} filters`;
|
|
1943
2143
|
case "views.panels.filter-more-named":
|
|
1944
2144
|
return message.values.count === 1 ? "1 more filter" : `${message.values.count} more filters`;
|
|
2145
|
+
case "views.panels.filter-group-list":
|
|
2146
|
+
return "Group";
|
|
2147
|
+
case "views.panels.filter-rule-named":
|
|
2148
|
+
return `${message.values.label}'s rule`;
|
|
2149
|
+
case "views.panels.filter-way-named":
|
|
2150
|
+
return `How ${message.values.label} compares`;
|
|
2151
|
+
case "views.panels.filter-choose-date":
|
|
2152
|
+
return "Choose a date";
|
|
2153
|
+
case "views.panels.filter-type-number":
|
|
2154
|
+
return "Type a number";
|
|
2155
|
+
case "views.panels.filter-type-value":
|
|
2156
|
+
return "Type a value";
|
|
2157
|
+
case "views.panels.filter-from-named":
|
|
2158
|
+
return `${message.values.label} from`;
|
|
2159
|
+
case "views.panels.filter-to-named":
|
|
2160
|
+
return `${message.values.label} to`;
|
|
2161
|
+
case "views.panels.filter-checked":
|
|
2162
|
+
return "Checked";
|
|
2163
|
+
case "views.panels.filter-unchecked":
|
|
2164
|
+
return "Unchecked";
|
|
2165
|
+
case "views.panels.filter-kit-way":
|
|
2166
|
+
return KIT_WAYS[message.values.way] ?? message.values.way.replace(/-/g, " ");
|
|
2167
|
+
case "views.panels.group-order":
|
|
2168
|
+
return "Order";
|
|
2169
|
+
case "views.panels.group-date-step":
|
|
2170
|
+
return "Date step";
|
|
2171
|
+
case "views.panels.group-order-own":
|
|
2172
|
+
return "Your own";
|
|
2173
|
+
case "views.panels.group-own-no-direction":
|
|
2174
|
+
return "Your own order has no direction";
|
|
2175
|
+
case "views.panels.group-no-value":
|
|
2176
|
+
return "No value";
|
|
2177
|
+
case "views.panels.list-move-keys":
|
|
2178
|
+
return "Left arrow for its grip, then up or down arrow to move it";
|
|
2179
|
+
case "views.panels.list-move-hold":
|
|
2180
|
+
return "Hold, then drag to move it";
|
|
2181
|
+
case "views.panels.list-moved":
|
|
2182
|
+
return `${message.values.label}, ${message.values.at} of ${message.values.of}`;
|
|
1945
2183
|
case "views.panels.group-order-date":
|
|
1946
2184
|
return "Date";
|
|
1947
2185
|
case "views.panels.group-order-lifecycle":
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** What its action does, which its colour says: a normal choice, worth knowing first, putting something back, changing a lot, or taking something away. */
|
|
3
|
+
export type AlertKind = "primary" | "information" | "success" | "warning" | "danger";
|
|
4
|
+
/** At rest; working on its action, when nothing else can be pressed; or failed, when it stays open and says so. */
|
|
5
|
+
export type AlertState = "rest" | "working" | "failed";
|
|
6
|
+
/** What one asks. */
|
|
7
|
+
export interface AlertAsk {
|
|
8
|
+
/** What it asks: "Archive Northbeam Logistics?" */
|
|
9
|
+
title: string;
|
|
10
|
+
/** One line on what follows. */
|
|
11
|
+
line?: React.ReactNode;
|
|
12
|
+
/** Its action's own word: "Archive". */
|
|
13
|
+
action: string;
|
|
14
|
+
/** Its action's colour. Primary unless said. */
|
|
15
|
+
kind?: AlertKind;
|
|
16
|
+
/** The way out's word: "Cancel" unless said. */
|
|
17
|
+
cancel?: string;
|
|
18
|
+
/** The mark, when an app's look shows one. The kind's own unless said. */
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
/** The work its action starts. It stays open and says it's working until this is done; if it throws, it stays open with what went wrong. */
|
|
21
|
+
run?: () => void | Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/** The words an Alert draws of its own: its action's, once it failed. */
|
|
24
|
+
export type AlertWords = {
|
|
25
|
+
tryAgain: string;
|
|
26
|
+
};
|
|
27
|
+
/** Its words in English. */
|
|
28
|
+
export declare const ALERT_WORDS: AlertWords;
|
|
29
|
+
export interface AlertProps extends Omit<AlertAsk, "run"> {
|
|
30
|
+
/** Its answer: true for the action, false for the way out. */
|
|
31
|
+
onAnswer: (yes: boolean) => void;
|
|
32
|
+
state?: AlertState;
|
|
33
|
+
/** What went wrong, in place of its line, when it failed. */
|
|
34
|
+
failed?: React.ReactNode;
|
|
35
|
+
/** It stands on the phone. */
|
|
36
|
+
phone?: boolean;
|
|
37
|
+
/** What it stands in: the Alert Dialog's panel, or a Sheet. */
|
|
38
|
+
shell?: "panel" | "sheet";
|
|
39
|
+
cancelRef?: React.Ref<HTMLButtonElement>;
|
|
40
|
+
Title?: React.ElementType;
|
|
41
|
+
Line?: React.ElementType;
|
|
42
|
+
/** Its own words, over the English. */
|
|
43
|
+
words?: Partial<AlertWords>;
|
|
44
|
+
}
|
|
45
|
+
/** What it says, and its two answers. It knows no shell. */
|
|
46
|
+
export declare function Alert({ title, line, action, kind, cancel, icon, onAnswer, state, failed, phone, shell, cancelRef, Title, Line, words }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "../../internal/cx.js";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
|
+
import { NOTICE_ICONS } from "../notice/notice.js";
|
|
5
|
+
const glyph = (paths) => _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: paths.map((d) => _jsx("path", { d: d }, d)) });
|
|
6
|
+
export const ALERT_WORDS = { tryAgain: "Try again" };
|
|
7
|
+
const MARK = { primary: NOTICE_ICONS.information, information: NOTICE_ICONS.information, success: NOTICE_ICONS.success, warning: NOTICE_ICONS.warning, danger: NOTICE_ICONS.danger };
|
|
8
|
+
export function Alert({ title, line, action, kind = "primary", cancel = "Cancel", icon, onAnswer, state = "rest", failed, phone = false, shell = "panel", cancelRef, Title = "h2", Line = "p", words }) {
|
|
9
|
+
const working = state === "working", wrong = state === "failed", size = phone ? "lg" : undefined, says = wrong ? failed : line;
|
|
10
|
+
return (_jsxs("div", { className: "o-alert-body", "data-kind": kind, "data-screen": phone ? "phone" : "computer", "data-shell": shell, "data-kit": "alert", children: [_jsx("span", { className: "o-alert-mark", "aria-hidden": "true", children: icon ?? glyph(MARK[kind]) }), _jsx(Title, { className: "o-alert-title", children: title }), says != null && _jsx(Line, { className: cx("o-alert-line", wrong && "o-alert-wrong"), children: says }), _jsxs("div", { className: "o-alert-foot", children: [_jsx(Button, { ref: cancelRef, size: size, className: "o-alert-cancel", disabled: working, onClick: () => onAnswer(false), children: cancel }), _jsx(Button, { kind: kind, size: size, loading: working, onClick: () => onAnswer(true), children: wrong ? (words?.tryAgain ?? ALERT_WORDS.tryAgain) : action })] })] }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PieceLooks } from "../../looks/looks.js";
|
|
2
|
+
export type AlertOptionId = "buttons" | "size" | "pair" | "mark" | "phone";
|
|
3
|
+
/** The Alert's options and its looks: Even has Attio's shape, Plain CloudWorks', Marked Atlas'. */
|
|
4
|
+
export declare const ALERT_LOOKS: PieceLooks<AlertOptionId>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const steps = (ids) => ids.map((id) => ({ id, name: id }));
|
|
2
|
+
const options = [
|
|
3
|
+
{ id: "buttons", name: "Buttons", device: "desktop", def: "end", values: [{ id: "end", name: "At the end" }, { id: "full", name: "Full width" }] },
|
|
4
|
+
{ id: "size", name: "Button size", device: "desktop", def: "36", kind: "steps", values: steps(["32", "36", "44"]) },
|
|
5
|
+
{ id: "pair", name: "Buttons", device: "phone", def: "side", values: [{ id: "side", name: "Side by side" }, { id: "stacked", name: "Stacked" }] },
|
|
6
|
+
{ id: "mark", name: "Mark", def: "none", values: [{ id: "none", name: "None" }, { id: "shown", name: "Shown" }] },
|
|
7
|
+
{ id: "phone", name: "Opens as", device: "phone", def: "panel", values: [{ id: "panel", name: "Panel" }, { id: "sheet", name: "Sheet" }] },
|
|
8
|
+
];
|
|
9
|
+
const shared = { size: "36", pair: "side", phone: "panel" };
|
|
10
|
+
export const ALERT_LOOKS = {
|
|
11
|
+
id: "alert",
|
|
12
|
+
name: "Alert",
|
|
13
|
+
options,
|
|
14
|
+
looks: [
|
|
15
|
+
{ id: "even", name: "Even", picks: { ...shared, buttons: "full", mark: "none" } },
|
|
16
|
+
{ id: "plain", name: "Plain", picks: { ...shared, buttons: "end", mark: "none" } },
|
|
17
|
+
{ id: "marked", name: "Marked", picks: { ...shared, buttons: "full", mark: "shown" } },
|
|
18
|
+
],
|
|
19
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const ALERT_TOKENS: readonly [{
|
|
2
|
+
readonly name: "--vk-fg";
|
|
3
|
+
readonly kind: "colour";
|
|
4
|
+
readonly outright: "--text";
|
|
5
|
+
}, {
|
|
6
|
+
readonly name: "--vk-spacing";
|
|
7
|
+
readonly kind: "size";
|
|
8
|
+
readonly outright: "--spacing";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "--vk-font-size-lg";
|
|
11
|
+
readonly kind: "size";
|
|
12
|
+
readonly outright: "--text-lg";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "--vk-font-size-base";
|
|
15
|
+
readonly kind: "size";
|
|
16
|
+
readonly outright: "--text-base";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "--vk-line-height-base";
|
|
19
|
+
readonly kind: "size";
|
|
20
|
+
readonly outright: "--text-base--line-height";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "--vk-font-weight-semibold";
|
|
23
|
+
readonly kind: "size";
|
|
24
|
+
readonly outright: "--font-weight-semibold";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "--vk-font-size-sm";
|
|
27
|
+
readonly kind: "size";
|
|
28
|
+
readonly outright: "--text-sm";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "--vk-line-height-sm";
|
|
31
|
+
readonly kind: "size";
|
|
32
|
+
readonly outright: "--text-sm--line-height";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "--vk-fg-subtle";
|
|
35
|
+
readonly kind: "colour";
|
|
36
|
+
readonly outright: "--text-subtle";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "--vk-danger";
|
|
39
|
+
readonly kind: "colour";
|
|
40
|
+
readonly outright: "--text-danger";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "--vk-overlay-card";
|
|
43
|
+
readonly kind: "colour";
|
|
44
|
+
readonly outright: "--surface-overlay-card";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "--vk-overlay-card-pressed";
|
|
47
|
+
readonly kind: "colour";
|
|
48
|
+
readonly outright: "--surface-overlay-card-pressed";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "--vk-radius-full";
|
|
51
|
+
readonly kind: "size";
|
|
52
|
+
readonly outright: "--radius-full";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "--vk-brand-subtler";
|
|
55
|
+
readonly kind: "colour";
|
|
56
|
+
readonly outright: "--background-brand-subtler";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "--vk-fg-accent";
|
|
59
|
+
readonly kind: "colour";
|
|
60
|
+
readonly outright: "--text-brand";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "--vk-info-subtler";
|
|
63
|
+
readonly kind: "colour";
|
|
64
|
+
readonly outright: "--background-information-subtler";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "--vk-info";
|
|
67
|
+
readonly kind: "colour";
|
|
68
|
+
readonly outright: "--text-information";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "--vk-success-subtler";
|
|
71
|
+
readonly kind: "colour";
|
|
72
|
+
readonly outright: "--background-success-subtler";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "--vk-success";
|
|
75
|
+
readonly kind: "colour";
|
|
76
|
+
readonly outright: "--text-success";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "--vk-warning-subtler";
|
|
79
|
+
readonly kind: "colour";
|
|
80
|
+
readonly outright: "--background-warning-subtler";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "--vk-warning";
|
|
83
|
+
readonly kind: "colour";
|
|
84
|
+
readonly outright: "--text-warning";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "--vk-danger-subtler";
|
|
87
|
+
readonly kind: "colour";
|
|
88
|
+
readonly outright: "--background-danger-subtler";
|
|
89
|
+
}];
|
|
90
|
+
/** The Alert's own machinery: how far its words stand from the panel's edge (`--alert-padding`, which the alert dialog's panel
|
|
91
|
+
* sets), and the alert dialog's panel's own (its corners, margins, the edge's corner). */
|
|
92
|
+
export declare const ALERT_PRIVATE: readonly ["--alert-"];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const ALERT_TOKENS = [
|
|
2
|
+
{ name: "--vk-fg", kind: "colour", outright: "--text" },
|
|
3
|
+
{ name: "--vk-spacing", kind: "size", outright: "--spacing" },
|
|
4
|
+
{ name: "--vk-font-size-lg", kind: "size", outright: "--text-lg" },
|
|
5
|
+
{ name: "--vk-font-size-base", kind: "size", outright: "--text-base" },
|
|
6
|
+
{ name: "--vk-line-height-base", kind: "size", outright: "--text-base--line-height" },
|
|
7
|
+
{ name: "--vk-font-weight-semibold", kind: "size", outright: "--font-weight-semibold" },
|
|
8
|
+
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
9
|
+
{ name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
|
|
10
|
+
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
11
|
+
{ name: "--vk-danger", kind: "colour", outright: "--text-danger" },
|
|
12
|
+
{ name: "--vk-overlay-card", kind: "colour", outright: "--surface-overlay-card" },
|
|
13
|
+
{ name: "--vk-overlay-card-pressed", kind: "colour", outright: "--surface-overlay-card-pressed" },
|
|
14
|
+
{ name: "--vk-radius-full", kind: "size", outright: "--radius-full" },
|
|
15
|
+
{ name: "--vk-brand-subtler", kind: "colour", outright: "--background-brand-subtler" },
|
|
16
|
+
{ name: "--vk-fg-accent", kind: "colour", outright: "--text-brand" },
|
|
17
|
+
{ name: "--vk-info-subtler", kind: "colour", outright: "--background-information-subtler" },
|
|
18
|
+
{ name: "--vk-info", kind: "colour", outright: "--text-information" },
|
|
19
|
+
{ name: "--vk-success-subtler", kind: "colour", outright: "--background-success-subtler" },
|
|
20
|
+
{ name: "--vk-success", kind: "colour", outright: "--text-success" },
|
|
21
|
+
{ name: "--vk-warning-subtler", kind: "colour", outright: "--background-warning-subtler" },
|
|
22
|
+
{ name: "--vk-warning", kind: "colour", outright: "--text-warning" },
|
|
23
|
+
{ name: "--vk-danger-subtler", kind: "colour", outright: "--background-danger-subtler" },
|
|
24
|
+
];
|
|
25
|
+
export const ALERT_PRIVATE = ["--alert-"];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type AlertAsk, type AlertState, type AlertWords } from "../alert/alert.js";
|
|
3
|
+
export { confirm } from "./confirm.js";
|
|
4
|
+
/** The words an alert dialog draws of its own: its X's name, what a failure says when its work threw no words, and the Alert's. */
|
|
5
|
+
export type AlertDialogWords = {
|
|
6
|
+
close: string;
|
|
7
|
+
failed: string;
|
|
8
|
+
} & AlertWords;
|
|
9
|
+
/** Its words in English. */
|
|
10
|
+
export declare const ALERT_DIALOG_WORDS: AlertDialogWords;
|
|
11
|
+
export interface AlertDialogProps extends AlertAsk {
|
|
12
|
+
open: boolean;
|
|
13
|
+
/** Told when it closes, with its answer. */
|
|
14
|
+
onAnswer: (yes: boolean) => void;
|
|
15
|
+
/** Shown as it stands, on a page that shows one. Left out, its own. */
|
|
16
|
+
state?: AlertState;
|
|
17
|
+
/** What went wrong, on a page that shows one. Left out, what its `run` threw. */
|
|
18
|
+
failed?: React.ReactNode;
|
|
19
|
+
/** Where it is drawn: over the whole page, or inside an element that holds it as a window holds a page. */
|
|
20
|
+
container?: HTMLElement | null;
|
|
21
|
+
/** It stands in `container`, a screen on a page that shows it: what's round that screen stays live. */
|
|
22
|
+
standing?: boolean;
|
|
23
|
+
/** Its own words, over the English. */
|
|
24
|
+
words?: Partial<AlertDialogWords>;
|
|
25
|
+
}
|
|
26
|
+
export interface AlertDialogPanelProps {
|
|
27
|
+
open: boolean;
|
|
28
|
+
/** Told when a way out closes it: Escape, or its X. */
|
|
29
|
+
onClose: () => void;
|
|
30
|
+
/** It stands on the phone. */
|
|
31
|
+
phone: boolean;
|
|
32
|
+
/** Its X can't be pressed: the Alert in it is working. */
|
|
33
|
+
busy?: boolean;
|
|
34
|
+
container?: HTMLElement | null;
|
|
35
|
+
standing?: boolean;
|
|
36
|
+
/** Where focus starts, when it isn't standing on a page. */
|
|
37
|
+
initialFocus?: React.RefObject<HTMLElement | null>;
|
|
38
|
+
/** Its X's name on the phone: "Close" unless said. */
|
|
39
|
+
close?: string;
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/** The panel alone, round what it holds: what's behind it, the panel in the middle of the screen, and its X on the phone. */
|
|
43
|
+
export declare function AlertDialogPanel({ open, onClose, phone, busy, container, standing, initialFocus, close, children }: AlertDialogPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
/** Asks one thing, in the place an app picked: its panel, or on the phone a Sheet. `confirm()` opens one from anywhere. */
|
|
45
|
+
export declare function AlertDialog({ open, onAnswer, state, failed, container, standing, run, words, ...ask }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
/** Where `confirm()` shows. Put it in the app once. */
|
|
47
|
+
export declare function AlertDialogHost({ container, words }: {
|
|
48
|
+
container?: HTMLElement | null;
|
|
49
|
+
words?: Partial<AlertDialogWords>;
|
|
50
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|