@webority/mobile-ui 0.129.0 → 0.130.1
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/canvas-kit.json +2 -1
- package/dist/canvas-kit/kit.js +3358 -2919
- package/dist/canvas-kit/manifest.json +824 -295
- package/dist/canvas-kit/release.json +6 -6
- package/lib/commonjs/components/AppLockOverlay/AppLockOverlay.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Banner/Banner.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Card/Card.js +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
- package/lib/commonjs/components/Confirm/confirm.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +1 -1
- package/lib/commonjs/components/Drawer/Drawer.js +1 -1
- package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
- package/lib/commonjs/components/FilePicker/FilePicker.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
- package/lib/commonjs/components/IconBadge/IconBadge.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/Menu/Menu.js +1 -1
- package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
- package/lib/commonjs/components/Menu/useContextMenu.js +1 -1
- package/lib/commonjs/components/Modal/Modal.js +1 -1
- package/lib/commonjs/components/OTPInput/OTPInput.js +1 -1
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/commonjs/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/commonjs/components/Radio/Radio.js +1 -1
- package/lib/commonjs/components/Rating/Rating.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
- package/lib/commonjs/components/Select/Select.js +1 -1
- package/lib/commonjs/components/SliderField/SliderField.js +1 -1
- package/lib/commonjs/components/SquircleImage/SquircleImage.js +1 -1
- package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/components/Tour/Tour.js +1 -1
- package/lib/commonjs/components/index.js +1 -1
- package/lib/commonjs/components/not-drawn.json +0 -1
- package/lib/commonjs/icons.js +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/navigation/DiscardGuard.js +1 -1
- package/lib/commonjs/sizes.js +1 -0
- package/lib/commonjs/squircle.js +1 -0
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/module/components/AppLockOverlay/AppLockOverlay.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Banner/Banner.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/Card/Card.js +1 -1
- package/lib/module/components/Checkbox/Checkbox.js +1 -1
- package/lib/module/components/Confirm/confirm.js +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +1 -1
- package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/module/components/Dialog/Dialog.js +1 -1
- package/lib/module/components/Drawer/Drawer.js +1 -1
- package/lib/module/components/FieldBase/FieldBase.js +1 -1
- package/lib/module/components/FilePicker/FilePicker.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
- package/lib/module/components/IconBadge/IconBadge.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/Menu/Menu.js +1 -1
- package/lib/module/components/Menu/MenuSurface.js +1 -1
- package/lib/module/components/Menu/useContextMenu.js +1 -1
- package/lib/module/components/Modal/Modal.js +1 -1
- package/lib/module/components/OTPInput/OTPInput.js +1 -1
- package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/module/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/module/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/module/components/Radio/Radio.js +1 -1
- package/lib/module/components/Rating/Rating.js +1 -1
- package/lib/module/components/SearchBar/SearchBar.js +1 -1
- package/lib/module/components/Select/Select.js +1 -1
- package/lib/module/components/SliderField/SliderField.js +1 -1
- package/lib/module/components/SquircleImage/SquircleImage.js +1 -1
- package/lib/module/components/TimePicker/TimePicker.js +1 -1
- package/lib/module/components/Tooltip/Tooltip.js +1 -1
- package/lib/module/components/Tour/Tour.js +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/not-drawn.json +0 -1
- package/lib/module/icons.js +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/navigation/DiscardGuard.js +1 -1
- package/lib/module/sizes.js +1 -0
- package/lib/module/squircle.js +1 -0
- package/lib/module/utils/index.js +1 -1
- package/lib/typescript/commonjs/components/AppLockOverlay/AppLockOverlay.d.ts +3 -3
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +7 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +1 -1
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +4 -4
- package/lib/typescript/commonjs/components/Calendar/calendarStyles.d.ts +4 -4
- package/lib/typescript/commonjs/components/Card/Card.d.ts +1 -3
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +3 -3
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +2 -2
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +1 -1
- package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +4 -4
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +8 -6
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +5 -0
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +3 -3
- package/lib/typescript/commonjs/components/IconBadge/IconBadge.d.ts +4 -0
- package/lib/typescript/commonjs/components/IconBadge/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/Input/Input.d.ts +3 -2
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +7 -7
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +3 -3
- package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +1 -1
- package/lib/typescript/commonjs/components/Modal/Modal.d.ts +4 -4
- package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +5 -5
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +3 -2
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +3 -3
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +5 -3
- package/lib/typescript/commonjs/components/Select/Select.d.ts +4 -3
- package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +2 -2
- package/lib/typescript/commonjs/components/SquircleImage/SquircleImage.d.ts +4 -3
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +3 -3
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +2 -2
- package/lib/typescript/commonjs/components/Tour/Tour.d.ts +1 -1
- package/lib/typescript/commonjs/components/index.d.ts +0 -2
- package/lib/typescript/commonjs/icons.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts +7 -6
- package/lib/typescript/commonjs/sizes.d.ts +2 -0
- package/lib/typescript/commonjs/squircle.d.ts +2 -0
- package/lib/typescript/commonjs/utils/index.d.ts +1 -1
- package/lib/typescript/module/components/AppLockOverlay/AppLockOverlay.d.ts +3 -3
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +7 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts +1 -1
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +4 -4
- package/lib/typescript/module/components/Calendar/calendarStyles.d.ts +4 -4
- package/lib/typescript/module/components/Card/Card.d.ts +1 -3
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +3 -3
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +2 -2
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +1 -1
- package/lib/typescript/module/components/Drawer/Drawer.d.ts +4 -4
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +8 -6
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +5 -0
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +3 -3
- package/lib/typescript/module/components/IconBadge/IconBadge.d.ts +4 -0
- package/lib/typescript/module/components/IconBadge/index.d.ts +1 -1
- package/lib/typescript/module/components/Input/Input.d.ts +3 -2
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +7 -7
- package/lib/typescript/module/components/Menu/Menu.d.ts +3 -3
- package/lib/typescript/module/components/Menu/useContextMenu.d.ts +1 -1
- package/lib/typescript/module/components/Modal/Modal.d.ts +4 -4
- package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +5 -5
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +3 -2
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +3 -3
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +5 -3
- package/lib/typescript/module/components/Select/Select.d.ts +4 -3
- package/lib/typescript/module/components/SliderField/SliderField.d.ts +2 -2
- package/lib/typescript/module/components/SquircleImage/SquircleImage.d.ts +4 -3
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +3 -3
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +2 -2
- package/lib/typescript/module/components/Tour/Tour.d.ts +1 -1
- package/lib/typescript/module/components/index.d.ts +0 -2
- package/lib/typescript/module/icons.d.ts +3 -0
- package/lib/typescript/module/index.d.ts +7 -6
- package/lib/typescript/module/sizes.d.ts +2 -0
- package/lib/typescript/module/squircle.d.ts +2 -0
- package/lib/typescript/module/utils/index.d.ts +1 -1
- package/package.json +37 -7
- package/lib/commonjs/components/Notation/Notation.js +0 -1
- package/lib/commonjs/components/Notation/index.js +0 -1
- package/lib/module/components/Notation/Notation.js +0 -1
- package/lib/module/components/Notation/index.js +0 -1
- package/lib/typescript/commonjs/components/Notation/Notation.d.ts +0 -43
- package/lib/typescript/commonjs/components/Notation/index.d.ts +0 -3
- package/lib/typescript/module/components/Notation/Notation.d.ts +0 -43
- package/lib/typescript/module/components/Notation/index.d.ts +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Notation",{enumerable:!0,get:function(){return _Notation.Notation}}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return _Notation.default}}),Object.defineProperty(exports,"parseNotation",{enumerable:!0,get:function(){return _Notation.parseNotation}}),Object.defineProperty(exports,"sym",{enumerable:!0,get:function(){return _Notation.sym}});var cache,_Notation=_interopRequireWildcard(require("./Notation.js"));function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var r,o,n=Object.defineProperty,a={__proto__:null,default:e};if(Object(e)!==e)return a;if(cache||"function"!=typeof WeakMap||(cache=new WeakMap),cache){if(cache.has(e))return cache.get(e);cache.set(e,a)}for(o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&((r=n&&Object.getOwnPropertyDescriptor(e,o))&&(r.get||r.set)?n(a,o,r):a[o]=e[o]);return a}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";import{Fragment,useContext}from"react";import{Text as RNText,StyleSheet,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{TextInkContext}from"../Text/textInk.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const SUBSCRIPTED=/(?<![A-Za-z0-9_])([A-Za-z])_([A-Za-z0-9]+)(?![A-Za-z0-9_])/g;export const parseNotation=t=>{const e=String(t??""),o=[];let s=0;for(const t of e.matchAll(SUBSCRIPTED)){const n=t.index??0;n>s&&o.push({text:e.slice(s,n)}),o.push({text:t[1],sub:t[2]}),s=n+t[0].length}return s<e.length&&o.push({text:e.slice(s)}),o};const SUB_DROP=.4,Subscript=({children:t,color:e})=>{const o=useTheme(),s=useContext(TextInkContext),n=Math.round(.75*(s?.fontSize??o.text.sm.size));return _jsx(View,{style:{transform:[{translateY:Math.round(.4*n)}]},children:_jsx(RNText,{maxFontSizeMultiplier:o.settings.maxFontSizeMultiplier,style:[styles.sub,{fontSize:n,lineHeight:n,color:e??s?.color??o.colors["text-body"],...fontFor(o,"normal")}],children:t})})},renderNotation=(t,e)=>parseNotation(t).map((t,o)=>t.sub?_jsxs(Fragment,{children:[t.text,_jsx(Subscript,{color:e,children:t.sub})]},o):_jsx(Fragment,{children:t.text},o));export const Notation=({text:t,base:e,sub:o,desc:s,color:n,testID:r})=>null!=e?_jsxs(RNText,{testID:r,children:[e,o?_jsx(Subscript,{color:n,children:o}):null,s?` ${s}`:null]}):_jsx(RNText,{testID:r,children:"string"==typeof t||null==t?renderNotation(t??"",n):t.map((t,e)=>_jsx(Fragment,"string"==typeof t?{children:renderNotation(t,n)}:{children:t.verbatim},e))});Notation.inlineText=!0;export const sym=(t,e,o,s)=>_jsx(Notation,{base:t,sub:e,desc:o,color:s});const styles=StyleSheet.create({sub:{includeFontPadding:!1}});export default Notation;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";export{default,Notation,parseNotation,sym}from"./Notation.js";
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
export interface NotationRun {
|
|
3
|
-
text: string;
|
|
4
|
-
/** The subscript that follows `text`, when the run is a symbol. */
|
|
5
|
-
sub?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* One run of a `text` list: a string is ours and its `X_sub` symbols are subscripted; a
|
|
9
|
-
* `{ verbatim }` run is stored text (a citation, a clause, an option name) printed exactly as given.
|
|
10
|
-
*/
|
|
11
|
-
export type NotationTextRun = string | {
|
|
12
|
-
verbatim: string;
|
|
13
|
-
};
|
|
14
|
-
export interface NotationProps {
|
|
15
|
-
/**
|
|
16
|
-
* Engine text where an underscore marks a subscript ("N_SG exceeds N_C"), or a list of runs that
|
|
17
|
-
* mixes such text with verbatim stored text. Needs a parent Text.
|
|
18
|
-
*/
|
|
19
|
-
text?: string | readonly NotationTextRun[];
|
|
20
|
-
/** One symbol: the base, drawn with `sub` small and lowered after it. Needs a parent Text. */
|
|
21
|
-
base?: string;
|
|
22
|
-
sub?: string;
|
|
23
|
-
/** Follows the symbol after a space. */
|
|
24
|
-
desc?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Subscript ink. Inside a field's or choice's label or message line it defaults to that line's
|
|
27
|
-
* ink, elsewhere to `colors["text-body"]`; pass the parent's colour when it differs.
|
|
28
|
-
*/
|
|
29
|
-
color?: string;
|
|
30
|
-
testID?: string;
|
|
31
|
-
}
|
|
32
|
-
/** The text split into runs: `{ text }` for prose, `{ text, sub }` for a symbol and its subscript. */
|
|
33
|
-
export declare const parseNotation: (text: string | null | undefined) => NotationRun[];
|
|
34
|
-
/** A symbol of a standard with its subscript drawn small and lowered below the baseline. */
|
|
35
|
-
export declare const Notation: {
|
|
36
|
-
({ text, base, sub, desc, color, testID }: NotationProps): React.ReactElement;
|
|
37
|
-
/** Elements whose type sets `inlineText` render inline inside Descriptions values. */
|
|
38
|
-
inlineText: boolean;
|
|
39
|
-
};
|
|
40
|
-
/** A symbol as the standard prints it: `sym('C', 'IP')` is C with a small IP, then `desc` if given. */
|
|
41
|
-
export declare const sym: (base: string, sub?: string, desc?: string, color?: string) => React.ReactElement;
|
|
42
|
-
export default Notation;
|
|
43
|
-
//# sourceMappingURL=Notation.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
export interface NotationRun {
|
|
3
|
-
text: string;
|
|
4
|
-
/** The subscript that follows `text`, when the run is a symbol. */
|
|
5
|
-
sub?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* One run of a `text` list: a string is ours and its `X_sub` symbols are subscripted; a
|
|
9
|
-
* `{ verbatim }` run is stored text (a citation, a clause, an option name) printed exactly as given.
|
|
10
|
-
*/
|
|
11
|
-
export type NotationTextRun = string | {
|
|
12
|
-
verbatim: string;
|
|
13
|
-
};
|
|
14
|
-
export interface NotationProps {
|
|
15
|
-
/**
|
|
16
|
-
* Engine text where an underscore marks a subscript ("N_SG exceeds N_C"), or a list of runs that
|
|
17
|
-
* mixes such text with verbatim stored text. Needs a parent Text.
|
|
18
|
-
*/
|
|
19
|
-
text?: string | readonly NotationTextRun[];
|
|
20
|
-
/** One symbol: the base, drawn with `sub` small and lowered after it. Needs a parent Text. */
|
|
21
|
-
base?: string;
|
|
22
|
-
sub?: string;
|
|
23
|
-
/** Follows the symbol after a space. */
|
|
24
|
-
desc?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Subscript ink. Inside a field's or choice's label or message line it defaults to that line's
|
|
27
|
-
* ink, elsewhere to `colors["text-body"]`; pass the parent's colour when it differs.
|
|
28
|
-
*/
|
|
29
|
-
color?: string;
|
|
30
|
-
testID?: string;
|
|
31
|
-
}
|
|
32
|
-
/** The text split into runs: `{ text }` for prose, `{ text, sub }` for a symbol and its subscript. */
|
|
33
|
-
export declare const parseNotation: (text: string | null | undefined) => NotationRun[];
|
|
34
|
-
/** A symbol of a standard with its subscript drawn small and lowered below the baseline. */
|
|
35
|
-
export declare const Notation: {
|
|
36
|
-
({ text, base, sub, desc, color, testID }: NotationProps): React.ReactElement;
|
|
37
|
-
/** Elements whose type sets `inlineText` render inline inside Descriptions values. */
|
|
38
|
-
inlineText: boolean;
|
|
39
|
-
};
|
|
40
|
-
/** A symbol as the standard prints it: `sym('C', 'IP')` is C with a small IP, then `desc` if given. */
|
|
41
|
-
export declare const sym: (base: string, sub?: string, desc?: string, color?: string) => React.ReactElement;
|
|
42
|
-
export default Notation;
|
|
43
|
-
//# sourceMappingURL=Notation.d.ts.map
|