@ezpg/app-ui 0.0.0-stage → 0.1.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 +7 -0
- package/LICENSE +20 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js +90 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -0
- package/lib/module/blocks/brand-profile-card/index.js +4 -0
- package/lib/module/blocks/brand-profile-card/index.js.map +1 -0
- package/lib/module/blocks/claim-row/claim-row.js +107 -0
- package/lib/module/blocks/claim-row/claim-row.js.map +1 -0
- package/lib/module/blocks/claim-row/index.js +4 -0
- package/lib/module/blocks/claim-row/index.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +124 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/index.js +4 -0
- package/lib/module/blocks/color-swatch-picker/index.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +142 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/index.js +4 -0
- package/lib/module/blocks/copy-variant-picker/index.js.map +1 -0
- package/lib/module/blocks/credit-wallet/credit-wallet.js +123 -0
- package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -0
- package/lib/module/blocks/credit-wallet/index.js +4 -0
- package/lib/module/blocks/credit-wallet/index.js.map +1 -0
- package/lib/module/blocks/image-grid/image-grid.js +273 -0
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -0
- package/lib/module/blocks/image-grid/index.js +4 -0
- package/lib/module/blocks/image-grid/index.js.map +1 -0
- package/lib/module/blocks/index.js +22 -0
- package/lib/module/blocks/index.js.map +1 -0
- package/lib/module/blocks/internal/card.js +41 -0
- package/lib/module/blocks/internal/card.js.map +1 -0
- package/lib/module/blocks/internal/format.js +25 -0
- package/lib/module/blocks/internal/format.js.map +1 -0
- package/lib/module/blocks/invoice-row/index.js +4 -0
- package/lib/module/blocks/invoice-row/index.js.map +1 -0
- package/lib/module/blocks/invoice-row/invoice-row.js +101 -0
- package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -0
- package/lib/module/blocks/logo-candidate-grid/index.js +4 -0
- package/lib/module/blocks/logo-candidate-grid/index.js.map +1 -0
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +117 -0
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/index.js +4 -0
- package/lib/module/blocks/oauth-buttons/index.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +102 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -0
- package/lib/module/blocks/option-editor/index.js +4 -0
- package/lib/module/blocks/option-editor/index.js.map +1 -0
- package/lib/module/blocks/option-editor/option-editor.js +133 -0
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -0
- package/lib/module/blocks/order-card/index.js +4 -0
- package/lib/module/blocks/order-card/index.js.map +1 -0
- package/lib/module/blocks/order-card/order-card.js +156 -0
- package/lib/module/blocks/order-card/order-card.js.map +1 -0
- package/lib/module/blocks/plan-card/index.js +4 -0
- package/lib/module/blocks/plan-card/index.js.map +1 -0
- package/lib/module/blocks/plan-card/plan-card.js +134 -0
- package/lib/module/blocks/plan-card/plan-card.js.map +1 -0
- package/lib/module/blocks/product-list-empty/index.js +4 -0
- package/lib/module/blocks/product-list-empty/index.js.map +1 -0
- package/lib/module/blocks/product-list-empty/product-list-empty.js +155 -0
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -0
- package/lib/module/blocks/review-row/index.js +4 -0
- package/lib/module/blocks/review-row/index.js.map +1 -0
- package/lib/module/blocks/review-row/review-row.js +284 -0
- package/lib/module/blocks/review-row/review-row.js.map +1 -0
- package/lib/module/blocks/sales-chart/index.js +4 -0
- package/lib/module/blocks/sales-chart/index.js.map +1 -0
- package/lib/module/blocks/sales-chart/sales-chart.js +126 -0
- package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -0
- package/lib/module/blocks/service-state-banner/index.js +4 -0
- package/lib/module/blocks/service-state-banner/index.js.map +1 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js +64 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -0
- package/lib/module/blocks/shipping-tracking-row/index.js +4 -0
- package/lib/module/blocks/shipping-tracking-row/index.js.map +1 -0
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +116 -0
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/index.js +4 -0
- package/lib/module/blocks/site-preview-frame/index.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +111 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -0
- package/lib/module/blocks/stat-card/index.js +4 -0
- package/lib/module/blocks/stat-card/index.js.map +1 -0
- package/lib/module/blocks/stat-card/stat-card.js +71 -0
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -0
- package/lib/module/blocks/step-screen/index.js +4 -0
- package/lib/module/blocks/step-screen/index.js.map +1 -0
- package/lib/module/blocks/step-screen/step-screen.js +134 -0
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -0
- package/lib/module/blocks/supply-item-card/index.js +4 -0
- package/lib/module/blocks/supply-item-card/index.js.map +1 -0
- package/lib/module/blocks/supply-item-card/supply-item-card.js +151 -0
- package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -0
- package/lib/module/charts/index.js +5 -0
- package/lib/module/charts/index.js.map +1 -0
- package/lib/module/charts/line-chart.js +115 -0
- package/lib/module/charts/line-chart.js.map +1 -0
- package/lib/module/charts/scale.js +45 -0
- package/lib/module/charts/scale.js.map +1 -0
- package/lib/module/charts/sparkline.js +50 -0
- package/lib/module/charts/sparkline.js.map +1 -0
- package/lib/module/charts/summary.js +11 -0
- package/lib/module/charts/summary.js.map +1 -0
- package/lib/module/charts.js +5 -0
- package/lib/module/charts.js.map +1 -0
- package/lib/module/components/button/button.js +122 -0
- package/lib/module/components/button/button.js.map +1 -0
- package/lib/module/components/button/index.js +4 -0
- package/lib/module/components/button/index.js.map +1 -0
- package/lib/module/components/checkbox/checkbox.js +72 -0
- package/lib/module/components/checkbox/checkbox.js.map +1 -0
- package/lib/module/components/checkbox/index.js +4 -0
- package/lib/module/components/checkbox/index.js.map +1 -0
- package/lib/module/components/chip/chip.js +68 -0
- package/lib/module/components/chip/chip.js.map +1 -0
- package/lib/module/components/chip/index.js +4 -0
- package/lib/module/components/chip/index.js.map +1 -0
- package/lib/module/components/chip-group/chip-group.js +55 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -0
- package/lib/module/components/chip-group/index.js +4 -0
- package/lib/module/components/chip-group/index.js.map +1 -0
- package/lib/module/components/dialog/dialog.js +118 -0
- package/lib/module/components/dialog/dialog.js.map +1 -0
- package/lib/module/components/dialog/index.js +4 -0
- package/lib/module/components/dialog/index.js.map +1 -0
- package/lib/module/components/divider/divider.js +21 -0
- package/lib/module/components/divider/divider.js.map +1 -0
- package/lib/module/components/divider/index.js +4 -0
- package/lib/module/components/divider/index.js.map +1 -0
- package/lib/module/components/empty-state/empty-state.js +126 -0
- package/lib/module/components/empty-state/empty-state.js.map +1 -0
- package/lib/module/components/empty-state/index.js +4 -0
- package/lib/module/components/empty-state/index.js.map +1 -0
- package/lib/module/components/field/field.js +123 -0
- package/lib/module/components/field/field.js.map +1 -0
- package/lib/module/components/field/index.js +4 -0
- package/lib/module/components/field/index.js.map +1 -0
- package/lib/module/components/list-row/index.js +4 -0
- package/lib/module/components/list-row/index.js.map +1 -0
- package/lib/module/components/list-row/list-row.js +97 -0
- package/lib/module/components/list-row/list-row.js.map +1 -0
- package/lib/module/components/photo/index.js +4 -0
- package/lib/module/components/photo/index.js.map +1 -0
- package/lib/module/components/photo/photo.js +68 -0
- package/lib/module/components/photo/photo.js.map +1 -0
- package/lib/module/components/price/index.js +4 -0
- package/lib/module/components/price/index.js.map +1 -0
- package/lib/module/components/price/price.js +72 -0
- package/lib/module/components/price/price.js.map +1 -0
- package/lib/module/components/search-field/index.js +4 -0
- package/lib/module/components/search-field/index.js.map +1 -0
- package/lib/module/components/search-field/search-field.js +35 -0
- package/lib/module/components/search-field/search-field.js.map +1 -0
- package/lib/module/components/segmented-tabs/index.js +4 -0
- package/lib/module/components/segmented-tabs/index.js.map +1 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js +74 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -0
- package/lib/module/components/sheet/index.js +4 -0
- package/lib/module/components/sheet/index.js.map +1 -0
- package/lib/module/components/sheet/sheet.js +97 -0
- package/lib/module/components/sheet/sheet.js.map +1 -0
- package/lib/module/components/skeleton/index.js +4 -0
- package/lib/module/components/skeleton/index.js.map +1 -0
- package/lib/module/components/skeleton/skeleton.js +49 -0
- package/lib/module/components/skeleton/skeleton.js.map +1 -0
- package/lib/module/components/status-badge/index.js +4 -0
- package/lib/module/components/status-badge/index.js.map +1 -0
- package/lib/module/components/status-badge/status-badge.js +48 -0
- package/lib/module/components/status-badge/status-badge.js.map +1 -0
- package/lib/module/components/switch/index.js +4 -0
- package/lib/module/components/switch/index.js.map +1 -0
- package/lib/module/components/switch/switch.js +26 -0
- package/lib/module/components/switch/switch.js.map +1 -0
- package/lib/module/components/text/index.js +4 -0
- package/lib/module/components/text/index.js.map +1 -0
- package/lib/module/components/text/text.js +56 -0
- package/lib/module/components/text/text.js.map +1 -0
- package/lib/module/components/toast/index.js +4 -0
- package/lib/module/components/toast/index.js.map +1 -0
- package/lib/module/components/toast/toast.js +203 -0
- package/lib/module/components/toast/toast.js.map +1 -0
- package/lib/module/components/wizard-steps/index.js +4 -0
- package/lib/module/components/wizard-steps/index.js.map +1 -0
- package/lib/module/components/wizard-steps/wizard-steps.js +69 -0
- package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -0
- package/lib/module/index.js +31 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/glyphs.js +200 -0
- package/lib/module/internal/glyphs.js.map +1 -0
- package/lib/module/internal/icon.js +8 -0
- package/lib/module/internal/icon.js.map +1 -0
- package/lib/module/internal/overlay.js +60 -0
- package/lib/module/internal/overlay.js.map +1 -0
- package/lib/module/internal/pressable-base.js +40 -0
- package/lib/module/internal/pressable-base.js.map +1 -0
- package/lib/module/internal/use-reduced-motion.js +31 -0
- package/lib/module/internal/use-reduced-motion.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/sortable/index.js +6 -0
- package/lib/module/sortable/index.js.map +1 -0
- package/lib/module/sortable/move.js +11 -0
- package/lib/module/sortable/move.js.map +1 -0
- package/lib/module/sortable/sortable-grid.js +86 -0
- package/lib/module/sortable/sortable-grid.js.map +1 -0
- package/lib/module/sortable/sortable-list.js +16 -0
- package/lib/module/sortable/sortable-list.js.map +1 -0
- package/lib/module/sortable.js +6 -0
- package/lib/module/sortable.js.map +1 -0
- package/lib/module/theme/create-theme.js +56 -0
- package/lib/module/theme/create-theme.js.map +1 -0
- package/lib/module/theme/theme-provider.js +26 -0
- package/lib/module/theme/theme-provider.js.map +1 -0
- package/lib/module/theme/tokens.js +123 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/utils/color.js +30 -0
- package/lib/module/utils/color.js.map +1 -0
- package/lib/module/utils/styles.js +22 -0
- package/lib/module/utils/styles.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +15 -0
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/brand-profile-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/brand-profile-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts +22 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +16 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/index.d.ts +2 -0
- package/lib/typescript/src/blocks/color-swatch-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +22 -0
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -0
- package/lib/typescript/src/blocks/copy-variant-picker/index.d.ts +2 -0
- package/lib/typescript/src/blocks/copy-variant-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +14 -0
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -0
- package/lib/typescript/src/blocks/credit-wallet/index.d.ts +2 -0
- package/lib/typescript/src/blocks/credit-wallet/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts +24 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/image-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/index.d.ts +20 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/internal/card.d.ts +10 -0
- package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/internal/format.d.ts +7 -0
- package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invoice-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/invoice-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +22 -0
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +17 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts +2 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +20 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -0
- package/lib/typescript/src/blocks/option-editor/index.d.ts +2 -0
- package/lib/typescript/src/blocks/option-editor/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +20 -0
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -0
- package/lib/typescript/src/blocks/order-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/order-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts +44 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/plan-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/plan-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +36 -0
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-list-empty/index.d.ts +2 -0
- package/lib/typescript/src/blocks/product-list-empty/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +21 -0
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -0
- package/lib/typescript/src/blocks/review-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/review-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/review-row/review-row.d.ts +34 -0
- package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/sales-chart/index.d.ts +2 -0
- package/lib/typescript/src/blocks/sales-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +20 -0
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/index.d.ts +2 -0
- package/lib/typescript/src/blocks/service-state-banner/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts +13 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +12 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-preview-frame/index.d.ts +2 -0
- package/lib/typescript/src/blocks/site-preview-frame/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +18 -0
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/stat-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +17 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/step-screen/index.d.ts +2 -0
- package/lib/typescript/src/blocks/step-screen/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +26 -0
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -0
- package/lib/typescript/src/blocks/supply-item-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/supply-item-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +30 -0
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -0
- package/lib/typescript/src/charts/index.d.ts +3 -0
- package/lib/typescript/src/charts/index.d.ts.map +1 -0
- package/lib/typescript/src/charts/line-chart.d.ts +21 -0
- package/lib/typescript/src/charts/line-chart.d.ts.map +1 -0
- package/lib/typescript/src/charts/scale.d.ts +13 -0
- package/lib/typescript/src/charts/scale.d.ts.map +1 -0
- package/lib/typescript/src/charts/sparkline.d.ts +15 -0
- package/lib/typescript/src/charts/sparkline.d.ts.map +1 -0
- package/lib/typescript/src/charts/summary.d.ts +3 -0
- package/lib/typescript/src/charts/summary.d.ts.map +1 -0
- package/lib/typescript/src/charts.d.ts +3 -0
- package/lib/typescript/src/charts.d.ts.map +1 -0
- package/lib/typescript/src/components/button/button.d.ts +18 -0
- package/lib/typescript/src/components/button/button.d.ts.map +1 -0
- package/lib/typescript/src/components/button/index.d.ts +2 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox/checkbox.d.ts +8 -0
- package/lib/typescript/src/components/checkbox/checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox/index.d.ts +2 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/chip.d.ts +9 -0
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/index.d.ts +2 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +27 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -0
- package/lib/typescript/src/components/chip-group/index.d.ts +2 -0
- package/lib/typescript/src/components/chip-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/dialog.d.ts +20 -0
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/index.d.ts +2 -0
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/divider.d.ts +9 -0
- package/lib/typescript/src/components/divider/divider.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/index.d.ts +2 -0
- package/lib/typescript/src/components/divider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts +26 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/index.d.ts +2 -0
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/src/components/field/field.d.ts +15 -0
- package/lib/typescript/src/components/field/field.d.ts.map +1 -0
- package/lib/typescript/src/components/field/index.d.ts +2 -0
- package/lib/typescript/src/components/field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/index.d.ts +2 -0
- package/lib/typescript/src/components/list-row/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts +15 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/index.d.ts +2 -0
- package/lib/typescript/src/components/photo/index.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/photo.d.ts +15 -0
- package/lib/typescript/src/components/photo/photo.d.ts.map +1 -0
- package/lib/typescript/src/components/price/index.d.ts +2 -0
- package/lib/typescript/src/components/price/index.d.ts.map +1 -0
- package/lib/typescript/src/components/price/price.d.ts +15 -0
- package/lib/typescript/src/components/price/price.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/index.d.ts +2 -0
- package/lib/typescript/src/components/search-field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts +9 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -0
- package/lib/typescript/src/components/segmented-tabs/index.d.ts +2 -0
- package/lib/typescript/src/components/segmented-tabs/index.d.ts.map +1 -0
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +14 -0
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/index.d.ts +2 -0
- package/lib/typescript/src/components/sheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts +17 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/index.d.ts +2 -0
- package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +13 -0
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/status-badge/index.d.ts +2 -0
- package/lib/typescript/src/components/status-badge/index.d.ts.map +1 -0
- package/lib/typescript/src/components/status-badge/status-badge.d.ts +10 -0
- package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/index.d.ts +2 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/switch.d.ts +9 -0
- package/lib/typescript/src/components/switch/switch.d.ts.map +1 -0
- package/lib/typescript/src/components/text/index.d.ts +2 -0
- package/lib/typescript/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/text/text.d.ts +16 -0
- package/lib/typescript/src/components/text/text.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/index.d.ts +2 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/toast.d.ts +30 -0
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -0
- package/lib/typescript/src/components/wizard-steps/index.d.ts +2 -0
- package/lib/typescript/src/components/wizard-steps/index.d.ts.map +1 -0
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +11 -0
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +31 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/internal/glyphs.d.ts +12 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -0
- package/lib/typescript/src/internal/icon.d.ts +9 -0
- package/lib/typescript/src/internal/icon.d.ts.map +1 -0
- package/lib/typescript/src/internal/overlay.d.ts +16 -0
- package/lib/typescript/src/internal/overlay.d.ts.map +1 -0
- package/lib/typescript/src/internal/pressable-base.d.ts +13 -0
- package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -0
- package/lib/typescript/src/internal/use-reduced-motion.d.ts +3 -0
- package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -0
- package/lib/typescript/src/sortable/index.d.ts +4 -0
- package/lib/typescript/src/sortable/index.d.ts.map +1 -0
- package/lib/typescript/src/sortable/move.d.ts +3 -0
- package/lib/typescript/src/sortable/move.d.ts.map +1 -0
- package/lib/typescript/src/sortable/sortable-grid.d.ts +37 -0
- package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -0
- package/lib/typescript/src/sortable/sortable-list.d.ts +5 -0
- package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -0
- package/lib/typescript/src/sortable.d.ts +4 -0
- package/lib/typescript/src/sortable.d.ts.map +1 -0
- package/lib/typescript/src/theme/create-theme.d.ts +8 -0
- package/lib/typescript/src/theme/create-theme.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme-provider.d.ts +13 -0
- package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens.d.ts +4 -0
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +90 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/color.d.ts +5 -0
- package/lib/typescript/src/utils/color.d.ts.map +1 -0
- package/lib/typescript/src/utils/styles.d.ts +13 -0
- package/lib/typescript/src/utils/styles.d.ts.map +1 -0
- package/package.json +109 -3
- package/src/blocks/brand-profile-card/brand-profile-card.tsx +87 -0
- package/src/blocks/brand-profile-card/index.ts +4 -0
- package/src/blocks/claim-row/claim-row.tsx +112 -0
- package/src/blocks/claim-row/index.ts +6 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +119 -0
- package/src/blocks/color-swatch-picker/index.ts +5 -0
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +140 -0
- package/src/blocks/copy-variant-picker/index.ts +5 -0
- package/src/blocks/credit-wallet/credit-wallet.tsx +105 -0
- package/src/blocks/credit-wallet/index.ts +1 -0
- package/src/blocks/image-grid/image-grid.tsx +279 -0
- package/src/blocks/image-grid/index.ts +1 -0
- package/src/blocks/index.tsx +19 -0
- package/src/blocks/internal/card.tsx +42 -0
- package/src/blocks/internal/format.ts +22 -0
- package/src/blocks/invoice-row/index.ts +5 -0
- package/src/blocks/invoice-row/invoice-row.tsx +122 -0
- package/src/blocks/logo-candidate-grid/index.ts +5 -0
- package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +129 -0
- package/src/blocks/oauth-buttons/index.ts +5 -0
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +109 -0
- package/src/blocks/option-editor/index.ts +5 -0
- package/src/blocks/option-editor/option-editor.tsx +135 -0
- package/src/blocks/order-card/index.ts +11 -0
- package/src/blocks/order-card/order-card.tsx +184 -0
- package/src/blocks/plan-card/index.ts +1 -0
- package/src/blocks/plan-card/plan-card.tsx +147 -0
- package/src/blocks/product-list-empty/index.ts +5 -0
- package/src/blocks/product-list-empty/product-list-empty.tsx +144 -0
- package/src/blocks/review-row/index.ts +8 -0
- package/src/blocks/review-row/review-row.tsx +256 -0
- package/src/blocks/sales-chart/index.ts +5 -0
- package/src/blocks/sales-chart/sales-chart.tsx +120 -0
- package/src/blocks/service-state-banner/index.ts +5 -0
- package/src/blocks/service-state-banner/service-state-banner.tsx +66 -0
- package/src/blocks/shipping-tracking-row/index.ts +5 -0
- package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +93 -0
- package/src/blocks/site-preview-frame/index.ts +5 -0
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +121 -0
- package/src/blocks/stat-card/index.ts +1 -0
- package/src/blocks/stat-card/stat-card.tsx +77 -0
- package/src/blocks/step-screen/index.ts +5 -0
- package/src/blocks/step-screen/step-screen.tsx +137 -0
- package/src/blocks/supply-item-card/index.ts +6 -0
- package/src/blocks/supply-item-card/supply-item-card.tsx +145 -0
- package/src/charts/index.ts +2 -0
- package/src/charts/line-chart.tsx +177 -0
- package/src/charts/scale.ts +49 -0
- package/src/charts/sparkline.tsx +64 -0
- package/src/charts/summary.ts +11 -0
- package/src/charts.tsx +2 -0
- package/src/components/button/button.tsx +119 -0
- package/src/components/button/index.ts +6 -0
- package/src/components/checkbox/checkbox.tsx +79 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/chip.tsx +73 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/chip-group/chip-group.tsx +86 -0
- package/src/components/chip-group/index.ts +5 -0
- package/src/components/dialog/dialog.tsx +131 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/divider/divider.tsx +26 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/empty-state/empty-state.tsx +152 -0
- package/src/components/empty-state/index.ts +5 -0
- package/src/components/field/field.tsx +151 -0
- package/src/components/field/index.ts +1 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/list-row/list-row.tsx +115 -0
- package/src/components/photo/index.ts +1 -0
- package/src/components/photo/photo.tsx +87 -0
- package/src/components/price/index.ts +1 -0
- package/src/components/price/price.tsx +84 -0
- package/src/components/search-field/index.ts +1 -0
- package/src/components/search-field/search-field.tsx +46 -0
- package/src/components/segmented-tabs/index.ts +5 -0
- package/src/components/segmented-tabs/segmented-tabs.tsx +81 -0
- package/src/components/sheet/index.ts +1 -0
- package/src/components/sheet/sheet.tsx +121 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.tsx +73 -0
- package/src/components/status-badge/index.ts +5 -0
- package/src/components/status-badge/status-badge.tsx +54 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.tsx +26 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.tsx +54 -0
- package/src/components/toast/index.ts +9 -0
- package/src/components/toast/toast.tsx +248 -0
- package/src/components/wizard-steps/index.ts +1 -0
- package/src/components/wizard-steps/wizard-steps.tsx +54 -0
- package/src/index.tsx +56 -0
- package/src/internal/glyphs.tsx +158 -0
- package/src/internal/icon.tsx +10 -0
- package/src/internal/overlay.tsx +59 -0
- package/src/internal/pressable-base.tsx +55 -0
- package/src/internal/use-reduced-motion.ts +32 -0
- package/src/sortable/index.ts +8 -0
- package/src/sortable/move.ts +19 -0
- package/src/sortable/sortable-grid.tsx +97 -0
- package/src/sortable/sortable-list.tsx +11 -0
- package/src/sortable.tsx +3 -0
- package/src/theme/create-theme.ts +67 -0
- package/src/theme/theme-provider.tsx +37 -0
- package/src/theme/tokens.ts +91 -0
- package/src/types/index.ts +80 -0
- package/src/utils/color.ts +47 -0
- package/src/utils/styles.ts +30 -0
- package/README.md +0 -3
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Text, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import type { TypographyVariant } from '../../types';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
|
|
6
|
+
/** 12000 → '12,000원'. 웹 · Jest · 네이티브에서 같은 결과를 내도록 Intl을 쓰지 않는다 */
|
|
7
|
+
export function formatPrice(value: number, unit = '원'): string {
|
|
8
|
+
const n = Math.round(value);
|
|
9
|
+
const digits = String(Math.abs(n)).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
10
|
+
return `${n < 0 ? '-' : ''}${digits}${unit}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type PriceProps = {
|
|
14
|
+
value: number;
|
|
15
|
+
/** 할인 전 가격. value보다 클 때만 취소선으로 표시한다 */
|
|
16
|
+
originalValue?: number;
|
|
17
|
+
/** 기본 'body' */
|
|
18
|
+
variant?: TypographyVariant;
|
|
19
|
+
unit?: string;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const useStyles = makeStyles((t) => ({
|
|
24
|
+
row: { flexDirection: 'row', alignItems: 'baseline', gap: t.space[2] },
|
|
25
|
+
value: {
|
|
26
|
+
fontFamily: t.fontFamily,
|
|
27
|
+
fontWeight: '700',
|
|
28
|
+
color: t.colors.foreground,
|
|
29
|
+
},
|
|
30
|
+
original: {
|
|
31
|
+
...t.typography.caption,
|
|
32
|
+
fontFamily: t.fontFamily,
|
|
33
|
+
color: t.colors.mutedForeground,
|
|
34
|
+
textDecorationLine: 'line-through',
|
|
35
|
+
},
|
|
36
|
+
rate: {
|
|
37
|
+
...t.typography.caption,
|
|
38
|
+
fontFamily: t.fontFamily,
|
|
39
|
+
fontWeight: '700',
|
|
40
|
+
color: t.colors.destructive,
|
|
41
|
+
},
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
export function Price({
|
|
45
|
+
value,
|
|
46
|
+
originalValue,
|
|
47
|
+
variant = 'body',
|
|
48
|
+
unit,
|
|
49
|
+
style,
|
|
50
|
+
}: PriceProps) {
|
|
51
|
+
const t = useTheme();
|
|
52
|
+
const s = useStyles();
|
|
53
|
+
const discounted = originalValue !== undefined && originalValue > value;
|
|
54
|
+
const rate = discounted ? Math.round((1 - value / originalValue) * 100) : 0;
|
|
55
|
+
const label = discounted
|
|
56
|
+
? `${formatPrice(value, unit)}, 할인 전 ${formatPrice(originalValue, unit)}`
|
|
57
|
+
: formatPrice(value, unit);
|
|
58
|
+
return (
|
|
59
|
+
<View style={[s.row, style]} accessible accessibilityLabel={label}>
|
|
60
|
+
{discounted ? (
|
|
61
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.rate}>
|
|
62
|
+
{rate}%
|
|
63
|
+
</Text>
|
|
64
|
+
) : null}
|
|
65
|
+
<Text
|
|
66
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
67
|
+
style={[
|
|
68
|
+
s.value,
|
|
69
|
+
{
|
|
70
|
+
fontSize: t.typography[variant].fontSize,
|
|
71
|
+
lineHeight: t.typography[variant].lineHeight,
|
|
72
|
+
},
|
|
73
|
+
]}
|
|
74
|
+
>
|
|
75
|
+
{formatPrice(value, unit)}
|
|
76
|
+
</Text>
|
|
77
|
+
{discounted ? (
|
|
78
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.original}>
|
|
79
|
+
{formatPrice(originalValue, unit)}
|
|
80
|
+
</Text>
|
|
81
|
+
) : null}
|
|
82
|
+
</View>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchField, type SearchFieldProps } from './search-field';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CloseGlyph, SearchGlyph } from '../../internal/glyphs';
|
|
2
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
import { Field, type FieldProps } from '../field/field';
|
|
5
|
+
|
|
6
|
+
export type SearchFieldProps = Omit<
|
|
7
|
+
FieldProps,
|
|
8
|
+
'leading' | 'trailing' | 'value' | 'onChangeText' | 'defaultValue'
|
|
9
|
+
> & {
|
|
10
|
+
value: string;
|
|
11
|
+
onChangeText: (text: string) => void;
|
|
12
|
+
/** 지우기 버튼의 접근성 라벨. 기본 '검색어 지우기' */
|
|
13
|
+
clearLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function SearchField({
|
|
17
|
+
value,
|
|
18
|
+
onChangeText,
|
|
19
|
+
clearLabel = '검색어 지우기',
|
|
20
|
+
...rest
|
|
21
|
+
}: SearchFieldProps) {
|
|
22
|
+
const t = useTheme();
|
|
23
|
+
return (
|
|
24
|
+
<Field
|
|
25
|
+
returnKeyType="search"
|
|
26
|
+
accessibilityRole="search"
|
|
27
|
+
autoCorrect={false}
|
|
28
|
+
{...rest}
|
|
29
|
+
value={value}
|
|
30
|
+
onChangeText={onChangeText}
|
|
31
|
+
leading={SearchGlyph}
|
|
32
|
+
trailing={
|
|
33
|
+
value ? (
|
|
34
|
+
<PressableBase
|
|
35
|
+
accessibilityLabel={clearLabel}
|
|
36
|
+
touchHeight={t.iconSize.md}
|
|
37
|
+
hitSlop={12}
|
|
38
|
+
onPress={() => onChangeText('')}
|
|
39
|
+
>
|
|
40
|
+
<CloseGlyph color={t.colors.mutedForeground} size={t.iconSize.sm} />
|
|
41
|
+
</PressableBase>
|
|
42
|
+
) : undefined
|
|
43
|
+
}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Text, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
|
|
6
|
+
export type SegmentedTabsItem<T extends string> = { value: T; label: string };
|
|
7
|
+
|
|
8
|
+
export type SegmentedTabsProps<T extends string> = {
|
|
9
|
+
/** 2~4개 */
|
|
10
|
+
items: readonly SegmentedTabsItem<T>[];
|
|
11
|
+
value: T;
|
|
12
|
+
onValueChange: (value: T) => void;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const HEIGHT = 40;
|
|
17
|
+
|
|
18
|
+
const useStyles = makeStyles((t) => ({
|
|
19
|
+
track: {
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
height: HEIGHT,
|
|
22
|
+
padding: t.space[1],
|
|
23
|
+
gap: t.space[1],
|
|
24
|
+
borderRadius: t.radius.md,
|
|
25
|
+
backgroundColor: t.colors.muted,
|
|
26
|
+
},
|
|
27
|
+
tab: {
|
|
28
|
+
flex: 1,
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
borderRadius: t.radius.sm,
|
|
32
|
+
},
|
|
33
|
+
selected: { backgroundColor: t.colors.background, boxShadow: t.shadow.sm },
|
|
34
|
+
label: {
|
|
35
|
+
fontFamily: t.fontFamily,
|
|
36
|
+
fontSize: 14,
|
|
37
|
+
lineHeight: 20,
|
|
38
|
+
fontWeight: '500',
|
|
39
|
+
color: t.colors.mutedForeground,
|
|
40
|
+
},
|
|
41
|
+
selectedLabel: { color: t.colors.foreground },
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
export function SegmentedTabs<T extends string>({
|
|
45
|
+
items,
|
|
46
|
+
value,
|
|
47
|
+
onValueChange,
|
|
48
|
+
style,
|
|
49
|
+
}: SegmentedTabsProps<T>) {
|
|
50
|
+
const t = useTheme();
|
|
51
|
+
const s = useStyles();
|
|
52
|
+
return (
|
|
53
|
+
<View accessibilityRole="tablist" style={[s.track, style]}>
|
|
54
|
+
{items.map((item) => {
|
|
55
|
+
const selected = item.value === value;
|
|
56
|
+
return (
|
|
57
|
+
<PressableBase
|
|
58
|
+
key={item.value}
|
|
59
|
+
accessibilityRole="tab"
|
|
60
|
+
accessibilityState={{ selected }}
|
|
61
|
+
accessibilityLabel={item.label}
|
|
62
|
+
touchHeight={HEIGHT}
|
|
63
|
+
pressedStyle={{}}
|
|
64
|
+
onPress={() => {
|
|
65
|
+
if (!selected) onValueChange(item.value);
|
|
66
|
+
}}
|
|
67
|
+
style={[s.tab, selected && s.selected]}
|
|
68
|
+
>
|
|
69
|
+
<Text
|
|
70
|
+
numberOfLines={1}
|
|
71
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
72
|
+
style={[s.label, selected && s.selectedLabel]}
|
|
73
|
+
>
|
|
74
|
+
{item.label}
|
|
75
|
+
</Text>
|
|
76
|
+
</PressableBase>
|
|
77
|
+
);
|
|
78
|
+
})}
|
|
79
|
+
</View>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sheet, type SheetProps } from './sheet';
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Animated,
|
|
4
|
+
KeyboardAvoidingView,
|
|
5
|
+
Modal,
|
|
6
|
+
Text,
|
|
7
|
+
useWindowDimensions,
|
|
8
|
+
View,
|
|
9
|
+
type StyleProp,
|
|
10
|
+
type ViewStyle,
|
|
11
|
+
} from 'react-native';
|
|
12
|
+
import { Backdrop, useOverlayTransition } from '../../internal/overlay';
|
|
13
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
14
|
+
import { makeStyles } from '../../utils/styles';
|
|
15
|
+
import { ToastHost } from '../toast/toast';
|
|
16
|
+
|
|
17
|
+
export type SheetProps = {
|
|
18
|
+
open: boolean;
|
|
19
|
+
onOpenChange: (open: boolean) => void;
|
|
20
|
+
title?: string;
|
|
21
|
+
/** 하단 안전 영역 높이. 앱의 safe-area 값을 넘긴다 */
|
|
22
|
+
bottomInset?: number;
|
|
23
|
+
/** false면 배경을 눌러도 닫히지 않는다. 기본 true */
|
|
24
|
+
dismissible?: boolean;
|
|
25
|
+
/** 배경 닫기 버튼의 접근성 라벨. 기본 '닫기' */
|
|
26
|
+
closeLabel?: string;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const useStyles = makeStyles((t) => ({
|
|
32
|
+
root: { flex: 1, justifyContent: 'flex-end' },
|
|
33
|
+
panel: {
|
|
34
|
+
maxHeight: '90%',
|
|
35
|
+
paddingTop: t.space[2],
|
|
36
|
+
paddingHorizontal: t.space[4],
|
|
37
|
+
gap: t.space[3],
|
|
38
|
+
borderTopLeftRadius: t.radius.lg,
|
|
39
|
+
borderTopRightRadius: t.radius.lg,
|
|
40
|
+
backgroundColor: t.colors.background,
|
|
41
|
+
boxShadow: t.shadow.md,
|
|
42
|
+
},
|
|
43
|
+
handle: {
|
|
44
|
+
alignSelf: 'center',
|
|
45
|
+
width: 36,
|
|
46
|
+
height: 4,
|
|
47
|
+
borderRadius: t.radius.full,
|
|
48
|
+
backgroundColor: t.colors.border,
|
|
49
|
+
},
|
|
50
|
+
title: {
|
|
51
|
+
...t.typography.title,
|
|
52
|
+
fontFamily: t.fontFamily,
|
|
53
|
+
color: t.colors.foreground,
|
|
54
|
+
},
|
|
55
|
+
}));
|
|
56
|
+
|
|
57
|
+
export function Sheet({
|
|
58
|
+
open,
|
|
59
|
+
onOpenChange,
|
|
60
|
+
title,
|
|
61
|
+
bottomInset = 0,
|
|
62
|
+
dismissible = true,
|
|
63
|
+
closeLabel = '닫기',
|
|
64
|
+
children,
|
|
65
|
+
style,
|
|
66
|
+
}: SheetProps) {
|
|
67
|
+
const t = useTheme();
|
|
68
|
+
const s = useStyles();
|
|
69
|
+
const { height } = useWindowDimensions();
|
|
70
|
+
const { mounted, progress } = useOverlayTransition(open);
|
|
71
|
+
|
|
72
|
+
const close = () => {
|
|
73
|
+
if (dismissible) onOpenChange(false);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<Modal
|
|
78
|
+
visible={mounted}
|
|
79
|
+
transparent
|
|
80
|
+
animationType="none"
|
|
81
|
+
statusBarTranslucent
|
|
82
|
+
navigationBarTranslucent
|
|
83
|
+
onRequestClose={close}
|
|
84
|
+
>
|
|
85
|
+
<KeyboardAvoidingView behavior="padding" style={s.root}>
|
|
86
|
+
<Backdrop progress={progress} onPress={close} label={closeLabel} />
|
|
87
|
+
<Animated.View
|
|
88
|
+
accessibilityViewIsModal
|
|
89
|
+
style={[
|
|
90
|
+
s.panel,
|
|
91
|
+
{ paddingBottom: t.space[4] + bottomInset },
|
|
92
|
+
{
|
|
93
|
+
transform: [
|
|
94
|
+
{
|
|
95
|
+
translateY: progress.interpolate({
|
|
96
|
+
inputRange: [0, 1],
|
|
97
|
+
outputRange: [height, 0],
|
|
98
|
+
}),
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
style,
|
|
103
|
+
]}
|
|
104
|
+
>
|
|
105
|
+
<View style={s.handle} />
|
|
106
|
+
{title ? (
|
|
107
|
+
<Text
|
|
108
|
+
accessibilityRole="header"
|
|
109
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
110
|
+
style={s.title}
|
|
111
|
+
>
|
|
112
|
+
{title}
|
|
113
|
+
</Text>
|
|
114
|
+
) : null}
|
|
115
|
+
{children}
|
|
116
|
+
</Animated.View>
|
|
117
|
+
</KeyboardAvoidingView>
|
|
118
|
+
<ToastHost />
|
|
119
|
+
</Modal>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton, type SkeletonProps } from './skeleton';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Animated,
|
|
4
|
+
type DimensionValue,
|
|
5
|
+
type StyleProp,
|
|
6
|
+
type ViewStyle,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import { useNativeDriver } from '../../internal/overlay';
|
|
9
|
+
import { useReducedMotion } from '../../internal/use-reduced-motion';
|
|
10
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
11
|
+
|
|
12
|
+
export type SkeletonProps = {
|
|
13
|
+
/** 기본 '100%' */
|
|
14
|
+
width?: DimensionValue;
|
|
15
|
+
/** 기본 16 */
|
|
16
|
+
height?: DimensionValue;
|
|
17
|
+
/** 기본 radius.sm */
|
|
18
|
+
radius?: number;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** 불러오는 중인 자리. '동작 줄이기'가 켜져 있으면 깜빡이지 않는다 */
|
|
23
|
+
export function Skeleton({
|
|
24
|
+
width = '100%',
|
|
25
|
+
height = 16,
|
|
26
|
+
radius,
|
|
27
|
+
style,
|
|
28
|
+
}: SkeletonProps) {
|
|
29
|
+
const t = useTheme();
|
|
30
|
+
const reduced = useReducedMotion();
|
|
31
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (reduced) {
|
|
35
|
+
opacity.setValue(0.7);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const half = t.motion.duration * 4;
|
|
39
|
+
const loop = Animated.loop(
|
|
40
|
+
Animated.sequence([
|
|
41
|
+
Animated.timing(opacity, {
|
|
42
|
+
toValue: 0.5,
|
|
43
|
+
duration: half,
|
|
44
|
+
useNativeDriver,
|
|
45
|
+
}),
|
|
46
|
+
Animated.timing(opacity, {
|
|
47
|
+
toValue: 1,
|
|
48
|
+
duration: half,
|
|
49
|
+
useNativeDriver,
|
|
50
|
+
}),
|
|
51
|
+
])
|
|
52
|
+
);
|
|
53
|
+
loop.start();
|
|
54
|
+
return () => loop.stop();
|
|
55
|
+
}, [opacity, reduced, t.motion.duration]);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Animated.View
|
|
59
|
+
accessible={false}
|
|
60
|
+
importantForAccessibility="no-hide-descendants"
|
|
61
|
+
style={[
|
|
62
|
+
{
|
|
63
|
+
width,
|
|
64
|
+
height,
|
|
65
|
+
borderRadius: radius ?? t.radius.sm,
|
|
66
|
+
backgroundColor: t.colors.muted,
|
|
67
|
+
opacity,
|
|
68
|
+
},
|
|
69
|
+
style,
|
|
70
|
+
]}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 StatusBadgeTone =
|
|
6
|
+
'neutral' | 'info' | 'success' | 'warning' | 'destructive';
|
|
7
|
+
|
|
8
|
+
export type StatusBadgeProps = {
|
|
9
|
+
/** 기본 'neutral' */
|
|
10
|
+
tone?: StatusBadgeTone;
|
|
11
|
+
children: string;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const useStyles = makeStyles((t) => ({
|
|
16
|
+
base: {
|
|
17
|
+
alignSelf: 'flex-start',
|
|
18
|
+
paddingHorizontal: t.space[2],
|
|
19
|
+
paddingVertical: 2,
|
|
20
|
+
borderRadius: t.radius.full,
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
...t.typography.caption,
|
|
24
|
+
fontFamily: t.fontFamily,
|
|
25
|
+
fontWeight: '600',
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
export function StatusBadge({
|
|
30
|
+
tone = 'neutral',
|
|
31
|
+
children,
|
|
32
|
+
style,
|
|
33
|
+
}: StatusBadgeProps) {
|
|
34
|
+
const t = useTheme();
|
|
35
|
+
const s = useStyles();
|
|
36
|
+
const [bg, fg] = {
|
|
37
|
+
neutral: [t.colors.muted, t.colors.mutedForeground],
|
|
38
|
+
info: [t.colors.info, t.colors.infoForeground],
|
|
39
|
+
success: [t.colors.success, t.colors.successForeground],
|
|
40
|
+
warning: [t.colors.warning, t.colors.warningForeground],
|
|
41
|
+
destructive: [t.colors.destructive, t.colors.destructiveForeground],
|
|
42
|
+
}[tone];
|
|
43
|
+
return (
|
|
44
|
+
<View style={[s.base, { backgroundColor: bg }, style]}>
|
|
45
|
+
<Text
|
|
46
|
+
numberOfLines={1}
|
|
47
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
48
|
+
style={[s.label, { color: fg }]}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</Text>
|
|
52
|
+
</View>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch, type SwitchProps } from './switch';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentRef, Ref } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Switch as RNSwitch,
|
|
4
|
+
type SwitchProps as RNSwitchProps,
|
|
5
|
+
} from 'react-native';
|
|
6
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
7
|
+
|
|
8
|
+
export type SwitchProps = Omit<RNSwitchProps, 'value' | 'onValueChange'> & {
|
|
9
|
+
ref?: Ref<ComponentRef<typeof RNSwitch>>;
|
|
10
|
+
value: boolean;
|
|
11
|
+
onValueChange: (value: boolean) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export function Switch({ disabled, style, ...rest }: SwitchProps) {
|
|
15
|
+
const t = useTheme();
|
|
16
|
+
return (
|
|
17
|
+
<RNSwitch
|
|
18
|
+
trackColor={{ false: t.colors.border, true: t.colors.primary }}
|
|
19
|
+
thumbColor={t.colors.background}
|
|
20
|
+
ios_backgroundColor={t.colors.border}
|
|
21
|
+
{...rest}
|
|
22
|
+
disabled={disabled}
|
|
23
|
+
style={[disabled && { opacity: t.opacity.disabled }, style]}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Text, type TextProps, type TextTone, type TextWeight } from './text';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ComponentRef, Ref } from 'react';
|
|
2
|
+
import { Text as RNText, type TextProps as RNTextProps } from 'react-native';
|
|
3
|
+
import type { TypographyVariant } from '../../types';
|
|
4
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
5
|
+
import { makeStyles } from '../../utils/styles';
|
|
6
|
+
|
|
7
|
+
export type TextTone = 'default' | 'muted' | 'destructive' | 'success';
|
|
8
|
+
|
|
9
|
+
export type TextProps = RNTextProps & {
|
|
10
|
+
ref?: Ref<ComponentRef<typeof RNText>>;
|
|
11
|
+
/** 기본 'body' */
|
|
12
|
+
variant?: TypographyVariant;
|
|
13
|
+
/** 기본 'default' */
|
|
14
|
+
tone?: TextTone;
|
|
15
|
+
/** 지정하지 않으면 variant의 굵기 */
|
|
16
|
+
weight?: TextWeight;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
20
|
+
|
|
21
|
+
const useStyles = makeStyles((t) => ({
|
|
22
|
+
caption: t.typography.caption,
|
|
23
|
+
body: t.typography.body,
|
|
24
|
+
bodyLg: t.typography.bodyLg,
|
|
25
|
+
title: t.typography.title,
|
|
26
|
+
display: t.typography.display,
|
|
27
|
+
default: { color: t.colors.foreground },
|
|
28
|
+
muted: { color: t.colors.mutedForeground },
|
|
29
|
+
destructive: { color: t.colors.destructive },
|
|
30
|
+
success: { color: t.colors.success },
|
|
31
|
+
font: { fontFamily: t.fontFamily },
|
|
32
|
+
regular: { fontWeight: '400' },
|
|
33
|
+
medium: { fontWeight: '500' },
|
|
34
|
+
semibold: { fontWeight: '600' },
|
|
35
|
+
bold: { fontWeight: '700' },
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
export function Text({
|
|
39
|
+
variant = 'body',
|
|
40
|
+
tone = 'default',
|
|
41
|
+
weight,
|
|
42
|
+
style,
|
|
43
|
+
...rest
|
|
44
|
+
}: TextProps) {
|
|
45
|
+
const t = useTheme();
|
|
46
|
+
const s = useStyles();
|
|
47
|
+
return (
|
|
48
|
+
<RNText
|
|
49
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
50
|
+
{...rest}
|
|
51
|
+
style={[s.font, s[variant], s[tone], weight && s[weight], style]}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|