@reillymc/react-native-components 0.11.3 → 0.11.5
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 +2 -2
- package/lib/common/index.js +1 -0
- package/lib/common/typography.js +1 -0
- package/lib/components/action/Action.styles.js +1 -0
- package/lib/components/action/IconAction.js +1 -1
- package/lib/components/action/IconAction.styles.js +1 -0
- package/lib/components/action/IconActionBase.js +1 -1
- package/lib/components/action/IconActionBase.styles.js +1 -0
- package/lib/components/alert/AlertIndicator.styles.js +1 -0
- package/lib/components/avatar/Avatar.js +1 -1
- package/lib/components/avatar/Avatar.styles.js +1 -0
- package/lib/components/button/Button.styles.js +1 -0
- package/lib/components/button/ButtonBase.styles.js +1 -0
- package/lib/components/button/IconButton.js +1 -1
- package/lib/components/button/IconButton.styles.js +1 -0
- package/lib/components/button/IconButtonBase.js +1 -1
- package/lib/components/button/IconButtonBase.styles.js +1 -0
- package/lib/components/container/FloatingContainer.js +1 -1
- package/lib/components/container/FloatingContainer.styles.js +1 -0
- package/lib/components/container/FloatingContainer.web.js +1 -1
- package/lib/components/container/Panel.js +1 -1
- package/lib/components/container/index.js +1 -1
- package/lib/components/icon/Icon.js +1 -1
- package/lib/components/icon/Icon.styles.js +1 -0
- package/lib/components/icon/IconBase.js +1 -1
- package/lib/components/icon/IconBase.styles.js +1 -0
- package/lib/components/icon/IconComponentProps.js +1 -0
- package/lib/components/icon/InteractiveIcon.js +1 -1
- package/lib/components/icon/InteractiveIcon.styles.js +1 -0
- package/lib/components/icon/index.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input/DropdownInput.styles.js +1 -0
- package/lib/components/input/DropdownInputBase.js +1 -1
- package/lib/components/input/InputAction.js +1 -1
- package/lib/components/input/InputAction.styles.js +1 -0
- package/lib/components/input/InputBase.js +1 -1
- package/lib/components/input/InputBase.styles.js +1 -0
- package/lib/components/input/InputScaffold.js +1 -1
- package/lib/components/input/InputScaffold.styles.js +1 -0
- package/lib/components/input/NumberInput.js +1 -1
- package/lib/components/input/NumberInputBase.js +1 -1
- package/lib/components/input/RatingInput.js +1 -1
- package/lib/components/input/SelectionInput.js +1 -1
- package/lib/components/input/SelectionInput.styles.js +1 -0
- package/lib/components/input/TimeInput.js +1 -1
- package/lib/components/input/ToggleInput.js +1 -1
- package/lib/components/input/ToggleInput.styles.js +1 -0
- package/lib/components/listItem/ListItem.js +1 -1
- package/lib/components/listItem/ListItem.styles.js +1 -0
- package/lib/components/listItem/ListItemAlert.js +1 -1
- package/lib/components/listItem/ListItemAvatar.js +1 -1
- package/lib/components/listItem/ListItemFooter.js +1 -1
- package/lib/components/listItem/ListItemRow.js +1 -1
- package/lib/components/menu/Menu.styles.js +1 -0
- package/lib/components/menu/MenuItem.js +1 -1
- package/lib/components/menu/MenuItem.styles.js +1 -0
- package/lib/components/rating/Rating.js +1 -1
- package/lib/components/rating/Rating.styles.js +1 -0
- package/lib/components/swipe/SwipeAction.js +1 -1
- package/lib/components/swipe/SwipeAction.styles.js +1 -0
- package/lib/components/swipe/SwipeableContainer.js +1 -1
- package/lib/components/tag/Tag.js +1 -1
- package/lib/components/tag/Tag.styles.js +1 -0
- package/lib/components/tag/TagIcon.js +1 -1
- package/lib/components/text/HighlightedText.js +1 -1
- package/lib/components/text/HighlightedText.styles.js +1 -0
- package/lib/components/text/InteractiveText.styles.js +1 -0
- package/lib/components/text/Text.js +1 -1
- package/lib/components/text/Text.styles.js +1 -0
- package/lib/components/toast/Toast.js +1 -1
- package/lib/components/toast/Toast.styles.js +1 -0
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useForwardedRef.js +1 -1
- package/lib/hooks/useThemedStyles.js +1 -1
- package/lib/icons/index.js +1 -1
- package/lib/icons/ui/ArrowBoth.js +1 -0
- package/lib/icons/ui/ChevronDown.js +1 -0
- package/lib/icons/ui/Circle.js +1 -0
- package/lib/icons/ui/Clock.js +1 -0
- package/lib/icons/ui/Dash.js +1 -0
- package/lib/icons/ui/Exclamation.js +1 -0
- package/lib/icons/ui/InfinityGlyph.js +1 -0
- package/lib/icons/ui/NumberGlyph.js +1 -0
- package/lib/icons/ui/Plus.js +1 -0
- package/lib/icons/ui/StarBorder.js +1 -0
- package/lib/icons/ui/StarFull.js +1 -0
- package/lib/icons/ui/StarHalf.js +1 -0
- package/lib/icons/ui/index.js +1 -0
- package/lib/providers/ThemeProvider.js +1 -1
- package/lib/theme/icons.js +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/theme/styles.js +1 -1
- package/lib/theme/theme.js +1 -1
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types/common/index.d.ts.map +1 -1
- package/lib/types/common/typography.d.ts +6 -0
- package/lib/types/common/typography.d.ts.map +1 -0
- package/lib/types/components/action/Action.styles.d.ts +4 -0
- package/lib/types/components/action/Action.styles.d.ts.map +1 -0
- package/lib/types/components/action/IconAction.d.ts +2 -2
- package/lib/types/components/action/IconAction.d.ts.map +1 -1
- package/lib/types/components/action/IconAction.styles.d.ts +4 -0
- package/lib/types/components/action/IconAction.styles.d.ts.map +1 -0
- package/lib/types/components/action/IconActionBase.d.ts +3 -3
- package/lib/types/components/action/IconActionBase.d.ts.map +1 -1
- package/lib/types/components/action/IconActionBase.styles.d.ts +4 -0
- package/lib/types/components/action/IconActionBase.styles.d.ts.map +1 -0
- package/lib/types/components/alert/AlertIndicator.d.ts +2 -2
- package/lib/types/components/alert/AlertIndicator.d.ts.map +1 -1
- package/lib/types/components/alert/AlertIndicator.styles.d.ts +4 -0
- package/lib/types/components/alert/AlertIndicator.styles.d.ts.map +1 -0
- package/lib/types/components/avatar/Avatar.d.ts +3 -3
- package/lib/types/components/avatar/Avatar.d.ts.map +1 -1
- package/lib/types/components/avatar/Avatar.styles.d.ts +4 -0
- package/lib/types/components/avatar/Avatar.styles.d.ts.map +1 -0
- package/lib/types/components/button/Button.styles.d.ts +4 -0
- package/lib/types/components/button/Button.styles.d.ts.map +1 -0
- package/lib/types/components/button/ButtonBase.styles.d.ts +4 -0
- package/lib/types/components/button/ButtonBase.styles.d.ts.map +1 -0
- package/lib/types/components/button/IconButton.d.ts +2 -2
- package/lib/types/components/button/IconButton.d.ts.map +1 -1
- package/lib/types/components/button/IconButton.styles.d.ts +4 -0
- package/lib/types/components/button/IconButton.styles.d.ts.map +1 -0
- package/lib/types/components/button/IconButtonBase.d.ts +2 -2
- package/lib/types/components/button/IconButtonBase.d.ts.map +1 -1
- package/lib/types/components/button/IconButtonBase.styles.d.ts +4 -0
- package/lib/types/components/button/IconButtonBase.styles.d.ts.map +1 -0
- package/lib/types/components/container/FloatingContainer.d.ts +5 -6
- package/lib/types/components/container/FloatingContainer.d.ts.map +1 -1
- package/lib/types/components/container/FloatingContainer.styles.d.ts +4 -0
- package/lib/types/components/container/FloatingContainer.styles.d.ts.map +1 -0
- package/lib/types/components/container/FloatingContainer.web.d.ts +2 -15
- package/lib/types/components/container/FloatingContainer.web.d.ts.map +1 -1
- package/lib/types/components/container/Panel.d.ts +4 -4
- package/lib/types/components/container/Panel.d.ts.map +1 -1
- package/lib/types/components/container/index.d.ts +0 -1
- package/lib/types/components/container/index.d.ts.map +1 -1
- package/lib/types/components/icon/Icon.d.ts +2 -1
- package/lib/types/components/icon/Icon.d.ts.map +1 -1
- package/lib/types/components/icon/Icon.styles.d.ts +4 -0
- package/lib/types/components/icon/Icon.styles.d.ts.map +1 -0
- package/lib/types/components/icon/IconBase.d.ts +4 -7
- package/lib/types/components/icon/IconBase.d.ts.map +1 -1
- package/lib/types/components/icon/IconBase.styles.d.ts +4 -0
- package/lib/types/components/icon/IconBase.styles.d.ts.map +1 -0
- package/lib/types/components/icon/IconComponentProps.d.ts +6 -0
- package/lib/types/components/icon/IconComponentProps.d.ts.map +1 -0
- package/lib/types/components/icon/InteractiveIcon.d.ts +2 -1
- package/lib/types/components/icon/InteractiveIcon.d.ts.map +1 -1
- package/lib/types/components/icon/InteractiveIcon.styles.d.ts +4 -0
- package/lib/types/components/icon/InteractiveIcon.styles.d.ts.map +1 -0
- package/lib/types/components/icon/index.d.ts +1 -1
- package/lib/types/components/icon/index.d.ts.map +1 -1
- package/lib/types/components/index.d.ts +3 -3
- package/lib/types/components/index.d.ts.map +1 -1
- package/lib/types/components/input/DropdownInput.styles.d.ts +4 -0
- package/lib/types/components/input/DropdownInput.styles.d.ts.map +1 -0
- package/lib/types/components/input/DropdownInputBase.d.ts.map +1 -1
- package/lib/types/components/input/InputAction.d.ts +2 -1
- package/lib/types/components/input/InputAction.d.ts.map +1 -1
- package/lib/types/components/input/InputAction.styles.d.ts +4 -0
- package/lib/types/components/input/InputAction.styles.d.ts.map +1 -0
- package/lib/types/components/input/InputBase.d.ts.map +1 -1
- package/lib/types/components/input/InputBase.styles.d.ts +4 -0
- package/lib/types/components/input/InputBase.styles.d.ts.map +1 -0
- package/lib/types/components/input/InputScaffold.styles.d.ts +4 -0
- package/lib/types/components/input/InputScaffold.styles.d.ts.map +1 -0
- package/lib/types/components/input/NumberInput.d.ts +1 -1
- package/lib/types/components/input/NumberInput.d.ts.map +1 -1
- package/lib/types/components/input/NumberInputBase.d.ts +1 -1
- package/lib/types/components/input/NumberInputBase.d.ts.map +1 -1
- package/lib/types/components/input/RatingInput.d.ts.map +1 -1
- package/lib/types/components/input/SelectionInput.d.ts +1 -1
- package/lib/types/components/input/SelectionInput.d.ts.map +1 -1
- package/lib/types/components/input/SelectionInput.styles.d.ts +4 -0
- package/lib/types/components/input/SelectionInput.styles.d.ts.map +1 -0
- package/lib/types/components/input/TimeInput.d.ts.map +1 -1
- package/lib/types/components/input/ToggleInput.d.ts +3 -3
- package/lib/types/components/input/ToggleInput.d.ts.map +1 -1
- package/lib/types/components/input/ToggleInput.styles.d.ts +4 -0
- package/lib/types/components/input/ToggleInput.styles.d.ts.map +1 -0
- package/lib/types/components/listItem/ListItem.d.ts.map +1 -1
- package/lib/types/components/listItem/ListItem.styles.d.ts +4 -0
- package/lib/types/components/listItem/ListItem.styles.d.ts.map +1 -0
- package/lib/types/components/listItem/ListItemRow.d.ts.map +1 -1
- package/lib/types/components/menu/Menu.styles.d.ts +4 -0
- package/lib/types/components/menu/Menu.styles.d.ts.map +1 -0
- package/lib/types/components/menu/MenuItem.d.ts.map +1 -1
- package/lib/types/components/menu/MenuItem.styles.d.ts +4 -0
- package/lib/types/components/menu/MenuItem.styles.d.ts.map +1 -0
- package/lib/types/components/rating/Rating.d.ts.map +1 -1
- package/lib/types/components/rating/Rating.styles.d.ts +4 -0
- package/lib/types/components/rating/Rating.styles.d.ts.map +1 -0
- package/lib/types/components/swipe/SwipeAction.d.ts +2 -1
- package/lib/types/components/swipe/SwipeAction.d.ts.map +1 -1
- package/lib/types/components/swipe/SwipeAction.styles.d.ts +4 -0
- package/lib/types/components/swipe/SwipeAction.styles.d.ts.map +1 -0
- package/lib/types/components/swipe/SwipeableContainer.d.ts.map +1 -1
- package/lib/types/components/tag/Tag.d.ts.map +1 -1
- package/lib/types/components/tag/Tag.styles.d.ts +4 -0
- package/lib/types/components/tag/Tag.styles.d.ts.map +1 -0
- package/lib/types/components/tag/TagIcon.d.ts +2 -1
- package/lib/types/components/tag/TagIcon.d.ts.map +1 -1
- package/lib/types/components/text/HighlightedText.d.ts +2 -6
- package/lib/types/components/text/HighlightedText.d.ts.map +1 -1
- package/lib/types/components/text/HighlightedText.styles.d.ts +3 -0
- package/lib/types/components/text/HighlightedText.styles.d.ts.map +1 -0
- package/lib/types/components/text/InteractiveText.styles.d.ts +4 -0
- package/lib/types/components/text/InteractiveText.styles.d.ts.map +1 -0
- package/lib/types/components/text/Text.d.ts.map +1 -1
- package/lib/types/components/text/Text.styles.d.ts +4 -0
- package/lib/types/components/text/Text.styles.d.ts.map +1 -0
- package/lib/types/components/toast/Toast.d.ts +4 -4
- package/lib/types/components/toast/Toast.d.ts.map +1 -1
- package/lib/types/components/toast/Toast.styles.d.ts +4 -0
- package/lib/types/components/toast/Toast.styles.d.ts.map +1 -0
- package/lib/types/hooks/index.d.ts +0 -1
- package/lib/types/hooks/index.d.ts.map +1 -1
- package/lib/types/hooks/useForwardedRef.d.ts +2 -2
- package/lib/types/hooks/useForwardedRef.d.ts.map +1 -1
- package/lib/types/hooks/useThemedStyles.d.ts +2 -1
- package/lib/types/hooks/useThemedStyles.d.ts.map +1 -1
- package/lib/types/icons/index.d.ts +2 -3
- package/lib/types/icons/index.d.ts.map +1 -1
- package/lib/types/icons/ui/ArrowBoth.d.ts +4 -0
- package/lib/types/icons/ui/ArrowBoth.d.ts.map +1 -0
- package/lib/types/icons/ui/ChevronDown.d.ts +4 -0
- package/lib/types/icons/ui/ChevronDown.d.ts.map +1 -0
- package/lib/types/icons/ui/Circle.d.ts +4 -0
- package/lib/types/icons/ui/Circle.d.ts.map +1 -0
- package/lib/types/icons/ui/Clock.d.ts +4 -0
- package/lib/types/icons/ui/Clock.d.ts.map +1 -0
- package/lib/types/icons/ui/Dash.d.ts +4 -0
- package/lib/types/icons/ui/Dash.d.ts.map +1 -0
- package/lib/types/icons/ui/Exclamation.d.ts +4 -0
- package/lib/types/icons/ui/Exclamation.d.ts.map +1 -0
- package/lib/types/icons/ui/InfinityGlyph.d.ts +4 -0
- package/lib/types/icons/ui/InfinityGlyph.d.ts.map +1 -0
- package/lib/types/icons/ui/NumberGlyph.d.ts +4 -0
- package/lib/types/icons/ui/NumberGlyph.d.ts.map +1 -0
- package/lib/types/icons/ui/Plus.d.ts +4 -0
- package/lib/types/icons/ui/Plus.d.ts.map +1 -0
- package/lib/types/icons/ui/StarBorder.d.ts.map +1 -0
- package/lib/types/icons/ui/StarFull.d.ts.map +1 -0
- package/lib/types/icons/{stars → ui}/StarHalf.d.ts +1 -1
- package/lib/types/icons/ui/StarHalf.d.ts.map +1 -0
- package/lib/types/icons/ui/index.d.ts +4 -0
- package/lib/types/icons/ui/index.d.ts.map +1 -0
- package/lib/types/providers/ThemeProvider.d.ts +3 -3
- package/lib/types/providers/ThemeProvider.d.ts.map +1 -1
- package/lib/types/theme/icons.d.ts +17 -3354
- package/lib/types/theme/icons.d.ts.map +1 -1
- package/lib/types/theme/index.d.ts +1 -1
- package/lib/types/theme/index.d.ts.map +1 -1
- package/lib/types/theme/styles.d.ts +6 -0
- package/lib/types/theme/styles.d.ts.map +1 -1
- package/lib/types/theme/theme.d.ts +2 -2
- package/lib/types/theme/theme.d.ts.map +1 -1
- package/package.json +4 -4
- package/lib/components/container/CollapsibleContainer.js +0 -1
- package/lib/components/icon/componentWithIcon.js +0 -1
- package/lib/hooks/useKeyboardHeight.js +0 -1
- package/lib/icons/octicons.js +0 -1
- package/lib/icons/stars/StarBorder.js +0 -1
- package/lib/icons/stars/StarFull.js +0 -1
- package/lib/icons/stars/StarHalf.js +0 -1
- package/lib/icons/stars/index.js +0 -1
- package/lib/types/components/container/CollapsibleContainer.d.ts +0 -10
- package/lib/types/components/container/CollapsibleContainer.d.ts.map +0 -1
- package/lib/types/components/icon/componentWithIcon.d.ts +0 -8
- package/lib/types/components/icon/componentWithIcon.d.ts.map +0 -1
- package/lib/types/hooks/useKeyboardHeight.d.ts +0 -4
- package/lib/types/hooks/useKeyboardHeight.d.ts.map +0 -1
- package/lib/types/icons/octicons.d.ts +0 -2
- package/lib/types/icons/octicons.d.ts.map +0 -1
- package/lib/types/icons/stars/StarBorder.d.ts.map +0 -1
- package/lib/types/icons/stars/StarFull.d.ts.map +0 -1
- package/lib/types/icons/stars/StarHalf.d.ts.map +0 -1
- package/lib/types/icons/stars/index.d.ts +0 -4
- package/lib/types/icons/stars/index.d.ts.map +0 -1
- /package/lib/types/icons/{stars → ui}/StarBorder.d.ts +0 -0
- /package/lib/types/icons/{stars → ui}/StarFull.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/SelectionInput.tsx";var _excluded=["label","disabled","placeholder","hideLabel","selectionMode","selection","style","variant","onAdd"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{InteractiveIcon}from"../icon";import{Tag}from"../tag";import{Text}from"../text";import{InputScaffold}from"./InputScaffold";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";export var SelectionInput=t0=>{var $=_c(
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/SelectionInput.tsx";var _excluded=["label","disabled","placeholder","hideLabel","selectionMode","selection","style","variant","onAdd","onRemoveItem"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{InteractiveIcon}from"../icon";import{Tag}from"../tag";import{Text}from"../text";import{InputScaffold}from"./InputScaffold";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";export var SelectionInput=t0=>{var $=_c(45);var disabledProp;var hideLabel;var label;var onAdd;var onRemoveItem;var placeholder;var props;var selection;var selectionMode;var styleOverrides;var t1;if($[0]!==t0){label=t0.label;disabledProp=t0.disabled;placeholder=t0.placeholder;hideLabel=t0.hideLabel;selectionMode=t0.selectionMode;selection=t0.selection;styleOverrides=t0.style;t1=t0.variant;onAdd=t0.onAdd;onRemoveItem=t0.onRemoveItem;props=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=disabledProp;$[2]=hideLabel;$[3]=label;$[4]=onAdd;$[5]=onRemoveItem;$[6]=placeholder;$[7]=props;$[8]=selection;$[9]=selectionMode;$[10]=styleOverrides;$[11]=t1;}else{disabledProp=$[1];hideLabel=$[2];label=$[3];onAdd=$[4];onRemoveItem=$[5];placeholder=$[6];props=$[7];selection=$[8];selectionMode=$[9];styleOverrides=$[10];t1=$[11];}var variant=t1===undefined?"regular":t1;var disabled=disabledProp||!onAdd;var t2;if($[12]!==styleOverrides){t2={selectionInput:styleOverrides};$[12]=styleOverrides;$[13]=t2;}else{t2=$[13];}var t3;if($[14]!==disabled||$[15]!==variant){t3={disabled,variant};$[14]=disabled;$[15]=variant;$[16]=t3;}else{t3=$[16];}var t4;if($[17]!==t2||$[18]!==t3){t4={styles:t2,props:t3};$[17]=t2;$[18]=t3;$[19]=t4;}else{t4=$[19];}var _useThemedStyles=useThemedStyles("selectionInput",createStyles,t4),_useThemedStyles2=_slicedToArray(_useThemedStyles,2),styles=_useThemedStyles2[0],t5=_useThemedStyles2[1];var style=t5.style,icons=t5.icons;var hasSelection=selectionMode==="single"?!!selection:!!selection?.length;var t6=!hideLabel&&label;var t7;if($[20]!==styles.container||$[21]!==styles.containerPressed){t7=t8=>{var pressed=t8.pressed;return[styles.container,pressed&&styles.containerPressed];};$[20]=styles.container;$[21]=styles.containerPressed;$[22]=t7;}else{t7=$[22];}var t8;if($[23]!==disabled||$[24]!==hasSelection||$[25]!==icons.showOptions||$[26]!==onRemoveItem||$[27]!==placeholder||$[28]!==selection||$[29]!==selectionMode||$[30]!==style.icon||$[31]!==styles.iconContainer||$[32]!==styles.placeholderText||$[33]!==styles.selectionContainer||$[34]!==styles.selectionItemLabel){t8=pressableState=>_jsxs(_Fragment,{children:[_jsxs(View,{style:styles.selectionContainer,children:[selectionMode==="single"&&!!selection&&_jsx(Text,{style:styles.selectionItemLabel,children:selection.label}),selectionMode==="multi"&&!!selection?.length&&selection.map(item=>_jsx(Tag,{label:item.label,onPress:onRemoveItem?()=>onRemoveItem(item):undefined},"id"in item?item.id:item.value)),!hasSelection&&_jsx(Text,{style:styles.placeholderText,children:placeholder})]}),_jsx(View,{style:styles.iconContainer,children:_jsx(InteractiveIcon,{...icons.showOptions,disabled:disabled,style:style.icon,...pressableState})})]});$[23]=disabled;$[24]=hasSelection;$[25]=icons.showOptions;$[26]=onRemoveItem;$[27]=placeholder;$[28]=selection;$[29]=selectionMode;$[30]=style.icon;$[31]=styles.iconContainer;$[32]=styles.placeholderText;$[33]=styles.selectionContainer;$[34]=styles.selectionItemLabel;$[35]=t8;}else{t8=$[35];}var t9;if($[36]!==disabled||$[37]!==onAdd||$[38]!==t7||$[39]!==t8){t9=_jsx(ActionBase,{disabled:disabled,containerStyle:t7,onPress:onAdd,children:t8});$[36]=disabled;$[37]=onAdd;$[38]=t7;$[39]=t8;$[40]=t9;}else{t9=$[40];}var t10;if($[41]!==props||$[42]!==t6||$[43]!==t9){t10=_jsx(InputScaffold,{label:t6,...props,children:t9});$[41]=props;$[42]=t6;$[43]=t9;$[44]=t10;}else{t10=$[44];}return t10;};SelectionInput.displayName="SelectionInput";var createStyles=({styles:{inputBase,selectionInput}},{disabled,variant})=>{var _inputBase$container=inputBase.container,borderRadius=_inputBase$container.borderRadius,padding=_inputBase$container.padding,height=_inputBase$container.height;return StyleSheet.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:height[variant],borderRadius,backgroundColor:inputBase.container.backgroundColor[disabled?"disabled":"enabled"]},containerPressed:{backgroundColor:selectionInput.container.backgroundColor.pressed},selectionContainer:{flex:1,minWidth:0,flexDirection:"row",flexWrap:"wrap",gap:selectionInput.selectionContainer.gap,paddingStart:padding,marginVertical:padding},selectionItemLabel:{color:inputBase.text.color[disabled?"disabled":"enabled"]},placeholderText:{color:inputBase.text.placeholderColor},iconContainer:{width:height[variant],height:height[variant],alignItems:"center",justifyContent:"center"}});};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultInputActionStyles}from"./InputAction.styles";import{defaultInputBaseStyles}from"./InputBase.styles";export var defaultSelectionInputStyles=theme=>{var color=theme.color,spacing=theme.spacing;var inputBase=defaultInputBaseStyles(theme);var inputAction=defaultInputActionStyles(theme);return{container:{backgroundColor:{...inputBase.container.backgroundColor,pressed:color.backgroundHighlight}},selectionContainer:{gap:spacing.tiny},icon:inputAction.icon};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/TimeInput.tsx";var _excluded=["disabled","clearButtonMode","hoursPlaceholder","minutesPlaceholder","variant","value","onChange","onSubmitEditing"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{useRef,useState}from"react";import{Pressable,StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{Text}from"../text";import{InputAction}from"./InputAction";import{InputBase}from"./InputBase";import{InputRowContainer}from"./InputRowContainer";import{InputScaffold}from"./InputScaffold";import{NumberInputBase}from"./NumberInputBase";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var TimeInput=t0=>{var $=_c(
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/TimeInput.tsx";var _excluded=["disabled","clearButtonMode","hoursPlaceholder","minutesPlaceholder","variant","value","onChange","onSubmitEditing"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{useRef,useState}from"react";import{Pressable,StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{Text}from"../text";import{InputAction}from"./InputAction";import{InputBase}from"./InputBase";import{InputRowContainer}from"./InputRowContainer";import{InputScaffold}from"./InputScaffold";import{NumberInputBase}from"./NumberInputBase";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_TIME_VALUE={hours:"",minutes:""};export var TimeInput=t0=>{var $=_c(73);var baseProps;var clearButtonMode;var disabledProp;var hoursPlaceholder;var minutesPlaceholder;var onChange;var onSubmitEditing;var t1;var t2;if($[0]!==t0){disabledProp=t0.disabled;clearButtonMode=t0.clearButtonMode;hoursPlaceholder=t0.hoursPlaceholder;minutesPlaceholder=t0.minutesPlaceholder;t1=t0.variant;t2=t0.value;onChange=t0.onChange;onSubmitEditing=t0.onSubmitEditing;baseProps=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=baseProps;$[2]=clearButtonMode;$[3]=disabledProp;$[4]=hoursPlaceholder;$[5]=minutesPlaceholder;$[6]=onChange;$[7]=onSubmitEditing;$[8]=t1;$[9]=t2;}else{baseProps=$[1];clearButtonMode=$[2];disabledProp=$[3];hoursPlaceholder=$[4];minutesPlaceholder=$[5];onChange=$[6];onSubmitEditing=$[7];t1=$[8];t2=$[9];}var variant=t1===undefined?"regular":t1;var value=t2===undefined?DEFAULT_TIME_VALUE:t2;var disabled=disabledProp||!onChange;var hoursRef=useRef(null);var minutesRef=useRef(null);var t3;if($[10]!==variant){t3={props:{variant}};$[10]=variant;$[11]=t3;}else{t3=$[11];}var _useThemedStyles=useThemedStyles("timeInput",createStyles,t3),_useThemedStyles2=_slicedToArray(_useThemedStyles,2),styles=_useThemedStyles2[0],t4=_useThemedStyles2[1];var icons=t4.icons;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isFocused=_useState2[0],setIsFocused=_useState2[1];var t5;if($[12]===Symbol.for("react.memo_cache_sentinel")){t5=()=>hoursRef.current?.focus();$[12]=t5;}else{t5=$[12];}var t6;if($[13]!==disabled||$[14]!==icons.time||$[15]!==variant){t6=_jsx(InputAction,{...icons.time,variant:variant,disabled:disabled,onPress:t5});$[13]=disabled;$[14]=icons.time;$[15]=variant;$[16]=t6;}else{t6=$[16];}var t7=value?.hours;var t8;if($[17]!==onChange||$[18]!==value){t8=text=>onChange?.({...value,hours:text});$[17]=onChange;$[18]=value;$[19]=t8;}else{t8=$[19];}var t10;var t11;var t9;if($[20]===Symbol.for("react.memo_cache_sentinel")){t9=()=>setIsFocused(true);t10=()=>setIsFocused(false);t11=()=>minutesRef.current?.focus();$[20]=t10;$[21]=t11;$[22]=t9;}else{t10=$[20];t11=$[21];t9=$[22];}var t12;if($[23]!==clearButtonMode||$[24]!==disabled||$[25]!==hoursPlaceholder||$[26]!==styles.input||$[27]!==t7||$[28]!==t8||$[29]!==variant){t12=_jsx(NumberInputBase,{ref:hoursRef,disabled:disabled,placeholder:hoursPlaceholder,maxLength:2,clearButtonMode:clearButtonMode,value:t7,variant:variant,keyboardType:"number-pad",submitBehavior:"submit",returnKeyType:"next",inputStyle:styles.input,onChangeText:t8,onFocus:t9,onBlur:t10,onSubmitEditing:t11});$[23]=clearButtonMode;$[24]=disabled;$[25]=hoursPlaceholder;$[26]=styles.input;$[27]=t7;$[28]=t8;$[29]=variant;$[30]=t12;}else{t12=$[30];}var t13;if($[31]===Symbol.for("react.memo_cache_sentinel")){t13=()=>hoursRef.current?.focus();$[31]=t13;}else{t13=$[31];}var t14;if($[32]===Symbol.for("react.memo_cache_sentinel")){t14=_jsx(Text,{variant:"body",children:"h"});$[32]=t14;}else{t14=$[32];}var t15;if($[33]!==styles.timeLabel){t15=_jsx(Pressable,{onPress:t13,style:styles.timeLabel,children:t14});$[33]=styles.timeLabel;$[34]=t15;}else{t15=$[34];}var t16;if($[35]!==onChange||$[36]!==value){t16=text_0=>{var addToHours=text_0?Math.floor(Number.parseInt(text_0,10)/60):undefined;var remainingMinutes=text_0?Number.parseInt(text_0,10)%60:text_0;onChange?.({...value,hours:value.hours?(Number.parseInt(value.hours,10)+(addToHours??0)).toString():addToHours?.toString()??"",minutes:remainingMinutes.toString()});};$[35]=onChange;$[36]=value;$[37]=t16;}else{t16=$[37];}var t17;var t18;if($[38]===Symbol.for("react.memo_cache_sentinel")){t17=()=>setIsFocused(true);t18=()=>setIsFocused(false);$[38]=t17;$[39]=t18;}else{t17=$[38];t18=$[39];}var t19;if($[40]!==clearButtonMode||$[41]!==disabled||$[42]!==minutesPlaceholder||$[43]!==onSubmitEditing||$[44]!==styles.input||$[45]!==t16||$[46]!==value.minutes||$[47]!==variant){t19=_jsx(NumberInputBase,{ref:minutesRef,disabled:disabled,placeholder:minutesPlaceholder,value:value.minutes,maxLength:2,clearButtonMode:clearButtonMode,variant:variant,keyboardType:"number-pad",returnKeyType:"done",inputStyle:styles.input,onChangeText:t16,onFocus:t17,onBlur:t18,onSubmitEditing:onSubmitEditing});$[40]=clearButtonMode;$[41]=disabled;$[42]=minutesPlaceholder;$[43]=onSubmitEditing;$[44]=styles.input;$[45]=t16;$[46]=value.minutes;$[47]=variant;$[48]=t19;}else{t19=$[48];}var t20;var t21;if($[49]===Symbol.for("react.memo_cache_sentinel")){t20=()=>minutesRef.current?.focus();t21=_jsx(Text,{variant:"body",children:"m"});$[49]=t20;$[50]=t21;}else{t20=$[49];t21=$[50];}var t22;if($[51]!==styles.timeLabel){t22=_jsx(Pressable,{style:styles.timeLabel,onPress:t20,children:t21});$[51]=styles.timeLabel;$[52]=t22;}else{t22=$[52];}var t23=disabled||!isFocused?"never":"always";var t24=value.hours!==""||value.minutes!==""?" ":"";var t25;if($[53]!==onChange){t25=()=>onChange?.({hours:"",minutes:""});$[53]=onChange;$[54]=t25;}else{t25=$[54];}var t26;if($[55]!==disabled||$[56]!==styles.clearInput||$[57]!==t23||$[58]!==t24||$[59]!==t25||$[60]!==variant){t26=_jsx(InputBase,{clearButtonMode:t23,value:t24,selectionColor:"transparent",focusable:false,autoComplete:"off",variant:variant,caretHidden:true,contextMenuHidden:true,disabled:disabled,showSoftInputOnFocus:false,inputStyle:styles.clearInput,onFocus:t25});$[55]=disabled;$[56]=styles.clearInput;$[57]=t23;$[58]=t24;$[59]=t25;$[60]=variant;$[61]=t26;}else{t26=$[61];}var t27;if($[62]!==disabled||$[63]!==t12||$[64]!==t15||$[65]!==t19||$[66]!==t22||$[67]!==t26||$[68]!==t6){t27=_jsxs(InputRowContainer,{disabled:disabled,children:[t6,t12,t15,t19,t22,t26]});$[62]=disabled;$[63]=t12;$[64]=t15;$[65]=t19;$[66]=t22;$[67]=t26;$[68]=t6;$[69]=t27;}else{t27=$[69];}var t28;if($[70]!==baseProps||$[71]!==t27){t28=_jsx(InputScaffold,{...baseProps,children:t27});$[70]=baseProps;$[71]=t27;$[72]=t28;}else{t28=$[72];}return t28;};var createStyles=({styles:{inputBase}},{variant})=>StyleSheet.create({input:{flexGrow:1,flexBasis:0,textAlign:"right"},clearInput:{flexShrink:1,marginStart:inputBase.container.padding},timeLabel:{minHeight:inputBase.container.height[variant],justifyContent:"center"}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/ToggleInput.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{InteractiveIcon
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/input/ToggleInput.tsx";var _excluded=["label","helpText","value","toggleVariant","containerStyle","variant","disabled","style","onChange"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{InteractiveIcon}from"../icon";import{Text}from"../text";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";export var ToggleInput=t0=>{var $=_c(46);var containerStyle;var disabledProp;var helpText;var iconProps;var label;var onChange;var styleOverrides;var t1;var t2;var t3;if($[0]!==t0){label=t0.label;helpText=t0.helpText;t1=t0.value;t2=t0.toggleVariant;containerStyle=t0.containerStyle;t3=t0.variant;disabledProp=t0.disabled;styleOverrides=t0.style;onChange=t0.onChange;iconProps=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=containerStyle;$[2]=disabledProp;$[3]=helpText;$[4]=iconProps;$[5]=label;$[6]=onChange;$[7]=styleOverrides;$[8]=t1;$[9]=t2;$[10]=t3;}else{containerStyle=$[1];disabledProp=$[2];helpText=$[3];iconProps=$[4];label=$[5];onChange=$[6];styleOverrides=$[7];t1=$[8];t2=$[9];t3=$[10];}var value=t1===undefined?false:t1;var toggleVariant=t2===undefined?"primary":t2;var variant=t3===undefined?"regular":t3;var disabled=disabledProp||!onChange;var t4;if($[11]!==styleOverrides){t4={toggleInput:styleOverrides};$[11]=styleOverrides;$[12]=t4;}else{t4=$[12];}var t5;if($[13]!==variant){t5={variant};$[13]=variant;$[14]=t5;}else{t5=$[14];}var t6;if($[15]!==t4||$[16]!==t5){t6={styles:t4,props:t5};$[15]=t4;$[16]=t5;$[17]=t6;}else{t6=$[17];}var _useThemedStyles=useThemedStyles("toggleInput",createStyles,t6),_useThemedStyles2=_slicedToArray(_useThemedStyles,2),styles=_useThemedStyles2[0],t7=_useThemedStyles2[1];var toggleInput=t7.style,icons=t7.icons;var t8;if($[18]!==onChange||$[19]!==value){t8=()=>onChange(!value);$[18]=onChange;$[19]=value;$[20]=t8;}else{t8=$[20];}var t9;if($[21]!==disabled||$[22]!==helpText||$[23]!==iconProps||$[24]!==icons.outline||$[25]!==label||$[26]!==styles.disabledLabel||$[27]!==styles.helpText||$[28]!==styles.icon||$[29]!==styles.iconContainer||$[30]!==styles.labelIconContainer||$[31]!==toggleInput.indicator.color.deselected||$[32]!==toggleInput.indicator.color.selected||$[33]!==toggleInput.indicator.size||$[34]!==toggleVariant||$[35]!==value||$[36]!==variant){t9=pressableState=>_jsxs(_Fragment,{children:[_jsxs(View,{style:styles.labelIconContainer,children:[_jsxs(View,{style:styles.iconContainer,children:[_jsx(InteractiveIcon,{...icons.outline,style:{size:toggleInput.indicator.size[variant],color:value?toggleInput.indicator.color.selected[toggleVariant]:toggleInput.indicator.color.deselected},disabled:disabled,...pressableState}),_jsx(View,{style:styles.icon,children:!!value&&_jsx(InteractiveIcon,{...iconProps,style:{size:toggleInput.indicator.size[variant],color:toggleInput.indicator.color.selected[toggleVariant]},disabled:disabled,...pressableState})})]}),label&&_jsx(Text,{variant:"label",style:disabled?styles.disabledLabel:undefined,children:label})]}),helpText&&_jsx(View,{style:styles.helpText,children:typeof helpText==="string"?_jsx(Text,{variant:"caption",children:helpText}):helpText})]});$[21]=disabled;$[22]=helpText;$[23]=iconProps;$[24]=icons.outline;$[25]=label;$[26]=styles.disabledLabel;$[27]=styles.helpText;$[28]=styles.icon;$[29]=styles.iconContainer;$[30]=styles.labelIconContainer;$[31]=toggleInput.indicator.color.deselected;$[32]=toggleInput.indicator.color.selected;$[33]=toggleInput.indicator.size;$[34]=toggleVariant;$[35]=value;$[36]=variant;$[37]=t9;}else{t9=$[37];}var t10;if($[38]!==disabled||$[39]!==styles.container||$[40]!==t8||$[41]!==t9){t10=_jsx(ActionBase,{disabled:disabled,hitSlop:20,containerStyle:styles.container,onPress:t8,children:t9});$[38]=disabled;$[39]=styles.container;$[40]=t8;$[41]=t9;$[42]=t10;}else{t10=$[42];}var t11;if($[43]!==containerStyle||$[44]!==t10){t11=_jsx(View,{style:containerStyle,children:t10});$[43]=containerStyle;$[44]=t10;$[45]=t11;}else{t11=$[45];}return t11;};var createStyles=({styles:{toggleInput,inputScaffold,inputBase}},{variant})=>{var styles=StyleSheet.create({container:{justifyContent:"center"},disabledLabel:{color:inputBase.text.color.disabled},labelIconContainer:{flexDirection:"row",alignItems:"center",gap:toggleInput.label.gap},iconContainer:{width:toggleInput.indicator.size[variant],height:toggleInput.indicator.size[variant]},icon:{position:"absolute",alignSelf:"center"},helpText:{marginStart:toggleInput.indicator.size[variant]+toggleInput.label.gap,marginTop:inputScaffold.gap}});return styles;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultActionStyles}from"../action/Action.styles";import{defaultIconStyles}from"../icon/Icon.styles";export var defaultToggleInputStyles=theme=>{var color=theme.color,spacing=theme.spacing;var icon=defaultIconStyles(theme);var action=defaultActionStyles(theme);return{indicator:{size:{compact:icon.size.small,regular:icon.size.medium},color:{selected:action.label.color,deselected:{enabled:color.border,disabled:color.border,pressed:color.border}}},label:{gap:spacing.small}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItem.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItem.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{Undefined}from"@reillymc/es-utils";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{SwipeableContainer}from"../swipe";import{Text}from"../text";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var EMPTY_CONTENT_ROWS=[];export var ListItem=t0=>{var $=_c(38);var avatar=t0.avatar,alert=t0.alert,heading=t0.heading,footer=t0.footer,header=t0.header,t1=t0.variant,t2=t0.contentRows,swipeActions=t0.swipeActions,style=t0.style,contentContainerStyle=t0.contentContainerStyle,onPress=t0.onPress;var variant=t1===undefined?"default":t1;var contentRows=t2===undefined?EMPTY_CONTENT_ROWS:t2;var t3;if($[0]!==contentRows){t3=contentRows.filter(Undefined);$[0]=contentRows;$[1]=t3;}else{t3=$[1];}var filteredRows=t3;var t4;if($[2]!==swipeActions){t4=swipeActions?.filter(Undefined);$[2]=swipeActions;$[3]=t4;}else{t4=$[3];}var filteredActions=t4;var t5;if($[4]!==variant){t5={props:{variant}};$[4]=variant;$[5]=t5;}else{t5=$[5];}var _useThemedStyles=useThemedStyles("listItem",createStyles,t5),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t6;if($[6]!==style||$[7]!==styles.pressableContainer){t6=[styles.pressableContainer,style];$[6]=style;$[7]=styles.pressableContainer;$[8]=t6;}else{t6=$[8];}var t7;if($[9]!==contentContainerStyle||$[10]!==styles.contentContainer){t7=[styles.contentContainer,contentContainerStyle];$[9]=contentContainerStyle;$[10]=styles.contentContainer;$[11]=t7;}else{t7=$[11];}var t8;if($[12]!==heading){t8=!!heading&&typeof heading==="string"?_jsx(Text,{variant:"heading",numberOfLines:2,children:heading}):heading;$[12]=heading;$[13]=t8;}else{t8=$[13];}var t9;if($[14]!==filteredRows||$[15]!==t7||$[16]!==t8){t9=_jsxs(View,{style:t7,children:[t8,filteredRows]});$[14]=filteredRows;$[15]=t7;$[16]=t8;$[17]=t9;}else{t9=$[17];}var t10;if($[18]!==avatar||$[19]!==styles.innerContainer||$[20]!==t9){t10=_jsxs(View,{style:styles.innerContainer,children:[avatar,t9]});$[18]=avatar;$[19]=styles.innerContainer;$[20]=t9;$[21]=t10;}else{t10=$[21];}var t11;if($[22]!==alert||$[23]!==styles.bodyContainer||$[24]!==t10){t11=_jsxs(View,{style:styles.bodyContainer,children:[t10,alert]});$[22]=alert;$[23]=styles.bodyContainer;$[24]=t10;$[25]=t11;}else{t11=$[25];}var t12;if($[26]!==footer||$[27]!==header||$[28]!==onPress||$[29]!==t11||$[30]!==t6){t12=_jsxs(ActionBase,{hitSlop:0,onPress:onPress,containerStyle:t6,children:[header,t11,footer]});$[26]=footer;$[27]=header;$[28]=onPress;$[29]=t11;$[30]=t6;$[31]=t12;}else{t12=$[31];}var innerContent=t12;var t13;if($[32]!==filteredActions||$[33]!==innerContent){t13=filteredActions?.length?_jsx(SwipeableContainer,{rightActions:filteredActions,children:_jsx(View,{children:innerContent})}):innerContent;$[32]=filteredActions;$[33]=innerContent;$[34]=t13;}else{t13=$[34];}var t14;if($[35]!==styles.container||$[36]!==t13){t14=_jsx(View,{style:styles.container,children:t13});$[35]=styles.container;$[36]=t13;$[37]=t14;}else{t14=$[37];}return t14;};var createStyles=({styles:{listItem},theme},{variant})=>StyleSheet.create({container:{backgroundColor:theme.color.background,borderRadius:variant==="compact"?undefined:listItem.borderRadius,overflow:"hidden",width:"100%"},pressableContainer:{display:"flex",flexDirection:"column",backgroundColor:theme.color.foreground,borderRadius:variant==="compact"?undefined:listItem.borderRadius},bodyContainer:{flexDirection:"row",justifyContent:"space-between"},innerContainer:{flexDirection:"row",flexShrink:1},contentContainer:{flexShrink:1,flexDirection:"column",alignItems:"flex-start",justifyContent:"center",width:"100%",padding:listItem.internalSpacing}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultListItemStyles=({border})=>({spacingMargin:12,internalSpacing:16,borderRadius:border.radius.loose,contentItemSpacing:8,contentItemTopMargin:4});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemAlert.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var ListItemAlert=t0=>{var $=_c(3);var children=t0.children;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==children||$[1]!==styles.alert){t1=_jsx(View,{style:styles.alert,children:children});$[0]=children;$[1]=styles.alert;$[2]=t1;}else{t1=$[2];}return t1;};var createStyles=({styles:{listItem}})=>StyleSheet.create({alert:{alignItems:"center",justifyContent:"center",
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemAlert.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var ListItemAlert=t0=>{var $=_c(3);var children=t0.children;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==children||$[1]!==styles.alert){t1=_jsx(View,{style:styles.alert,children:children});$[0]=children;$[1]=styles.alert;$[2]=t1;}else{t1=$[2];}return t1;};var createStyles=({styles:{listItem}})=>StyleSheet.create({alert:{alignItems:"center",justifyContent:"center",marginStart:listItem.spacingMargin,marginEnd:listItem.internalSpacing}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemAvatar.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var ListItemAvatar=t0=>{var $=_c(3);var children=t0.children;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==children||$[1]!==styles.avatar){t1=_jsx(View,{style:styles.avatar,children:children});$[0]=children;$[1]=styles.avatar;$[2]=t1;}else{t1=$[2];}return t1;};var createStyles=({styles:{listItem}})=>StyleSheet.create({avatar:{alignItems:"center",justifyContent:"center",
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemAvatar.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var ListItemAvatar=t0=>{var $=_c(3);var children=t0.children;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==children||$[1]!==styles.avatar){t1=_jsx(View,{style:styles.avatar,children:children});$[0]=children;$[1]=styles.avatar;$[2]=t1;}else{t1=$[2];}return t1;};var createStyles=({styles:{listItem}})=>StyleSheet.create({avatar:{alignItems:"center",justifyContent:"center",marginStart:listItem.internalSpacing}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemFooter.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var ListItemFooter=t0=>{var $=_c(3);var children=t0.children;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==children||$[1]!==styles.footer){t1=_jsx(View,{style:styles.footer,children:children});$[0]=children;$[1]=styles.footer;$[2]=t1;}else{t1=$[2];}return t1;};var createStyles=({styles:{listItem}})=>StyleSheet.create({footer:{display:"flex",marginBottom:listItem.internalSpacing,
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemFooter.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var ListItemFooter=t0=>{var $=_c(3);var children=t0.children;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==children||$[1]!==styles.footer){t1=_jsx(View,{style:styles.footer,children:children});$[0]=children;$[1]=styles.footer;$[2]=t1;}else{t1=$[2];}return t1;};var createStyles=({styles:{listItem}})=>StyleSheet.create({footer:{display:"flex",marginBottom:listItem.internalSpacing,marginStart:listItem.internalSpacing,marginEnd:listItem.internalSpacing}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemRow.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{Text}from"../text";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var ListItemRow=t0=>{var $=_c(
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/listItem/ListItemRow.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{Undefined}from"@reillymc/es-utils";import{useThemedStyles}from"../../hooks";import{Text}from"../text";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var ListItemRow=t0=>{var $=_c(10);var contentItems=t0.contentItems;var _useThemedStyles=useThemedStyles("listItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var T0;var t1;var t2;if($[0]!==contentItems||$[1]!==styles.contentItem||$[2]!==styles.spacer){var items=(Array.isArray(contentItems)?contentItems:[contentItems]).filter(Undefined);T0=View;t1=styles.contentItem;t2=items.map((item,index)=>_jsxs(View,{style:styles.contentItem,children:[item,index<items.length-1&&_jsx(Text,{style:styles.spacer,children:"\xB7"})]},item.key??`content-item-${index}`));$[0]=contentItems;$[1]=styles.contentItem;$[2]=styles.spacer;$[3]=T0;$[4]=t1;$[5]=t2;}else{T0=$[3];t1=$[4];t2=$[5];}var t3;if($[6]!==T0||$[7]!==t1||$[8]!==t2){t3=_jsx(T0,{style:t1,children:t2});$[6]=T0;$[7]=t1;$[8]=t2;$[9]=t3;}else{t3=$[9];}return t3;};var createStyles=({styles:{listItem}})=>StyleSheet.create({contentItem:{flexDirection:"row",flexShrink:1},spacer:{marginHorizontal:listItem.contentItemSpacing}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultInputBaseStyles}from"../input/InputBase.styles";export var defaultMenuStyles=theme=>{var inputBase=defaultInputBaseStyles(theme);return{backgroundColor:theme.color.inputBackground,borderRadius:inputBase.container.borderRadius,gap:theme.spacing.tiny,padding:theme.spacing.tiny,parentMargin:theme.spacing.medium};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/menu/MenuItem.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/menu/MenuItem.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet}from"react-native";import{useTheme,useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{HighlightedText}from"../text";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var MenuItem=t0=>{var $=_c(14);var label=t0.label,description=t0.description,searchValue=t0.searchValue,onPress=t0.onPress;var _useTheme=useTheme(),t1=_useTheme.theme;var color=t1.color;var _useThemedStyles=useThemedStyles("menuItem",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t2;if($[0]!==color||$[1]!==styles.dropdownItem){t2=t3=>{var pressed=t3.pressed;return[styles.dropdownItem,pressed&&{backgroundColor:color.pressOverlay}];};$[0]=color;$[1]=styles.dropdownItem;$[2]=t2;}else{t2=$[2];}var t3;if($[3]!==label||$[4]!==searchValue){t3=_jsx(HighlightedText,{text:label,highlight:searchValue});$[3]=label;$[4]=searchValue;$[5]=t3;}else{t3=$[5];}var t4;if($[6]!==description||$[7]!==searchValue){t4=!!description&&_jsx(HighlightedText,{variant:"caption",text:description,highlight:searchValue});$[6]=description;$[7]=searchValue;$[8]=t4;}else{t4=$[8];}var t5;if($[9]!==onPress||$[10]!==t2||$[11]!==t3||$[12]!==t4){t5=_jsxs(ActionBase,{hitSlop:0,onPress:onPress,containerStyle:t2,children:[t3,t4]});$[9]=onPress;$[10]=t2;$[11]=t3;$[12]=t4;$[13]=t5;}else{t5=$[13];}return t5;};MenuItem.displayName="MenuItem";var createStyles=({styles:{menuItem}})=>StyleSheet.create({dropdownItem:menuItem});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultInputBaseStyles}from"../input/InputBase.styles";import{defaultMenuStyles}from"./Menu.styles";export var defaultMenuItemStyles=theme=>{var inputBase=defaultInputBaseStyles(theme);var menu=defaultMenuStyles(theme);return{paddingHorizontal:inputBase.container.padding-menu.padding,paddingVertical:theme.spacing.small+theme.spacing.tiny,borderRadius:menu.borderRadius/2};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/rating/Rating.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{IconBase}from"../icon";import{getRatingIcons,valueToRating}from"./ratingUtils";import{jsx as _jsx}from"react/jsx-runtime";export var Rating=t0=>{var $=_c(16);var t1=t0.value,t2=t0.max,scale=t0.scale,styleOverrides=t0.style,containerStyle=t0.containerStyle;var value=t1===undefined?0:t1;var max=t2===undefined?5:t2;var t3;if($[0]!==styleOverrides){t3={styles:{rating:styleOverrides}};$[0]=styleOverrides;$[1]=t3;}else{t3=$[1];}var _useThemedStyles=useThemedStyles("rating",createStyles,t3),_useThemedStyles2=_slicedToArray(_useThemedStyles,2),styles=_useThemedStyles2[0],t4=_useThemedStyles2[1];var style=t4.style,icons=t4.icons;var t5;if($[2]!==containerStyle||$[3]!==icons||$[4]!==max||$[5]!==scale||$[6]!==style||$[7]!==styles.starRating||$[8]!==value){var scaledRating=scale?valueToRating(value,max,scale):value;var t6;if($[10]!==containerStyle||$[11]!==styles.starRating){t6=[styles.starRating,containerStyle];$[10]=containerStyle;$[11]=styles.starRating;$[12]=t6;}else{t6=$[12];}var t7;if($[13]!==icons||$[14]!==style){t7=(variant,i)=>_jsx(IconBase,{...icons[variant],
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/rating/Rating.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import{useThemedStyles}from"../../hooks";import{IconBase}from"../icon";import{getRatingIcons,valueToRating}from"./ratingUtils";import{jsx as _jsx}from"react/jsx-runtime";export var Rating=t0=>{var $=_c(16);var t1=t0.value,t2=t0.max,scale=t0.scale,styleOverrides=t0.style,containerStyle=t0.containerStyle;var value=t1===undefined?0:t1;var max=t2===undefined?5:t2;var t3;if($[0]!==styleOverrides){t3={styles:{rating:styleOverrides}};$[0]=styleOverrides;$[1]=t3;}else{t3=$[1];}var _useThemedStyles=useThemedStyles("rating",createStyles,t3),_useThemedStyles2=_slicedToArray(_useThemedStyles,2),styles=_useThemedStyles2[0],t4=_useThemedStyles2[1];var style=t4.style,icons=t4.icons;var t5;if($[2]!==containerStyle||$[3]!==icons||$[4]!==max||$[5]!==scale||$[6]!==style||$[7]!==styles.starRating||$[8]!==value){var scaledRating=scale?valueToRating(value,max,scale):value;var t6;if($[10]!==containerStyle||$[11]!==styles.starRating){t6=[styles.starRating,containerStyle];$[10]=containerStyle;$[11]=styles.starRating;$[12]=t6;}else{t6=$[12];}var t7;if($[13]!==icons||$[14]!==style){t7=(variant,i)=>_jsx(IconBase,{...icons[variant],size:style.icon.size,color:style.icon.color[variant]},i);$[13]=icons;$[14]=style;$[15]=t7;}else{t7=$[15];}t5=_jsx(View,{style:t6,accessibilityLabel:`star rating. ${scaledRating} of ${max}.`,children:getRatingIcons(scaledRating,max).map(t7)});$[2]=containerStyle;$[3]=icons;$[4]=max;$[5]=scale;$[6]=style;$[7]=styles.starRating;$[8]=value;$[9]=t5;}else{t5=$[9];}return t5;};var createStyles=({styles:{rating}})=>StyleSheet.create({starRating:{flexDirection:"row",gap:rating.gap}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defaultIconStyles}from"../icon/Icon.styles";export var defaultRatingStyles=theme=>({gap:theme.spacing.tiny,icon:{color:{empty:theme.color.primaryLight,half:theme.color.primary,full:theme.color.primary},size:defaultIconStyles(theme).size.large}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/swipe/SwipeAction.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{IconButton}from"../button";import{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/swipe/SwipeAction.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{IconButton}from"../button";import{jsx as _jsx}from"react/jsx-runtime";export var SwipeAction=props=>{var $=_c(3);var _useThemedStyles=useThemedStyles("swipeAction",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t0;if($[0]!==props||$[1]!==styles.actionButton){t0=_jsx(IconButton,{...props,containerStyle:styles.actionButton});$[0]=props;$[1]=styles.actionButton;$[2]=t0;}else{t0=$[2];}return t0;};var createStyles=({styles:{swipeAction}})=>StyleSheet.create({actionButton:{height:"100%",alignItems:"center",justifyContent:"center",borderRadius:0,width:swipeAction.width}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultSwipeActionStyles=_theme=>({width:75});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/swipe/SwipeableContainer.tsx";import{c as _c}from"react/compiler-runtime";import{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/swipe/SwipeableContainer.tsx";import{c as _c}from"react/compiler-runtime";import{Children,useRef}from"react";import{StyleSheet,View}from"react-native";import Swipeable from"react-native-gesture-handler/ReanimatedSwipeable";import{jsx as _jsx}from"react/jsx-runtime";var EMPTY_ACTIONS=[];export var SwipeableContainer=t0=>{var $=_c(11);var t1=t0.rightActions,containerStyle=t0.containerStyle,children=t0.children;var rightActions=t1===undefined?EMPTY_ACTIONS:t1;var swipeableRef=useRef(null);var t2;if($[0]===Symbol.for("react.memo_cache_sentinel")){t2=()=>{swipeableRef.current?.close();};$[0]=t2;}else{t2=$[0];}var close=t2;var t3;if($[1]!==rightActions){t3=()=>_jsx(View,{style:styles.actionsContainer,children:Children.map(rightActions,action=>_jsx(View,{onTouchEnd:close,children:action}))});$[1]=rightActions;$[2]=t3;}else{t3=$[2];}var renderRightActions=t3;if(rightActions.length===0){var _t;if($[3]!==children||$[4]!==containerStyle){_t=_jsx(View,{style:containerStyle,children:children});$[3]=children;$[4]=containerStyle;$[5]=_t;}else{_t=$[5];}return _t;}var t4;if($[6]===Symbol.for("react.memo_cache_sentinel")){t4={left:-20,right:-20};$[6]=t4;}else{t4=$[6];}var t5;if($[7]!==children||$[8]!==containerStyle||$[9]!==renderRightActions){t5=_jsx(Swipeable,{hitSlop:t4,ref:swipeableRef,renderRightActions:renderRightActions,enableTrackpadTwoFingerGesture:true,friction:1.5,overshootRight:false,containerStyle:containerStyle,children:children});$[7]=children;$[8]=containerStyle;$[9]=renderRightActions;$[10]=t5;}else{t5=$[10];}return t5;};var styles=StyleSheet.create({actionsContainer:{display:"flex",flexDirection:"row-reverse"}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/Tag.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/Tag.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{ActionBase}from"../action";import{Text}from"../text";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var Tag=t0=>{var $=_c(14);var label=t0.label,onPress=t0.onPress,icon=t0.icon,variant=t0.variant,style=t0.style;var t1;if($[0]!==label||$[1]!==variant){t1={props:{variant,label}};$[0]=label;$[1]=variant;$[2]=t1;}else{t1=$[2];}var _useThemedStyles=useThemedStyles("tag",createStyles,t1),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t2;if($[3]!==style||$[4]!==styles.container){t2=[styles.container,style];$[3]=style;$[4]=styles.container;$[5]=t2;}else{t2=$[5];}var t3;if($[6]!==label||$[7]!==styles.text){t3=_jsx(Text,{style:styles.text,children:label});$[6]=label;$[7]=styles.text;$[8]=t3;}else{t3=$[8];}var t4;if($[9]!==icon||$[10]!==onPress||$[11]!==t2||$[12]!==t3){t4=_jsxs(ActionBase,{onPress:onPress,containerStyle:t2,children:[icon,t3]});$[9]=icon;$[10]=onPress;$[11]=t2;$[12]=t3;$[13]=t4;}else{t4=$[13];}return t4;};var createStyles=({theme:{color},styles:{tag}},{variant="dark"})=>{var styles=StyleSheet.create({container:{display:"flex",flexDirection:"row",alignItems:"center",borderRadius:tag.borderRadius,padding:tag.padding,backgroundColor:variant==="dark"?color.background:color.foreground,width:"auto",gap:tag.internalSpacing},text:{color:color.textPrimary}});return styles;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultTagStyles=({border,spacing})=>({borderRadius:border.radius.loose,internalSpacing:spacing.small,padding:spacing.small});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/TagIcon.tsx";import{useTheme}from"../../hooks";import{IconBase
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/tag/TagIcon.tsx";function _objectDestructuringEmpty(t){if(null==t)throw new TypeError("Cannot destructure "+t);}import{c as _c}from"react/compiler-runtime";import{useTheme}from"../../hooks";import{IconBase}from"../icon";import{jsx as _jsx}from"react/jsx-runtime";export var TagIcon=t0=>{var $=_c(6);var iconProps;if($[0]!==t0){iconProps=Object.assign({},(_objectDestructuringEmpty(t0),t0));$[0]=t0;$[1]=iconProps;}else{iconProps=$[1];}var _useTheme=useTheme(),theme=_useTheme.theme,styles=_useTheme.styles;var t1;if($[2]!==iconProps||$[3]!==styles.text.font.body.size||$[4]!==theme.color.textPrimary){t1=_jsx(IconBase,{...iconProps,color:theme.color.textPrimary,size:styles.text.font.body.size});$[2]=iconProps;$[3]=styles.text.font.body.size;$[4]=theme.color.textPrimary;$[5]=t1;}else{t1=$[5];}return t1;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/text/HighlightedText.tsx";var _excluded=["text","highlight","textStyles","style","variant"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{Text}from"./Text";import{createElement as _createElement}from"react";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/text/HighlightedText.tsx";var _excluded=["text","highlight","textStyles","style","variant"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{Text}from"./Text";import{createElement as _createElement}from"react";import{jsx as _jsx}from"react/jsx-runtime";var escapeForRegex=value=>value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var splitHighlight=(text,highlight)=>{if(!highlight)return[{text,highlighted:false,offset:0}];var lowerHighlight=highlight.toLowerCase();var pattern=new RegExp(`(${escapeForRegex(highlight)})`,"gi");var parts=[];var offset=0;for(var part of text.split(pattern)){if(part==="")continue;parts.push({text:part,highlighted:part.toLowerCase()===lowerHighlight,offset});offset+=part.length;}return parts;};export var HighlightedText=t0=>{var $=_c(24);var props;var styleOverrides;var t1;var t2;var t3;var textStyles;if($[0]!==t0){t1=t0.text;t2=t0.highlight;textStyles=t0.textStyles;styleOverrides=t0.style;t3=t0.variant;props=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=props;$[2]=styleOverrides;$[3]=t1;$[4]=t2;$[5]=t3;$[6]=textStyles;}else{props=$[1];styleOverrides=$[2];t1=$[3];t2=$[4];t3=$[5];textStyles=$[6];}var text=t1===undefined?"":t1;var highlight=t2===undefined?"":t2;var variant=t3===undefined?"body":t3;var t4;if($[7]!==styleOverrides){t4={styles:{highlightedText:styleOverrides}};$[7]=styleOverrides;$[8]=t4;}else{t4=$[8];}var _useThemedStyles=useThemedStyles("highlightedText",createStyles,t4),_useThemedStyles2=_slicedToArray(_useThemedStyles,2),styles=_useThemedStyles2[0],t5=_useThemedStyles2[1];var style=t5.style;var t6;if($[9]!==highlight||$[10]!==props||$[11]!==style||$[12]!==styles.textWrapper||$[13]!==text||$[14]!==textStyles||$[15]!==variant){var parts=splitHighlight(text,highlight);var t7;if($[17]!==styles.textWrapper||$[18]!==textStyles){t7=[styles.textWrapper,textStyles];$[17]=styles.textWrapper;$[18]=textStyles;$[19]=t7;}else{t7=$[19];}var t8;if($[20]!==props||$[21]!==style||$[22]!==variant){t8=part=>_createElement(Text,{...props,variant:variant,key:part.offset,style:part.highlighted&&{fontWeight:style.highlightedWeight[variant]},__self:this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:17}},part.text);$[20]=props;$[21]=style;$[22]=variant;$[23]=t8;}else{t8=$[23];}t6=_jsx(Text,{style:t7,children:parts.map(t8)});$[9]=highlight;$[10]=props;$[11]=style;$[12]=styles.textWrapper;$[13]=text;$[14]=textStyles;$[15]=variant;$[16]=t6;}else{t6=$[16];}return t6;};var createStyles=()=>StyleSheet.create({textWrapper:{display:"flex",flexDirection:"row"}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultHighlightedTextStyles=()=>({highlightedWeight:{body:"800",caption:"800",display:"800",heading:"800",label:"800",title:"800"}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultInteractiveTextStyles=({color})=>({color:{enabled:color.primary,pressed:color.primaryLight,disabled:color.primaryLight}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/text/Text.tsx";var _excluded=["variant","style","children"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{Text as RnText,StyleSheet}from"react-native";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var Text=t0=>{var $=_c(14);var children;var props;var style;var t1;if($[0]!==t0){t1=t0.variant;style=t0.style;children=t0.children;props=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=children;$[2]=props;$[3]=style;$[4]=t1;}else{children=$[1];props=$[2];style=$[3];t1=$[4];}var variant=t1===undefined?"body":t1;var t2;if($[5]!==variant){t2={props:{variant}};$[5]=variant;$[6]=t2;}else{t2=$[6];}var _useThemedStyles=useThemedStyles("text",createStyles,t2),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t3;if($[7]!==style||$[8]!==styles.text){t3=[styles.text,style];$[7]=style;$[8]=styles.text;$[9]=t3;}else{t3=$[9];}var t4;if($[10]!==children||$[11]!==props||$[12]!==t3){t4=_jsx(RnText,{
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/text/Text.tsx";var _excluded=["variant","style","children"];function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o]);}return i;}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n];}return t;}import{c as _c}from"react/compiler-runtime";import{Text as RnText,StyleSheet}from"react-native";import{MAX_FONT_SIZE_MULTIPLIER}from"../../common";import{useThemedStyles}from"../../hooks";import{jsx as _jsx}from"react/jsx-runtime";export var Text=t0=>{var $=_c(14);var children;var props;var style;var t1;if($[0]!==t0){t1=t0.variant;style=t0.style;children=t0.children;props=_objectWithoutProperties(t0,_excluded);$[0]=t0;$[1]=children;$[2]=props;$[3]=style;$[4]=t1;}else{children=$[1];props=$[2];style=$[3];t1=$[4];}var variant=t1===undefined?"body":t1;var t2;if($[5]!==variant){t2={props:{variant}};$[5]=variant;$[6]=t2;}else{t2=$[6];}var _useThemedStyles=useThemedStyles("text",createStyles,t2),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t3;if($[7]!==style||$[8]!==styles.text){t3=[styles.text,style];$[7]=style;$[8]=styles.text;$[9]=t3;}else{t3=$[9];}var t4;if($[10]!==children||$[11]!==props||$[12]!==t3){t4=_jsx(RnText,{maxFontSizeMultiplier:MAX_FONT_SIZE_MULTIPLIER,...props,style:t3,children:children});$[10]=children;$[11]=props;$[12]=t3;$[13]=t4;}else{t4=$[13];}return t4;};var createStyles=({styles:{text}},{variant="body"})=>StyleSheet.create({text:{fontFamily:text.font[variant].family,fontWeight:text.font[variant].weight,fontSize:text.font[variant].size,color:text.color}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultTextStyles=({color,font})=>({color:color.textPrimary,font:{caption:{family:font.family.sans,weight:"200",size:font.size.small},body:{family:font.family.sans,weight:"400",size:font.size.regular},label:{family:font.family.sans,weight:"500",size:font.size.large},heading:{family:font.family.sans,weight:"600",size:font.size.large},title:{family:font.family.sans,weight:"800",size:font.size.xLarge},display:{family:font.family.sans,weight:"800",size:font.size.xxLarge}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/toast/Toast.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import Animated,{LinearTransition,SlideInDown,SlideOutDown}from"react-native-reanimated";import{useThemedStyles}from"../../hooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var Toast=t0=>{var $=_c(
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/components/toast/Toast.tsx";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{c as _c}from"react/compiler-runtime";import{StyleSheet,View}from"react-native";import Animated,{LinearTransition,SlideInDown,SlideOutDown}from"react-native-reanimated";import{useThemedStyles}from"../../hooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var TOAST_ENTERING=SlideInDown.springify().mass(0.5);var TOAST_EXITING=SlideOutDown.springify().mass(0.5);var TOAST_LAYOUT=LinearTransition.springify().mass(0.5);export var Toast=t0=>{var $=_c(17);var action=t0.action,containerStyle=t0.containerStyle,children=t0.children;var _useThemedStyles=useThemedStyles("toast",createStyles),_useThemedStyles2=_slicedToArray(_useThemedStyles,1),styles=_useThemedStyles2[0];var t1;if($[0]!==containerStyle||$[1]!==styles.container){t1=[styles.container,containerStyle];$[0]=containerStyle;$[1]=styles.container;$[2]=t1;}else{t1=$[2];}var t2;if($[3]!==children||$[4]!==styles.contentContainer){t2=_jsx(View,{style:styles.contentContainer,children:children});$[3]=children;$[4]=styles.contentContainer;$[5]=t2;}else{t2=$[5];}var t3;if($[6]!==action||$[7]!==styles.actionContainer||$[8]!==styles.separator){t3=action&&_jsxs(View,{style:styles.actionContainer,children:[_jsx(Animated.View,{layout:TOAST_LAYOUT,style:styles.separator}),action]});$[6]=action;$[7]=styles.actionContainer;$[8]=styles.separator;$[9]=t3;}else{t3=$[9];}var t4;if($[10]!==styles.innerContainer||$[11]!==t2||$[12]!==t3){t4=_jsxs(View,{style:styles.innerContainer,children:[t2,t3]});$[10]=styles.innerContainer;$[11]=t2;$[12]=t3;$[13]=t4;}else{t4=$[13];}var t5;if($[14]!==t1||$[15]!==t4){t5=_jsx(Animated.View,{style:t1,entering:TOAST_ENTERING,exiting:TOAST_EXITING,layout:TOAST_LAYOUT,children:t4});$[14]=t1;$[15]=t4;$[16]=t5;}else{t5=$[16];}return t5;};var createStyles=({theme:{color,spacing,border},styles:{toast}})=>StyleSheet.create({container:{position:"absolute",bottom:toast.bottomInset,start:toast.horizontalInset,end:toast.horizontalInset,backgroundColor:color.backgroundHighlight,padding:spacing.medium,borderRadius:border.radius.loose},innerContainer:{flexDirection:"row",justifyContent:"space-between"},contentContainer:{flex:1},actionContainer:{flex:0,alignItems:"center",flexDirection:"row",height:"100%"},separator:{borderStartWidth:StyleSheet.hairlineWidth,borderStartColor:color.textSecondary,height:"100%",marginHorizontal:spacing.medium}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var defaultToastStyles=({spacing})=>({horizontalInset:spacing.pageHorizontal+spacing.medium,bottomInset:100});
|
package/lib/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useForwardedRef}from"./useForwardedRef";export{
|
|
1
|
+
export{useForwardedRef}from"./useForwardedRef";export{usePersistentKeyboardHeight}from"./usePersistentKeyboardHeight";export{useTheme}from"./useTheme";export{useStyles,useThemedStyles}from"./useThemedStyles";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useRef}from"react";export var useForwardedRef=ref=>{var localRef=useRef(null);return ref??localRef;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{MergeStyleSlice}from"../theme/styles";import{useTheme}from"./useTheme";function hasKey(obj,key){return key in obj;}var EMPTY_OPTIONS={};var mergeStylesForComponent=(styles,name,override)=>{if(!hasKey(styles,name)){return{config:undefined,styles};}var base=styles[name];var config=MergeStyleSlice(base,override);return{config,styles:config===base?styles:{...styles,[name]:config}};};var buildComponentResult=(styles,icons,name,config)=>{var hasStyle=hasKey(styles,name);var hasIcons=hasKey(icons,name);if(hasStyle&&hasIcons){return{style:config,icons:icons[name]};}if(hasStyle){return{style:config};}if(hasIcons){return{icons:icons[name]};}return{};};export function useThemedStyles(...t0){var $=_c(10);var args=t0;var first=args[0];var isComponent=typeof first==="string";var componentName=isComponent?first:undefined;var generator=isComponent?args[1]:first;var options=(isComponent?args[2]:args[1])??EMPTY_OPTIONS;var hasProps="props"in options;var componentProps=hasProps?options.props:undefined;var componentStyles="styles"in options?options.styles:undefined;var _useTheme=useTheme(),theme=_useTheme.theme,styles=_useTheme.styles,icons=_useTheme.icons;var name=componentName;var t1;if($[0]!==componentProps||$[1]!==componentStyles||$[2]!==generator||$[3]!==hasProps||$[4]!==icons||$[5]!==isComponent||$[6]!==name||$[7]!==styles||$[8]!==theme){var _ref=isComponent?mergeStylesForComponent(styles,name,componentStyles?.[name]):{config:undefined,styles},config=_ref.config,stylesForGenerator=_ref.styles;var _generated=hasProps?generator({theme,styles:stylesForGenerator,icons},componentProps):generator({theme,styles:stylesForGenerator,icons});t1=isComponent?[_generated,buildComponentResult(styles,icons,name,config)]:_generated;$[0]=componentProps;$[1]=componentStyles;$[2]=generator;$[3]=hasProps;$[4]=icons;$[5]=isComponent;$[6]=name;$[7]=styles;$[8]=theme;$[9]=t1;}else{t1=$[9];}return t1;}export var useStyles=componentStyles=>{var $=_c(7);var _useTheme2=useTheme(),styles=_useTheme2.styles;var merged=styles;var t0;if($[0]!==componentStyles){t0=Object.keys(componentStyles);$[0]=componentStyles;$[1]=t0;}else{t0=$[1];}var t1=t0;if($[2]!==componentStyles||$[3]!==merged||$[4]!==styles||$[5]!==t1){for(var key of t1){var override=componentStyles[key];if(override===undefined){continue;}var base=styles[key];var next=MergeStyleSlice(base,override);if(next!==base){merged={...merged,[key]:next};}}$[2]=componentStyles;$[3]=merged;$[4]=styles;$[5]=t1;$[6]=merged;}else{merged=$[6];}return merged;};
|
package/lib/icons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{UiIcons}from"./ui";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/ArrowBoth.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var ArrowBoth=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M3.72 3.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.56 7h10.88l-2.22-2.22a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018l3.5 3.5a.75.75 0 0 1 0 1.06l-3.5 3.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l2.22-2.22H2.56l2.22 2.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-3.5-3.5a.75.75 0 0 1 0-1.06Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/ChevronDown.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var ChevronDown=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/Circle.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var Circle=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/Clock.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var Clock=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7-3.25v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5a.75.75 0 0 1 1.5 0Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/Dash.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var Dash=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M2 7.75A.75.75 0 0 1 2.75 7h10a.75.75 0 0 1 0 1.5h-10A.75.75 0 0 1 2 7.75Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/Exclamation.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var Exclamation=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M8 11a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 11ZM8 1a1.5 1.5 0 0 1 1.5 1.5v6a1.5 1.5 0 0 1-3 0v-6A1.5 1.5 0 0 1 8 1Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/InfinityGlyph.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var InfinityGlyph=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M8 6.984c.59-.533 1.204-1.066 1.825-1.493.797-.548 1.7-.991 2.675-.991C14.414 4.5 16 6.086 16 8s-1.586 3.5-3.5 3.5c-.975 0-1.878-.444-2.675-.991-.621-.427-1.235-.96-1.825-1.493-.59.533-1.204 1.066-1.825 1.493-.797.547-1.7.991-2.675.991C1.586 11.5 0 9.914 0 8s1.586-3.5 3.5-3.5c.975 0 1.878.443 2.675.991.621.427 1.235.96 1.825 1.493ZM9.114 8c.536.483 1.052.922 1.56 1.273.704.483 1.3.727 1.826.727 1.086 0 2-.914 2-2 0-1.086-.914-2-2-2-.525 0-1.122.244-1.825.727-.51.35-1.025.79-1.561 1.273ZM3.5 6c-1.086 0-2 .914-2 2 0 1.086.914 2 2 2 .525 0 1.122-.244 1.825-.727.51-.35 1.025-.79 1.561-1.273-.536-.483-1.052-.922-1.56-1.273C4.621 6.244 4.025 6 3.5 6Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/NumberGlyph.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var NumberGlyph=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M9 4.75A.75.75 0 0 1 9.75 4h4a.75.75 0 0 1 .53 1.28l-1.89 1.892c.312.076.604.18.867.319.742.391 1.244 1.063 1.244 2.005 0 .653-.231 1.208-.629 1.627-.386.408-.894.653-1.408.777-1.01.243-2.225.063-3.124-.527a.751.751 0 0 1 .822-1.254c.534.35 1.32.474 1.951.322.306-.073.53-.201.67-.349.129-.136.218-.32.218-.596 0-.308-.123-.509-.444-.678-.373-.197-.98-.318-1.806-.318a.75.75 0 0 1-.53-1.28l1.72-1.72H9.75A.75.75 0 0 1 9 4.75Zm-3.587 5.763c-.35-.05-.77.113-.983.572a.75.75 0 1 1-1.36-.632c.508-1.094 1.589-1.565 2.558-1.425 1 .145 1.872.945 1.872 2.222 0 1.433-1.088 2.192-1.79 2.681-.308.216-.571.397-.772.573H7a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75c0-.69.3-1.211.67-1.61.348-.372.8-.676 1.15-.92.8-.56 1.18-.904 1.18-1.474 0-.473-.267-.69-.587-.737ZM5.604.089A.75.75 0 0 1 6 .75v4.77h.711a.75.75 0 0 1 0 1.5H3.759a.75.75 0 0 1 0-1.5H4.5V2.15l-.334.223a.75.75 0 0 1-.832-1.248l1.5-1a.75.75 0 0 1 .77-.037Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/Plus.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var Plus=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M7.75 2a.75.75 0 0 1 .75.75V7h4.25a.75.75 0 0 1 0 1.5H8.5v4.25a.75.75 0 0 1-1.5 0V8.5H2.75a.75.75 0 0 1 0-1.5H7V2.75A.75.75 0 0 1 7.75 2Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/StarBorder.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var StarBorder=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/StarFull.tsx";import{c as _c}from"react/compiler-runtime";import Svg,{Path}from"react-native-svg";import{jsx as _jsx}from"react/jsx-runtime";export var StarFull=t0=>{var $=_c(5);var size=t0.size,color=t0.color;var t1;if($[0]!==color){t1=_jsx(Path,{fill:color,d:"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z"});$[0]=color;$[1]=t1;}else{t1=$[1];}var t2;if($[2]!==size||$[3]!==t1){t2=_jsx(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:t1});$[2]=size;$[3]=t1;$[4]=t2;}else{t2=$[4];}return t2;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/StarHalf.tsx";import{c as _c}from"react/compiler-runtime";import{useId}from"react";import Svg,{ClipPath,Defs,Path,Rect}from"react-native-svg";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var StarHalf=t0=>{var $=_c(13);var size=t0.size,color=t0.color;var clipId=useId();var t1;if($[0]===Symbol.for("react.memo_cache_sentinel")){t1=_jsx(Rect,{height:"16",width:"8",x:"0",y:"0"});$[0]=t1;}else{t1=$[0];}var t2;if($[1]!==clipId){t2=_jsx(Defs,{children:_jsx(ClipPath,{id:clipId,children:t1})});$[1]=clipId;$[2]=t2;}else{t2=$[2];}var t3;if($[3]!==color){t3=_jsx(Path,{fill:color,d:"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"});$[3]=color;$[4]=t3;}else{t3=$[4];}var t4=`url(#${clipId})`;var t5;if($[5]!==color||$[6]!==t4){t5=_jsx(Path,{clipPath:t4,fill:color,d:"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z"});$[5]=color;$[6]=t4;$[7]=t5;}else{t5=$[7];}var t6;if($[8]!==size||$[9]!==t2||$[10]!==t3||$[11]!==t5){t6=_jsxs(Svg,{height:size,viewBox:"0 0 16 16",width:size,children:[t2,t3,t5]});$[8]=size;$[9]=t2;$[10]=t3;$[11]=t5;$[12]=t6;}else{t6=$[12];}return t6;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/icons/ui/index.tsx";import{c as _c}from"react/compiler-runtime";import{ArrowBoth}from"./ArrowBoth";import{ChevronDown}from"./ChevronDown";import{Circle}from"./Circle";import{Clock}from"./Clock";import{Dash}from"./Dash";import{Exclamation}from"./Exclamation";import{InfinityGlyph}from"./InfinityGlyph";import{NumberGlyph}from"./NumberGlyph";import{Plus}from"./Plus";import{StarBorder}from"./StarBorder";import{StarFull}from"./StarFull";import{StarHalf}from"./StarHalf";import{jsx as _jsx}from"react/jsx-runtime";var glyphMap={exclamation:Exclamation,dash:Dash,plus:Plus,infinity:InfinityGlyph,number:NumberGlyph,"arrow-both":ArrowBoth,"chevron-down":ChevronDown,clock:Clock,circle:Circle,"star-empty":StarBorder,"star-half":StarHalf,"star-full":StarFull};export var UiIcons=t0=>{var $=_c(4);var name=t0.name,color=t0.color,size=t0.size;var Glyph=glyphMap[name];if(!Glyph){return null;}var t1;if($[0]!==Glyph||$[1]!==color||$[2]!==size){t1=_jsx(Glyph,{color:color,size:size});$[0]=Glyph;$[1]=color;$[2]=size;$[3]=t1;}else{t1=$[3];}return t1;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/providers/ThemeProvider.tsx";import{c as _c}from"react/compiler-runtime";import{createDefaultStyles,
|
|
1
|
+
var _jsxFileName="/home/runner/work/ReactNativeComponents/ReactNativeComponents/src/providers/ThemeProvider.tsx";import{c as _c}from"react/compiler-runtime";import{createDefaultStyles,MergeIcons,MergeStyles,MergeTheme}from"../theme";import{ThemeContext}from"./ThemeContext";import{jsx as _jsx}from"react/jsx-runtime";export var ThemeProvider=t0=>{var $=_c(13);var initialTheme=t0.theme,initialStyles=t0.styles,initialIcons=t0.icons,children=t0.children;var t1;var theme;if($[0]!==initialStyles||$[1]!==initialTheme){theme=MergeTheme(initialTheme);t1=MergeStyles(createDefaultStyles(theme),initialStyles);$[0]=initialStyles;$[1]=initialTheme;$[2]=t1;$[3]=theme;}else{t1=$[2];theme=$[3];}var styles=t1;var t2;if($[4]!==initialIcons){t2=MergeIcons(initialIcons);$[4]=initialIcons;$[5]=t2;}else{t2=$[5];}var icons=t2;var t3;if($[6]!==icons||$[7]!==styles||$[8]!==theme){t3={theme,styles,icons};$[6]=icons;$[7]=styles;$[8]=theme;$[9]=t3;}else{t3=$[9];}var value=t3;var t4;if($[10]!==children||$[11]!==value){t4=_jsx(ThemeContext.Provider,{value:value,children:children});$[10]=children;$[11]=value;$[12]=t4;}else{t4=$[12];}return t4;};
|
package/lib/theme/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}import{UiIcons}from"../icons";export var createIcons=config=>config;export var DefaultIcons=createIcons({inputScaffold:{error:{iconSet:UiIcons,iconName:"exclamation"}},counterInput:{decrease:{iconSet:UiIcons,iconName:"dash"},increase:{iconSet:UiIcons,iconName:"plus"}},numberInput:{number:{iconSet:UiIcons,iconName:"infinity"},fraction:{iconSet:UiIcons,iconName:"number"},range:{iconSet:UiIcons,iconName:"arrow-both"}},selectionInput:{showOptions:{iconSet:UiIcons,iconName:"chevron-down"}},timeInput:{time:{iconSet:UiIcons,iconName:"clock"}},toggleInput:{outline:{iconSet:UiIcons,iconName:"circle"}},rating:{empty:{iconSet:UiIcons,iconName:"star-empty"},full:{iconSet:UiIcons,iconName:"star-full"},half:{iconSet:UiIcons,iconName:"star-half"}},ratingInput:{empty:{iconSet:UiIcons,iconName:"star-empty"},full:{iconSet:UiIcons,iconName:"star-full"},half:{iconSet:UiIcons,iconName:"star-half"}}});export var MergeIcons=overrides=>{if(!overrides)return DefaultIcons;var merged={...DefaultIcons};for(var _ref of Object.entries(overrides)){var _ref2=_slicedToArray(_ref,2);var category=_ref2[0];var slots=_ref2[1];if(!slots)continue;merged[category]={...merged[category],...slots};}return merged;};
|
package/lib/theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createIcons,DefaultIcons}from"./icons";export{createDefaultStyles,MergeStyles}from"./styles";export{DefaultTheme,MergeTheme}from"./theme";
|
|
1
|
+
export{createIcons,DefaultIcons,MergeIcons}from"./icons";export{createDefaultStyles,MergeStyles}from"./styles";export{DefaultTheme,MergeTheme}from"./theme";
|