@ezpg/app-ui 0.1.0 → 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 +19 -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 +0 -2
- 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 +19 -15
- 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 +0 -2
- 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 +10 -15
- 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 +0 -2
- 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 +11 -5
- 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 +0 -2
- 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.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 +0 -2
- 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 +52 -3
- 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 +0 -2
- 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.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.map +1 -1
- package/lib/module/components/toast/toast.js +0 -8
- 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/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 +0 -1
- 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 +0 -3
- 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 +0 -7
- 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 +0 -1
- 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 +0 -3
- package/lib/typescript/src/components/text/text.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts +0 -8
- 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/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 +0 -7
- 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 +0 -4
- 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 +0 -7
- 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 +20 -28
- 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 +0 -5
- 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 +16 -5
- 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 +0 -5
- 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 +0 -3
- package/src/components/chip/chip.tsx +17 -0
- package/src/components/chip-group/chip-group.tsx +2 -2
- package/src/components/dialog/dialog.tsx +0 -7
- package/src/components/divider/divider.tsx +0 -2
- package/src/components/empty-state/empty-state.tsx +0 -11
- package/src/components/field/field.tsx +54 -4
- package/src/components/list-row/list-row.tsx +0 -3
- package/src/components/photo/photo.tsx +0 -5
- package/src/components/price/price.tsx +0 -3
- 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 +0 -1
- package/src/components/switch/switch.tsx +5 -3
- package/src/components/text/text.tsx +0 -3
- package/src/components/toast/toast.tsx +0 -11
- 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/create-theme.ts +0 -5
- package/src/theme/theme-provider.tsx +0 -3
- package/src/theme/tokens.ts +0 -1
- package/src/types/index.ts +0 -7
- package/src/utils/color.ts +0 -3
- package/src/utils/styles.ts +0 -5
|
@@ -7,10 +7,9 @@ import { Card } from '../internal/card';
|
|
|
7
7
|
|
|
8
8
|
export type CreditWalletProps = {
|
|
9
9
|
balance: number;
|
|
10
|
-
/** 이번 달에 사라지는 크레딧. 0보다 크면 보여준다 */
|
|
11
10
|
expiring?: number;
|
|
12
11
|
todayUsed: number;
|
|
13
|
-
dailyLimit: number;
|
|
12
|
+
dailyLimit: number | null;
|
|
14
13
|
onBuy?: () => void;
|
|
15
14
|
onHistory?: () => void;
|
|
16
15
|
style?: StyleProp<ViewStyle>;
|
|
@@ -43,7 +42,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
43
42
|
action: { flex: 1 },
|
|
44
43
|
}));
|
|
45
44
|
|
|
46
|
-
/** 보유 크레딧과 오늘 생성 횟수 */
|
|
47
45
|
export function CreditWallet({
|
|
48
46
|
balance,
|
|
49
47
|
expiring,
|
|
@@ -54,7 +52,12 @@ export function CreditWallet({
|
|
|
54
52
|
style,
|
|
55
53
|
}: CreditWalletProps) {
|
|
56
54
|
const s = useStyles();
|
|
57
|
-
const ratio =
|
|
55
|
+
const ratio =
|
|
56
|
+
dailyLimit === null
|
|
57
|
+
? 0
|
|
58
|
+
: dailyLimit > 0
|
|
59
|
+
? Math.min(1, todayUsed / dailyLimit)
|
|
60
|
+
: 1;
|
|
58
61
|
return (
|
|
59
62
|
<View style={[s.root, style]}>
|
|
60
63
|
<Card>
|
|
@@ -87,18 +90,21 @@ export function CreditWallet({
|
|
|
87
90
|
<View style={s.row}>
|
|
88
91
|
<Text weight="semibold">오늘 생성</Text>
|
|
89
92
|
<Text>
|
|
90
|
-
<Text weight="bold">{todayUsed}</Text> /
|
|
93
|
+
<Text weight="bold">{todayUsed}</Text> /{' '}
|
|
94
|
+
{dailyLimit === null ? '무제한' : dailyLimit}
|
|
91
95
|
</Text>
|
|
92
96
|
</View>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
{dailyLimit === null ? null : (
|
|
98
|
+
<View
|
|
99
|
+
accessible
|
|
100
|
+
accessibilityRole="progressbar"
|
|
101
|
+
accessibilityLabel="오늘 생성"
|
|
102
|
+
accessibilityValue={{ min: 0, max: dailyLimit, now: todayUsed }}
|
|
103
|
+
style={s.meter}
|
|
104
|
+
>
|
|
105
|
+
<View style={[s.fill, { width: `${ratio * 100}%` }]} />
|
|
106
|
+
</View>
|
|
107
|
+
)}
|
|
102
108
|
</Card>
|
|
103
109
|
</View>
|
|
104
110
|
);
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActivityIndicator,
|
|
3
|
+
View,
|
|
4
|
+
type StyleProp,
|
|
5
|
+
type ViewStyle,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
import { Button } from '../../components/button/button';
|
|
8
|
+
import { Text } from '../../components/text/text';
|
|
9
|
+
import { AlertGlyph, CheckGlyph } from '../../internal/glyphs';
|
|
10
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
11
|
+
import { makeStyles } from '../../utils/styles';
|
|
12
|
+
import { Card } from '../internal/card';
|
|
13
|
+
|
|
14
|
+
export type GenerationStatus = 'queued' | 'running' | 'done' | 'failed';
|
|
15
|
+
|
|
16
|
+
export type GenerationStep = { key: string; label: string };
|
|
17
|
+
|
|
18
|
+
export type GenerationProgressProps = {
|
|
19
|
+
steps: readonly GenerationStep[];
|
|
20
|
+
current: string | null;
|
|
21
|
+
status: GenerationStatus;
|
|
22
|
+
errorText?: string;
|
|
23
|
+
onRetry?: () => void;
|
|
24
|
+
creditNote?: string;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
type StepState = 'done' | 'active' | 'waiting' | 'pending' | 'failed';
|
|
29
|
+
|
|
30
|
+
const HEADLINE: Record<GenerationStatus, string> = {
|
|
31
|
+
queued: '접수했어요. 곧 시작해요',
|
|
32
|
+
running: '만들고 있어요',
|
|
33
|
+
done: '다 만들었어요',
|
|
34
|
+
failed: '만들지 못했어요',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const STATE_LABEL: Record<StepState, string> = {
|
|
38
|
+
done: '완료',
|
|
39
|
+
active: '진행 중',
|
|
40
|
+
waiting: '대기 중',
|
|
41
|
+
pending: '대기',
|
|
42
|
+
failed: '실패',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const DOT = 24;
|
|
46
|
+
|
|
47
|
+
const useStyles = makeStyles((t) => ({
|
|
48
|
+
list: { gap: t.space[3] },
|
|
49
|
+
row: { flexDirection: 'row', alignItems: 'center', gap: t.space[3] },
|
|
50
|
+
label: { flex: 1 },
|
|
51
|
+
dot: {
|
|
52
|
+
width: DOT,
|
|
53
|
+
height: DOT,
|
|
54
|
+
borderRadius: DOT / 2,
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
},
|
|
58
|
+
doneDot: { backgroundColor: t.colors.primary },
|
|
59
|
+
pendingDot: { borderWidth: 2, borderColor: t.colors.input },
|
|
60
|
+
waitingDot: { borderWidth: 2, borderColor: t.colors.primary },
|
|
61
|
+
start: { alignSelf: 'flex-start' },
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
function stepState(
|
|
65
|
+
index: number,
|
|
66
|
+
currentIndex: number,
|
|
67
|
+
status: GenerationStatus
|
|
68
|
+
): StepState {
|
|
69
|
+
if (status === 'done') return 'done';
|
|
70
|
+
if (currentIndex < 0) return 'pending';
|
|
71
|
+
if (index < currentIndex) return 'done';
|
|
72
|
+
if (index > currentIndex) return 'pending';
|
|
73
|
+
if (status === 'failed') return 'failed';
|
|
74
|
+
return status === 'running' ? 'active' : 'waiting';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function GenerationProgress({
|
|
78
|
+
steps,
|
|
79
|
+
current,
|
|
80
|
+
status,
|
|
81
|
+
errorText,
|
|
82
|
+
onRetry,
|
|
83
|
+
creditNote,
|
|
84
|
+
style,
|
|
85
|
+
}: GenerationProgressProps) {
|
|
86
|
+
const t = useTheme();
|
|
87
|
+
const s = useStyles();
|
|
88
|
+
const currentIndex =
|
|
89
|
+
current === null ? -1 : steps.findIndex((step) => step.key === current);
|
|
90
|
+
const indicator = (state: StepState) => {
|
|
91
|
+
switch (state) {
|
|
92
|
+
case 'done':
|
|
93
|
+
return (
|
|
94
|
+
<View style={[s.dot, s.doneDot]}>
|
|
95
|
+
<CheckGlyph color={t.colors.primaryForeground} size={14} />
|
|
96
|
+
</View>
|
|
97
|
+
);
|
|
98
|
+
case 'active':
|
|
99
|
+
return (
|
|
100
|
+
<View style={s.dot}>
|
|
101
|
+
<ActivityIndicator size="small" color={t.colors.primary} />
|
|
102
|
+
</View>
|
|
103
|
+
);
|
|
104
|
+
case 'failed':
|
|
105
|
+
return (
|
|
106
|
+
<View style={s.dot}>
|
|
107
|
+
<AlertGlyph
|
|
108
|
+
filled
|
|
109
|
+
color={t.colors.destructive}
|
|
110
|
+
onColor={t.colors.destructiveForeground}
|
|
111
|
+
size={DOT}
|
|
112
|
+
/>
|
|
113
|
+
</View>
|
|
114
|
+
);
|
|
115
|
+
case 'waiting':
|
|
116
|
+
return <View style={[s.dot, s.waitingDot]} />;
|
|
117
|
+
default:
|
|
118
|
+
return <View style={[s.dot, s.pendingDot]} />;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
return (
|
|
122
|
+
<Card style={style}>
|
|
123
|
+
<Text
|
|
124
|
+
variant="bodyLg"
|
|
125
|
+
weight="bold"
|
|
126
|
+
accessibilityRole="header"
|
|
127
|
+
accessibilityLiveRegion="polite"
|
|
128
|
+
>
|
|
129
|
+
{HEADLINE[status]}
|
|
130
|
+
</Text>
|
|
131
|
+
<View style={s.list}>
|
|
132
|
+
{steps.map((step, i) => {
|
|
133
|
+
const state = stepState(i, currentIndex, status);
|
|
134
|
+
return (
|
|
135
|
+
<View
|
|
136
|
+
key={step.key}
|
|
137
|
+
accessible
|
|
138
|
+
accessibilityLabel={`${step.label}, ${STATE_LABEL[state]}`}
|
|
139
|
+
style={s.row}
|
|
140
|
+
>
|
|
141
|
+
{indicator(state)}
|
|
142
|
+
<Text
|
|
143
|
+
style={s.label}
|
|
144
|
+
tone={
|
|
145
|
+
state === 'failed'
|
|
146
|
+
? 'destructive'
|
|
147
|
+
: state === 'pending'
|
|
148
|
+
? 'muted'
|
|
149
|
+
: 'default'
|
|
150
|
+
}
|
|
151
|
+
weight={
|
|
152
|
+
state === 'active' || state === 'failed'
|
|
153
|
+
? 'semibold'
|
|
154
|
+
: undefined
|
|
155
|
+
}
|
|
156
|
+
>
|
|
157
|
+
{step.label}
|
|
158
|
+
</Text>
|
|
159
|
+
</View>
|
|
160
|
+
);
|
|
161
|
+
})}
|
|
162
|
+
</View>
|
|
163
|
+
{status === 'failed' && errorText ? (
|
|
164
|
+
<Text tone="destructive" accessibilityLiveRegion="polite">
|
|
165
|
+
{errorText}
|
|
166
|
+
</Text>
|
|
167
|
+
) : null}
|
|
168
|
+
{status === 'failed' && onRetry ? (
|
|
169
|
+
<Button variant="outline" onPress={onRetry} style={s.start}>
|
|
170
|
+
다시 시도
|
|
171
|
+
</Button>
|
|
172
|
+
) : null}
|
|
173
|
+
{creditNote ? (
|
|
174
|
+
<Text variant="caption" tone="muted">
|
|
175
|
+
{creditNote}
|
|
176
|
+
</Text>
|
|
177
|
+
) : null}
|
|
178
|
+
</Card>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
@@ -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.destructive },
|
|
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.destructive} size={
|
|
251
|
+
<RetryGlyph color={t.colors.destructive} 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,
|
|
@@ -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
|