@podoba/react 0.0.58 → 0.0.59
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podoba/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "podoba React components — React Aria Components + Tailwind primitives + layout, built with uic.",
|
|
6
6
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"typecheck": "tsc --build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@podoba/tokens": "^0.0.
|
|
36
|
-
"@podoba/tailwind": "^0.0.
|
|
35
|
+
"@podoba/tokens": "^0.0.59",
|
|
36
|
+
"@podoba/tailwind": "^0.0.59",
|
|
37
37
|
"react-aria-components": "1.20.0",
|
|
38
38
|
"class-variance-authority": "0.7.1",
|
|
39
39
|
"clsx": "2.1.1",
|
|
@@ -22,9 +22,9 @@ function Example({ variant = 'create', pending = false, error = false, wide = fa
|
|
|
22
22
|
</SettingsDialogSurface>
|
|
23
23
|
</>
|
|
24
24
|
}
|
|
25
|
-
function ProductionExample() {
|
|
25
|
+
function ProductionExample({ light = false }: { light?: boolean }) {
|
|
26
26
|
const [open, setOpen] = useState(false)
|
|
27
|
-
return <><Button onPress={() => setOpen(true)}>Open production settings</Button><ProductionSettingsDialog isOpen={open} onOpenChange={setOpen} prefix="Template settings" title="Poster" description="Configure production details." closeLabel="Close settings" preview={<span>Artwork preview</span>} footer={<><ProductionSettingsAction variant="secondary" onPress={() => setOpen(false)}>Close</ProductionSettingsAction><ProductionSettingsAction isDisabled>Save</ProductionSettingsAction></>}><SettingsDialogDisclosure title="General"><Input label="Name" appearance="filled" defaultValue="Poster" /></SettingsDialogDisclosure></ProductionSettingsDialog></>
|
|
27
|
+
return <><Button onPress={() => setOpen(true)}>Open production settings</Button><ProductionSettingsDialog isOpen={open} onOpenChange={setOpen} previewTone={light ? "light" : "dark"} prefix="Template settings" title="Poster" description="Configure production details." closeLabel="Close settings" preview={<span>Artwork preview</span>} footer={<><ProductionSettingsAction variant="secondary" onPress={() => setOpen(false)}>Close</ProductionSettingsAction><ProductionSettingsAction isDisabled>Save</ProductionSettingsAction></>}><SettingsDialogDisclosure title="General"><Input label="Name" appearance="filled" defaultValue="Poster" /></SettingsDialogDisclosure></ProductionSettingsDialog></>
|
|
28
28
|
}
|
|
29
29
|
function WizardExample({ expanded = false, pending = false }: { expanded?: boolean; pending?: boolean }) {
|
|
30
30
|
const [open, setOpen] = useState(false)
|
|
@@ -34,7 +34,7 @@ export const examples = {
|
|
|
34
34
|
wizard: () => <WizardExample />,
|
|
35
35
|
wizardSizes: () => <><WizardExample /><WizardExample expanded /></>,
|
|
36
36
|
wizardPending: () => <WizardExample pending />,
|
|
37
|
-
production: () =>
|
|
37
|
+
production: () => <><ProductionExample /><ProductionExample light /></>,
|
|
38
38
|
default: () => <Example />,
|
|
39
39
|
productionColumns: () => <SettingsDialogProductionColumns><Input label="Material" appearance="filled" /><Input label="Surface finish" appearance="filled" /></SettingsDialogProductionColumns>,
|
|
40
40
|
disclosures: () => <><SettingsDialogDisclosure title="Settings" description="Campaign templates"><Input label="Name" appearance="filled" defaultValue="Poster" /></SettingsDialogDisclosure><SettingsDialogDisclosure title="Print" description="Available for Print templates" defaultExpanded={false}><Input label="Material" appearance="filled" isDisabled /></SettingsDialogDisclosure></>,
|
|
@@ -495,10 +495,6 @@ const ProductionFooter = uic('footer', {
|
|
|
495
495
|
const ProductionPreview = uic('aside', {
|
|
496
496
|
displayName: 'ProductionSettingsPreview',
|
|
497
497
|
baseClass: 'relative grid min-h-0 min-w-0 place-items-center overflow-hidden p-10',
|
|
498
|
-
style: {
|
|
499
|
-
background:
|
|
500
|
-
'radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--color-surface) 8%, transparent) 0, transparent 42%), color-mix(in srgb, var(--color-fg) 84%, var(--color-surface))',
|
|
501
|
-
},
|
|
502
498
|
})
|
|
503
499
|
const ProductionArtwork = uic('div', {
|
|
504
500
|
displayName: 'ProductionSettingsArtwork',
|
|
@@ -524,11 +520,14 @@ export function ProductionSettingsDialog({
|
|
|
524
520
|
testId = 'production-settings',
|
|
525
521
|
isPending = false,
|
|
526
522
|
previewSize = 'contained',
|
|
523
|
+
previewTone = 'dark',
|
|
527
524
|
previewLabel,
|
|
528
525
|
}: {
|
|
529
526
|
isPending?: boolean
|
|
530
527
|
previewLabel?: string
|
|
531
528
|
previewSize?: 'contained' | 'full'
|
|
529
|
+
/** Background tone of the preview pane; defaults to dark. */
|
|
530
|
+
previewTone?: 'dark' | 'light'
|
|
532
531
|
isOpen: boolean
|
|
533
532
|
onOpenChange: (open: boolean) => void
|
|
534
533
|
prefix: ReactNode
|
|
@@ -599,6 +598,7 @@ export function ProductionSettingsDialog({
|
|
|
599
598
|
<ProductionFooter>{footer}</ProductionFooter>
|
|
600
599
|
</section>
|
|
601
600
|
<ProductionPreview
|
|
601
|
+
style={{ background: previewTone === 'light' ? 'var(--color-surface-card)' : 'radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--color-surface) 8%, transparent) 0, transparent 42%), color-mix(in srgb, var(--color-fg) 84%, var(--color-surface))' }}
|
|
602
602
|
aria-label={previewLabel}
|
|
603
603
|
className={compact ? 'col-start-1 row-start-1' : undefined}
|
|
604
604
|
data-testid={`${testId}-preview`}
|
|
@@ -615,7 +615,7 @@ export function ProductionSettingsDialog({
|
|
|
615
615
|
aria-label={closeLabel}
|
|
616
616
|
isDisabled={isPending}
|
|
617
617
|
onPress={() => onOpenChange(false)}
|
|
618
|
-
className=
|
|
618
|
+
className={`absolute right-4 top-4 z-20 h-9 w-9 rounded-md p-0 hover:bg-transparent ${previewTone === 'light' ? 'text-fg-muted hover:text-fg' : 'text-white/60 hover:text-white'}`}
|
|
619
619
|
>
|
|
620
620
|
<svg
|
|
621
621
|
width="18"
|