@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
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ScrollView,
|
|
4
|
+
Text,
|
|
5
|
+
View,
|
|
6
|
+
type StyleProp,
|
|
7
|
+
type ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import { ChevronGlyph } from '../../internal/glyphs';
|
|
3
10
|
import { PressableBase } from '../../internal/pressable-base';
|
|
4
11
|
import { useTheme } from '../../theme/theme-provider';
|
|
5
12
|
import { makeStyles } from '../../utils/styles';
|
|
6
13
|
|
|
7
|
-
export type CalendarDate = {
|
|
14
|
+
export type CalendarDate = {
|
|
15
|
+
date: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
marked?: boolean;
|
|
19
|
+
};
|
|
8
20
|
export type CalendarValue = { start?: string; end?: string };
|
|
9
21
|
|
|
10
22
|
export type CalendarProps = {
|
|
@@ -12,11 +24,16 @@ export type CalendarProps = {
|
|
|
12
24
|
mode?: 'single' | 'range';
|
|
13
25
|
value: CalendarValue;
|
|
14
26
|
onValueChange: (value: CalendarValue) => void;
|
|
27
|
+
stacked?: boolean;
|
|
28
|
+
today?: string;
|
|
15
29
|
style?: StyleProp<ViewStyle>;
|
|
16
30
|
};
|
|
17
31
|
|
|
18
32
|
const WEEKDAYS = ['일', '월', '화', '수', '목', '금', '토'];
|
|
19
33
|
const DAY_MS = 86_400_000;
|
|
34
|
+
const CELL = 48;
|
|
35
|
+
const LABELED = 64;
|
|
36
|
+
const DOT = 40;
|
|
20
37
|
|
|
21
38
|
function utc(iso: string): number {
|
|
22
39
|
const [y, m, d] = iso.split('-').map(Number);
|
|
@@ -31,51 +48,107 @@ function weekday(iso: string): number {
|
|
|
31
48
|
return new Date(utc(iso)).getUTCDay();
|
|
32
49
|
}
|
|
33
50
|
|
|
51
|
+
function monthDates(month: string): string[] {
|
|
52
|
+
const [y, m] = month.split('-').map(Number);
|
|
53
|
+
const last = new Date(Date.UTC(y!, m!, 0)).getUTCDate();
|
|
54
|
+
return Array.from(
|
|
55
|
+
{ length: last },
|
|
56
|
+
(_, i) => `${month}-${String(i + 1).padStart(2, '0')}`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function localToday(): string {
|
|
61
|
+
const now = new Date();
|
|
62
|
+
return [
|
|
63
|
+
now.getFullYear(),
|
|
64
|
+
String(now.getMonth() + 1).padStart(2, '0'),
|
|
65
|
+
String(now.getDate()).padStart(2, '0'),
|
|
66
|
+
].join('-');
|
|
67
|
+
}
|
|
68
|
+
|
|
34
69
|
const useStyles = makeStyles((t) => ({
|
|
35
|
-
|
|
70
|
+
stacked: { flex: 1 },
|
|
36
71
|
head: {
|
|
37
72
|
flexDirection: 'row',
|
|
38
73
|
alignItems: 'center',
|
|
39
|
-
|
|
74
|
+
height: 56,
|
|
40
75
|
},
|
|
41
|
-
|
|
42
|
-
|
|
76
|
+
headTitle: {
|
|
77
|
+
flex: 1,
|
|
43
78
|
fontFamily: t.fontFamily,
|
|
44
|
-
fontSize: t.typography.
|
|
45
|
-
lineHeight: t.typography.
|
|
46
|
-
fontWeight: '
|
|
79
|
+
fontSize: t.typography.label.fontSize,
|
|
80
|
+
lineHeight: t.typography.label.lineHeight,
|
|
81
|
+
fontWeight: '500',
|
|
47
82
|
color: t.colors.foreground,
|
|
48
83
|
},
|
|
49
|
-
|
|
50
|
-
|
|
84
|
+
arrow: { width: CELL, height: CELL },
|
|
85
|
+
arrowInner: { flex: 1, alignItems: 'center', justifyContent: 'center' },
|
|
86
|
+
back: { transform: [{ scaleX: -1 }] },
|
|
87
|
+
weekdays: { flexDirection: 'row', height: CELL, alignItems: 'center' },
|
|
88
|
+
weekdaysPinned: {
|
|
89
|
+
paddingHorizontal: t.space[3],
|
|
90
|
+
borderBottomWidth: 1,
|
|
91
|
+
borderBottomColor: t.colors.border,
|
|
92
|
+
},
|
|
51
93
|
weekday: {
|
|
94
|
+
flex: 1,
|
|
52
95
|
textAlign: 'center',
|
|
53
96
|
fontFamily: t.fontFamily,
|
|
54
|
-
fontSize: t.typography.
|
|
55
|
-
lineHeight: t.typography.
|
|
97
|
+
fontSize: t.typography.body.fontSize,
|
|
98
|
+
lineHeight: t.typography.body.lineHeight,
|
|
99
|
+
color: t.colors.foreground,
|
|
100
|
+
},
|
|
101
|
+
months: { paddingHorizontal: t.space[3], paddingBottom: t.space[6] },
|
|
102
|
+
subhead: {
|
|
103
|
+
fontFamily: t.fontFamily,
|
|
104
|
+
fontSize: t.typography.label.fontSize,
|
|
105
|
+
lineHeight: t.typography.label.lineHeight,
|
|
106
|
+
fontWeight: '500',
|
|
56
107
|
color: t.colors.mutedForeground,
|
|
108
|
+
paddingLeft: t.space[3],
|
|
109
|
+
paddingTop: t.space[5],
|
|
110
|
+
paddingBottom: t.space[2],
|
|
57
111
|
},
|
|
112
|
+
grid: { flexDirection: 'row', flexWrap: 'wrap' },
|
|
113
|
+
cell: { width: `${100 / 7}%`, alignItems: 'center' },
|
|
114
|
+
band: {
|
|
115
|
+
position: 'absolute',
|
|
116
|
+
top: t.space[1],
|
|
117
|
+
height: DOT,
|
|
118
|
+
left: 0,
|
|
119
|
+
right: 0,
|
|
120
|
+
backgroundColor: t.colors.primaryTint,
|
|
121
|
+
},
|
|
122
|
+
bandStart: { left: '50%' },
|
|
123
|
+
bandEnd: { right: '50%' },
|
|
58
124
|
day: {
|
|
59
|
-
|
|
125
|
+
width: DOT,
|
|
126
|
+
height: DOT,
|
|
127
|
+
marginTop: t.space[1],
|
|
128
|
+
borderRadius: t.radius.full,
|
|
60
129
|
alignItems: 'center',
|
|
61
130
|
justifyContent: 'center',
|
|
62
|
-
borderRadius: t.radius.sm,
|
|
63
|
-
backgroundColor: t.colors.muted,
|
|
64
131
|
},
|
|
132
|
+
today: { borderWidth: 1, borderColor: t.colors.primary },
|
|
65
133
|
edge: { backgroundColor: t.colors.primary },
|
|
66
|
-
inside: { backgroundColor: t.colors.border },
|
|
67
|
-
off: { backgroundColor: 'transparent' },
|
|
68
|
-
struck: { textDecorationLine: 'line-through' },
|
|
69
134
|
number: {
|
|
70
135
|
fontFamily: t.fontFamily,
|
|
71
|
-
fontSize: t.typography.
|
|
72
|
-
lineHeight: t.typography.
|
|
136
|
+
fontSize: t.typography.body.fontSize,
|
|
137
|
+
lineHeight: t.typography.body.lineHeight,
|
|
73
138
|
fontVariant: ['tabular-nums'],
|
|
74
139
|
},
|
|
75
|
-
|
|
140
|
+
label: {
|
|
76
141
|
fontFamily: t.fontFamily,
|
|
77
142
|
fontSize: t.typography.caption.fontSize,
|
|
78
143
|
lineHeight: t.typography.caption.lineHeight,
|
|
144
|
+
fontVariant: ['tabular-nums'],
|
|
145
|
+
},
|
|
146
|
+
dot: {
|
|
147
|
+
width: 4,
|
|
148
|
+
height: 4,
|
|
149
|
+
borderRadius: t.radius.full,
|
|
150
|
+
marginTop: t.space[1] / 2,
|
|
151
|
+
backgroundColor: t.colors.foreground,
|
|
79
152
|
},
|
|
80
153
|
}));
|
|
81
154
|
|
|
@@ -84,17 +157,18 @@ export function Calendar({
|
|
|
84
157
|
mode = 'single',
|
|
85
158
|
value,
|
|
86
159
|
onValueChange,
|
|
160
|
+
stacked = false,
|
|
161
|
+
today = localToday(),
|
|
87
162
|
style,
|
|
88
163
|
}: CalendarProps) {
|
|
89
164
|
const t = useTheme();
|
|
90
165
|
const s = useStyles();
|
|
166
|
+
const byDate = new Map(days.map((d) => [d.date, d]));
|
|
91
167
|
const months = [...new Set(days.map((d) => d.date.slice(0, 7)))];
|
|
92
168
|
const [page, setPage] = useState(() =>
|
|
93
169
|
Math.max(0, months.indexOf((value.start ?? '').slice(0, 7)))
|
|
94
170
|
);
|
|
95
|
-
const
|
|
96
|
-
const shown = days.filter((d) => d.date.startsWith(month));
|
|
97
|
-
const [year, monthNo] = month.split('-').map(Number);
|
|
171
|
+
const height = days.some((d) => d.label) ? LABELED : CELL;
|
|
98
172
|
const openUntil = (start: string, end: string) => {
|
|
99
173
|
const nights = days.filter((d) => d.date >= start && d.date < end);
|
|
100
174
|
return (
|
|
@@ -110,85 +184,67 @@ export function Calendar({
|
|
|
110
184
|
openUntil(value.start, iso);
|
|
111
185
|
const pick = (day: CalendarDate) => {
|
|
112
186
|
if (mode === 'single') onValueChange({ start: day.date });
|
|
187
|
+
else if (day.date === value.start && !value.end) onValueChange({});
|
|
113
188
|
else if (canEnd(day.date))
|
|
114
189
|
onValueChange({ start: value.start, end: day.date });
|
|
115
190
|
else if (!day.disabled) onValueChange({ start: day.date });
|
|
116
191
|
};
|
|
192
|
+
const ranged = !!value.start && !!value.end && value.start !== value.end;
|
|
117
193
|
const look = (iso: string) => {
|
|
118
194
|
if (iso === value.start || iso === value.end) return 'edge';
|
|
119
|
-
if (
|
|
120
|
-
return 'inside';
|
|
195
|
+
if (ranged && iso > value.start! && iso < value.end!) return 'inside';
|
|
121
196
|
return 'none';
|
|
122
197
|
};
|
|
123
|
-
const blanks = shown.length ? weekday(shown[0]!.date) : 0;
|
|
124
198
|
|
|
125
|
-
|
|
126
|
-
<View style={[s.
|
|
127
|
-
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
‹
|
|
139
|
-
</Text>
|
|
140
|
-
</PressableBase>
|
|
141
|
-
<Text style={s.month}>{`${year}년 ${monthNo}월`}</Text>
|
|
142
|
-
<PressableBase
|
|
143
|
-
style={s.arrow}
|
|
144
|
-
accessibilityRole="button"
|
|
145
|
-
accessibilityLabel="다음 달"
|
|
146
|
-
disabled={page >= months.length - 1}
|
|
147
|
-
onPress={() => setPage(page + 1)}
|
|
148
|
-
>
|
|
149
|
-
<Text
|
|
150
|
-
style={[
|
|
151
|
-
s.month,
|
|
152
|
-
page >= months.length - 1 && { color: t.colors.mutedForeground },
|
|
153
|
-
]}
|
|
154
|
-
>
|
|
155
|
-
›
|
|
156
|
-
</Text>
|
|
157
|
-
</PressableBase>
|
|
158
|
-
</View>
|
|
199
|
+
const weekdays = (pinned: boolean) => (
|
|
200
|
+
<View style={[s.weekdays, pinned && s.weekdaysPinned]}>
|
|
201
|
+
{WEEKDAYS.map((w) => (
|
|
202
|
+
<Text key={w} style={s.weekday}>
|
|
203
|
+
{w}
|
|
204
|
+
</Text>
|
|
205
|
+
))}
|
|
206
|
+
</View>
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
const grid = (month: string) => {
|
|
210
|
+
const dates = monthDates(month);
|
|
211
|
+
return (
|
|
159
212
|
<View style={s.grid}>
|
|
160
|
-
{
|
|
161
|
-
<View key={
|
|
162
|
-
<Text style={s.weekday}>{w}</Text>
|
|
163
|
-
</View>
|
|
164
|
-
))}
|
|
165
|
-
{Array.from({ length: blanks }, (_, i) => (
|
|
166
|
-
<View key={`blank-${i}`} style={s.cell} />
|
|
213
|
+
{Array.from({ length: weekday(dates[0]!) }, (_, i) => (
|
|
214
|
+
<View key={`blank-${i}`} style={[s.cell, { height }]} />
|
|
167
215
|
))}
|
|
168
|
-
{
|
|
169
|
-
const
|
|
170
|
-
const
|
|
216
|
+
{dates.map((iso) => {
|
|
217
|
+
const day = byDate.get(iso);
|
|
218
|
+
const state = look(iso);
|
|
219
|
+
const blocked = !day || (!!day.disabled && !canEnd(iso));
|
|
220
|
+
const isToday = iso === today && state !== 'edge';
|
|
171
221
|
const color =
|
|
172
222
|
state === 'edge'
|
|
173
223
|
? t.colors.primaryForeground
|
|
174
224
|
: blocked
|
|
175
|
-
? t.colors.
|
|
176
|
-
:
|
|
177
|
-
|
|
225
|
+
? t.colors.input
|
|
226
|
+
: isToday
|
|
227
|
+
? t.colors.primary
|
|
228
|
+
: t.colors.foreground;
|
|
229
|
+
const [, m, d] = iso.split('-').map(Number);
|
|
178
230
|
return (
|
|
179
|
-
<View key={
|
|
231
|
+
<View key={iso} style={[s.cell, { height }]}>
|
|
232
|
+
{ranged && state !== 'none' ? (
|
|
233
|
+
<View
|
|
234
|
+
style={[
|
|
235
|
+
s.band,
|
|
236
|
+
iso === value.start && s.bandStart,
|
|
237
|
+
iso === value.end && s.bandEnd,
|
|
238
|
+
]}
|
|
239
|
+
/>
|
|
240
|
+
) : null}
|
|
180
241
|
<PressableBase
|
|
181
|
-
style={[
|
|
182
|
-
s.day,
|
|
183
|
-
state === 'edge' && s.edge,
|
|
184
|
-
state === 'inside' && s.inside,
|
|
185
|
-
blocked && s.off,
|
|
186
|
-
]}
|
|
242
|
+
style={[s.day, isToday && s.today, state === 'edge' && s.edge]}
|
|
187
243
|
accessibilityRole="button"
|
|
188
244
|
accessibilityLabel={[
|
|
189
245
|
`${m}월 ${d}일`,
|
|
190
|
-
`${WEEKDAYS[weekday(
|
|
191
|
-
day
|
|
246
|
+
`${WEEKDAYS[weekday(iso)]}요일`,
|
|
247
|
+
day?.label,
|
|
192
248
|
]
|
|
193
249
|
.filter(Boolean)
|
|
194
250
|
.join(' ')}
|
|
@@ -197,19 +253,85 @@ export function Calendar({
|
|
|
197
253
|
disabled: blocked,
|
|
198
254
|
}}
|
|
199
255
|
disabled={blocked}
|
|
200
|
-
onPress={() => pick(day)}
|
|
256
|
+
onPress={() => day && pick(day)}
|
|
201
257
|
>
|
|
202
|
-
<Text style={[s.number, { color }
|
|
203
|
-
{d}
|
|
204
|
-
</Text>
|
|
205
|
-
{day.label ? (
|
|
206
|
-
<Text style={[s.sub, { color }]}>{day.label}</Text>
|
|
207
|
-
) : null}
|
|
258
|
+
<Text style={[s.number, { color }]}>{d}</Text>
|
|
208
259
|
</PressableBase>
|
|
260
|
+
{day?.label ? (
|
|
261
|
+
<Text
|
|
262
|
+
numberOfLines={1}
|
|
263
|
+
style={[
|
|
264
|
+
s.label,
|
|
265
|
+
{
|
|
266
|
+
color:
|
|
267
|
+
state === 'none'
|
|
268
|
+
? t.colors.mutedForeground
|
|
269
|
+
: t.colors.foreground,
|
|
270
|
+
},
|
|
271
|
+
]}
|
|
272
|
+
>
|
|
273
|
+
{day.label}
|
|
274
|
+
</Text>
|
|
275
|
+
) : null}
|
|
276
|
+
{day?.marked ? <View style={s.dot} /> : null}
|
|
209
277
|
</View>
|
|
210
278
|
);
|
|
211
279
|
})}
|
|
212
280
|
</View>
|
|
281
|
+
);
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const title = (month: string) => {
|
|
285
|
+
const [y, m] = month.split('-').map(Number);
|
|
286
|
+
return `${y}년 ${m}월`;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
if (stacked) {
|
|
290
|
+
return (
|
|
291
|
+
<View style={[s.stacked, style]}>
|
|
292
|
+
{weekdays(true)}
|
|
293
|
+
<ScrollView contentContainerStyle={s.months}>
|
|
294
|
+
{months.map((month) => (
|
|
295
|
+
<View key={month}>
|
|
296
|
+
<Text style={s.subhead}>{title(month)}</Text>
|
|
297
|
+
{grid(month)}
|
|
298
|
+
</View>
|
|
299
|
+
))}
|
|
300
|
+
</ScrollView>
|
|
301
|
+
</View>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const month = months[page] ?? months[0] ?? '';
|
|
306
|
+
const arrow = (dir: -1 | 1) => {
|
|
307
|
+
const off = dir < 0 ? page <= 0 : page >= months.length - 1;
|
|
308
|
+
return (
|
|
309
|
+
<PressableBase
|
|
310
|
+
style={s.arrow}
|
|
311
|
+
accessibilityRole="button"
|
|
312
|
+
accessibilityLabel={dir < 0 ? '이전 달' : '다음 달'}
|
|
313
|
+
disabled={off}
|
|
314
|
+
onPress={() => setPage(page + dir)}
|
|
315
|
+
>
|
|
316
|
+
<View style={[s.arrowInner, dir < 0 && s.back]}>
|
|
317
|
+
<ChevronGlyph
|
|
318
|
+
size={t.iconSize.md}
|
|
319
|
+
color={off ? t.colors.input : t.colors.mutedForeground}
|
|
320
|
+
/>
|
|
321
|
+
</View>
|
|
322
|
+
</PressableBase>
|
|
323
|
+
);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
return (
|
|
327
|
+
<View style={style}>
|
|
328
|
+
<View style={s.head}>
|
|
329
|
+
<Text style={s.headTitle}>{title(month)}</Text>
|
|
330
|
+
{arrow(-1)}
|
|
331
|
+
{arrow(1)}
|
|
332
|
+
</View>
|
|
333
|
+
{weekdays(false)}
|
|
334
|
+
{grid(month)}
|
|
213
335
|
</View>
|
|
214
336
|
);
|
|
215
337
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { View } 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 CheckListProps = { items: readonly string[] };
|
|
8
|
+
|
|
9
|
+
const MARK = 20;
|
|
10
|
+
|
|
11
|
+
const useStyles = makeStyles((t) => ({
|
|
12
|
+
root: { gap: t.space[5] },
|
|
13
|
+
item: { flexDirection: 'row', gap: t.space[3] },
|
|
14
|
+
mark: {
|
|
15
|
+
width: MARK,
|
|
16
|
+
height: MARK,
|
|
17
|
+
marginTop: t.space[1] / 2,
|
|
18
|
+
borderRadius: t.radius.full,
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
backgroundColor: t.colors.primary,
|
|
22
|
+
},
|
|
23
|
+
text: { flex: 1 },
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
export function CheckList({ items }: CheckListProps) {
|
|
27
|
+
const t = useTheme();
|
|
28
|
+
const s = useStyles();
|
|
29
|
+
return (
|
|
30
|
+
<View style={s.root}>
|
|
31
|
+
{items.map((item) => (
|
|
32
|
+
<View key={item} style={s.item}>
|
|
33
|
+
<View style={s.mark}>
|
|
34
|
+
<CheckGlyph
|
|
35
|
+
size={t.iconSize.sm}
|
|
36
|
+
color={t.colors.primaryForeground}
|
|
37
|
+
/>
|
|
38
|
+
</View>
|
|
39
|
+
<Text variant="bodyLg" style={s.text}>
|
|
40
|
+
{item}
|
|
41
|
+
</Text>
|
|
42
|
+
</View>
|
|
43
|
+
))}
|
|
44
|
+
</View>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CheckList, type CheckListProps } from './check-list';
|
|
@@ -8,29 +8,46 @@ import {
|
|
|
8
8
|
import { useTheme } from '../../theme/theme-provider';
|
|
9
9
|
import { makeStyles } from '../../utils/styles';
|
|
10
10
|
|
|
11
|
+
export type ChipSize = 'sm' | 'md' | 'lg';
|
|
12
|
+
|
|
13
|
+
export type ChipVariant = 'solid' | 'outline';
|
|
14
|
+
|
|
11
15
|
export type ChipProps = Omit<PressableBaseProps, 'children' | 'touchHeight'> & {
|
|
12
16
|
selected?: boolean;
|
|
17
|
+
size?: ChipSize;
|
|
18
|
+
variant?: ChipVariant;
|
|
13
19
|
leftIcon?: IconSlot;
|
|
14
20
|
count?: number;
|
|
15
21
|
children: string;
|
|
16
22
|
};
|
|
17
23
|
|
|
18
|
-
const HEIGHT = 32;
|
|
24
|
+
const HEIGHT: Record<ChipSize, number> = { sm: 32, md: 36, lg: 40 };
|
|
25
|
+
const MIN_WIDTH: Record<ChipSize, number> = { sm: 44, md: 48, lg: 52 };
|
|
19
26
|
|
|
20
27
|
const useStyles = makeStyles((t) => ({
|
|
21
28
|
base: {
|
|
22
29
|
flexDirection: 'row',
|
|
23
30
|
alignItems: 'center',
|
|
24
31
|
alignSelf: 'flex-start',
|
|
32
|
+
justifyContent: 'center',
|
|
25
33
|
gap: t.space[1],
|
|
26
|
-
height: HEIGHT,
|
|
27
34
|
paddingHorizontal: t.space[3],
|
|
28
35
|
borderRadius: t.radius.full,
|
|
29
36
|
backgroundColor: t.colors.muted,
|
|
30
37
|
},
|
|
38
|
+
lg: { paddingHorizontal: t.space[4] },
|
|
31
39
|
selected: {
|
|
32
40
|
backgroundColor: t.colors.primaryContainer,
|
|
33
41
|
},
|
|
42
|
+
outline: {
|
|
43
|
+
backgroundColor: 'transparent',
|
|
44
|
+
borderWidth: 1,
|
|
45
|
+
borderColor: t.colors.input,
|
|
46
|
+
},
|
|
47
|
+
outlineSelected: {
|
|
48
|
+
backgroundColor: t.colors.muted,
|
|
49
|
+
borderColor: t.colors.foreground,
|
|
50
|
+
},
|
|
34
51
|
label: {
|
|
35
52
|
fontFamily: t.fontFamily,
|
|
36
53
|
fontSize: t.typography.label.fontSize,
|
|
@@ -42,6 +59,8 @@ const useStyles = makeStyles((t) => ({
|
|
|
42
59
|
|
|
43
60
|
export function Chip({
|
|
44
61
|
selected = false,
|
|
62
|
+
size = 'sm',
|
|
63
|
+
variant = 'solid',
|
|
45
64
|
leftIcon,
|
|
46
65
|
count,
|
|
47
66
|
children,
|
|
@@ -52,7 +71,8 @@ export function Chip({
|
|
|
52
71
|
}: ChipProps) {
|
|
53
72
|
const t = useTheme();
|
|
54
73
|
const s = useStyles();
|
|
55
|
-
const
|
|
74
|
+
const outline = variant === 'outline';
|
|
75
|
+
const color = selected && !outline ? t.colors.primary : t.colors.foreground;
|
|
56
76
|
return (
|
|
57
77
|
<PressableBase
|
|
58
78
|
{...rest}
|
|
@@ -61,10 +81,20 @@ export function Chip({
|
|
|
61
81
|
(count === undefined ? undefined : `${children}, ${count}건`)
|
|
62
82
|
}
|
|
63
83
|
accessibilityState={{ ...accessibilityState, selected }}
|
|
64
|
-
touchHeight={HEIGHT}
|
|
65
|
-
style={[
|
|
84
|
+
touchHeight={HEIGHT[size]}
|
|
85
|
+
style={[
|
|
86
|
+
s.base,
|
|
87
|
+
{ height: HEIGHT[size], minWidth: MIN_WIDTH[size] },
|
|
88
|
+
size === 'lg' && s.lg,
|
|
89
|
+
outline
|
|
90
|
+
? [s.outline, selected && s.outlineSelected]
|
|
91
|
+
: selected && s.selected,
|
|
92
|
+
style,
|
|
93
|
+
]}
|
|
66
94
|
>
|
|
67
|
-
{selected
|
|
95
|
+
{selected && !outline ? (
|
|
96
|
+
<CheckGlyph color={color} size={t.iconSize.sm} />
|
|
97
|
+
) : null}
|
|
68
98
|
{leftIcon ? (
|
|
69
99
|
<View>{renderIcon(leftIcon, { color, size: t.iconSize.sm })}</View>
|
|
70
100
|
) : null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Chip, type ChipProps } from './chip';
|
|
1
|
+
export { Chip, type ChipProps, type ChipSize, type ChipVariant } from './chip';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
1
|
+
import { ScrollView, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
2
|
import { makeStyles } from '../../utils/styles';
|
|
3
|
-
import { Chip } from '../chip/chip';
|
|
3
|
+
import { Chip, type ChipSize, type ChipVariant } from '../chip/chip';
|
|
4
4
|
|
|
5
5
|
export type ChipGroupItem<T extends string> = {
|
|
6
6
|
value: T;
|
|
@@ -25,16 +25,25 @@ type Multiple<T extends string> = {
|
|
|
25
25
|
|
|
26
26
|
export type ChipGroupProps<T extends string> = (Single<T> | Multiple<T>) & {
|
|
27
27
|
items: readonly ChipGroupItem<T>[];
|
|
28
|
+
size?: ChipSize;
|
|
29
|
+
variant?: ChipVariant;
|
|
30
|
+
scroll?: boolean;
|
|
28
31
|
style?: StyleProp<ViewStyle>;
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
const useStyles = makeStyles((t) => ({
|
|
32
35
|
root: { flexDirection: 'row', flexWrap: 'wrap', gap: t.space[2] },
|
|
36
|
+
scroll: { marginHorizontal: -t.layout.screenX, flexGrow: 0 },
|
|
37
|
+
track: {
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
gap: t.space[2],
|
|
40
|
+
paddingHorizontal: t.layout.screenX,
|
|
41
|
+
},
|
|
33
42
|
}));
|
|
34
43
|
|
|
35
44
|
export function ChipGroup<T extends string>(props: ChipGroupProps<T>) {
|
|
36
45
|
const s = useStyles();
|
|
37
|
-
const { items, style } = props;
|
|
46
|
+
const { items, size, variant, scroll, style } = props;
|
|
38
47
|
|
|
39
48
|
const isSelected = (v: T) =>
|
|
40
49
|
props.multiple ? props.value.includes(v) : props.value === v;
|
|
@@ -58,29 +67,47 @@ export function ChipGroup<T extends string>(props: ChipGroupProps<T>) {
|
|
|
58
67
|
props.max !== undefined &&
|
|
59
68
|
props.value.length >= props.max;
|
|
60
69
|
|
|
70
|
+
const chips = items.map((item) => {
|
|
71
|
+
const selected = isSelected(item.value);
|
|
72
|
+
return (
|
|
73
|
+
<Chip
|
|
74
|
+
key={item.value}
|
|
75
|
+
selected={selected}
|
|
76
|
+
size={size}
|
|
77
|
+
variant={variant}
|
|
78
|
+
count={item.count}
|
|
79
|
+
disabled={item.disabled || (full && !selected)}
|
|
80
|
+
accessibilityRole={props.multiple ? 'checkbox' : 'radio'}
|
|
81
|
+
accessibilityState={
|
|
82
|
+
props.multiple ? { checked: selected } : { selected }
|
|
83
|
+
}
|
|
84
|
+
onPress={() => press(item.value)}
|
|
85
|
+
>
|
|
86
|
+
{item.label}
|
|
87
|
+
</Chip>
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
if (scroll) {
|
|
92
|
+
return (
|
|
93
|
+
<ScrollView
|
|
94
|
+
horizontal
|
|
95
|
+
showsHorizontalScrollIndicator={false}
|
|
96
|
+
accessibilityRole={props.multiple ? undefined : 'radiogroup'}
|
|
97
|
+
style={[s.scroll, style]}
|
|
98
|
+
contentContainerStyle={s.track}
|
|
99
|
+
>
|
|
100
|
+
{chips}
|
|
101
|
+
</ScrollView>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
61
105
|
return (
|
|
62
106
|
<View
|
|
63
107
|
accessibilityRole={props.multiple ? undefined : 'radiogroup'}
|
|
64
108
|
style={[s.root, style]}
|
|
65
109
|
>
|
|
66
|
-
{
|
|
67
|
-
const selected = isSelected(item.value);
|
|
68
|
-
return (
|
|
69
|
-
<Chip
|
|
70
|
-
key={item.value}
|
|
71
|
-
selected={selected}
|
|
72
|
-
count={item.count}
|
|
73
|
-
disabled={item.disabled || (full && !selected)}
|
|
74
|
-
accessibilityRole={props.multiple ? 'checkbox' : 'radio'}
|
|
75
|
-
accessibilityState={
|
|
76
|
-
props.multiple ? { checked: selected } : { selected }
|
|
77
|
-
}
|
|
78
|
-
onPress={() => press(item.value)}
|
|
79
|
-
>
|
|
80
|
-
{item.label}
|
|
81
|
-
</Chip>
|
|
82
|
-
);
|
|
83
|
-
})}
|
|
110
|
+
{chips}
|
|
84
111
|
</View>
|
|
85
112
|
);
|
|
86
113
|
}
|