@ezpg/app-ui 0.10.0 → 0.12.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 +19 -0
- package/lib/module/adjust/dial-strip.js +2 -2
- package/lib/module/adjust/dial-strip.js.map +1 -1
- package/lib/module/adjust/font-controls.js +76 -0
- package/lib/module/adjust/font-controls.js.map +1 -0
- package/lib/module/adjust/index.js +1 -0
- package/lib/module/adjust/index.js.map +1 -1
- package/lib/module/blocks/action-grid/action-grid.js +71 -0
- package/lib/module/blocks/action-grid/action-grid.js.map +1 -0
- package/lib/module/blocks/action-grid/index.js +4 -0
- package/lib/module/blocks/action-grid/index.js.map +1 -0
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js +75 -33
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js.map +1 -1
- package/lib/module/blocks/code-input/code-input.js +103 -0
- package/lib/module/blocks/code-input/code-input.js.map +1 -0
- package/lib/module/blocks/code-input/index.js +4 -0
- package/lib/module/blocks/code-input/index.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +27 -4
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -1
- package/lib/module/blocks/consent-list/consent-list.js +116 -0
- package/lib/module/blocks/consent-list/consent-list.js.map +1 -0
- package/lib/module/blocks/consent-list/index.js +4 -0
- package/lib/module/blocks/consent-list/index.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +1 -1
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -1
- package/lib/module/blocks/image-grid/image-grid.js +5 -44
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -1
- package/lib/module/blocks/inbox-row/inbox-row.js +120 -0
- package/lib/module/blocks/inbox-row/inbox-row.js.map +1 -0
- package/lib/module/blocks/inbox-row/index.js +4 -0
- package/lib/module/blocks/inbox-row/index.js.map +1 -0
- package/lib/module/blocks/index.js +11 -0
- package/lib/module/blocks/index.js.map +1 -1
- package/lib/module/blocks/internal/card.js +1 -1
- package/lib/module/blocks/internal/card.js.map +1 -1
- package/lib/module/blocks/invite-card/index.js +4 -0
- package/lib/module/blocks/invite-card/index.js.map +1 -0
- package/lib/module/blocks/invite-card/invite-card.js +156 -0
- package/lib/module/blocks/invite-card/invite-card.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/index.js +1 -1
- package/lib/module/blocks/oauth-buttons/index.js.map +1 -1
- package/lib/module/blocks/oauth-buttons/logos.js +7 -0
- package/lib/module/blocks/oauth-buttons/logos.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +84 -5
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
- package/lib/module/blocks/option-editor/option-editor.js +1 -1
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -1
- package/lib/module/blocks/product-list-empty/product-list-empty.js +1 -1
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -1
- package/lib/module/blocks/product-row/product-row.js +1 -1
- package/lib/module/blocks/product-row/product-row.js.map +1 -1
- package/lib/module/blocks/product-tile/index.js +4 -0
- package/lib/module/blocks/product-tile/index.js.map +1 -0
- package/lib/module/blocks/product-tile/product-tile.js +60 -0
- package/lib/module/blocks/product-tile/product-tile.js.map +1 -0
- package/lib/module/blocks/quick-actions/index.js +4 -0
- package/lib/module/blocks/quick-actions/index.js.map +1 -0
- package/lib/module/blocks/quick-actions/quick-actions.js +52 -0
- package/lib/module/blocks/quick-actions/quick-actions.js.map +1 -0
- package/lib/module/blocks/selection-bar/selection-bar.js +1 -1
- package/lib/module/blocks/selection-bar/selection-bar.js.map +1 -1
- package/lib/module/blocks/setup-guide/index.js +4 -0
- package/lib/module/blocks/setup-guide/index.js.map +1 -0
- package/lib/module/blocks/setup-guide/setup-guide.js +102 -0
- package/lib/module/blocks/setup-guide/setup-guide.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +1 -1
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -1
- package/lib/module/blocks/site-summary/index.js +4 -0
- package/lib/module/blocks/site-summary/index.js.map +1 -0
- package/lib/module/blocks/site-summary/site-summary.js +81 -0
- package/lib/module/blocks/site-summary/site-summary.js.map +1 -0
- package/lib/module/blocks/stage-bar/index.js +4 -0
- package/lib/module/blocks/stage-bar/index.js.map +1 -0
- package/lib/module/blocks/stage-bar/stage-bar.js +88 -0
- package/lib/module/blocks/stage-bar/stage-bar.js.map +1 -0
- package/lib/module/blocks/stat-card/stat-card.js +18 -4
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
- package/lib/module/blocks/step-screen/step-screen.js +54 -27
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
- package/lib/module/blocks/store-sheet/index.js +4 -0
- package/lib/module/blocks/store-sheet/index.js.map +1 -0
- package/lib/module/blocks/store-sheet/store-sheet.js +90 -0
- package/lib/module/blocks/store-sheet/store-sheet.js.map +1 -0
- package/lib/module/blocks/task-tiles/index.js +4 -0
- package/lib/module/blocks/task-tiles/index.js.map +1 -0
- package/lib/module/blocks/task-tiles/task-tiles.js +68 -0
- package/lib/module/blocks/task-tiles/task-tiles.js.map +1 -0
- package/lib/module/charts/index.js +1 -0
- package/lib/module/charts/index.js.map +1 -1
- package/lib/module/charts/mini-bars.js +75 -0
- package/lib/module/charts/mini-bars.js.map +1 -0
- package/lib/module/components/avatar/avatar.js +100 -0
- package/lib/module/components/avatar/avatar.js.map +1 -0
- package/lib/module/components/avatar/index.js +4 -0
- package/lib/module/components/avatar/index.js.map +1 -0
- package/lib/module/components/button/button.js +1 -1
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/calendar/calendar.js +200 -103
- package/lib/module/components/calendar/calendar.js.map +1 -1
- package/lib/module/components/check-list/check-list.js +54 -0
- package/lib/module/components/check-list/check-list.js.map +1 -0
- package/lib/module/components/check-list/index.js +4 -0
- package/lib/module/components/check-list/index.js.map +1 -0
- package/lib/module/components/checkbox/checkbox.js +1 -1
- package/lib/module/components/checkbox/checkbox.js.map +1 -1
- package/lib/module/components/chip/chip.js +33 -6
- package/lib/module/components/chip/chip.js.map +1 -1
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/chip-group/chip-group.js +42 -17
- package/lib/module/components/chip-group/chip-group.js.map +1 -1
- package/lib/module/components/circle-grid/circle-grid.js +141 -0
- package/lib/module/components/circle-grid/circle-grid.js.map +1 -0
- package/lib/module/components/circle-grid/index.js +4 -0
- package/lib/module/components/circle-grid/index.js.map +1 -0
- package/lib/module/components/dialog/dialog.js +1 -1
- package/lib/module/components/dialog/dialog.js.map +1 -1
- package/lib/module/components/empty-state/empty-state.js +15 -0
- package/lib/module/components/empty-state/empty-state.js.map +1 -1
- package/lib/module/components/field/field.js +11 -6
- package/lib/module/components/field/field.js.map +1 -1
- package/lib/module/components/field-group/field-group.js +39 -0
- package/lib/module/components/field-group/field-group.js.map +1 -0
- package/lib/module/components/field-group/index.js +4 -0
- package/lib/module/components/field-group/index.js.map +1 -0
- package/lib/module/components/list-row/list-row.js +56 -7
- package/lib/module/components/list-row/list-row.js.map +1 -1
- package/lib/module/components/page-header/index.js +5 -0
- package/lib/module/components/page-header/index.js.map +1 -0
- package/lib/module/components/page-header/page-header.js +110 -0
- package/lib/module/components/page-header/page-header.js.map +1 -0
- package/lib/module/components/page-header/store-header.js +134 -0
- package/lib/module/components/page-header/store-header.js.map +1 -0
- package/lib/module/components/photo/index.js +1 -0
- package/lib/module/components/photo/index.js.map +1 -1
- package/lib/module/components/photo/photo.js +15 -3
- package/lib/module/components/photo/photo.js.map +1 -1
- package/lib/module/components/progress-circle/index.js +4 -0
- package/lib/module/components/progress-circle/index.js.map +1 -0
- package/lib/module/components/progress-circle/progress-circle.js +49 -0
- package/lib/module/components/progress-circle/progress-circle.js.map +1 -0
- package/lib/module/components/result-mark/index.js +4 -0
- package/lib/module/components/result-mark/index.js.map +1 -0
- package/lib/module/components/result-mark/result-mark.js +42 -0
- package/lib/module/components/result-mark/result-mark.js.map +1 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js +1 -1
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
- package/lib/module/components/sheet/index.js +1 -1
- package/lib/module/components/sheet/index.js.map +1 -1
- package/lib/module/components/sheet/sheet.js +28 -2
- package/lib/module/components/sheet/sheet.js.map +1 -1
- package/lib/module/components/status-steps/index.js +4 -0
- package/lib/module/components/status-steps/index.js.map +1 -0
- package/lib/module/components/status-steps/status-steps.js +96 -0
- package/lib/module/components/status-steps/status-steps.js.map +1 -0
- package/lib/module/components/step-slider/index.js +4 -0
- package/lib/module/components/step-slider/index.js.map +1 -0
- package/lib/module/components/step-slider/step-slider.js +167 -0
- package/lib/module/components/step-slider/step-slider.js.map +1 -0
- package/lib/module/components/text/text.js +3 -0
- package/lib/module/components/text/text.js.map +1 -1
- package/lib/module/components/text-links/index.js +4 -0
- package/lib/module/components/text-links/index.js.map +1 -0
- package/lib/module/components/text-links/text-links.js +48 -0
- package/lib/module/components/text-links/text-links.js.map +1 -0
- package/lib/module/index.js +12 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/bell.js +4 -0
- package/lib/module/internal/bell.js.map +1 -0
- package/lib/module/internal/glyphs.js +47 -1
- package/lib/module/internal/glyphs.js.map +1 -1
- package/lib/module/internal/line-icons.js +21 -0
- package/lib/module/internal/line-icons.js.map +1 -0
- package/lib/module/internal/tab-icons.js +10 -0
- package/lib/module/internal/tab-icons.js.map +1 -0
- package/lib/module/templates/calendar-template.js +42 -0
- package/lib/module/templates/calendar-template.js.map +1 -0
- package/lib/module/templates/editor-template.js +2 -2
- package/lib/module/templates/editor-template.js.map +1 -1
- package/lib/module/templates/index.js +2 -0
- package/lib/module/templates/index.js.map +1 -1
- package/lib/module/templates/intro-template.js +1 -1
- package/lib/module/templates/list-template.js +50 -5
- package/lib/module/templates/list-template.js.map +1 -1
- package/lib/module/templates/notice-template.js +138 -0
- package/lib/module/templates/notice-template.js.map +1 -0
- package/lib/module/templates/parts.js +42 -1
- package/lib/module/templates/parts.js.map +1 -1
- package/lib/module/templates/result-template.js +17 -3
- package/lib/module/templates/result-template.js.map +1 -1
- package/lib/module/templates/scroll-templates.js +50 -1
- package/lib/module/templates/scroll-templates.js.map +1 -1
- package/lib/module/templates/system-template.js +18 -2
- package/lib/module/templates/system-template.js.map +1 -1
- package/lib/module/theme/base.js +20 -15
- package/lib/module/theme/base.js.map +1 -1
- package/lib/typescript/src/adjust/dial-strip.d.ts +1 -0
- package/lib/typescript/src/adjust/dial-strip.d.ts.map +1 -1
- package/lib/typescript/src/adjust/font-controls.d.ts +21 -0
- package/lib/typescript/src/adjust/font-controls.d.ts.map +1 -0
- package/lib/typescript/src/adjust/index.d.ts +1 -0
- package/lib/typescript/src/adjust/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/action-grid/action-grid.d.ts +15 -0
- package/lib/typescript/src/blocks/action-grid/action-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/action-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/action-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts +3 -1
- package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts.map +1 -1
- package/lib/typescript/src/blocks/code-input/code-input.d.ts +14 -0
- package/lib/typescript/src/blocks/code-input/code-input.d.ts.map +1 -0
- package/lib/typescript/src/blocks/code-input/index.d.ts +2 -0
- package/lib/typescript/src/blocks/code-input/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +1 -1
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/consent-list/consent-list.d.ts +18 -0
- package/lib/typescript/src/blocks/consent-list/consent-list.d.ts.map +1 -0
- package/lib/typescript/src/blocks/consent-list/index.d.ts +2 -0
- package/lib/typescript/src/blocks/consent-list/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/inbox-row/inbox-row.d.ts +15 -0
- package/lib/typescript/src/blocks/inbox-row/inbox-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/inbox-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/inbox-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/index.d.ts +11 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/invite-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/invite-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invite-card/invite-card.d.ts +15 -0
- package/lib/typescript/src/blocks/invite-card/invite-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts +1 -1
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/oauth-buttons/logos.d.ts +5 -0
- package/lib/typescript/src/blocks/oauth-buttons/logos.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +3 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
- package/lib/typescript/src/blocks/product-tile/index.d.ts +2 -0
- package/lib/typescript/src/blocks/product-tile/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-tile/product-tile.d.ts +12 -0
- package/lib/typescript/src/blocks/product-tile/product-tile.d.ts.map +1 -0
- package/lib/typescript/src/blocks/quick-actions/index.d.ts +2 -0
- package/lib/typescript/src/blocks/quick-actions/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/quick-actions/quick-actions.d.ts +14 -0
- package/lib/typescript/src/blocks/quick-actions/quick-actions.d.ts.map +1 -0
- package/lib/typescript/src/blocks/setup-guide/index.d.ts +2 -0
- package/lib/typescript/src/blocks/setup-guide/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/setup-guide/setup-guide.d.ts +14 -0
- package/lib/typescript/src/blocks/setup-guide/setup-guide.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-summary/index.d.ts +2 -0
- package/lib/typescript/src/blocks/site-summary/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-summary/site-summary.d.ts +18 -0
- package/lib/typescript/src/blocks/site-summary/site-summary.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stage-bar/index.d.ts +2 -0
- package/lib/typescript/src/blocks/stage-bar/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stage-bar/stage-bar.d.ts +15 -0
- package/lib/typescript/src/blocks/stage-bar/stage-bar.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +2 -1
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +5 -2
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
- package/lib/typescript/src/blocks/store-sheet/index.d.ts +2 -0
- package/lib/typescript/src/blocks/store-sheet/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/store-sheet/store-sheet.d.ts +16 -0
- package/lib/typescript/src/blocks/store-sheet/store-sheet.d.ts.map +1 -0
- package/lib/typescript/src/blocks/task-tiles/index.d.ts +2 -0
- package/lib/typescript/src/blocks/task-tiles/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/task-tiles/task-tiles.d.ts +16 -0
- package/lib/typescript/src/blocks/task-tiles/task-tiles.d.ts.map +1 -0
- package/lib/typescript/src/charts/index.d.ts +1 -0
- package/lib/typescript/src/charts/index.d.ts.map +1 -1
- package/lib/typescript/src/charts/mini-bars.d.ts +11 -0
- package/lib/typescript/src/charts/mini-bars.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar/avatar.d.ts +13 -0
- package/lib/typescript/src/components/avatar/avatar.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar/index.d.ts +2 -0
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/calendar/calendar.d.ts +4 -1
- package/lib/typescript/src/components/calendar/calendar.d.ts.map +1 -1
- package/lib/typescript/src/components/check-list/check-list.d.ts +5 -0
- package/lib/typescript/src/components/check-list/check-list.d.ts.map +1 -0
- package/lib/typescript/src/components/check-list/index.d.ts +2 -0
- package/lib/typescript/src/components/check-list/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/chip.d.ts +5 -1
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/index.d.ts +1 -1
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +4 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
- package/lib/typescript/src/components/circle-grid/circle-grid.d.ts +17 -0
- package/lib/typescript/src/components/circle-grid/circle-grid.d.ts.map +1 -0
- package/lib/typescript/src/components/circle-grid/index.d.ts +2 -0
- package/lib/typescript/src/components/circle-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts +6 -1
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
- package/lib/typescript/src/components/field/field.d.ts +2 -1
- package/lib/typescript/src/components/field/field.d.ts.map +1 -1
- package/lib/typescript/src/components/field-group/field-group.d.ts +10 -0
- package/lib/typescript/src/components/field-group/field-group.d.ts.map +1 -0
- package/lib/typescript/src/components/field-group/index.d.ts +2 -0
- package/lib/typescript/src/components/field-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts +6 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
- package/lib/typescript/src/components/page-header/index.d.ts +3 -0
- package/lib/typescript/src/components/page-header/index.d.ts.map +1 -0
- package/lib/typescript/src/components/page-header/page-header.d.ts +23 -0
- package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -0
- package/lib/typescript/src/components/page-header/store-header.d.ts +17 -0
- package/lib/typescript/src/components/page-header/store-header.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/index.d.ts +1 -0
- package/lib/typescript/src/components/photo/index.d.ts.map +1 -1
- package/lib/typescript/src/components/photo/photo.d.ts +2 -0
- package/lib/typescript/src/components/photo/photo.d.ts.map +1 -1
- package/lib/typescript/src/components/progress-circle/index.d.ts +2 -0
- package/lib/typescript/src/components/progress-circle/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress-circle/progress-circle.d.ts +8 -0
- package/lib/typescript/src/components/progress-circle/progress-circle.d.ts.map +1 -0
- package/lib/typescript/src/components/result-mark/index.d.ts +2 -0
- package/lib/typescript/src/components/result-mark/index.d.ts.map +1 -0
- package/lib/typescript/src/components/result-mark/result-mark.d.ts +7 -0
- package/lib/typescript/src/components/result-mark/result-mark.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/index.d.ts +1 -1
- package/lib/typescript/src/components/sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sheet/sheet.d.ts +9 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -1
- package/lib/typescript/src/components/status-steps/index.d.ts +2 -0
- package/lib/typescript/src/components/status-steps/index.d.ts.map +1 -0
- package/lib/typescript/src/components/status-steps/status-steps.d.ts +8 -0
- package/lib/typescript/src/components/status-steps/status-steps.d.ts.map +1 -0
- package/lib/typescript/src/components/step-slider/index.d.ts +2 -0
- package/lib/typescript/src/components/step-slider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/step-slider/step-slider.d.ts +13 -0
- package/lib/typescript/src/components/step-slider/step-slider.d.ts.map +1 -0
- package/lib/typescript/src/components/text/text.d.ts +1 -1
- package/lib/typescript/src/components/text/text.d.ts.map +1 -1
- package/lib/typescript/src/components/text-links/index.d.ts +2 -0
- package/lib/typescript/src/components/text-links/index.d.ts.map +1 -0
- package/lib/typescript/src/components/text-links/text-links.d.ts +9 -0
- package/lib/typescript/src/components/text-links/text-links.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/bell.d.ts +2 -0
- package/lib/typescript/src/internal/bell.d.ts.map +1 -0
- package/lib/typescript/src/internal/glyphs.d.ts +26 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
- package/lib/typescript/src/internal/line-icons.d.ts +19 -0
- package/lib/typescript/src/internal/line-icons.d.ts.map +1 -0
- package/lib/typescript/src/internal/tab-icons.d.ts +8 -0
- package/lib/typescript/src/internal/tab-icons.d.ts.map +1 -0
- package/lib/typescript/src/templates/calendar-template.d.ts +11 -0
- package/lib/typescript/src/templates/calendar-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/index.d.ts +4 -0
- package/lib/typescript/src/templates/index.d.ts.map +1 -1
- package/lib/typescript/src/templates/list-template.d.ts +9 -1
- package/lib/typescript/src/templates/list-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/notice-template.d.ts +23 -0
- package/lib/typescript/src/templates/notice-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/parts.d.ts +3 -2
- package/lib/typescript/src/templates/parts.d.ts.map +1 -1
- package/lib/typescript/src/templates/result-template.d.ts +3 -1
- package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/scroll-templates.d.ts +4 -1
- package/lib/typescript/src/templates/scroll-templates.d.ts.map +1 -1
- package/lib/typescript/src/templates/system-template.d.ts +4 -1
- package/lib/typescript/src/templates/system-template.d.ts.map +1 -1
- package/lib/typescript/src/theme/base.d.ts +20 -15
- package/lib/typescript/src/theme/base.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +2 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adjust/dial-strip.tsx +3 -2
- package/src/adjust/font-controls.tsx +86 -0
- package/src/adjust/index.ts +5 -0
- package/src/blocks/action-grid/action-grid.tsx +79 -0
- package/src/blocks/action-grid/index.ts +5 -0
- package/src/blocks/bulk-ship-list/bulk-ship-list.tsx +67 -24
- package/src/blocks/code-input/code-input.tsx +111 -0
- package/src/blocks/code-input/index.ts +1 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +25 -5
- package/src/blocks/consent-list/consent-list.tsx +129 -0
- package/src/blocks/consent-list/index.ts +5 -0
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +1 -1
- package/src/blocks/image-grid/image-grid.tsx +3 -48
- package/src/blocks/inbox-row/inbox-row.tsx +114 -0
- package/src/blocks/inbox-row/index.ts +1 -0
- package/src/blocks/index.tsx +11 -0
- package/src/blocks/internal/card.tsx +1 -1
- package/src/blocks/invite-card/index.ts +1 -0
- package/src/blocks/invite-card/invite-card.tsx +151 -0
- package/src/blocks/oauth-buttons/index.ts +1 -0
- package/src/blocks/oauth-buttons/logos.ts +10 -0
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +61 -3
- package/src/blocks/option-editor/option-editor.tsx +1 -1
- package/src/blocks/product-list-empty/product-list-empty.tsx +1 -1
- package/src/blocks/product-row/product-row.tsx +1 -1
- package/src/blocks/product-tile/index.ts +5 -0
- package/src/blocks/product-tile/product-tile.tsx +54 -0
- package/src/blocks/quick-actions/index.ts +5 -0
- package/src/blocks/quick-actions/quick-actions.tsx +61 -0
- package/src/blocks/selection-bar/selection-bar.tsx +1 -1
- package/src/blocks/setup-guide/index.ts +5 -0
- package/src/blocks/setup-guide/setup-guide.tsx +103 -0
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +1 -1
- package/src/blocks/site-summary/index.ts +5 -0
- package/src/blocks/site-summary/site-summary.tsx +95 -0
- package/src/blocks/stage-bar/index.ts +1 -0
- package/src/blocks/stage-bar/stage-bar.tsx +107 -0
- package/src/blocks/stat-card/stat-card.tsx +10 -1
- package/src/blocks/step-screen/step-screen.tsx +70 -34
- package/src/blocks/store-sheet/index.ts +5 -0
- package/src/blocks/store-sheet/store-sheet.tsx +94 -0
- package/src/blocks/task-tiles/index.ts +1 -0
- package/src/blocks/task-tiles/task-tiles.tsx +79 -0
- package/src/charts/index.ts +1 -0
- package/src/charts/mini-bars.tsx +82 -0
- package/src/components/avatar/avatar.tsx +95 -0
- package/src/components/avatar/index.ts +1 -0
- package/src/components/button/button.tsx +1 -1
- package/src/components/calendar/calendar.tsx +213 -91
- package/src/components/check-list/check-list.tsx +46 -0
- package/src/components/check-list/index.ts +1 -0
- package/src/components/checkbox/checkbox.tsx +1 -1
- package/src/components/chip/chip.tsx +36 -6
- package/src/components/chip/index.ts +1 -1
- package/src/components/chip-group/chip-group.tsx +48 -21
- package/src/components/circle-grid/circle-grid.tsx +154 -0
- package/src/components/circle-grid/index.ts +5 -0
- package/src/components/dialog/dialog.tsx +1 -1
- package/src/components/empty-state/empty-state.tsx +26 -0
- package/src/components/field/field.tsx +9 -6
- package/src/components/field-group/field-group.tsx +40 -0
- package/src/components/field-group/index.ts +1 -0
- package/src/components/list-row/list-row.tsx +73 -5
- package/src/components/page-header/index.ts +14 -0
- package/src/components/page-header/page-header.tsx +122 -0
- package/src/components/page-header/store-header.tsx +138 -0
- package/src/components/photo/index.ts +1 -0
- package/src/components/photo/photo.tsx +19 -3
- package/src/components/progress-circle/index.ts +1 -0
- package/src/components/progress-circle/progress-circle.tsx +55 -0
- package/src/components/result-mark/index.ts +1 -0
- package/src/components/result-mark/result-mark.tsx +45 -0
- package/src/components/segmented-tabs/segmented-tabs.tsx +1 -1
- package/src/components/sheet/index.ts +6 -1
- package/src/components/sheet/sheet.tsx +34 -1
- package/src/components/status-steps/index.ts +1 -0
- package/src/components/status-steps/status-steps.tsx +84 -0
- package/src/components/step-slider/index.ts +1 -0
- package/src/components/step-slider/step-slider.tsx +153 -0
- package/src/components/text/text.tsx +2 -1
- package/src/components/text-links/index.ts +1 -0
- package/src/components/text-links/text-links.tsx +43 -0
- package/src/index.tsx +37 -0
- package/src/internal/bell.ts +2 -0
- package/src/internal/glyphs.tsx +69 -1
- package/src/internal/line-icons.ts +53 -0
- package/src/internal/tab-icons.ts +19 -0
- package/src/templates/calendar-template.tsx +46 -0
- package/src/templates/editor-template.tsx +2 -2
- package/src/templates/index.ts +4 -0
- package/src/templates/intro-template.tsx +1 -1
- package/src/templates/list-template.tsx +54 -0
- package/src/templates/notice-template.tsx +150 -0
- package/src/templates/parts.tsx +42 -2
- package/src/templates/result-template.tsx +26 -8
- package/src/templates/scroll-templates.tsx +59 -3
- package/src/templates/system-template.tsx +33 -2
- package/src/theme/base.ts +27 -15
- package/src/types/index.ts +2 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Image,
|
|
4
|
+
type ImageSourcePropType,
|
|
5
|
+
Text as RNText,
|
|
6
|
+
View,
|
|
7
|
+
type StyleProp,
|
|
8
|
+
type ViewStyle,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { CheckGlyph } from '../../internal/glyphs';
|
|
11
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
12
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
13
|
+
import { makeStyles } from '../../utils/styles';
|
|
14
|
+
import { Text } from '../text/text';
|
|
15
|
+
|
|
16
|
+
export type CircleGridItem<T extends string> = {
|
|
17
|
+
value: T;
|
|
18
|
+
label: string;
|
|
19
|
+
uri?: string | null;
|
|
20
|
+
source?: ImageSourcePropType;
|
|
21
|
+
glyph?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type CircleGridProps<T extends string> = {
|
|
25
|
+
items: readonly CircleGridItem<T>[];
|
|
26
|
+
value: T | null;
|
|
27
|
+
onValueChange: (value: T) => void;
|
|
28
|
+
columns?: number;
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const RING = 3;
|
|
33
|
+
const BADGE = 26;
|
|
34
|
+
const GLYPH = 40;
|
|
35
|
+
|
|
36
|
+
const useStyles = makeStyles((t) => ({
|
|
37
|
+
root: {
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
flexWrap: 'wrap',
|
|
40
|
+
rowGap: t.space[5],
|
|
41
|
+
},
|
|
42
|
+
cell: {
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
gap: t.space[2],
|
|
45
|
+
paddingHorizontal: t.space[1],
|
|
46
|
+
},
|
|
47
|
+
ring: {
|
|
48
|
+
width: '100%',
|
|
49
|
+
aspectRatio: 1,
|
|
50
|
+
padding: RING,
|
|
51
|
+
borderWidth: RING,
|
|
52
|
+
borderRadius: t.radius.full,
|
|
53
|
+
borderColor: 'transparent',
|
|
54
|
+
},
|
|
55
|
+
ringOn: { borderColor: t.colors.primary },
|
|
56
|
+
circle: {
|
|
57
|
+
flex: 1,
|
|
58
|
+
overflow: 'hidden',
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
justifyContent: 'center',
|
|
61
|
+
borderRadius: t.radius.full,
|
|
62
|
+
backgroundColor: t.colors.muted,
|
|
63
|
+
},
|
|
64
|
+
image: { width: '100%', height: '100%' },
|
|
65
|
+
glyph: { fontSize: GLYPH, lineHeight: GLYPH * 1.25 },
|
|
66
|
+
badge: {
|
|
67
|
+
position: 'absolute',
|
|
68
|
+
right: 0,
|
|
69
|
+
bottom: 0,
|
|
70
|
+
width: BADGE,
|
|
71
|
+
height: BADGE,
|
|
72
|
+
borderRadius: t.radius.full,
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
justifyContent: 'center',
|
|
75
|
+
borderWidth: 2,
|
|
76
|
+
borderColor: t.colors.background,
|
|
77
|
+
backgroundColor: t.colors.primary,
|
|
78
|
+
},
|
|
79
|
+
label: { textAlign: 'center' },
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
function Circle({
|
|
83
|
+
uri,
|
|
84
|
+
source,
|
|
85
|
+
glyph,
|
|
86
|
+
}: {
|
|
87
|
+
uri?: string | null;
|
|
88
|
+
source?: ImageSourcePropType;
|
|
89
|
+
glyph?: string;
|
|
90
|
+
}) {
|
|
91
|
+
const s = useStyles();
|
|
92
|
+
const [failed, setFailed] = useState<string | null>(null);
|
|
93
|
+
const image = uri && failed !== uri ? { uri } : source;
|
|
94
|
+
return (
|
|
95
|
+
<View style={s.circle}>
|
|
96
|
+
{image ? (
|
|
97
|
+
<Image
|
|
98
|
+
source={image}
|
|
99
|
+
style={s.image}
|
|
100
|
+
resizeMode="cover"
|
|
101
|
+
onError={() => uri && setFailed(uri)}
|
|
102
|
+
/>
|
|
103
|
+
) : glyph ? (
|
|
104
|
+
<RNText style={s.glyph}>{glyph}</RNText>
|
|
105
|
+
) : null}
|
|
106
|
+
</View>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function CircleGrid<T extends string>({
|
|
111
|
+
items,
|
|
112
|
+
value,
|
|
113
|
+
onValueChange,
|
|
114
|
+
columns = 3,
|
|
115
|
+
style,
|
|
116
|
+
}: CircleGridProps<T>) {
|
|
117
|
+
const t = useTheme();
|
|
118
|
+
const s = useStyles();
|
|
119
|
+
const width = `${100 / columns}%` as const;
|
|
120
|
+
return (
|
|
121
|
+
<View accessibilityRole="radiogroup" style={[s.root, style]}>
|
|
122
|
+
{items.map((item) => {
|
|
123
|
+
const on = item.value === value;
|
|
124
|
+
return (
|
|
125
|
+
<PressableBase
|
|
126
|
+
key={item.value}
|
|
127
|
+
accessibilityRole="radio"
|
|
128
|
+
accessibilityState={{ selected: on }}
|
|
129
|
+
accessibilityLabel={item.label}
|
|
130
|
+
onPress={() => onValueChange(item.value)}
|
|
131
|
+
style={[s.cell, { width }]}
|
|
132
|
+
>
|
|
133
|
+
<View style={[s.ring, on && s.ringOn]}>
|
|
134
|
+
<Circle uri={item.uri} source={item.source} glyph={item.glyph} />
|
|
135
|
+
{on ? (
|
|
136
|
+
<View style={s.badge}>
|
|
137
|
+
<CheckGlyph color={t.colors.primaryForeground} size={14} />
|
|
138
|
+
</View>
|
|
139
|
+
) : null}
|
|
140
|
+
</View>
|
|
141
|
+
<Text
|
|
142
|
+
variant="label"
|
|
143
|
+
weight={on ? 'bold' : 'regular'}
|
|
144
|
+
style={s.label}
|
|
145
|
+
numberOfLines={2}
|
|
146
|
+
>
|
|
147
|
+
{item.label}
|
|
148
|
+
</Text>
|
|
149
|
+
</PressableBase>
|
|
150
|
+
);
|
|
151
|
+
})}
|
|
152
|
+
</View>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
@@ -13,6 +13,11 @@ export type EmptyStateProps = {
|
|
|
13
13
|
variant?: EmptyStateVariant;
|
|
14
14
|
icon?: IconSlot;
|
|
15
15
|
action?: { label: string; onPress: () => void; icon?: IconSlot };
|
|
16
|
+
actions?: readonly {
|
|
17
|
+
label: string;
|
|
18
|
+
onPress: () => void;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
}[];
|
|
16
21
|
style?: StyleProp<ViewStyle>;
|
|
17
22
|
};
|
|
18
23
|
|
|
@@ -40,6 +45,11 @@ const useStyles = makeStyles((t) => ({
|
|
|
40
45
|
height: t.controlSize.md,
|
|
41
46
|
paddingHorizontal: t.space[5],
|
|
42
47
|
},
|
|
48
|
+
actions: {
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
gap: t.space[2],
|
|
51
|
+
marginTop: t.space[5],
|
|
52
|
+
},
|
|
43
53
|
section: {
|
|
44
54
|
flexDirection: 'row',
|
|
45
55
|
alignItems: 'center',
|
|
@@ -73,6 +83,7 @@ export function EmptyState({
|
|
|
73
83
|
variant = 'default',
|
|
74
84
|
icon,
|
|
75
85
|
action,
|
|
86
|
+
actions,
|
|
76
87
|
style,
|
|
77
88
|
}: EmptyStateProps) {
|
|
78
89
|
const t = useTheme();
|
|
@@ -140,6 +151,21 @@ export function EmptyState({
|
|
|
140
151
|
{action.label}
|
|
141
152
|
</Button>
|
|
142
153
|
) : null}
|
|
154
|
+
{actions?.length ? (
|
|
155
|
+
<View style={s.actions}>
|
|
156
|
+
{actions.map((item) => (
|
|
157
|
+
<Button
|
|
158
|
+
key={item.label}
|
|
159
|
+
variant="outline"
|
|
160
|
+
size="sm"
|
|
161
|
+
loading={item.loading}
|
|
162
|
+
onPress={item.onPress}
|
|
163
|
+
>
|
|
164
|
+
{item.label}
|
|
165
|
+
</Button>
|
|
166
|
+
))}
|
|
167
|
+
</View>
|
|
168
|
+
) : null}
|
|
143
169
|
</View>
|
|
144
170
|
);
|
|
145
171
|
}
|
|
@@ -15,6 +15,7 @@ import { makeStyles } from '../../utils/styles';
|
|
|
15
15
|
export type FieldProps = Omit<TextInputProps, 'style'> & {
|
|
16
16
|
ref?: Ref<ComponentRef<typeof TextInput>>;
|
|
17
17
|
label?: string;
|
|
18
|
+
readOnly?: boolean;
|
|
18
19
|
error?: string;
|
|
19
20
|
hint?: string;
|
|
20
21
|
warning?: string;
|
|
@@ -27,9 +28,9 @@ const useStyles = makeStyles((t) => ({
|
|
|
27
28
|
root: { gap: t.space[2] },
|
|
28
29
|
label: {
|
|
29
30
|
fontFamily: t.fontFamily,
|
|
30
|
-
fontSize: t.typography.
|
|
31
|
-
lineHeight: t.typography.
|
|
32
|
-
fontWeight: '
|
|
31
|
+
fontSize: t.typography.body.fontSize,
|
|
32
|
+
lineHeight: t.typography.body.lineHeight,
|
|
33
|
+
fontWeight: '500',
|
|
33
34
|
color: t.colors.foreground,
|
|
34
35
|
},
|
|
35
36
|
frame: {
|
|
@@ -41,7 +42,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
41
42
|
borderRadius: t.radius.md,
|
|
42
43
|
borderWidth: 1,
|
|
43
44
|
borderColor: t.colors.input,
|
|
44
|
-
backgroundColor: t.colors.
|
|
45
|
+
backgroundColor: t.colors.surface,
|
|
45
46
|
},
|
|
46
47
|
focused: {
|
|
47
48
|
borderColor: t.colors.primaryEdge,
|
|
@@ -52,6 +53,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
52
53
|
borderColor: t.colors.danger,
|
|
53
54
|
},
|
|
54
55
|
disabled: { opacity: t.opacity.disabled, backgroundColor: t.colors.muted },
|
|
56
|
+
readOnly: { borderColor: t.colors.muted, backgroundColor: t.colors.muted },
|
|
55
57
|
input: {
|
|
56
58
|
flex: 1,
|
|
57
59
|
minWidth: 0,
|
|
@@ -99,6 +101,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
99
101
|
|
|
100
102
|
export function Field({
|
|
101
103
|
label,
|
|
104
|
+
readOnly = false,
|
|
102
105
|
error,
|
|
103
106
|
hint,
|
|
104
107
|
warning,
|
|
@@ -133,7 +136,7 @@ export function Field({
|
|
|
133
136
|
focused && s.focused,
|
|
134
137
|
!!error && s.invalid,
|
|
135
138
|
!!warn && s.warned,
|
|
136
|
-
!editable && s.disabled,
|
|
139
|
+
readOnly ? s.readOnly : !editable && s.disabled,
|
|
137
140
|
]}
|
|
138
141
|
>
|
|
139
142
|
{leading ? renderIcon(leading, icon) : null}
|
|
@@ -144,7 +147,7 @@ export function Field({
|
|
|
144
147
|
accessibilityLabel={label}
|
|
145
148
|
accessibilityHint={note}
|
|
146
149
|
{...input}
|
|
147
|
-
editable={editable}
|
|
150
|
+
editable={editable && !readOnly}
|
|
148
151
|
style={s.input}
|
|
149
152
|
onFocus={(e) => {
|
|
150
153
|
setFocused(true);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { makeStyles } from '../../utils/styles';
|
|
4
|
+
import { Text } from '../text/text';
|
|
5
|
+
|
|
6
|
+
export type FieldGroupProps = {
|
|
7
|
+
label: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const useStyles = makeStyles((t) => ({
|
|
14
|
+
root: { gap: t.space[2] },
|
|
15
|
+
head: { flexDirection: 'row', gap: t.space[1] },
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
export function FieldGroup({
|
|
19
|
+
label,
|
|
20
|
+
required,
|
|
21
|
+
children,
|
|
22
|
+
style,
|
|
23
|
+
}: FieldGroupProps) {
|
|
24
|
+
const s = useStyles();
|
|
25
|
+
return (
|
|
26
|
+
<View style={[s.root, style]}>
|
|
27
|
+
<View style={s.head}>
|
|
28
|
+
<Text weight="medium" accessibilityRole="header">
|
|
29
|
+
{label}
|
|
30
|
+
</Text>
|
|
31
|
+
{required ? (
|
|
32
|
+
<Text tone="danger" accessibilityLabel="필수">
|
|
33
|
+
*
|
|
34
|
+
</Text>
|
|
35
|
+
) : null}
|
|
36
|
+
</View>
|
|
37
|
+
{children}
|
|
38
|
+
</View>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FieldGroup, type FieldGroupProps } from './field-group';
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from '../../internal/pressable-base';
|
|
8
8
|
import { useTheme } from '../../theme/theme-provider';
|
|
9
9
|
import { makeStyles } from '../../utils/styles';
|
|
10
|
+
import { Photo } from '../photo/photo';
|
|
10
11
|
|
|
11
12
|
export type ListRowTone = 'muted' | 'warning' | 'danger';
|
|
12
13
|
|
|
@@ -19,11 +20,18 @@ export type ListRowProps = Omit<
|
|
|
19
20
|
overline?: string;
|
|
20
21
|
overlineTone?: ListRowTone;
|
|
21
22
|
leading?: IconSlot;
|
|
23
|
+
image?: string | null;
|
|
22
24
|
trailing?: IconSlot;
|
|
23
25
|
chevron?: boolean;
|
|
26
|
+
value?: string;
|
|
27
|
+
meta?: string;
|
|
28
|
+
highlighted?: boolean;
|
|
29
|
+
strong?: boolean;
|
|
24
30
|
titleLines?: number;
|
|
25
31
|
};
|
|
26
32
|
|
|
33
|
+
const IMAGE = 48;
|
|
34
|
+
|
|
27
35
|
const useStyles = makeStyles((t) => ({
|
|
28
36
|
row: {
|
|
29
37
|
flexDirection: 'row',
|
|
@@ -32,17 +40,32 @@ const useStyles = makeStyles((t) => ({
|
|
|
32
40
|
minHeight: t.listRow.oneLine,
|
|
33
41
|
paddingVertical: t.space[2],
|
|
34
42
|
paddingHorizontal: t.layout.screenX,
|
|
35
|
-
backgroundColor:
|
|
43
|
+
backgroundColor: 'transparent',
|
|
36
44
|
},
|
|
37
45
|
twoLine: { minHeight: t.listRow.twoLine },
|
|
38
46
|
threeLine: { minHeight: t.listRow.threeLine },
|
|
39
47
|
pressed: { backgroundColor: t.colors.muted },
|
|
48
|
+
highlighted: { backgroundColor: t.colors.primaryTint },
|
|
49
|
+
top: { alignItems: 'flex-start' },
|
|
50
|
+
image: { width: IMAGE },
|
|
51
|
+
value: {
|
|
52
|
+
...t.typography.bodyLg,
|
|
53
|
+
fontFamily: t.fontFamily,
|
|
54
|
+
color: t.colors.foreground,
|
|
55
|
+
fontVariant: ['tabular-nums'],
|
|
56
|
+
},
|
|
57
|
+
meta: {
|
|
58
|
+
...t.typography.label,
|
|
59
|
+
fontFamily: t.fontFamily,
|
|
60
|
+
color: t.colors.mutedForeground,
|
|
61
|
+
},
|
|
40
62
|
body: { flex: 1 },
|
|
41
63
|
overline: {
|
|
42
64
|
...t.typography.caption,
|
|
43
65
|
fontFamily: t.fontFamily,
|
|
44
66
|
fontWeight: '600',
|
|
45
67
|
},
|
|
68
|
+
money: { color: t.colors.point },
|
|
46
69
|
muted: { color: t.colors.mutedForeground },
|
|
47
70
|
warning: { color: t.colors.warningText },
|
|
48
71
|
danger: { color: t.colors.danger },
|
|
@@ -57,6 +80,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
57
80
|
color: t.colors.mutedForeground,
|
|
58
81
|
},
|
|
59
82
|
trailing: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
83
|
+
strong: { color: t.colors.foreground, fontWeight: '700' },
|
|
60
84
|
}));
|
|
61
85
|
|
|
62
86
|
export function ListRow({
|
|
@@ -65,8 +89,13 @@ export function ListRow({
|
|
|
65
89
|
overline,
|
|
66
90
|
overlineTone = 'muted',
|
|
67
91
|
leading,
|
|
92
|
+
image,
|
|
68
93
|
trailing,
|
|
69
94
|
chevron,
|
|
95
|
+
value,
|
|
96
|
+
meta,
|
|
97
|
+
highlighted = false,
|
|
98
|
+
strong = false,
|
|
70
99
|
titleLines = 1,
|
|
71
100
|
onPress,
|
|
72
101
|
style,
|
|
@@ -82,6 +111,14 @@ export function ListRow({
|
|
|
82
111
|
const content = (
|
|
83
112
|
<>
|
|
84
113
|
{leading ? renderIcon(leading, icon) : null}
|
|
114
|
+
{image !== undefined ? (
|
|
115
|
+
<Photo
|
|
116
|
+
source={{ uri: image ?? '' }}
|
|
117
|
+
radius={t.radius.md}
|
|
118
|
+
seed={title}
|
|
119
|
+
style={s.image}
|
|
120
|
+
/>
|
|
121
|
+
) : null}
|
|
85
122
|
<View style={s.body}>
|
|
86
123
|
{overline ? (
|
|
87
124
|
<Text
|
|
@@ -95,7 +132,7 @@ export function ListRow({
|
|
|
95
132
|
<Text
|
|
96
133
|
numberOfLines={titleLines}
|
|
97
134
|
maxFontSizeMultiplier={t.maxFontScale}
|
|
98
|
-
style={s.title}
|
|
135
|
+
style={[s.title, strong && s.strong]}
|
|
99
136
|
>
|
|
100
137
|
{title}
|
|
101
138
|
</Text>
|
|
@@ -109,8 +146,21 @@ export function ListRow({
|
|
|
109
146
|
</Text>
|
|
110
147
|
) : null}
|
|
111
148
|
</View>
|
|
112
|
-
{
|
|
149
|
+
{meta ? (
|
|
150
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.meta}>
|
|
151
|
+
{meta}
|
|
152
|
+
</Text>
|
|
153
|
+
) : null}
|
|
154
|
+
{trailing || value || showChevron ? (
|
|
113
155
|
<View style={s.trailing}>
|
|
156
|
+
{value ? (
|
|
157
|
+
<Text
|
|
158
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
159
|
+
style={[s.value, strong && s.strong, strong && s.money]}
|
|
160
|
+
>
|
|
161
|
+
{value}
|
|
162
|
+
</Text>
|
|
163
|
+
) : null}
|
|
114
164
|
{trailing ? renderIcon(trailing, icon) : null}
|
|
115
165
|
{showChevron ? (
|
|
116
166
|
<ChevronGlyph
|
|
@@ -124,14 +174,32 @@ export function ListRow({
|
|
|
124
174
|
);
|
|
125
175
|
|
|
126
176
|
if (!onPress) {
|
|
127
|
-
return
|
|
177
|
+
return (
|
|
178
|
+
<View
|
|
179
|
+
style={[
|
|
180
|
+
s.row,
|
|
181
|
+
height,
|
|
182
|
+
meta && s.top,
|
|
183
|
+
highlighted && s.highlighted,
|
|
184
|
+
style,
|
|
185
|
+
]}
|
|
186
|
+
>
|
|
187
|
+
{content}
|
|
188
|
+
</View>
|
|
189
|
+
);
|
|
128
190
|
}
|
|
129
191
|
return (
|
|
130
192
|
<PressableBase
|
|
131
193
|
{...rest}
|
|
132
194
|
onPress={onPress}
|
|
133
195
|
pressedStyle={s.pressed}
|
|
134
|
-
style={[
|
|
196
|
+
style={[
|
|
197
|
+
s.row,
|
|
198
|
+
height,
|
|
199
|
+
meta && s.top,
|
|
200
|
+
highlighted && s.highlighted,
|
|
201
|
+
style,
|
|
202
|
+
]}
|
|
135
203
|
>
|
|
136
204
|
{content}
|
|
137
205
|
</PressableBase>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
HeaderButton,
|
|
3
|
+
headerButton,
|
|
4
|
+
PageHeader,
|
|
5
|
+
type HeaderButtonProps,
|
|
6
|
+
type PageHeaderAction,
|
|
7
|
+
type PageHeaderProps,
|
|
8
|
+
} from './page-header';
|
|
9
|
+
export {
|
|
10
|
+
StoreHeader,
|
|
11
|
+
StoreMark,
|
|
12
|
+
type StoreHeaderProps,
|
|
13
|
+
type StoreMarkProps,
|
|
14
|
+
} from './store-header';
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
3
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
4
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
5
|
+
import { makeStyles } from '../../utils/styles';
|
|
6
|
+
import { Text } from '../text/text';
|
|
7
|
+
|
|
8
|
+
export type PageHeaderAction = {
|
|
9
|
+
icon?: IconSlot;
|
|
10
|
+
label: string;
|
|
11
|
+
badge?: boolean;
|
|
12
|
+
onPress: () => void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type PageHeaderProps = {
|
|
16
|
+
title: string;
|
|
17
|
+
action?: PageHeaderAction;
|
|
18
|
+
topInset?: number;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const DOT = 6;
|
|
23
|
+
const ICON = 24;
|
|
24
|
+
|
|
25
|
+
const useStyles = makeStyles((t) => ({
|
|
26
|
+
root: {
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
paddingTop: t.space[5],
|
|
31
|
+
paddingBottom: t.space[2],
|
|
32
|
+
paddingHorizontal: t.layout.screenX,
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
fontSize: t.typography.display.fontSize,
|
|
36
|
+
lineHeight: t.typography.display.lineHeight,
|
|
37
|
+
},
|
|
38
|
+
action: {
|
|
39
|
+
width: t.minTouchSize,
|
|
40
|
+
height: t.minTouchSize,
|
|
41
|
+
marginRight: -t.space[2],
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
},
|
|
45
|
+
text: { paddingHorizontal: t.space[2], width: 'auto' },
|
|
46
|
+
dot: {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
top: t.space[2] + t.space[1],
|
|
49
|
+
right: t.space[2] + t.space[1],
|
|
50
|
+
width: DOT,
|
|
51
|
+
height: DOT,
|
|
52
|
+
borderRadius: t.radius.full,
|
|
53
|
+
backgroundColor: t.colors.primary,
|
|
54
|
+
},
|
|
55
|
+
}));
|
|
56
|
+
|
|
57
|
+
export type HeaderButtonProps = {
|
|
58
|
+
label: string;
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
onPress: () => void;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export function HeaderButton({ label, disabled, onPress }: HeaderButtonProps) {
|
|
64
|
+
const s = useStyles();
|
|
65
|
+
return (
|
|
66
|
+
<PressableBase
|
|
67
|
+
onPress={onPress}
|
|
68
|
+
disabled={disabled}
|
|
69
|
+
accessibilityRole="button"
|
|
70
|
+
accessibilityLabel={label}
|
|
71
|
+
accessibilityState={{ disabled }}
|
|
72
|
+
style={[s.action, s.text]}
|
|
73
|
+
>
|
|
74
|
+
<Text
|
|
75
|
+
variant="bodyLg"
|
|
76
|
+
weight="medium"
|
|
77
|
+
tone={disabled ? 'muted' : undefined}
|
|
78
|
+
>
|
|
79
|
+
{label}
|
|
80
|
+
</Text>
|
|
81
|
+
</PressableBase>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function headerButton(props: HeaderButtonProps) {
|
|
86
|
+
return function HeaderSlot() {
|
|
87
|
+
return <HeaderButton {...props} />;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function PageHeader({
|
|
92
|
+
title,
|
|
93
|
+
action,
|
|
94
|
+
topInset = 0,
|
|
95
|
+
style,
|
|
96
|
+
}: PageHeaderProps) {
|
|
97
|
+
const t = useTheme();
|
|
98
|
+
const s = useStyles();
|
|
99
|
+
return (
|
|
100
|
+
<View style={[s.root, { paddingTop: t.space[5] + topInset }, style]}>
|
|
101
|
+
<Text weight="bold" accessibilityRole="header" style={s.title}>
|
|
102
|
+
{title}
|
|
103
|
+
</Text>
|
|
104
|
+
{action && !action.icon ? (
|
|
105
|
+
<HeaderButton label={action.label} onPress={action.onPress} />
|
|
106
|
+
) : action ? (
|
|
107
|
+
<PressableBase
|
|
108
|
+
onPress={action.onPress}
|
|
109
|
+
accessibilityRole="button"
|
|
110
|
+
accessibilityLabel={action.label}
|
|
111
|
+
style={s.action}
|
|
112
|
+
>
|
|
113
|
+
{renderIcon(action.icon, {
|
|
114
|
+
color: t.colors.foreground,
|
|
115
|
+
size: ICON,
|
|
116
|
+
})}
|
|
117
|
+
{action.badge ? <View style={s.dot} /> : null}
|
|
118
|
+
</PressableBase>
|
|
119
|
+
) : null}
|
|
120
|
+
</View>
|
|
121
|
+
);
|
|
122
|
+
}
|