oneuiwebproject 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +286 -0
- package/dist/icons-BbGGUHyX.cjs +2 -0
- package/dist/icons-BbGGUHyX.cjs.map +1 -0
- package/dist/icons-DQRCVyKi.js +126 -0
- package/dist/icons-DQRCVyKi.js.map +1 -0
- package/dist/icons.cjs +2 -0
- package/dist/icons.cjs.map +1 -0
- package/dist/icons.js +13620 -0
- package/dist/icons.js.map +1 -0
- package/dist/oneui-react.cjs +2 -0
- package/dist/oneui-react.cjs.map +1 -0
- package/dist/oneui-react.css +2 -0
- package/dist/oneui-react.js +1402 -0
- package/dist/oneui-react.js.map +1 -0
- package/dist/types/components/AppInfo.d.ts +35 -0
- package/dist/types/components/AppInfo.d.ts.map +1 -0
- package/dist/types/components/BottomNav.d.ts +25 -0
- package/dist/types/components/BottomNav.d.ts.map +1 -0
- package/dist/types/components/Button.d.ts +16 -0
- package/dist/types/components/Button.d.ts.map +1 -0
- package/dist/types/components/ColorPickerPreference.d.ts +19 -0
- package/dist/types/components/ColorPickerPreference.d.ts.map +1 -0
- package/dist/types/components/DescriptionPreference.d.ts +18 -0
- package/dist/types/components/DescriptionPreference.d.ts.map +1 -0
- package/dist/types/components/Dialog.d.ts +38 -0
- package/dist/types/components/Dialog.d.ts.map +1 -0
- package/dist/types/components/Drawer.d.ts +24 -0
- package/dist/types/components/Drawer.d.ts.map +1 -0
- package/dist/types/components/GridMenuDialog.d.ts +27 -0
- package/dist/types/components/GridMenuDialog.d.ts.map +1 -0
- package/dist/types/components/HorizontalRadioPreference.d.ts +26 -0
- package/dist/types/components/HorizontalRadioPreference.d.ts.map +1 -0
- package/dist/types/components/Page.d.ts +66 -0
- package/dist/types/components/Page.d.ts.map +1 -0
- package/dist/types/components/Preference.d.ts +23 -0
- package/dist/types/components/Preference.d.ts.map +1 -0
- package/dist/types/components/PreferenceGroup.d.ts +20 -0
- package/dist/types/components/PreferenceGroup.d.ts.map +1 -0
- package/dist/types/components/ProgressBar.d.ts +35 -0
- package/dist/types/components/ProgressBar.d.ts.map +1 -0
- package/dist/types/components/ProgressDialog.d.ts +23 -0
- package/dist/types/components/ProgressDialog.d.ts.map +1 -0
- package/dist/types/components/RelatedCard.d.ts +22 -0
- package/dist/types/components/RelatedCard.d.ts.map +1 -0
- package/dist/types/components/RoundBox.d.ts +31 -0
- package/dist/types/components/RoundBox.d.ts.map +1 -0
- package/dist/types/components/Separator.d.ts +13 -0
- package/dist/types/components/Separator.d.ts.map +1 -0
- package/dist/types/components/Slider.d.ts +39 -0
- package/dist/types/components/Slider.d.ts.map +1 -0
- package/dist/types/components/SliderPreference.d.ts +22 -0
- package/dist/types/components/SliderPreference.d.ts.map +1 -0
- package/dist/types/components/Splash.d.ts +21 -0
- package/dist/types/components/Splash.d.ts.map +1 -0
- package/dist/types/components/Switch.d.ts +15 -0
- package/dist/types/components/Switch.d.ts.map +1 -0
- package/dist/types/components/SwitchBar.d.ts +38 -0
- package/dist/types/components/SwitchBar.d.ts.map +1 -0
- package/dist/types/components/SwitchPreference.d.ts +9 -0
- package/dist/types/components/SwitchPreference.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +31 -0
- package/dist/types/components/Tabs.d.ts.map +1 -0
- package/dist/types/components/TipPopup.d.ts +27 -0
- package/dist/types/components/TipPopup.d.ts.map +1 -0
- package/dist/types/components/TipsCard.d.ts +25 -0
- package/dist/types/components/TipsCard.d.ts.map +1 -0
- package/dist/types/components/Toast.d.ts +28 -0
- package/dist/types/components/Toast.d.ts.map +1 -0
- package/dist/types/icons.d.ts +47 -0
- package/dist/types/icons.d.ts.map +1 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/oneui-icons/OneIcon.d.ts +26 -0
- package/dist/types/oneui-icons/OneIcon.d.ts.map +1 -0
- package/dist/types/oneui-icons/generated.d.ts +2670 -0
- package/dist/types/oneui-icons/generated.d.ts.map +1 -0
- package/dist/types/oneui-icons/index.d.ts +18 -0
- package/dist/types/oneui-icons/index.d.ts.map +1 -0
- package/dist/types/strings.d.ts +44 -0
- package/dist/types/strings.d.ts.map +1 -0
- package/dist/types/theme.d.ts +47 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/utils.d.ts +19 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icons ported from the vector drawables of OneUIProject/oneui-design:
|
|
3
|
+
* drawable/oui_ic_ab_drawer.xml
|
|
4
|
+
* drawable/oui_ic_ab_app_info.xml
|
|
5
|
+
* drawable/oui_preference_tipscard_close.xml
|
|
6
|
+
* drawable/oui_preference_seekbar_pro_plus.xml / _minus.xml
|
|
7
|
+
* plus a few small companion glyphs drawn to match.
|
|
8
|
+
*/
|
|
9
|
+
import type { ReactNode, SVGProps } from 'react';
|
|
10
|
+
export type IconProps = SVGProps<SVGSVGElement> & {
|
|
11
|
+
size?: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Shared SVG shell used by the hand-written companion icons and by the
|
|
15
|
+
* generated 883-icon catalog (`@oneuiproject/react/icons`).
|
|
16
|
+
*/
|
|
17
|
+
export declare function IconBase({ size, children, ...props }: IconProps & {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
viewBox?: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
/** Hamburger icon (`oui_ic_ab_drawer`, original viewport 72). */
|
|
22
|
+
export declare function IconMenu(props: IconProps): import("react").JSX.Element;
|
|
23
|
+
/** App info icon (`oui_ic_ab_app_info`). */
|
|
24
|
+
export declare function IconAppInfo(props: IconProps): import("react").JSX.Element;
|
|
25
|
+
/** Close / dismiss (`oui_preference_tipscard_close`). */
|
|
26
|
+
export declare function IconClose(props: IconProps): import("react").JSX.Element;
|
|
27
|
+
/** Plus (`oui_preference_seekbar_pro_plus`). */
|
|
28
|
+
export declare function IconAdd(props: IconProps): import("react").JSX.Element;
|
|
29
|
+
/** Minus (`oui_preference_seekbar_pro_minus`). */
|
|
30
|
+
export declare function IconRemove(props: IconProps): import("react").JSX.Element;
|
|
31
|
+
/** Back chevron. */
|
|
32
|
+
export declare function IconBack(props: IconProps): import("react").JSX.Element;
|
|
33
|
+
/** Magnifier. */
|
|
34
|
+
export declare function IconSearch(props: IconProps): import("react").JSX.Element;
|
|
35
|
+
/** Checkmark. */
|
|
36
|
+
export declare function IconCheck(props: IconProps): import("react").JSX.Element;
|
|
37
|
+
/** Vertical ellipsis (overflow menu). */
|
|
38
|
+
export declare function IconMore(props: IconProps): import("react").JSX.Element;
|
|
39
|
+
/** Settings gear. */
|
|
40
|
+
export declare function IconSettings(props: IconProps): import("react").JSX.Element;
|
|
41
|
+
/** Home glyph for bottom navigation. */
|
|
42
|
+
export declare function IconHome(props: IconProps): import("react").JSX.Element;
|
|
43
|
+
/** Folder glyph for bottom navigation. */
|
|
44
|
+
export declare function IconFolder(props: IconProps): import("react").JSX.Element;
|
|
45
|
+
/** Person glyph for bottom navigation. */
|
|
46
|
+
export declare function IconPerson(props: IconProps): import("react").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/icons.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,SAAS,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,+BAcvD;AAED,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,+BASxC;AAED,4CAA4C;AAC5C,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,+BAM3C;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,+BAMzC;AAED,gDAAgD;AAChD,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,+BAQvC;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,+BAM1C;AAED,oBAAoB;AACpB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,+BAaxC;AAED,iBAAiB;AACjB,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,+BAQ1C;AAED,iBAAiB;AACjB,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,+BAQzC;AAED,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,+BAQxC;AAED,qBAAqB;AACrB,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,+BAM5C;AAED,wCAAwC;AACxC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,+BAMxC;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,+BAM1C;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,+BAM1C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './styles/tokens.css';
|
|
2
|
+
import './styles/base.css';
|
|
3
|
+
export { OneUIProvider, useOneUI, useTheme, useStrings } from './theme';
|
|
4
|
+
export type { OneUIProviderProps, OneUIContextValue, Theme, } from './theme';
|
|
5
|
+
export { defaultStrings, mergeStrings, type OneUIStrings, type PartialStrings, type NumberFormat, } from './strings';
|
|
6
|
+
export { cx, clamp } from './utils';
|
|
7
|
+
export { ROUND_NONE, ROUND_ALL, ROUND_TOP, ROUND_BOTTOM, ROUND_TOP_LEFT, ROUND_TOP_RIGHT, ROUND_BOTTOM_LEFT, ROUND_BOTTOM_RIGHT, } from './components/RoundBox';
|
|
8
|
+
export { Button, type ButtonProps } from './components/Button';
|
|
9
|
+
export { Switch, type SwitchProps } from './components/Switch';
|
|
10
|
+
export { SwitchBar, SwitchBarAction, type SwitchBarProps, type SwitchBarActionProps, } from './components/SwitchBar';
|
|
11
|
+
export { RoundBox, type RoundBoxProps, type CornerFlags, } from './components/RoundBox';
|
|
12
|
+
export { Separator, type SeparatorProps } from './components/Separator';
|
|
13
|
+
export { toast, dismissToast, clearToasts, Toast, type ToastProps, type ToastOptions, } from './components/Toast';
|
|
14
|
+
export { Page, type PageProps, type PageActionMode, } from './components/Page';
|
|
15
|
+
export { BottomNav, type BottomNavProps, type BottomNavItem, } from './components/BottomNav';
|
|
16
|
+
export { Drawer, type DrawerProps } from './components/Drawer';
|
|
17
|
+
export { Splash, type SplashProps } from './components/Splash';
|
|
18
|
+
export { AppInfo, type AppInfoProps, type AppInfoAction, } from './components/AppInfo';
|
|
19
|
+
export { Tabs, type TabsProps, type TabItem } from './components/Tabs';
|
|
20
|
+
export { Slider, type SliderProps, type SliderValue, } from './components/Slider';
|
|
21
|
+
export { CircularProgress, LinearProgress, ProgressBar, type CircularProgressProps, type LinearProgressProps, type ProgressBarProps, } from './components/ProgressBar';
|
|
22
|
+
export { Dialog, DialogButton, type DialogProps, type DialogButtonProps, } from './components/Dialog';
|
|
23
|
+
export { ProgressDialog, type ProgressDialogProps, } from './components/ProgressDialog';
|
|
24
|
+
export { GridMenuDialog, type GridMenuDialogProps, type GridMenuItem, } from './components/GridMenuDialog';
|
|
25
|
+
export { RelatedCard, type RelatedCardProps, type RelatedLink, } from './components/RelatedCard';
|
|
26
|
+
export { TipPopup, type TipPopupProps } from './components/TipPopup';
|
|
27
|
+
export { PreferenceGroup, type PreferenceGroupProps, } from './components/PreferenceGroup';
|
|
28
|
+
export { Preference, type PreferenceProps } from './components/Preference';
|
|
29
|
+
export { SwitchPreference, type SwitchPreferenceProps, } from './components/SwitchPreference';
|
|
30
|
+
export { SliderPreference, type SliderPreferenceProps, } from './components/SliderPreference';
|
|
31
|
+
export { DescriptionPreference, type DescriptionPreferenceProps, } from './components/DescriptionPreference';
|
|
32
|
+
export { HorizontalRadioPreference, type HorizontalRadioPreferenceProps, type RadioOption, } from './components/HorizontalRadioPreference';
|
|
33
|
+
export { TipsCard, type TipsCardProps, type TipsCardAction, } from './components/TipsCard';
|
|
34
|
+
export { ColorPickerPreference, type ColorPickerPreferenceProps, } from './components/ColorPickerPreference';
|
|
35
|
+
export { IconMenu, IconAppInfo, IconClose, IconAdd, IconRemove, IconBack, IconSearch, IconCheck, IconMore, IconSettings, IconHome, IconFolder, IconPerson, type IconProps, } from './icons';
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxE,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,GACN,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,C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M,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGrE,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,yBAAyB,EACzB,KAAK,8BAA8B,EACnC,KAAK,WAAW,GACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,KAAK,SAAS,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { iconNames } from './generated';
|
|
2
|
+
import type { IconProps } from '../icons';
|
|
3
|
+
export interface OneIconProps extends IconProps {
|
|
4
|
+
/**
|
|
5
|
+
* Icon name — either the short name (`"alarm"`, from the Android resource
|
|
6
|
+
* `ic_oui_alarm` without the prefix) or the full resource name
|
|
7
|
+
* (`"ic_oui_alarm"`).
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/** Rendered when the name is unknown. */
|
|
11
|
+
fallback?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Render any of the 883 One UI icons by name:
|
|
15
|
+
*
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <OneIcon name="alarm" size={32} />
|
|
18
|
+
* <OneIcon name="ic_oui_wifi" style={{ color: '#0381fe' }} />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* For best tree-shaking prefer the named components
|
|
22
|
+
* (`import { IcOuiAlarm } from '@oneuiproject/react/icons'`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function OneIcon({ name, fallback, ...props }: OneIconProps): import("react").JSX.Element;
|
|
25
|
+
export { iconNames };
|
|
26
|
+
//# sourceMappingURL=OneIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OneIcon.d.ts","sourceRoot":"","sources":["../../../src/oneui-icons/OneIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,QAAe,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,+BAaxE;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|