@ezpg/app-ui 0.9.0 → 0.11.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 +15 -0
- package/lib/module/adjust/adjust-template.js +92 -0
- package/lib/module/adjust/adjust-template.js.map +1 -0
- package/lib/module/adjust/color-adjust-note.js +67 -0
- package/lib/module/adjust/color-adjust-note.js.map +1 -0
- package/lib/module/adjust/color-track.js +132 -0
- package/lib/module/adjust/color-track.js.map +1 -0
- package/lib/module/adjust/dial-strip.js +126 -0
- package/lib/module/adjust/dial-strip.js.map +1 -0
- package/lib/module/adjust/font-controls.js +76 -0
- package/lib/module/adjust/font-controls.js.map +1 -0
- package/lib/module/adjust/hsl.js +29 -0
- package/lib/module/adjust/hsl.js.map +1 -0
- package/lib/module/adjust/index.js +10 -0
- package/lib/module/adjust/index.js.map +1 -0
- package/lib/module/adjust/scrub-ruler.js +159 -0
- package/lib/module/adjust/scrub-ruler.js.map +1 -0
- package/lib/module/adjust.js +4 -0
- package/lib/module/adjust.js.map +1 -0
- 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 +74 -32
- 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 +26 -3
- 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/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/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/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/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-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 +89 -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 +67 -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/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/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/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 +10 -5
- 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 +52 -6
- 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/sheet/index.js +1 -1
- package/lib/module/components/sheet/index.js.map +1 -1
- package/lib/module/components/sheet/sheet.js +27 -1
- 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-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/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 +41 -0
- 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 +49 -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 +1 -0
- package/lib/module/theme/base.js.map +1 -1
- package/lib/typescript/src/adjust/adjust-template.d.ts +13 -0
- package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -0
- package/lib/typescript/src/adjust/color-adjust-note.d.ts +10 -0
- package/lib/typescript/src/adjust/color-adjust-note.d.ts.map +1 -0
- package/lib/typescript/src/adjust/color-track.d.ts +12 -0
- package/lib/typescript/src/adjust/color-track.d.ts.map +1 -0
- package/lib/typescript/src/adjust/dial-strip.d.ts +17 -0
- package/lib/typescript/src/adjust/dial-strip.d.ts.map +1 -0
- 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/hsl.d.ts +4 -0
- package/lib/typescript/src/adjust/hsl.d.ts.map +1 -0
- package/lib/typescript/src/adjust/index.d.ts +8 -0
- package/lib/typescript/src/adjust/index.d.ts.map +1 -0
- package/lib/typescript/src/adjust/scrub-ruler.d.ts +13 -0
- package/lib/typescript/src/adjust/scrub-ruler.d.ts.map +1 -0
- package/lib/typescript/src/adjust.d.ts +2 -0
- package/lib/typescript/src/adjust.d.ts.map +1 -0
- 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-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 +1 -0
- package/lib/typescript/src/theme/base.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/adjust/adjust-template.tsx +89 -0
- package/src/adjust/color-adjust-note.tsx +61 -0
- package/src/adjust/color-track.tsx +140 -0
- package/src/adjust/dial-strip.tsx +143 -0
- package/src/adjust/font-controls.tsx +86 -0
- package/src/adjust/hsl.ts +37 -0
- package/src/adjust/index.ts +14 -0
- package/src/adjust/scrub-ruler.tsx +160 -0
- package/src/adjust.tsx +1 -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 +66 -23
- 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 +24 -4
- package/src/blocks/consent-list/consent-list.tsx +129 -0
- package/src/blocks/consent-list/index.ts +5 -0
- 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/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/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/setup-guide/index.ts +5 -0
- package/src/blocks/setup-guide/setup-guide.tsx +103 -0
- 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 +75 -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/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/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/empty-state/empty-state.tsx +26 -0
- package/src/components/field/field.tsx +8 -5
- 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 +71 -4
- 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/sheet/index.ts +6 -1
- package/src/components/sheet/sheet.tsx +33 -0
- 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-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/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 +41 -1
- package/src/templates/result-template.tsx +26 -8
- package/src/templates/scroll-templates.tsx +55 -3
- package/src/templates/system-template.tsx +33 -2
- package/src/theme/base.ts +8 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { Text } from '../../components/text/text';
|
|
4
|
+
import { ChevronGlyph } from '../../internal/glyphs';
|
|
5
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
6
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
7
|
+
import { makeStyles } from '../../utils/styles';
|
|
8
|
+
|
|
9
|
+
export type StageBarItem<T extends string> = {
|
|
10
|
+
value: T;
|
|
11
|
+
label: string;
|
|
12
|
+
count?: number;
|
|
13
|
+
flow?: boolean;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type StageBarProps<T extends string> = {
|
|
17
|
+
items: readonly StageBarItem<T>[];
|
|
18
|
+
value: T | null;
|
|
19
|
+
onValueChange: (value: T | null) => void;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const useStyles = makeStyles((t) => ({
|
|
24
|
+
root: {
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
marginHorizontal: t.layout.screenX,
|
|
28
|
+
padding: t.space[1],
|
|
29
|
+
borderRadius: t.radius.lg,
|
|
30
|
+
backgroundColor: t.colors.muted,
|
|
31
|
+
},
|
|
32
|
+
stage: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
gap: t.space[1] / 2,
|
|
36
|
+
paddingVertical: t.space[2],
|
|
37
|
+
borderRadius: t.radius.md,
|
|
38
|
+
},
|
|
39
|
+
on: { backgroundColor: t.colors.background, boxShadow: t.shadow.sm },
|
|
40
|
+
count: {
|
|
41
|
+
fontSize: t.typography.title.fontSize,
|
|
42
|
+
lineHeight: t.typography.title.lineHeight,
|
|
43
|
+
fontVariant: ['tabular-nums'],
|
|
44
|
+
},
|
|
45
|
+
split: {
|
|
46
|
+
width: 1,
|
|
47
|
+
alignSelf: 'stretch',
|
|
48
|
+
marginVertical: t.space[2],
|
|
49
|
+
backgroundColor: t.colors.border,
|
|
50
|
+
},
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
export function StageBar<T extends string>({
|
|
54
|
+
items,
|
|
55
|
+
value,
|
|
56
|
+
onValueChange,
|
|
57
|
+
style,
|
|
58
|
+
}: StageBarProps<T>) {
|
|
59
|
+
const t = useTheme();
|
|
60
|
+
const s = useStyles();
|
|
61
|
+
return (
|
|
62
|
+
<View style={[s.root, style]} accessibilityRole="tablist">
|
|
63
|
+
{items.map((item, i) => {
|
|
64
|
+
const on = item.value === value;
|
|
65
|
+
const next = items[i + 1];
|
|
66
|
+
const live = (item.count ?? 0) > 0;
|
|
67
|
+
return (
|
|
68
|
+
<Fragment key={item.value}>
|
|
69
|
+
<PressableBase
|
|
70
|
+
accessibilityRole="tab"
|
|
71
|
+
accessibilityState={{ selected: on }}
|
|
72
|
+
accessibilityLabel={`${item.label} ${item.count ?? 0}`}
|
|
73
|
+
onPress={() => onValueChange(on ? null : item.value)}
|
|
74
|
+
style={[s.stage, on && s.on]}
|
|
75
|
+
>
|
|
76
|
+
<Text
|
|
77
|
+
weight="bold"
|
|
78
|
+
tone={live ? 'primary' : 'muted'}
|
|
79
|
+
style={s.count}
|
|
80
|
+
>
|
|
81
|
+
{item.count ?? 0}
|
|
82
|
+
</Text>
|
|
83
|
+
<Text
|
|
84
|
+
variant="caption"
|
|
85
|
+
weight={on ? 'bold' : undefined}
|
|
86
|
+
tone={on ? 'default' : 'muted'}
|
|
87
|
+
numberOfLines={1}
|
|
88
|
+
>
|
|
89
|
+
{item.label}
|
|
90
|
+
</Text>
|
|
91
|
+
</PressableBase>
|
|
92
|
+
{next ? (
|
|
93
|
+
next.flow === false ? (
|
|
94
|
+
<View style={s.split} />
|
|
95
|
+
) : (
|
|
96
|
+
<ChevronGlyph
|
|
97
|
+
color={t.colors.mutedForeground}
|
|
98
|
+
size={t.iconSize.sm}
|
|
99
|
+
/>
|
|
100
|
+
)
|
|
101
|
+
) : null}
|
|
102
|
+
</Fragment>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</View>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -6,6 +6,7 @@ import { Card } from '../internal/card';
|
|
|
6
6
|
|
|
7
7
|
export type StatCardProps = {
|
|
8
8
|
label: string;
|
|
9
|
+
meta?: string;
|
|
9
10
|
value: string;
|
|
10
11
|
change?: number | null;
|
|
11
12
|
chart?: ReactNode;
|
|
@@ -16,6 +17,7 @@ export type StatCardProps = {
|
|
|
16
17
|
const useStyles = makeStyles((t) => ({
|
|
17
18
|
row: { flexDirection: 'row', alignItems: 'flex-end', gap: t.space[3] },
|
|
18
19
|
body: { flex: 1, gap: t.space[1] },
|
|
20
|
+
head: { flexDirection: 'row', justifyContent: 'space-between' },
|
|
19
21
|
value: {
|
|
20
22
|
flexDirection: 'row',
|
|
21
23
|
flexWrap: 'wrap',
|
|
@@ -27,6 +29,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
27
29
|
|
|
28
30
|
export function StatCard({
|
|
29
31
|
label,
|
|
32
|
+
meta,
|
|
30
33
|
value,
|
|
31
34
|
change,
|
|
32
35
|
chart,
|
|
@@ -47,9 +50,15 @@ export function StatCard({
|
|
|
47
50
|
}`}
|
|
48
51
|
style={style}
|
|
49
52
|
>
|
|
53
|
+
{meta ? (
|
|
54
|
+
<View style={s.head}>
|
|
55
|
+
<Text tone="muted">{label}</Text>
|
|
56
|
+
<Text tone="muted">{meta}</Text>
|
|
57
|
+
</View>
|
|
58
|
+
) : null}
|
|
50
59
|
<View style={s.row}>
|
|
51
60
|
<View style={s.body}>
|
|
52
|
-
<Text tone="muted">{label}</Text>
|
|
61
|
+
{meta ? null : <Text tone="muted">{label}</Text>}
|
|
53
62
|
<View style={s.value}>
|
|
54
63
|
<Text variant="title" weight="bold">
|
|
55
64
|
{value}
|
|
@@ -16,13 +16,16 @@ export type StepAction = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export type StepScreenProps = {
|
|
19
|
+
top?: ReactNode;
|
|
19
20
|
title: string;
|
|
20
21
|
total?: number;
|
|
21
22
|
current?: number;
|
|
22
23
|
onBack?: () => void;
|
|
23
24
|
backLabel?: string;
|
|
24
|
-
primaryAction
|
|
25
|
+
primaryAction?: StepAction;
|
|
26
|
+
floatingAction?: boolean;
|
|
25
27
|
secondaryAction?: StepAction;
|
|
28
|
+
actions?: ReactNode;
|
|
26
29
|
notice?: TemplateNotice;
|
|
27
30
|
bottomInset?: number;
|
|
28
31
|
children?: ReactNode;
|
|
@@ -30,6 +33,7 @@ export type StepScreenProps = {
|
|
|
30
33
|
|
|
31
34
|
const useStyles = makeStyles((t) => ({
|
|
32
35
|
root: { flex: 1, backgroundColor: t.colors.background },
|
|
36
|
+
main: { flex: 1 },
|
|
33
37
|
header: {
|
|
34
38
|
height: t.headerHeight,
|
|
35
39
|
flexDirection: 'row',
|
|
@@ -61,16 +65,32 @@ const useStyles = makeStyles((t) => ({
|
|
|
61
65
|
paddingTop: t.layout.footerTop,
|
|
62
66
|
backgroundColor: t.colors.background,
|
|
63
67
|
},
|
|
68
|
+
floating: {
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
left: 0,
|
|
71
|
+
right: 0,
|
|
72
|
+
bottom: 0,
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
backgroundColor: 'transparent',
|
|
75
|
+
},
|
|
76
|
+
pill: {
|
|
77
|
+
borderRadius: t.controlSize.lg / 2,
|
|
78
|
+
paddingHorizontal: t.space[10],
|
|
79
|
+
boxShadow: t.shadow.md,
|
|
80
|
+
},
|
|
64
81
|
}));
|
|
65
82
|
|
|
66
83
|
export function StepScreen({
|
|
84
|
+
top,
|
|
67
85
|
title,
|
|
68
86
|
total,
|
|
69
87
|
current = 0,
|
|
70
88
|
onBack,
|
|
71
89
|
backLabel = '이전',
|
|
72
90
|
primaryAction,
|
|
91
|
+
floatingAction = false,
|
|
73
92
|
secondaryAction,
|
|
93
|
+
actions,
|
|
74
94
|
notice,
|
|
75
95
|
bottomInset = 0,
|
|
76
96
|
children,
|
|
@@ -78,6 +98,7 @@ export function StepScreen({
|
|
|
78
98
|
const t = useTheme();
|
|
79
99
|
const s = useStyles();
|
|
80
100
|
const step = total ? Math.min(total, Math.max(1, current + 1)) : 0;
|
|
101
|
+
const footerBottom = t.layout.footerBottom + bottomInset;
|
|
81
102
|
return (
|
|
82
103
|
<KeyboardAvoidingView behavior="padding" style={s.root}>
|
|
83
104
|
{onBack ? (
|
|
@@ -103,40 +124,55 @@ export function StepScreen({
|
|
|
103
124
|
<View style={[s.fill, { width: `${(step / total) * 100}%` }]} />
|
|
104
125
|
</View>
|
|
105
126
|
) : null}
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<View
|
|
117
|
-
style={[
|
|
118
|
-
s.footer,
|
|
119
|
-
{ paddingBottom: t.layout.footerBottom + bottomInset },
|
|
120
|
-
]}
|
|
121
|
-
>
|
|
122
|
-
<Button
|
|
123
|
-
size="lg"
|
|
124
|
-
onPress={primaryAction.onPress}
|
|
125
|
-
disabled={primaryAction.disabled}
|
|
126
|
-
loading={primaryAction.loading}
|
|
127
|
+
<View style={s.main}>
|
|
128
|
+
<ScrollView
|
|
129
|
+
contentContainerStyle={[
|
|
130
|
+
s.body,
|
|
131
|
+
floatingAction && {
|
|
132
|
+
paddingBottom:
|
|
133
|
+
footerBottom + t.layout.footerTop + t.controlSize.lg,
|
|
134
|
+
},
|
|
135
|
+
]}
|
|
136
|
+
keyboardShouldPersistTaps="handled"
|
|
127
137
|
>
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
{top}
|
|
139
|
+
<Text weight="bold" accessibilityRole="header" style={s.title}>
|
|
140
|
+
{title}
|
|
141
|
+
</Text>
|
|
142
|
+
{children}
|
|
143
|
+
</ScrollView>
|
|
144
|
+
{notice ? <Notice notice={notice} /> : null}
|
|
145
|
+
<View
|
|
146
|
+
pointerEvents={floatingAction ? 'box-none' : 'auto'}
|
|
147
|
+
style={[
|
|
148
|
+
s.footer,
|
|
149
|
+
floatingAction && s.floating,
|
|
150
|
+
{ paddingBottom: footerBottom },
|
|
151
|
+
]}
|
|
152
|
+
>
|
|
153
|
+
{actions}
|
|
154
|
+
{primaryAction ? (
|
|
155
|
+
<Button
|
|
156
|
+
size="lg"
|
|
157
|
+
onPress={primaryAction.onPress}
|
|
158
|
+
disabled={primaryAction.disabled}
|
|
159
|
+
loading={primaryAction.loading}
|
|
160
|
+
style={floatingAction ? s.pill : undefined}
|
|
161
|
+
>
|
|
162
|
+
{primaryAction.label}
|
|
163
|
+
</Button>
|
|
164
|
+
) : null}
|
|
165
|
+
{secondaryAction ? (
|
|
166
|
+
<Button
|
|
167
|
+
variant="ghost"
|
|
168
|
+
onPress={secondaryAction.onPress}
|
|
169
|
+
disabled={secondaryAction.disabled}
|
|
170
|
+
loading={secondaryAction.loading}
|
|
171
|
+
>
|
|
172
|
+
{secondaryAction.label}
|
|
173
|
+
</Button>
|
|
174
|
+
) : null}
|
|
175
|
+
</View>
|
|
140
176
|
</View>
|
|
141
177
|
</KeyboardAvoidingView>
|
|
142
178
|
);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { StoreMark } from '../../components/page-header/store-header';
|
|
3
|
+
import { Sheet } from '../../components/sheet/sheet';
|
|
4
|
+
import { Text } from '../../components/text/text';
|
|
5
|
+
import { CheckGlyph } from '../../internal/glyphs';
|
|
6
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
7
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
8
|
+
import { makeStyles } from '../../utils/styles';
|
|
9
|
+
|
|
10
|
+
export type StoreSheetItem = {
|
|
11
|
+
value: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type StoreSheetProps = {
|
|
17
|
+
open: boolean;
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
title?: string;
|
|
20
|
+
stores: readonly StoreSheetItem[];
|
|
21
|
+
value: string | null;
|
|
22
|
+
onValueChange: (value: string) => void;
|
|
23
|
+
bottomInset?: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const useStyles = makeStyles((t) => ({
|
|
27
|
+
list: { marginHorizontal: -t.space[4] },
|
|
28
|
+
row: {
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
gap: t.space[3],
|
|
32
|
+
minHeight: t.listRow.twoLine,
|
|
33
|
+
paddingHorizontal: t.space[4],
|
|
34
|
+
paddingVertical: t.space[2],
|
|
35
|
+
},
|
|
36
|
+
pressed: { backgroundColor: t.colors.muted },
|
|
37
|
+
body: { flex: 1, gap: t.space[1] },
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
export function StoreSheet({
|
|
41
|
+
open,
|
|
42
|
+
onOpenChange,
|
|
43
|
+
title = '스토어 전환',
|
|
44
|
+
stores,
|
|
45
|
+
value,
|
|
46
|
+
onValueChange,
|
|
47
|
+
bottomInset,
|
|
48
|
+
}: StoreSheetProps) {
|
|
49
|
+
const t = useTheme();
|
|
50
|
+
const s = useStyles();
|
|
51
|
+
return (
|
|
52
|
+
<Sheet
|
|
53
|
+
open={open}
|
|
54
|
+
onOpenChange={onOpenChange}
|
|
55
|
+
title={title}
|
|
56
|
+
bottomInset={bottomInset}
|
|
57
|
+
>
|
|
58
|
+
<View style={s.list} accessibilityRole="radiogroup">
|
|
59
|
+
{stores.map((store) => {
|
|
60
|
+
const on = store.value === value;
|
|
61
|
+
return (
|
|
62
|
+
<PressableBase
|
|
63
|
+
key={store.value}
|
|
64
|
+
accessibilityRole="radio"
|
|
65
|
+
accessibilityState={{ selected: on }}
|
|
66
|
+
accessibilityLabel={store.name}
|
|
67
|
+
onPress={() => {
|
|
68
|
+
onOpenChange(false);
|
|
69
|
+
if (!on) onValueChange(store.value);
|
|
70
|
+
}}
|
|
71
|
+
style={s.row}
|
|
72
|
+
pressedStyle={s.pressed}
|
|
73
|
+
>
|
|
74
|
+
<StoreMark name={store.name} size="lg" />
|
|
75
|
+
<View style={s.body}>
|
|
76
|
+
<Text variant="bodyLg" weight="bold" numberOfLines={1}>
|
|
77
|
+
{store.name}
|
|
78
|
+
</Text>
|
|
79
|
+
{store.description ? (
|
|
80
|
+
<Text variant="label" tone="muted" numberOfLines={1}>
|
|
81
|
+
{store.description}
|
|
82
|
+
</Text>
|
|
83
|
+
) : null}
|
|
84
|
+
</View>
|
|
85
|
+
{on ? (
|
|
86
|
+
<CheckGlyph color={t.colors.primary} size={t.iconSize.md} />
|
|
87
|
+
) : null}
|
|
88
|
+
</PressableBase>
|
|
89
|
+
);
|
|
90
|
+
})}
|
|
91
|
+
</View>
|
|
92
|
+
</Sheet>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TaskTiles, type TaskTile, type TaskTilesProps } from './task-tiles';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { Text } from '../../components/text/text';
|
|
3
|
+
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
4
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
5
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
6
|
+
import { makeStyles } from '../../utils/styles';
|
|
7
|
+
|
|
8
|
+
export type TaskTile = {
|
|
9
|
+
key: string;
|
|
10
|
+
icon: IconSlot;
|
|
11
|
+
label: string;
|
|
12
|
+
count: number;
|
|
13
|
+
note?: string;
|
|
14
|
+
onPress?: () => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type TaskTilesProps = {
|
|
18
|
+
items: readonly TaskTile[];
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const useStyles = makeStyles((t) => ({
|
|
23
|
+
root: {
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
gap: t.space[2],
|
|
26
|
+
paddingHorizontal: t.layout.screenX,
|
|
27
|
+
},
|
|
28
|
+
tile: {
|
|
29
|
+
flex: 1,
|
|
30
|
+
gap: t.space[1],
|
|
31
|
+
paddingVertical: t.space[3],
|
|
32
|
+
paddingHorizontal: t.space[3],
|
|
33
|
+
borderRadius: t.radius.lg,
|
|
34
|
+
backgroundColor: t.colors.muted,
|
|
35
|
+
},
|
|
36
|
+
pressed: { backgroundColor: t.colors.border },
|
|
37
|
+
count: {
|
|
38
|
+
fontSize: t.typography.title.fontSize,
|
|
39
|
+
lineHeight: t.typography.title.lineHeight,
|
|
40
|
+
fontVariant: ['tabular-nums'],
|
|
41
|
+
},
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
export function TaskTiles({ items, style }: TaskTilesProps) {
|
|
45
|
+
const t = useTheme();
|
|
46
|
+
const s = useStyles();
|
|
47
|
+
return (
|
|
48
|
+
<View style={[s.root, style]}>
|
|
49
|
+
{items.map((item) => (
|
|
50
|
+
<PressableBase
|
|
51
|
+
key={item.key}
|
|
52
|
+
onPress={item.onPress}
|
|
53
|
+
disabled={!item.onPress}
|
|
54
|
+
accessibilityLabel={`${item.label} ${item.count}${item.note ? ` ${item.note}` : ''}`}
|
|
55
|
+
style={s.tile}
|
|
56
|
+
pressedStyle={s.pressed}
|
|
57
|
+
>
|
|
58
|
+
{renderIcon(item.icon, {
|
|
59
|
+
color: t.colors.primary,
|
|
60
|
+
size: t.iconSize.md,
|
|
61
|
+
})}
|
|
62
|
+
<Text variant="label" numberOfLines={1}>
|
|
63
|
+
{item.label}
|
|
64
|
+
</Text>
|
|
65
|
+
<Text weight="bold" style={s.count}>
|
|
66
|
+
{item.count}
|
|
67
|
+
</Text>
|
|
68
|
+
<Text variant="caption" tone="muted" numberOfLines={1}>
|
|
69
|
+
{item.note ?? ' '}
|
|
70
|
+
</Text>
|
|
71
|
+
</PressableBase>
|
|
72
|
+
))}
|
|
73
|
+
</View>
|
|
74
|
+
);
|
|
75
|
+
}
|
package/src/charts/index.ts
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import Svg, { Rect } from 'react-native-svg';
|
|
3
|
+
import { formatPrice } from '../components/price/price';
|
|
4
|
+
import { Text } from '../components/text/text';
|
|
5
|
+
import { useTheme } from '../theme/theme-provider';
|
|
6
|
+
import { makeStyles } from '../utils/styles';
|
|
7
|
+
import { summarize } from './summary';
|
|
8
|
+
|
|
9
|
+
export type MiniBarsProps = {
|
|
10
|
+
data: readonly number[];
|
|
11
|
+
labels?: readonly string[];
|
|
12
|
+
height?: number;
|
|
13
|
+
barWidth?: number;
|
|
14
|
+
accessibilityLabel?: string;
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const useStyles = makeStyles((t) => ({
|
|
19
|
+
root: { gap: t.space[1] },
|
|
20
|
+
labels: { flexDirection: 'row' },
|
|
21
|
+
label: { textAlign: 'center' },
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
export function MiniBars({
|
|
25
|
+
data,
|
|
26
|
+
labels,
|
|
27
|
+
height = 40,
|
|
28
|
+
barWidth = 14,
|
|
29
|
+
accessibilityLabel,
|
|
30
|
+
style,
|
|
31
|
+
}: MiniBarsProps) {
|
|
32
|
+
const t = useTheme();
|
|
33
|
+
const s = useStyles();
|
|
34
|
+
const gap = t.space[1] + t.space[1] / 2;
|
|
35
|
+
const width = data.length * barWidth + Math.max(0, data.length - 1) * gap;
|
|
36
|
+
const max = Math.max(1, ...data);
|
|
37
|
+
const last = data.length - 1;
|
|
38
|
+
return (
|
|
39
|
+
<View
|
|
40
|
+
accessible
|
|
41
|
+
accessibilityRole="image"
|
|
42
|
+
accessibilityLabel={
|
|
43
|
+
accessibilityLabel ?? summarize([...data], (v) => formatPrice(v, ''))
|
|
44
|
+
}
|
|
45
|
+
style={[s.root, { width }, style]}
|
|
46
|
+
>
|
|
47
|
+
<Svg width={width} height={height}>
|
|
48
|
+
{data.map((value, i) => {
|
|
49
|
+
const h = Math.max(t.space[1] - 1, (value / max) * height);
|
|
50
|
+
return (
|
|
51
|
+
<Rect
|
|
52
|
+
key={i}
|
|
53
|
+
x={i * (barWidth + gap)}
|
|
54
|
+
y={height - h}
|
|
55
|
+
width={barWidth}
|
|
56
|
+
height={h}
|
|
57
|
+
rx={barWidth / 2 - 1}
|
|
58
|
+
fill={i === last ? t.colors.primary : t.colors.primaryContainer}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
61
|
+
})}
|
|
62
|
+
</Svg>
|
|
63
|
+
{labels ? (
|
|
64
|
+
<View style={[s.labels, { gap }]}>
|
|
65
|
+
{labels.map((label, i) => (
|
|
66
|
+
<Text
|
|
67
|
+
key={i}
|
|
68
|
+
variant="caption"
|
|
69
|
+
tone={i === last ? 'default' : 'muted'}
|
|
70
|
+
weight={i === last ? 'bold' : undefined}
|
|
71
|
+
numberOfLines={1}
|
|
72
|
+
style={[s.label, { width: barWidth }]}
|
|
73
|
+
allowFontScaling={false}
|
|
74
|
+
>
|
|
75
|
+
{label}
|
|
76
|
+
</Text>
|
|
77
|
+
))}
|
|
78
|
+
</View>
|
|
79
|
+
) : null}
|
|
80
|
+
</View>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Image, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { CameraGlyph, PersonGlyph } from '../../internal/glyphs';
|
|
4
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
5
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
6
|
+
import { makeStyles } from '../../utils/styles';
|
|
7
|
+
|
|
8
|
+
export type AvatarSize = 'sm' | 'md' | 'lg';
|
|
9
|
+
|
|
10
|
+
export type AvatarProps = {
|
|
11
|
+
uri?: string | null;
|
|
12
|
+
size?: AvatarSize;
|
|
13
|
+
editable?: boolean;
|
|
14
|
+
hero?: boolean;
|
|
15
|
+
onPress?: () => void;
|
|
16
|
+
accessibilityLabel?: string;
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const SIZE: Record<AvatarSize, number> = { sm: 32, md: 48, lg: 80 };
|
|
21
|
+
const BADGE = 26;
|
|
22
|
+
|
|
23
|
+
const useStyles = makeStyles((t) => ({
|
|
24
|
+
root: { alignSelf: 'center' },
|
|
25
|
+
hero: { paddingTop: t.space[8], paddingBottom: t.space[6] },
|
|
26
|
+
circle: {
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
borderRadius: t.radius.full,
|
|
31
|
+
backgroundColor: t.colors.muted,
|
|
32
|
+
},
|
|
33
|
+
badge: {
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
right: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
width: BADGE,
|
|
38
|
+
height: BADGE,
|
|
39
|
+
borderRadius: t.radius.full,
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
borderWidth: 1,
|
|
43
|
+
borderColor: t.colors.border,
|
|
44
|
+
backgroundColor: t.colors.background,
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
export function Avatar({
|
|
49
|
+
uri,
|
|
50
|
+
size = 'md',
|
|
51
|
+
editable = false,
|
|
52
|
+
hero = false,
|
|
53
|
+
onPress,
|
|
54
|
+
accessibilityLabel,
|
|
55
|
+
style,
|
|
56
|
+
}: AvatarProps) {
|
|
57
|
+
const t = useTheme();
|
|
58
|
+
const s = useStyles();
|
|
59
|
+
const [failed, setFailed] = useState<string | null>(null);
|
|
60
|
+
const px = SIZE[size];
|
|
61
|
+
const shown = uri && failed !== uri ? uri : null;
|
|
62
|
+
const body = (
|
|
63
|
+
<View>
|
|
64
|
+
<View style={[s.circle, { width: px, height: px }]}>
|
|
65
|
+
{shown ? (
|
|
66
|
+
<Image
|
|
67
|
+
source={{ uri: shown }}
|
|
68
|
+
style={{ width: px, height: px }}
|
|
69
|
+
onError={() => setFailed(shown)}
|
|
70
|
+
/>
|
|
71
|
+
) : (
|
|
72
|
+
<PersonGlyph size={px * 0.6} color={t.colors.input} />
|
|
73
|
+
)}
|
|
74
|
+
</View>
|
|
75
|
+
{editable ? (
|
|
76
|
+
<View style={s.badge}>
|
|
77
|
+
<CameraGlyph size={t.iconSize.sm} color={t.colors.mutedForeground} />
|
|
78
|
+
</View>
|
|
79
|
+
) : null}
|
|
80
|
+
</View>
|
|
81
|
+
);
|
|
82
|
+
if (!onPress) {
|
|
83
|
+
return <View style={[s.root, hero && s.hero, style]}>{body}</View>;
|
|
84
|
+
}
|
|
85
|
+
return (
|
|
86
|
+
<PressableBase
|
|
87
|
+
style={[s.root, hero && s.hero, style]}
|
|
88
|
+
accessibilityRole="button"
|
|
89
|
+
accessibilityLabel={accessibilityLabel}
|
|
90
|
+
onPress={onPress}
|
|
91
|
+
>
|
|
92
|
+
{body}
|
|
93
|
+
</PressableBase>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar, type AvatarProps, type AvatarSize } from './avatar';
|