@ezpg/app-ui 0.20.0 → 0.22.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 +37 -0
- package/lib/module/adjust/adjust-template.js +1 -0
- package/lib/module/adjust/adjust-template.js.map +1 -1
- package/lib/module/adjust/axis-adjust.js +181 -0
- package/lib/module/adjust/axis-adjust.js.map +1 -0
- package/lib/module/adjust/axis-tabs.js +81 -0
- package/lib/module/adjust/axis-tabs.js.map +1 -0
- package/lib/module/adjust/axis-wheel.js +286 -0
- package/lib/module/adjust/axis-wheel.js.map +1 -0
- package/lib/module/adjust/index.js +4 -0
- package/lib/module/adjust/index.js.map +1 -1
- package/lib/module/adjust/store-sample.js +436 -0
- package/lib/module/adjust/store-sample.js.map +1 -0
- package/lib/module/blocks/choice-art/choice-art.js +589 -0
- package/lib/module/blocks/choice-art/choice-art.js.map +1 -0
- package/lib/module/blocks/choice-art/index.js +4 -0
- package/lib/module/blocks/choice-art/index.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +1 -1
- package/lib/module/blocks/detail-editor/compare-slider.js +5 -2
- package/lib/module/blocks/detail-editor/compare-slider.js.map +1 -1
- package/lib/module/blocks/detail-editor/detail-canvas.js +192 -61
- package/lib/module/blocks/detail-editor/detail-canvas.js.map +1 -1
- package/lib/module/blocks/detail-editor/detail-types.js +57 -0
- package/lib/module/blocks/detail-editor/detail-types.js.map +1 -1
- package/lib/module/blocks/detail-editor/draft-preview.js +22 -0
- package/lib/module/blocks/detail-editor/draft-preview.js.map +1 -1
- package/lib/module/blocks/detail-editor/focus-context.js +1 -0
- package/lib/module/blocks/detail-editor/focus-context.js.map +1 -1
- package/lib/module/blocks/detail-editor/index.js +2 -2
- package/lib/module/blocks/detail-editor/index.js.map +1 -1
- package/lib/module/blocks/detail-editor/keep-words.js +34 -0
- package/lib/module/blocks/detail-editor/keep-words.js.map +1 -0
- package/lib/module/blocks/detail-editor/layout-picker.js +192 -8
- package/lib/module/blocks/detail-editor/layout-picker.js.map +1 -1
- package/lib/module/blocks/detail-request/detail-request.js +213 -0
- package/lib/module/blocks/detail-request/detail-request.js.map +1 -0
- package/lib/module/blocks/detail-request/index.js +4 -0
- package/lib/module/blocks/detail-request/index.js.map +1 -0
- package/lib/module/blocks/detail-studio/action-chips.js +72 -0
- package/lib/module/blocks/detail-studio/action-chips.js.map +1 -0
- package/lib/module/blocks/detail-studio/adjust-tiles.js +3 -3
- package/lib/module/blocks/detail-studio/adjust-tiles.js.map +1 -1
- package/lib/module/blocks/detail-studio/asset-grid.js +33 -16
- package/lib/module/blocks/detail-studio/asset-grid.js.map +1 -1
- package/lib/module/blocks/detail-studio/confirm-row.js +3 -0
- package/lib/module/blocks/detail-studio/confirm-row.js.map +1 -1
- package/lib/module/blocks/detail-studio/detail-studio-template.js +2 -6
- package/lib/module/blocks/detail-studio/detail-studio-template.js.map +1 -1
- package/lib/module/blocks/detail-studio/edge-fade.js +74 -0
- package/lib/module/blocks/detail-studio/edge-fade.js.map +1 -0
- package/lib/module/blocks/detail-studio/image-prompt.js +8 -10
- package/lib/module/blocks/detail-studio/image-prompt.js.map +1 -1
- package/lib/module/blocks/detail-studio/index.js +7 -5
- package/lib/module/blocks/detail-studio/index.js.map +1 -1
- package/lib/module/blocks/detail-studio/rewrite-tray.js +17 -64
- package/lib/module/blocks/detail-studio/rewrite-tray.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-cover.js +41 -0
- package/lib/module/blocks/detail-studio/section-cover.js.map +1 -0
- package/lib/module/blocks/detail-studio/section-edit-template.js +103 -12
- package/lib/module/blocks/detail-studio/section-edit-template.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-kind-grid.js +2 -3
- package/lib/module/blocks/detail-studio/section-kind-grid.js.map +1 -1
- package/lib/module/blocks/detail-studio/section-settings.js +127 -61
- package/lib/module/blocks/detail-studio/section-settings.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-bar.js +46 -25
- package/lib/module/blocks/detail-studio/studio-bar.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-dock.js +21 -39
- package/lib/module/blocks/detail-studio/studio-dock.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-glyphs.js +92 -0
- package/lib/module/blocks/detail-studio/studio-glyphs.js.map +1 -0
- package/lib/module/blocks/detail-studio/studio-sheet.js +5 -3
- package/lib/module/blocks/detail-studio/studio-sheet.js.map +1 -1
- package/lib/module/blocks/detail-studio/studio-steps.js +60 -0
- package/lib/module/blocks/detail-studio/studio-steps.js.map +1 -0
- package/lib/module/blocks/detail-studio/studio-toggle.js +130 -0
- package/lib/module/blocks/detail-studio/studio-toggle.js.map +1 -0
- package/lib/module/blocks/detail-studio/{photo-tool-bar.js → studio-tools.js} +63 -42
- package/lib/module/blocks/detail-studio/studio-tools.js.map +1 -0
- package/lib/module/blocks/detail-studio/text-format-panel.js +16 -8
- package/lib/module/blocks/detail-studio/text-format-panel.js.map +1 -1
- package/lib/module/blocks/index.js +2 -0
- package/lib/module/blocks/index.js.map +1 -1
- package/lib/module/components/button/button.js +13 -5
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/chip/chip.js +5 -1
- 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/credit/credit.js +6 -2
- package/lib/module/components/credit/credit.js.map +1 -1
- package/lib/module/components/dropdown-menu/dropdown-menu.js +9 -4
- package/lib/module/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/lib/module/components/page-header/page-header.js +25 -1
- package/lib/module/components/page-header/page-header.js.map +1 -1
- package/lib/module/components/segmented-control/segmented-control.js +3 -1
- package/lib/module/components/segmented-control/segmented-control.js.map +1 -1
- package/lib/module/components/skeleton/skeleton.js +4 -2
- package/lib/module/components/skeleton/skeleton.js.map +1 -1
- package/lib/module/components/slider/slider.js +53 -16
- package/lib/module/components/slider/slider.js.map +1 -1
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toast/toast.js +8 -4
- package/lib/module/components/toast/toast.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/glyphs.js +459 -1
- package/lib/module/internal/glyphs.js.map +1 -1
- package/lib/module/internal/line-icons.js +1 -0
- package/lib/module/internal/line-icons.js.map +1 -1
- package/lib/module/internal/retry-glyph.js +5 -2
- package/lib/module/internal/retry-glyph.js.map +1 -1
- package/lib/module/internal/undo-glyph.js +11 -8
- package/lib/module/internal/undo-glyph.js.map +1 -1
- package/lib/module/sortable/section-board.js +73 -89
- package/lib/module/sortable/section-board.js.map +1 -1
- package/lib/module/templates/design-pick-template.js +8 -1
- package/lib/module/templates/design-pick-template.js.map +1 -1
- package/lib/module/templates/index.js +1 -0
- package/lib/module/templates/index.js.map +1 -1
- package/lib/module/templates/intro-template.js +3 -3
- package/lib/module/templates/intro-template.js.map +1 -1
- package/lib/module/templates/preview-edit-template.js +422 -0
- package/lib/module/templates/preview-edit-template.js.map +1 -0
- package/lib/module/templates/result-template.js +2 -1
- package/lib/module/templates/result-template.js.map +1 -1
- package/lib/typescript/src/adjust/adjust-template.d.ts.map +1 -1
- package/lib/typescript/src/adjust/axis-adjust.d.ts +25 -0
- package/lib/typescript/src/adjust/axis-adjust.d.ts.map +1 -0
- package/lib/typescript/src/adjust/axis-tabs.d.ts +15 -0
- package/lib/typescript/src/adjust/axis-tabs.d.ts.map +1 -0
- package/lib/typescript/src/adjust/axis-wheel.d.ts +15 -0
- package/lib/typescript/src/adjust/axis-wheel.d.ts.map +1 -0
- package/lib/typescript/src/adjust/index.d.ts +4 -0
- package/lib/typescript/src/adjust/index.d.ts.map +1 -1
- package/lib/typescript/src/adjust/store-sample.d.ts +46 -0
- package/lib/typescript/src/adjust/store-sample.d.ts.map +1 -0
- package/lib/typescript/src/blocks/choice-art/choice-art.d.ts +73 -0
- package/lib/typescript/src/blocks/choice-art/choice-art.d.ts.map +1 -0
- package/lib/typescript/src/blocks/choice-art/index.d.ts +2 -0
- package/lib/typescript/src/blocks/choice-art/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts +2 -1
- package/lib/typescript/src/blocks/detail-editor/compare-slider.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts +3 -1
- package/lib/typescript/src/blocks/detail-editor/detail-canvas.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts +11 -0
- package/lib/typescript/src/blocks/detail-editor/detail-types.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts +4 -1
- package/lib/typescript/src/blocks/detail-editor/draft-preview.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts +9 -0
- package/lib/typescript/src/blocks/detail-editor/focus-context.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/index.d.ts +3 -2
- package/lib/typescript/src/blocks/detail-editor/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts +2 -0
- package/lib/typescript/src/blocks/detail-editor/keep-words.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts +6 -1
- package/lib/typescript/src/blocks/detail-editor/layout-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-request/detail-request.d.ts +24 -0
- package/lib/typescript/src/blocks/detail-request/detail-request.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-request/index.d.ts +2 -0
- package/lib/typescript/src/blocks/detail-request/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts +12 -0
- package/lib/typescript/src/blocks/detail-studio/action-chips.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/asset-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/confirm-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/detail-studio-template.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts +10 -0
- package/lib/typescript/src/blocks/detail-studio/edge-fade.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/image-prompt.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/index.d.ts +7 -5
- package/lib/typescript/src/blocks/detail-studio/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts +3 -3
- package/lib/typescript/src/blocks/detail-studio/rewrite-tray.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts +7 -0
- package/lib/typescript/src/blocks/detail-studio/section-cover.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts +9 -0
- package/lib/typescript/src/blocks/detail-studio/section-edit-template.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-kind-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts +11 -13
- package/lib/typescript/src/blocks/detail-studio/section-settings.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts +6 -2
- package/lib/typescript/src/blocks/detail-studio/studio-bar.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts +0 -2
- package/lib/typescript/src/blocks/detail-studio/studio-dock.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts +6 -0
- package/lib/typescript/src/blocks/detail-studio/studio-glyphs.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-sheet.d.ts.map +1 -1
- package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts +11 -0
- package/lib/typescript/src/blocks/detail-studio/studio-steps.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts +14 -0
- package/lib/typescript/src/blocks/detail-studio/studio-toggle.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts +19 -0
- package/lib/typescript/src/blocks/detail-studio/studio-tools.d.ts.map +1 -0
- package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts +2 -1
- package/lib/typescript/src/blocks/detail-studio/text-format-panel.d.ts.map +1 -1
- package/lib/typescript/src/blocks/index.d.ts +2 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/button.d.ts +3 -1
- 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 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
- package/lib/typescript/src/components/credit/credit.d.ts +1 -0
- package/lib/typescript/src/components/credit/credit.d.ts.map +1 -1
- package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +2 -0
- package/lib/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/lib/typescript/src/components/page-header/page-header.d.ts +1 -0
- package/lib/typescript/src/components/page-header/page-header.d.ts.map +1 -1
- package/lib/typescript/src/components/segmented-control/segmented-control.d.ts +2 -0
- package/lib/typescript/src/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +2 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/slider.d.ts +2 -1
- package/lib/typescript/src/components/slider/slider.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +1 -1
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts +4 -1
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/glyphs.d.ts +13 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
- package/lib/typescript/src/internal/line-icons.d.ts +1 -0
- package/lib/typescript/src/internal/line-icons.d.ts.map +1 -1
- package/lib/typescript/src/internal/retry-glyph.d.ts.map +1 -1
- package/lib/typescript/src/internal/undo-glyph.d.ts.map +1 -1
- package/lib/typescript/src/sortable/section-board.d.ts.map +1 -1
- package/lib/typescript/src/templates/design-pick-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/index.d.ts +2 -0
- package/lib/typescript/src/templates/index.d.ts.map +1 -1
- package/lib/typescript/src/templates/intro-template.d.ts.map +1 -1
- package/lib/typescript/src/templates/preview-edit-template.d.ts +39 -0
- package/lib/typescript/src/templates/preview-edit-template.d.ts.map +1 -0
- package/lib/typescript/src/templates/result-template.d.ts +2 -1
- package/lib/typescript/src/templates/result-template.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adjust/adjust-template.tsx +1 -0
- package/src/adjust/axis-adjust.tsx +206 -0
- package/src/adjust/axis-tabs.tsx +81 -0
- package/src/adjust/axis-wheel.tsx +309 -0
- package/src/adjust/index.ts +15 -0
- package/src/adjust/store-sample.tsx +519 -0
- package/src/blocks/choice-art/choice-art.tsx +500 -0
- package/src/blocks/choice-art/index.ts +29 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +1 -1
- package/src/blocks/detail-editor/compare-slider.tsx +3 -1
- package/src/blocks/detail-editor/detail-canvas.tsx +264 -69
- package/src/blocks/detail-editor/detail-types.ts +37 -0
- package/src/blocks/detail-editor/draft-preview.tsx +46 -2
- package/src/blocks/detail-editor/focus-context.ts +13 -0
- package/src/blocks/detail-editor/index.ts +11 -1
- package/src/blocks/detail-editor/keep-words.ts +36 -0
- package/src/blocks/detail-editor/layout-picker.tsx +188 -6
- package/src/blocks/detail-request/detail-request.tsx +198 -0
- package/src/blocks/detail-request/index.ts +11 -0
- package/src/blocks/detail-studio/action-chips.tsx +77 -0
- package/src/blocks/detail-studio/adjust-tiles.tsx +3 -3
- package/src/blocks/detail-studio/asset-grid.tsx +30 -16
- package/src/blocks/detail-studio/confirm-row.tsx +3 -0
- package/src/blocks/detail-studio/detail-studio-template.tsx +2 -6
- package/src/blocks/detail-studio/edge-fade.tsx +76 -0
- package/src/blocks/detail-studio/image-prompt.tsx +6 -9
- package/src/blocks/detail-studio/index.ts +19 -16
- package/src/blocks/detail-studio/rewrite-tray.tsx +16 -56
- package/src/blocks/detail-studio/section-cover.tsx +44 -0
- package/src/blocks/detail-studio/section-edit-template.tsx +138 -13
- package/src/blocks/detail-studio/section-kind-grid.tsx +2 -2
- package/src/blocks/detail-studio/section-settings.tsx +124 -69
- package/src/blocks/detail-studio/studio-bar.tsx +61 -41
- package/src/blocks/detail-studio/studio-dock.tsx +19 -37
- package/src/blocks/detail-studio/studio-glyphs.tsx +77 -0
- package/src/blocks/detail-studio/studio-sheet.tsx +7 -3
- package/src/blocks/detail-studio/studio-steps.tsx +58 -0
- package/src/blocks/detail-studio/studio-toggle.tsx +130 -0
- package/src/blocks/detail-studio/studio-tools.tsx +126 -0
- package/src/blocks/detail-studio/text-format-panel.tsx +26 -14
- package/src/blocks/index.tsx +2 -0
- package/src/components/button/button.tsx +12 -5
- package/src/components/chip/chip.tsx +9 -1
- package/src/components/chip-group/chip-group.tsx +2 -0
- package/src/components/credit/credit.tsx +9 -2
- package/src/components/dropdown-menu/dropdown-menu.tsx +18 -7
- package/src/components/page-header/page-header.tsx +28 -1
- package/src/components/segmented-control/segmented-control.tsx +10 -2
- package/src/components/skeleton/skeleton.tsx +5 -2
- package/src/components/slider/slider.tsx +66 -14
- package/src/components/toast/index.ts +1 -0
- package/src/components/toast/toast.tsx +12 -4
- package/src/index.tsx +13 -0
- package/src/internal/glyphs.tsx +411 -0
- package/src/internal/line-icons.ts +2 -0
- package/src/internal/retry-glyph.tsx +7 -2
- package/src/internal/undo-glyph.tsx +12 -11
- package/src/sortable/section-board.tsx +71 -76
- package/src/templates/design-pick-template.tsx +9 -1
- package/src/templates/index.ts +7 -0
- package/src/templates/intro-template.tsx +14 -12
- package/src/templates/preview-edit-template.tsx +467 -0
- package/src/templates/result-template.tsx +3 -0
- package/lib/module/blocks/detail-studio/keyboard-bar.js +0 -67
- package/lib/module/blocks/detail-studio/keyboard-bar.js.map +0 -1
- package/lib/module/blocks/detail-studio/photo-tool-bar.js.map +0 -1
- package/lib/module/blocks/detail-studio/section-thumb.js +0 -49
- package/lib/module/blocks/detail-studio/section-thumb.js.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts +0 -18
- package/lib/typescript/src/blocks/detail-studio/keyboard-bar.d.ts.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts +0 -19
- package/lib/typescript/src/blocks/detail-studio/photo-tool-bar.d.ts.map +0 -1
- package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts +0 -14
- package/lib/typescript/src/blocks/detail-studio/section-thumb.d.ts.map +0 -1
- package/src/blocks/detail-studio/keyboard-bar.tsx +0 -73
- package/src/blocks/detail-studio/photo-tool-bar.tsx +0 -100
- package/src/blocks/detail-studio/section-thumb.tsx +0 -41
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
4
|
import { makeStyles } from '../../utils/styles';
|
|
5
5
|
import {
|
|
6
6
|
ColorSwatchPicker,
|
|
@@ -8,48 +8,92 @@ import {
|
|
|
8
8
|
} from '../color-swatch-picker/color-swatch-picker';
|
|
9
9
|
import {
|
|
10
10
|
DETAIL_COLORS,
|
|
11
|
-
detailBlockSpace,
|
|
12
11
|
type DetailLayout,
|
|
13
12
|
} from '../detail-editor/detail-types';
|
|
14
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
LABELS as LAYOUT_LABELS,
|
|
15
|
+
SoftDiagram,
|
|
16
|
+
} from '../detail-editor/layout-picker';
|
|
15
17
|
|
|
16
|
-
export type
|
|
18
|
+
export type SectionSpace = { top: number; bottom: number };
|
|
17
19
|
|
|
18
20
|
export type SectionSettingsProps = {
|
|
19
|
-
tab: SectionSettingsTab;
|
|
20
|
-
onTabChange: (tab: SectionSettingsTab) => void;
|
|
21
21
|
layout: DetailLayout | null;
|
|
22
22
|
layouts: readonly DetailLayout[];
|
|
23
23
|
onLayoutChange: (layout: DetailLayout) => void;
|
|
24
24
|
background: string;
|
|
25
25
|
onBackgroundChange: (color: string) => void;
|
|
26
|
-
space:
|
|
27
|
-
onSpaceChange: (
|
|
28
|
-
patch: Partial<{ top: number; bottom: number }>,
|
|
29
|
-
group: string
|
|
30
|
-
) => void;
|
|
31
|
-
onSlidingStart?: () => void;
|
|
26
|
+
space: SectionSpace;
|
|
27
|
+
onSpaceChange: (space: SectionSpace) => void;
|
|
32
28
|
colors?: readonly ColorSwatch[];
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
const
|
|
36
|
-
{ value:
|
|
37
|
-
{ value:
|
|
38
|
-
{ value:
|
|
31
|
+
export const SECTION_SPACES: readonly { value: number; label: string }[] = [
|
|
32
|
+
{ value: 1, label: '좁게' },
|
|
33
|
+
{ value: 3, label: '보통' },
|
|
34
|
+
{ value: 6, label: '넓게' },
|
|
39
35
|
];
|
|
40
36
|
|
|
37
|
+
const COLUMNS = 4;
|
|
38
|
+
|
|
41
39
|
const useStyles = makeStyles((t) => ({
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
root: { gap: t.space[4], paddingTop: t.space[1] },
|
|
41
|
+
grid: { gap: t.space[2], paddingHorizontal: t.space[4] },
|
|
42
|
+
row: { flexDirection: 'row', gap: t.space[2] },
|
|
43
|
+
cell: { flex: 1 },
|
|
44
|
+
tile: {
|
|
45
|
+
height: t.space[16] + t.space[4],
|
|
46
|
+
overflow: 'hidden',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
gap: t.space[1],
|
|
50
|
+
padding: t.space[2],
|
|
51
|
+
borderRadius: t.radius.lg,
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderColor: t.colors.border,
|
|
54
|
+
backgroundColor: t.colors.surface,
|
|
55
|
+
},
|
|
56
|
+
on: {
|
|
57
|
+
borderColor: t.colors.primary,
|
|
58
|
+
backgroundColor: t.colors.primaryTint,
|
|
59
|
+
},
|
|
44
60
|
inset: { paddingHorizontal: t.space[4] },
|
|
45
|
-
|
|
61
|
+
swatches: { paddingHorizontal: t.space[1] },
|
|
62
|
+
spaces: {
|
|
63
|
+
flexDirection: 'row',
|
|
64
|
+
gap: t.space[2],
|
|
65
|
+
paddingHorizontal: t.space[4],
|
|
66
|
+
},
|
|
67
|
+
space: {
|
|
68
|
+
flex: 1,
|
|
69
|
+
height: t.controlSize.lg,
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
borderRadius: t.radius.lg,
|
|
73
|
+
borderWidth: 1,
|
|
74
|
+
borderColor: t.colors.border,
|
|
75
|
+
backgroundColor: t.colors.surface,
|
|
76
|
+
},
|
|
77
|
+
gap: {
|
|
78
|
+
width: '46%',
|
|
79
|
+
borderTopWidth: t.space[1] / 2,
|
|
80
|
+
borderBottomWidth: t.space[1] / 2,
|
|
81
|
+
borderColor: t.colors.input,
|
|
82
|
+
},
|
|
83
|
+
gapOn: { borderColor: t.colors.primary },
|
|
46
84
|
}));
|
|
47
85
|
|
|
48
|
-
|
|
86
|
+
function rows<T>(items: readonly T[]): (T | null)[][] {
|
|
87
|
+
const out: (T | null)[][] = [];
|
|
88
|
+
for (let i = 0; i < items.length; i += COLUMNS) {
|
|
89
|
+
const row: (T | null)[] = items.slice(i, i + COLUMNS);
|
|
90
|
+
while (row.length < COLUMNS) row.push(null);
|
|
91
|
+
out.push(row);
|
|
92
|
+
}
|
|
93
|
+
return out;
|
|
94
|
+
}
|
|
49
95
|
|
|
50
96
|
export function SectionSettings({
|
|
51
|
-
tab,
|
|
52
|
-
onTabChange,
|
|
53
97
|
layout,
|
|
54
98
|
layouts,
|
|
55
99
|
onLayoutChange,
|
|
@@ -57,58 +101,69 @@ export function SectionSettings({
|
|
|
57
101
|
onBackgroundChange,
|
|
58
102
|
space,
|
|
59
103
|
onSpaceChange,
|
|
60
|
-
onSlidingStart,
|
|
61
104
|
colors,
|
|
62
105
|
}: SectionSettingsProps) {
|
|
106
|
+
const t = useTheme();
|
|
63
107
|
const s = useStyles();
|
|
64
108
|
return (
|
|
65
|
-
<View>
|
|
66
|
-
<View style={s.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
109
|
+
<View style={s.root}>
|
|
110
|
+
<View accessibilityRole="radiogroup" style={s.grid}>
|
|
111
|
+
{rows(layouts).map((row, r) => (
|
|
112
|
+
<View key={r} style={s.row}>
|
|
113
|
+
{row.map((item, c) =>
|
|
114
|
+
item ? (
|
|
115
|
+
<PressableBase
|
|
116
|
+
key={item}
|
|
117
|
+
accessibilityRole="radio"
|
|
118
|
+
accessibilityState={{ selected: item === layout }}
|
|
119
|
+
accessibilityLabel={LAYOUT_LABELS[item]}
|
|
120
|
+
onPress={() => onLayoutChange(item)}
|
|
121
|
+
style={s.cell}
|
|
122
|
+
>
|
|
123
|
+
<View style={[s.tile, item === layout && s.on]}>
|
|
124
|
+
<SoftDiagram layout={item} />
|
|
125
|
+
</View>
|
|
126
|
+
</PressableBase>
|
|
127
|
+
) : (
|
|
128
|
+
<View key={`empty-${c}`} style={s.cell} />
|
|
129
|
+
)
|
|
130
|
+
)}
|
|
131
|
+
</View>
|
|
132
|
+
))}
|
|
133
|
+
</View>
|
|
134
|
+
<View style={s.inset}>
|
|
135
|
+
<ColorSwatchPicker
|
|
136
|
+
variant="row"
|
|
137
|
+
style={s.swatches}
|
|
138
|
+
colors={colors ?? DETAIL_COLORS}
|
|
139
|
+
value={background}
|
|
140
|
+
onValueChange={onBackgroundChange}
|
|
71
141
|
/>
|
|
72
142
|
</View>
|
|
73
|
-
<View style={s.
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
endLabel={px(space.top)}
|
|
98
|
-
accessibilityLabel="위 여백"
|
|
99
|
-
/>
|
|
100
|
-
<Slider
|
|
101
|
-
value={space.bottom}
|
|
102
|
-
min={0}
|
|
103
|
-
max={10}
|
|
104
|
-
onChange={(bottom) => onSpaceChange({ bottom }, 'space_bottom')}
|
|
105
|
-
onSlidingStart={onSlidingStart}
|
|
106
|
-
startLabel="아래"
|
|
107
|
-
endLabel={px(space.bottom)}
|
|
108
|
-
accessibilityLabel="아래 여백"
|
|
109
|
-
/>
|
|
110
|
-
</View>
|
|
111
|
-
)}
|
|
143
|
+
<View accessibilityRole="radiogroup" style={s.spaces}>
|
|
144
|
+
{SECTION_SPACES.map((item) => {
|
|
145
|
+
const on = space.top === item.value && space.bottom === item.value;
|
|
146
|
+
return (
|
|
147
|
+
<PressableBase
|
|
148
|
+
key={item.value}
|
|
149
|
+
accessibilityRole="radio"
|
|
150
|
+
accessibilityState={{ selected: on }}
|
|
151
|
+
accessibilityLabel={`여백 ${item.label}`}
|
|
152
|
+
onPress={() =>
|
|
153
|
+
onSpaceChange({ top: item.value, bottom: item.value })
|
|
154
|
+
}
|
|
155
|
+
style={[s.space, on && s.on]}
|
|
156
|
+
>
|
|
157
|
+
<View
|
|
158
|
+
style={[
|
|
159
|
+
s.gap,
|
|
160
|
+
{ height: item.value * t.space[1] + t.space[1] },
|
|
161
|
+
on && s.gapOn,
|
|
162
|
+
]}
|
|
163
|
+
/>
|
|
164
|
+
</PressableBase>
|
|
165
|
+
);
|
|
166
|
+
})}
|
|
112
167
|
</View>
|
|
113
168
|
</View>
|
|
114
169
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { useState, type ReactNode } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import { Button } from '../../components/button/button';
|
|
4
4
|
import { Text } from '../../components/text/text';
|
|
5
|
-
import { ChevronGlyph, CloseGlyph } from '../../internal/glyphs';
|
|
5
|
+
import { CheckGlyph, ChevronGlyph, CloseGlyph } from '../../internal/glyphs';
|
|
6
6
|
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
7
7
|
import { PressableBase } from '../../internal/pressable-base';
|
|
8
8
|
import { useTheme } from '../../theme/theme-provider';
|
|
@@ -32,6 +32,7 @@ export type StudioBarProps = {
|
|
|
32
32
|
loading?: boolean;
|
|
33
33
|
};
|
|
34
34
|
tools?: readonly StudioBarTool[];
|
|
35
|
+
confirm?: { label: string; onPress: () => void };
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
const useStyles = makeStyles((t) => ({
|
|
@@ -55,8 +56,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
55
56
|
mirror: { transform: [{ scaleX: -1 }] },
|
|
56
57
|
center: {
|
|
57
58
|
position: 'absolute',
|
|
58
|
-
left: t.space[16] + t.space[8],
|
|
59
|
-
right: t.space[16] + t.space[8],
|
|
60
59
|
top: 0,
|
|
61
60
|
bottom: 0,
|
|
62
61
|
flexDirection: 'row',
|
|
@@ -70,12 +69,12 @@ const useStyles = makeStyles((t) => ({
|
|
|
70
69
|
color: t.colors.title,
|
|
71
70
|
flexShrink: 1,
|
|
72
71
|
},
|
|
73
|
-
end: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
end: {
|
|
73
|
+
marginLeft: 'auto',
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
alignItems: 'center',
|
|
77
76
|
},
|
|
78
|
-
|
|
77
|
+
done: { paddingHorizontal: t.space[3] },
|
|
79
78
|
tool: {
|
|
80
79
|
width: t.minTouchSize,
|
|
81
80
|
height: t.minTouchSize,
|
|
@@ -96,13 +95,25 @@ export function StudioBar({
|
|
|
96
95
|
tag,
|
|
97
96
|
action,
|
|
98
97
|
tools,
|
|
98
|
+
confirm,
|
|
99
99
|
}: StudioBarProps) {
|
|
100
100
|
const t = useTheme();
|
|
101
101
|
const s = useStyles();
|
|
102
|
+
const [width, setWidth] = useState(0);
|
|
103
|
+
const [end, setEnd] = useState(0);
|
|
102
104
|
const back = leading === 'back';
|
|
103
105
|
const Glyph = back ? ChevronGlyph : CloseGlyph;
|
|
106
|
+
const pad = t.space[2];
|
|
107
|
+
const lead = pad + t.minTouchSize;
|
|
108
|
+
const trail = pad + end;
|
|
109
|
+
const side = Math.max(lead, trail);
|
|
110
|
+
const even = width - side * 2 >= t.space[16] * 2;
|
|
111
|
+
const center = even
|
|
112
|
+
? { left: side, right: side }
|
|
113
|
+
: { left: lead, right: trail };
|
|
104
114
|
return (
|
|
105
115
|
<View
|
|
116
|
+
onLayout={(e) => setWidth(e.nativeEvent.layout.width)}
|
|
106
117
|
style={[
|
|
107
118
|
s.bar,
|
|
108
119
|
{
|
|
@@ -114,13 +125,13 @@ export function StudioBar({
|
|
|
114
125
|
]}
|
|
115
126
|
>
|
|
116
127
|
<View
|
|
117
|
-
style={[s.center,
|
|
128
|
+
style={[s.center, center, { top: topInset }]}
|
|
118
129
|
pointerEvents="box-none"
|
|
119
130
|
>
|
|
120
131
|
<Text accessibilityRole="header" numberOfLines={1} style={s.title}>
|
|
121
132
|
{title}
|
|
122
133
|
</Text>
|
|
123
|
-
{tag}
|
|
134
|
+
{tag ? <View>{tag}</View> : null}
|
|
124
135
|
</View>
|
|
125
136
|
<PressableBase
|
|
126
137
|
onPress={onClose}
|
|
@@ -131,43 +142,52 @@ export function StudioBar({
|
|
|
131
142
|
<Glyph color={t.colors.title} size={t.iconSize.md} />
|
|
132
143
|
</View>
|
|
133
144
|
</PressableBase>
|
|
134
|
-
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
</View>
|
|
159
|
-
) : action ? (
|
|
160
|
-
<View style={s.end}>
|
|
145
|
+
<View style={s.end} onLayout={(e) => setEnd(e.nativeEvent.layout.width)}>
|
|
146
|
+
{tools?.map((tool) => (
|
|
147
|
+
<PressableBase
|
|
148
|
+
key={tool.key}
|
|
149
|
+
onPress={tool.onPress}
|
|
150
|
+
disabled={!tool.onPress}
|
|
151
|
+
disabledStyle={{}}
|
|
152
|
+
accessibilityLabel={tool.label}
|
|
153
|
+
accessibilityState={
|
|
154
|
+
tool.active === undefined ? undefined : { selected: tool.active }
|
|
155
|
+
}
|
|
156
|
+
style={[s.tool, tool.active && s.toolOn]}
|
|
157
|
+
>
|
|
158
|
+
<View style={tool.mirror && s.mirror}>
|
|
159
|
+
{renderIcon(tool.icon, {
|
|
160
|
+
color: tool.onPress
|
|
161
|
+
? t.colors.title
|
|
162
|
+
: t.colors.disabledForeground,
|
|
163
|
+
size: t.iconSize.md,
|
|
164
|
+
})}
|
|
165
|
+
</View>
|
|
166
|
+
</PressableBase>
|
|
167
|
+
))}
|
|
168
|
+
{action ? (
|
|
161
169
|
<Button
|
|
162
|
-
|
|
170
|
+
variant="ghost"
|
|
171
|
+
point
|
|
172
|
+
size="md"
|
|
173
|
+
style={s.done}
|
|
163
174
|
onPress={action.onPress}
|
|
164
175
|
disabled={action.disabled}
|
|
165
176
|
loading={action.loading}
|
|
166
177
|
>
|
|
167
178
|
{action.label}
|
|
168
179
|
</Button>
|
|
169
|
-
|
|
170
|
-
|
|
180
|
+
) : null}
|
|
181
|
+
{confirm ? (
|
|
182
|
+
<PressableBase
|
|
183
|
+
onPress={confirm.onPress}
|
|
184
|
+
accessibilityLabel={confirm.label}
|
|
185
|
+
style={s.tool}
|
|
186
|
+
>
|
|
187
|
+
<CheckGlyph color={t.colors.primary} size={t.iconSize.md} />
|
|
188
|
+
</PressableBase>
|
|
189
|
+
) : null}
|
|
190
|
+
</View>
|
|
171
191
|
</View>
|
|
172
192
|
);
|
|
173
193
|
}
|
|
@@ -3,7 +3,6 @@ import { Text } from '../../components/text/text';
|
|
|
3
3
|
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
4
4
|
import { PressableBase } from '../../internal/pressable-base';
|
|
5
5
|
import { useTheme } from '../../theme/theme-provider';
|
|
6
|
-
import type { Theme } from '../../types';
|
|
7
6
|
import { makeStyles } from '../../utils/styles';
|
|
8
7
|
|
|
9
8
|
export type StudioDockItem = {
|
|
@@ -19,71 +18,54 @@ export type StudioDockProps = {
|
|
|
19
18
|
bottomInset?: number;
|
|
20
19
|
};
|
|
21
20
|
|
|
22
|
-
const TOOL = { width: 72, height: 56 } as const;
|
|
23
|
-
|
|
24
|
-
function dockBottom(t: Theme, bottomInset = 0) {
|
|
25
|
-
return Math.max(bottomInset, t.space[4]);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function studioDockSpace(t: Theme, bottomInset?: number): number {
|
|
29
|
-
return dockBottom(t, bottomInset) + TOOL.height + t.space[1] * 2 + t.space[4];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
21
|
const useStyles = makeStyles((t) => ({
|
|
33
|
-
wrap: {
|
|
34
|
-
position: 'absolute',
|
|
35
|
-
left: 0,
|
|
36
|
-
right: 0,
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
},
|
|
39
22
|
dock: {
|
|
40
23
|
flexDirection: 'row',
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
paddingTop: t.space[1],
|
|
25
|
+
paddingHorizontal: t.space[2],
|
|
26
|
+
borderTopWidth: 1,
|
|
27
|
+
borderTopColor: t.colors.border,
|
|
45
28
|
backgroundColor: t.colors.surface,
|
|
46
|
-
boxShadow: t.shadow.lift,
|
|
47
29
|
},
|
|
48
30
|
tool: {
|
|
49
|
-
|
|
50
|
-
height: TOOL.height,
|
|
31
|
+
flex: 1,
|
|
51
32
|
alignItems: 'center',
|
|
52
33
|
justifyContent: 'center',
|
|
53
34
|
gap: t.space[1],
|
|
35
|
+
paddingVertical: t.space[2],
|
|
54
36
|
borderRadius: t.radius.md,
|
|
55
37
|
},
|
|
56
|
-
label: { color: t.colors.title },
|
|
57
38
|
}));
|
|
58
39
|
|
|
59
|
-
export function StudioDock({ items, bottomInset }: StudioDockProps) {
|
|
40
|
+
export function StudioDock({ items, bottomInset = 0 }: StudioDockProps) {
|
|
60
41
|
const t = useTheme();
|
|
61
42
|
const s = useStyles();
|
|
62
43
|
return (
|
|
63
44
|
<View
|
|
64
|
-
|
|
65
|
-
style={[s.
|
|
45
|
+
accessibilityRole="toolbar"
|
|
46
|
+
style={[s.dock, { paddingBottom: Math.max(bottomInset, t.space[2]) }]}
|
|
66
47
|
>
|
|
67
|
-
|
|
68
|
-
|
|
48
|
+
{items.map((item) => {
|
|
49
|
+
const color = item.disabled
|
|
50
|
+
? t.colors.disabledForeground
|
|
51
|
+
: t.colors.title;
|
|
52
|
+
return (
|
|
69
53
|
<PressableBase
|
|
70
54
|
key={item.key}
|
|
71
55
|
onPress={item.onPress}
|
|
72
56
|
disabled={item.disabled}
|
|
57
|
+
disabledStyle={{}}
|
|
73
58
|
accessibilityLabel={item.label}
|
|
74
59
|
feedback="small"
|
|
75
60
|
style={s.tool}
|
|
76
61
|
>
|
|
77
|
-
{renderIcon(item.icon, {
|
|
78
|
-
|
|
79
|
-
size: t.iconSize.md,
|
|
80
|
-
})}
|
|
81
|
-
<Text variant="caption" numberOfLines={1} style={s.label}>
|
|
62
|
+
{renderIcon(item.icon, { color, size: t.space[6] })}
|
|
63
|
+
<Text variant="caption" numberOfLines={1} style={{ color }}>
|
|
82
64
|
{item.label}
|
|
83
65
|
</Text>
|
|
84
66
|
</PressableBase>
|
|
85
|
-
)
|
|
86
|
-
|
|
67
|
+
);
|
|
68
|
+
})}
|
|
87
69
|
</View>
|
|
88
70
|
);
|
|
89
71
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { MoreGlyph } from '../../internal/glyphs';
|
|
3
|
+
import type { IconRenderProps } from '../../internal/icon';
|
|
4
|
+
|
|
5
|
+
export { RetryGlyph } from '../../internal/retry-glyph';
|
|
6
|
+
|
|
7
|
+
const OPEN = 'transparent';
|
|
8
|
+
|
|
9
|
+
const g = StyleSheet.create({
|
|
10
|
+
center: { alignItems: 'center', justifyContent: 'center' },
|
|
11
|
+
arc: { position: 'absolute', transform: [{ rotate: '45deg' }] },
|
|
12
|
+
turn: { transform: [{ rotate: '90deg' }] },
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export function MinusGlyph({ color, size }: IconRenderProps) {
|
|
16
|
+
const stroke = Math.max(1.5, size / 16);
|
|
17
|
+
return (
|
|
18
|
+
<View style={[g.center, { width: size, height: size }]}>
|
|
19
|
+
<View
|
|
20
|
+
style={{
|
|
21
|
+
width: size * 0.6,
|
|
22
|
+
height: stroke,
|
|
23
|
+
borderRadius: stroke,
|
|
24
|
+
backgroundColor: color,
|
|
25
|
+
}}
|
|
26
|
+
/>
|
|
27
|
+
</View>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function WaveGlyph({ color, size }: IconRenderProps) {
|
|
32
|
+
const stroke = Math.max(1.5, size / 14);
|
|
33
|
+
const ring = size * 0.4;
|
|
34
|
+
const top = (size - ring) / 2;
|
|
35
|
+
const arc = {
|
|
36
|
+
width: ring,
|
|
37
|
+
height: ring,
|
|
38
|
+
top,
|
|
39
|
+
borderRadius: ring / 2,
|
|
40
|
+
borderWidth: stroke,
|
|
41
|
+
borderColor: OPEN,
|
|
42
|
+
};
|
|
43
|
+
return (
|
|
44
|
+
<View style={{ width: size, height: size }}>
|
|
45
|
+
<View
|
|
46
|
+
style={[
|
|
47
|
+
g.arc,
|
|
48
|
+
arc,
|
|
49
|
+
{
|
|
50
|
+
left: size / 2 - ring + stroke / 2,
|
|
51
|
+
borderTopColor: color,
|
|
52
|
+
borderLeftColor: color,
|
|
53
|
+
},
|
|
54
|
+
]}
|
|
55
|
+
/>
|
|
56
|
+
<View
|
|
57
|
+
style={[
|
|
58
|
+
g.arc,
|
|
59
|
+
arc,
|
|
60
|
+
{
|
|
61
|
+
left: size / 2 - stroke / 2,
|
|
62
|
+
borderBottomColor: color,
|
|
63
|
+
borderRightColor: color,
|
|
64
|
+
},
|
|
65
|
+
]}
|
|
66
|
+
/>
|
|
67
|
+
</View>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function DotsGlyph({ color, size }: IconRenderProps) {
|
|
72
|
+
return (
|
|
73
|
+
<View style={g.turn}>
|
|
74
|
+
<MoreGlyph color={color} size={size} />
|
|
75
|
+
</View>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -16,13 +16,17 @@ export type StudioSheetProps = {
|
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
const OFFSET = /(^|,\s*)(-?[\d.]+px)\s+([\d.]+px)/g;
|
|
20
|
+
|
|
21
|
+
const raise = (shadow: string) => shadow.replace(OFFSET, '$1$2 -$3');
|
|
22
|
+
|
|
19
23
|
const useStyles = makeStyles((t) => ({
|
|
20
24
|
sheet: {
|
|
21
25
|
paddingTop: t.space[2],
|
|
22
|
-
borderTopLeftRadius: t.radius.
|
|
23
|
-
borderTopRightRadius: t.radius.
|
|
26
|
+
borderTopLeftRadius: t.radius.md * 2,
|
|
27
|
+
borderTopRightRadius: t.radius.md * 2,
|
|
24
28
|
backgroundColor: t.colors.surface,
|
|
25
|
-
boxShadow: t.shadow.lift,
|
|
29
|
+
boxShadow: raise(t.shadow.lift),
|
|
26
30
|
},
|
|
27
31
|
}));
|
|
28
32
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { makeStyles } from '../../utils/styles';
|
|
3
|
+
|
|
4
|
+
export type StudioStep = { key: string; label: string };
|
|
5
|
+
|
|
6
|
+
export type StudioStepsProps = {
|
|
7
|
+
steps: readonly StudioStep[];
|
|
8
|
+
current: string | null;
|
|
9
|
+
done?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const useStyles = makeStyles((t) => ({
|
|
13
|
+
row: {
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
gap: t.space[1],
|
|
16
|
+
paddingHorizontal: t.space[4],
|
|
17
|
+
paddingBottom: t.space[2],
|
|
18
|
+
},
|
|
19
|
+
track: {
|
|
20
|
+
flex: 1,
|
|
21
|
+
height: t.space[1],
|
|
22
|
+
overflow: 'hidden',
|
|
23
|
+
borderRadius: t.radius.full,
|
|
24
|
+
backgroundColor: t.colors.muted,
|
|
25
|
+
},
|
|
26
|
+
fill: {
|
|
27
|
+
height: '100%',
|
|
28
|
+
borderRadius: t.radius.full,
|
|
29
|
+
backgroundColor: t.colors.primary,
|
|
30
|
+
},
|
|
31
|
+
full: { width: '100%' },
|
|
32
|
+
half: { width: '50%' },
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
export function StudioSteps({ steps, current, done }: StudioStepsProps) {
|
|
36
|
+
const s = useStyles();
|
|
37
|
+
const at = done ? steps.length : steps.findIndex((x) => x.key === current);
|
|
38
|
+
const now = steps[at];
|
|
39
|
+
return (
|
|
40
|
+
<View
|
|
41
|
+
accessible
|
|
42
|
+
accessibilityRole="progressbar"
|
|
43
|
+
accessibilityLabel={now?.label}
|
|
44
|
+
accessibilityValue={{ min: 0, max: steps.length, now: Math.max(0, at) }}
|
|
45
|
+
style={s.row}
|
|
46
|
+
>
|
|
47
|
+
{steps.map((step, i) => (
|
|
48
|
+
<View key={step.key} style={s.track}>
|
|
49
|
+
{i < at ? (
|
|
50
|
+
<View style={[s.fill, s.full]} />
|
|
51
|
+
) : i === at ? (
|
|
52
|
+
<View style={[s.fill, s.half]} />
|
|
53
|
+
) : null}
|
|
54
|
+
</View>
|
|
55
|
+
))}
|
|
56
|
+
</View>
|
|
57
|
+
);
|
|
58
|
+
}
|