@oxyhq/bloom 0.1.32 → 0.1.34
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/README.md +108 -7
- package/lib/commonjs/admonition/index.js +7 -0
- package/lib/commonjs/admonition/index.js.map +1 -1
- package/lib/commonjs/avatar/Avatar.js +2 -18
- package/lib/commonjs/avatar/Avatar.js.map +1 -1
- package/lib/commonjs/bottom-sheet/index.js +16 -6
- package/lib/commonjs/bottom-sheet/index.js.map +1 -1
- package/lib/commonjs/button/Button.js +6 -18
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/chip/Chip.js +6 -16
- package/lib/commonjs/chip/Chip.js.map +1 -1
- package/lib/commonjs/collapsible/Collapsible.js +28 -20
- package/lib/commonjs/collapsible/Collapsible.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +2 -6
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/fill/index.js +7 -5
- package/lib/commonjs/fill/index.js.map +1 -1
- package/lib/commonjs/grid/index.js +9 -6
- package/lib/commonjs/grid/index.js.map +1 -1
- package/lib/commonjs/grouped-buttons/GroupedButtons.js +76 -48
- package/lib/commonjs/grouped-buttons/GroupedButtons.js.map +1 -1
- package/lib/commonjs/hooks/index.js +13 -0
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useInteractionState.js +42 -0
- package/lib/commonjs/hooks/useInteractionState.js.map +1 -1
- package/lib/commonjs/hooks/usePressAnimation.js +44 -0
- package/lib/commonjs/hooks/usePressAnimation.js.map +1 -0
- package/lib/commonjs/icon-circle/index.js +7 -5
- package/lib/commonjs/icon-circle/index.js.map +1 -1
- package/lib/commonjs/icons/{EnveopeOpen.js → EnvelopeOpen.js} +1 -1
- package/lib/commonjs/icons/EnvelopeOpen.js.map +1 -0
- package/lib/commonjs/icons/TEMPLATE.js +3 -2
- package/lib/commonjs/icons/TEMPLATE.js.map +1 -1
- package/lib/commonjs/icons/VerifiedCheck.js +3 -2
- package/lib/commonjs/icons/VerifiedCheck.js.map +1 -1
- package/lib/commonjs/icons/VerifierCheck.js +3 -2
- package/lib/commonjs/icons/VerifierCheck.js.map +1 -1
- package/lib/commonjs/icons/index.js +4 -4
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/loading/Loading.js +2 -17
- package/lib/commonjs/loading/Loading.js.map +1 -1
- package/lib/commonjs/loading/SpinnerIcon.js +3 -34
- package/lib/commonjs/loading/SpinnerIcon.js.map +1 -1
- package/lib/commonjs/prompt-input/Actions.js +1 -0
- package/lib/commonjs/prompt-input/Actions.js.map +1 -1
- package/lib/commonjs/prompt-input/Attachments.js +1 -0
- package/lib/commonjs/prompt-input/Attachments.js.map +1 -1
- package/lib/commonjs/prompt-input/PromptInput.js +1 -0
- package/lib/commonjs/prompt-input/PromptInput.js.map +1 -1
- package/lib/commonjs/prompt-input/SubmitButton.js +1 -0
- package/lib/commonjs/prompt-input/SubmitButton.js.map +1 -1
- package/lib/commonjs/prompt-input/Textarea.js +1 -0
- package/lib/commonjs/prompt-input/Textarea.js.map +1 -1
- package/lib/commonjs/prompt-input/Textarea.web.js +1 -0
- package/lib/commonjs/prompt-input/Textarea.web.js.map +1 -1
- package/lib/commonjs/search-input/index.js +1 -0
- package/lib/commonjs/search-input/index.js.map +1 -1
- package/lib/commonjs/settings-list/SettingsList.js +10 -11
- package/lib/commonjs/settings-list/SettingsList.js.map +1 -1
- package/lib/commonjs/skeleton/index.js +5 -0
- package/lib/commonjs/skeleton/index.js.map +1 -1
- package/lib/commonjs/switch/Switch.js +43 -28
- package/lib/commonjs/switch/Switch.js.map +1 -1
- package/lib/commonjs/tabs/Tabs.js +6 -15
- package/lib/commonjs/tabs/Tabs.js.map +1 -1
- package/lib/commonjs/typography/index.js +14 -5
- package/lib/commonjs/typography/index.js.map +1 -1
- package/lib/commonjs/utils/lazy-require.js +37 -0
- package/lib/commonjs/utils/lazy-require.js.map +1 -0
- package/lib/module/admonition/index.js +7 -0
- package/lib/module/admonition/index.js.map +1 -1
- package/lib/module/avatar/Avatar.js +2 -18
- package/lib/module/avatar/Avatar.js.map +1 -1
- package/lib/module/bottom-sheet/index.js +16 -6
- package/lib/module/bottom-sheet/index.js.map +1 -1
- package/lib/module/button/Button.js +7 -19
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/chip/Chip.js +7 -17
- package/lib/module/chip/Chip.js.map +1 -1
- package/lib/module/collapsible/Collapsible.js +30 -22
- package/lib/module/collapsible/Collapsible.js.map +1 -1
- package/lib/module/dialog/Dialog.js +2 -6
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/fill/index.js +5 -3
- package/lib/module/fill/index.js.map +1 -1
- package/lib/module/grid/index.js +9 -5
- package/lib/module/grid/index.js.map +1 -1
- package/lib/module/grouped-buttons/GroupedButtons.js +77 -48
- package/lib/module/grouped-buttons/GroupedButtons.js.map +1 -1
- package/lib/module/hooks/index.js +2 -1
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useInteractionState.js +41 -0
- package/lib/module/hooks/useInteractionState.js.map +1 -1
- package/lib/module/hooks/usePressAnimation.js +41 -0
- package/lib/module/hooks/usePressAnimation.js.map +1 -0
- package/lib/module/icon-circle/index.js +5 -3
- package/lib/module/icon-circle/index.js.map +1 -1
- package/lib/module/icons/{EnveopeOpen.js → EnvelopeOpen.js} +1 -1
- package/lib/module/icons/EnvelopeOpen.js.map +1 -0
- package/lib/module/icons/TEMPLATE.js +3 -2
- package/lib/module/icons/TEMPLATE.js.map +1 -1
- package/lib/module/icons/VerifiedCheck.js +3 -2
- package/lib/module/icons/VerifiedCheck.js.map +1 -1
- package/lib/module/icons/VerifierCheck.js +3 -2
- package/lib/module/icons/VerifierCheck.js.map +1 -1
- package/lib/module/icons/index.js +1 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/loading/Loading.js +2 -17
- package/lib/module/loading/Loading.js.map +1 -1
- package/lib/module/loading/SpinnerIcon.js +3 -34
- package/lib/module/loading/SpinnerIcon.js.map +1 -1
- package/lib/module/prompt-input/Actions.js +1 -0
- package/lib/module/prompt-input/Actions.js.map +1 -1
- package/lib/module/prompt-input/Attachments.js +1 -0
- package/lib/module/prompt-input/Attachments.js.map +1 -1
- package/lib/module/prompt-input/PromptInput.js +1 -0
- package/lib/module/prompt-input/PromptInput.js.map +1 -1
- package/lib/module/prompt-input/SubmitButton.js +1 -0
- package/lib/module/prompt-input/SubmitButton.js.map +1 -1
- package/lib/module/prompt-input/Textarea.js +1 -0
- package/lib/module/prompt-input/Textarea.js.map +1 -1
- package/lib/module/prompt-input/Textarea.web.js +1 -0
- package/lib/module/prompt-input/Textarea.web.js.map +1 -1
- package/lib/module/search-input/index.js +1 -0
- package/lib/module/search-input/index.js.map +1 -1
- package/lib/module/settings-list/SettingsList.js +10 -11
- package/lib/module/settings-list/SettingsList.js.map +1 -1
- package/lib/module/skeleton/index.js +5 -0
- package/lib/module/skeleton/index.js.map +1 -1
- package/lib/module/switch/Switch.js +45 -30
- package/lib/module/switch/Switch.js.map +1 -1
- package/lib/module/tabs/Tabs.js +8 -17
- package/lib/module/tabs/Tabs.js.map +1 -1
- package/lib/module/typography/index.js +12 -3
- package/lib/module/typography/index.js.map +1 -1
- package/lib/module/utils/lazy-require.js +33 -0
- package/lib/module/utils/lazy-require.js.map +1 -0
- package/lib/typescript/commonjs/admonition/index.d.ts +21 -0
- package/lib/typescript/commonjs/admonition/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/commonjs/collapsible/Collapsible.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/fill/index.d.ts +2 -2
- package/lib/typescript/commonjs/fill/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/grid/index.d.ts +4 -4
- package/lib/typescript/commonjs/grid/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/grouped-buttons/GroupedButtons.d.ts +9 -5
- package/lib/typescript/commonjs/grouped-buttons/GroupedButtons.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/index.d.ts +2 -1
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/useInteractionState.d.ts +23 -0
- package/lib/typescript/commonjs/hooks/useInteractionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +16 -0
- package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts.map +1 -0
- package/lib/typescript/commonjs/icon-circle/index.d.ts +4 -4
- package/lib/typescript/commonjs/icon-circle/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/{EnveopeOpen.d.ts → EnvelopeOpen.d.ts} +1 -1
- package/lib/typescript/commonjs/icons/EnvelopeOpen.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/TEMPLATE.d.ts +2 -1
- package/lib/typescript/commonjs/icons/TEMPLATE.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/VerifiedCheck.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/VerifierCheck.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/loading/Loading.d.ts.map +1 -1
- package/lib/typescript/commonjs/loading/SpinnerIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/Actions.d.ts +3 -0
- package/lib/typescript/commonjs/prompt-input/Actions.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/Attachments.d.ts +3 -0
- package/lib/typescript/commonjs/prompt-input/Attachments.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/PromptInput.d.ts +3 -0
- package/lib/typescript/commonjs/prompt-input/PromptInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/SubmitButton.d.ts +3 -0
- package/lib/typescript/commonjs/prompt-input/SubmitButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/Textarea.d.ts +3 -0
- package/lib/typescript/commonjs/prompt-input/Textarea.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/Textarea.web.d.ts +3 -0
- package/lib/typescript/commonjs/prompt-input/Textarea.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-list/SettingsList.d.ts.map +1 -1
- package/lib/typescript/commonjs/skeleton/index.d.ts +15 -0
- package/lib/typescript/commonjs/skeleton/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/switch/Switch.d.ts.map +1 -1
- package/lib/typescript/commonjs/tabs/Tabs.d.ts.map +1 -1
- package/lib/typescript/commonjs/typography/index.d.ts +11 -10
- package/lib/typescript/commonjs/typography/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/lazy-require.d.ts +15 -0
- package/lib/typescript/commonjs/utils/lazy-require.d.ts.map +1 -0
- package/lib/typescript/module/admonition/index.d.ts +21 -0
- package/lib/typescript/module/admonition/index.d.ts.map +1 -1
- package/lib/typescript/module/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/module/collapsible/Collapsible.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/fill/index.d.ts +2 -2
- package/lib/typescript/module/fill/index.d.ts.map +1 -1
- package/lib/typescript/module/grid/index.d.ts +4 -4
- package/lib/typescript/module/grid/index.d.ts.map +1 -1
- package/lib/typescript/module/grouped-buttons/GroupedButtons.d.ts +9 -5
- package/lib/typescript/module/grouped-buttons/GroupedButtons.d.ts.map +1 -1
- package/lib/typescript/module/hooks/index.d.ts +2 -1
- package/lib/typescript/module/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/useInteractionState.d.ts +23 -0
- package/lib/typescript/module/hooks/useInteractionState.d.ts.map +1 -1
- package/lib/typescript/module/hooks/usePressAnimation.d.ts +16 -0
- package/lib/typescript/module/hooks/usePressAnimation.d.ts.map +1 -0
- package/lib/typescript/module/icon-circle/index.d.ts +4 -4
- package/lib/typescript/module/icon-circle/index.d.ts.map +1 -1
- package/lib/typescript/module/icons/{EnveopeOpen.d.ts → EnvelopeOpen.d.ts} +1 -1
- package/lib/typescript/module/icons/EnvelopeOpen.d.ts.map +1 -0
- package/lib/typescript/module/icons/TEMPLATE.d.ts +2 -1
- package/lib/typescript/module/icons/TEMPLATE.d.ts.map +1 -1
- package/lib/typescript/module/icons/VerifiedCheck.d.ts.map +1 -1
- package/lib/typescript/module/icons/VerifierCheck.d.ts.map +1 -1
- package/lib/typescript/module/icons/index.d.ts +1 -1
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/loading/Loading.d.ts.map +1 -1
- package/lib/typescript/module/loading/SpinnerIcon.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/Actions.d.ts +3 -0
- package/lib/typescript/module/prompt-input/Actions.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/Attachments.d.ts +3 -0
- package/lib/typescript/module/prompt-input/Attachments.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/PromptInput.d.ts +3 -0
- package/lib/typescript/module/prompt-input/PromptInput.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/SubmitButton.d.ts +3 -0
- package/lib/typescript/module/prompt-input/SubmitButton.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/Textarea.d.ts +3 -0
- package/lib/typescript/module/prompt-input/Textarea.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/Textarea.web.d.ts +3 -0
- package/lib/typescript/module/prompt-input/Textarea.web.d.ts.map +1 -1
- package/lib/typescript/module/settings-list/SettingsList.d.ts.map +1 -1
- package/lib/typescript/module/skeleton/index.d.ts +15 -0
- package/lib/typescript/module/skeleton/index.d.ts.map +1 -1
- package/lib/typescript/module/switch/Switch.d.ts.map +1 -1
- package/lib/typescript/module/tabs/Tabs.d.ts.map +1 -1
- package/lib/typescript/module/typography/index.d.ts +11 -10
- package/lib/typescript/module/typography/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/lazy-require.d.ts +15 -0
- package/lib/typescript/module/utils/lazy-require.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/BloomThemeProvider.test.tsx +3 -3
- package/src/admonition/index.tsx +7 -0
- package/src/avatar/Avatar.tsx +2 -19
- package/src/bottom-sheet/index.tsx +18 -6
- package/src/button/Button.tsx +6 -22
- package/src/chip/Chip.tsx +3 -19
- package/src/collapsible/Collapsible.tsx +34 -25
- package/src/dialog/Dialog.tsx +3 -6
- package/src/fill/index.tsx +6 -3
- package/src/grid/index.tsx +11 -5
- package/src/grouped-buttons/GroupedButtons.tsx +79 -60
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useInteractionState.ts +21 -0
- package/src/hooks/usePressAnimation.ts +37 -0
- package/src/icon-circle/index.tsx +6 -3
- package/src/icons/TEMPLATE.tsx +2 -2
- package/src/icons/VerifiedCheck.tsx +3 -2
- package/src/icons/VerifierCheck.tsx +3 -2
- package/src/icons/index.ts +1 -1
- package/src/loading/Loading.tsx +2 -18
- package/src/loading/SpinnerIcon.tsx +4 -36
- package/src/prompt-input/Actions.tsx +1 -0
- package/src/prompt-input/Attachments.tsx +1 -0
- package/src/prompt-input/PromptInput.tsx +1 -0
- package/src/prompt-input/SubmitButton.tsx +1 -0
- package/src/prompt-input/Textarea.tsx +1 -0
- package/src/prompt-input/Textarea.web.tsx +1 -0
- package/src/search-input/index.tsx +1 -0
- package/src/settings-list/SettingsList.tsx +12 -8
- package/src/skeleton/index.tsx +5 -0
- package/src/switch/Switch.tsx +45 -23
- package/src/tabs/Tabs.tsx +3 -21
- package/src/typography/index.tsx +14 -4
- package/src/utils/lazy-require.ts +31 -0
- package/lib/commonjs/icons/EnveopeOpen.js.map +0 -1
- package/lib/module/icons/EnveopeOpen.js.map +0 -1
- package/lib/typescript/commonjs/icons/EnveopeOpen.d.ts.map +0 -1
- package/lib/typescript/module/icons/EnveopeOpen.d.ts.map +0 -1
- /package/src/icons/{EnveopeOpen.tsx → EnvelopeOpen.tsx} +0 -0
|
@@ -4,23 +4,38 @@ export declare function Text({ blend, style, }: {
|
|
|
4
4
|
style?: TextStyle | TextStyle[];
|
|
5
5
|
blend?: boolean;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace Text {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
7
10
|
export declare function Circle({ children, size, blend, style, }: {
|
|
8
11
|
children?: React.ReactNode;
|
|
9
12
|
size: number;
|
|
10
13
|
blend?: boolean;
|
|
11
14
|
style?: ViewStyle | ViewStyle[];
|
|
12
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare namespace Circle {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
13
19
|
export declare function Pill({ size, blend, style, }: {
|
|
14
20
|
size: number;
|
|
15
21
|
blend?: boolean;
|
|
16
22
|
style?: ViewStyle | ViewStyle[];
|
|
17
23
|
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace Pill {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
18
27
|
export declare function Col({ children, style, }: {
|
|
19
28
|
children?: React.ReactNode;
|
|
20
29
|
style?: ViewStyle | ViewStyle[];
|
|
21
30
|
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare namespace Col {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
22
34
|
export declare function Row({ children, style, }: {
|
|
23
35
|
children?: React.ReactNode;
|
|
24
36
|
style?: ViewStyle | ViewStyle[];
|
|
25
37
|
}): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare namespace Row {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
26
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/skeleton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAc,MAAM,cAAc,CAAC;AAiC1F,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,2CA0BA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/skeleton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAc,MAAM,cAAc,CAAC;AAiC1F,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,2CA0BA;yBAhCe,IAAI;;;AAmCpB,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACjC,2CAmBA;yBA7Be,MAAM;;;AAgCtB,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACjC,2CAkBA;yBA1Be,IAAI;;;AA6BpB,wBAAgB,GAAG,CAAC,EAClB,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACjC,2CAEA;yBARe,GAAG;;;AAWnB,wBAAgB,GAAG,CAAC,EAClB,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACjC,2CAEA;yBARe,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAmH3C,eAAO,MAAM,MAAM,4FAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAe,MAAM,SAAS,CAAC;AA4K/E,eAAO,MAAM,OAAO,uCAAyB,CAAC;AAG9C,eAAO,MAAM,GAAG,sCAAqB,CAAC;AAGtC,eAAO,MAAM,QAAQ,2CAA0B,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type TextProps as RNTextProps } from 'react-native';
|
|
2
3
|
export type TextProps = RNTextProps;
|
|
3
|
-
|
|
4
|
-
* Base text component with theme-aware default color.
|
|
5
|
-
*/
|
|
6
|
-
export declare function Text({ children, style, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Text: React.MemoExoticComponent<({ children, style, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
5
|
export { Text as Span };
|
|
8
|
-
export declare const H1:
|
|
9
|
-
export declare const H2:
|
|
10
|
-
export declare const H3:
|
|
11
|
-
export declare const H4:
|
|
12
|
-
export declare const H5:
|
|
13
|
-
export declare const H6:
|
|
6
|
+
export declare const H1: React.FC<RNTextProps>;
|
|
7
|
+
export declare const H2: React.FC<RNTextProps>;
|
|
8
|
+
export declare const H3: React.FC<RNTextProps>;
|
|
9
|
+
export declare const H4: React.FC<RNTextProps>;
|
|
10
|
+
export declare const H5: React.FC<RNTextProps>;
|
|
11
|
+
export declare const H6: React.FC<RNTextProps>;
|
|
14
12
|
export declare function P({ style, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare namespace P {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAI9B,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAiBpC,eAAO,MAAM,IAAI,2DAZiD,SAAS,6CAYpC,CAAC;AAGxC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AAYxB,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAGrD,wBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAU9C;yBAVe,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a lazy-loaded module getter that caches the result.
|
|
3
|
+
*
|
|
4
|
+
* Safely handles environments where `require` is not defined (e.g. Vite/browser ESM)
|
|
5
|
+
* and returns `null` when the module is not installed. The result is cached after the
|
|
6
|
+
* first call so subsequent calls are zero-cost.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const getSvg = lazyRequire<typeof import('react-native-svg')>('react-native-svg');
|
|
11
|
+
* const svg = getSvg(); // SvgModuleType | null
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function lazyRequire<T>(moduleName: string): () => T | null;
|
|
15
|
+
//# sourceMappingURL=lazy-require.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-require.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazy-require.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAiBjE"}
|
package/package.json
CHANGED
|
@@ -72,8 +72,8 @@ describe('BloomThemeProvider', () => {
|
|
|
72
72
|
<ThemeDisplay />
|
|
73
73
|
</BloomThemeProvider>,
|
|
74
74
|
);
|
|
75
|
-
// Blue preset
|
|
76
|
-
expect(getByTestId('primary').props.children
|
|
75
|
+
// Blue preset primary is HSL(205, 87%, 53%) derived from --primary CSS var
|
|
76
|
+
expect(getByTestId('primary').props.children).toBe('hsl(205, 87%, 53%)');
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
it('generates different background colors for light and dark modes', () => {
|
|
@@ -135,7 +135,7 @@ describe('useThemeColor', () => {
|
|
|
135
135
|
<ColorDisplay colorKey="primary" />
|
|
136
136
|
</BloomThemeProvider>,
|
|
137
137
|
);
|
|
138
|
-
expect(getByTestId('color').props.children).toBe('
|
|
138
|
+
expect(getByTestId('color').props.children).toBe('hsl(185, 100%, 20%)');
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
141
|
|
package/src/admonition/index.tsx
CHANGED
|
@@ -44,6 +44,7 @@ export function Icon() {
|
|
|
44
44
|
|
|
45
45
|
return <IconComponent fill={fillMap[type]} size="md" />;
|
|
46
46
|
}
|
|
47
|
+
Icon.displayName = 'Admonition.Icon';
|
|
47
48
|
|
|
48
49
|
export function Content({
|
|
49
50
|
children,
|
|
@@ -58,6 +59,7 @@ export function Content({
|
|
|
58
59
|
</View>
|
|
59
60
|
);
|
|
60
61
|
}
|
|
62
|
+
Content.displayName = 'Admonition.Content';
|
|
61
63
|
|
|
62
64
|
export function Text({
|
|
63
65
|
children,
|
|
@@ -72,6 +74,7 @@ export function Text({
|
|
|
72
74
|
</BaseText>
|
|
73
75
|
);
|
|
74
76
|
}
|
|
77
|
+
Text.displayName = 'Admonition.Text';
|
|
75
78
|
|
|
76
79
|
export function Button({
|
|
77
80
|
children,
|
|
@@ -83,6 +86,7 @@ export function Button({
|
|
|
83
86
|
</BaseButton>
|
|
84
87
|
);
|
|
85
88
|
}
|
|
89
|
+
Button.displayName = 'Admonition.Button';
|
|
86
90
|
|
|
87
91
|
export function Row({
|
|
88
92
|
children,
|
|
@@ -97,6 +101,7 @@ export function Row({
|
|
|
97
101
|
</View>
|
|
98
102
|
);
|
|
99
103
|
}
|
|
104
|
+
Row.displayName = 'Admonition.Row';
|
|
100
105
|
|
|
101
106
|
export function Outer({
|
|
102
107
|
children,
|
|
@@ -134,6 +139,7 @@ export function Outer({
|
|
|
134
139
|
</AdmonitionContext.Provider>
|
|
135
140
|
);
|
|
136
141
|
}
|
|
142
|
+
Outer.displayName = 'Admonition.Outer';
|
|
137
143
|
|
|
138
144
|
/**
|
|
139
145
|
* Simple all-in-one Admonition component for common use cases.
|
|
@@ -159,6 +165,7 @@ export function Admonition({
|
|
|
159
165
|
</Outer>
|
|
160
166
|
);
|
|
161
167
|
}
|
|
168
|
+
Admonition.displayName = 'Admonition';
|
|
162
169
|
|
|
163
170
|
const styles = StyleSheet.create({
|
|
164
171
|
outer: {
|
package/src/avatar/Avatar.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { View, Image, StyleSheet, TouchableOpacity } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../theme/use-theme';
|
|
5
5
|
import { useImageResolver } from '../image-resolver/context';
|
|
6
|
+
import { lazyRequire } from '../utils/lazy-require';
|
|
6
7
|
import { useAvatarPlaceholder } from './placeholder-context';
|
|
7
8
|
import type { AvatarProps } from './types';
|
|
8
9
|
|
|
@@ -22,25 +23,7 @@ let clipIdCounter = 0;
|
|
|
22
23
|
// Lazy-loaded SVG components for squircle shape.
|
|
23
24
|
// Returns null if react-native-svg is not installed.
|
|
24
25
|
type SvgModuleType = typeof import('react-native-svg');
|
|
25
|
-
|
|
26
|
-
let svgModuleResolved = false;
|
|
27
|
-
|
|
28
|
-
function getSvgModule(): SvgModuleType | null {
|
|
29
|
-
if (!svgModuleResolved) {
|
|
30
|
-
svgModuleResolved = true;
|
|
31
|
-
try {
|
|
32
|
-
// Guard for ESM environments (Vite/browser) where require is not defined.
|
|
33
|
-
// In React Native (Metro), require is always available.
|
|
34
|
-
if (typeof require !== 'undefined') {
|
|
35
|
-
const moduleName = 'react-native-svg';
|
|
36
|
-
svgModule = require(moduleName);
|
|
37
|
-
}
|
|
38
|
-
} catch {
|
|
39
|
-
svgModule = null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return svgModule;
|
|
43
|
-
}
|
|
26
|
+
const getSvgModule = lazyRequire<SvgModuleType>('react-native-svg');
|
|
44
27
|
|
|
45
28
|
function SquircleImage({
|
|
46
29
|
uri,
|
|
@@ -176,11 +176,14 @@ const BottomSheet = forwardRef((props: BottomSheetProps, ref: React.ForwardedRef
|
|
|
176
176
|
}
|
|
177
177
|
}, []);
|
|
178
178
|
|
|
179
|
-
// Apply web scrollbar styles when colors change
|
|
179
|
+
// Apply web scrollbar styles when colors change; clean up on unmount
|
|
180
180
|
useEffect(() => {
|
|
181
181
|
if (Platform.OS === 'web') {
|
|
182
182
|
createWebScrollbarStyle(colors.border);
|
|
183
183
|
}
|
|
184
|
+
return () => {
|
|
185
|
+
removeWebScrollbarStyle();
|
|
186
|
+
};
|
|
184
187
|
}, [colors.border]);
|
|
185
188
|
|
|
186
189
|
const present = useCallback(() => {
|
|
@@ -448,18 +451,19 @@ const styles = StyleSheet.create({
|
|
|
448
451
|
const createWebScrollbarStyle = (borderColor: string) => {
|
|
449
452
|
if (Platform.OS !== 'web' || typeof document === 'undefined') return;
|
|
450
453
|
|
|
451
|
-
|
|
452
|
-
let styleElement = document.getElementById(styleId) as HTMLStyleElement;
|
|
454
|
+
let styleElement = document.getElementById(SCROLLBAR_STYLE_ID) as HTMLStyleElement | null;
|
|
453
455
|
|
|
454
456
|
if (!styleElement) {
|
|
455
457
|
styleElement = document.createElement('style');
|
|
456
|
-
styleElement.id =
|
|
458
|
+
styleElement.id = SCROLLBAR_STYLE_ID;
|
|
457
459
|
document.head.appendChild(styleElement);
|
|
458
460
|
}
|
|
459
461
|
|
|
460
|
-
//
|
|
462
|
+
// Derive a slightly darker scrollbar hover color from the border color
|
|
461
463
|
const scrollbarColor = borderColor;
|
|
462
|
-
const scrollbarHoverColor = borderColor
|
|
464
|
+
const scrollbarHoverColor = borderColor.startsWith('hsl')
|
|
465
|
+
? borderColor.replace(/\)$/, ' / 0.7)') // add alpha for hover
|
|
466
|
+
: '#888';
|
|
463
467
|
|
|
464
468
|
styleElement.textContent = `
|
|
465
469
|
.bottom-sheet-scrollview::-webkit-scrollbar {
|
|
@@ -479,5 +483,13 @@ const createWebScrollbarStyle = (borderColor: string) => {
|
|
|
479
483
|
`;
|
|
480
484
|
};
|
|
481
485
|
|
|
486
|
+
const SCROLLBAR_STYLE_ID = 'bottom-sheet-scrollbar-style';
|
|
487
|
+
|
|
488
|
+
/** Remove the injected scrollbar <style> tag on unmount. */
|
|
489
|
+
const removeWebScrollbarStyle = () => {
|
|
490
|
+
if (Platform.OS !== 'web' || typeof document === 'undefined') return;
|
|
491
|
+
document.getElementById(SCROLLBAR_STYLE_ID)?.remove();
|
|
492
|
+
};
|
|
493
|
+
|
|
482
494
|
export default BottomSheet;
|
|
483
495
|
export { BottomSheet };
|
package/src/button/Button.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useMemo, memo } from 'react';
|
|
2
2
|
import { Pressable, Text, Platform, Animated, type ViewStyle, type TextStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../theme/use-theme';
|
|
5
|
-
import {
|
|
5
|
+
import { usePressAnimation } from '../hooks/usePressAnimation';
|
|
6
6
|
import type { ButtonProps } from './types';
|
|
7
7
|
|
|
8
8
|
export type { ButtonProps, ButtonVariant, ButtonSize } from './types';
|
|
@@ -51,26 +51,10 @@ const ButtonComponent: React.FC<ButtonProps> = ({
|
|
|
51
51
|
className,
|
|
52
52
|
}) => {
|
|
53
53
|
const theme = useTheme();
|
|
54
|
-
const scaleAnim = useRef(new Animated.Value(1)).current;
|
|
55
54
|
const hasScaleFeedback = SCALE_VARIANTS.has(variant);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Animated.spring(scaleAnim, {
|
|
60
|
-
toValue: PRESS_SCALE,
|
|
61
|
-
useNativeDriver: true,
|
|
62
|
-
...animation.spring.snappy,
|
|
63
|
-
}).start();
|
|
64
|
-
}, [scaleAnim, hasScaleFeedback]);
|
|
65
|
-
|
|
66
|
-
const onPressOut = useCallback(() => {
|
|
67
|
-
if (!hasScaleFeedback) return;
|
|
68
|
-
Animated.spring(scaleAnim, {
|
|
69
|
-
toValue: 1,
|
|
70
|
-
useNativeDriver: true,
|
|
71
|
-
...animation.spring.gentle,
|
|
72
|
-
}).start();
|
|
73
|
-
}, [scaleAnim, hasScaleFeedback]);
|
|
55
|
+
const { scaleAnim, onPressIn, onPressOut } = usePressAnimation(
|
|
56
|
+
hasScaleFeedback ? PRESS_SCALE : undefined,
|
|
57
|
+
);
|
|
74
58
|
|
|
75
59
|
const baseStyles = useMemo((): ViewStyle => {
|
|
76
60
|
const sizeConfig = SIZE_CONFIG[size];
|
|
@@ -155,7 +139,7 @@ const ButtonComponent: React.FC<ButtonProps> = ({
|
|
|
155
139
|
return (
|
|
156
140
|
<Animated.View style={hasScaleFeedback ? { transform: [{ scale: scaleAnim }] } : undefined}>
|
|
157
141
|
<Pressable
|
|
158
|
-
{...(resolvedClassName ? { className: resolvedClassName } as
|
|
142
|
+
{...(resolvedClassName ? { className: resolvedClassName } as Record<string, string> : {})}
|
|
159
143
|
style={({ pressed }) => [
|
|
160
144
|
baseStyles,
|
|
161
145
|
disabled && { opacity: 0.5 },
|
package/src/chip/Chip.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, { memo, useMemo
|
|
1
|
+
import React, { memo, useMemo } from 'react';
|
|
2
2
|
import { View, Text, Pressable, Animated, type ViewStyle, type TextStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../theme/use-theme';
|
|
5
|
-
import {
|
|
5
|
+
import { usePressAnimation } from '../hooks/usePressAnimation';
|
|
6
6
|
import type { ChipProps, ChipColor, ChipVariant } from './types';
|
|
7
7
|
|
|
8
8
|
const SIZE_CONFIG = {
|
|
@@ -56,26 +56,10 @@ const ChipComponent: React.FC<ChipProps> = ({
|
|
|
56
56
|
testID,
|
|
57
57
|
}) => {
|
|
58
58
|
const theme = useTheme();
|
|
59
|
-
const scaleAnim =
|
|
59
|
+
const { scaleAnim, onPressIn, onPressOut } = usePressAnimation(PRESS_SCALE);
|
|
60
60
|
const colors = useChipColors(color, variant, selected, theme);
|
|
61
61
|
const sizeConfig = SIZE_CONFIG[size];
|
|
62
62
|
|
|
63
|
-
const onPressIn = useCallback(() => {
|
|
64
|
-
Animated.spring(scaleAnim, {
|
|
65
|
-
toValue: PRESS_SCALE,
|
|
66
|
-
useNativeDriver: true,
|
|
67
|
-
...animation.spring.snappy,
|
|
68
|
-
}).start();
|
|
69
|
-
}, [scaleAnim]);
|
|
70
|
-
|
|
71
|
-
const onPressOut = useCallback(() => {
|
|
72
|
-
Animated.spring(scaleAnim, {
|
|
73
|
-
toValue: 1,
|
|
74
|
-
useNativeDriver: true,
|
|
75
|
-
...animation.spring.gentle,
|
|
76
|
-
}).start();
|
|
77
|
-
}, [scaleAnim]);
|
|
78
|
-
|
|
79
63
|
const containerStyle = useMemo((): ViewStyle => ({
|
|
80
64
|
height: sizeConfig.height,
|
|
81
65
|
borderRadius: sizeConfig.height / 2,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { memo, useCallback,
|
|
2
|
-
import { View, Text, TouchableOpacity, Animated, LayoutAnimation, Platform, UIManager } from 'react-native';
|
|
1
|
+
import React, { memo, useCallback, useRef, useState } from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, Animated, LayoutAnimation, Platform, UIManager, StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../theme/use-theme';
|
|
5
5
|
import { animation } from '../styles/tokens';
|
|
@@ -25,23 +25,25 @@ const CollapsibleComponent: React.FC<CollapsibleProps> = ({
|
|
|
25
25
|
const theme = useTheme();
|
|
26
26
|
const chevronAnim = useRef(new Animated.Value(defaultOpen ? 1 : 0)).current;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const handleToggle = useCallback(() => {
|
|
29
|
+
const nextOpen = !isOpen;
|
|
30
|
+
|
|
31
|
+
// Animate chevron rotation in the event handler, not via useEffect
|
|
29
32
|
Animated.spring(chevronAnim, {
|
|
30
|
-
toValue:
|
|
33
|
+
toValue: nextOpen ? 1 : 0,
|
|
31
34
|
useNativeDriver: true,
|
|
32
35
|
...animation.spring.gentle,
|
|
33
36
|
}).start();
|
|
34
|
-
}, [isOpen, chevronAnim]);
|
|
35
37
|
|
|
36
|
-
const handleToggle = useCallback(() => {
|
|
37
38
|
LayoutAnimation.configureNext({
|
|
38
39
|
duration: animation.duration.normal,
|
|
39
40
|
update: { type: LayoutAnimation.Types.easeInEaseOut },
|
|
40
41
|
create: { type: LayoutAnimation.Types.easeInEaseOut, property: LayoutAnimation.Properties.opacity },
|
|
41
42
|
delete: { type: LayoutAnimation.Types.easeInEaseOut, property: LayoutAnimation.Properties.opacity },
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
|
|
45
|
+
setIsOpen(nextOpen);
|
|
46
|
+
}, [isOpen, chevronAnim]);
|
|
45
47
|
|
|
46
48
|
const chevronRotation = chevronAnim.interpolate({
|
|
47
49
|
inputRange: [0, 1],
|
|
@@ -55,32 +57,22 @@ const CollapsibleComponent: React.FC<CollapsibleProps> = ({
|
|
|
55
57
|
activeOpacity={0.7}
|
|
56
58
|
accessibilityRole="button"
|
|
57
59
|
accessibilityState={{ expanded: isOpen }}
|
|
58
|
-
style={
|
|
59
|
-
flexDirection: 'row',
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
paddingVertical: 12,
|
|
62
|
-
gap: 8,
|
|
63
|
-
}}
|
|
60
|
+
style={styles.trigger}
|
|
64
61
|
>
|
|
65
62
|
{chevronIcon ?? (
|
|
66
63
|
<Animated.Text
|
|
67
|
-
style={
|
|
68
|
-
|
|
69
|
-
color: theme.colors.textSecondary,
|
|
70
|
-
|
|
71
|
-
}}
|
|
64
|
+
style={[
|
|
65
|
+
styles.chevron,
|
|
66
|
+
{ color: theme.colors.textSecondary, transform: [{ rotate: chevronRotation }] },
|
|
67
|
+
]}
|
|
72
68
|
>
|
|
73
69
|
›
|
|
74
70
|
</Animated.Text>
|
|
75
71
|
)}
|
|
76
72
|
<Text
|
|
77
73
|
style={[
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
fontWeight: '600',
|
|
81
|
-
color: theme.colors.text,
|
|
82
|
-
flex: 1,
|
|
83
|
-
},
|
|
74
|
+
styles.title,
|
|
75
|
+
{ color: theme.colors.text },
|
|
84
76
|
titleStyle,
|
|
85
77
|
]}
|
|
86
78
|
>
|
|
@@ -94,3 +86,20 @@ const CollapsibleComponent: React.FC<CollapsibleProps> = ({
|
|
|
94
86
|
|
|
95
87
|
export const Collapsible = memo(CollapsibleComponent);
|
|
96
88
|
Collapsible.displayName = 'Collapsible';
|
|
89
|
+
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
trigger: {
|
|
92
|
+
flexDirection: 'row',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
paddingVertical: 12,
|
|
95
|
+
gap: 8,
|
|
96
|
+
},
|
|
97
|
+
chevron: {
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
},
|
|
100
|
+
title: {
|
|
101
|
+
fontSize: 16,
|
|
102
|
+
fontWeight: '600',
|
|
103
|
+
flex: 1,
|
|
104
|
+
},
|
|
105
|
+
});
|
package/src/dialog/Dialog.tsx
CHANGED
|
@@ -72,6 +72,8 @@ export function Outer({
|
|
|
72
72
|
[],
|
|
73
73
|
);
|
|
74
74
|
|
|
75
|
+
const renderHandle = useCallback(() => null, []);
|
|
76
|
+
|
|
75
77
|
return (
|
|
76
78
|
<BottomSheetModal
|
|
77
79
|
ref={ref}
|
|
@@ -84,12 +86,7 @@ export function Outer({
|
|
|
84
86
|
borderTopLeftRadius: 20,
|
|
85
87
|
borderTopRightRadius: 20,
|
|
86
88
|
}}
|
|
87
|
-
|
|
88
|
-
backgroundColor: theme.colors.text,
|
|
89
|
-
width: 35,
|
|
90
|
-
height: 5,
|
|
91
|
-
opacity: 0.5,
|
|
92
|
-
}}
|
|
89
|
+
handleComponent={renderHandle}
|
|
93
90
|
backdropComponent={renderBackdrop}
|
|
94
91
|
onDismiss={handleDismiss}
|
|
95
92
|
style={{ maxWidth: 500, margin: 'auto' }}
|
package/src/fill/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
2
|
import { StyleSheet, View, type ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const FillComponent = function Fill({
|
|
5
5
|
children,
|
|
6
6
|
style,
|
|
7
7
|
}: {
|
|
@@ -13,7 +13,10 @@ export function Fill({
|
|
|
13
13
|
{children}
|
|
14
14
|
</View>
|
|
15
15
|
);
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const Fill = memo(FillComponent);
|
|
19
|
+
Fill.displayName = 'Fill';
|
|
17
20
|
|
|
18
21
|
const fillStyles = StyleSheet.create({
|
|
19
22
|
base: {
|
package/src/grid/index.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { createContext, useContext, useMemo } from 'react';
|
|
1
|
+
import React, { createContext, memo, useContext, useMemo } from 'react';
|
|
2
2
|
import { View, type ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
const GridContext = createContext({ gap: 0 });
|
|
5
5
|
GridContext.displayName = 'GridContext';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const RowComponent = function Row({
|
|
8
8
|
children,
|
|
9
9
|
gap = 0,
|
|
10
10
|
style,
|
|
@@ -29,9 +29,12 @@ export function Row({
|
|
|
29
29
|
</View>
|
|
30
30
|
</GridContext.Provider>
|
|
31
31
|
);
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
|
|
34
|
-
export
|
|
34
|
+
export const Row = memo(RowComponent);
|
|
35
|
+
Row.displayName = 'Row';
|
|
36
|
+
|
|
37
|
+
const ColComponent = function Col({
|
|
35
38
|
children,
|
|
36
39
|
width = 1,
|
|
37
40
|
style,
|
|
@@ -55,4 +58,7 @@ export function Col({
|
|
|
55
58
|
{children}
|
|
56
59
|
</View>
|
|
57
60
|
);
|
|
58
|
-
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const Col = memo(ColComponent);
|
|
64
|
+
Col.displayName = 'Col';
|