@appkit/dek-ui 0.1.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.
Files changed (65) hide show
  1. package/README.md +27 -0
  2. package/dist/components/Button/Button.d.ts +11 -0
  3. package/dist/components/Button/ButtonContainer.d.ts +28 -0
  4. package/dist/components/Button/ButtonContainer.styled.d.ts +24 -0
  5. package/dist/components/Button/ButtonIcon.d.ts +12 -0
  6. package/dist/components/Button/ButtonIcon.styled.d.ts +282 -0
  7. package/dist/components/Button/ButtonText.d.ts +17 -0
  8. package/dist/components/Button/types.d.ts +5 -0
  9. package/dist/components/ButtonLoadingIcon/ButtonLoadingIcon.d.ts +11 -0
  10. package/dist/components/ButtonLoadingIcon/ButtonLoadingIcon.styled.d.ts +281 -0
  11. package/dist/components/CardButton/CardButton.d.ts +3 -0
  12. package/dist/components/Cell/Cell.d.ts +18 -0
  13. package/dist/components/Cell/Cell.styled.d.ts +17 -0
  14. package/dist/components/Grid/Grid.d.ts +12 -0
  15. package/dist/components/Grid/Grid.styled.d.ts +11 -0
  16. package/dist/components/Header/Header.d.ts +8 -0
  17. package/dist/components/Icon/Icon.d.ts +11 -0
  18. package/dist/components/IconButton/IconButton.d.ts +4 -0
  19. package/dist/components/Image/Image.d.ts +12 -0
  20. package/dist/components/LoadingDot/LoadingDot.d.ts +8 -0
  21. package/dist/components/LoadingDot/LoadingDot.styled.d.ts +7 -0
  22. package/dist/components/LoadingDots/LoadingDots.d.ts +6 -0
  23. package/dist/components/LoadingDots/LoadingDots.styled.d.ts +7 -0
  24. package/dist/components/PillButton/PillButton.d.ts +7 -0
  25. package/dist/components/ProgressBar/ProgressBar.d.ts +9 -0
  26. package/dist/components/ProgressBar/ProgressBar.styled.d.ts +19 -0
  27. package/dist/components/Provider/Provider.d.ts +6 -0
  28. package/dist/components/Screen/Screen.d.ts +11 -0
  29. package/dist/components/Screen/Screen.styled.d.ts +10 -0
  30. package/dist/components/ScreenLoadingOverlay/ScreenLoadingOverlay.d.ts +2 -0
  31. package/dist/components/ScreenLoadingOverlay/ScreenLoadingOverlay.styled.d.ts +274 -0
  32. package/dist/components/Text/Text.d.ts +31 -0
  33. package/dist/components/Text/Text.styled.d.ts +23 -0
  34. package/dist/components/Tile/Tile.d.ts +15 -0
  35. package/dist/components/Tile/Tile.styled.d.ts +1102 -0
  36. package/dist/components/TitleBar/TitleBar.d.ts +10 -0
  37. package/dist/components/View/View.d.ts +34 -0
  38. package/dist/components/View/View.styled.d.ts +24 -0
  39. package/dist/index.d.ts +24 -0
  40. package/dist/index.es.js +29557 -0
  41. package/dist/index.umd.js +273 -0
  42. package/dist/lib/formatDateTime.d.ts +2 -0
  43. package/dist/lib/hooks/useDateTime.d.ts +2 -0
  44. package/dist/lib/hooks/useImageCache.d.ts +8 -0
  45. package/dist/lib/hooks/useInterval.d.ts +4 -0
  46. package/dist/lib/theme.d.ts +85 -0
  47. package/dist/lib/ui/css.d.ts +1 -0
  48. package/dist/lib/ui/getImageAsBase64.d.ts +2 -0
  49. package/dist/lib/ui/viewAlignToFlex.d.ts +3 -0
  50. package/dist/lib/ui/viewBackColorToCSS.d.ts +4 -0
  51. package/dist/lib/ui/viewScrollToCSS.d.ts +3 -0
  52. package/dist/lib/utils/extractErrorMessage.d.ts +1 -0
  53. package/dist/lib/utils/noop.d.ts +2 -0
  54. package/dist/stories/Button.stories.d.ts +7 -0
  55. package/dist/stories/CardButton.stories.d.ts +7 -0
  56. package/dist/stories/Header.stories.d.ts +6 -0
  57. package/dist/stories/IconButton.stories.d.ts +6 -0
  58. package/dist/stories/Image.stories.d.ts +8 -0
  59. package/dist/stories/PillButton.stories.d.ts +6 -0
  60. package/dist/stories/ProgressBar.stories.d.ts +6 -0
  61. package/dist/stories/Text.stories.d.ts +8 -0
  62. package/dist/stories/Tile.stories.d.ts +10 -0
  63. package/dist/stories/TitleBar.stories.d.ts +7 -0
  64. package/dist/stories/View.stories.d.ts +8 -0
  65. package/package.json +63 -0
@@ -0,0 +1,2 @@
1
+ declare function formatDateTime(format?: string, dateTime?: Date): string;
2
+ export default formatDateTime;
@@ -0,0 +1,2 @@
1
+ declare function useDateTime(delayMs?: number): Date;
2
+ export default useDateTime;
@@ -0,0 +1,8 @@
1
+ export type ImageLoaderFn = (src: string) => Promise<string | undefined>;
2
+ type ImageCacheResult = {
3
+ data?: string;
4
+ error: string;
5
+ loading: boolean;
6
+ };
7
+ declare function useImageCache(src: string, imageLoader?: ImageLoaderFn): ImageCacheResult;
8
+ export default useImageCache;
@@ -0,0 +1,4 @@
1
+ type IntervalDestructor = () => void;
2
+ type IntervalCallback = () => void | IntervalDestructor;
3
+ declare function useInterval(callback: IntervalCallback, delayMs: number | null): void;
4
+ export default useInterval;
@@ -0,0 +1,85 @@
1
+ declare const _default: {
2
+ text: {
3
+ size: {
4
+ xxsmall: number;
5
+ xsmall: number;
6
+ small: number;
7
+ normal: number;
8
+ large: number;
9
+ xlarge: number;
10
+ xxlarge: number;
11
+ heading: number;
12
+ };
13
+ height: {
14
+ xxsmall: number;
15
+ xsmall: number;
16
+ small: number;
17
+ normal: number;
18
+ large: number;
19
+ xlarge: number;
20
+ xxlarge: number;
21
+ heading: number;
22
+ };
23
+ weight: {
24
+ xxthin: number;
25
+ xthin: number;
26
+ thin: number;
27
+ normal: number;
28
+ bold: number;
29
+ xbold: number;
30
+ xxbold: number;
31
+ heading: number;
32
+ };
33
+ family: {
34
+ normal: string;
35
+ condensed: string;
36
+ mono: string;
37
+ slab: string;
38
+ flex: string;
39
+ heading: string;
40
+ };
41
+ color: {
42
+ normal: string;
43
+ xxsubtle: string;
44
+ xsubtle: string;
45
+ subtle: string;
46
+ tint: string;
47
+ reverse: string;
48
+ };
49
+ };
50
+ view: {
51
+ backColor: {
52
+ none: string;
53
+ light: string;
54
+ lighter: string;
55
+ lightest: string;
56
+ dark: string;
57
+ darker: string;
58
+ darkest: string;
59
+ tile: string;
60
+ };
61
+ };
62
+ button: {
63
+ clear: {
64
+ backColor: string;
65
+ backColorActive: string;
66
+ color: string;
67
+ colorActive: string;
68
+ };
69
+ toggle: {
70
+ backColor: string;
71
+ backColorActive: string;
72
+ color: string;
73
+ colorActive: string;
74
+ };
75
+ normal: {
76
+ backColor: string;
77
+ backColorActive: string;
78
+ color: string;
79
+ colorActive: string;
80
+ };
81
+ brightnessPressed: number;
82
+ brightnessDisabled: number;
83
+ };
84
+ };
85
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const disableSelection = "\n/* disable selection */\n* {\n user-select: none;\n -khtml-user-select: none;\n -o-user-select: none;\n -moz-user-select: -moz-none;\n -webkit-user-select: none;\n}\n::selection {\n background: transparent;\n color: inherit;\n}\n::-moz-selection {\n background: transparent;\n color: inherit;\n}\n";
@@ -0,0 +1,2 @@
1
+ declare function getImageAsBase64(url: string): Promise<string | undefined>;
2
+ export default getImageAsBase64;
@@ -0,0 +1,3 @@
1
+ import { ViewHorzAlignment, ViewVertAlignment } from '../../components/View/View';
2
+ export declare const halignToFlex: (halign: ViewHorzAlignment, reverse?: boolean) => string;
3
+ export declare const valignToFlex: (valign: ViewVertAlignment, reverse?: boolean) => string;
@@ -0,0 +1,4 @@
1
+ import { DefaultTheme } from 'styled-components';
2
+ import { ViewBackColor } from '../../components/View/View';
3
+ declare function viewBackColorToCSS(theme: DefaultTheme, color: ViewBackColor | string): string;
4
+ export default viewBackColorToCSS;
@@ -0,0 +1,3 @@
1
+ import { ViewScroll } from '../../components/View/View';
2
+ declare const viewScrollToCSS: (scroll: ViewScroll) => string;
3
+ export default viewScrollToCSS;
@@ -0,0 +1 @@
1
+ export default function extractErrorMessage(err: unknown): string;
@@ -0,0 +1,2 @@
1
+ declare const noop: () => any;
2
+ export default noop;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Button from '../components/Button/Button';
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Button>;
6
+ export declare const Default: Story;
7
+ export declare const CustomContent: Story;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import CardButton from '../components/CardButton/CardButton';
3
+ declare const meta: Meta<typeof CardButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CardButton>;
6
+ export declare const Default: Story;
7
+ export declare const CustomContent: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Header from '../components/Header/Header';
3
+ declare const meta: Meta<typeof Header>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Header>;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import IconButton from '../components/IconButton/IconButton';
3
+ declare const meta: Meta<typeof IconButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof IconButton>;
6
+ export declare const Default: Story;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Image from '../components/Image/Image';
3
+ declare const meta: Meta<typeof Image>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Image>;
6
+ export declare const Default: Story;
7
+ export declare const Fallback: Story;
8
+ export declare const Loading: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import PillButton from '../components/PillButton/PillButton';
3
+ declare const meta: Meta<typeof PillButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof PillButton>;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import ProgressBar from '../components/ProgressBar/ProgressBar';
3
+ declare const meta: Meta<typeof ProgressBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ProgressBar>;
6
+ export declare const Default: Story;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Text from '../components/Text/Text';
3
+ declare const meta: Meta<typeof Text>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Text>;
6
+ export declare const Default: Story;
7
+ export declare const Families: Story;
8
+ export declare const Paragraph: Story;
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Tile from '../components/Tile/Tile';
3
+ declare const meta: Meta<typeof Tile>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Tile>;
6
+ export declare const Default: Story;
7
+ export declare const TitleOnly: Story;
8
+ export declare const NoBody: Story;
9
+ export declare const NoBodyIcon: Story;
10
+ export declare const Clickable: Story;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import TitleBar from '../components/TitleBar/TitleBar';
3
+ declare const meta: Meta<typeof TitleBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TitleBar>;
6
+ export declare const Default: Story;
7
+ export declare const WithChildren: Story;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import View from '../components/View/View';
3
+ declare const meta: Meta<typeof View>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof View>;
6
+ export declare const Default: Story;
7
+ export declare const BackColors: Story;
8
+ export declare const Shades: Story;
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@appkit/dek-ui",
3
+ "private": false,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "tsc && vite build",
8
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
9
+ "preview": "vite preview",
10
+ "storybook": "storybook dev -p 6006",
11
+ "build-storybook": "storybook build",
12
+ "publish": "npm publish"
13
+ },
14
+ "dependencies": {
15
+ "axios": "^1.6.2",
16
+ "moment": "^2.29.4",
17
+ "react": "^16.8.0 || 17.x || 18.x",
18
+ "react-dom": "^16.8.0 || 17.x || 18.x",
19
+ "react-icons": "^4.11.0",
20
+ "styled-components": "^5.0.0 || 6.x"
21
+ },
22
+ "devDependencies": {
23
+ "@storybook/addon-essentials": "^7.6.3",
24
+ "@storybook/addon-interactions": "^7.6.3",
25
+ "@storybook/addon-links": "^7.6.3",
26
+ "@storybook/addon-onboarding": "^1.0.9",
27
+ "@storybook/blocks": "^7.6.3",
28
+ "@storybook/client-api": "^7.6.3",
29
+ "@storybook/react": "^7.6.3",
30
+ "@storybook/react-vite": "^7.6.3",
31
+ "@storybook/test": "^7.6.3",
32
+ "@types/react": "^18.2.15",
33
+ "@types/react-dom": "^18.2.7",
34
+ "@typescript-eslint/eslint-plugin": "^6.9.0",
35
+ "@typescript-eslint/parser": "^6.9.0",
36
+ "@vitejs/plugin-react": "^4.0.3",
37
+ "eslint": "^8.52.0",
38
+ "eslint-config-prettier": "^9.0.0",
39
+ "eslint-plugin-prettier": "^5.0.1",
40
+ "eslint-plugin-react": "^7.33.2",
41
+ "eslint-plugin-react-hooks": "^4.6.0",
42
+ "eslint-plugin-react-refresh": "^0.4.3",
43
+ "eslint-plugin-storybook": "^0.6.15",
44
+ "prettier": "^3.0.3",
45
+ "storybook": "^7.6.3",
46
+ "storybook-addon-pseudo-states": "^2.1.2",
47
+ "typescript": "^5.0.2",
48
+ "vite": "^4.4.5",
49
+ "vite-plugin-dts": "^3.6.3",
50
+ "vite-plugin-svgr": "^4.1.0"
51
+ },
52
+ "peerDependencies": {
53
+ "react": "^16.8.0 || 17.x || 18.x",
54
+ "react-dom": "^16.8.0 || 17.x || 18.x",
55
+ "styled-components": "^5.0.0 || 6.x"
56
+ },
57
+ "files": [
58
+ "dist"
59
+ ],
60
+ "main": "./dist/index.umd.js",
61
+ "module": "./dist/index.es.js",
62
+ "types": "./dist/index.d.ts"
63
+ }