@ankhorage/zora 12.1.0 → 14.0.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 +16 -0
- package/README.md +11 -5
- package/dist/features/accordion/accordionItemMeta.d.ts +53 -0
- package/dist/features/accordion/accordionItemMeta.d.ts.map +1 -0
- package/dist/features/accordion/accordionItemMeta.js +45 -0
- package/dist/features/accordion/accordionItemMeta.js.map +1 -0
- package/dist/features/accordion/accordionMeta.d.ts +36 -0
- package/dist/features/accordion/accordionMeta.d.ts.map +1 -0
- package/dist/features/accordion/accordionMeta.js +33 -0
- package/dist/features/accordion/accordionMeta.js.map +1 -0
- package/dist/features/accordion/adapters/inbound/Accordion.d.ts +5 -0
- package/dist/features/accordion/adapters/inbound/Accordion.d.ts.map +1 -0
- package/dist/features/accordion/adapters/inbound/Accordion.js +41 -0
- package/dist/features/accordion/adapters/inbound/Accordion.js.map +1 -0
- package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts +5 -0
- package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts.map +1 -0
- package/dist/features/accordion/adapters/inbound/AccordionItem.js +52 -0
- package/dist/features/accordion/adapters/inbound/AccordionItem.js.map +1 -0
- package/dist/features/accordion/composition/AccordionPresentationContext.d.ts +4 -0
- package/dist/features/accordion/composition/AccordionPresentationContext.d.ts.map +1 -0
- package/dist/features/accordion/composition/AccordionPresentationContext.js +3 -0
- package/dist/features/accordion/composition/AccordionPresentationContext.js.map +1 -0
- package/dist/features/accordion/public.d.ts +4 -0
- package/dist/features/accordion/public.d.ts.map +1 -0
- package/dist/features/accordion/public.js +3 -0
- package/dist/features/accordion/public.js.map +1 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/date-picker/adapters/inbound/DatePicker.d.ts +1 -6
- package/dist/features/date-picker/adapters/inbound/DatePicker.d.ts.map +1 -1
- package/dist/features/date-picker/adapters/inbound/DatePicker.js +1 -175
- package/dist/features/date-picker/adapters/inbound/DatePicker.js.map +1 -1
- package/dist/features/date-picker/adapters/inbound/DatePicker.native.d.ts +5 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.native.d.ts.map +1 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.native.js +27 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.native.js.map +1 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.web.d.ts +5 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.web.d.ts.map +1 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.web.js +25 -0
- package/dist/features/date-picker/adapters/inbound/DatePicker.web.js.map +1 -0
- package/dist/features/date-picker/composition/DatePickerContent.d.ts +10 -0
- package/dist/features/date-picker/composition/DatePickerContent.d.ts.map +1 -0
- package/dist/features/date-picker/composition/DatePickerContent.js +129 -0
- package/dist/features/date-picker/composition/DatePickerContent.js.map +1 -0
- package/dist/features/date-picker/composition/DatePickerField.d.ts +9 -0
- package/dist/features/date-picker/composition/DatePickerField.d.ts.map +1 -0
- package/dist/features/date-picker/composition/DatePickerField.js +21 -0
- package/dist/features/date-picker/composition/DatePickerField.js.map +1 -0
- package/dist/features/date-picker/composition/DatePickerTrigger.d.ts +9 -0
- package/dist/features/date-picker/composition/DatePickerTrigger.d.ts.map +1 -0
- package/dist/features/date-picker/composition/DatePickerTrigger.js +18 -0
- package/dist/features/date-picker/composition/DatePickerTrigger.js.map +1 -0
- package/dist/features/gradient/gradientMeta.d.ts +1 -1
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
- package/dist/features/layout/boxMeta.d.ts +1 -1
- package/dist/features/layout/containerMeta.d.ts +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/stackMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/features/time-picker/adapters/inbound/TimePicker.d.ts +1 -6
- package/dist/features/time-picker/adapters/inbound/TimePicker.d.ts.map +1 -1
- package/dist/features/time-picker/adapters/inbound/TimePicker.js +1 -116
- package/dist/features/time-picker/adapters/inbound/TimePicker.js.map +1 -1
- package/dist/features/time-picker/adapters/inbound/TimePicker.native.d.ts +5 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.native.d.ts.map +1 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.native.js +26 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.native.js.map +1 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.web.d.ts +5 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.web.d.ts.map +1 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.web.js +24 -0
- package/dist/features/time-picker/adapters/inbound/TimePicker.web.js.map +1 -0
- package/dist/features/time-picker/composition/TimePickerContent.d.ts +10 -0
- package/dist/features/time-picker/composition/TimePickerContent.d.ts.map +1 -0
- package/dist/features/time-picker/composition/TimePickerContent.js +78 -0
- package/dist/features/time-picker/composition/TimePickerContent.js.map +1 -0
- package/dist/features/time-picker/composition/TimePickerField.d.ts +9 -0
- package/dist/features/time-picker/composition/TimePickerField.d.ts.map +1 -0
- package/dist/features/time-picker/composition/TimePickerField.js +21 -0
- package/dist/features/time-picker/composition/TimePickerField.js.map +1 -0
- package/dist/features/time-picker/composition/TimePickerTrigger.d.ts +8 -0
- package/dist/features/time-picker/composition/TimePickerTrigger.d.ts.map +1 -0
- package/dist/features/time-picker/composition/TimePickerTrigger.js +9 -0
- package/dist/features/time-picker/composition/TimePickerTrigger.js.map +1 -0
- package/dist/features/toast/adapters/inbound/Toast.d.ts +5 -0
- package/dist/features/toast/adapters/inbound/Toast.d.ts.map +1 -0
- package/dist/features/toast/adapters/inbound/Toast.js +10 -0
- package/dist/features/toast/adapters/inbound/Toast.js.map +1 -0
- package/dist/features/toast/adapters/inbound/ToastProvider.d.ts +5 -0
- package/dist/features/toast/adapters/inbound/ToastProvider.d.ts.map +1 -0
- package/dist/features/toast/adapters/inbound/ToastProvider.js +7 -0
- package/dist/features/toast/adapters/inbound/ToastProvider.js.map +1 -0
- package/dist/features/toast/public.d.ts +5 -0
- package/dist/features/toast/public.d.ts.map +1 -0
- package/dist/features/toast/public.js +4 -0
- package/dist/features/toast/public.js.map +1 -0
- package/dist/features/toast/toastMeta.d.ts +9 -0
- package/dist/features/toast/toastMeta.d.ts.map +1 -0
- package/dist/features/toast/toastMeta.js +9 -0
- package/dist/features/toast/toastMeta.js.map +1 -0
- package/dist/features/toast/toastProviderMeta.d.ts +9 -0
- package/dist/features/toast/toastProviderMeta.d.ts.map +1 -0
- package/dist/features/toast/toastProviderMeta.js +9 -0
- package/dist/features/toast/toastProviderMeta.js.map +1 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/screen/meta.d.ts +1 -1
- package/dist/layout/screen-section/meta.d.ts +1 -1
- package/dist/metadata/allowedChildren.d.ts +3 -3
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +1 -0
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +2 -2
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +6 -3
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/meta.d.ts +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/patterns/selection/SelectionProvider.d.ts +0 -4
- package/dist/patterns/selection/SelectionProvider.d.ts.map +1 -1
- package/dist/patterns/selection/SelectionProvider.js +4 -6
- package/dist/patterns/selection/SelectionProvider.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +4 -3
- package/dist/registry.js.map +1 -1
- package/dist/theme/ZoraProvider.d.ts +4 -10
- package/dist/theme/ZoraProvider.d.ts.map +1 -1
- package/dist/theme/ZoraProvider.js +8 -6
- package/dist/theme/ZoraProvider.js.map +1 -1
- package/dist/theme/ZoraRuntimeCapabilities.d.ts +2 -0
- package/dist/theme/ZoraRuntimeCapabilities.d.ts.map +1 -0
- package/dist/theme/ZoraRuntimeCapabilities.js +2 -0
- package/dist/theme/ZoraRuntimeCapabilities.js.map +1 -0
- package/dist/theme/ZoraRuntimeCapabilities.native.d.ts +4 -0
- package/dist/theme/ZoraRuntimeCapabilities.native.d.ts.map +1 -0
- package/dist/theme/ZoraRuntimeCapabilities.native.js +8 -0
- package/dist/theme/ZoraRuntimeCapabilities.native.js.map +1 -0
- package/dist/theme/ZoraRuntimeCapabilities.web.d.ts +4 -0
- package/dist/theme/ZoraRuntimeCapabilities.web.d.ts.map +1 -0
- package/dist/theme/ZoraRuntimeCapabilities.web.js +8 -0
- package/dist/theme/ZoraRuntimeCapabilities.web.js.map +1 -0
- package/dist/theme/ZoraThemeRuntimeContext.d.ts +1 -0
- package/dist/theme/ZoraThemeRuntimeContext.d.ts.map +1 -1
- package/dist/theme/ZoraThemeRuntimeContext.js +3 -2
- package/dist/theme/ZoraThemeRuntimeContext.js.map +1 -1
- package/dist/theme/ZoraThemeScope.d.ts +1 -0
- package/dist/theme/ZoraThemeScope.d.ts.map +1 -1
- package/dist/theme/ZoraThemeScope.js +12 -10
- package/dist/theme/ZoraThemeScope.js.map +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/types/accordion.d.ts +23 -0
- package/dist/types/accordion.d.ts.map +1 -0
- package/dist/types/accordion.js +2 -0
- package/dist/types/accordion.js.map +1 -0
- package/dist/types/provider.d.ts +19 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/provider.js +2 -0
- package/dist/types/provider.js.map +1 -0
- package/dist/types/toast.d.ts +9 -0
- package/dist/types/toast.d.ts.map +1 -0
- package/dist/types/toast.js +2 -0
- package/dist/types/toast.js.map +1 -0
- package/package.json +2 -2
- package/src/features/accordion/accordionItemMeta.ts +46 -0
- package/src/features/accordion/accordionMeta.ts +34 -0
- package/src/features/accordion/adapters/inbound/Accordion.tsx +94 -0
- package/src/features/accordion/adapters/inbound/AccordionItem.tsx +86 -0
- package/src/features/accordion/composition/AccordionPresentationContext.ts +6 -0
- package/src/features/accordion/public.ts +9 -0
- package/src/features/bottom-sheet/public.test.ts +15 -12
- package/src/features/date-picker/adapters/inbound/DatePicker.native.tsx +46 -0
- package/src/features/date-picker/adapters/inbound/DatePicker.tsx +1 -356
- package/src/features/date-picker/adapters/inbound/DatePicker.web.tsx +48 -0
- package/src/features/date-picker/composition/DatePickerContent.tsx +256 -0
- package/src/features/date-picker/composition/DatePickerField.tsx +53 -0
- package/src/features/date-picker/composition/DatePickerTrigger.tsx +47 -0
- package/src/features/date-picker/public.test.ts +14 -4
- package/src/features/time-picker/adapters/inbound/TimePicker.native.tsx +47 -0
- package/src/features/time-picker/adapters/inbound/TimePicker.tsx +1 -258
- package/src/features/time-picker/adapters/inbound/TimePicker.web.tsx +49 -0
- package/src/features/time-picker/composition/TimePickerContent.tsx +164 -0
- package/src/features/time-picker/composition/TimePickerField.tsx +53 -0
- package/src/features/time-picker/composition/TimePickerTrigger.tsx +35 -0
- package/src/features/time-picker/public.test.ts +14 -3
- package/src/features/toast/adapters/inbound/Toast.tsx +13 -0
- package/src/features/toast/adapters/inbound/ToastProvider.tsx +9 -0
- package/src/features/toast/public.test.ts +19 -0
- package/src/features/toast/public.ts +10 -0
- package/src/features/toast/toastMeta.ts +10 -0
- package/src/features/toast/toastProviderMeta.ts +10 -0
- package/src/index.ts +17 -4
- package/src/metadata/allowedChildren.ts +1 -0
- package/src/metadata/componentMeta.test.ts +9 -0
- package/src/metadata/componentMeta.ts +6 -3
- package/src/patterns/selection/SelectionProvider.tsx +4 -6
- package/src/registry.ts +4 -3
- package/src/showcaseCoverage.test.ts +2 -1
- package/src/theme/ZoraProvider.tsx +11 -13
- package/src/theme/ZoraRuntimeCapabilities.native.tsx +19 -0
- package/src/theme/ZoraRuntimeCapabilities.tsx +1 -0
- package/src/theme/ZoraRuntimeCapabilities.web.tsx +10 -0
- package/src/theme/ZoraThemeRuntimeContext.tsx +3 -2
- package/src/theme/ZoraThemeScope.tsx +14 -12
- package/src/theme/index.ts +1 -1
- package/src/theme/themeConfigScope.test.ts +4 -1
- package/src/theme/themeScopeStructure.test.ts +27 -18
- package/src/types/accordion.ts +38 -0
- package/src/types/provider.ts +22 -0
- package/src/{components/toast/types.ts → types/toast.ts} +5 -7
- package/dist/components/toast/Toast.d.ts +0 -9
- package/dist/components/toast/Toast.d.ts.map +0 -1
- package/dist/components/toast/Toast.js +0 -13
- package/dist/components/toast/Toast.js.map +0 -1
- package/dist/components/toast/ToastProvider.d.ts +0 -9
- package/dist/components/toast/ToastProvider.d.ts.map +0 -1
- package/dist/components/toast/ToastProvider.js +0 -14
- package/dist/components/toast/ToastProvider.js.map +0 -1
- package/dist/components/toast/index.d.ts +0 -5
- package/dist/components/toast/index.d.ts.map +0 -1
- package/dist/components/toast/index.js +0 -4
- package/dist/components/toast/index.js.map +0 -1
- package/dist/components/toast/meta.d.ts +0 -17
- package/dist/components/toast/meta.d.ts.map +0 -1
- package/dist/components/toast/meta.js +0 -17
- package/dist/components/toast/meta.js.map +0 -1
- package/dist/components/toast/types.d.ts +0 -12
- package/dist/components/toast/types.d.ts.map +0 -1
- package/dist/components/toast/types.js +0 -2
- package/dist/components/toast/types.js.map +0 -1
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts +0 -9
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts.map +0 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js +0 -86
- package/dist/patterns/disclosure-section/DisclosureSection.js.map +0 -1
- package/dist/patterns/disclosure-section/index.d.ts +0 -3
- package/dist/patterns/disclosure-section/index.d.ts.map +0 -1
- package/dist/patterns/disclosure-section/index.js +0 -3
- package/dist/patterns/disclosure-section/index.js.map +0 -1
- package/dist/patterns/disclosure-section/meta.d.ts +0 -9
- package/dist/patterns/disclosure-section/meta.d.ts.map +0 -1
- package/dist/patterns/disclosure-section/meta.js +0 -9
- package/dist/patterns/disclosure-section/meta.js.map +0 -1
- package/dist/patterns/disclosure-section/types.d.ts +0 -15
- package/dist/patterns/disclosure-section/types.d.ts.map +0 -1
- package/dist/patterns/disclosure-section/types.js +0 -2
- package/dist/patterns/disclosure-section/types.js.map +0 -1
- package/src/components/toast/Toast.tsx +0 -16
- package/src/components/toast/ToastProvider.tsx +0 -17
- package/src/components/toast/index.ts +0 -4
- package/src/components/toast/meta.ts +0 -19
- package/src/patterns/disclosure-section/DisclosureSection.tsx +0 -130
- package/src/patterns/disclosure-section/index.ts +0 -2
- package/src/patterns/disclosure-section/meta.ts +0 -10
- package/src/patterns/disclosure-section/types.ts +0 -16
|
@@ -57,12 +57,16 @@ const scopedComponentFiles = [
|
|
|
57
57
|
join(srcDir, 'features', 'list', 'adapters', 'inbound', 'SectionList.tsx'),
|
|
58
58
|
join(srcDir, 'features', 'bottom-sheet', 'adapters', 'inbound', 'BottomSheet.tsx'),
|
|
59
59
|
join(srcDir, 'components', 'app-bar', 'AppBar.tsx'),
|
|
60
|
+
join(srcDir, 'features', 'accordion', 'adapters', 'inbound', 'Accordion.tsx'),
|
|
61
|
+
join(srcDir, 'features', 'accordion', 'adapters', 'inbound', 'AccordionItem.tsx'),
|
|
60
62
|
join(srcDir, 'features', 'badge', 'adapters', 'inbound', 'Badge.tsx'),
|
|
61
63
|
join(srcDir, 'features', 'button', 'adapters', 'inbound', 'Button.tsx'),
|
|
62
64
|
join(srcDir, 'features', 'button', 'adapters', 'inbound', 'ButtonGroup.tsx'),
|
|
63
65
|
join(srcDir, 'features', 'card', 'adapters', 'inbound', 'Card.tsx'),
|
|
64
66
|
join(srcDir, 'features', 'card', 'adapters', 'inbound', 'MediaCard.tsx'),
|
|
65
67
|
join(srcDir, 'features', 'card', 'adapters', 'inbound', 'MetricCard.tsx'),
|
|
68
|
+
join(srcDir, 'features', 'date-picker', 'adapters', 'inbound', 'DatePicker.native.tsx'),
|
|
69
|
+
join(srcDir, 'features', 'date-picker', 'adapters', 'inbound', 'DatePicker.web.tsx'),
|
|
66
70
|
join(srcDir, 'features', 'form', 'checkbox', 'adapters', 'inbound', 'Checkbox.tsx'),
|
|
67
71
|
join(srcDir, 'features', 'form', 'checkbox', 'adapters', 'inbound', 'CheckboxGroup.tsx'),
|
|
68
72
|
join(srcDir, 'features', 'form', 'adapters', 'inbound', 'Form.tsx'),
|
|
@@ -80,6 +84,9 @@ const scopedComponentFiles = [
|
|
|
80
84
|
join(srcDir, 'components', 'rating', 'Rating.tsx'),
|
|
81
85
|
join(srcDir, 'components', 'select', 'Select.tsx'),
|
|
82
86
|
join(srcDir, 'components', 'tabs', 'Tabs.tsx'),
|
|
87
|
+
join(srcDir, 'features', 'time-picker', 'adapters', 'inbound', 'TimePicker.native.tsx'),
|
|
88
|
+
join(srcDir, 'features', 'time-picker', 'adapters', 'inbound', 'TimePicker.web.tsx'),
|
|
89
|
+
join(srcDir, 'features', 'toast', 'adapters', 'inbound', 'Toast.tsx'),
|
|
83
90
|
join(srcDir, 'features', 'typography', 'adapters', 'inbound', 'Text.tsx'),
|
|
84
91
|
join(srcDir, 'components', 'toolbar', 'Toolbar.tsx'),
|
|
85
92
|
join(srcDir, 'components', 'toolbar', 'ToolbarAction.tsx'),
|
|
@@ -98,7 +105,6 @@ const scopedComponentFiles = [
|
|
|
98
105
|
join(srcDir, 'features', 'gradient', 'adapters', 'inbound', 'Gradient.tsx'),
|
|
99
106
|
join(srcDir, 'patterns', 'collection-editor', 'CollectionEditor.tsx'),
|
|
100
107
|
join(srcDir, 'patterns', 'confirm-dialog', 'ConfirmDialog.tsx'),
|
|
101
|
-
join(srcDir, 'patterns', 'disclosure-section', 'DisclosureSection.tsx'),
|
|
102
108
|
join(srcDir, 'features', 'empty-state', 'adapters', 'inbound', 'EmptyState.tsx'),
|
|
103
109
|
join(srcDir, 'patterns', 'inspector-field', 'InspectorField.tsx'),
|
|
104
110
|
join(srcDir, 'patterns', 'list', 'List.tsx'),
|
|
@@ -129,6 +135,7 @@ const scopedComponentFiles = [
|
|
|
129
135
|
|
|
130
136
|
const scopedPropTypeFiles = [
|
|
131
137
|
join(srcDir, 'components', 'app-bar', 'types.ts'),
|
|
138
|
+
join(srcDir, 'types', 'accordion.ts'),
|
|
132
139
|
join(srcDir, 'types', 'badge.ts'),
|
|
133
140
|
join(srcDir, 'types', 'button.ts'),
|
|
134
141
|
join(srcDir, 'types', 'button-group.ts'),
|
|
@@ -136,6 +143,7 @@ const scopedPropTypeFiles = [
|
|
|
136
143
|
join(srcDir, 'types', 'media-card.ts'),
|
|
137
144
|
join(srcDir, 'types', 'metric-card.ts'),
|
|
138
145
|
join(srcDir, 'types', 'checkbox.ts'),
|
|
146
|
+
join(srcDir, 'types', 'date-picker.ts'),
|
|
139
147
|
join(srcDir, 'types', 'form.ts'),
|
|
140
148
|
join(srcDir, 'types', 'heading.ts'),
|
|
141
149
|
join(srcDir, 'types', 'icon.ts'),
|
|
@@ -148,6 +156,8 @@ const scopedPropTypeFiles = [
|
|
|
148
156
|
join(srcDir, 'components', 'select', 'types.ts'),
|
|
149
157
|
join(srcDir, 'components', 'tabs', 'types.ts'),
|
|
150
158
|
join(srcDir, 'types', 'text.ts'),
|
|
159
|
+
join(srcDir, 'types', 'time-picker.ts'),
|
|
160
|
+
join(srcDir, 'types', 'toast.ts'),
|
|
151
161
|
join(srcDir, 'components', 'toolbar', 'types.ts'),
|
|
152
162
|
|
|
153
163
|
join(srcDir, 'layout', 'app-shell', 'types.ts'),
|
|
@@ -161,7 +171,6 @@ const scopedPropTypeFiles = [
|
|
|
161
171
|
join(srcDir, 'types', 'gradient.ts'),
|
|
162
172
|
join(srcDir, 'patterns', 'collection-editor', 'types.ts'),
|
|
163
173
|
join(srcDir, 'patterns', 'confirm-dialog', 'types.ts'),
|
|
164
|
-
join(srcDir, 'patterns', 'disclosure-section', 'types.ts'),
|
|
165
174
|
join(srcDir, 'types', 'empty-state.ts'),
|
|
166
175
|
join(srcDir, 'patterns', 'inspector-field', 'types.ts'),
|
|
167
176
|
join(srcDir, 'patterns', 'list', 'types.ts'),
|
|
@@ -178,46 +187,46 @@ const scopedPropTypeFiles = [
|
|
|
178
187
|
describe('theme scope structure', () => {
|
|
179
188
|
it('keeps ZoraProvider lightweight (no extra ResponsiveProvider nesting)', () => {
|
|
180
189
|
expect(zoraProviderSource).toMatch(/ThemeProvider/);
|
|
181
|
-
expect(zoraProviderSource).toMatch(
|
|
190
|
+
expect(zoraProviderSource).toMatch(/<ZoraThemeRuntimeContext\s+value=/u);
|
|
182
191
|
expect(zoraProviderSource).not.toMatch(/ResponsiveProvider/);
|
|
183
192
|
});
|
|
184
193
|
|
|
185
194
|
it('implements nested scopes without nesting Surface ThemeProvider', () => {
|
|
186
|
-
expect(themeScopeSource).toMatch(
|
|
187
|
-
expect(themeScopeSource).toMatch(/createTheme\(/);
|
|
195
|
+
expect(themeScopeSource).toMatch(/<ThemeContext\s+value=/u);
|
|
196
|
+
expect(themeScopeSource).toMatch(/createTheme\(/u);
|
|
188
197
|
expect(themeScopeSource).not.toMatch(/ThemeProvider/);
|
|
189
198
|
});
|
|
190
199
|
|
|
191
200
|
it('wraps components only when mode/themeId overrides are present', () => {
|
|
192
|
-
expect(hocSource).toMatch(/props\.mode === undefined/);
|
|
193
|
-
expect(hocSource).toMatch(/props\.themeId === undefined/);
|
|
194
|
-
expect(hocSource).toMatch(/<ZoraThemeScope/);
|
|
201
|
+
expect(hocSource).toMatch(/props\.mode === undefined/u);
|
|
202
|
+
expect(hocSource).toMatch(/props\.themeId === undefined/u);
|
|
203
|
+
expect(hocSource).toMatch(/<ZoraThemeScope/u);
|
|
195
204
|
});
|
|
196
205
|
|
|
197
206
|
it('adopts the inner + HOC pattern across the public surface', () => {
|
|
198
207
|
for (const filePath of scopedComponentFiles) {
|
|
199
208
|
const source = readFileSync(filePath, 'utf8');
|
|
200
|
-
expect(source).toMatch(/themeId: _themeId/);
|
|
201
|
-
expect(source).toMatch(/mode: _mode/);
|
|
202
|
-
expect(source).toMatch(/withZoraThemeScope/);
|
|
209
|
+
expect(source).toMatch(/themeId: _themeId/u);
|
|
210
|
+
expect(source).toMatch(/mode: _mode/u);
|
|
211
|
+
expect(source).toMatch(/withZoraThemeScope/u);
|
|
203
212
|
}
|
|
204
213
|
});
|
|
205
214
|
|
|
206
215
|
it('adds ZoraBaseProps to public component prop types', () => {
|
|
207
216
|
for (const filePath of scopedPropTypeFiles) {
|
|
208
217
|
const source = readFileSync(filePath, 'utf8');
|
|
209
|
-
expect(source).toMatch(/ZoraBaseProps/);
|
|
210
|
-
expect(source).toMatch(/extends\s+ZoraBaseProps|ZoraBaseProps\s*&|&\s*ZoraBaseProps/);
|
|
218
|
+
expect(source).toMatch(/ZoraBaseProps/u);
|
|
219
|
+
expect(source).toMatch(/extends\s+ZoraBaseProps|ZoraBaseProps\s*&|&\s*ZoraBaseProps/u);
|
|
211
220
|
}
|
|
212
221
|
});
|
|
213
222
|
|
|
214
223
|
it('does not implement theme scoping outside the theme module', () => {
|
|
215
224
|
for (const filePath of scopeGuardFiles) {
|
|
216
225
|
const source = readFileSync(filePath, 'utf8');
|
|
217
|
-
expect(source).not.toMatch(
|
|
218
|
-
expect(source).not.toMatch(/ThemeProvider/);
|
|
219
|
-
expect(source).not.toMatch(/<ZoraThemeScope/);
|
|
220
|
-
expect(source).not.toMatch(/createTheme\(/);
|
|
226
|
+
expect(source).not.toMatch(/<ThemeContext(?:\.Provider)?\b/u);
|
|
227
|
+
expect(source).not.toMatch(/ThemeProvider/u);
|
|
228
|
+
expect(source).not.toMatch(/<ZoraThemeScope/u);
|
|
229
|
+
expect(source).not.toMatch(/createTheme\(/u);
|
|
221
230
|
}
|
|
222
231
|
});
|
|
223
232
|
|
|
@@ -225,7 +234,7 @@ describe('theme scope structure', () => {
|
|
|
225
234
|
const srcFiles = collectSourceFiles(srcDir);
|
|
226
235
|
for (const filePath of srcFiles) {
|
|
227
236
|
const source = readFileSync(filePath, 'utf8');
|
|
228
|
-
expect(source).not.toMatch(/useZoraTheme\(\s*\{/);
|
|
237
|
+
expect(source).not.toMatch(/useZoraTheme\(\s*\{/u);
|
|
229
238
|
}
|
|
230
239
|
});
|
|
231
240
|
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AccordionItemProps as SurfaceAccordionItemProps,
|
|
3
|
+
AccordionMode,
|
|
4
|
+
AccordionMultipleProps as SurfaceAccordionMultipleProps,
|
|
5
|
+
AccordionSingleProps as SurfaceAccordionSingleProps,
|
|
6
|
+
ButtonIconSpec,
|
|
7
|
+
} from '@ankhorage/surface';
|
|
8
|
+
import type React from 'react';
|
|
9
|
+
|
|
10
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
11
|
+
|
|
12
|
+
export type { AccordionMode } from '@ankhorage/surface';
|
|
13
|
+
|
|
14
|
+
export type AccordionSingleProps = ZoraBaseProps &
|
|
15
|
+
Omit<SurfaceAccordionSingleProps, 'children'> & {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type AccordionMultipleProps = ZoraBaseProps &
|
|
20
|
+
Omit<SurfaceAccordionMultipleProps, 'children'> & {
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
|
|
25
|
+
|
|
26
|
+
export type AccordionItemProps = ZoraBaseProps &
|
|
27
|
+
Omit<SurfaceAccordionItemProps, 'children'> & {
|
|
28
|
+
title: React.ReactNode;
|
|
29
|
+
description?: React.ReactNode;
|
|
30
|
+
icon?: ButtonIconSpec;
|
|
31
|
+
actions?: React.ReactNode;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export interface AccordionPresentationContextValue {
|
|
36
|
+
mode: AccordionMode;
|
|
37
|
+
openValues: readonly string[];
|
|
38
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ThemeConfig } from '@ankhorage/contracts';
|
|
2
|
+
import type { ToastProviderProps as SurfaceToastProviderProps } from '@ankhorage/surface';
|
|
3
|
+
import type React from 'react';
|
|
4
|
+
|
|
5
|
+
import type { ZoraTheme, ZoraThemeMode } from '../theme/types';
|
|
6
|
+
|
|
7
|
+
export type ZoraToastCapability = boolean | Omit<SurfaceToastProviderProps, 'children'>;
|
|
8
|
+
|
|
9
|
+
export interface ZoraProviderProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
theme?: ZoraTheme;
|
|
12
|
+
themeConfig?: ThemeConfig;
|
|
13
|
+
initialMode?: ZoraThemeMode;
|
|
14
|
+
toast?: ZoraToastCapability;
|
|
15
|
+
bottomSheet?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ZoraRuntimeCapabilitiesProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
toast?: ZoraToastCapability;
|
|
21
|
+
bottomSheet?: boolean;
|
|
22
|
+
}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
ToastController as SurfaceToastController,
|
|
2
3
|
ToastOptions as SurfaceToastOptions,
|
|
3
4
|
ToastProps as SurfaceToastProps,
|
|
5
|
+
ToastProviderProps as SurfaceToastProviderProps,
|
|
4
6
|
ToastStatus as SurfaceToastStatus,
|
|
5
7
|
} from '@ankhorage/surface';
|
|
6
|
-
import type React from 'react';
|
|
7
8
|
|
|
8
|
-
import type { ZoraBaseProps } from '
|
|
9
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
9
10
|
|
|
10
11
|
export type ToastStatus = SurfaceToastStatus;
|
|
11
12
|
export type ToastOptions = SurfaceToastOptions;
|
|
13
|
+
export type ToastController = SurfaceToastController;
|
|
14
|
+
export type ToastProviderProps = SurfaceToastProviderProps;
|
|
12
15
|
|
|
13
16
|
export interface ToastProps extends ZoraBaseProps, Omit<SurfaceToastProps, 'testID'> {}
|
|
14
|
-
|
|
15
|
-
export interface ToastProviderProps {
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
defaultDuration?: number;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C;;;;GAIG;AACH,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Toast as SurfaceToast } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
|
-
function ToastInner({ mode: _mode, themeId: _themeId, ...props }) {
|
|
5
|
-
return <SurfaceToast {...props}/>;
|
|
6
|
-
}
|
|
7
|
-
/***
|
|
8
|
-
* Renders a toast notification message.
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export const Toast = withZoraThemeScope(ToastInner);
|
|
13
|
-
//# sourceMappingURL=Toast.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/components/toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAc;IAC1E,OAAO,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACrC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { Toast as SurfaceToast } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ToastProps } from './types';\n\nfunction ToastInner({ mode: _mode, themeId: _themeId, ...props }: ToastProps) {\n return <SurfaceToast {...props} />;\n}\n\n/***\n * Renders a toast notification message.\n *\n \n */\nexport const Toast = withZoraThemeScope(ToastInner);\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ToastProviderProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Provides toast state and rendering context for `useToast` and `Toast`.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export declare function ToastProvider({ children, defaultDuration }: ToastProviderProps): React.JSX.Element;
|
|
9
|
-
//# sourceMappingURL=ToastProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../src/components/toast/ToastProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,kBAAkB,qBAM9E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ToastProvider as SurfaceToastProvider } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
/***
|
|
4
|
-
* Provides toast state and rendering context for `useToast` and `Toast`.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export function ToastProvider({ children, defaultDuration }) {
|
|
9
|
-
if (defaultDuration === undefined) {
|
|
10
|
-
return <SurfaceToastProvider>{children}</SurfaceToastProvider>;
|
|
11
|
-
}
|
|
12
|
-
return <SurfaceToastProvider defaultDuration={defaultDuration}>{children}</SurfaceToastProvider>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=ToastProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToastProvider.js","sourceRoot":"","sources":["../../../src/components/toast/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAsB;IAC7E,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC,CAAC;AACnG,CAAC","sourcesContent":["import { ToastProvider as SurfaceToastProvider } from '@ankhorage/surface';\nimport React from 'react';\n\nimport type { ToastProviderProps } from './types';\n\n/***\n * Provides toast state and rendering context for `useToast` and `Toast`.\n *\n \n */\nexport function ToastProvider({ children, defaultDuration }: ToastProviderProps) {\n if (defaultDuration === undefined) {\n return <SurfaceToastProvider>{children}</SurfaceToastProvider>;\n }\n\n return <SurfaceToastProvider defaultDuration={defaultDuration}>{children}</SurfaceToastProvider>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { Toast } from './Toast';\nexport { ToastProvider } from './ToastProvider';\nexport type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from './types';\nexport { useToast } from '@ankhorage/surface';\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const toastMeta: {
|
|
2
|
-
readonly name: "Toast";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Transient feedback component; exposed as an imperative provider/hook workflow, not represented as a manifest node in v1.";
|
|
7
|
-
readonly props: {};
|
|
8
|
-
};
|
|
9
|
-
export declare const toastProviderMeta: {
|
|
10
|
-
readonly name: "ToastProvider";
|
|
11
|
-
readonly category: "component";
|
|
12
|
-
readonly directManifestNode: false;
|
|
13
|
-
readonly allowedChildren: readonly [];
|
|
14
|
-
readonly note: "Provider for imperative toast feedback; not represented as a manifest node in v1.";
|
|
15
|
-
readonly props: {};
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/toast/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;CAOgB,CAAC;AAEvC,eAAO,MAAM,iBAAiB;;;;;;;CAOQ,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const toastMeta = {
|
|
2
|
-
name: 'Toast',
|
|
3
|
-
category: 'component',
|
|
4
|
-
directManifestNode: false,
|
|
5
|
-
allowedChildren: [],
|
|
6
|
-
note: 'Transient feedback component; exposed as an imperative provider/hook workflow, not represented as a manifest node in v1.',
|
|
7
|
-
props: {},
|
|
8
|
-
};
|
|
9
|
-
export const toastProviderMeta = {
|
|
10
|
-
name: 'ToastProvider',
|
|
11
|
-
category: 'component',
|
|
12
|
-
directManifestNode: false,
|
|
13
|
-
allowedChildren: [],
|
|
14
|
-
note: 'Provider for imperative toast feedback; not represented as a manifest node in v1.',
|
|
15
|
-
props: {},
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/toast/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,0HAA0H;IAChI,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,mFAAmF;IACzF,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const toastMeta = {\n name: 'Toast',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Transient feedback component; exposed as an imperative provider/hook workflow, not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const toastProviderMeta = {\n name: 'ToastProvider',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Provider for imperative toast feedback; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ToastOptions as SurfaceToastOptions, ToastProps as SurfaceToastProps, ToastStatus as SurfaceToastStatus } from '@ankhorage/surface';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
-
export type ToastStatus = SurfaceToastStatus;
|
|
5
|
-
export type ToastOptions = SurfaceToastOptions;
|
|
6
|
-
export interface ToastProps extends ZoraBaseProps, Omit<SurfaceToastProps, 'testID'> {
|
|
7
|
-
}
|
|
8
|
-
export interface ToastProviderProps {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
defaultDuration?: number;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,UAAU,IAAI,iBAAiB,EAC/B,WAAW,IAAI,kBAAkB,EAClC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAE/C,MAAM,WAAW,UAAW,SAAQ,aAAa,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC;CAAG;AAEvF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/toast/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ToastOptions as SurfaceToastOptions,\n ToastProps as SurfaceToastProps,\n ToastStatus as SurfaceToastStatus,\n} from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type ToastStatus = SurfaceToastStatus;\nexport type ToastOptions = SurfaceToastOptions;\n\nexport interface ToastProps extends ZoraBaseProps, Omit<SurfaceToastProps, 'testID'> {}\n\nexport interface ToastProviderProps {\n children: React.ReactNode;\n defaultDuration?: number;\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DisclosureSectionProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Expandable section pattern with a summary header and collapsible content.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export declare const DisclosureSection: (props: DisclosureSectionProps) => React.ReactElement | null;
|
|
9
|
-
//# sourceMappingURL=DisclosureSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisclosureSection.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAmHtD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Platform, Pressable } from 'react-native';
|
|
3
|
-
import { IconButton } from '../../features/button/public';
|
|
4
|
-
import { Box, Stack } from '../../features/layout/public';
|
|
5
|
-
import { Heading } from '../../features/typography/public';
|
|
6
|
-
import { Text } from '../../features/typography/public';
|
|
7
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
8
|
-
import { Panel } from '../panel';
|
|
9
|
-
const triggerTextStyle = {
|
|
10
|
-
flex: 1,
|
|
11
|
-
flexBasis: 0,
|
|
12
|
-
minWidth: 0,
|
|
13
|
-
};
|
|
14
|
-
const triggerCopyStyle = {
|
|
15
|
-
flexShrink: 1,
|
|
16
|
-
maxWidth: '100%',
|
|
17
|
-
minWidth: 0,
|
|
18
|
-
};
|
|
19
|
-
const trailingStyle = {
|
|
20
|
-
flexShrink: 0,
|
|
21
|
-
};
|
|
22
|
-
const getTriggerStyle = (disabled) => ({
|
|
23
|
-
alignSelf: 'stretch',
|
|
24
|
-
flex: 1,
|
|
25
|
-
flexBasis: 0,
|
|
26
|
-
justifyContent: 'center',
|
|
27
|
-
minWidth: 0,
|
|
28
|
-
...(Platform.OS === 'web'
|
|
29
|
-
? {
|
|
30
|
-
cursor: disabled ? 'default' : 'pointer',
|
|
31
|
-
}
|
|
32
|
-
: null),
|
|
33
|
-
});
|
|
34
|
-
function DisclosureSectionInner({ themeId: _themeId, mode: _mode, title, description, icon, defaultOpen = true, open: controlledOpen, onOpenChange, actions, children, disabled, testID, interactionPolicy, }) {
|
|
35
|
-
const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
|
|
36
|
-
const isControlled = controlledOpen !== undefined;
|
|
37
|
-
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
38
|
-
const passive = interactionPolicy === 'passive';
|
|
39
|
-
const titleLabel = typeof title === 'string' || typeof title === 'number' ? `: ${title}` : '';
|
|
40
|
-
const toggleLabel = `${isOpen ? 'Collapse' : 'Expand'} section${titleLabel}`;
|
|
41
|
-
const toggleOpen = () => {
|
|
42
|
-
if (disabled || passive)
|
|
43
|
-
return;
|
|
44
|
-
if (isControlled) {
|
|
45
|
-
onOpenChange?.(!controlledOpen);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
setInternalOpen(!internalOpen);
|
|
49
|
-
onOpenChange?.(!internalOpen);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return (<Panel compact testID={testID}>
|
|
53
|
-
<Stack gap="s">
|
|
54
|
-
<Stack direction="row" gap="m" align="center">
|
|
55
|
-
<Pressable accessibilityLabel={toggleLabel} accessibilityRole="button" accessibilityState={{ disabled, expanded: isOpen }} disabled={disabled} onPress={toggleOpen} style={getTriggerStyle(disabled)}>
|
|
56
|
-
<Box style={triggerTextStyle}>
|
|
57
|
-
<Stack gap="xs">
|
|
58
|
-
{icon ? <Box pb="xs">{/* Surface icon spec would go here */}</Box> : null}
|
|
59
|
-
<Heading level={4} style={triggerCopyStyle}>
|
|
60
|
-
{title}
|
|
61
|
-
</Heading>
|
|
62
|
-
{description ? (<Text emphasis="muted" variant="bodySmall" style={triggerCopyStyle}>
|
|
63
|
-
{description}
|
|
64
|
-
</Text>) : null}
|
|
65
|
-
</Stack>
|
|
66
|
-
</Box>
|
|
67
|
-
</Pressable>
|
|
68
|
-
|
|
69
|
-
{actions ? <Box style={trailingStyle}>{actions}</Box> : null}
|
|
70
|
-
|
|
71
|
-
<Box style={trailingStyle}>
|
|
72
|
-
<IconButton icon={{ name: isOpen ? 'chevron-up-outline' : 'chevron-down-outline' }} label={isOpen ? 'Collapse' : 'Expand'} variant="ghost" color="neutral" size="s" disabled={disabled} interactionPolicy={interactionPolicy} onPress={toggleOpen}/>
|
|
73
|
-
</Box>
|
|
74
|
-
</Stack>
|
|
75
|
-
|
|
76
|
-
{isOpen ? <Box pt="m">{children}</Box> : null}
|
|
77
|
-
</Stack>
|
|
78
|
-
</Panel>);
|
|
79
|
-
}
|
|
80
|
-
/***
|
|
81
|
-
* Expandable section pattern with a summary header and collapsible content.
|
|
82
|
-
*
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
export const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);
|
|
86
|
-
//# sourceMappingURL=DisclosureSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisclosureSection.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"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","sourcesContent":["import React from 'react';\nimport { Platform, Pressable, type TextStyle, type ViewStyle } from 'react-native';\n\nimport { IconButton } from '../../features/button/public';\nimport { Box, Stack } from '../../features/layout/public';\nimport { Heading } from '../../features/typography/public';\nimport { Text } from '../../features/typography/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { DisclosureSectionProps } from './types';\n\nconst triggerTextStyle: ViewStyle = {\n flex: 1,\n flexBasis: 0,\n minWidth: 0,\n};\n\nconst triggerCopyStyle: TextStyle = {\n flexShrink: 1,\n maxWidth: '100%',\n minWidth: 0,\n};\n\nconst trailingStyle: ViewStyle = {\n flexShrink: 0,\n};\n\nconst getTriggerStyle = (disabled?: boolean): ViewStyle =>\n ({\n alignSelf: 'stretch',\n flex: 1,\n flexBasis: 0,\n justifyContent: 'center',\n minWidth: 0,\n ...(Platform.OS === 'web'\n ? {\n cursor: disabled ? 'default' : 'pointer',\n }\n : null),\n }) as ViewStyle;\n\nfunction DisclosureSectionInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n icon,\n defaultOpen = true,\n open: controlledOpen,\n onOpenChange,\n actions,\n children,\n disabled,\n testID,\n interactionPolicy,\n}: DisclosureSectionProps) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n const passive = interactionPolicy === 'passive';\n const titleLabel = typeof title === 'string' || typeof title === 'number' ? `: ${title}` : '';\n const toggleLabel = `${isOpen ? 'Collapse' : 'Expand'} section${titleLabel}`;\n\n const toggleOpen = () => {\n if (disabled || passive) return;\n\n if (isControlled) {\n onOpenChange?.(!controlledOpen);\n } else {\n setInternalOpen(!internalOpen);\n onOpenChange?.(!internalOpen);\n }\n };\n\n return (\n <Panel compact testID={testID}>\n <Stack gap=\"s\">\n <Stack direction=\"row\" gap=\"m\" align=\"center\">\n <Pressable\n accessibilityLabel={toggleLabel}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled, expanded: isOpen }}\n disabled={disabled}\n onPress={toggleOpen}\n style={getTriggerStyle(disabled)}\n >\n <Box style={triggerTextStyle}>\n <Stack gap=\"xs\">\n {icon ? <Box pb=\"xs\">{/* Surface icon spec would go here */}</Box> : null}\n <Heading level={4} style={triggerCopyStyle}>\n {title}\n </Heading>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\" style={triggerCopyStyle}>\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n </Pressable>\n\n {actions ? <Box style={trailingStyle}>{actions}</Box> : null}\n\n <Box style={trailingStyle}>\n <IconButton\n icon={{ name: isOpen ? 'chevron-up-outline' : 'chevron-down-outline' }}\n label={isOpen ? 'Collapse' : 'Expand'}\n variant=\"ghost\"\n color=\"neutral\"\n size=\"s\"\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n onPress={toggleOpen}\n />\n </Box>\n </Stack>\n\n {isOpen ? <Box pt=\"m\">{children}</Box> : null}\n </Stack>\n </Panel>\n );\n}\n\n/***\n * Expandable section pattern with a summary header and collapsible content.\n *\n\n */\nexport const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC","sourcesContent":["export * from './DisclosureSection';\nexport * from './types';\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const disclosureSectionMeta: {
|
|
2
|
-
readonly name: "DisclosureSection";
|
|
3
|
-
readonly category: "pattern";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Disclosure pattern; not represented as a manifest node in v1.";
|
|
7
|
-
readonly props: {};
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;;;;;;CAOI,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const disclosureSectionMeta = {
|
|
2
|
-
name: 'DisclosureSection',
|
|
3
|
-
category: 'pattern',
|
|
4
|
-
directManifestNode: false,
|
|
5
|
-
allowedChildren: [],
|
|
6
|
-
note: 'Disclosure pattern; not represented as a manifest node in v1.',
|
|
7
|
-
props: {},
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,+DAA+D;IACrE,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const disclosureSectionMeta = {\n name: 'DisclosureSection',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Disclosure pattern; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
-
export interface DisclosureSectionProps extends ZoraBaseProps {
|
|
5
|
-
title: ReactNode;
|
|
6
|
-
description?: ReactNode;
|
|
7
|
-
icon?: ButtonIconSpec;
|
|
8
|
-
defaultOpen?: boolean;
|
|
9
|
-
open?: boolean;
|
|
10
|
-
onOpenChange?: (open: boolean) => void;
|
|
11
|
-
actions?: ReactNode;
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { ReactNode } from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface DisclosureSectionProps extends ZoraBaseProps {\n title: ReactNode;\n description?: ReactNode;\n icon?: ButtonIconSpec;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n actions?: ReactNode;\n children?: ReactNode;\n disabled?: boolean;\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Toast as SurfaceToast } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
-
import type { ToastProps } from './types';
|
|
6
|
-
|
|
7
|
-
function ToastInner({ mode: _mode, themeId: _themeId, ...props }: ToastProps) {
|
|
8
|
-
return <SurfaceToast {...props} />;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/***
|
|
12
|
-
* Renders a toast notification message.
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
export const Toast = withZoraThemeScope(ToastInner);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ToastProvider as SurfaceToastProvider } from '@ankhorage/surface';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import type { ToastProviderProps } from './types';
|
|
5
|
-
|
|
6
|
-
/***
|
|
7
|
-
* Provides toast state and rendering context for `useToast` and `Toast`.
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export function ToastProvider({ children, defaultDuration }: ToastProviderProps) {
|
|
12
|
-
if (defaultDuration === undefined) {
|
|
13
|
-
return <SurfaceToastProvider>{children}</SurfaceToastProvider>;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return <SurfaceToastProvider defaultDuration={defaultDuration}>{children}</SurfaceToastProvider>;
|
|
17
|
-
}
|