@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,138 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { ChevronGlyph } from '../../internal/glyphs';
|
|
3
|
+
import { renderIcon } from '../../internal/icon';
|
|
4
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
5
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
6
|
+
import { makeStyles } from '../../utils/styles';
|
|
7
|
+
import { tileColor } from '../photo/photo';
|
|
8
|
+
import { Text } from '../text/text';
|
|
9
|
+
import type { PageHeaderAction } from './page-header';
|
|
10
|
+
|
|
11
|
+
export type StoreMarkProps = {
|
|
12
|
+
name: string;
|
|
13
|
+
size?: 'sm' | 'lg';
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type StoreHeaderProps = {
|
|
18
|
+
name: string;
|
|
19
|
+
onPress?: () => void;
|
|
20
|
+
action?: PageHeaderAction;
|
|
21
|
+
topInset?: number;
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const DOT = 6;
|
|
26
|
+
const ICON = 24;
|
|
27
|
+
|
|
28
|
+
const useStyles = makeStyles((t) => ({
|
|
29
|
+
root: {
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: t.space[2],
|
|
33
|
+
paddingBottom: t.space[2],
|
|
34
|
+
paddingHorizontal: t.layout.screenX,
|
|
35
|
+
},
|
|
36
|
+
store: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
gap: t.space[2],
|
|
41
|
+
minHeight: t.minTouchSize,
|
|
42
|
+
},
|
|
43
|
+
mark: {
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
borderRadius: t.radius.full,
|
|
47
|
+
},
|
|
48
|
+
name: { flexShrink: 1 },
|
|
49
|
+
down: { transform: [{ rotate: '90deg' }] },
|
|
50
|
+
action: {
|
|
51
|
+
width: t.minTouchSize,
|
|
52
|
+
height: t.minTouchSize,
|
|
53
|
+
marginRight: -t.space[2],
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
},
|
|
57
|
+
dot: {
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
top: t.space[2] + t.space[1],
|
|
60
|
+
right: t.space[2] + t.space[1],
|
|
61
|
+
width: DOT,
|
|
62
|
+
height: DOT,
|
|
63
|
+
borderRadius: t.radius.full,
|
|
64
|
+
backgroundColor: t.colors.primary,
|
|
65
|
+
},
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
export function StoreMark({ name, size = 'sm', style }: StoreMarkProps) {
|
|
69
|
+
const t = useTheme();
|
|
70
|
+
const s = useStyles();
|
|
71
|
+
const px = size === 'lg' ? t.controlSize.sm : t.space[8];
|
|
72
|
+
return (
|
|
73
|
+
<View
|
|
74
|
+
style={[
|
|
75
|
+
s.mark,
|
|
76
|
+
{ width: px, height: px, backgroundColor: tileColor(name) },
|
|
77
|
+
style,
|
|
78
|
+
]}
|
|
79
|
+
>
|
|
80
|
+
<Text weight="bold" variant={size === 'lg' ? 'bodyLg' : 'label'}>
|
|
81
|
+
{name.trim().slice(0, 1)}
|
|
82
|
+
</Text>
|
|
83
|
+
</View>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function StoreHeader({
|
|
88
|
+
name,
|
|
89
|
+
onPress,
|
|
90
|
+
action,
|
|
91
|
+
topInset = 0,
|
|
92
|
+
style,
|
|
93
|
+
}: StoreHeaderProps) {
|
|
94
|
+
const t = useTheme();
|
|
95
|
+
const s = useStyles();
|
|
96
|
+
const store = (
|
|
97
|
+
<>
|
|
98
|
+
<StoreMark name={name} />
|
|
99
|
+
<Text variant="bodyLg" weight="bold" numberOfLines={1} style={s.name}>
|
|
100
|
+
{name}
|
|
101
|
+
</Text>
|
|
102
|
+
{onPress ? (
|
|
103
|
+
<View style={s.down}>
|
|
104
|
+
<ChevronGlyph color={t.colors.foreground} size={t.iconSize.sm} />
|
|
105
|
+
</View>
|
|
106
|
+
) : null}
|
|
107
|
+
</>
|
|
108
|
+
);
|
|
109
|
+
return (
|
|
110
|
+
<View style={[s.root, { paddingTop: t.space[3] + topInset }, style]}>
|
|
111
|
+
{onPress ? (
|
|
112
|
+
<PressableBase
|
|
113
|
+
onPress={onPress}
|
|
114
|
+
accessibilityRole="button"
|
|
115
|
+
accessibilityLabel={`${name} 스토어 전환`}
|
|
116
|
+
style={s.store}
|
|
117
|
+
>
|
|
118
|
+
{store}
|
|
119
|
+
</PressableBase>
|
|
120
|
+
) : (
|
|
121
|
+
<View style={s.store} accessibilityRole="header">
|
|
122
|
+
{store}
|
|
123
|
+
</View>
|
|
124
|
+
)}
|
|
125
|
+
{action ? (
|
|
126
|
+
<PressableBase
|
|
127
|
+
onPress={action.onPress}
|
|
128
|
+
accessibilityRole="button"
|
|
129
|
+
accessibilityLabel={action.label}
|
|
130
|
+
style={s.action}
|
|
131
|
+
>
|
|
132
|
+
{renderIcon(action.icon, { color: t.colors.foreground, size: ICON })}
|
|
133
|
+
{action.badge ? <View style={s.dot} /> : null}
|
|
134
|
+
</PressableBase>
|
|
135
|
+
) : null}
|
|
136
|
+
</View>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
type StyleProp,
|
|
9
9
|
type ViewStyle,
|
|
10
10
|
} from 'react-native';
|
|
11
|
+
import { ImageGlyph } from '../../internal/glyphs';
|
|
12
|
+
import { tile } from '../../theme/base';
|
|
11
13
|
import { useTheme } from '../../theme/theme-provider';
|
|
12
14
|
|
|
13
15
|
export type PhotoProps = Omit<ImageProps, 'source' | 'style'> & {
|
|
@@ -15,6 +17,7 @@ export type PhotoProps = Omit<ImageProps, 'source' | 'style'> & {
|
|
|
15
17
|
aspectRatio?: number;
|
|
16
18
|
radius?: number;
|
|
17
19
|
fallback?: ReactNode;
|
|
20
|
+
seed?: string;
|
|
18
21
|
style?: StyleProp<ViewStyle>;
|
|
19
22
|
};
|
|
20
23
|
|
|
@@ -24,6 +27,12 @@ function sourceKey(source: ImageSourcePropType): string {
|
|
|
24
27
|
return (source as { uri?: string }).uri ?? '';
|
|
25
28
|
}
|
|
26
29
|
|
|
30
|
+
export function tileColor(seed = ''): string {
|
|
31
|
+
let sum = 0;
|
|
32
|
+
for (const ch of seed) sum += ch.charCodeAt(0);
|
|
33
|
+
return tile[sum % tile.length] ?? tile[0];
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
export function Photo(props: PhotoProps) {
|
|
28
37
|
return <PhotoInner key={sourceKey(props.source)} {...props} />;
|
|
29
38
|
}
|
|
@@ -33,6 +42,7 @@ function PhotoInner({
|
|
|
33
42
|
aspectRatio = 1,
|
|
34
43
|
radius,
|
|
35
44
|
fallback,
|
|
45
|
+
seed,
|
|
36
46
|
style,
|
|
37
47
|
onLoad,
|
|
38
48
|
onError,
|
|
@@ -42,6 +52,7 @@ function PhotoInner({
|
|
|
42
52
|
const [status, setStatus] = useState<'loading' | 'loaded' | 'error'>(
|
|
43
53
|
'loading'
|
|
44
54
|
);
|
|
55
|
+
const blank = sourceKey(source) === '' || status === 'error';
|
|
45
56
|
return (
|
|
46
57
|
<View
|
|
47
58
|
style={[
|
|
@@ -49,13 +60,18 @@ function PhotoInner({
|
|
|
49
60
|
{
|
|
50
61
|
aspectRatio,
|
|
51
62
|
borderRadius: radius ?? t.radius.md,
|
|
52
|
-
backgroundColor:
|
|
63
|
+
backgroundColor:
|
|
64
|
+
blank && !fallback ? tileColor(seed) : t.colors.muted,
|
|
53
65
|
},
|
|
54
66
|
style,
|
|
55
67
|
]}
|
|
56
68
|
>
|
|
57
|
-
{
|
|
58
|
-
<View style={styles.center}>
|
|
69
|
+
{blank ? (
|
|
70
|
+
<View style={styles.center}>
|
|
71
|
+
{fallback ?? (
|
|
72
|
+
<ImageGlyph color={t.colors.mutedForeground} size={t.iconSize.md} />
|
|
73
|
+
)}
|
|
74
|
+
</View>
|
|
59
75
|
) : (
|
|
60
76
|
<Image
|
|
61
77
|
{...rest}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProgressCircle, type ProgressCircleProps } from './progress-circle';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated, Easing, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
|
|
5
|
+
export type ProgressCircleProps = {
|
|
6
|
+
size?: 24 | 40;
|
|
7
|
+
accessibilityLabel?: string;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const THICKNESS = { 24: 3, 40: 5 } as const;
|
|
12
|
+
|
|
13
|
+
export function ProgressCircle({
|
|
14
|
+
size = 40,
|
|
15
|
+
accessibilityLabel,
|
|
16
|
+
style,
|
|
17
|
+
}: ProgressCircleProps) {
|
|
18
|
+
const t = useTheme();
|
|
19
|
+
const turn = useRef(new Animated.Value(0)).current;
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const loop = Animated.loop(
|
|
22
|
+
Animated.timing(turn, {
|
|
23
|
+
toValue: 1,
|
|
24
|
+
duration: 900,
|
|
25
|
+
easing: Easing.linear,
|
|
26
|
+
useNativeDriver: true,
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
loop.start();
|
|
30
|
+
return () => loop.stop();
|
|
31
|
+
}, [turn]);
|
|
32
|
+
const rotate = turn.interpolate({
|
|
33
|
+
inputRange: [0, 1],
|
|
34
|
+
outputRange: ['0deg', '360deg'],
|
|
35
|
+
});
|
|
36
|
+
return (
|
|
37
|
+
<Animated.View
|
|
38
|
+
accessible
|
|
39
|
+
accessibilityRole="progressbar"
|
|
40
|
+
accessibilityLabel={accessibilityLabel}
|
|
41
|
+
style={[
|
|
42
|
+
{
|
|
43
|
+
width: size,
|
|
44
|
+
height: size,
|
|
45
|
+
borderRadius: size / 2,
|
|
46
|
+
borderWidth: THICKNESS[size],
|
|
47
|
+
borderColor: t.colors.border,
|
|
48
|
+
borderTopColor: t.colors.mutedForeground,
|
|
49
|
+
transform: [{ rotate }],
|
|
50
|
+
},
|
|
51
|
+
style,
|
|
52
|
+
]}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResultMark, type ResultMarkProps } from './result-mark';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { CheckGlyph } from '../../internal/glyphs';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
import { Text } from '../text/text';
|
|
6
|
+
|
|
7
|
+
export type ResultMarkProps = {
|
|
8
|
+
kind: 'done' | 'error';
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const SIZE = 48;
|
|
13
|
+
const LINE = 2;
|
|
14
|
+
|
|
15
|
+
const useStyles = makeStyles((t) => ({
|
|
16
|
+
root: {
|
|
17
|
+
width: SIZE,
|
|
18
|
+
height: SIZE,
|
|
19
|
+
borderRadius: t.radius.full,
|
|
20
|
+
borderWidth: LINE,
|
|
21
|
+
borderColor: t.colors.foreground,
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
},
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export function ResultMark({ kind, style }: ResultMarkProps) {
|
|
28
|
+
const t = useTheme();
|
|
29
|
+
const s = useStyles();
|
|
30
|
+
return (
|
|
31
|
+
<View
|
|
32
|
+
accessibilityElementsHidden
|
|
33
|
+
importantForAccessibility="no-hide-descendants"
|
|
34
|
+
style={[s.root, style]}
|
|
35
|
+
>
|
|
36
|
+
{kind === 'done' ? (
|
|
37
|
+
<CheckGlyph color={t.colors.foreground} size={t.iconSize.md} />
|
|
38
|
+
) : (
|
|
39
|
+
<Text variant="title" weight="bold">
|
|
40
|
+
!
|
|
41
|
+
</Text>
|
|
42
|
+
)}
|
|
43
|
+
</View>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -3,13 +3,16 @@ import {
|
|
|
3
3
|
Animated,
|
|
4
4
|
KeyboardAvoidingView,
|
|
5
5
|
Modal,
|
|
6
|
+
ScrollView,
|
|
6
7
|
Text,
|
|
7
8
|
useWindowDimensions,
|
|
8
9
|
View,
|
|
9
10
|
type StyleProp,
|
|
10
11
|
type ViewStyle,
|
|
11
12
|
} from 'react-native';
|
|
13
|
+
import { CheckGlyph } from '../../internal/glyphs';
|
|
12
14
|
import { Backdrop, useOverlayTransition } from '../../internal/overlay';
|
|
15
|
+
import { ListRow } from '../list-row/list-row';
|
|
13
16
|
import { useTheme } from '../../theme/theme-provider';
|
|
14
17
|
import { makeStyles } from '../../utils/styles';
|
|
15
18
|
import { ToastHost } from '../toast/toast';
|
|
@@ -27,6 +30,7 @@ export type SheetProps = {
|
|
|
27
30
|
|
|
28
31
|
const useStyles = makeStyles((t) => ({
|
|
29
32
|
root: { flex: 1, justifyContent: 'flex-end' },
|
|
33
|
+
options: { marginHorizontal: -t.space[4] },
|
|
30
34
|
panel: {
|
|
31
35
|
maxHeight: '90%',
|
|
32
36
|
paddingTop: t.space[2],
|
|
@@ -116,3 +120,32 @@ export function Sheet({
|
|
|
116
120
|
</Modal>
|
|
117
121
|
);
|
|
118
122
|
}
|
|
123
|
+
|
|
124
|
+
export type SheetOptionsProps<T extends string> = {
|
|
125
|
+
items: readonly { value: T; label: string }[];
|
|
126
|
+
value: T | null;
|
|
127
|
+
onValueChange: (value: T) => void;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export function SheetOptions<T extends string>({
|
|
131
|
+
items,
|
|
132
|
+
value,
|
|
133
|
+
onValueChange,
|
|
134
|
+
}: SheetOptionsProps<T>) {
|
|
135
|
+
const s = useStyles();
|
|
136
|
+
return (
|
|
137
|
+
<ScrollView accessibilityRole="radiogroup" style={s.options}>
|
|
138
|
+
{items.map((item) => (
|
|
139
|
+
<ListRow
|
|
140
|
+
key={item.value}
|
|
141
|
+
title={item.label}
|
|
142
|
+
chevron={false}
|
|
143
|
+
trailing={item.value === value ? CheckGlyph : undefined}
|
|
144
|
+
accessibilityRole="radio"
|
|
145
|
+
accessibilityState={{ selected: item.value === value }}
|
|
146
|
+
onPress={() => onValueChange(item.value)}
|
|
147
|
+
/>
|
|
148
|
+
))}
|
|
149
|
+
</ScrollView>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StatusSteps, type StatusStepsProps } from './status-steps';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { makeStyles } from '../../utils/styles';
|
|
3
|
+
import { Text } from '../text/text';
|
|
4
|
+
|
|
5
|
+
export type StatusStepsProps = {
|
|
6
|
+
steps: readonly string[];
|
|
7
|
+
current: number;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const DOT = 12;
|
|
12
|
+
const HALO = 4;
|
|
13
|
+
const LINE = 2;
|
|
14
|
+
|
|
15
|
+
const useStyles = makeStyles((t) => ({
|
|
16
|
+
root: {
|
|
17
|
+
flexDirection: 'row',
|
|
18
|
+
paddingHorizontal: t.layout.screenX,
|
|
19
|
+
paddingVertical: t.space[2],
|
|
20
|
+
},
|
|
21
|
+
step: { flex: 1, alignItems: 'center', gap: t.space[1] },
|
|
22
|
+
line: {
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
top: HALO + DOT / 2 - LINE / 2,
|
|
25
|
+
height: LINE,
|
|
26
|
+
width: '50%',
|
|
27
|
+
backgroundColor: t.colors.border,
|
|
28
|
+
},
|
|
29
|
+
left: { left: 0 },
|
|
30
|
+
right: { right: 0 },
|
|
31
|
+
lineOn: { backgroundColor: t.colors.primary },
|
|
32
|
+
halo: {
|
|
33
|
+
width: DOT + HALO * 2,
|
|
34
|
+
height: DOT + HALO * 2,
|
|
35
|
+
borderRadius: t.radius.full,
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
},
|
|
39
|
+
haloOn: { backgroundColor: t.colors.primaryContainer },
|
|
40
|
+
dot: {
|
|
41
|
+
width: DOT,
|
|
42
|
+
height: DOT,
|
|
43
|
+
borderRadius: t.radius.full,
|
|
44
|
+
backgroundColor: t.colors.border,
|
|
45
|
+
},
|
|
46
|
+
dotOn: { backgroundColor: t.colors.primary },
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
export function StatusSteps({ steps, current, style }: StatusStepsProps) {
|
|
50
|
+
const s = useStyles();
|
|
51
|
+
const index = Math.min(Math.max(current, 0), steps.length - 1);
|
|
52
|
+
const last = steps.length - 1;
|
|
53
|
+
return (
|
|
54
|
+
<View
|
|
55
|
+
style={[s.root, style]}
|
|
56
|
+
accessible
|
|
57
|
+
accessibilityRole="progressbar"
|
|
58
|
+
accessibilityLabel={`${steps.length}단계 중 ${index + 1}단계, ${steps[index] ?? ''}`}
|
|
59
|
+
accessibilityValue={{ min: 1, max: steps.length, now: index + 1 }}
|
|
60
|
+
>
|
|
61
|
+
{steps.map((label, i) => (
|
|
62
|
+
<View key={label} style={s.step}>
|
|
63
|
+
{i > 0 ? (
|
|
64
|
+
<View style={[s.line, s.left, i <= index && s.lineOn]} />
|
|
65
|
+
) : null}
|
|
66
|
+
{i < last ? (
|
|
67
|
+
<View style={[s.line, s.right, i < index && s.lineOn]} />
|
|
68
|
+
) : null}
|
|
69
|
+
<View style={[s.halo, i === index && s.haloOn]}>
|
|
70
|
+
<View style={[s.dot, i <= index && s.dotOn]} />
|
|
71
|
+
</View>
|
|
72
|
+
<Text
|
|
73
|
+
variant="caption"
|
|
74
|
+
weight={i === index ? 'bold' : undefined}
|
|
75
|
+
tone={i === index ? 'default' : 'muted'}
|
|
76
|
+
numberOfLines={1}
|
|
77
|
+
>
|
|
78
|
+
{label}
|
|
79
|
+
</Text>
|
|
80
|
+
</View>
|
|
81
|
+
))}
|
|
82
|
+
</View>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepSlider, type StepSliderProps } from './step-slider';
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { useMemo, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
PanResponder,
|
|
4
|
+
View,
|
|
5
|
+
type LayoutChangeEvent,
|
|
6
|
+
type StyleProp,
|
|
7
|
+
type ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import { makeStyles } from '../../utils/styles';
|
|
10
|
+
import { Text } from '../text/text';
|
|
11
|
+
|
|
12
|
+
export type StepSliderProps = {
|
|
13
|
+
value: number;
|
|
14
|
+
min?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
onChange: (value: number) => void;
|
|
17
|
+
startLabel?: string;
|
|
18
|
+
endLabel?: string;
|
|
19
|
+
accessibilityLabel: string;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const TRACK = 4;
|
|
24
|
+
const TICK = 4;
|
|
25
|
+
const THUMB = 20;
|
|
26
|
+
|
|
27
|
+
const useStyles = makeStyles((t) => ({
|
|
28
|
+
root: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
29
|
+
end: { width: t.space[12] },
|
|
30
|
+
endRight: { width: t.space[12], textAlign: 'right' },
|
|
31
|
+
area: { flex: 1, height: t.minTouchSize, justifyContent: 'center' },
|
|
32
|
+
track: {
|
|
33
|
+
position: 'absolute',
|
|
34
|
+
left: 0,
|
|
35
|
+
right: 0,
|
|
36
|
+
height: TRACK,
|
|
37
|
+
borderRadius: t.radius.full,
|
|
38
|
+
backgroundColor: t.colors.ring,
|
|
39
|
+
},
|
|
40
|
+
ticks: {
|
|
41
|
+
paddingHorizontal: t.space[2],
|
|
42
|
+
flexDirection: 'row',
|
|
43
|
+
justifyContent: 'space-between',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
},
|
|
46
|
+
tick: {
|
|
47
|
+
width: TICK,
|
|
48
|
+
height: t.space[3],
|
|
49
|
+
borderRadius: t.radius.full,
|
|
50
|
+
backgroundColor: t.colors.ring,
|
|
51
|
+
},
|
|
52
|
+
thumb: {
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
width: THUMB,
|
|
55
|
+
height: THUMB,
|
|
56
|
+
borderRadius: t.radius.full,
|
|
57
|
+
backgroundColor: t.colors.foreground,
|
|
58
|
+
},
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
export function StepSlider({
|
|
62
|
+
value,
|
|
63
|
+
min = -2,
|
|
64
|
+
max = 2,
|
|
65
|
+
onChange,
|
|
66
|
+
startLabel,
|
|
67
|
+
endLabel,
|
|
68
|
+
accessibilityLabel,
|
|
69
|
+
style,
|
|
70
|
+
}: StepSliderProps) {
|
|
71
|
+
const s = useStyles();
|
|
72
|
+
const [width, setWidth] = useState(0);
|
|
73
|
+
const count = max - min;
|
|
74
|
+
const latest = useRef({ value, onChange, min, max, width, count });
|
|
75
|
+
latest.current = { value, onChange, min, max, width, count };
|
|
76
|
+
const origin = useRef(0);
|
|
77
|
+
const pick = (x: number) => {
|
|
78
|
+
const {
|
|
79
|
+
width: w,
|
|
80
|
+
min: lo,
|
|
81
|
+
count: n,
|
|
82
|
+
value: now,
|
|
83
|
+
onChange: change,
|
|
84
|
+
} = latest.current;
|
|
85
|
+
if (w <= 0) return;
|
|
86
|
+
const span = w - THUMB;
|
|
87
|
+
const at = Math.max(0, Math.min(span, x - THUMB / 2));
|
|
88
|
+
const next = lo + Math.round((at / span) * n);
|
|
89
|
+
if (next !== now) change(next);
|
|
90
|
+
};
|
|
91
|
+
const pan = useMemo(
|
|
92
|
+
() =>
|
|
93
|
+
PanResponder.create({
|
|
94
|
+
onStartShouldSetPanResponder: () => true,
|
|
95
|
+
onMoveShouldSetPanResponder: (_, g) => Math.abs(g.dx) > Math.abs(g.dy),
|
|
96
|
+
onPanResponderTerminationRequest: () => false,
|
|
97
|
+
onPanResponderGrant: (e) => {
|
|
98
|
+
origin.current = e.nativeEvent.locationX;
|
|
99
|
+
pick(origin.current);
|
|
100
|
+
},
|
|
101
|
+
onPanResponderMove: (_, g) => pick(origin.current + g.dx),
|
|
102
|
+
}),
|
|
103
|
+
[]
|
|
104
|
+
);
|
|
105
|
+
const left = width > 0 ? ((value - min) / count) * (width - THUMB) : 0;
|
|
106
|
+
const ticks = [];
|
|
107
|
+
for (let v = min; v <= max; v += 1)
|
|
108
|
+
ticks.push(<View key={v} style={s.tick} />);
|
|
109
|
+
return (
|
|
110
|
+
<View style={[s.root, style]}>
|
|
111
|
+
{startLabel ? (
|
|
112
|
+
<Text variant="caption" tone="muted" numberOfLines={1} style={s.end}>
|
|
113
|
+
{startLabel}
|
|
114
|
+
</Text>
|
|
115
|
+
) : null}
|
|
116
|
+
<View
|
|
117
|
+
{...pan.panHandlers}
|
|
118
|
+
accessible
|
|
119
|
+
accessibilityRole="adjustable"
|
|
120
|
+
accessibilityLabel={accessibilityLabel}
|
|
121
|
+
accessibilityValue={{ min, max, now: value }}
|
|
122
|
+
accessibilityActions={[{ name: 'increment' }, { name: 'decrement' }]}
|
|
123
|
+
onAccessibilityAction={(e) => {
|
|
124
|
+
const next =
|
|
125
|
+
value + (e.nativeEvent.actionName === 'increment' ? 1 : -1);
|
|
126
|
+
if (next >= min && next <= max) onChange(next);
|
|
127
|
+
}}
|
|
128
|
+
onLayout={(e: LayoutChangeEvent) =>
|
|
129
|
+
setWidth(e.nativeEvent.layout.width)
|
|
130
|
+
}
|
|
131
|
+
style={s.area}
|
|
132
|
+
>
|
|
133
|
+
<View style={s.track} pointerEvents="none" />
|
|
134
|
+
<View style={s.ticks} pointerEvents="none">
|
|
135
|
+
{ticks}
|
|
136
|
+
</View>
|
|
137
|
+
{width > 0 ? (
|
|
138
|
+
<View style={[s.thumb, { left }]} pointerEvents="none" />
|
|
139
|
+
) : null}
|
|
140
|
+
</View>
|
|
141
|
+
{endLabel ? (
|
|
142
|
+
<Text
|
|
143
|
+
variant="caption"
|
|
144
|
+
tone="muted"
|
|
145
|
+
numberOfLines={1}
|
|
146
|
+
style={s.endRight}
|
|
147
|
+
>
|
|
148
|
+
{endLabel}
|
|
149
|
+
</Text>
|
|
150
|
+
) : null}
|
|
151
|
+
</View>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextLinks, type TextLink, type TextLinksProps } from './text-links';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
import { Text } from '../text/text';
|
|
6
|
+
|
|
7
|
+
export type TextLink = { label: string; onPress: () => void };
|
|
8
|
+
|
|
9
|
+
export type TextLinksProps = { items: readonly TextLink[] };
|
|
10
|
+
|
|
11
|
+
const useStyles = makeStyles((t) => ({
|
|
12
|
+
root: {
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
gap: t.space[3],
|
|
17
|
+
paddingVertical: t.space[6],
|
|
18
|
+
},
|
|
19
|
+
bar: { width: 1, height: t.space[3], backgroundColor: t.colors.border },
|
|
20
|
+
link: { paddingVertical: t.space[1] },
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
export function TextLinks({ items }: TextLinksProps) {
|
|
24
|
+
const s = useStyles();
|
|
25
|
+
return (
|
|
26
|
+
<View style={s.root}>
|
|
27
|
+
{items.map((item, index) => (
|
|
28
|
+
<Fragment key={item.label}>
|
|
29
|
+
{index ? <View style={s.bar} /> : null}
|
|
30
|
+
<PressableBase
|
|
31
|
+
style={s.link}
|
|
32
|
+
accessibilityRole="button"
|
|
33
|
+
onPress={item.onPress}
|
|
34
|
+
>
|
|
35
|
+
<Text variant="caption" tone="muted">
|
|
36
|
+
{item.label}
|
|
37
|
+
</Text>
|
|
38
|
+
</PressableBase>
|
|
39
|
+
</Fragment>
|
|
40
|
+
))}
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
}
|