@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
|
@@ -15,11 +15,11 @@ import { makeStyles } from '../../utils/styles';
|
|
|
15
15
|
export type FieldProps = Omit<TextInputProps, 'style'> & {
|
|
16
16
|
ref?: Ref<ComponentRef<typeof TextInput>>;
|
|
17
17
|
label?: string;
|
|
18
|
-
/** 있으면 오류 상태로 표시하고 입력칸 아래에 보여준다 */
|
|
19
18
|
error?: string;
|
|
19
|
+
hint?: string;
|
|
20
|
+
warning?: string;
|
|
20
21
|
leading?: IconSlot;
|
|
21
22
|
trailing?: IconSlot;
|
|
22
|
-
/** 바깥 컨테이너 스타일 */
|
|
23
23
|
style?: StyleProp<ViewStyle>;
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -43,7 +43,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
43
43
|
borderColor: t.colors.input,
|
|
44
44
|
backgroundColor: t.colors.background,
|
|
45
45
|
},
|
|
46
|
-
// 테두리가 두꺼워져도 글자가 밀리지 않게 padding을 줄인다
|
|
47
46
|
focused: {
|
|
48
47
|
borderWidth: 2,
|
|
49
48
|
paddingHorizontal: t.space[4] - 1,
|
|
@@ -52,7 +51,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
52
51
|
invalid: {
|
|
53
52
|
borderWidth: 2,
|
|
54
53
|
paddingHorizontal: t.space[4] - 1,
|
|
55
|
-
borderColor: t.colors.
|
|
54
|
+
borderColor: t.colors.danger,
|
|
56
55
|
},
|
|
57
56
|
disabled: { opacity: t.opacity.disabled, backgroundColor: t.colors.muted },
|
|
58
57
|
input: {
|
|
@@ -68,14 +67,42 @@ const useStyles = makeStyles((t) => ({
|
|
|
68
67
|
fontSize: 13,
|
|
69
68
|
lineHeight: 18,
|
|
70
69
|
paddingLeft: t.space[1],
|
|
71
|
-
color: t.colors.
|
|
70
|
+
color: t.colors.danger,
|
|
71
|
+
},
|
|
72
|
+
errorLabel: { color: t.colors.danger },
|
|
73
|
+
warned: {
|
|
74
|
+
borderWidth: 2,
|
|
75
|
+
paddingHorizontal: t.space[4] - 1,
|
|
76
|
+
borderColor: t.colors.warning,
|
|
77
|
+
},
|
|
78
|
+
noteRow: {
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
alignItems: 'flex-start',
|
|
81
|
+
gap: t.space[1],
|
|
82
|
+
paddingLeft: t.space[1],
|
|
83
|
+
},
|
|
84
|
+
grow: { flex: 1, paddingLeft: 0 },
|
|
85
|
+
hint: {
|
|
86
|
+
fontFamily: t.fontFamily,
|
|
87
|
+
fontSize: 13,
|
|
88
|
+
lineHeight: 18,
|
|
89
|
+
paddingLeft: t.space[1],
|
|
90
|
+
color: t.colors.mutedForeground,
|
|
91
|
+
},
|
|
92
|
+
warning: {
|
|
93
|
+
fontFamily: t.fontFamily,
|
|
94
|
+
fontSize: 13,
|
|
95
|
+
lineHeight: 18,
|
|
96
|
+
paddingLeft: t.space[1],
|
|
97
|
+
color: t.colors.foreground,
|
|
72
98
|
},
|
|
73
|
-
errorLabel: { color: t.colors.destructive },
|
|
74
99
|
}));
|
|
75
100
|
|
|
76
101
|
export function Field({
|
|
77
102
|
label,
|
|
78
103
|
error,
|
|
104
|
+
hint,
|
|
105
|
+
warning,
|
|
79
106
|
leading,
|
|
80
107
|
trailing,
|
|
81
108
|
style,
|
|
@@ -88,6 +115,8 @@ export function Field({
|
|
|
88
115
|
const s = useStyles();
|
|
89
116
|
const [focused, setFocused] = useState(false);
|
|
90
117
|
const icon = { color: t.colors.mutedForeground, size: t.iconSize.md };
|
|
118
|
+
const warn = error ? undefined : warning;
|
|
119
|
+
const note = error ?? warn ?? hint;
|
|
91
120
|
|
|
92
121
|
return (
|
|
93
122
|
<View style={[s.root, style]}>
|
|
@@ -104,6 +133,7 @@ export function Field({
|
|
|
104
133
|
s.frame,
|
|
105
134
|
focused && s.focused,
|
|
106
135
|
!!error && s.invalid,
|
|
136
|
+
!!warn && s.warned,
|
|
107
137
|
!editable && s.disabled,
|
|
108
138
|
]}
|
|
109
139
|
>
|
|
@@ -113,7 +143,7 @@ export function Field({
|
|
|
113
143
|
selectionColor={t.colors.ring}
|
|
114
144
|
maxFontSizeMultiplier={t.maxFontScale}
|
|
115
145
|
accessibilityLabel={label}
|
|
116
|
-
accessibilityHint={
|
|
146
|
+
accessibilityHint={note}
|
|
117
147
|
{...input}
|
|
118
148
|
editable={editable}
|
|
119
149
|
style={s.input}
|
|
@@ -129,8 +159,8 @@ export function Field({
|
|
|
129
159
|
{error ? (
|
|
130
160
|
<AlertGlyph
|
|
131
161
|
filled
|
|
132
|
-
color={t.colors.
|
|
133
|
-
onColor={t.colors.
|
|
162
|
+
color={t.colors.danger}
|
|
163
|
+
onColor={t.colors.dangerForeground}
|
|
134
164
|
size={t.iconSize.md}
|
|
135
165
|
/>
|
|
136
166
|
) : trailing ? (
|
|
@@ -145,6 +175,26 @@ export function Field({
|
|
|
145
175
|
>
|
|
146
176
|
{error}
|
|
147
177
|
</Text>
|
|
178
|
+
) : warn ? (
|
|
179
|
+
<View style={s.noteRow}>
|
|
180
|
+
<AlertGlyph
|
|
181
|
+
filled
|
|
182
|
+
color={t.colors.warning}
|
|
183
|
+
onColor={t.colors.warningForeground}
|
|
184
|
+
size={t.iconSize.sm}
|
|
185
|
+
/>
|
|
186
|
+
<Text
|
|
187
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
188
|
+
accessibilityLiveRegion="polite"
|
|
189
|
+
style={[s.warning, s.grow]}
|
|
190
|
+
>
|
|
191
|
+
{warn}
|
|
192
|
+
</Text>
|
|
193
|
+
</View>
|
|
194
|
+
) : hint ? (
|
|
195
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.hint}>
|
|
196
|
+
{hint}
|
|
197
|
+
</Text>
|
|
148
198
|
) : null}
|
|
149
199
|
</View>
|
|
150
200
|
);
|
|
@@ -15,11 +15,8 @@ export type ListRowProps = Omit<
|
|
|
15
15
|
title: string;
|
|
16
16
|
description?: string;
|
|
17
17
|
leading?: IconSlot;
|
|
18
|
-
/** 오른쪽 내용 (Switch, StatusBadge, 값 텍스트 등) */
|
|
19
18
|
trailing?: IconSlot;
|
|
20
|
-
/** 오른쪽 화살표. 기본은 onPress가 있을 때 true */
|
|
21
19
|
chevron?: boolean;
|
|
22
|
-
/** 제목 줄 수. 기본 1 */
|
|
23
20
|
titleLines?: number;
|
|
24
21
|
};
|
|
25
22
|
|
|
@@ -12,11 +12,8 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
12
12
|
|
|
13
13
|
export type PhotoProps = Omit<ImageProps, 'source' | 'style'> & {
|
|
14
14
|
source: ImageSourcePropType;
|
|
15
|
-
/** 가로 / 세로. 기본 1 */
|
|
16
15
|
aspectRatio?: number;
|
|
17
|
-
/** 기본 radius.md */
|
|
18
16
|
radius?: number;
|
|
19
|
-
/** 불러오지 못했을 때 보여줄 내용 */
|
|
20
17
|
fallback?: ReactNode;
|
|
21
18
|
style?: StyleProp<ViewStyle>;
|
|
22
19
|
};
|
|
@@ -27,9 +24,7 @@ function sourceKey(source: ImageSourcePropType): string {
|
|
|
27
24
|
return (source as { uri?: string }).uri ?? '';
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
/** 로딩 중에는 muted 배경, 실패하면 fallback을 보여주는 이미지 */
|
|
31
27
|
export function Photo(props: PhotoProps) {
|
|
32
|
-
// 주소가 바뀌면 로딩 · 실패 상태를 처음부터 다시 잡는다.
|
|
33
28
|
return <PhotoInner key={sourceKey(props.source)} {...props} />;
|
|
34
29
|
}
|
|
35
30
|
|
|
@@ -3,7 +3,6 @@ import type { TypographyVariant } from '../../types';
|
|
|
3
3
|
import { useTheme } from '../../theme/theme-provider';
|
|
4
4
|
import { makeStyles } from '../../utils/styles';
|
|
5
5
|
|
|
6
|
-
/** 12000 → '12,000원'. 웹 · Jest · 네이티브에서 같은 결과를 내도록 Intl을 쓰지 않는다 */
|
|
7
6
|
export function formatPrice(value: number, unit = '원'): string {
|
|
8
7
|
const n = Math.round(value);
|
|
9
8
|
const digits = String(Math.abs(n)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
@@ -12,9 +11,7 @@ export function formatPrice(value: number, unit = '원'): string {
|
|
|
12
11
|
|
|
13
12
|
export type PriceProps = {
|
|
14
13
|
value: number;
|
|
15
|
-
/** 할인 전 가격. value보다 클 때만 취소선으로 표시한다 */
|
|
16
14
|
originalValue?: number;
|
|
17
|
-
/** 기본 'body' */
|
|
18
15
|
variant?: TypographyVariant;
|
|
19
16
|
unit?: string;
|
|
20
17
|
style?: StyleProp<ViewStyle>;
|
|
@@ -37,7 +34,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
37
34
|
...t.typography.caption,
|
|
38
35
|
fontFamily: t.fontFamily,
|
|
39
36
|
fontWeight: '700',
|
|
40
|
-
color: t.colors.
|
|
37
|
+
color: t.colors.danger,
|
|
41
38
|
},
|
|
42
39
|
}));
|
|
43
40
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProgressBar, type ProgressBarProps } from './progress-bar';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Text, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
3
|
+
import { makeStyles } from '../../utils/styles';
|
|
4
|
+
|
|
5
|
+
export type ProgressBarProps = {
|
|
6
|
+
done: number;
|
|
7
|
+
total: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const useStyles = makeStyles((t) => ({
|
|
13
|
+
root: { gap: t.space[2] },
|
|
14
|
+
head: {
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
alignItems: 'baseline',
|
|
17
|
+
gap: t.space[2],
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
...t.typography.body,
|
|
21
|
+
flex: 1,
|
|
22
|
+
fontFamily: t.fontFamily,
|
|
23
|
+
fontWeight: '600',
|
|
24
|
+
color: t.colors.foreground,
|
|
25
|
+
},
|
|
26
|
+
count: {
|
|
27
|
+
...t.typography.body,
|
|
28
|
+
marginLeft: 'auto',
|
|
29
|
+
fontFamily: t.fontFamily,
|
|
30
|
+
fontVariant: ['tabular-nums'],
|
|
31
|
+
color: t.colors.mutedForeground,
|
|
32
|
+
},
|
|
33
|
+
strong: { fontWeight: '700', color: t.colors.foreground },
|
|
34
|
+
track: {
|
|
35
|
+
height: 6,
|
|
36
|
+
borderRadius: t.radius.full,
|
|
37
|
+
overflow: 'hidden',
|
|
38
|
+
backgroundColor: t.colors.muted,
|
|
39
|
+
},
|
|
40
|
+
fill: {
|
|
41
|
+
height: '100%',
|
|
42
|
+
borderRadius: t.radius.full,
|
|
43
|
+
backgroundColor: t.colors.primary,
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
export function ProgressBar({ done, total, label, style }: ProgressBarProps) {
|
|
48
|
+
const t = useTheme();
|
|
49
|
+
const s = useStyles();
|
|
50
|
+
const max = Math.max(0, total);
|
|
51
|
+
const now = Math.min(Math.max(0, done), max);
|
|
52
|
+
const ratio = max > 0 ? now / max : 0;
|
|
53
|
+
return (
|
|
54
|
+
<View
|
|
55
|
+
accessible
|
|
56
|
+
accessibilityRole="progressbar"
|
|
57
|
+
accessibilityLabel={`${label ? `${label}, ` : ''}${max}건 중 ${now}건`}
|
|
58
|
+
accessibilityValue={{ min: 0, max, now }}
|
|
59
|
+
style={[s.root, style]}
|
|
60
|
+
>
|
|
61
|
+
<View style={s.head}>
|
|
62
|
+
{label ? (
|
|
63
|
+
<Text
|
|
64
|
+
numberOfLines={2}
|
|
65
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
66
|
+
style={s.label}
|
|
67
|
+
>
|
|
68
|
+
{label}
|
|
69
|
+
</Text>
|
|
70
|
+
) : null}
|
|
71
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.count}>
|
|
72
|
+
<Text style={s.strong}>{now}</Text>/{max}
|
|
73
|
+
</Text>
|
|
74
|
+
</View>
|
|
75
|
+
<View style={s.track}>
|
|
76
|
+
<View style={[s.fill, { width: `${ratio * 100}%` }]} />
|
|
77
|
+
</View>
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -6,7 +6,6 @@ import { makeStyles } from '../../utils/styles';
|
|
|
6
6
|
export type SegmentedTabsItem<T extends string> = { value: T; label: string };
|
|
7
7
|
|
|
8
8
|
export type SegmentedTabsProps<T extends string> = {
|
|
9
|
-
/** 2~4개 */
|
|
10
9
|
items: readonly SegmentedTabsItem<T>[];
|
|
11
10
|
value: T;
|
|
12
11
|
onValueChange: (value: T) => void;
|
|
@@ -18,11 +18,8 @@ export type SheetProps = {
|
|
|
18
18
|
open: boolean;
|
|
19
19
|
onOpenChange: (open: boolean) => void;
|
|
20
20
|
title?: string;
|
|
21
|
-
/** 하단 안전 영역 높이. 앱의 safe-area 값을 넘긴다 */
|
|
22
21
|
bottomInset?: number;
|
|
23
|
-
/** false면 배경을 눌러도 닫히지 않는다. 기본 true */
|
|
24
22
|
dismissible?: boolean;
|
|
25
|
-
/** 배경 닫기 버튼의 접근성 라벨. 기본 '닫기' */
|
|
26
23
|
closeLabel?: string;
|
|
27
24
|
children: ReactNode;
|
|
28
25
|
style?: StyleProp<ViewStyle>;
|
|
@@ -10,16 +10,12 @@ import { useReducedMotion } from '../../internal/use-reduced-motion';
|
|
|
10
10
|
import { useTheme } from '../../theme/theme-provider';
|
|
11
11
|
|
|
12
12
|
export type SkeletonProps = {
|
|
13
|
-
/** 기본 '100%' */
|
|
14
13
|
width?: DimensionValue;
|
|
15
|
-
/** 기본 16 */
|
|
16
14
|
height?: DimensionValue;
|
|
17
|
-
/** 기본 radius.sm */
|
|
18
15
|
radius?: number;
|
|
19
16
|
style?: StyleProp<ViewStyle>;
|
|
20
17
|
};
|
|
21
18
|
|
|
22
|
-
/** 불러오는 중인 자리. '동작 줄이기'가 켜져 있으면 깜빡이지 않는다 */
|
|
23
19
|
export function Skeleton({
|
|
24
20
|
width = '100%',
|
|
25
21
|
height = 16,
|
|
@@ -3,10 +3,9 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
3
3
|
import { makeStyles } from '../../utils/styles';
|
|
4
4
|
|
|
5
5
|
export type StatusBadgeTone =
|
|
6
|
-
'neutral' | 'info' | 'success' | 'warning' | '
|
|
6
|
+
'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
7
7
|
|
|
8
8
|
export type StatusBadgeProps = {
|
|
9
|
-
/** 기본 'neutral' */
|
|
10
9
|
tone?: StatusBadgeTone;
|
|
11
10
|
children: string;
|
|
12
11
|
style?: StyleProp<ViewStyle>;
|
|
@@ -38,7 +37,7 @@ export function StatusBadge({
|
|
|
38
37
|
info: [t.colors.info, t.colors.infoForeground],
|
|
39
38
|
success: [t.colors.success, t.colors.successForeground],
|
|
40
39
|
warning: [t.colors.warning, t.colors.warningForeground],
|
|
41
|
-
|
|
40
|
+
danger: [t.colors.danger, t.colors.dangerForeground],
|
|
42
41
|
}[tone];
|
|
43
42
|
return (
|
|
44
43
|
<View style={[s.base, { backgroundColor: bg }, style]}>
|
|
@@ -13,11 +13,13 @@ export type SwitchProps = Omit<RNSwitchProps, 'value' | 'onValueChange'> & {
|
|
|
13
13
|
|
|
14
14
|
export function Switch({ disabled, style, ...rest }: SwitchProps) {
|
|
15
15
|
const t = useTheme();
|
|
16
|
+
const offThumb =
|
|
17
|
+
t.scheme === 'dark' ? t.colors.mutedForeground : t.colors.background;
|
|
16
18
|
return (
|
|
17
19
|
<RNSwitch
|
|
18
|
-
trackColor={{ false: t.colors.
|
|
19
|
-
thumbColor={t.colors.
|
|
20
|
-
ios_backgroundColor={t.colors.
|
|
20
|
+
trackColor={{ false: t.colors.input, true: t.colors.primary }}
|
|
21
|
+
thumbColor={rest.value ? t.colors.primaryForeground : offThumb}
|
|
22
|
+
ios_backgroundColor={t.colors.input}
|
|
21
23
|
{...rest}
|
|
22
24
|
disabled={disabled}
|
|
23
25
|
style={[disabled && { opacity: t.opacity.disabled }, style]}
|
|
@@ -4,15 +4,12 @@ import type { TypographyVariant } from '../../types';
|
|
|
4
4
|
import { useTheme } from '../../theme/theme-provider';
|
|
5
5
|
import { makeStyles } from '../../utils/styles';
|
|
6
6
|
|
|
7
|
-
export type TextTone = 'default' | 'muted' | '
|
|
7
|
+
export type TextTone = 'default' | 'muted' | 'danger' | 'success';
|
|
8
8
|
|
|
9
9
|
export type TextProps = RNTextProps & {
|
|
10
10
|
ref?: Ref<ComponentRef<typeof RNText>>;
|
|
11
|
-
/** 기본 'body' */
|
|
12
11
|
variant?: TypographyVariant;
|
|
13
|
-
/** 기본 'default' */
|
|
14
12
|
tone?: TextTone;
|
|
15
|
-
/** 지정하지 않으면 variant의 굵기 */
|
|
16
13
|
weight?: TextWeight;
|
|
17
14
|
};
|
|
18
15
|
|
|
@@ -26,7 +23,7 @@ const useStyles = makeStyles((t) => ({
|
|
|
26
23
|
display: t.typography.display,
|
|
27
24
|
default: { color: t.colors.foreground },
|
|
28
25
|
muted: { color: t.colors.mutedForeground },
|
|
29
|
-
|
|
26
|
+
danger: { color: t.colors.danger },
|
|
30
27
|
success: { color: t.colors.success },
|
|
31
28
|
font: { fontFamily: t.fontFamily },
|
|
32
29
|
regular: { fontWeight: '400' },
|
|
@@ -21,15 +21,12 @@ import { useReducedMotion } from '../../internal/use-reduced-motion';
|
|
|
21
21
|
import { useTheme } from '../../theme/theme-provider';
|
|
22
22
|
import { makeStyles } from '../../utils/styles';
|
|
23
23
|
|
|
24
|
-
export type ToastTone = 'neutral' | 'success' | '
|
|
24
|
+
export type ToastTone = 'neutral' | 'success' | 'danger';
|
|
25
25
|
|
|
26
26
|
export type ToastOptions = {
|
|
27
27
|
message: string;
|
|
28
|
-
/** 기본 'neutral' */
|
|
29
28
|
tone?: ToastTone;
|
|
30
|
-
/** ms. 기본 2500, action이 있으면 4000 */
|
|
31
29
|
duration?: number;
|
|
32
|
-
/** 메시지 오른쪽 텍스트 버튼 (예: 실행 취소). 누르면 Toast가 닫힌다 */
|
|
33
30
|
action?: ToastAction;
|
|
34
31
|
};
|
|
35
32
|
|
|
@@ -42,7 +39,6 @@ type Current = {
|
|
|
42
39
|
action?: ToastAction;
|
|
43
40
|
};
|
|
44
41
|
|
|
45
|
-
/** Provider 하나가 가진 상태. show를 불러도 Provider 아래 화면은 다시 렌더링되지 않는다. */
|
|
46
42
|
function createToastStore() {
|
|
47
43
|
let current: Current | null = null;
|
|
48
44
|
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
@@ -66,7 +62,6 @@ function createToastStore() {
|
|
|
66
62
|
};
|
|
67
63
|
},
|
|
68
64
|
getCurrent: () => current,
|
|
69
|
-
/** 가장 나중에 붙은 host(가장 위의 Modal)만 그린다 */
|
|
70
65
|
getTopHost: () => hosts[hosts.length - 1],
|
|
71
66
|
addHost(id: string) {
|
|
72
67
|
hosts = [...hosts, id];
|
|
@@ -93,7 +88,6 @@ type ToastStore = ReturnType<typeof createToastStore>;
|
|
|
93
88
|
const StoreContext = createContext<ToastStore | null>(null);
|
|
94
89
|
|
|
95
90
|
export type ToastProviderProps = {
|
|
96
|
-
/** 하단 안전 영역 높이. 앱의 safe-area 값을 넘긴다 */
|
|
97
91
|
bottomInset?: number;
|
|
98
92
|
children: ReactNode;
|
|
99
93
|
};
|
|
@@ -152,10 +146,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
152
146
|
},
|
|
153
147
|
}));
|
|
154
148
|
|
|
155
|
-
/**
|
|
156
|
-
* Toast를 그리는 자리. Provider가 하나 두고, Modal을 쓰는 컴포넌트(Sheet · Dialog)가
|
|
157
|
-
* Modal 안에 하나씩 더 둔다. 가장 위의 host만 그린다.
|
|
158
|
-
*/
|
|
159
149
|
export function ToastHost() {
|
|
160
150
|
const store = useContext(StoreContext);
|
|
161
151
|
return store ? <ToastHostInner store={store} /> : null;
|
|
@@ -193,9 +183,8 @@ function ToastHostInner({ store }: { store: ToastStore }) {
|
|
|
193
183
|
const [bg, fg] = {
|
|
194
184
|
neutral: [t.colors.foreground, t.colors.background],
|
|
195
185
|
success: [t.colors.success, t.colors.successForeground],
|
|
196
|
-
|
|
186
|
+
danger: [t.colors.danger, t.colors.dangerForeground],
|
|
197
187
|
}[current.tone];
|
|
198
|
-
// 어두운 바탕(light) 위에서는 밝은 파랑, 밝은 바탕(dark) 위에서는 진한 파랑
|
|
199
188
|
const actionColor =
|
|
200
189
|
current.tone !== 'neutral'
|
|
201
190
|
? fg
|
|
@@ -3,9 +3,7 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
3
3
|
import { makeStyles } from '../../utils/styles';
|
|
4
4
|
|
|
5
5
|
export type WizardStepsProps = {
|
|
6
|
-
/** 단계 이름 */
|
|
7
6
|
steps: readonly string[];
|
|
8
|
-
/** 지금 단계 (0부터) */
|
|
9
7
|
current: number;
|
|
10
8
|
style?: StyleProp<ViewStyle>;
|
|
11
9
|
};
|
|
@@ -28,7 +26,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
28
26
|
name: { color: t.colors.foreground, fontWeight: '600' },
|
|
29
27
|
}));
|
|
30
28
|
|
|
31
|
-
/** 여러 단계로 나뉜 입력 흐름의 진행 표시 */
|
|
32
29
|
export function WizardSteps({ steps, current, style }: WizardStepsProps) {
|
|
33
30
|
const t = useTheme();
|
|
34
31
|
const s = useStyles();
|
package/src/index.tsx
CHANGED
|
@@ -32,6 +32,7 @@ export * from './components/field';
|
|
|
32
32
|
export * from './components/list-row';
|
|
33
33
|
export * from './components/photo';
|
|
34
34
|
export * from './components/price';
|
|
35
|
+
export * from './components/progress-bar';
|
|
35
36
|
export * from './components/search-field';
|
|
36
37
|
export * from './components/segmented-tabs';
|
|
37
38
|
export * from './components/sheet';
|
package/src/internal/glyphs.tsx
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
2
|
import type { IconRenderProps } from './icon';
|
|
3
3
|
|
|
4
|
-
// svg 없이 그리는 최소 아이콘. 아이콘 세트는 앱이 슬롯으로 넣는다.
|
|
5
|
-
|
|
6
4
|
export function SearchGlyph({ color, size }: IconRenderProps) {
|
|
7
5
|
const ring = size * 0.62;
|
|
8
6
|
const stroke = Math.max(1.5, size / 10);
|
|
@@ -97,7 +95,6 @@ export function ChevronGlyph({ color, size }: IconRenderProps) {
|
|
|
97
95
|
);
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
/** filled면 원을 칠하고 느낌표를 onColor로 그린다 */
|
|
101
98
|
export function AlertGlyph({
|
|
102
99
|
color,
|
|
103
100
|
size,
|
package/src/internal/icon.tsx
CHANGED
|
@@ -2,7 +2,6 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export type IconRenderProps = { color: string; size: number };
|
|
4
4
|
|
|
5
|
-
/** 아이콘 자리. 함수로 넘기면 컴포넌트의 글자색과 크기를 받는다. */
|
|
6
5
|
export type IconSlot = ReactNode | ((props: IconRenderProps) => ReactNode);
|
|
7
6
|
|
|
8
7
|
export function renderIcon(slot: IconSlot, props: IconRenderProps): ReactNode {
|
package/src/internal/overlay.tsx
CHANGED
|
@@ -5,10 +5,6 @@ import { useReducedMotion } from './use-reduced-motion';
|
|
|
5
5
|
|
|
6
6
|
export const useNativeDriver = Platform.OS !== 'web';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Modal 위 패널의 열림 · 닫힘 전환. 닫힘 애니메이션이 끝난 뒤 mounted가 false가 된다.
|
|
10
|
-
* progress는 0(닫힘) → 1(열림).
|
|
11
|
-
*/
|
|
12
8
|
export function useOverlayTransition(open: boolean) {
|
|
13
9
|
const t = useTheme();
|
|
14
10
|
const reduced = useReducedMotion();
|
|
@@ -10,13 +10,10 @@ import { useTheme } from '../theme/theme-provider';
|
|
|
10
10
|
export type PressableBaseProps = Omit<PressableProps, 'style'> & {
|
|
11
11
|
ref?: Ref<ComponentRef<typeof Pressable>>;
|
|
12
12
|
style?: StyleProp<ViewStyle>;
|
|
13
|
-
/** 눌렸을 때 추가 스타일. 기본은 opacity.pressed */
|
|
14
13
|
pressedStyle?: StyleProp<ViewStyle>;
|
|
15
|
-
/** 눈에 보이는 높이. 최소 터치 크기보다 작으면 hitSlop으로 보완한다 */
|
|
16
14
|
touchHeight?: number;
|
|
17
15
|
};
|
|
18
16
|
|
|
19
|
-
/** 눌림 · 비활성 · 접근성 상태 · 최소 터치 영역을 한곳에서 처리하는 Pressable */
|
|
20
17
|
export function PressableBase({
|
|
21
18
|
style,
|
|
22
19
|
pressedStyle,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useSyncExternalStore } from 'react';
|
|
2
2
|
import { AccessibilityInfo } from 'react-native';
|
|
3
3
|
|
|
4
|
-
// 앱 전체에서 구독 하나를 공유한다.
|
|
5
4
|
let reduced = false;
|
|
6
5
|
let started = false;
|
|
7
6
|
const listeners = new Set<() => void>();
|
|
@@ -26,7 +25,6 @@ function subscribe(listener: () => void) {
|
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
/** 기기의 '동작 줄이기' 설정 */
|
|
30
28
|
export function useReducedMotion(): boolean {
|
|
31
29
|
return useSyncExternalStore(subscribe, () => reduced);
|
|
32
30
|
}
|
package/src/sortable/move.ts
CHANGED
|
@@ -10,26 +10,15 @@ export type SortableGridProps<T> = {
|
|
|
10
10
|
data: readonly T[];
|
|
11
11
|
keyExtractor: (item: T) => string;
|
|
12
12
|
renderItem: (info: { item: T; index: number }) => ReactNode;
|
|
13
|
-
/** 순서가 바뀐 새 배열 */
|
|
14
13
|
onDataChange: (data: T[], change: SortableChange) => void;
|
|
15
|
-
/** 기본 3 */
|
|
16
14
|
columns?: number;
|
|
17
|
-
/** 항목 사이 간격. 기본 space[2] */
|
|
18
15
|
gap?: number;
|
|
19
|
-
/** true면 SortableHandle을 눌러야만 끈다 */
|
|
20
16
|
handle?: boolean;
|
|
21
|
-
/** false면 끌 수 없다. 기본 true */
|
|
22
17
|
enabled?: boolean;
|
|
23
|
-
/** 항목의 접근성 라벨. 넘기면 앞으로 · 뒤로 이동 동작을 제공한다 */
|
|
24
18
|
itemLabel?: (item: T) => string;
|
|
25
|
-
/** 접근성 동작 이름. 기본 ['앞으로 이동', '뒤로 이동'] */
|
|
26
19
|
moveLabels?: [string, string];
|
|
27
20
|
};
|
|
28
21
|
|
|
29
|
-
/**
|
|
30
|
-
* 길게 눌러 순서를 바꾸는 격자. 앱 최상단이 GestureHandlerRootView로 감싸져 있어야 한다.
|
|
31
|
-
* columns={1}이면 세로 목록이다.
|
|
32
|
-
*/
|
|
33
22
|
export function SortableGrid<T>({
|
|
34
23
|
data,
|
|
35
24
|
keyExtractor,
|
|
@@ -91,7 +80,6 @@ export function SortableGrid<T>({
|
|
|
91
80
|
);
|
|
92
81
|
}
|
|
93
82
|
|
|
94
|
-
/** handle을 켠 SortableGrid · SortableList 안에서 끄는 손잡이 */
|
|
95
83
|
export function SortableHandle({ children }: { children: ReactNode }) {
|
|
96
84
|
return <Sortable.Handle>{children}</Sortable.Handle>;
|
|
97
85
|
}
|
|
@@ -2,7 +2,6 @@ import { SortableGrid, type SortableGridProps } from './sortable-grid';
|
|
|
2
2
|
|
|
3
3
|
export type SortableListProps<T> = Omit<SortableGridProps<T>, 'columns'>;
|
|
4
4
|
|
|
5
|
-
/** 길게 눌러 순서를 바꾸는 세로 목록. 앱 최상단이 GestureHandlerRootView로 감싸져 있어야 한다 */
|
|
6
5
|
export function SortableList<T>({
|
|
7
6
|
moveLabels = ['위로 이동', '아래로 이동'],
|
|
8
7
|
...props
|