@ezpg/app-ui 0.1.0 → 0.3.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 +25 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js +0 -2
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -1
- 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 +34 -35
- package/lib/module/blocks/claim-row/claim-row.js.map +1 -1
- package/lib/module/blocks/claim-row/index.js +1 -1
- package/lib/module/blocks/claim-row/index.js.map +1 -1
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +0 -2
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -1
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +1 -3
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -1
- package/lib/module/blocks/credit-wallet/credit-wallet.js +3 -5
- package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -1
- 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 +20 -16
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -1
- package/lib/module/blocks/index.js +3 -0
- package/lib/module/blocks/index.js.map +1 -1
- package/lib/module/blocks/internal/card.js +49 -10
- package/lib/module/blocks/internal/card.js.map +1 -1
- package/lib/module/blocks/internal/format.js +0 -6
- package/lib/module/blocks/internal/format.js.map +1 -1
- package/lib/module/blocks/invoice-row/invoice-row.js +3 -5
- package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -1
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +0 -2
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -1
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +0 -3
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
- package/lib/module/blocks/option-editor/option-editor.js +22 -12
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -1
- package/lib/module/blocks/order-card/order-card.js +11 -16
- package/lib/module/blocks/order-card/order-card.js.map +1 -1
- package/lib/module/blocks/plan-card/plan-card.js +9 -5
- package/lib/module/blocks/plan-card/plan-card.js.map +1 -1
- package/lib/module/blocks/product-list-empty/product-list-empty.js +0 -2
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -1
- package/lib/module/blocks/review-row/review-row.js +0 -8
- package/lib/module/blocks/review-row/review-row.js.map +1 -1
- package/lib/module/blocks/sales-chart/sales-chart.js +1 -3
- package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -1
- 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/service-state-banner.js +12 -6
- package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -1
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +0 -2
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -1
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +12 -2
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -1
- package/lib/module/blocks/stat-card/stat-card.js +1 -3
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
- package/lib/module/blocks/step-screen/step-screen.js +0 -2
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
- package/lib/module/blocks/supply-item-card/supply-item-card.js +0 -6
- package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -1
- package/lib/module/charts/line-chart.js +10 -1
- package/lib/module/charts/line-chart.js.map +1 -1
- package/lib/module/charts/scale.js +0 -6
- package/lib/module/charts/scale.js.map +1 -1
- package/lib/module/charts/sparkline.js +0 -1
- package/lib/module/charts/sparkline.js.map +1 -1
- package/lib/module/charts/summary.js +0 -1
- package/lib/module/charts/summary.js.map +1 -1
- package/lib/module/components/button/button.js +3 -3
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/chip/chip.js +14 -0
- package/lib/module/components/chip/chip.js.map +1 -1
- package/lib/module/components/chip-group/chip-group.js +1 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -1
- package/lib/module/components/dialog/dialog.js +2 -4
- package/lib/module/components/dialog/dialog.js.map +1 -1
- package/lib/module/components/divider/divider.js +0 -1
- package/lib/module/components/divider/divider.js.map +1 -1
- package/lib/module/components/empty-state/empty-state.js +0 -10
- package/lib/module/components/empty-state/empty-state.js.map +1 -1
- package/lib/module/components/field/field.js +57 -8
- package/lib/module/components/field/field.js.map +1 -1
- package/lib/module/components/list-row/list-row.js.map +1 -1
- package/lib/module/components/photo/photo.js +0 -3
- package/lib/module/components/photo/photo.js.map +1 -1
- package/lib/module/components/price/price.js +1 -3
- package/lib/module/components/price/price.js.map +1 -1
- 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/search-field.js.map +1 -1
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
- package/lib/module/components/sheet/sheet.js.map +1 -1
- package/lib/module/components/skeleton/skeleton.js +0 -1
- package/lib/module/components/skeleton/skeleton.js.map +1 -1
- package/lib/module/components/status-badge/status-badge.js +1 -1
- package/lib/module/components/status-badge/status-badge.js.map +1 -1
- package/lib/module/components/switch/switch.js +4 -3
- package/lib/module/components/switch/switch.js.map +1 -1
- package/lib/module/components/text/text.js +2 -2
- package/lib/module/components/text/text.js.map +1 -1
- package/lib/module/components/toast/toast.js +1 -9
- package/lib/module/components/toast/toast.js.map +1 -1
- package/lib/module/components/wizard-steps/wizard-steps.js +0 -2
- package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/glyphs.js +0 -4
- package/lib/module/internal/glyphs.js.map +1 -1
- package/lib/module/internal/icon.js +0 -2
- package/lib/module/internal/icon.js.map +1 -1
- package/lib/module/internal/overlay.js +0 -5
- package/lib/module/internal/overlay.js.map +1 -1
- package/lib/module/internal/pressable-base.js +0 -1
- package/lib/module/internal/pressable-base.js.map +1 -1
- package/lib/module/internal/use-reduced-motion.js +0 -4
- package/lib/module/internal/use-reduced-motion.js.map +1 -1
- package/lib/module/sortable/move.js +0 -1
- package/lib/module/sortable/move.js.map +1 -1
- package/lib/module/sortable/sortable-grid.js +0 -6
- package/lib/module/sortable/sortable-grid.js.map +1 -1
- package/lib/module/sortable/sortable-list.js +0 -1
- package/lib/module/sortable/sortable-list.js.map +1 -1
- package/lib/module/theme/base.js +108 -0
- package/lib/module/theme/base.js.map +1 -0
- package/lib/module/theme/create-theme.js +0 -6
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/theme-provider.js +0 -2
- package/lib/module/theme/theme-provider.js.map +1 -1
- package/lib/module/theme/tokens.js +10 -115
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/module/utils/color.js +0 -5
- package/lib/module/utils/color.js.map +1 -1
- package/lib/module/utils/styles.js +0 -5
- package/lib/module/utils/styles.js.map +1 -1
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +0 -2
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -1
- 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 +5 -12
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/claim-row/index.d.ts +1 -1
- package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +0 -2
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +0 -4
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +1 -3
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -1
- 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 +0 -6
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/index.d.ts +3 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/internal/card.d.ts +3 -2
- package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/internal/format.d.ts +0 -3
- package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -1
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +0 -7
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +0 -2
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +0 -7
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +3 -5
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -1
- package/lib/typescript/src/blocks/order-card/order-card.d.ts +4 -12
- package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +2 -13
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +0 -5
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -1
- package/lib/typescript/src/blocks/review-row/review-row.d.ts +0 -9
- package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +0 -5
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -1
- 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/service-state-banner.d.ts +3 -4
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -1
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +0 -1
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +3 -5
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -1
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +0 -5
- 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 +0 -6
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +0 -6
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -1
- package/lib/typescript/src/charts/line-chart.d.ts +1 -5
- package/lib/typescript/src/charts/line-chart.d.ts.map +1 -1
- package/lib/typescript/src/charts/scale.d.ts +0 -3
- package/lib/typescript/src/charts/scale.d.ts.map +1 -1
- package/lib/typescript/src/charts/sparkline.d.ts +0 -4
- package/lib/typescript/src/charts/sparkline.d.ts.map +1 -1
- package/lib/typescript/src/charts/summary.d.ts +0 -1
- package/lib/typescript/src/charts/summary.d.ts.map +1 -1
- package/lib/typescript/src/components/button/button.d.ts +1 -4
- package/lib/typescript/src/components/button/button.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/chip.d.ts +2 -1
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -2
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/dialog.d.ts +2 -9
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
- package/lib/typescript/src/components/divider/divider.d.ts +0 -2
- package/lib/typescript/src/components/divider/divider.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/empty-state.d.ts +0 -10
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
- package/lib/typescript/src/components/field/field.d.ts +3 -3
- package/lib/typescript/src/components/field/field.d.ts.map +1 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts +0 -3
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
- package/lib/typescript/src/components/photo/photo.d.ts +0 -4
- package/lib/typescript/src/components/photo/photo.d.ts.map +1 -1
- package/lib/typescript/src/components/price/price.d.ts +0 -3
- package/lib/typescript/src/components/price/price.d.ts.map +1 -1
- 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/search-field.d.ts +0 -1
- package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -1
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +0 -1
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
- package/lib/typescript/src/components/sheet/sheet.d.ts +0 -3
- package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +0 -4
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/status-badge/status-badge.d.ts +1 -2
- package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/switch.d.ts.map +1 -1
- package/lib/typescript/src/components/text/text.d.ts +1 -4
- package/lib/typescript/src/components/text/text.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts +1 -9
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +0 -3
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/glyphs.d.ts +0 -1
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
- package/lib/typescript/src/internal/icon.d.ts +0 -1
- package/lib/typescript/src/internal/icon.d.ts.map +1 -1
- package/lib/typescript/src/internal/overlay.d.ts +0 -4
- package/lib/typescript/src/internal/overlay.d.ts.map +1 -1
- package/lib/typescript/src/internal/pressable-base.d.ts +0 -3
- package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -1
- package/lib/typescript/src/internal/use-reduced-motion.d.ts +0 -1
- package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -1
- package/lib/typescript/src/sortable/move.d.ts +0 -1
- package/lib/typescript/src/sortable/move.d.ts.map +1 -1
- package/lib/typescript/src/sortable/sortable-grid.d.ts +0 -12
- package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -1
- package/lib/typescript/src/sortable/sortable-list.d.ts +0 -1
- package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -1
- package/lib/typescript/src/theme/base.d.ts +106 -0
- package/lib/typescript/src/theme/base.d.ts.map +1 -0
- package/lib/typescript/src/theme/create-theme.d.ts +0 -4
- package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/theme-provider.d.ts +0 -3
- package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +2 -9
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/color.d.ts +0 -2
- package/lib/typescript/src/utils/color.d.ts.map +1 -1
- package/lib/typescript/src/utils/styles.d.ts +0 -5
- package/lib/typescript/src/utils/styles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blocks/brand-profile-card/brand-profile-card.tsx +0 -2
- 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 +67 -54
- package/src/blocks/claim-row/index.ts +1 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +0 -2
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +1 -5
- package/src/blocks/credit-wallet/credit-wallet.tsx +20 -14
- 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 +10 -14
- package/src/blocks/index.tsx +3 -0
- package/src/blocks/internal/card.tsx +47 -3
- package/src/blocks/internal/format.ts +0 -3
- package/src/blocks/invoice-row/invoice-row.tsx +3 -10
- package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +0 -2
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +0 -8
- package/src/blocks/option-editor/option-editor.tsx +24 -10
- package/src/blocks/order-card/order-card.tsx +21 -29
- package/src/blocks/plan-card/plan-card.tsx +18 -16
- package/src/blocks/product-list-empty/product-list-empty.tsx +0 -5
- package/src/blocks/review-row/review-row.tsx +0 -10
- package/src/blocks/sales-chart/sales-chart.tsx +1 -6
- 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/service-state-banner.tsx +17 -6
- package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +0 -1
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +20 -5
- package/src/blocks/stat-card/stat-card.tsx +1 -6
- package/src/blocks/step-screen/step-screen.tsx +0 -6
- package/src/blocks/supply-item-card/supply-item-card.tsx +0 -6
- package/src/charts/line-chart.tsx +11 -6
- package/src/charts/scale.ts +0 -3
- package/src/charts/sparkline.tsx +0 -4
- package/src/charts/summary.ts +0 -1
- package/src/components/button/button.tsx +3 -6
- package/src/components/chip/chip.tsx +17 -0
- package/src/components/chip-group/chip-group.tsx +2 -2
- package/src/components/dialog/dialog.tsx +3 -10
- package/src/components/divider/divider.tsx +0 -2
- package/src/components/empty-state/empty-state.tsx +0 -11
- package/src/components/field/field.tsx +59 -9
- package/src/components/list-row/list-row.tsx +0 -3
- package/src/components/photo/photo.tsx +0 -5
- package/src/components/price/price.tsx +1 -4
- package/src/components/progress-bar/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.tsx +80 -0
- package/src/components/search-field/search-field.tsx +0 -1
- package/src/components/segmented-tabs/segmented-tabs.tsx +0 -1
- package/src/components/sheet/sheet.tsx +0 -3
- package/src/components/skeleton/skeleton.tsx +0 -4
- package/src/components/status-badge/status-badge.tsx +2 -3
- package/src/components/switch/switch.tsx +5 -3
- package/src/components/text/text.tsx +2 -5
- package/src/components/toast/toast.tsx +2 -13
- package/src/components/wizard-steps/wizard-steps.tsx +0 -3
- package/src/index.tsx +1 -0
- package/src/internal/glyphs.tsx +0 -3
- package/src/internal/icon.tsx +0 -1
- package/src/internal/overlay.tsx +0 -4
- package/src/internal/pressable-base.tsx +0 -3
- package/src/internal/use-reduced-motion.ts +0 -2
- package/src/sortable/move.ts +0 -1
- package/src/sortable/sortable-grid.tsx +0 -12
- package/src/sortable/sortable-list.tsx +0 -1
- package/src/theme/base.ts +113 -0
- package/src/theme/create-theme.ts +0 -5
- package/src/theme/theme-provider.tsx +0 -3
- package/src/theme/tokens.ts +20 -83
- package/src/types/index.ts +2 -9
- package/src/utils/color.ts +0 -3
- package/src/utils/styles.ts +0 -5
|
@@ -21,16 +21,11 @@ export type GridImage = {
|
|
|
21
21
|
|
|
22
22
|
export type ImageGridProps = {
|
|
23
23
|
images: readonly GridImage[];
|
|
24
|
-
/** 순서가 바뀌면. 첫 장이 대표 사진 */
|
|
25
24
|
onImagesChange: (images: GridImage[]) => void;
|
|
26
|
-
/** 넘기면 첫 칸에 추가 버튼 */
|
|
27
25
|
onAdd?: () => void;
|
|
28
26
|
onRemove?: (id: string) => void;
|
|
29
|
-
/** 업로드 실패한 사진 다시 올리기 */
|
|
30
27
|
onRetry?: (id: string) => void;
|
|
31
|
-
/** 기본 10 */
|
|
32
28
|
max?: number;
|
|
33
|
-
/** 기본 4 */
|
|
34
29
|
columns?: number;
|
|
35
30
|
style?: StyleProp<ViewStyle>;
|
|
36
31
|
};
|
|
@@ -49,8 +44,9 @@ const useStyles = makeStyles((t) => ({
|
|
|
49
44
|
justifyContent: 'center',
|
|
50
45
|
borderRadius: RADIUS,
|
|
51
46
|
},
|
|
52
|
-
dim: { backgroundColor:
|
|
53
|
-
light: {
|
|
47
|
+
dim: { backgroundColor: `${t.colors.background}B3` },
|
|
48
|
+
light: { gap: 2, backgroundColor: `${t.colors.background}D9` },
|
|
49
|
+
failed: { fontSize: 12, lineHeight: 16, color: t.colors.danger },
|
|
54
50
|
cover: {
|
|
55
51
|
position: 'absolute',
|
|
56
52
|
left: 0,
|
|
@@ -77,7 +73,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
77
73
|
borderRadius: 11,
|
|
78
74
|
alignItems: 'center',
|
|
79
75
|
justifyContent: 'center',
|
|
80
|
-
backgroundColor:
|
|
76
|
+
backgroundColor: t.colors.foreground,
|
|
81
77
|
},
|
|
82
78
|
add: {
|
|
83
79
|
aspectRatio: 1,
|
|
@@ -100,7 +96,6 @@ const g = StyleSheet.create({
|
|
|
100
96
|
head: { position: 'absolute' },
|
|
101
97
|
});
|
|
102
98
|
|
|
103
|
-
/** 카메라 모양. svg 없이 테두리로 그린다 */
|
|
104
99
|
function CameraGlyph({ color, size }: { color: string; size: number }) {
|
|
105
100
|
const stroke = Math.max(1.5, size / 14);
|
|
106
101
|
const line = { borderWidth: stroke, borderColor: color };
|
|
@@ -145,7 +140,6 @@ function CameraGlyph({ color, size }: { color: string; size: number }) {
|
|
|
145
140
|
);
|
|
146
141
|
}
|
|
147
142
|
|
|
148
|
-
/** 다시 시도 화살표. 끊긴 원 + 화살촉 */
|
|
149
143
|
function RetryGlyph({ color, size }: { color: string; size: number }) {
|
|
150
144
|
const stroke = Math.max(2, size / 11);
|
|
151
145
|
const ring = size * 0.76;
|
|
@@ -181,7 +175,6 @@ function RetryGlyph({ color, size }: { color: string; size: number }) {
|
|
|
181
175
|
);
|
|
182
176
|
}
|
|
183
177
|
|
|
184
|
-
/** 상품 사진 올리기 · 순서 바꾸기. 앱 최상단이 GestureHandlerRootView로 감싸져 있어야 한다 */
|
|
185
178
|
export function ImageGrid({
|
|
186
179
|
images,
|
|
187
180
|
onImagesChange,
|
|
@@ -246,7 +239,7 @@ export function ImageGrid({
|
|
|
246
239
|
) : null}
|
|
247
240
|
{item.status === 'uploading' ? (
|
|
248
241
|
<View style={[s.fill, s.dim]}>
|
|
249
|
-
<ActivityIndicator color=
|
|
242
|
+
<ActivityIndicator color={t.colors.foreground} />
|
|
250
243
|
</View>
|
|
251
244
|
) : item.status === 'failed' ? (
|
|
252
245
|
<PressableBase
|
|
@@ -255,7 +248,10 @@ export function ImageGrid({
|
|
|
255
248
|
onPress={() => onRetry?.(item.id)}
|
|
256
249
|
style={[s.fill, s.light]}
|
|
257
250
|
>
|
|
258
|
-
<RetryGlyph color={t.colors.
|
|
251
|
+
<RetryGlyph color={t.colors.danger} size={22} />
|
|
252
|
+
<Text weight="bold" style={s.failed}>
|
|
253
|
+
실패
|
|
254
|
+
</Text>
|
|
259
255
|
</PressableBase>
|
|
260
256
|
) : null}
|
|
261
257
|
{onRemove && item.status !== 'uploading' ? (
|
|
@@ -265,7 +261,7 @@ export function ImageGrid({
|
|
|
265
261
|
style={s.remove}
|
|
266
262
|
>
|
|
267
263
|
<View style={s.removeDot}>
|
|
268
|
-
<CloseGlyph color=
|
|
264
|
+
<CloseGlyph color={t.colors.background} size={12} />
|
|
269
265
|
</View>
|
|
270
266
|
</PressableBase>
|
|
271
267
|
) : null}
|
package/src/blocks/index.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './brand-profile-card';
|
|
2
|
+
export * from './bulk-ship-list';
|
|
2
3
|
export * from './claim-row';
|
|
3
4
|
export * from './color-swatch-picker';
|
|
4
5
|
export * from './copy-variant-picker';
|
|
5
6
|
export * from './credit-wallet';
|
|
7
|
+
export * from './generation-progress';
|
|
6
8
|
export * from './invoice-row';
|
|
7
9
|
export * from './logo-candidate-grid';
|
|
8
10
|
export * from './oauth-buttons';
|
|
@@ -10,6 +12,7 @@ export * from './order-card';
|
|
|
10
12
|
export * from './plan-card';
|
|
11
13
|
export * from './product-list-empty';
|
|
12
14
|
export * from './review-row';
|
|
15
|
+
export * from './selection-bar';
|
|
13
16
|
export * from './service-state-banner';
|
|
14
17
|
export * from './shipping-tracking-row';
|
|
15
18
|
export * from './site-preview-frame';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { CheckGlyph } from '../../internal/glyphs';
|
|
3
4
|
import { PressableBase } from '../../internal/pressable-base';
|
|
5
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
6
|
import { makeStyles } from '../../utils/styles';
|
|
5
7
|
|
|
8
|
+
const MARK = 22;
|
|
9
|
+
|
|
6
10
|
const useStyles = makeStyles((t) => ({
|
|
7
11
|
card: {
|
|
8
12
|
gap: t.space[3],
|
|
@@ -13,30 +17,70 @@ const useStyles = makeStyles((t) => ({
|
|
|
13
17
|
backgroundColor: t.colors.background,
|
|
14
18
|
},
|
|
15
19
|
pressed: { backgroundColor: t.colors.muted },
|
|
20
|
+
selected: {
|
|
21
|
+
borderWidth: 2,
|
|
22
|
+
padding: t.space[4] - 1,
|
|
23
|
+
paddingRight: MARK + t.space[3],
|
|
24
|
+
borderColor: t.colors.primary,
|
|
25
|
+
},
|
|
26
|
+
mark: {
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
top: t.space[2],
|
|
29
|
+
right: t.space[2],
|
|
30
|
+
width: MARK,
|
|
31
|
+
height: MARK,
|
|
32
|
+
borderRadius: MARK / 2,
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
backgroundColor: t.colors.primary,
|
|
36
|
+
},
|
|
16
37
|
}));
|
|
17
38
|
|
|
18
|
-
/** blocks 공용 카드 틀. onPress가 있으면 누를 수 있다 */
|
|
19
39
|
export function Card({
|
|
20
40
|
children,
|
|
21
41
|
onPress,
|
|
42
|
+
onLongPress,
|
|
43
|
+
selected,
|
|
22
44
|
accessibilityLabel,
|
|
23
45
|
style,
|
|
24
46
|
}: {
|
|
25
47
|
children: ReactNode;
|
|
26
48
|
onPress?: () => void;
|
|
49
|
+
onLongPress?: () => void;
|
|
50
|
+
selected?: boolean;
|
|
27
51
|
accessibilityLabel?: string;
|
|
28
52
|
style?: StyleProp<ViewStyle>;
|
|
29
53
|
}) {
|
|
54
|
+
const t = useTheme();
|
|
30
55
|
const s = useStyles();
|
|
31
|
-
|
|
56
|
+
const frame = [s.card, selected && s.selected, style];
|
|
57
|
+
const mark = selected ? (
|
|
58
|
+
<View style={s.mark} testID="card-selected-mark">
|
|
59
|
+
<CheckGlyph color={t.colors.primaryForeground} size={14} />
|
|
60
|
+
</View>
|
|
61
|
+
) : null;
|
|
62
|
+
if (!onPress && !onLongPress) {
|
|
63
|
+
return (
|
|
64
|
+
<View
|
|
65
|
+
style={frame}
|
|
66
|
+
accessibilityState={selected === undefined ? undefined : { selected }}
|
|
67
|
+
>
|
|
68
|
+
{children}
|
|
69
|
+
{mark}
|
|
70
|
+
</View>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
32
73
|
return (
|
|
33
74
|
<PressableBase
|
|
34
75
|
onPress={onPress}
|
|
76
|
+
onLongPress={onLongPress}
|
|
35
77
|
accessibilityLabel={accessibilityLabel}
|
|
78
|
+
accessibilityState={selected === undefined ? undefined : { selected }}
|
|
36
79
|
pressedStyle={s.pressed}
|
|
37
|
-
style={
|
|
80
|
+
style={frame}
|
|
38
81
|
>
|
|
39
82
|
{children}
|
|
83
|
+
{mark}
|
|
40
84
|
</PressableBase>
|
|
41
85
|
);
|
|
42
86
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { formatPrice } from '../../components/price/price';
|
|
2
2
|
|
|
3
|
-
/** 420000 → '42만', 12345 → '1.2만', 9000 → '9,000' */
|
|
4
3
|
export function formatManwon(value: number): string {
|
|
5
4
|
const abs = Math.abs(value);
|
|
6
5
|
if (abs < 10000) return formatPrice(value, '');
|
|
@@ -9,13 +8,11 @@ export function formatManwon(value: number): string {
|
|
|
9
8
|
return `${Number(man.toFixed(digits))}만`;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
/** 전기 대비 증감률(%). 이전 값이 0이면 null */
|
|
13
11
|
export function changeRate(current: number, previous: number): number | null {
|
|
14
12
|
if (previous === 0) return null;
|
|
15
13
|
return ((current - previous) / Math.abs(previous)) * 100;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
/** 마감이 임박했을 때만 문구를 돌려준다. 0 → '오늘 마감', 1 → '내일 마감', 2 → '모레 마감', 그 밖 null */
|
|
19
16
|
export function formatDeadline(days: number): string | null {
|
|
20
17
|
if (days < 0) return '기한 지남';
|
|
21
18
|
return ['오늘 마감', '내일 마감', '모레 마감'][days] ?? null;
|
|
@@ -11,18 +11,12 @@ import { Card } from '../internal/card';
|
|
|
11
11
|
export type InvoiceStatus = 'paid' | 'failed' | 'refunded';
|
|
12
12
|
|
|
13
13
|
export type InvoiceRowProps = {
|
|
14
|
-
/** 예) '베이직 · 10월' */
|
|
15
14
|
title: string;
|
|
16
15
|
amount: number;
|
|
17
|
-
/** 기본 'paid' */
|
|
18
16
|
status?: InvoiceStatus;
|
|
19
|
-
/** 환불된 금액. 없으면 전액 환불 */
|
|
20
17
|
refundedAmount?: number;
|
|
21
|
-
/** 실패일 때 [결제수단 변경] */
|
|
22
18
|
onChangePaymentMethod?: () => void;
|
|
23
|
-
/** 실패일 때 [다시 결제] */
|
|
24
19
|
onRetry?: () => void;
|
|
25
|
-
/** 다시 결제 진행 중 */
|
|
26
20
|
retrying?: boolean;
|
|
27
21
|
onPress?: () => void;
|
|
28
22
|
style?: StyleProp<ViewStyle>;
|
|
@@ -35,7 +29,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
35
29
|
action: { flex: 1 },
|
|
36
30
|
}));
|
|
37
31
|
|
|
38
|
-
/** 결제 내역 한 건. 실패한 결제는 해결 버튼이 있는 카드로 보여준다 */
|
|
39
32
|
export function InvoiceRow({
|
|
40
33
|
title,
|
|
41
34
|
amount,
|
|
@@ -81,11 +74,11 @@ export function InvoiceRow({
|
|
|
81
74
|
<View style={s.row}>
|
|
82
75
|
<AlertGlyph
|
|
83
76
|
filled
|
|
84
|
-
color={t.colors.
|
|
85
|
-
onColor={t.colors.
|
|
77
|
+
color={t.colors.danger}
|
|
78
|
+
onColor={t.colors.dangerForeground}
|
|
86
79
|
size={t.iconSize.md}
|
|
87
80
|
/>
|
|
88
|
-
<Text weight="bold" tone="
|
|
81
|
+
<Text weight="bold" tone="danger" style={[s.head, s.grow]}>
|
|
89
82
|
결제 실패
|
|
90
83
|
</Text>
|
|
91
84
|
<Text weight="bold" style={s.head}>
|
|
@@ -22,7 +22,6 @@ export type LogoCandidateGridProps = {
|
|
|
22
22
|
candidates: readonly LogoCandidate[];
|
|
23
23
|
selectedId: string | null;
|
|
24
24
|
onSelect: (id: string) => void;
|
|
25
|
-
/** 실패한 후보 다시 만들기 */
|
|
26
25
|
onRetry?: (id: string) => void;
|
|
27
26
|
style?: StyleProp<ViewStyle>;
|
|
28
27
|
};
|
|
@@ -58,7 +57,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
58
57
|
retry: { paddingHorizontal: t.space[4] },
|
|
59
58
|
}));
|
|
60
59
|
|
|
61
|
-
/** AI가 만든 로고 후보 고르기 */
|
|
62
60
|
export function LogoCandidateGrid({
|
|
63
61
|
candidates,
|
|
64
62
|
selectedId,
|
|
@@ -15,19 +15,12 @@ export type OAuthProvider = 'kakao' | 'naver' | 'google' | 'apple';
|
|
|
15
15
|
export type OAuthButtonsProps = {
|
|
16
16
|
providers: readonly OAuthProvider[];
|
|
17
17
|
onPress: (provider: OAuthProvider) => void;
|
|
18
|
-
/**
|
|
19
|
-
* 각 사 공식 로고. 로고는 상표라 패키지에 넣지 않는다.
|
|
20
|
-
* 각 사 브랜드 가이드의 에셋을 앱에서 넘긴다.
|
|
21
|
-
*/
|
|
22
18
|
icons?: Partial<Record<OAuthProvider, ReactNode>>;
|
|
23
|
-
/** 진행 중인 공급자 */
|
|
24
19
|
loading?: OAuthProvider | null;
|
|
25
|
-
/** 문구 바꾸기 */
|
|
26
20
|
labels?: Partial<Record<OAuthProvider, string>>;
|
|
27
21
|
style?: StyleProp<ViewStyle>;
|
|
28
22
|
};
|
|
29
23
|
|
|
30
|
-
// 각 사 브랜드 가이드의 지정 색. 테마 토큰을 따르지 않는다.
|
|
31
24
|
const BRAND: Record<
|
|
32
25
|
OAuthProvider,
|
|
33
26
|
{ bg: string; fg: string; border?: string; label: string }
|
|
@@ -62,7 +55,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
62
55
|
label: { fontSize: 15, fontWeight: '600', fontFamily: t.fontFamily },
|
|
63
56
|
}));
|
|
64
57
|
|
|
65
|
-
/** 소셜 로그인 버튼 묶음. Apple은 iOS에서만 보인다 */
|
|
66
58
|
export function OAuthButtons({
|
|
67
59
|
providers,
|
|
68
60
|
onPress,
|
|
@@ -11,16 +11,15 @@ import { SortableList } from '../../sortable/sortable-list';
|
|
|
11
11
|
export type ProductOption = {
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
-
/** 기본 가격에 더하는 금액 */
|
|
15
14
|
priceDelta: number;
|
|
16
|
-
/** false면 판매 중지(품절) */
|
|
17
15
|
active: boolean;
|
|
16
|
+
note?: string;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
export type OptionEditorProps = {
|
|
21
20
|
options: readonly ProductOption[];
|
|
22
21
|
onOptionsChange: (options: ProductOption[]) => void;
|
|
23
|
-
|
|
22
|
+
onActiveChange?: (id: string, active: boolean) => void;
|
|
24
23
|
onEdit?: (id: string) => void;
|
|
25
24
|
onAdd?: () => void;
|
|
26
25
|
style?: StyleProp<ViewStyle>;
|
|
@@ -44,7 +43,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
44
43
|
},
|
|
45
44
|
separator: { borderTopWidth: 1, borderTopColor: t.colors.border },
|
|
46
45
|
pressed: { backgroundColor: t.colors.muted },
|
|
47
|
-
|
|
46
|
+
body: { flex: 1, paddingVertical: t.space[2] },
|
|
48
47
|
price: { fontVariant: ['tabular-nums'] },
|
|
49
48
|
grip: {
|
|
50
49
|
width: 20,
|
|
@@ -60,17 +59,25 @@ const useStyles = makeStyles((t) => ({
|
|
|
60
59
|
},
|
|
61
60
|
}));
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
function formatPriceDelta(delta: number): string {
|
|
63
|
+
return delta > 0 ? `+${formatPrice(delta)}` : formatPrice(delta);
|
|
64
|
+
}
|
|
65
|
+
|
|
64
66
|
export function OptionEditor({
|
|
65
67
|
options,
|
|
66
68
|
onOptionsChange,
|
|
69
|
+
onActiveChange,
|
|
67
70
|
onEdit,
|
|
68
71
|
onAdd,
|
|
69
72
|
style,
|
|
70
73
|
}: OptionEditorProps) {
|
|
71
74
|
const s = useStyles();
|
|
72
75
|
const setActive = (id: string, active: boolean) =>
|
|
73
|
-
|
|
76
|
+
onActiveChange
|
|
77
|
+
? onActiveChange(id, active)
|
|
78
|
+
: onOptionsChange(
|
|
79
|
+
options.map((o) => (o.id === id ? { ...o, active } : o))
|
|
80
|
+
);
|
|
74
81
|
return (
|
|
75
82
|
<View style={[s.root, style]}>
|
|
76
83
|
<View style={s.list}>
|
|
@@ -96,12 +103,19 @@ export function OptionEditor({
|
|
|
96
103
|
<View style={s.bar} />
|
|
97
104
|
</View>
|
|
98
105
|
</SortableHandle>
|
|
99
|
-
<
|
|
100
|
-
{
|
|
101
|
-
|
|
106
|
+
<View style={s.body}>
|
|
107
|
+
<Text tone={tone} numberOfLines={1}>
|
|
108
|
+
{item.name}
|
|
109
|
+
</Text>
|
|
110
|
+
{item.note ? (
|
|
111
|
+
<Text variant="caption" tone="muted" numberOfLines={2}>
|
|
112
|
+
{item.note}
|
|
113
|
+
</Text>
|
|
114
|
+
) : null}
|
|
115
|
+
</View>
|
|
102
116
|
{item.priceDelta ? (
|
|
103
117
|
<Text tone={tone} style={s.price}>
|
|
104
|
-
|
|
118
|
+
{formatPriceDelta(item.priceDelta)}
|
|
105
119
|
</Text>
|
|
106
120
|
) : null}
|
|
107
121
|
<Switch
|
|
@@ -10,33 +10,22 @@ import { Card } from '../internal/card';
|
|
|
10
10
|
import { formatDeadline } from '../internal/format';
|
|
11
11
|
|
|
12
12
|
export type OrderStatus =
|
|
13
|
-
| '
|
|
13
|
+
| 'pending_payment'
|
|
14
14
|
| 'paid'
|
|
15
15
|
| 'preparing'
|
|
16
|
-
| '
|
|
16
|
+
| 'shipped'
|
|
17
17
|
| 'delivered'
|
|
18
|
-
| '
|
|
19
|
-
| '
|
|
20
|
-
| 'cancelRequested'
|
|
21
|
-
| 'returnRequested'
|
|
22
|
-
| 'exchangeRequested'
|
|
23
|
-
| 'canceled'
|
|
24
|
-
| 'refunded';
|
|
18
|
+
| 'completed'
|
|
19
|
+
| 'canceled';
|
|
25
20
|
|
|
26
|
-
/** 주문 상태 → 묶음 제목 (OrderSection) */
|
|
27
21
|
export const orderStatusLabel: Record<OrderStatus, string> = {
|
|
28
|
-
|
|
22
|
+
pending_payment: '결제 대기',
|
|
29
23
|
paid: '신규',
|
|
30
24
|
preparing: '배송 준비',
|
|
31
|
-
|
|
25
|
+
shipped: '배송 중',
|
|
32
26
|
delivered: '배송 완료',
|
|
33
|
-
|
|
34
|
-
partiallyCanceled: '부분 취소',
|
|
35
|
-
cancelRequested: '취소 요청',
|
|
36
|
-
returnRequested: '반품 요청',
|
|
37
|
-
exchangeRequested: '교환 요청',
|
|
27
|
+
completed: '구매 확정',
|
|
38
28
|
canceled: '취소',
|
|
39
|
-
refunded: '환불 완료',
|
|
40
29
|
};
|
|
41
30
|
|
|
42
31
|
export type OrderItem = { name: string; option?: string; quantity: number };
|
|
@@ -44,20 +33,18 @@ export type OrderItem = { name: string; option?: string; quantity: number };
|
|
|
44
33
|
export type OrderAction = {
|
|
45
34
|
label: string;
|
|
46
35
|
onPress: () => void;
|
|
47
|
-
/** 기본 'outline' */
|
|
48
36
|
variant?: ButtonVariant;
|
|
49
37
|
loading?: boolean;
|
|
50
38
|
};
|
|
51
39
|
|
|
52
40
|
export type OrderCardProps = {
|
|
53
41
|
items: readonly OrderItem[];
|
|
54
|
-
/** 결제 금액 */
|
|
55
42
|
total: number;
|
|
56
|
-
/** 처리 기한까지 남은 영업일. 임박했을 때만 표시한다 */
|
|
57
43
|
dueInDays?: number;
|
|
58
|
-
/** 없고 기한도 임박하지 않으면 한 줄로 줄여 보여준다 */
|
|
59
44
|
actions?: readonly OrderAction[];
|
|
60
45
|
onPress?: () => void;
|
|
46
|
+
onLongPress?: () => void;
|
|
47
|
+
selected?: boolean;
|
|
61
48
|
style?: StyleProp<ViewStyle>;
|
|
62
49
|
};
|
|
63
50
|
|
|
@@ -78,7 +65,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
78
65
|
section: { gap: t.space[3] },
|
|
79
66
|
}));
|
|
80
67
|
|
|
81
|
-
/** '장미 꽃다발 (중) 외 1건', '튤립 다발 × 2' */
|
|
82
68
|
export function summarizeItems(items: readonly OrderItem[]): string {
|
|
83
69
|
const [first, ...rest] = items;
|
|
84
70
|
if (!first) return '';
|
|
@@ -87,13 +73,14 @@ export function summarizeItems(items: readonly OrderItem[]): string {
|
|
|
87
73
|
return first.quantity > 1 ? `${name} × ${first.quantity}` : name;
|
|
88
74
|
}
|
|
89
75
|
|
|
90
|
-
/** 주문 목록의 한 건. 처리할 일이 없으면 누를 수 있는 한 줄로 보여준다 */
|
|
91
76
|
export function OrderCard({
|
|
92
77
|
items,
|
|
93
78
|
total,
|
|
94
79
|
dueInDays,
|
|
95
80
|
actions = [],
|
|
96
81
|
onPress,
|
|
82
|
+
onLongPress,
|
|
83
|
+
selected,
|
|
97
84
|
style,
|
|
98
85
|
}: OrderCardProps) {
|
|
99
86
|
const t = useTheme();
|
|
@@ -106,6 +93,8 @@ export function OrderCard({
|
|
|
106
93
|
return (
|
|
107
94
|
<Card
|
|
108
95
|
onPress={onPress}
|
|
96
|
+
onLongPress={onLongPress}
|
|
97
|
+
selected={selected}
|
|
109
98
|
accessibilityLabel={label}
|
|
110
99
|
style={[s.compact, style]}
|
|
111
100
|
>
|
|
@@ -123,7 +112,13 @@ export function OrderCard({
|
|
|
123
112
|
}
|
|
124
113
|
|
|
125
114
|
return (
|
|
126
|
-
<Card
|
|
115
|
+
<Card
|
|
116
|
+
onPress={onPress}
|
|
117
|
+
onLongPress={onLongPress}
|
|
118
|
+
selected={selected}
|
|
119
|
+
accessibilityLabel={label}
|
|
120
|
+
style={style}
|
|
121
|
+
>
|
|
127
122
|
<View style={s.row}>
|
|
128
123
|
<Text weight="semibold" style={[s.title, s.grow]} numberOfLines={1}>
|
|
129
124
|
{summary}
|
|
@@ -133,7 +128,7 @@ export function OrderCard({
|
|
|
133
128
|
</Text>
|
|
134
129
|
</View>
|
|
135
130
|
{deadline ? (
|
|
136
|
-
<Text weight="bold" tone="
|
|
131
|
+
<Text weight="bold" tone="danger" style={s.deadline}>
|
|
137
132
|
{deadline}
|
|
138
133
|
</Text>
|
|
139
134
|
) : null}
|
|
@@ -157,15 +152,12 @@ export function OrderCard({
|
|
|
157
152
|
}
|
|
158
153
|
|
|
159
154
|
export type OrderSectionProps = {
|
|
160
|
-
/** 예) '신규', orderStatusLabel[status] */
|
|
161
155
|
title: string;
|
|
162
|
-
/** 제목 옆 건수 */
|
|
163
156
|
count?: number;
|
|
164
157
|
children: ReactNode;
|
|
165
158
|
style?: StyleProp<ViewStyle>;
|
|
166
159
|
};
|
|
167
160
|
|
|
168
|
-
/** 같은 상태의 주문을 묶는 제목과 목록 */
|
|
169
161
|
export function OrderSection({
|
|
170
162
|
title,
|
|
171
163
|
count,
|
|
@@ -7,32 +7,23 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
7
7
|
import { makeStyles } from '../../utils/styles';
|
|
8
8
|
import { Card } from '../internal/card';
|
|
9
9
|
|
|
10
|
-
export type PlanState =
|
|
10
|
+
export type PlanState =
|
|
11
|
+
'none' | 'trial' | 'active' | 'cancelScheduled' | 'pastDue' | 'suspended';
|
|
11
12
|
|
|
12
13
|
export type PlanCardProps = {
|
|
13
14
|
name: string;
|
|
14
|
-
/** 월 요금 */
|
|
15
15
|
price: number;
|
|
16
|
-
/** 매월 주는 크레딧 */
|
|
17
16
|
monthlyCredits: number;
|
|
18
|
-
|
|
19
|
-
dailyLimit: number;
|
|
17
|
+
dailyLimit: number | null;
|
|
20
18
|
features?: readonly string[];
|
|
21
|
-
/** 지금 쓰는 플랜이면 변경 버튼을 숨긴다 */
|
|
22
19
|
current?: boolean;
|
|
23
|
-
/** 테두리를 굵게 강조 */
|
|
24
20
|
recommended?: boolean;
|
|
25
|
-
/** 지금 구독 상태 (current일 때) */
|
|
26
21
|
state?: PlanState;
|
|
27
|
-
/** 예) '11월 30일' — 해지 예약일 */
|
|
28
22
|
cancelDate?: string;
|
|
29
|
-
/** 바꾸면 오늘 결제할 금액. 넘기면 버튼에 금액을 붙인다 */
|
|
30
23
|
proratedAmount?: number;
|
|
31
|
-
/** 가격 인상 예정 */
|
|
32
24
|
priceChange?: { newPrice: number; effectiveDate: string; consented: boolean };
|
|
33
25
|
onSelect?: () => void;
|
|
34
26
|
onConsent?: () => void;
|
|
35
|
-
/** 기본 '이 플랜으로 변경' */
|
|
36
27
|
actionLabel?: string;
|
|
37
28
|
style?: StyleProp<ViewStyle>;
|
|
38
29
|
};
|
|
@@ -60,6 +51,10 @@ const useStyles = makeStyles((t) => ({
|
|
|
60
51
|
|
|
61
52
|
function stateText(state: PlanState, cancelDate?: string): string | null {
|
|
62
53
|
switch (state) {
|
|
54
|
+
case 'none':
|
|
55
|
+
return '구독 전';
|
|
56
|
+
case 'trial':
|
|
57
|
+
return '체험 중';
|
|
63
58
|
case 'cancelScheduled':
|
|
64
59
|
return cancelDate ? `${cancelDate} 해지` : '해지 신청됨';
|
|
65
60
|
case 'pastDue':
|
|
@@ -71,7 +66,6 @@ function stateText(state: PlanState, cancelDate?: string): string | null {
|
|
|
71
66
|
}
|
|
72
67
|
}
|
|
73
68
|
|
|
74
|
-
/** 구독 플랜 한 장. 섹션 제목('이용 중인 플랜' 등)은 쓰는 쪽에서 붙인다 */
|
|
75
69
|
export function PlanCard({
|
|
76
70
|
name,
|
|
77
71
|
price,
|
|
@@ -93,10 +87,11 @@ export function PlanCard({
|
|
|
93
87
|
const s = useStyles();
|
|
94
88
|
const items = [
|
|
95
89
|
`월 크레딧 ${formatPrice(monthlyCredits, '')}`,
|
|
96
|
-
`하루 생성 ${dailyLimit}회`,
|
|
90
|
+
dailyLimit === null ? '하루 생성 무제한' : `하루 생성 ${dailyLimit}회`,
|
|
97
91
|
...features,
|
|
98
92
|
];
|
|
99
|
-
const
|
|
93
|
+
const notice = state === 'none' || state === 'trial';
|
|
94
|
+
const alert = current || notice ? stateText(state, cancelDate) : null;
|
|
100
95
|
return (
|
|
101
96
|
<Card style={[recommended && s.recommended, style]}>
|
|
102
97
|
<View style={s.head}>
|
|
@@ -115,7 +110,14 @@ export function PlanCard({
|
|
|
115
110
|
</View>
|
|
116
111
|
))}
|
|
117
112
|
</View>
|
|
118
|
-
{alert ?
|
|
113
|
+
{alert ? (
|
|
114
|
+
<Text
|
|
115
|
+
tone={notice ? 'muted' : 'danger'}
|
|
116
|
+
weight={notice ? 'semibold' : undefined}
|
|
117
|
+
>
|
|
118
|
+
{alert}
|
|
119
|
+
</Text>
|
|
120
|
+
) : null}
|
|
119
121
|
{priceChange ? (
|
|
120
122
|
<View style={s.change}>
|
|
121
123
|
<Text tone="muted">{priceChange.effectiveDate}부터</Text>
|
|
@@ -20,14 +20,10 @@ export type SampleProduct = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type ProductListEmptyProps = {
|
|
23
|
-
/** 첫 상품 등록 */
|
|
24
23
|
onAdd: () => void;
|
|
25
|
-
/** 기본 '첫 상품 등록' */
|
|
26
24
|
addLabel?: string;
|
|
27
|
-
/** AI가 만든 초안이 있으면 예시 카드로 먼저 보여준다 */
|
|
28
25
|
sample?: SampleProduct;
|
|
29
26
|
onEditSample?: () => void;
|
|
30
|
-
/** 예시를 지우면 등록 타일로 바뀐다 (부모가 sample을 비운다) */
|
|
31
27
|
onDismissSample?: () => void;
|
|
32
28
|
style?: StyleProp<ViewStyle>;
|
|
33
29
|
};
|
|
@@ -77,7 +73,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
77
73
|
dismiss: { width: 48, height: 48, paddingHorizontal: 0 },
|
|
78
74
|
}));
|
|
79
75
|
|
|
80
|
-
/** 상품 목록이 비었을 때: 예시 초안이 있으면 예시 카드, 없으면 등록 타일 */
|
|
81
76
|
export function ProductListEmpty({
|
|
82
77
|
onAdd,
|
|
83
78
|
addLabel = '첫 상품 등록',
|
|
@@ -12,16 +12,12 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
12
12
|
import { makeStyles } from '../../utils/styles';
|
|
13
13
|
|
|
14
14
|
export type ReviewRowProps = {
|
|
15
|
-
/** 가린 이름. 예) '김*지' */
|
|
16
15
|
author: string;
|
|
17
|
-
/** 1~5 */
|
|
18
16
|
rating: number;
|
|
19
17
|
content: string;
|
|
20
18
|
photos?: readonly ImageSourcePropType[];
|
|
21
19
|
reply?: string;
|
|
22
|
-
/** 답글이 없을 때 '답글 달기' 버튼 */
|
|
23
20
|
onReply?: () => void;
|
|
24
|
-
/** 오른쪽 위 더보기 버튼 (답글 수정 · 숨기기 등) */
|
|
25
21
|
onMore?: () => void;
|
|
26
22
|
style?: StyleProp<ViewStyle>;
|
|
27
23
|
};
|
|
@@ -72,7 +68,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
72
68
|
hiddenLabel: { flex: 1 },
|
|
73
69
|
}));
|
|
74
70
|
|
|
75
|
-
/** 별점을 ★로 그린다. 빈 별은 border 색 */
|
|
76
71
|
function Stars({ rating, size }: { rating: number; size?: number }) {
|
|
77
72
|
const t = useTheme();
|
|
78
73
|
const s = useStyles();
|
|
@@ -93,7 +88,6 @@ function Stars({ rating, size }: { rating: number; size?: number }) {
|
|
|
93
88
|
);
|
|
94
89
|
}
|
|
95
90
|
|
|
96
|
-
/** 리뷰 한 건과 사장님 답글 */
|
|
97
91
|
export function ReviewRow({
|
|
98
92
|
author,
|
|
99
93
|
rating,
|
|
@@ -165,7 +159,6 @@ export function ReviewRow({
|
|
|
165
159
|
);
|
|
166
160
|
}
|
|
167
161
|
|
|
168
|
-
/** 숨긴 리뷰를 한 줄로 접어 둔다 */
|
|
169
162
|
export function HiddenReviewsRow({
|
|
170
163
|
count,
|
|
171
164
|
onShow,
|
|
@@ -183,9 +176,7 @@ export function HiddenReviewsRow({
|
|
|
183
176
|
}
|
|
184
177
|
|
|
185
178
|
export type ReviewSummaryProps = {
|
|
186
|
-
/** 평균 별점 */
|
|
187
179
|
average: number;
|
|
188
|
-
/** 5점부터 1점까지 리뷰 수 */
|
|
189
180
|
distribution: readonly [number, number, number, number, number];
|
|
190
181
|
style?: StyleProp<ViewStyle>;
|
|
191
182
|
};
|
|
@@ -207,7 +198,6 @@ const useSummaryStyles = makeStyles((t) => ({
|
|
|
207
198
|
fill: { height: 6, borderRadius: 3, backgroundColor: t.colors.warning },
|
|
208
199
|
}));
|
|
209
200
|
|
|
210
|
-
/** 평균 별점과 점수별 분포 막대 */
|
|
211
201
|
export function ReviewSummary({
|
|
212
202
|
average,
|
|
213
203
|
distribution,
|