@ezpg/app-ui 0.0.0-stage → 0.2.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 +26 -0
- package/LICENSE +20 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js +88 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -0
- package/lib/module/blocks/brand-profile-card/index.js +4 -0
- package/lib/module/blocks/brand-profile-card/index.js.map +1 -0
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js +190 -0
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js.map +1 -0
- package/lib/module/blocks/bulk-ship-list/index.js +4 -0
- package/lib/module/blocks/bulk-ship-list/index.js.map +1 -0
- package/lib/module/blocks/claim-row/claim-row.js +106 -0
- package/lib/module/blocks/claim-row/claim-row.js.map +1 -0
- package/lib/module/blocks/claim-row/index.js +4 -0
- package/lib/module/blocks/claim-row/index.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +122 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/index.js +4 -0
- package/lib/module/blocks/color-swatch-picker/index.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +140 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/index.js +4 -0
- package/lib/module/blocks/copy-variant-picker/index.js.map +1 -0
- package/lib/module/blocks/credit-wallet/credit-wallet.js +121 -0
- package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -0
- package/lib/module/blocks/credit-wallet/index.js +4 -0
- package/lib/module/blocks/credit-wallet/index.js.map +1 -0
- package/lib/module/blocks/generation-progress/generation-progress.js +157 -0
- package/lib/module/blocks/generation-progress/generation-progress.js.map +1 -0
- package/lib/module/blocks/generation-progress/index.js +4 -0
- package/lib/module/blocks/generation-progress/index.js.map +1 -0
- package/lib/module/blocks/image-grid/image-grid.js +277 -0
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -0
- package/lib/module/blocks/image-grid/index.js +4 -0
- package/lib/module/blocks/image-grid/index.js.map +1 -0
- package/lib/module/blocks/index.js +25 -0
- package/lib/module/blocks/index.js.map +1 -0
- package/lib/module/blocks/internal/card.js +80 -0
- package/lib/module/blocks/internal/card.js.map +1 -0
- package/lib/module/blocks/internal/format.js +19 -0
- package/lib/module/blocks/internal/format.js.map +1 -0
- package/lib/module/blocks/invoice-row/index.js +4 -0
- package/lib/module/blocks/invoice-row/index.js.map +1 -0
- package/lib/module/blocks/invoice-row/invoice-row.js +99 -0
- package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -0
- package/lib/module/blocks/logo-candidate-grid/index.js +4 -0
- package/lib/module/blocks/logo-candidate-grid/index.js.map +1 -0
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +115 -0
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/index.js +4 -0
- package/lib/module/blocks/oauth-buttons/index.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +99 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -0
- package/lib/module/blocks/option-editor/index.js +4 -0
- package/lib/module/blocks/option-editor/index.js.map +1 -0
- package/lib/module/blocks/option-editor/option-editor.js +143 -0
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -0
- package/lib/module/blocks/order-card/index.js +4 -0
- package/lib/module/blocks/order-card/index.js.map +1 -0
- package/lib/module/blocks/order-card/order-card.js +151 -0
- package/lib/module/blocks/order-card/order-card.js.map +1 -0
- package/lib/module/blocks/plan-card/index.js +4 -0
- package/lib/module/blocks/plan-card/index.js.map +1 -0
- package/lib/module/blocks/plan-card/plan-card.js +138 -0
- package/lib/module/blocks/plan-card/plan-card.js.map +1 -0
- package/lib/module/blocks/product-list-empty/index.js +4 -0
- package/lib/module/blocks/product-list-empty/index.js.map +1 -0
- package/lib/module/blocks/product-list-empty/product-list-empty.js +153 -0
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -0
- package/lib/module/blocks/review-row/index.js +4 -0
- package/lib/module/blocks/review-row/index.js.map +1 -0
- package/lib/module/blocks/review-row/review-row.js +276 -0
- package/lib/module/blocks/review-row/review-row.js.map +1 -0
- package/lib/module/blocks/sales-chart/index.js +4 -0
- package/lib/module/blocks/sales-chart/index.js.map +1 -0
- package/lib/module/blocks/sales-chart/sales-chart.js +124 -0
- package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -0
- package/lib/module/blocks/selection-bar/index.js +4 -0
- package/lib/module/blocks/selection-bar/index.js.map +1 -0
- package/lib/module/blocks/selection-bar/selection-bar.js +69 -0
- package/lib/module/blocks/selection-bar/selection-bar.js.map +1 -0
- package/lib/module/blocks/service-state-banner/index.js +4 -0
- package/lib/module/blocks/service-state-banner/index.js.map +1 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js +70 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -0
- package/lib/module/blocks/shipping-tracking-row/index.js +4 -0
- package/lib/module/blocks/shipping-tracking-row/index.js.map +1 -0
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +114 -0
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/index.js +4 -0
- package/lib/module/blocks/site-preview-frame/index.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +121 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -0
- package/lib/module/blocks/stat-card/index.js +4 -0
- package/lib/module/blocks/stat-card/index.js.map +1 -0
- package/lib/module/blocks/stat-card/stat-card.js +69 -0
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -0
- package/lib/module/blocks/step-screen/index.js +4 -0
- package/lib/module/blocks/step-screen/index.js.map +1 -0
- package/lib/module/blocks/step-screen/step-screen.js +132 -0
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -0
- package/lib/module/blocks/supply-item-card/index.js +4 -0
- package/lib/module/blocks/supply-item-card/index.js.map +1 -0
- package/lib/module/blocks/supply-item-card/supply-item-card.js +145 -0
- package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -0
- package/lib/module/charts/index.js +5 -0
- package/lib/module/charts/index.js.map +1 -0
- package/lib/module/charts/line-chart.js +124 -0
- package/lib/module/charts/line-chart.js.map +1 -0
- package/lib/module/charts/scale.js +39 -0
- package/lib/module/charts/scale.js.map +1 -0
- package/lib/module/charts/sparkline.js +49 -0
- package/lib/module/charts/sparkline.js.map +1 -0
- package/lib/module/charts/summary.js +10 -0
- package/lib/module/charts/summary.js.map +1 -0
- package/lib/module/charts.js +5 -0
- package/lib/module/charts.js.map +1 -0
- package/lib/module/components/button/button.js +122 -0
- package/lib/module/components/button/button.js.map +1 -0
- package/lib/module/components/button/index.js +4 -0
- package/lib/module/components/button/index.js.map +1 -0
- package/lib/module/components/checkbox/checkbox.js +72 -0
- package/lib/module/components/checkbox/checkbox.js.map +1 -0
- package/lib/module/components/checkbox/index.js +4 -0
- package/lib/module/components/checkbox/index.js.map +1 -0
- package/lib/module/components/chip/chip.js +82 -0
- package/lib/module/components/chip/chip.js.map +1 -0
- package/lib/module/components/chip/index.js +4 -0
- package/lib/module/components/chip/index.js.map +1 -0
- package/lib/module/components/chip-group/chip-group.js +56 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -0
- package/lib/module/components/chip-group/index.js +4 -0
- package/lib/module/components/chip-group/index.js.map +1 -0
- package/lib/module/components/dialog/dialog.js +116 -0
- package/lib/module/components/dialog/dialog.js.map +1 -0
- package/lib/module/components/dialog/index.js +4 -0
- package/lib/module/components/dialog/index.js.map +1 -0
- package/lib/module/components/divider/divider.js +20 -0
- package/lib/module/components/divider/divider.js.map +1 -0
- package/lib/module/components/divider/index.js +4 -0
- package/lib/module/components/divider/index.js.map +1 -0
- package/lib/module/components/empty-state/empty-state.js +116 -0
- package/lib/module/components/empty-state/empty-state.js.map +1 -0
- package/lib/module/components/empty-state/index.js +4 -0
- package/lib/module/components/empty-state/index.js.map +1 -0
- package/lib/module/components/field/field.js +172 -0
- package/lib/module/components/field/field.js.map +1 -0
- package/lib/module/components/field/index.js +4 -0
- package/lib/module/components/field/index.js.map +1 -0
- package/lib/module/components/list-row/index.js +4 -0
- package/lib/module/components/list-row/index.js.map +1 -0
- package/lib/module/components/list-row/list-row.js +97 -0
- package/lib/module/components/list-row/list-row.js.map +1 -0
- package/lib/module/components/photo/index.js +4 -0
- package/lib/module/components/photo/index.js.map +1 -0
- package/lib/module/components/photo/photo.js +65 -0
- package/lib/module/components/photo/photo.js.map +1 -0
- package/lib/module/components/price/index.js +4 -0
- package/lib/module/components/price/index.js.map +1 -0
- package/lib/module/components/price/price.js +70 -0
- package/lib/module/components/price/price.js.map +1 -0
- package/lib/module/components/progress-bar/index.js +4 -0
- package/lib/module/components/progress-bar/index.js.map +1 -0
- package/lib/module/components/progress-bar/progress-bar.js +92 -0
- package/lib/module/components/progress-bar/progress-bar.js.map +1 -0
- package/lib/module/components/search-field/index.js +4 -0
- package/lib/module/components/search-field/index.js.map +1 -0
- package/lib/module/components/search-field/search-field.js +35 -0
- package/lib/module/components/search-field/search-field.js.map +1 -0
- package/lib/module/components/segmented-tabs/index.js +4 -0
- package/lib/module/components/segmented-tabs/index.js.map +1 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js +74 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -0
- package/lib/module/components/sheet/index.js +4 -0
- package/lib/module/components/sheet/index.js.map +1 -0
- package/lib/module/components/sheet/sheet.js +97 -0
- package/lib/module/components/sheet/sheet.js.map +1 -0
- package/lib/module/components/skeleton/index.js +4 -0
- package/lib/module/components/skeleton/index.js.map +1 -0
- package/lib/module/components/skeleton/skeleton.js +48 -0
- package/lib/module/components/skeleton/skeleton.js.map +1 -0
- package/lib/module/components/status-badge/index.js +4 -0
- package/lib/module/components/status-badge/index.js.map +1 -0
- package/lib/module/components/status-badge/status-badge.js +48 -0
- package/lib/module/components/status-badge/status-badge.js.map +1 -0
- package/lib/module/components/switch/index.js +4 -0
- package/lib/module/components/switch/index.js.map +1 -0
- package/lib/module/components/switch/switch.js +27 -0
- package/lib/module/components/switch/switch.js.map +1 -0
- package/lib/module/components/text/index.js +4 -0
- package/lib/module/components/text/index.js.map +1 -0
- package/lib/module/components/text/text.js +56 -0
- package/lib/module/components/text/text.js.map +1 -0
- package/lib/module/components/toast/index.js +4 -0
- package/lib/module/components/toast/index.js.map +1 -0
- package/lib/module/components/toast/toast.js +195 -0
- package/lib/module/components/toast/toast.js.map +1 -0
- package/lib/module/components/wizard-steps/index.js +4 -0
- package/lib/module/components/wizard-steps/index.js.map +1 -0
- package/lib/module/components/wizard-steps/wizard-steps.js +67 -0
- package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -0
- package/lib/module/index.js +32 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/glyphs.js +196 -0
- package/lib/module/internal/glyphs.js.map +1 -0
- package/lib/module/internal/icon.js +6 -0
- package/lib/module/internal/icon.js.map +1 -0
- package/lib/module/internal/overlay.js +55 -0
- package/lib/module/internal/overlay.js.map +1 -0
- package/lib/module/internal/pressable-base.js +39 -0
- package/lib/module/internal/pressable-base.js.map +1 -0
- package/lib/module/internal/use-reduced-motion.js +27 -0
- package/lib/module/internal/use-reduced-motion.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/sortable/index.js +6 -0
- package/lib/module/sortable/index.js.map +1 -0
- package/lib/module/sortable/move.js +10 -0
- package/lib/module/sortable/move.js.map +1 -0
- package/lib/module/sortable/sortable-grid.js +80 -0
- package/lib/module/sortable/sortable-grid.js.map +1 -0
- package/lib/module/sortable/sortable-list.js +15 -0
- package/lib/module/sortable/sortable-list.js.map +1 -0
- package/lib/module/sortable.js +6 -0
- package/lib/module/sortable.js.map +1 -0
- package/lib/module/theme/create-theme.js +50 -0
- package/lib/module/theme/create-theme.js.map +1 -0
- package/lib/module/theme/theme-provider.js +24 -0
- package/lib/module/theme/theme-provider.js.map +1 -0
- package/lib/module/theme/tokens.js +122 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/utils/color.js +25 -0
- package/lib/module/utils/color.js.map +1 -0
- package/lib/module/utils/styles.js +17 -0
- package/lib/module/utils/styles.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +13 -0
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/brand-profile-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/brand-profile-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts +24 -0
- package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts.map +1 -0
- package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts +2 -0
- package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts +15 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +14 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/index.d.ts +2 -0
- package/lib/typescript/src/blocks/color-swatch-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +18 -0
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -0
- package/lib/typescript/src/blocks/copy-variant-picker/index.d.ts +2 -0
- package/lib/typescript/src/blocks/copy-variant-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +12 -0
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -0
- package/lib/typescript/src/blocks/credit-wallet/index.d.ts +2 -0
- package/lib/typescript/src/blocks/credit-wallet/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts +17 -0
- package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts.map +1 -0
- package/lib/typescript/src/blocks/generation-progress/index.d.ts +2 -0
- package/lib/typescript/src/blocks/generation-progress/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts +18 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/image-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/index.d.ts +23 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/internal/card.d.ts +11 -0
- package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/internal/format.d.ts +4 -0
- package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invoice-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/invoice-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +15 -0
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +15 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts +2 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +13 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -0
- package/lib/typescript/src/blocks/option-editor/index.d.ts +2 -0
- package/lib/typescript/src/blocks/option-editor/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +18 -0
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -0
- package/lib/typescript/src/blocks/order-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/order-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts +36 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/plan-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/plan-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +25 -0
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-list-empty/index.d.ts +2 -0
- package/lib/typescript/src/blocks/product-list-empty/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +16 -0
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -0
- package/lib/typescript/src/blocks/review-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/review-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/review-row/review-row.d.ts +25 -0
- package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/sales-chart/index.d.ts +2 -0
- package/lib/typescript/src/blocks/sales-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +15 -0
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -0
- package/lib/typescript/src/blocks/selection-bar/index.d.ts +2 -0
- package/lib/typescript/src/blocks/selection-bar/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts +12 -0
- package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/index.d.ts +2 -0
- package/lib/typescript/src/blocks/service-state-banner/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts +12 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +11 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-preview-frame/index.d.ts +2 -0
- package/lib/typescript/src/blocks/site-preview-frame/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +16 -0
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/stat-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +12 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/step-screen/index.d.ts +2 -0
- package/lib/typescript/src/blocks/step-screen/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +20 -0
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -0
- package/lib/typescript/src/blocks/supply-item-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/supply-item-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +24 -0
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -0
- package/lib/typescript/src/charts/index.d.ts +3 -0
- package/lib/typescript/src/charts/index.d.ts.map +1 -0
- package/lib/typescript/src/charts/line-chart.d.ts +17 -0
- package/lib/typescript/src/charts/line-chart.d.ts.map +1 -0
- package/lib/typescript/src/charts/scale.d.ts +10 -0
- package/lib/typescript/src/charts/scale.d.ts.map +1 -0
- package/lib/typescript/src/charts/sparkline.d.ts +11 -0
- package/lib/typescript/src/charts/sparkline.d.ts.map +1 -0
- package/lib/typescript/src/charts/summary.d.ts +2 -0
- package/lib/typescript/src/charts/summary.d.ts.map +1 -0
- package/lib/typescript/src/charts.d.ts +3 -0
- package/lib/typescript/src/charts.d.ts.map +1 -0
- package/lib/typescript/src/components/button/button.d.ts +15 -0
- package/lib/typescript/src/components/button/button.d.ts.map +1 -0
- package/lib/typescript/src/components/button/index.d.ts +2 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox/checkbox.d.ts +8 -0
- package/lib/typescript/src/components/checkbox/checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox/index.d.ts +2 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/chip.d.ts +10 -0
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/index.d.ts +2 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +26 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -0
- package/lib/typescript/src/components/chip-group/index.d.ts +2 -0
- package/lib/typescript/src/components/chip-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/dialog.d.ts +13 -0
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/index.d.ts +2 -0
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/divider.d.ts +7 -0
- package/lib/typescript/src/components/divider/divider.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/index.d.ts +2 -0
- package/lib/typescript/src/components/divider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts +16 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/index.d.ts +2 -0
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/src/components/field/field.d.ts +15 -0
- package/lib/typescript/src/components/field/field.d.ts.map +1 -0
- package/lib/typescript/src/components/field/index.d.ts +2 -0
- package/lib/typescript/src/components/field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/index.d.ts +2 -0
- package/lib/typescript/src/components/list-row/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts +12 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/index.d.ts +2 -0
- package/lib/typescript/src/components/photo/index.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/photo.d.ts +11 -0
- package/lib/typescript/src/components/photo/photo.d.ts.map +1 -0
- package/lib/typescript/src/components/price/index.d.ts +2 -0
- package/lib/typescript/src/components/price/index.d.ts.map +1 -0
- package/lib/typescript/src/components/price/price.d.ts +12 -0
- package/lib/typescript/src/components/price/price.d.ts.map +1 -0
- package/lib/typescript/src/components/progress-bar/index.d.ts +2 -0
- package/lib/typescript/src/components/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress-bar/progress-bar.d.ts +9 -0
- package/lib/typescript/src/components/progress-bar/progress-bar.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/index.d.ts +2 -0
- package/lib/typescript/src/components/search-field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts +8 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -0
- package/lib/typescript/src/components/segmented-tabs/index.d.ts +2 -0
- package/lib/typescript/src/components/segmented-tabs/index.d.ts.map +1 -0
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +13 -0
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/index.d.ts +2 -0
- package/lib/typescript/src/components/sheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts +14 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/index.d.ts +2 -0
- package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +9 -0
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/status-badge/index.d.ts +2 -0
- package/lib/typescript/src/components/status-badge/index.d.ts.map +1 -0
- package/lib/typescript/src/components/status-badge/status-badge.d.ts +9 -0
- package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/index.d.ts +2 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/switch.d.ts +9 -0
- package/lib/typescript/src/components/switch/switch.d.ts.map +1 -0
- package/lib/typescript/src/components/text/index.d.ts +2 -0
- package/lib/typescript/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/text/text.d.ts +13 -0
- package/lib/typescript/src/components/text/text.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/index.d.ts +2 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/toast.d.ts +22 -0
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -0
- package/lib/typescript/src/components/wizard-steps/index.d.ts +2 -0
- package/lib/typescript/src/components/wizard-steps/index.d.ts.map +1 -0
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +8 -0
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +32 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/internal/glyphs.d.ts +11 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -0
- package/lib/typescript/src/internal/icon.d.ts +8 -0
- package/lib/typescript/src/internal/icon.d.ts.map +1 -0
- package/lib/typescript/src/internal/overlay.d.ts +12 -0
- package/lib/typescript/src/internal/overlay.d.ts.map +1 -0
- package/lib/typescript/src/internal/pressable-base.d.ts +10 -0
- package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -0
- package/lib/typescript/src/internal/use-reduced-motion.d.ts +2 -0
- package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -0
- package/lib/typescript/src/sortable/index.d.ts +4 -0
- package/lib/typescript/src/sortable/index.d.ts.map +1 -0
- package/lib/typescript/src/sortable/move.d.ts +2 -0
- package/lib/typescript/src/sortable/move.d.ts.map +1 -0
- package/lib/typescript/src/sortable/sortable-grid.d.ts +25 -0
- package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -0
- package/lib/typescript/src/sortable/sortable-list.d.ts +4 -0
- package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -0
- package/lib/typescript/src/sortable.d.ts +4 -0
- package/lib/typescript/src/sortable.d.ts.map +1 -0
- package/lib/typescript/src/theme/create-theme.d.ts +4 -0
- package/lib/typescript/src/theme/create-theme.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme-provider.d.ts +10 -0
- package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens.d.ts +4 -0
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +83 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/color.d.ts +3 -0
- package/lib/typescript/src/utils/color.d.ts.map +1 -0
- package/lib/typescript/src/utils/styles.d.ts +8 -0
- package/lib/typescript/src/utils/styles.d.ts.map +1 -0
- package/package.json +109 -3
- package/src/blocks/brand-profile-card/brand-profile-card.tsx +85 -0
- package/src/blocks/brand-profile-card/index.ts +4 -0
- package/src/blocks/bulk-ship-list/bulk-ship-list.tsx +187 -0
- package/src/blocks/bulk-ship-list/index.ts +8 -0
- package/src/blocks/claim-row/claim-row.tsx +125 -0
- package/src/blocks/claim-row/index.ts +7 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +117 -0
- package/src/blocks/color-swatch-picker/index.ts +5 -0
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +136 -0
- package/src/blocks/copy-variant-picker/index.ts +5 -0
- package/src/blocks/credit-wallet/credit-wallet.tsx +111 -0
- package/src/blocks/credit-wallet/index.ts +1 -0
- package/src/blocks/generation-progress/generation-progress.tsx +180 -0
- package/src/blocks/generation-progress/index.ts +6 -0
- package/src/blocks/image-grid/image-grid.tsx +275 -0
- package/src/blocks/image-grid/index.ts +1 -0
- package/src/blocks/index.tsx +22 -0
- package/src/blocks/internal/card.tsx +86 -0
- package/src/blocks/internal/format.ts +19 -0
- package/src/blocks/invoice-row/index.ts +5 -0
- package/src/blocks/invoice-row/invoice-row.tsx +115 -0
- package/src/blocks/logo-candidate-grid/index.ts +5 -0
- package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +127 -0
- package/src/blocks/oauth-buttons/index.ts +5 -0
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +101 -0
- package/src/blocks/option-editor/index.ts +5 -0
- package/src/blocks/option-editor/option-editor.tsx +149 -0
- package/src/blocks/order-card/index.ts +11 -0
- package/src/blocks/order-card/order-card.tsx +176 -0
- package/src/blocks/plan-card/index.ts +1 -0
- package/src/blocks/plan-card/plan-card.tsx +149 -0
- package/src/blocks/product-list-empty/index.ts +5 -0
- package/src/blocks/product-list-empty/product-list-empty.tsx +139 -0
- package/src/blocks/review-row/index.ts +8 -0
- package/src/blocks/review-row/review-row.tsx +246 -0
- package/src/blocks/sales-chart/index.ts +5 -0
- package/src/blocks/sales-chart/sales-chart.tsx +115 -0
- package/src/blocks/selection-bar/index.ts +1 -0
- package/src/blocks/selection-bar/selection-bar.tsx +63 -0
- package/src/blocks/service-state-banner/index.ts +5 -0
- package/src/blocks/service-state-banner/service-state-banner.tsx +77 -0
- package/src/blocks/shipping-tracking-row/index.ts +5 -0
- package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +92 -0
- package/src/blocks/site-preview-frame/index.ts +5 -0
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +136 -0
- package/src/blocks/stat-card/index.ts +1 -0
- package/src/blocks/stat-card/stat-card.tsx +72 -0
- package/src/blocks/step-screen/index.ts +5 -0
- package/src/blocks/step-screen/step-screen.tsx +131 -0
- package/src/blocks/supply-item-card/index.ts +6 -0
- package/src/blocks/supply-item-card/supply-item-card.tsx +139 -0
- package/src/charts/index.ts +2 -0
- package/src/charts/line-chart.tsx +182 -0
- package/src/charts/scale.ts +46 -0
- package/src/charts/sparkline.tsx +60 -0
- package/src/charts/summary.ts +10 -0
- package/src/charts.tsx +2 -0
- package/src/components/button/button.tsx +116 -0
- package/src/components/button/index.ts +6 -0
- package/src/components/checkbox/checkbox.tsx +79 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/chip.tsx +90 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/chip-group/chip-group.tsx +86 -0
- package/src/components/chip-group/index.ts +5 -0
- package/src/components/dialog/dialog.tsx +124 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/divider/divider.tsx +24 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/empty-state/empty-state.tsx +141 -0
- package/src/components/empty-state/index.ts +5 -0
- package/src/components/field/field.tsx +201 -0
- package/src/components/field/index.ts +1 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/list-row/list-row.tsx +112 -0
- package/src/components/photo/index.ts +1 -0
- package/src/components/photo/photo.tsx +82 -0
- package/src/components/price/index.ts +1 -0
- package/src/components/price/price.tsx +81 -0
- package/src/components/progress-bar/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.tsx +80 -0
- package/src/components/search-field/index.ts +1 -0
- package/src/components/search-field/search-field.tsx +45 -0
- package/src/components/segmented-tabs/index.ts +5 -0
- package/src/components/segmented-tabs/segmented-tabs.tsx +80 -0
- package/src/components/sheet/index.ts +1 -0
- package/src/components/sheet/sheet.tsx +118 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.tsx +69 -0
- package/src/components/status-badge/index.ts +5 -0
- package/src/components/status-badge/status-badge.tsx +53 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.tsx +28 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.tsx +51 -0
- package/src/components/toast/index.ts +9 -0
- package/src/components/toast/toast.tsx +237 -0
- package/src/components/wizard-steps/index.ts +1 -0
- package/src/components/wizard-steps/wizard-steps.tsx +51 -0
- package/src/index.tsx +57 -0
- package/src/internal/glyphs.tsx +155 -0
- package/src/internal/icon.tsx +9 -0
- package/src/internal/overlay.tsx +55 -0
- package/src/internal/pressable-base.tsx +52 -0
- package/src/internal/use-reduced-motion.ts +30 -0
- package/src/sortable/index.ts +8 -0
- package/src/sortable/move.ts +18 -0
- package/src/sortable/sortable-grid.tsx +85 -0
- package/src/sortable/sortable-list.tsx +10 -0
- package/src/sortable.tsx +3 -0
- package/src/theme/create-theme.ts +62 -0
- package/src/theme/theme-provider.tsx +34 -0
- package/src/theme/tokens.ts +90 -0
- package/src/types/index.ts +73 -0
- package/src/utils/color.ts +44 -0
- package/src/utils/styles.ts +25 -0
- package/README.md +0 -3
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
type ImageSourcePropType,
|
|
5
|
+
type StyleProp,
|
|
6
|
+
type ViewStyle,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import { Button } from '../../components/button/button';
|
|
9
|
+
import { Photo } from '../../components/photo/photo';
|
|
10
|
+
import { Text } from '../../components/text/text';
|
|
11
|
+
import { makeStyles } from '../../utils/styles';
|
|
12
|
+
|
|
13
|
+
export type SitePublishStatus = 'draft' | 'published' | 'unpublishedChanges';
|
|
14
|
+
|
|
15
|
+
export type SitePreviewFrameProps = {
|
|
16
|
+
screenshot?: ImageSourcePropType;
|
|
17
|
+
renderPreview?: () => ReactNode;
|
|
18
|
+
status: SitePublishStatus;
|
|
19
|
+
onPublish?: () => void;
|
|
20
|
+
publishing?: boolean;
|
|
21
|
+
publishDisabled?: boolean;
|
|
22
|
+
blockedReason?: string;
|
|
23
|
+
onRevert?: () => void;
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const useStyles = makeStyles((t) => ({
|
|
28
|
+
root: { gap: t.space[3] },
|
|
29
|
+
device: {
|
|
30
|
+
alignSelf: 'center',
|
|
31
|
+
width: '72%',
|
|
32
|
+
maxWidth: 300,
|
|
33
|
+
aspectRatio: 9 / 19.5,
|
|
34
|
+
padding: t.space[2],
|
|
35
|
+
borderRadius: 36,
|
|
36
|
+
backgroundColor: t.colors.foreground,
|
|
37
|
+
boxShadow: t.shadow.md,
|
|
38
|
+
},
|
|
39
|
+
screen: {
|
|
40
|
+
flex: 1,
|
|
41
|
+
overflow: 'hidden',
|
|
42
|
+
borderRadius: 28,
|
|
43
|
+
backgroundColor: t.colors.background,
|
|
44
|
+
},
|
|
45
|
+
bar: {
|
|
46
|
+
flexDirection: 'row',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
gap: 10,
|
|
49
|
+
minHeight: 60,
|
|
50
|
+
paddingLeft: t.space[4],
|
|
51
|
+
paddingRight: t.space[2],
|
|
52
|
+
borderRadius: t.radius.lg,
|
|
53
|
+
backgroundColor: t.colors.muted,
|
|
54
|
+
},
|
|
55
|
+
dot: {
|
|
56
|
+
width: 8,
|
|
57
|
+
height: 8,
|
|
58
|
+
borderRadius: 4,
|
|
59
|
+
backgroundColor: t.colors.warning,
|
|
60
|
+
},
|
|
61
|
+
barLabel: { flex: 1 },
|
|
62
|
+
barButton: { paddingHorizontal: t.space[4] },
|
|
63
|
+
actions: { gap: t.space[2] },
|
|
64
|
+
reason: { textAlign: 'center' },
|
|
65
|
+
}));
|
|
66
|
+
|
|
67
|
+
export function SitePreviewFrame({
|
|
68
|
+
screenshot,
|
|
69
|
+
renderPreview,
|
|
70
|
+
status,
|
|
71
|
+
onPublish,
|
|
72
|
+
publishing,
|
|
73
|
+
publishDisabled,
|
|
74
|
+
blockedReason,
|
|
75
|
+
onRevert,
|
|
76
|
+
style,
|
|
77
|
+
}: SitePreviewFrameProps) {
|
|
78
|
+
const s = useStyles();
|
|
79
|
+
return (
|
|
80
|
+
<View style={[s.root, style]}>
|
|
81
|
+
<View style={s.device} accessibilityLabel="사이트 미리보기">
|
|
82
|
+
<View style={s.screen}>
|
|
83
|
+
{renderPreview ? (
|
|
84
|
+
renderPreview()
|
|
85
|
+
) : screenshot ? (
|
|
86
|
+
<Photo source={screenshot} aspectRatio={9 / 19.5} radius={0} />
|
|
87
|
+
) : null}
|
|
88
|
+
</View>
|
|
89
|
+
</View>
|
|
90
|
+
{status === 'unpublishedChanges' ? (
|
|
91
|
+
<View accessibilityLiveRegion="polite" style={s.bar}>
|
|
92
|
+
<View style={s.dot} />
|
|
93
|
+
<Text weight="semibold" style={s.barLabel}>
|
|
94
|
+
게시 안 된 변경사항
|
|
95
|
+
</Text>
|
|
96
|
+
{onPublish ? (
|
|
97
|
+
<Button
|
|
98
|
+
size="sm"
|
|
99
|
+
onPress={onPublish}
|
|
100
|
+
loading={publishing}
|
|
101
|
+
disabled={publishDisabled}
|
|
102
|
+
style={s.barButton}
|
|
103
|
+
>
|
|
104
|
+
게시
|
|
105
|
+
</Button>
|
|
106
|
+
) : null}
|
|
107
|
+
</View>
|
|
108
|
+
) : null}
|
|
109
|
+
<View style={s.actions}>
|
|
110
|
+
{onPublish && status === 'draft' ? (
|
|
111
|
+
<Button
|
|
112
|
+
size="lg"
|
|
113
|
+
onPress={onPublish}
|
|
114
|
+
loading={publishing}
|
|
115
|
+
disabled={publishDisabled}
|
|
116
|
+
>
|
|
117
|
+
사이트 게시하기
|
|
118
|
+
</Button>
|
|
119
|
+
) : null}
|
|
120
|
+
{publishDisabled &&
|
|
121
|
+
blockedReason &&
|
|
122
|
+
onPublish &&
|
|
123
|
+
status !== 'published' ? (
|
|
124
|
+
<Text tone="muted" accessibilityLiveRegion="polite" style={s.reason}>
|
|
125
|
+
{blockedReason}
|
|
126
|
+
</Text>
|
|
127
|
+
) : null}
|
|
128
|
+
{onRevert && status !== 'draft' ? (
|
|
129
|
+
<Button variant="ghost" onPress={onRevert}>
|
|
130
|
+
직전 게시본으로 되돌리기
|
|
131
|
+
</Button>
|
|
132
|
+
) : null}
|
|
133
|
+
</View>
|
|
134
|
+
</View>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StatCard, type StatCardProps } from './stat-card';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { Text } from '../../components/text/text';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
import { Card } from '../internal/card';
|
|
6
|
+
|
|
7
|
+
export type StatCardProps = {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
change?: number | null;
|
|
11
|
+
chart?: ReactNode;
|
|
12
|
+
onPress?: () => void;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const useStyles = makeStyles((t) => ({
|
|
17
|
+
row: { flexDirection: 'row', alignItems: 'flex-end', gap: t.space[3] },
|
|
18
|
+
body: { flex: 1, gap: t.space[1] },
|
|
19
|
+
value: {
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
flexWrap: 'wrap',
|
|
22
|
+
alignItems: 'baseline',
|
|
23
|
+
columnGap: t.space[2],
|
|
24
|
+
},
|
|
25
|
+
down: { color: t.colors.info },
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
export function StatCard({
|
|
29
|
+
label,
|
|
30
|
+
value,
|
|
31
|
+
change,
|
|
32
|
+
chart,
|
|
33
|
+
onPress,
|
|
34
|
+
style,
|
|
35
|
+
}: StatCardProps) {
|
|
36
|
+
const s = useStyles();
|
|
37
|
+
const hasChange =
|
|
38
|
+
change !== undefined && change !== null && Number.isFinite(change);
|
|
39
|
+
const flat = hasChange && Math.abs(change) < 0.05;
|
|
40
|
+
const up = hasChange && change > 0;
|
|
41
|
+
const rate = hasChange ? `${Math.abs(change).toFixed(1)}%` : '';
|
|
42
|
+
return (
|
|
43
|
+
<Card
|
|
44
|
+
onPress={onPress}
|
|
45
|
+
accessibilityLabel={`${label} ${value}${
|
|
46
|
+
hasChange && !flat ? ` ${rate} ${up ? '증가' : '감소'}` : ''
|
|
47
|
+
}`}
|
|
48
|
+
style={style}
|
|
49
|
+
>
|
|
50
|
+
<View style={s.row}>
|
|
51
|
+
<View style={s.body}>
|
|
52
|
+
<Text tone="muted">{label}</Text>
|
|
53
|
+
<View style={s.value}>
|
|
54
|
+
<Text variant="title" weight="bold">
|
|
55
|
+
{value}
|
|
56
|
+
</Text>
|
|
57
|
+
{hasChange ? (
|
|
58
|
+
<Text
|
|
59
|
+
weight="bold"
|
|
60
|
+
tone={flat ? 'muted' : up ? 'destructive' : 'default'}
|
|
61
|
+
style={!flat && !up && s.down}
|
|
62
|
+
>
|
|
63
|
+
{flat ? '변동 없음' : `${up ? '▲' : '▼'} ${rate}`}
|
|
64
|
+
</Text>
|
|
65
|
+
) : null}
|
|
66
|
+
</View>
|
|
67
|
+
</View>
|
|
68
|
+
{chart}
|
|
69
|
+
</View>
|
|
70
|
+
</Card>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { KeyboardAvoidingView, ScrollView, View } from 'react-native';
|
|
3
|
+
import { Button } from '../../components/button/button';
|
|
4
|
+
import { Text } from '../../components/text/text';
|
|
5
|
+
import { ChevronGlyph } from '../../internal/glyphs';
|
|
6
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
7
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
8
|
+
import { makeStyles } from '../../utils/styles';
|
|
9
|
+
|
|
10
|
+
export type StepAction = {
|
|
11
|
+
label: string;
|
|
12
|
+
onPress: () => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type StepScreenProps = {
|
|
18
|
+
title: string;
|
|
19
|
+
total?: number;
|
|
20
|
+
current?: number;
|
|
21
|
+
onBack?: () => void;
|
|
22
|
+
backLabel?: string;
|
|
23
|
+
primaryAction: StepAction;
|
|
24
|
+
secondaryAction?: StepAction;
|
|
25
|
+
bottomInset?: number;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const useStyles = makeStyles((t) => ({
|
|
30
|
+
root: { flex: 1, backgroundColor: t.colors.background },
|
|
31
|
+
header: {
|
|
32
|
+
height: 52,
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
paddingHorizontal: t.space[1],
|
|
36
|
+
},
|
|
37
|
+
back: {
|
|
38
|
+
width: 44,
|
|
39
|
+
height: 44,
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
},
|
|
43
|
+
backIcon: { transform: [{ scaleX: -1 }] },
|
|
44
|
+
track: { height: 3, backgroundColor: t.colors.muted },
|
|
45
|
+
fill: { height: 3, backgroundColor: t.colors.primary },
|
|
46
|
+
body: {
|
|
47
|
+
gap: t.space[5],
|
|
48
|
+
paddingTop: t.space[6],
|
|
49
|
+
paddingHorizontal: t.space[5],
|
|
50
|
+
paddingBottom: t.space[4],
|
|
51
|
+
},
|
|
52
|
+
title: { fontSize: 24, lineHeight: 32 },
|
|
53
|
+
footer: {
|
|
54
|
+
gap: t.space[2],
|
|
55
|
+
paddingHorizontal: t.space[5],
|
|
56
|
+
paddingTop: t.space[3],
|
|
57
|
+
backgroundColor: t.colors.background,
|
|
58
|
+
},
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
export function StepScreen({
|
|
62
|
+
title,
|
|
63
|
+
total,
|
|
64
|
+
current = 0,
|
|
65
|
+
onBack,
|
|
66
|
+
backLabel = '이전',
|
|
67
|
+
primaryAction,
|
|
68
|
+
secondaryAction,
|
|
69
|
+
bottomInset = 0,
|
|
70
|
+
children,
|
|
71
|
+
}: StepScreenProps) {
|
|
72
|
+
const t = useTheme();
|
|
73
|
+
const s = useStyles();
|
|
74
|
+
const step = total ? Math.min(total, Math.max(1, current + 1)) : 0;
|
|
75
|
+
return (
|
|
76
|
+
<KeyboardAvoidingView behavior="padding" style={s.root}>
|
|
77
|
+
{onBack ? (
|
|
78
|
+
<View style={s.header}>
|
|
79
|
+
<PressableBase
|
|
80
|
+
onPress={onBack}
|
|
81
|
+
accessibilityLabel={backLabel}
|
|
82
|
+
style={s.back}
|
|
83
|
+
>
|
|
84
|
+
<View style={s.backIcon}>
|
|
85
|
+
<ChevronGlyph color={t.colors.foreground} size={24} />
|
|
86
|
+
</View>
|
|
87
|
+
</PressableBase>
|
|
88
|
+
</View>
|
|
89
|
+
) : null}
|
|
90
|
+
{total ? (
|
|
91
|
+
<View
|
|
92
|
+
accessibilityRole="progressbar"
|
|
93
|
+
accessibilityLabel={`${total}단계 중 ${step}단계`}
|
|
94
|
+
accessibilityValue={{ min: 1, max: total, now: step }}
|
|
95
|
+
style={s.track}
|
|
96
|
+
>
|
|
97
|
+
<View style={[s.fill, { width: `${(step / total) * 100}%` }]} />
|
|
98
|
+
</View>
|
|
99
|
+
) : null}
|
|
100
|
+
<ScrollView
|
|
101
|
+
contentContainerStyle={s.body}
|
|
102
|
+
keyboardShouldPersistTaps="handled"
|
|
103
|
+
>
|
|
104
|
+
<Text weight="bold" accessibilityRole="header" style={s.title}>
|
|
105
|
+
{title}
|
|
106
|
+
</Text>
|
|
107
|
+
{children}
|
|
108
|
+
</ScrollView>
|
|
109
|
+
<View style={[s.footer, { paddingBottom: t.space[4] + bottomInset }]}>
|
|
110
|
+
<Button
|
|
111
|
+
size="lg"
|
|
112
|
+
onPress={primaryAction.onPress}
|
|
113
|
+
disabled={primaryAction.disabled}
|
|
114
|
+
loading={primaryAction.loading}
|
|
115
|
+
>
|
|
116
|
+
{primaryAction.label}
|
|
117
|
+
</Button>
|
|
118
|
+
{secondaryAction ? (
|
|
119
|
+
<Button
|
|
120
|
+
variant="ghost"
|
|
121
|
+
onPress={secondaryAction.onPress}
|
|
122
|
+
disabled={secondaryAction.disabled}
|
|
123
|
+
loading={secondaryAction.loading}
|
|
124
|
+
>
|
|
125
|
+
{secondaryAction.label}
|
|
126
|
+
</Button>
|
|
127
|
+
) : null}
|
|
128
|
+
</View>
|
|
129
|
+
</KeyboardAvoidingView>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import {
|
|
2
|
+
View,
|
|
3
|
+
type ImageSourcePropType,
|
|
4
|
+
type StyleProp,
|
|
5
|
+
type ViewStyle,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
import { Button } from '../../components/button/button';
|
|
8
|
+
import { ChipGroup } from '../../components/chip-group/chip-group';
|
|
9
|
+
import { Photo } from '../../components/photo/photo';
|
|
10
|
+
import { formatPrice } from '../../components/price/price';
|
|
11
|
+
import { Text } from '../../components/text/text';
|
|
12
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
13
|
+
import { makeStyles } from '../../utils/styles';
|
|
14
|
+
import { Card } from '../internal/card';
|
|
15
|
+
|
|
16
|
+
export type SupplyOption = { id: string; label: string };
|
|
17
|
+
|
|
18
|
+
export type SupplyQuantity = { quantity: number; price: number };
|
|
19
|
+
|
|
20
|
+
export type SupplyItemCardProps = {
|
|
21
|
+
name: string;
|
|
22
|
+
image: ImageSourcePropType;
|
|
23
|
+
options?: readonly SupplyOption[];
|
|
24
|
+
selectedOptionId?: string | null;
|
|
25
|
+
onSelectOption?: (id: string) => void;
|
|
26
|
+
quantities: readonly SupplyQuantity[];
|
|
27
|
+
selectedQuantity: number | null;
|
|
28
|
+
onSelectQuantity: (quantity: number) => void;
|
|
29
|
+
unit?: string;
|
|
30
|
+
onAdd?: () => void;
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const useStyles = makeStyles((t) => ({
|
|
35
|
+
card: { gap: t.space[4] },
|
|
36
|
+
head: { flexDirection: 'row', alignItems: 'center', gap: t.space[3] },
|
|
37
|
+
image: { width: 64 },
|
|
38
|
+
name: { flex: 1 },
|
|
39
|
+
group: {
|
|
40
|
+
borderWidth: 1,
|
|
41
|
+
borderColor: t.colors.border,
|
|
42
|
+
borderRadius: 10,
|
|
43
|
+
overflow: 'hidden',
|
|
44
|
+
},
|
|
45
|
+
row: {
|
|
46
|
+
flexDirection: 'row',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
gap: t.space[3],
|
|
49
|
+
minHeight: 52,
|
|
50
|
+
paddingHorizontal: 14,
|
|
51
|
+
},
|
|
52
|
+
divided: { borderTopWidth: 1, borderTopColor: t.colors.border },
|
|
53
|
+
pressed: { backgroundColor: t.colors.muted },
|
|
54
|
+
radio: {
|
|
55
|
+
width: 20,
|
|
56
|
+
height: 20,
|
|
57
|
+
borderRadius: 10,
|
|
58
|
+
borderWidth: 2,
|
|
59
|
+
borderColor: t.colors.input,
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
justifyContent: 'center',
|
|
62
|
+
},
|
|
63
|
+
radioOn: { borderColor: t.colors.primary },
|
|
64
|
+
radioDot: {
|
|
65
|
+
width: 10,
|
|
66
|
+
height: 10,
|
|
67
|
+
borderRadius: 5,
|
|
68
|
+
backgroundColor: t.colors.primary,
|
|
69
|
+
},
|
|
70
|
+
quantity: { flex: 1 },
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
export function SupplyItemCard({
|
|
74
|
+
name,
|
|
75
|
+
image,
|
|
76
|
+
options = [],
|
|
77
|
+
selectedOptionId = null,
|
|
78
|
+
onSelectOption,
|
|
79
|
+
quantities,
|
|
80
|
+
selectedQuantity,
|
|
81
|
+
onSelectQuantity,
|
|
82
|
+
unit = '장',
|
|
83
|
+
onAdd,
|
|
84
|
+
style,
|
|
85
|
+
}: SupplyItemCardProps) {
|
|
86
|
+
const s = useStyles();
|
|
87
|
+
const selected = quantities.find((q) => q.quantity === selectedQuantity);
|
|
88
|
+
return (
|
|
89
|
+
<Card style={[s.card, style]}>
|
|
90
|
+
<View style={s.head}>
|
|
91
|
+
<View style={s.image}>
|
|
92
|
+
<Photo source={image} />
|
|
93
|
+
</View>
|
|
94
|
+
<Text variant="bodyLg" weight="bold" style={s.name}>
|
|
95
|
+
{name}
|
|
96
|
+
</Text>
|
|
97
|
+
</View>
|
|
98
|
+
{options.length > 1 ? (
|
|
99
|
+
<ChipGroup
|
|
100
|
+
items={options.map((o) => ({ value: o.id, label: o.label }))}
|
|
101
|
+
value={selectedOptionId}
|
|
102
|
+
onValueChange={(id) => id && onSelectOption?.(id)}
|
|
103
|
+
/>
|
|
104
|
+
) : null}
|
|
105
|
+
<View accessibilityRole="radiogroup" style={s.group}>
|
|
106
|
+
{quantities.map((q, i) => {
|
|
107
|
+
const on = q.quantity === selectedQuantity;
|
|
108
|
+
const qty = `${formatPrice(q.quantity, '')}${unit}`;
|
|
109
|
+
return (
|
|
110
|
+
<PressableBase
|
|
111
|
+
key={q.quantity}
|
|
112
|
+
accessibilityRole="radio"
|
|
113
|
+
accessibilityState={{ selected: on }}
|
|
114
|
+
accessibilityLabel={`${qty} ${formatPrice(q.price)}`}
|
|
115
|
+
pressedStyle={s.pressed}
|
|
116
|
+
onPress={() => onSelectQuantity(q.quantity)}
|
|
117
|
+
style={[s.row, i > 0 && s.divided]}
|
|
118
|
+
>
|
|
119
|
+
<View style={[s.radio, on && s.radioOn]}>
|
|
120
|
+
{on ? <View style={s.radioDot} /> : null}
|
|
121
|
+
</View>
|
|
122
|
+
<Text weight={on ? 'semibold' : undefined} style={s.quantity}>
|
|
123
|
+
{qty}
|
|
124
|
+
</Text>
|
|
125
|
+
<Text weight={on ? 'semibold' : undefined}>
|
|
126
|
+
{formatPrice(q.price)}
|
|
127
|
+
</Text>
|
|
128
|
+
</PressableBase>
|
|
129
|
+
);
|
|
130
|
+
})}
|
|
131
|
+
</View>
|
|
132
|
+
{onAdd ? (
|
|
133
|
+
<Button size="lg" disabled={!selected} onPress={onAdd}>
|
|
134
|
+
{selected ? `${formatPrice(selected.price)} 담기` : '담기'}
|
|
135
|
+
</Button>
|
|
136
|
+
) : null}
|
|
137
|
+
</Card>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import Svg, {
|
|
4
|
+
Circle,
|
|
5
|
+
Line,
|
|
6
|
+
Path,
|
|
7
|
+
Rect,
|
|
8
|
+
Text as SvgText,
|
|
9
|
+
} from 'react-native-svg';
|
|
10
|
+
import { formatPrice } from '../components/price/price';
|
|
11
|
+
import { useTheme } from '../theme/theme-provider';
|
|
12
|
+
import { areaPath, labelStep, linearScale, linePath, niceTicks } from './scale';
|
|
13
|
+
import { summarize } from './summary';
|
|
14
|
+
|
|
15
|
+
export type ChartDatum = { label: string; value: number };
|
|
16
|
+
|
|
17
|
+
export type LineChartProps = {
|
|
18
|
+
data: readonly ChartDatum[];
|
|
19
|
+
height?: number;
|
|
20
|
+
formatY?: (value: number) => string;
|
|
21
|
+
formatX?: (label: string, index: number) => string;
|
|
22
|
+
onPointPress?: (datum: ChartDatum, index: number) => void;
|
|
23
|
+
accessibilityLabel?: string;
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const defaultFormat = (v: number) => formatPrice(v, '');
|
|
28
|
+
const PAD = { top: 8, right: 12, bottom: 24, gap: 8 };
|
|
29
|
+
const FONT_SIZE = 11;
|
|
30
|
+
const WIDE = /[\u1100-\u11ff\u3000-\u9fff\uac00-\ud7af\uff00-\uffef]/;
|
|
31
|
+
const NARROW = /[,.:'\s]/;
|
|
32
|
+
|
|
33
|
+
export function estimateLabelWidth(label: string, fontSize = FONT_SIZE) {
|
|
34
|
+
let em = 0;
|
|
35
|
+
for (const ch of label) {
|
|
36
|
+
em += WIDE.test(ch) ? 1 : NARROW.test(ch) ? 0.34 : 0.64;
|
|
37
|
+
}
|
|
38
|
+
return Math.ceil(em * fontSize) + 2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function LineChart({
|
|
42
|
+
data,
|
|
43
|
+
height = 200,
|
|
44
|
+
formatY = defaultFormat,
|
|
45
|
+
formatX = (label) => label,
|
|
46
|
+
onPointPress,
|
|
47
|
+
accessibilityLabel,
|
|
48
|
+
style,
|
|
49
|
+
}: LineChartProps) {
|
|
50
|
+
const t = useTheme();
|
|
51
|
+
const [width, setWidth] = useState(0);
|
|
52
|
+
const values = data.map((d) => d.value);
|
|
53
|
+
const ticks = niceTicks(Math.min(0, ...values), Math.max(0, ...values));
|
|
54
|
+
const yLabels = ticks.map(formatY);
|
|
55
|
+
const left =
|
|
56
|
+
Math.max(0, ...yLabels.map((l) => estimateLabelWidth(l))) + PAD.gap;
|
|
57
|
+
const plot = {
|
|
58
|
+
x0: left,
|
|
59
|
+
x1: width - PAD.right,
|
|
60
|
+
y0: PAD.top,
|
|
61
|
+
y1: height - PAD.bottom,
|
|
62
|
+
};
|
|
63
|
+
const y = linearScale(
|
|
64
|
+
[ticks[0]!, ticks[ticks.length - 1]!],
|
|
65
|
+
[plot.y1, plot.y0]
|
|
66
|
+
);
|
|
67
|
+
const x = linearScale([0, Math.max(1, data.length - 1)], [plot.x0, plot.x1]);
|
|
68
|
+
const points = data.map((d, i) => ({
|
|
69
|
+
x: data.length === 1 ? (plot.x0 + plot.x1) / 2 : x(i),
|
|
70
|
+
y: y(d.value),
|
|
71
|
+
}));
|
|
72
|
+
const step = labelStep(
|
|
73
|
+
data.length,
|
|
74
|
+
Math.max(1, Math.floor((plot.x1 - plot.x0) / 56))
|
|
75
|
+
);
|
|
76
|
+
const last = points[points.length - 1];
|
|
77
|
+
const slot =
|
|
78
|
+
data.length > 1
|
|
79
|
+
? (plot.x1 - plot.x0) / (data.length - 1)
|
|
80
|
+
: plot.x1 - plot.x0;
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<View
|
|
84
|
+
accessible
|
|
85
|
+
accessibilityRole="image"
|
|
86
|
+
accessibilityLabel={accessibilityLabel ?? summarize(values, formatY)}
|
|
87
|
+
onLayout={(e) => setWidth(e.nativeEvent.layout.width)}
|
|
88
|
+
style={[{ height }, style]}
|
|
89
|
+
>
|
|
90
|
+
{width > 0 ? (
|
|
91
|
+
<Svg width={width} height={height}>
|
|
92
|
+
{ticks.map((tick, i) => (
|
|
93
|
+
<Line
|
|
94
|
+
key={`g${tick}`}
|
|
95
|
+
x1={plot.x0}
|
|
96
|
+
x2={plot.x1}
|
|
97
|
+
y1={y(tick)}
|
|
98
|
+
y2={y(tick)}
|
|
99
|
+
stroke={t.colors.border}
|
|
100
|
+
strokeWidth={1}
|
|
101
|
+
strokeDasharray={i === 0 ? undefined : '3 4'}
|
|
102
|
+
/>
|
|
103
|
+
))}
|
|
104
|
+
{ticks.map((tick, i) => (
|
|
105
|
+
<SvgText
|
|
106
|
+
key={`y${tick}`}
|
|
107
|
+
x={plot.x0 - PAD.gap}
|
|
108
|
+
y={y(tick) + FONT_SIZE / 3}
|
|
109
|
+
fontSize={FONT_SIZE}
|
|
110
|
+
fontFamily={t.fontFamily}
|
|
111
|
+
fill={t.colors.mutedForeground}
|
|
112
|
+
textAnchor="end"
|
|
113
|
+
>
|
|
114
|
+
{yLabels[i]}
|
|
115
|
+
</SvgText>
|
|
116
|
+
))}
|
|
117
|
+
{data.map((d, i) =>
|
|
118
|
+
i % step === 0 || i === data.length - 1 ? (
|
|
119
|
+
<SvgText
|
|
120
|
+
key={`x${i}`}
|
|
121
|
+
x={points[i]!.x}
|
|
122
|
+
y={height - 6}
|
|
123
|
+
fontSize={FONT_SIZE}
|
|
124
|
+
fontFamily={t.fontFamily}
|
|
125
|
+
fill={t.colors.mutedForeground}
|
|
126
|
+
textAnchor={
|
|
127
|
+
i === 0 && data.length > 1
|
|
128
|
+
? 'start'
|
|
129
|
+
: i === data.length - 1 && data.length > 1
|
|
130
|
+
? 'end'
|
|
131
|
+
: 'middle'
|
|
132
|
+
}
|
|
133
|
+
>
|
|
134
|
+
{formatX(d.label, i)}
|
|
135
|
+
</SvgText>
|
|
136
|
+
) : null
|
|
137
|
+
)}
|
|
138
|
+
{points.length > 1 ? (
|
|
139
|
+
<>
|
|
140
|
+
<Path
|
|
141
|
+
d={areaPath(points, plot.y1)}
|
|
142
|
+
fill={t.colors.primary}
|
|
143
|
+
fillOpacity={0.12}
|
|
144
|
+
/>
|
|
145
|
+
<Path
|
|
146
|
+
d={linePath(points)}
|
|
147
|
+
fill="none"
|
|
148
|
+
stroke={t.colors.primary}
|
|
149
|
+
strokeWidth={2}
|
|
150
|
+
strokeLinejoin="round"
|
|
151
|
+
strokeLinecap="round"
|
|
152
|
+
/>
|
|
153
|
+
</>
|
|
154
|
+
) : null}
|
|
155
|
+
{last ? (
|
|
156
|
+
<Circle
|
|
157
|
+
cx={last.x}
|
|
158
|
+
cy={last.y}
|
|
159
|
+
r={4}
|
|
160
|
+
fill={t.colors.primary}
|
|
161
|
+
stroke={t.colors.background}
|
|
162
|
+
strokeWidth={2}
|
|
163
|
+
/>
|
|
164
|
+
) : null}
|
|
165
|
+
{onPointPress
|
|
166
|
+
? data.map((d, i) => (
|
|
167
|
+
<Rect
|
|
168
|
+
key={`hit${i}`}
|
|
169
|
+
x={points[i]!.x - slot / 2}
|
|
170
|
+
y={plot.y0}
|
|
171
|
+
width={slot}
|
|
172
|
+
height={plot.y1 - plot.y0}
|
|
173
|
+
fill="transparent"
|
|
174
|
+
onPress={() => onPointPress(d, i)}
|
|
175
|
+
/>
|
|
176
|
+
))
|
|
177
|
+
: null}
|
|
178
|
+
</Svg>
|
|
179
|
+
) : null}
|
|
180
|
+
</View>
|
|
181
|
+
);
|
|
182
|
+
}
|