@hzblj/kara-components 0.6.0 → 0.8.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 +91 -0
- package/README.md +31 -3
- package/lib/module/atoms/activity-indicator/activity-indicator.android.js +42 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.android.js.map +1 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.ios.js +19 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.ios.js.map +1 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.types.js +4 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.types.js.map +1 -0
- package/lib/module/atoms/activity-indicator/index.js +2 -1
- package/lib/module/atoms/activity-indicator/index.js.map +1 -1
- package/lib/module/atoms/avatar/avatar.js +2 -4
- package/lib/module/atoms/avatar/avatar.js.map +1 -1
- package/lib/module/atoms/blur-view/blur-view.android.js +100 -0
- package/lib/module/atoms/blur-view/blur-view.android.js.map +1 -0
- package/lib/module/atoms/blur-view/blur-view.ios.js +43 -0
- package/lib/module/atoms/blur-view/blur-view.ios.js.map +1 -0
- package/lib/module/atoms/blur-view/blur-view.types.js +4 -0
- package/lib/module/atoms/blur-view/blur-view.types.js.map +1 -0
- package/lib/module/atoms/blur-view/index.js +5 -0
- package/lib/module/atoms/blur-view/index.js.map +1 -0
- package/lib/module/atoms/checkbox/checkbox.android.js +7 -3
- package/lib/module/atoms/checkbox/checkbox.android.js.map +1 -1
- package/lib/module/atoms/date-picker/date-picker.ios.js +32 -11
- package/lib/module/atoms/date-picker/date-picker.ios.js.map +1 -1
- package/lib/module/atoms/glass-view/glass-view.android.js +36 -5
- package/lib/module/atoms/glass-view/glass-view.android.js.map +1 -1
- package/lib/module/atoms/image/image.js +13 -6
- package/lib/module/atoms/image/image.js.map +1 -1
- package/lib/module/atoms/image/image.types.js +4 -0
- package/lib/module/atoms/image/image.types.js.map +1 -0
- package/lib/module/atoms/image/index.js +1 -0
- package/lib/module/atoms/image/index.js.map +1 -1
- package/lib/module/atoms/index.js +1 -1
- package/lib/module/atoms/index.js.map +1 -1
- package/lib/module/atoms/island/island.android.js +6 -2
- package/lib/module/atoms/island/island.android.js.map +1 -1
- package/lib/module/atoms/island/island.ios.js +5 -2
- package/lib/module/atoms/island/island.ios.js.map +1 -1
- package/lib/module/atoms/pressable/pressable.js +38 -6
- package/lib/module/atoms/pressable/pressable.js.map +1 -1
- package/lib/module/atoms/rn-flat-list/rn-flat-list.js +10 -9
- package/lib/module/atoms/rn-flat-list/rn-flat-list.js.map +1 -1
- package/lib/module/atoms/rn-section-list/rn-section-list.js +5 -8
- package/lib/module/atoms/rn-section-list/rn-section-list.js.map +1 -1
- package/lib/module/atoms/rn-text/rn-text.js +5 -2
- package/lib/module/atoms/rn-text/rn-text.js.map +1 -1
- package/lib/module/atoms/segmented-control/index.js +1 -1
- package/lib/module/atoms/segmented-control/index.js.map +1 -1
- package/lib/module/atoms/segmented-control/segmented-control.android.js +74 -0
- package/lib/module/atoms/segmented-control/segmented-control.android.js.map +1 -0
- package/lib/module/atoms/segmented-control/segmented-control.ios.js +44 -0
- package/lib/module/atoms/segmented-control/segmented-control.ios.js.map +1 -0
- package/lib/module/atoms/skeleton/skeleton.js +5 -5
- package/lib/module/atoms/skeleton/skeleton.js.map +1 -1
- package/lib/module/atoms/switch/switch.android.js +4 -1
- package/lib/module/atoms/switch/switch.android.js.map +1 -1
- package/lib/module/atoms/text/text.android.js +5 -2
- package/lib/module/atoms/text/text.android.js.map +1 -1
- package/lib/module/atoms/text/text.ios.js +14 -3
- package/lib/module/atoms/text/text.ios.js.map +1 -1
- package/lib/module/molecules/collapsible/collapsible.android.js +37 -7
- package/lib/module/molecules/collapsible/collapsible.android.js.map +1 -1
- package/lib/module/molecules/navigation-bar/navigation-bar.android.js +2 -8
- package/lib/module/molecules/navigation-bar/navigation-bar.android.js.map +1 -1
- package/lib/module/molecules/pager/pager.android.js +5 -4
- package/lib/module/molecules/pager/pager.android.js.map +1 -1
- package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js +114 -11
- package/lib/module/molecules/scroll-edge-container/scroll-edge-container.android.js.map +1 -1
- package/lib/module/molecules/search-bar/search-bar.js +15 -2
- package/lib/module/molecules/search-bar/search-bar.js.map +1 -1
- package/lib/module/molecules/stepper/stepper.ios.js +45 -8
- package/lib/module/molecules/stepper/stepper.ios.js.map +1 -1
- package/lib/module/molecules/tooltip/tooltip.android.js +16 -5
- package/lib/module/molecules/tooltip/tooltip.android.js.map +1 -1
- package/lib/module/organisms/action-sheet/action-sheet.android.js +41 -20
- package/lib/module/organisms/action-sheet/action-sheet.android.js.map +1 -1
- package/lib/module/organisms/action-sheet/action-sheet.ios.js +24 -8
- package/lib/module/organisms/action-sheet/action-sheet.ios.js.map +1 -1
- package/lib/module/organisms/alert/alert.ios.js +15 -2
- package/lib/module/organisms/alert/alert.ios.js.map +1 -1
- package/lib/module/organisms/form/form.android.js +22 -9
- package/lib/module/organisms/form/form.android.js.map +1 -1
- package/lib/module/organisms/swipe-actions/swipe-actions.android.js +125 -11
- package/lib/module/organisms/swipe-actions/swipe-actions.android.js.map +1 -1
- package/lib/module/organisms/swipe-actions/swipe-actions.ios.js +46 -18
- package/lib/module/organisms/swipe-actions/swipe-actions.ios.js.map +1 -1
- package/lib/module/ripple-clip.js +9 -1
- package/lib/module/ripple-clip.js.map +1 -1
- package/lib/module/templates/screen/screen.android.js +31 -10
- package/lib/module/templates/screen/screen.android.js.map +1 -1
- package/lib/typescript/atoms/activity-indicator/activity-indicator.d.ts +1 -3
- package/lib/typescript/atoms/activity-indicator/activity-indicator.ios.d.ts +3 -0
- package/lib/typescript/atoms/activity-indicator/activity-indicator.types.d.ts +17 -0
- package/lib/typescript/atoms/activity-indicator/index.d.ts +1 -0
- package/lib/typescript/atoms/avatar/avatar.types.d.ts +5 -0
- package/lib/typescript/atoms/badge/badge.types.d.ts +3 -0
- package/lib/typescript/atoms/blur-view/blur-view.d.ts +1 -0
- package/lib/typescript/atoms/blur-view/blur-view.ios.d.ts +3 -0
- package/lib/typescript/atoms/blur-view/blur-view.types.d.ts +31 -0
- package/lib/typescript/atoms/blur-view/index.d.ts +2 -0
- package/lib/typescript/atoms/box/a-box.d.ts +1 -1
- package/lib/typescript/atoms/button/button.types.d.ts +12 -0
- package/lib/typescript/atoms/card/card.types.d.ts +6 -0
- package/lib/typescript/atoms/checkbox/checkbox.types.d.ts +5 -0
- package/lib/typescript/atoms/chip/chip.types.d.ts +5 -0
- package/lib/typescript/atoms/color-picker/color-picker.types.d.ts +4 -0
- package/lib/typescript/atoms/date-picker/date-picker.ios.d.ts +6 -1
- package/lib/typescript/atoms/date-picker/date-picker.types.d.ts +14 -0
- package/lib/typescript/atoms/divider/divider.types.d.ts +3 -0
- package/lib/typescript/atoms/fab/fab.types.d.ts +7 -0
- package/lib/typescript/atoms/glass-view/glass-view.types.d.ts +13 -5
- package/lib/typescript/atoms/h-stack/h-stack.types.d.ts +6 -0
- package/lib/typescript/atoms/icon/icon.types.d.ts +8 -0
- package/lib/typescript/atoms/icon-button/icon-button.types.d.ts +5 -0
- package/lib/typescript/atoms/image/image.d.ts +12 -4
- package/lib/typescript/atoms/image/image.types.d.ts +4 -0
- package/lib/typescript/atoms/image/index.d.ts +1 -0
- package/lib/typescript/atoms/index.d.ts +1 -1
- package/lib/typescript/atoms/island/island.types.d.ts +10 -2
- package/lib/typescript/atoms/list/list.types.d.ts +2 -0
- package/lib/typescript/atoms/picker/picker.types.d.ts +12 -0
- package/lib/typescript/atoms/pressable/pressable.types.d.ts +10 -0
- package/lib/typescript/atoms/progress/progress.types.d.ts +6 -0
- package/lib/typescript/atoms/rn-flat-list/rn-flat-list.d.ts +5 -8
- package/lib/typescript/atoms/rn-flat-list/rn-flat-list.types.d.ts +3 -1
- package/lib/typescript/atoms/rn-scroll-view/rn-scroll-view.types.d.ts +4 -0
- package/lib/typescript/atoms/rn-section-list/rn-section-list.d.ts +2 -8
- package/lib/typescript/atoms/rn-section-list/rn-section-list.types.d.ts +3 -1
- package/lib/typescript/atoms/rn-text/rn-text.types.d.ts +10 -1
- package/lib/typescript/atoms/rn-view/rn-view.types.d.ts +2 -0
- package/lib/typescript/atoms/scroll-view/scroll-view.types.d.ts +4 -0
- package/lib/typescript/atoms/segmented-control/segmented-control.d.ts +1 -6
- package/lib/typescript/atoms/segmented-control/segmented-control.ios.d.ts +7 -0
- package/lib/typescript/atoms/segmented-control/segmented-control.types.d.ts +13 -0
- package/lib/typescript/atoms/skeleton/skeleton.types.d.ts +11 -2
- package/lib/typescript/atoms/slider/slider.types.d.ts +7 -0
- package/lib/typescript/atoms/spacer/spacer.types.d.ts +3 -0
- package/lib/typescript/atoms/surface/surface.types.d.ts +7 -0
- package/lib/typescript/atoms/switch/switch.types.d.ts +8 -0
- package/lib/typescript/atoms/text/text.types.d.ts +18 -1
- package/lib/typescript/atoms/text-field/text-field.types.d.ts +12 -0
- package/lib/typescript/atoms/v-stack/v-stack.types.d.ts +9 -0
- package/lib/typescript/atoms/z-stack/z-stack.types.d.ts +8 -0
- package/lib/typescript/molecules/collapsible/collapsible.types.d.ts +8 -0
- package/lib/typescript/molecules/empty-state/empty-state.types.d.ts +5 -0
- package/lib/typescript/molecules/label/label.types.d.ts +6 -0
- package/lib/typescript/molecules/labeled-content/labeled-content.types.d.ts +6 -0
- package/lib/typescript/molecules/link/link.types.d.ts +6 -0
- package/lib/typescript/molecules/list-item/list-item.types.d.ts +9 -0
- package/lib/typescript/molecules/navigation-bar/navigation-bar.types.d.ts +8 -0
- package/lib/typescript/molecules/pager/pager.types.d.ts +2 -0
- package/lib/typescript/molecules/radio-group/radio-group.types.d.ts +10 -0
- package/lib/typescript/molecules/rn-list-item/rn-list-item.types.d.ts +1 -1
- package/lib/typescript/molecules/rn-tooltip/rn-tooltip.types.d.ts +11 -0
- package/lib/typescript/molecules/scroll-edge-container/scroll-edge-container.types.d.ts +7 -2
- package/lib/typescript/molecules/search-bar/search-bar.types.d.ts +8 -0
- package/lib/typescript/molecules/stepper/stepper.ios.d.ts +5 -0
- package/lib/typescript/molecules/stepper/stepper.types.d.ts +10 -0
- package/lib/typescript/molecules/tooltip/tooltip.types.d.ts +12 -0
- package/lib/typescript/organisms/action-sheet/action-sheet.types.d.ts +8 -0
- package/lib/typescript/organisms/alert/alert.types.d.ts +11 -0
- package/lib/typescript/organisms/context-menu/context-menu.types.d.ts +4 -0
- package/lib/typescript/organisms/fab-menu/fab-menu.types.d.ts +2 -0
- package/lib/typescript/organisms/form/form.types.d.ts +6 -0
- package/lib/typescript/organisms/menu/menu.types.d.ts +17 -0
- package/lib/typescript/organisms/sheet/sheet.types.d.ts +19 -0
- package/lib/typescript/organisms/snackbar/snackbar.types.d.ts +8 -0
- package/lib/typescript/organisms/swipe-actions/swipe-actions.types.d.ts +36 -13
- package/lib/typescript/templates/screen/screen.types.d.ts +9 -0
- package/package.json +5 -7
- package/src/atoms/activity-indicator/activity-indicator.android.tsx +32 -0
- package/src/atoms/activity-indicator/activity-indicator.ios.tsx +15 -0
- package/src/atoms/activity-indicator/activity-indicator.types.ts +20 -0
- package/src/atoms/activity-indicator/index.ts +1 -0
- package/src/atoms/avatar/avatar.tsx +1 -1
- package/src/atoms/avatar/avatar.types.ts +5 -0
- package/src/atoms/badge/badge.types.ts +3 -0
- package/src/atoms/blur-view/blur-view.android.tsx +68 -0
- package/src/atoms/blur-view/blur-view.ios.tsx +37 -0
- package/src/atoms/blur-view/blur-view.types.ts +34 -0
- package/src/atoms/blur-view/index.ts +2 -0
- package/src/atoms/button/button.types.ts +12 -0
- package/src/atoms/card/card.types.ts +6 -0
- package/src/atoms/checkbox/checkbox.android.tsx +7 -3
- package/src/atoms/checkbox/checkbox.types.ts +5 -0
- package/src/atoms/chip/chip.types.ts +5 -0
- package/src/atoms/color-picker/color-picker.types.ts +4 -0
- package/src/atoms/date-picker/date-picker.ios.tsx +33 -13
- package/src/atoms/date-picker/date-picker.types.ts +14 -0
- package/src/atoms/divider/divider.types.ts +3 -0
- package/src/atoms/fab/fab.types.ts +7 -0
- package/src/atoms/glass-view/glass-view.android.tsx +41 -3
- package/src/atoms/glass-view/glass-view.types.ts +13 -5
- package/src/atoms/h-stack/h-stack.types.ts +6 -0
- package/src/atoms/icon/icon.types.ts +8 -0
- package/src/atoms/icon-button/icon-button.types.ts +5 -0
- package/src/atoms/image/image.tsx +11 -12
- package/src/atoms/image/image.types.ts +6 -0
- package/src/atoms/image/index.ts +1 -0
- package/src/atoms/index.ts +1 -1
- package/src/atoms/island/island.android.tsx +10 -2
- package/src/atoms/island/island.ios.tsx +4 -2
- package/src/atoms/island/island.types.ts +10 -2
- package/src/atoms/list/list.types.ts +2 -0
- package/src/atoms/picker/picker.types.ts +12 -0
- package/src/atoms/pressable/pressable.tsx +46 -6
- package/src/atoms/pressable/pressable.types.ts +10 -0
- package/src/atoms/progress/progress.types.ts +6 -0
- package/src/atoms/rn-flat-list/rn-flat-list.tsx +8 -8
- package/src/atoms/rn-flat-list/rn-flat-list.types.ts +3 -1
- package/src/atoms/rn-scroll-view/rn-scroll-view.types.ts +4 -0
- package/src/atoms/rn-section-list/rn-section-list.tsx +5 -8
- package/src/atoms/rn-section-list/rn-section-list.types.ts +3 -1
- package/src/atoms/rn-text/rn-text.tsx +6 -3
- package/src/atoms/rn-text/rn-text.types.ts +15 -5
- package/src/atoms/rn-view/rn-view.types.ts +2 -0
- package/src/atoms/scroll-view/scroll-view.types.ts +4 -0
- package/src/atoms/segmented-control/segmented-control.android.tsx +79 -0
- package/src/atoms/segmented-control/segmented-control.ios.tsx +47 -0
- package/src/atoms/segmented-control/segmented-control.types.ts +13 -0
- package/src/atoms/skeleton/skeleton.tsx +4 -4
- package/src/atoms/skeleton/skeleton.types.ts +11 -2
- package/src/atoms/slider/slider.types.ts +7 -0
- package/src/atoms/spacer/spacer.types.ts +3 -0
- package/src/atoms/surface/surface.types.ts +7 -0
- package/src/atoms/switch/switch.android.tsx +4 -1
- package/src/atoms/switch/switch.types.ts +8 -0
- package/src/atoms/text/text.android.tsx +7 -1
- package/src/atoms/text/text.ios.tsx +14 -3
- package/src/atoms/text/text.types.ts +18 -1
- package/src/atoms/text-field/text-field.types.ts +12 -0
- package/src/atoms/v-stack/v-stack.types.ts +9 -0
- package/src/atoms/z-stack/z-stack.types.ts +8 -0
- package/src/molecules/collapsible/collapsible.android.tsx +47 -7
- package/src/molecules/collapsible/collapsible.types.ts +8 -0
- package/src/molecules/empty-state/empty-state.types.ts +5 -0
- package/src/molecules/label/label.types.ts +6 -0
- package/src/molecules/labeled-content/labeled-content.types.ts +6 -0
- package/src/molecules/link/link.types.ts +6 -0
- package/src/molecules/list-item/list-item.types.ts +9 -0
- package/src/molecules/navigation-bar/navigation-bar.android.tsx +1 -6
- package/src/molecules/navigation-bar/navigation-bar.types.ts +8 -0
- package/src/molecules/pager/pager.android.tsx +4 -1
- package/src/molecules/pager/pager.types.ts +2 -0
- package/src/molecules/radio-group/radio-group.types.ts +10 -0
- package/src/molecules/rn-list-item/rn-list-item.types.ts +1 -1
- package/src/molecules/rn-tooltip/rn-tooltip.types.ts +11 -0
- package/src/molecules/scroll-edge-container/scroll-edge-container.android.tsx +103 -10
- package/src/molecules/scroll-edge-container/scroll-edge-container.types.ts +7 -2
- package/src/molecules/search-bar/search-bar.tsx +9 -2
- package/src/molecules/search-bar/search-bar.types.ts +8 -0
- package/src/molecules/stepper/stepper.ios.tsx +37 -1
- package/src/molecules/stepper/stepper.types.ts +10 -0
- package/src/molecules/tooltip/tooltip.android.tsx +17 -9
- package/src/molecules/tooltip/tooltip.types.ts +12 -0
- package/src/organisms/action-sheet/action-sheet.android.tsx +37 -19
- package/src/organisms/action-sheet/action-sheet.ios.tsx +22 -9
- package/src/organisms/action-sheet/action-sheet.types.ts +8 -0
- package/src/organisms/alert/alert.ios.tsx +11 -1
- package/src/organisms/alert/alert.types.ts +11 -0
- package/src/organisms/context-menu/context-menu.types.ts +4 -0
- package/src/organisms/fab-menu/fab-menu.types.ts +2 -0
- package/src/organisms/form/form.android.tsx +15 -7
- package/src/organisms/form/form.types.ts +6 -0
- package/src/organisms/menu/menu.types.ts +17 -0
- package/src/organisms/sheet/sheet.types.ts +19 -0
- package/src/organisms/snackbar/snackbar.types.ts +8 -0
- package/src/organisms/swipe-actions/swipe-actions.android.tsx +129 -9
- package/src/organisms/swipe-actions/swipe-actions.ios.tsx +45 -11
- package/src/organisms/swipe-actions/swipe-actions.types.ts +37 -14
- package/src/ripple-clip.ts +10 -1
- package/src/templates/screen/screen.android.tsx +33 -12
- package/src/templates/screen/screen.types.ts +9 -0
- package/lib/module/atoms/activity-indicator/activity-indicator.js +0 -14
- package/lib/module/atoms/activity-indicator/activity-indicator.js.map +0 -1
- package/lib/module/atoms/flash-list/flash-list.js +0 -31
- package/lib/module/atoms/flash-list/flash-list.js.map +0 -1
- package/lib/module/atoms/flash-list/flash-list.types.js +0 -4
- package/lib/module/atoms/flash-list/flash-list.types.js.map +0 -1
- package/lib/module/atoms/flash-list/index.js +0 -5
- package/lib/module/atoms/flash-list/index.js.map +0 -1
- package/lib/module/atoms/segmented-control/segmented-control.js +0 -40
- package/lib/module/atoms/segmented-control/segmented-control.js.map +0 -1
- package/lib/typescript/atoms/flash-list/flash-list.d.ts +0 -8
- package/lib/typescript/atoms/flash-list/flash-list.types.d.ts +0 -18
- package/lib/typescript/atoms/flash-list/index.d.ts +0 -2
- package/src/atoms/activity-indicator/activity-indicator.tsx +0 -9
- package/src/atoms/flash-list/flash-list.tsx +0 -28
- package/src/atoms/flash-list/flash-list.types.ts +0 -20
- package/src/atoms/flash-list/index.ts +0 -2
- package/src/atoms/segmented-control/segmented-control.tsx +0 -47
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Text as ComposeText } from '@expo/ui/jetpack-compose';
|
|
4
4
|
import { testID as testIdModifier } from '@expo/ui/jetpack-compose/modifiers';
|
|
5
|
+
import { useSxModifiers } from '@hzblj/kara-sx';
|
|
5
6
|
import { useAppTheme } from '@hzblj/kara-theme';
|
|
6
7
|
import { useMemo } from 'react';
|
|
7
8
|
import { useHostGuard } from "../../host-context.js";
|
|
@@ -26,12 +27,14 @@ export const Text = ({
|
|
|
26
27
|
numberOfLines,
|
|
27
28
|
testID,
|
|
28
29
|
transform,
|
|
29
|
-
variant = 'body'
|
|
30
|
+
variant = 'body',
|
|
31
|
+
...sx
|
|
30
32
|
}) => {
|
|
31
33
|
useHostGuard('Text');
|
|
32
34
|
const theme = useAppTheme();
|
|
33
35
|
const style = theme.typography[variant];
|
|
34
|
-
const
|
|
36
|
+
const sxModifiers = useSxModifiers(sx);
|
|
37
|
+
const modifiers = useMemo(() => testID ? [...sxModifiers, testIdModifier(testID)] : sxModifiers, [sxModifiers, testID]);
|
|
35
38
|
return /*#__PURE__*/_jsx(ComposeText, {
|
|
36
39
|
color: theme.colorString(color),
|
|
37
40
|
maxLines: numberOfLines,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","ComposeText","testID","testIdModifier","useAppTheme","useMemo","useHostGuard","jsx","_jsx","DECORATION","none","strikethrough","underline","applyTransform","children","transform","toUpperCase","toLowerCase","decorationOf","decoration","undefined","align","color","numberOfLines","variant","theme","style","typography","modifiers","colorString","maxLines","fontFamily","fontSize","fontWeight","lineHeight","textAlign","textDecoration"],"sourceRoot":"../../../../src","sources":["atoms/text/text.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,QAAO,0BAA0B;AAC5D,SAAQC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3E,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAE7B,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,UAAU,GAAG;EACjBC,IAAI,EAAE,MAAM;EACZC,aAAa,EAAE,aAAa;EAC5BC,SAAS,EAAE;AACb,CAAU;AAEV,MAAMC,cAAc,GAAGA,CAACC,QAA+B,EAAEC,SAAoC,KAAK;EAChG,IAAI,CAACA,SAAS,IAAI,OAAOD,QAAQ,KAAK,QAAQ,EAAE;IAC9C,OAAOA,QAAQ;EACjB;EAEA,OAAOC,SAAS,KAAK,WAAW,GAAGD,QAAQ,CAACE,WAAW,CAAC,CAAC,GAAGF,QAAQ,CAACG,WAAW,CAAC,CAAC;AACpF,CAAC;AAED,MAAMC,YAAY,GAAIC,UAAsC,IAC1DA,UAAU,KAAKC,SAAS,GAAGA,SAAS,GAAGX,UAAU,CAACU,UAAU,CAAC;AAE/D,OAAO,
|
|
1
|
+
{"version":3,"names":["Text","ComposeText","testID","testIdModifier","useSxModifiers","useAppTheme","useMemo","useHostGuard","jsx","_jsx","DECORATION","none","strikethrough","underline","applyTransform","children","transform","toUpperCase","toLowerCase","decorationOf","decoration","undefined","align","color","numberOfLines","variant","sx","theme","style","typography","sxModifiers","modifiers","colorString","maxLines","fontFamily","fontSize","fontWeight","lineHeight","textAlign","textDecoration"],"sourceRoot":"../../../../src","sources":["atoms/text/text.android.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,QAAO,0BAA0B;AAC5D,SAAQC,MAAM,IAAIC,cAAc,QAAO,oCAAoC;AAC3E,SAAQC,cAAc,QAAO,gBAAgB;AAC7C,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAE7B,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,UAAU,GAAG;EACjBC,IAAI,EAAE,MAAM;EACZC,aAAa,EAAE,aAAa;EAC5BC,SAAS,EAAE;AACb,CAAU;AAEV,MAAMC,cAAc,GAAGA,CAACC,QAA+B,EAAEC,SAAoC,KAAK;EAChG,IAAI,CAACA,SAAS,IAAI,OAAOD,QAAQ,KAAK,QAAQ,EAAE;IAC9C,OAAOA,QAAQ;EACjB;EAEA,OAAOC,SAAS,KAAK,WAAW,GAAGD,QAAQ,CAACE,WAAW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":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { Text as SwiftUIText } from '@expo/ui/swift-ui';
|
|
4
4
|
import { foregroundStyle, lineLimit, lineSpacing, multilineTextAlignment, strikethrough, textCase, underline } from '@expo/ui/swift-ui/modifiers';
|
|
5
5
|
import { scaledFont } from '@hzblj/kara-native/swift-ui';
|
|
6
|
+
import { useSxModifiers } from '@hzblj/kara-sx';
|
|
6
7
|
import { useAppTheme } from '@hzblj/kara-theme';
|
|
7
8
|
import { useMemo } from 'react';
|
|
8
9
|
import { useHostGuard } from "../../host-context.js";
|
|
@@ -12,6 +13,13 @@ const ALIGNMENT = {
|
|
|
12
13
|
left: 'leading',
|
|
13
14
|
right: 'trailing'
|
|
14
15
|
};
|
|
16
|
+
|
|
17
|
+
/** Where a frame larger than the text — `wide`, `w`, `h` — puts it: on the side its lines align to, centred vertically. */
|
|
18
|
+
const FRAME_ALIGNMENT = {
|
|
19
|
+
center: 'center',
|
|
20
|
+
left: 'leading',
|
|
21
|
+
right: 'trailing'
|
|
22
|
+
};
|
|
15
23
|
export const Text = ({
|
|
16
24
|
align,
|
|
17
25
|
children,
|
|
@@ -20,11 +28,14 @@ export const Text = ({
|
|
|
20
28
|
numberOfLines,
|
|
21
29
|
testID,
|
|
22
30
|
transform,
|
|
23
|
-
variant = 'body'
|
|
31
|
+
variant = 'body',
|
|
32
|
+
...sx
|
|
24
33
|
}) => {
|
|
25
34
|
useHostGuard('Text');
|
|
26
35
|
const theme = useAppTheme();
|
|
27
36
|
const style = theme.typography[variant];
|
|
37
|
+
// After the text's own modifiers: the font and colour belong to the glyphs, the padding and frame to the box around.
|
|
38
|
+
const sxModifiers = useSxModifiers(sx, FRAME_ALIGNMENT[align ?? 'left']);
|
|
28
39
|
const modifiers = useMemo(() => {
|
|
29
40
|
const list = [
|
|
30
41
|
// Not `@expo/ui`'s `font()`: for the platform's face it gives either Apple's size or a size that ignores Dynamic
|
|
@@ -56,8 +67,8 @@ export const Text = ({
|
|
|
56
67
|
if (numberOfLines !== undefined) {
|
|
57
68
|
list.push(lineLimit(numberOfLines));
|
|
58
69
|
}
|
|
59
|
-
return list;
|
|
60
|
-
}, [align, color, decoration, numberOfLines, style, theme, transform]);
|
|
70
|
+
return [...list, ...sxModifiers];
|
|
71
|
+
}, [align, color, decoration, numberOfLines, style, sxModifiers, theme, transform]);
|
|
61
72
|
return /*#__PURE__*/_jsx(SwiftUIText, {
|
|
62
73
|
modifiers: modifiers,
|
|
63
74
|
testID: testID,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","SwiftUIText","foregroundStyle","lineLimit","lineSpacing","multilineTextAlignment","strikethrough","textCase","underline","scaledFont","useAppTheme","useMemo","useHostGuard","jsx","_jsx","ALIGNMENT","center","left","right","align","children","color","decoration","numberOfLines","testID","transform","variant","theme","style","typography","modifiers","list","family","fontFamily","size","fontSize","textStyle","scalesWith","weight","Math","max","lineHeight","push","isActive","pattern","undefined"],"sourceRoot":"../../../../src","sources":["atoms/text/text.ios.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,QAAO,mBAAmB;AACrD,SACEC,eAAe,EACfC,SAAS,EACTC,WAAW,EAEXC,sBAAsB,EACtBC,aAAa,EACbC,QAAQ,EACRC,SAAS,QACJ,6BAA6B;AACpC,SAAQC,UAAU,QAAO,6BAA6B;AACtD,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAE7B,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,SAAS,GAAG;EAChBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE;AACT,CAAU;
|
|
1
|
+
{"version":3,"names":["Text","SwiftUIText","foregroundStyle","lineLimit","lineSpacing","multilineTextAlignment","strikethrough","textCase","underline","scaledFont","useSxModifiers","useAppTheme","useMemo","useHostGuard","jsx","_jsx","ALIGNMENT","center","left","right","FRAME_ALIGNMENT","align","children","color","decoration","numberOfLines","testID","transform","variant","sx","theme","style","typography","sxModifiers","modifiers","list","family","fontFamily","size","fontSize","textStyle","scalesWith","weight","Math","max","lineHeight","push","isActive","pattern","undefined"],"sourceRoot":"../../../../src","sources":["atoms/text/text.ios.tsx"],"mappings":";;AAAA,SAAQA,IAAI,IAAIC,WAAW,QAAO,mBAAmB;AACrD,SACEC,eAAe,EACfC,SAAS,EACTC,WAAW,EAEXC,sBAAsB,EACtBC,aAAa,EACbC,QAAQ,EACRC,SAAS,QACJ,6BAA6B;AACpC,SAAQC,UAAU,QAAO,6BAA6B;AACtD,SAA6BC,cAAc,QAAO,gBAAgB;AAClE,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAE7B,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAG/C,MAAMC,SAAS,GAAG;EAChBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE;AACT,CAAU;;AAEV;AACA,MAAMC,eAAe,GAAG;EACtBH,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE;AACT,CAAsD;AAEtD,OAAO,MAAMnB,IAAmB,GAAGA,CAAC;EAClCqB,KAAK;EACLC,QAAQ;EACRC,KAAK,GAAG,iBAAiB;EACzBC,UAAU;EACVC,aAAa;EACbC,MAAM;EACNC,SAAS;EACTC,OAAO,GAAG,MAAM;EAChB,GAAGC;AACM,CAAC,KAAK;EACfhB,YAAY,CAAC,MAAM,CAAC;EACpB,MAAMiB,KAAK,GAAGnB,WAAW,CAAC,CAAC;EAC3B,MAAMoB,KAAK,GAAGD,KAAK,CAACE,UAAU,CAACJ,OAAO,CAAC;EACvC;EACA,MAAMK,WAAW,GAAGvB,cAAc,CAACmB,EAAE,EAAET,eAAe,CAACC,KAAK,IAAI,MAAM,CAAC,CAAC;EA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EAAEM,KAAK,EAAEE,WAAW,EAAEH,KAAK,EAAEH,SAAS,CAAC,CAAC;EAEnF,oBACEZ,IAAA,CAACd,WAAW;IAACiC,SAAS,EAAEA,SAAU;IAACR,MAAM,EAAEA,MAAO;IAAAJ,QAAA,EAC/CA;EAAQ,CACE,CAAC;AAElB,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { AnimatedVisibility, Column, Text as ComposeText, Row } from '@expo/ui/jetpack-compose';
|
|
4
|
-
import { clickable } from '@expo/ui/jetpack-compose/modifiers';
|
|
5
|
-
import { useAppTheme } from '@hzblj/kara-theme';
|
|
3
|
+
import { AnimatedVisibility, Box, Column, Text as ComposeText, EnterTransition, ExitTransition, Row } from '@expo/ui/jetpack-compose';
|
|
4
|
+
import { animated, clickable, defaultMinSize, fillMaxWidth, graphicsLayer, tween } from '@expo/ui/jetpack-compose/modifiers';
|
|
5
|
+
import { duration, useAppTheme } from '@hzblj/kara-theme';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { Glyph } from "../../glyph/index.js";
|
|
8
8
|
import { useHostGuard } from "../../host-context.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
/** Material's standard easing, at the length a disclosure takes. */
|
|
11
|
+
const TURN = tween({
|
|
12
|
+
durationMillis: duration.d200,
|
|
13
|
+
easing: 'fastOutSlowIn'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/** Down from the row, fading in — Compose's default grows from a corner, sideways as well as down. */
|
|
17
|
+
const ENTER = EnterTransition.expandVertically().plus(EnterTransition.fadeIn());
|
|
18
|
+
const EXIT = ExitTransition.shrinkVertically().plus(ExitTransition.fadeOut());
|
|
19
|
+
const WIDE = [fillMaxWidth()];
|
|
20
|
+
|
|
21
|
+
/** Material's least touch target. */
|
|
22
|
+
const ROW_HEIGHT = 48;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A pressable row and an animated reveal: the content expands down from the row, and the chevron turns a quarter
|
|
26
|
+
* toward it, as a Material disclosure does — it used to jump between two glyphs. The row spans its parent, the chevron
|
|
27
|
+
* at the far end, and is never shorter than a touch target.
|
|
28
|
+
*/
|
|
10
29
|
export const Collapsible = ({
|
|
11
30
|
children,
|
|
12
31
|
expanded,
|
|
@@ -15,8 +34,14 @@ export const Collapsible = ({
|
|
|
15
34
|
}) => {
|
|
16
35
|
useHostGuard('Collapsible');
|
|
17
36
|
const theme = useAppTheme();
|
|
18
|
-
const modifiers = useMemo(() => [
|
|
37
|
+
const modifiers = useMemo(() => [fillMaxWidth(), defaultMinSize({
|
|
38
|
+
minHeight: ROW_HEIGHT
|
|
39
|
+
}), clickable(() => onExpandedChange(!expanded))], [expanded, onExpandedChange]);
|
|
40
|
+
const turn = useMemo(() => [graphicsLayer({
|
|
41
|
+
rotationZ: animated(expanded ? 90 : 0, TURN)
|
|
42
|
+
})], [expanded]);
|
|
19
43
|
return /*#__PURE__*/_jsxs(Column, {
|
|
44
|
+
modifiers: WIDE,
|
|
20
45
|
children: [/*#__PURE__*/_jsxs(Row, {
|
|
21
46
|
horizontalArrangement: "spaceBetween",
|
|
22
47
|
modifiers: modifiers,
|
|
@@ -25,11 +50,16 @@ export const Collapsible = ({
|
|
|
25
50
|
color: theme.colorString('content.primary'),
|
|
26
51
|
style: theme.typography.body,
|
|
27
52
|
children: label
|
|
28
|
-
}), /*#__PURE__*/_jsx(
|
|
29
|
-
|
|
30
|
-
|
|
53
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
54
|
+
modifiers: turn,
|
|
55
|
+
children: /*#__PURE__*/_jsx(Glyph, {
|
|
56
|
+
name: "chevronRight",
|
|
57
|
+
size: "s20"
|
|
58
|
+
})
|
|
31
59
|
})]
|
|
32
60
|
}), /*#__PURE__*/_jsx(AnimatedVisibility, {
|
|
61
|
+
enterTransition: ENTER,
|
|
62
|
+
exitTransition: EXIT,
|
|
33
63
|
visible: expanded,
|
|
34
64
|
children: children
|
|
35
65
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnimatedVisibility","Column","Text","ComposeText","Row","clickable","useAppTheme","useMemo","Glyph","useHostGuard","jsx","_jsx","jsxs","_jsxs","Collapsible","children","expanded","label","onExpandedChange","theme","modifiers","horizontalArrangement","verticalAlignment","color","colorString","style","typography","body","name","size","visible"],"sourceRoot":"../../../../src","sources":["molecules/collapsible/collapsible.android.tsx"],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"names":["AnimatedVisibility","Box","Column","Text","ComposeText","EnterTransition","ExitTransition","Row","animated","clickable","defaultMinSize","fillMaxWidth","graphicsLayer","tween","duration","useAppTheme","useMemo","Glyph","useHostGuard","jsx","_jsx","jsxs","_jsxs","TURN","durationMillis","d200","easing","ENTER","expandVertically","plus","fadeIn","EXIT","shrinkVertically","fadeOut","WIDE","ROW_HEIGHT","Collapsible","children","expanded","label","onExpandedChange","theme","modifiers","minHeight","turn","rotationZ","horizontalArrangement","verticalAlignment","color","colorString","style","typography","body","name","size","enterTransition","exitTransition","visible"],"sourceRoot":"../../../../src","sources":["molecules/collapsible/collapsible.android.tsx"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,GAAG,EACHC,MAAM,EACNC,IAAI,IAAIC,WAAW,EACnBC,eAAe,EACfC,cAAc,EACdC,GAAG,QACE,0BAA0B;AACjC,SACEC,QAAQ,EACRC,SAAS,EACTC,cAAc,EACdC,YAAY,EACZC,aAAa,EACbC,KAAK,QACA,oCAAoC;AAC3C,SAAQC,QAAQ,EAAEC,WAAW,QAAO,mBAAmB;AACvD,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,KAAK,QAAO,sBAAa;AACjC,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C;AACA,MAAMC,IAAI,GAAGV,KAAK,CAAC;EAACW,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MAACK,iBAAiB,EAAC,QAAQ;MAAAV,QAAA,gBACxFjB,IAAA,CAAChB,WAAW;QAAC4C,KAAK,EAAEP,KAAK,CAACQ,WAAW,CAAC,iBAAiB,CAAE;QAACC,KAAK,EAAET,KAAK,CAACU,UAAU,CAACC,IAAK;QAAAf,QAAA,EACpFE;MAAK,CACK,CAAC,eACdnB,IAAA,CAACnB,GAAG;QAACyC,SAAS,EAAEE,IAAK;QAAAP,QAAA,eACnBjB,IAAA,CAACH,KAAK;UAACoC,IAAI,EAAC,cAAc;UAACC,IAAI,EAAC;QAAK,CAAE;MAAC,CACrC,CAAC;IAAA,CACH,CAAC,eACNlC,IAAA,CAACpB,kBAAkB;MAACuD,eAAe,EAAE5B,KAAM;MAAC6B,cAAc,EAAEzB,IAAK;MAAC0B,OAAO,EAAEnB,QAAS;MAAAD,QAAA,EACjFA;IAAQ,CACS,CAAC;EAAA,CACf,CAAC;AAEb,CAAC","ignoreList":[]}
|
|
@@ -4,17 +4,10 @@ import { iconResourceName } from '@hzblj/kara-native';
|
|
|
4
4
|
import { TopAppBar } from '@hzblj/kara-native/jetpack-compose';
|
|
5
5
|
import { useAppTheme } from '@hzblj/kara-theme';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
|
-
import { StyleSheet } from 'react-native';
|
|
8
7
|
import { Island } from "../../atoms/island/index.js";
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
9
|
/** Material's small top app bar. */
|
|
11
10
|
const BAR_HEIGHT = 64;
|
|
12
|
-
const styles = StyleSheet.create({
|
|
13
|
-
bar: {
|
|
14
|
-
height: BAR_HEIGHT,
|
|
15
|
-
width: '100%'
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
11
|
const DEFAULT_LABELS = {
|
|
19
12
|
back: 'Back',
|
|
20
13
|
close: 'Close'
|
|
@@ -52,9 +45,10 @@ export const NavigationBar = ({
|
|
|
52
45
|
const nativeLeadingItems = useMemo(() => leadingItems?.map(toNativeItem), [leadingItems]);
|
|
53
46
|
const nativeTrailingItems = useMemo(() => trailingItems?.map(toNativeItem), [trailingItems]);
|
|
54
47
|
return /*#__PURE__*/_jsx(Island, {
|
|
48
|
+
h: BAR_HEIGHT,
|
|
55
49
|
matchContents: false,
|
|
56
|
-
style: styles.bar,
|
|
57
50
|
testID: testID,
|
|
51
|
+
w: "100%",
|
|
58
52
|
children: /*#__PURE__*/_jsx(TopAppBar, {
|
|
59
53
|
fontFamily: font.fontFamily,
|
|
60
54
|
fontSize: font.fontSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["iconResourceName","TopAppBar","useAppTheme","useMemo","
|
|
1
|
+
{"version":3,"names":["iconResourceName","TopAppBar","useAppTheme","useMemo","Island","jsx","_jsx","BAR_HEIGHT","DEFAULT_LABELS","back","close","toNativeItem","onPress","testID","item","type","iconName","icon","label","NavigationBar","inverted","leadingItems","title","titleAlignment","titleVisible","trailingItems","theme","font","typography","headline","color","nativeLeadingItems","map","nativeTrailingItems","h","matchContents","w","children","fontFamily","fontSize","itemColor","titleColor"],"sourceRoot":"../../../../src","sources":["molecules/navigation-bar/navigation-bar.android.tsx"],"mappings":";;AAAA,SAAQA,gBAAgB,QAAO,oBAAoB;AACnD,SAAQC,SAAS,QAA2B,oCAAoC;AAChF,SAAQC,WAAW,QAAO,mBAAmB;AAC7C,SAAQC,OAAO,QAAO,OAAO;AAC7B,SAAQC,MAAM,QAAO,6BAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGzC;AACA,MAAMC,UAAU,GAAG,EAAE;AAErB,MAAMC,cAAc,GAAG;EAACC,IAAI,EAAE,MAAM;EAAEC,KAAK,EAAE;AAAO,CAAU;AAE9D,MAAMC,YAAY,GAAGA,CAAC;EAACC,OAAO;EAAEC,MAAM;EAAE,GAAGC;AAAuB,CAAC,KACjEA,IAAI,CAACC,IAAI,KAAK,MAAM,GAChB;EAACC,QAAQ,EAAEhB,gBAAgB,CAACc,IAAI,CAACG,IAAI,CAA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c,EAAEA,cAAe;MAC/BkB,UAAU,EAAEX,KAAM;MAClBN,YAAY,EAAEA,YAAa;MAC3BC,aAAa,EAAEQ;IAAoB,CACpC;EAAC,CACI,CAAC;AAEb,CAAC","ignoreList":[]}
|
|
@@ -5,28 +5,29 @@ import { fillMaxSize, testID as testIdModifier, weight } from '@expo/ui/jetpack-
|
|
|
5
5
|
import { spacing } from '@hzblj/kara-theme';
|
|
6
6
|
import { Children, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import { HStack } from "../../atoms/h-stack/index.js";
|
|
8
|
+
import { Spacer } from "../../atoms/spacer/index.js";
|
|
8
9
|
import { VStack } from "../../atoms/v-stack/index.js";
|
|
9
10
|
import { useHostGuard } from "../../host-context.js";
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
const DOT_SIZE = 6;
|
|
12
13
|
|
|
13
|
-
/** Compose ships no page indicator, so the dots are composed out of atoms. */
|
|
14
|
+
/** Compose ships no page indicator, so the dots are composed out of atoms — centred between two spacers. */
|
|
14
15
|
const PagerDots = ({
|
|
15
16
|
count,
|
|
16
17
|
current
|
|
17
|
-
}) => /*#__PURE__*/
|
|
18
|
+
}) => /*#__PURE__*/_jsxs(HStack, {
|
|
18
19
|
align: "center",
|
|
19
20
|
py: "s12",
|
|
20
21
|
spacing: "s6",
|
|
21
22
|
wide: true,
|
|
22
|
-
children: Array.from({
|
|
23
|
+
children: [/*#__PURE__*/_jsx(Spacer, {}), Array.from({
|
|
23
24
|
length: count
|
|
24
25
|
}, (_, index) => /*#__PURE__*/_jsx(VStack, {
|
|
25
26
|
bg: index === current ? 'content.primary' : 'fill.tertiary',
|
|
26
27
|
borderRadius: "full",
|
|
27
28
|
h: DOT_SIZE,
|
|
28
29
|
w: DOT_SIZE
|
|
29
|
-
}, index))
|
|
30
|
+
}, index)), /*#__PURE__*/_jsx(Spacer, {})]
|
|
30
31
|
});
|
|
31
32
|
export const Pager = ({
|
|
32
33
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HorizontalPager","fillMaxSize","testID","testIdModifier","weight","spacing","Children","useCallback","useEffect","useMemo","useRef","useState","HStack","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","DOT_SIZE","PagerDots","count","current","align","py","wide","children","Array","from","length","_","index","bg","borderRadius","h","w","Pager","indicators","onPageChange","page","pageSpacing","scrollEnabled","pagerRef","settledPage","currentPage","setCurrentPage","undefined","animateScrollToPage","onSettledPageChange","next","modifiers","pager","initialPage","onCurrentPageChange","ref","userScrollEnabled","tall"],"sourceRoot":"../../../../src","sources":["molecules/pager/pager.android.tsx"],"mappings":";;AAAA,SAAQA,eAAe,QAAmC,0BAA0B;AACpF,SAAQC,WAAW,EAAuBC,MAAM,IAAIC,cAAc,EAAEC,MAAM,QAAO,oCAAoC;AACrH,SAAQC,OAAO,QAAO,mBAAmB;AACzC,SAAQC,QAAQ,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAO,OAAO;AAEjF,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,QAAQ,GAAG,CAAC;;AAElB;AACA,MAAMC,SAAS,GAAGA,CAAC;EAACC,KAAK;EAAEC;AAAyC,CAAC,
|
|
1
|
+
{"version":3,"names":["HorizontalPager","fillMaxSize","testID","testIdModifier","weight","spacing","Children","useCallback","useEffect","useMemo","useRef","useState","HStack","Spacer","VStack","useHostGuard","jsx","_jsx","jsxs","_jsxs","DOT_SIZE","PagerDots","count","current","align","py","wide","children","Array","from","length","_","index","bg","borderRadius","h","w","Pager","indicators","onPageChange","page","pageSpacing","scrollEnabled","pagerRef","settledPage","currentPage","setCurrentPage","undefined","animateScrollToPage","onSettledPageChange","next","modifiers","pager","initialPage","onCurrentPageChange","ref","userScrollEnabled","tall"],"sourceRoot":"../../../../src","sources":["molecules/pager/pager.android.tsx"],"mappings":";;AAAA,SAAQA,eAAe,QAAmC,0BAA0B;AACpF,SAAQC,WAAW,EAAuBC,MAAM,IAAIC,cAAc,EAAEC,MAAM,QAAO,oCAAoC;AACrH,SAAQC,OAAO,QAAO,mBAAmB;AACzC,SAAQC,QAAQ,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAO,OAAO;AAEjF,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,MAAM,QAAO,6BAAoB;AACzC,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,QAAQ,GAAG,CAAC;;AAElB;AACA,MAAMC,SAAS,GAAGA,CAAC;EAACC,KAAK;EAAEC;AAAyC,CAAC,kBACnEJ,KAAA,CAACP,MAAM;EAACY,KAAK,EAAC,QAAQ;EAACC,EAAE,EAAC,KAAK;EAACpB,OAAO,EAAC,IAAI;EAACqB,IAAI;EAAAC,QAAA,gBAC/CV,IAAA,CAACJ,MAAM,IAAE,CAAC,EACTe,KAAK,CAACC,IAAI,CAAC;IAACC,MAAM,EAAER;EAAK,CAAC,EAAE,CAACS,CAAC,EAAEC,KAAK,kBACpCf,IAAA,CAACH,MAAM;IACLmB,EAAE,EAAED,KAAK,KAAKT,OAAO,GAAG,iBAAiB,GAAG,eAAgB;IAC5DW,YAAY,EAAC,MAAM;IACnBC,CAAC,EAAEf,QAAS;IAEZgB,CAAC,EAAEhB;EAAS,GADPY,KAEN,CACF,CAAC,eACFf,IAAA,CAACJ,MAAM,IAAE,CAAC;AAAA,CACJ,CACT;AAED,OAAO,MAAMwB,KAAqB,GAAGA,CAAC;EACpCV,QAAQ;EACRW,UAAU,GA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;IAC7DE,mBAAmB,EAAEA,mBAAoB;IACzCR,WAAW,EAAEA,WAAW,KAAKM,SAAS,GAAGA,SAAS,GAAG1C,OAAO,CAACoC,WAAW,CAAE;IAC1Ec,GAAG,EAAEZ,QAAS;IACda,iBAAiB,EAAEd,aAAc;IAAAf,QAAA,EAEhCA;EAAQ,CACM,CAClB;EAED,IAAI,CAACW,UAAU,EAAE;IACf,OAAOc,KAAK;EACd;EAEA,oBACEjC,KAAA,CAACL,MAAM;IAAC2C,IAAI;IAAC/B,IAAI;IAAAC,QAAA,GACdyB,KAAK,eACNnC,IAAA,CAACI,SAAS;MAACC,KAAK,EAAEhB,QAAQ,CAACgB,KAAK,CAACK,QAAQ,CAAE;MAACJ,OAAO,EAAEsB;IAAY,CAAE,CAAC;EAAA,CAC9D,CAAC;AAEb,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { duration, opacity } from '@hzblj/kara-theme';
|
|
4
|
+
import { cloneElement, useCallback, useRef } from 'react';
|
|
5
|
+
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
|
+
import { ABox, Box } from "../../atoms/box/index.js";
|
|
4
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
/** Less than a pixel scrolled is not scrolled — a fling settles a fraction away from the edge. */
|
|
9
|
+
const EDGE_SLOP = 0.5;
|
|
10
|
+
const FILL = {
|
|
11
|
+
duration: duration.d200
|
|
12
|
+
};
|
|
13
|
+
/** A bar, and behind it the container colour it fills with — faded in and out, not switched. */
|
|
14
|
+
const EdgeBar = ({
|
|
15
|
+
children,
|
|
16
|
+
filled
|
|
17
|
+
}) => {
|
|
18
|
+
const fill = useAnimatedStyle(() => ({
|
|
19
|
+
opacity: filled.value
|
|
20
|
+
}), []);
|
|
21
|
+
if (!children) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
25
|
+
children: [/*#__PURE__*/_jsx(ABox, {
|
|
26
|
+
bg: "surface.secondary",
|
|
27
|
+
bottom: 0,
|
|
28
|
+
left: 0,
|
|
29
|
+
pointerEvents: "none",
|
|
30
|
+
position: "absolute",
|
|
31
|
+
right: 0,
|
|
32
|
+
style: fill,
|
|
33
|
+
top: 0
|
|
34
|
+
}), children]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
5
38
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
39
|
+
* Material's take on the scroll edge: a React Native scroll view has no `contentInset` to slide content under a bar on
|
|
40
|
+
* Android, so the bars stack above and below it, and do what a Material top app bar does on scroll — transparent at
|
|
41
|
+
* rest, filled with `surface.secondary` (the scrolled container colour, `surfaceContainer`) once content has scrolled
|
|
42
|
+
* under it. The bottom bar mirrors it: filled while there is more content below. The scroll view keeps its own
|
|
43
|
+
* `onScroll`, `onLayout` and `onContentSizeChange`.
|
|
8
44
|
*/
|
|
9
45
|
export const ScrollEdgeContainer = ({
|
|
10
46
|
automaticInsets: _automaticInsets,
|
|
@@ -14,12 +50,79 @@ export const ScrollEdgeContainer = ({
|
|
|
14
50
|
testID,
|
|
15
51
|
topBar,
|
|
16
52
|
...sx
|
|
17
|
-
}) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
53
|
+
}) => {
|
|
54
|
+
const topFilled = useSharedValue(opacity.o0);
|
|
55
|
+
const bottomFilled = useSharedValue(opacity.o0);
|
|
56
|
+
const metrics = useRef({
|
|
57
|
+
content: 0,
|
|
58
|
+
offset: 0,
|
|
59
|
+
viewport: 0
|
|
60
|
+
});
|
|
61
|
+
const state = useRef({
|
|
62
|
+
bottom: false,
|
|
63
|
+
top: false
|
|
64
|
+
});
|
|
65
|
+
const {
|
|
66
|
+
flex,
|
|
67
|
+
onContentSizeChange,
|
|
68
|
+
onLayout,
|
|
69
|
+
onScroll,
|
|
70
|
+
scrollEventThrottle
|
|
71
|
+
} = children.props;
|
|
72
|
+
|
|
73
|
+
// Only a change of state animates; a scroll event restating the same one would restart the fade.
|
|
74
|
+
const update = useCallback(() => {
|
|
75
|
+
const {
|
|
76
|
+
content,
|
|
77
|
+
offset,
|
|
78
|
+
viewport
|
|
79
|
+
} = metrics.current;
|
|
80
|
+
const top = offset > EDGE_SLOP;
|
|
81
|
+
const bottom = viewport > 0 && offset + viewport < content - EDGE_SLOP;
|
|
82
|
+
if (top !== state.current.top) {
|
|
83
|
+
state.current.top = top;
|
|
84
|
+
topFilled.value = withTiming(top ? opacity.o100 : opacity.o0, FILL);
|
|
85
|
+
}
|
|
86
|
+
if (bottom !== state.current.bottom) {
|
|
87
|
+
state.current.bottom = bottom;
|
|
88
|
+
bottomFilled.value = withTiming(bottom ? opacity.o100 : opacity.o0, FILL);
|
|
89
|
+
}
|
|
90
|
+
}, [bottomFilled, topFilled]);
|
|
91
|
+
|
|
92
|
+
// `flex` so the scroll view takes the room between the bars — left to its content, it grew to the content's height,
|
|
93
|
+
// ran under the bottom bar and had nothing to scroll.
|
|
94
|
+
const scrollable = /*#__PURE__*/cloneElement(children, {
|
|
95
|
+
flex: flex ?? 1,
|
|
96
|
+
onContentSizeChange: (width, height) => {
|
|
97
|
+
metrics.current.content = height;
|
|
98
|
+
update();
|
|
99
|
+
onContentSizeChange?.(width, height);
|
|
100
|
+
},
|
|
101
|
+
onLayout: event => {
|
|
102
|
+
metrics.current.viewport = event.nativeEvent.layout.height;
|
|
103
|
+
update();
|
|
104
|
+
onLayout?.(event);
|
|
105
|
+
},
|
|
106
|
+
onScroll: event => {
|
|
107
|
+
metrics.current.offset = event.nativeEvent.contentOffset.y;
|
|
108
|
+
update();
|
|
109
|
+
onScroll?.(event);
|
|
110
|
+
},
|
|
111
|
+
scrollEventThrottle: scrollEventThrottle ?? 16
|
|
112
|
+
});
|
|
113
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
114
|
+
...sx,
|
|
115
|
+
testID: testID,
|
|
116
|
+
children: [/*#__PURE__*/_jsx(EdgeBar, {
|
|
117
|
+
filled: topFilled,
|
|
118
|
+
children: topBar
|
|
119
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
120
|
+
flex: 1,
|
|
121
|
+
children: scrollable
|
|
122
|
+
}), /*#__PURE__*/_jsx(EdgeBar, {
|
|
123
|
+
filled: bottomFilled,
|
|
124
|
+
children: bottomBar
|
|
125
|
+
})]
|
|
126
|
+
});
|
|
127
|
+
};
|
|
25
128
|
//# sourceMappingURL=scroll-edge-container.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Box","jsx","_jsx","jsxs","_jsxs","ScrollEdgeContainer","automaticInsets","_automaticInsets","bottomBar","
|
|
1
|
+
{"version":3,"names":["duration","opacity","cloneElement","useCallback","useRef","useAnimatedStyle","useSharedValue","withTiming","ABox","Box","jsx","_jsx","jsxs","_jsxs","EDGE_SLOP","FILL","d200","EdgeBar","children","filled","fill","value","bg","bottom","left","pointerEvents","position","right","style","top","ScrollEdgeContainer","automaticInsets","_automaticInsets","bottomBar","effect","_effect","testID","topBar","sx","topFilled","o0","bottomFilled","metrics","content","offset","viewport","state","flex","onContentSizeChange","onLayout","onScroll","scrollEventThrottle","props","update","current","o100","scrollable","width","height","event","nativeEvent","layout","contentOffset","y"],"sourceRoot":"../../../../src","sources":["molecules/scroll-edge-container/scroll-edge-container.android.tsx"],"mappings":";;AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,mBAAmB;AACnD,SAAQC,YAAY,EAAkBC,WAAW,EAAEC,MAAM,QAAO,OAAO;AAEvE,SAA0BC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAO,yBAAyB;AAEtG,SAAQC,IAAI,EAAEC,GAAG,QAAO,0BAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGzC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AC;MACRL,mBAAmB,GAAGS,KAAK,EAAEC,MAAM,CAAC;IACtC,CAAC;IACDT,QAAQ,EAAGU,KAAwB,IAAK;MACtCjB,OAAO,CAACY,OAAO,CAACT,QAAQ,GAAGc,KAAK,CAACC,WAAW,CAACC,MAAM,CAACH,MAAM;MAC1DL,MAAM,CAAC,CAAC;MACRJ,QAAQ,GAAGU,KAAK,CAAC;IACnB,CAAC;IACDT,QAAQ,EAAGS,KAA8C,IAAK;MAC5DjB,OAAO,CAACY,OAAO,CAACV,MAAM,GAAGe,KAAK,CAACC,WAAW,CAACE,aAAa,CAACC,CAAC;MAC1DV,MAAM,CAAC,CAAC;MACRH,QAAQ,GAAGS,KAAK,CAAC;IACnB,CAAC;IACDR,mBAAmB,EAAEA,mBAAmB,IAAI;EAC9C,CAAmC,CAAC;EAEpC,oBACEtC,KAAA,CAACJ,GAAG;IAAA,GAAK6B,EAAE;IAAEF,MAAM,EAAEA,MAAO;IAAAlB,QAAA,gBAC1BP,IAAA,CAACM,OAAO;MAACE,MAAM,EAAEoB,SAAU;MAAArB,QAAA,EAAEmB;IAAM,CAAU,CAAC,eAC9C1B,IAAA,CAACF,GAAG;MAACsC,IAAI,EAAE,CAAE;MAAA7B,QAAA,EAAEsC;IAAU,CAAM,CAAC,eAChC7C,IAAA,CAACM,OAAO;MAACE,MAAM,EAAEsB,YAAa;MAAAvB,QAAA,EAAEe;IAAS,CAAU,CAAC;EAAA,CACjD,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useAppTheme } from '@hzblj/kara-theme';
|
|
4
|
-
import { TextInput } from 'react-native';
|
|
4
|
+
import { Platform, TextInput } from 'react-native';
|
|
5
5
|
import { Box } from "../../atoms/box/index.js";
|
|
6
6
|
import { Pressable } from "../../atoms/pressable/index.js";
|
|
7
7
|
import { RnGlyph } from "../../glyph/index.js";
|
|
@@ -13,6 +13,19 @@ export const SearchBar = ({
|
|
|
13
13
|
value
|
|
14
14
|
}) => {
|
|
15
15
|
const theme = useAppTheme();
|
|
16
|
+
const {
|
|
17
|
+
lineHeight,
|
|
18
|
+
...face
|
|
19
|
+
} = theme.typography.body;
|
|
20
|
+
/**
|
|
21
|
+
* A single-line `UITextField` sets its text against the bottom of a line taller than the font, so the variant's
|
|
22
|
+
* `lineHeight` pushed the text below the magnifier beside it. iOS takes the face without it, in a field as tall as
|
|
23
|
+
* the line would have been; Android centres the line and keeps it.
|
|
24
|
+
*/
|
|
25
|
+
const text = Platform.OS === 'ios' ? {
|
|
26
|
+
...face,
|
|
27
|
+
height: lineHeight
|
|
28
|
+
} : theme.typography.body;
|
|
16
29
|
return /*#__PURE__*/_jsxs(Box, {
|
|
17
30
|
align: "center",
|
|
18
31
|
bg: "fill.quaternary",
|
|
@@ -31,7 +44,7 @@ export const SearchBar = ({
|
|
|
31
44
|
onChangeText: onChangeText,
|
|
32
45
|
placeholder: placeholder,
|
|
33
46
|
placeholderTextColor: theme.color('content.quaternary'),
|
|
34
|
-
style: [
|
|
47
|
+
style: [text, {
|
|
35
48
|
color: theme.color('content.primary'),
|
|
36
49
|
flex: 1,
|
|
37
50
|
padding: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAppTheme","TextInput","Box","Pressable","RnGlyph","jsx","_jsx","jsxs","_jsxs","SearchBar","onChangeText","placeholder","testID","value","theme","align","bg","borderRadius","flexDirection","gap","px","py","wide","children","color","name","size","placeholderTextColor","style","
|
|
1
|
+
{"version":3,"names":["useAppTheme","Platform","TextInput","Box","Pressable","RnGlyph","jsx","_jsx","jsxs","_jsxs","SearchBar","onChangeText","placeholder","testID","value","theme","lineHeight","face","typography","body","text","OS","height","align","bg","borderRadius","flexDirection","gap","px","py","wide","children","color","name","size","placeholderTextColor","style","flex","padding","length","onPress"],"sourceRoot":"../../../../src","sources":["molecules/search-bar/search-bar.tsx"],"mappings":";;AAAA,SAAQA,WAAW,QAAO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B,KAAK,CAACiB,KAAK,CAAC,iBAAiB,CAAC;QAAEK,IAAI,EAAE,CAAC;QAAEC,OAAO,EAAE;MAAC,CAAC,CAAE;MAC5ExB,KAAK,EAAEA;IAAM,CACd,CAAC,EACDA,KAAK,CAACyB,MAAM,GAAG,CAAC,gBACfhC,IAAA,CAACH,SAAS;MAACoC,OAAO,EAAEA,CAAA,KAAM7B,YAAY,GAAG,EAAE,CAAE;MAAAoB,QAAA,eAC3CxB,IAAA,CAACF,OAAO;QAAC2B,KAAK,EAAC,kBAAkB;QAACC,IAAI,EAAC,OAAO;QAACC,IAAI,EAAC;MAAK,CAAE;IAAC,CACnD,CAAC,GACV,IAAI;EAAA,CACL,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Stepper as SwiftUIStepper } from '@expo/ui/swift-ui';
|
|
4
|
+
import { labelsHidden } from '@expo/ui/swift-ui/modifiers';
|
|
5
|
+
import { useRef } from 'react';
|
|
6
|
+
import { HStack } from "../../atoms/h-stack/index.js";
|
|
7
|
+
import { Spacer } from "../../atoms/spacer/index.js";
|
|
8
|
+
import { Text } from "../../atoms/text/index.js";
|
|
4
9
|
import { useHostGuard } from "../../host-context.js";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
/** The label stays VoiceOver's, on the control; on screen it is the row's own text. */
|
|
12
|
+
const LABEL_HIDDEN = [labelsHidden()];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* SwiftUI's `Stepper` at the end of a row, the label leading and the value just before the control — the way iOS's own
|
|
16
|
+
* settings show a stepped value. The value rolls to the next one (`numericText`), up or down with the change, in
|
|
17
|
+
* monospaced digits so the row does not jump.
|
|
18
|
+
*/
|
|
6
19
|
export const Stepper = ({
|
|
7
20
|
label,
|
|
8
21
|
max,
|
|
@@ -12,13 +25,37 @@ export const Stepper = ({
|
|
|
12
25
|
value
|
|
13
26
|
}) => {
|
|
14
27
|
useHostGuard('Stepper');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
const previous = useRef(value);
|
|
29
|
+
const countsDown = value < previous.current;
|
|
30
|
+
previous.current = value;
|
|
31
|
+
return /*#__PURE__*/_jsxs(HStack, {
|
|
32
|
+
align: "center",
|
|
33
|
+
spacing: "s12",
|
|
34
|
+
wide: true,
|
|
35
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
36
|
+
children: label
|
|
37
|
+
}), /*#__PURE__*/_jsx(Spacer, {}), /*#__PURE__*/_jsx(Text, {
|
|
38
|
+
color: "content.secondary",
|
|
39
|
+
ios: {
|
|
40
|
+
animation: {
|
|
41
|
+
value
|
|
42
|
+
},
|
|
43
|
+
contentTransition: {
|
|
44
|
+
countsDown,
|
|
45
|
+
type: 'numericText'
|
|
46
|
+
},
|
|
47
|
+
monospacedDigit: true
|
|
48
|
+
},
|
|
49
|
+
children: String(value)
|
|
50
|
+
}), /*#__PURE__*/_jsx(SwiftUIStepper, {
|
|
51
|
+
label: label,
|
|
52
|
+
max: max,
|
|
53
|
+
min: min,
|
|
54
|
+
modifiers: LABEL_HIDDEN,
|
|
55
|
+
onValueChange: onValueChange,
|
|
56
|
+
step: step,
|
|
57
|
+
value: value
|
|
58
|
+
})]
|
|
22
59
|
});
|
|
23
60
|
};
|
|
24
61
|
//# sourceMappingURL=stepper.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Stepper","SwiftUIStepper","useHostGuard","jsx","_jsx","label","max","min","onValueChange","step","value"],"sourceRoot":"../../../../src","sources":["molecules/stepper/stepper.ios.tsx"],"mappings":";;AAAA,SAAQA,OAAO,IAAIC,cAAc,QAAO,mBAAmB;
|
|
1
|
+
{"version":3,"names":["Stepper","SwiftUIStepper","labelsHidden","useRef","HStack","Spacer","Text","useHostGuard","jsx","_jsx","jsxs","_jsxs","LABEL_HIDDEN","label","max","min","onValueChange","step","value","previous","countsDown","current","align","spacing","wide","children","color","ios","animation","contentTransition","type","monospacedDigit","String","modifiers"],"sourceRoot":"../../../../src","sources":["molecules/stepper/stepper.ios.tsx"],"mappings":";;AAAA,SAAQA,OAAO,IAAIC,cAAc,QAAO,mBAAmB;AAC3D,SAAQC,YAAY,QAAO,6BAA6B;AACxD,SAAQC,MAAM,QAAO,OAAO;AAE5B,SAAQC,MAAM,QAAO,8BAAqB;AAC1C,SAAQC,MAAM,QAAO,6BAAoB;AACzC,SAAQC,IAAI,QAAO,2BAAkB;AACrC,SAAQC,YAAY,QAAO,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C;AACA,MAAMC,YAAY,GAAG,CAACV,YAAY,CAAC,CAAC,CAAC;;AAErC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMF,OAAyB,GAAGA,CAAC;EAACa,KAAK;EAAEC,GAAG;EAAEC,GAAG;EAAEC,aAAa;EAAEC,IAAI,GAAG,CAAC;EAAEC;AAAmB,CAAC,KAAK;EAC5GX,YAAY,CAAC,SAAS,CAAC;EACvB,MAAMY,QAAQ,GAAGhB,MAAM,CAACe,KAAK,CAAC;EAC9B,MAAME,UAAU,GAAGF,KAAK,GAAGC,QAAQ,CAACE,OAAO;EAC3CF,QAAQ,CAACE,OAAO,GAAGH,KAAK;EAExB,oBACEP,KAAA,CAACP,MAAM;IAACkB,KAAK,EAAC,QAAQ;IAACC,OAAO,EAAC,KAAK;IAACC,IAAI;IAAAC,QAAA,gBACvChB,IAAA,CAACH,IAAI;MAAAmB,QAAA,EAAEZ;IAAK,CAAO,CAAC,eACpBJ,IAAA,CAACJ,MAAM,IAAE,CAAC,eACVI,IAAA,CAACH,IAAI;MACHoB,KAAK,EAAC,mBAAmB;MACzBC,GAAG,EAAE;QAACC,SAAS,EAAE;UAACV;QAAK,CAAC;QAAEW,iBAAiB,EAAE;UAACT,UAAU;UAAEU,IAAI,EAAE;QAAa,CAAC;QAAEC,eAAe,EAAE;MAAI,CAAE;MAAAN,QAAA,EAEtGO,MAAM,CAACd,KAAK;IAAC,CACV,CAAC,eACPT,IAAA,CAACR,cAAc;MACbY,KAAK,EAAEA,KAAM;MACbC,GAAG,EAAEA,GAAI;MACTC,GAAG,EAAEA,GAAI;MACTkB,SAAS,EAAErB,YAAa;MACxBI,aAAa,EAAEA,aAAc;MAC7BC,IAAI,EAAEA,IAAK;MACXC,KAAK,EAAEA;IAAM,CACd,CAAC;EAAA,CACI,CAAC;AAEb,CAAC","ignoreList":[]}
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Text as ComposeText
|
|
3
|
+
import { Text as ComposeText } from '@expo/ui/jetpack-compose';
|
|
4
|
+
import { TooltipBox } from '@hzblj/kara-native/jetpack-compose';
|
|
4
5
|
import { useAppTheme } from '@hzblj/kara-theme';
|
|
6
|
+
import { useCallback } from 'react';
|
|
5
7
|
import { useHostGuard } from "../../host-context.js";
|
|
6
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* Material's plain tooltip in kara's controlled `TooltipBox`: shown while `visible`, centred above the anchor and kept
|
|
11
|
+
* inside the window. Material's own would open on a long press and hide itself without a word to JS.
|
|
12
|
+
*/
|
|
7
13
|
export const Tooltip = ({
|
|
8
14
|
children,
|
|
9
|
-
|
|
15
|
+
onDismiss,
|
|
16
|
+
text,
|
|
17
|
+
visible
|
|
10
18
|
}) => {
|
|
11
19
|
useHostGuard('Tooltip');
|
|
12
20
|
const theme = useAppTheme();
|
|
21
|
+
const onDismissRequest = useCallback(() => onDismiss(), [onDismiss]);
|
|
13
22
|
return /*#__PURE__*/_jsxs(TooltipBox, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
containerColor: theme.color('surface.high.contrast'),
|
|
24
|
+
isPresented: visible,
|
|
25
|
+
onDismissRequest: onDismissRequest,
|
|
26
|
+
plain: true,
|
|
27
|
+
children: [/*#__PURE__*/_jsx(TooltipBox.Text, {
|
|
17
28
|
children: /*#__PURE__*/_jsx(ComposeText, {
|
|
18
29
|
color: theme.colorString('content.on.high.contrast'),
|
|
19
30
|
style: theme.typography.footnote,
|