lupine.components 1.1.11 → 1.1.14

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 (93) hide show
  1. package/README.md +3 -3
  2. package/package.json +42 -42
  3. package/src/components/action-sheet.tsx +419 -419
  4. package/src/components/button-push-animation.tsx +147 -138
  5. package/src/components/button.tsx +55 -55
  6. package/src/components/desktop-footer.tsx +17 -17
  7. package/src/components/desktop-header.tsx +52 -52
  8. package/src/components/drag-refresh.tsx +129 -129
  9. package/src/components/editable-label.tsx +83 -83
  10. package/src/components/float-window.tsx +233 -233
  11. package/src/components/grid.tsx +18 -18
  12. package/src/components/html-load.tsx +41 -41
  13. package/src/components/html-var.tsx +81 -81
  14. package/src/components/index.ts +43 -44
  15. package/src/components/input-with-title.tsx +24 -24
  16. package/src/components/link-item.tsx +13 -13
  17. package/src/components/link-list.tsx +62 -62
  18. package/src/components/menu-bar.tsx +219 -219
  19. package/src/components/menu-item-props.tsx +13 -13
  20. package/src/components/menu-sidebar.tsx +325 -318
  21. package/src/components/message-box.tsx +44 -44
  22. package/src/components/meta-data.tsx +36 -36
  23. package/src/components/meta-description.tsx +12 -12
  24. package/src/components/mobile-components/icon-menu-item-props.ts +6 -6
  25. package/src/components/mobile-components/index.ts +8 -9
  26. package/src/components/mobile-components/mobile-footer-menu.tsx +95 -95
  27. package/src/components/mobile-components/mobile-header-component.tsx +101 -101
  28. package/src/components/mobile-components/mobile-header-title-icon.tsx +109 -95
  29. package/src/components/mobile-components/mobile-header-with-back.tsx +127 -104
  30. package/src/components/mobile-components/mobile-side-menu.tsx +154 -154
  31. package/src/components/mobile-components/mobile-top-sys-icon.tsx +18 -18
  32. package/src/components/mobile-components/mobile-top-sys-menu.tsx +62 -62
  33. package/src/components/modal.tsx +33 -33
  34. package/src/components/notice-message.tsx +118 -118
  35. package/src/components/page-title.tsx +6 -6
  36. package/src/components/paging-link.tsx +175 -175
  37. package/src/components/panel.tsx +21 -21
  38. package/src/components/popup-menu.tsx +289 -289
  39. package/src/components/progress.tsx +91 -91
  40. package/src/components/radio-label-component.tsx +36 -36
  41. package/src/components/redirect.tsx +19 -19
  42. package/src/components/resizable-splitter.tsx +128 -128
  43. package/src/components/select-angle-component.tsx +127 -127
  44. package/src/components/select-with-title.tsx +37 -37
  45. package/src/components/slide-tab-component.tsx +144 -149
  46. package/src/components/spinner.tsx +106 -100
  47. package/src/components/stars-component.tsx +66 -66
  48. package/src/components/svg.tsx +24 -24
  49. package/src/components/tabs.tsx +279 -279
  50. package/src/components/text-glow.tsx +37 -37
  51. package/src/components/text-scale.tsx +42 -42
  52. package/src/components/text-wave.tsx +55 -55
  53. package/src/components/theme-selector.tsx +28 -28
  54. package/src/components/toggle-base.tsx +269 -269
  55. package/src/components/toggle-switch.tsx +160 -160
  56. package/src/frames/index.ts +3 -3
  57. package/src/frames/responsive-frame.tsx +83 -83
  58. package/src/frames/slider-frame.tsx +111 -111
  59. package/src/frames/top-frame.tsx +30 -30
  60. package/src/index.ts +5 -5
  61. package/src/lib/back-action-helper.ts +54 -54
  62. package/src/lib/base62.ts +23 -23
  63. package/src/lib/blob-utils.ts +23 -23
  64. package/src/lib/calculate-text-width.ts +13 -13
  65. package/src/lib/date-utils.ts +317 -317
  66. package/src/lib/deep-merge.ts +37 -37
  67. package/src/lib/document-ready.ts +34 -34
  68. package/src/lib/dom-utils.ts +32 -32
  69. package/src/lib/download-file.ts +118 -118
  70. package/src/lib/download-link.ts +12 -12
  71. package/src/lib/download-stream.ts +19 -19
  72. package/src/lib/drag-util.ts +118 -118
  73. package/src/lib/dynamical-load.ts +134 -134
  74. package/src/lib/encode-html.ts +27 -0
  75. package/src/lib/find-parent-tag.ts +8 -8
  76. package/src/lib/format-bytes.ts +11 -11
  77. package/src/lib/index.ts +24 -24
  78. package/src/lib/lite-dom.ts +225 -225
  79. package/src/lib/message-hub.ts +103 -104
  80. package/src/lib/observable.ts +188 -188
  81. package/src/lib/path-utils.ts +42 -42
  82. package/src/lib/promise-timeout.ts +1 -1
  83. package/src/lib/simple-storage.ts +40 -40
  84. package/src/lib/stop-propagation.ts +7 -7
  85. package/src/lib/upload-file.ts +101 -101
  86. package/src/styles/base-themes.ts +17 -17
  87. package/src/styles/dark-themes.ts +99 -99
  88. package/src/styles/index.ts +5 -5
  89. package/src/styles/light-themes.ts +106 -106
  90. package/src/styles/media-query.ts +93 -93
  91. package/src/styles/shared-themes.ts +57 -57
  92. package/tsconfig.json +113 -113
  93. package/src/lib/escape-html.ts +0 -9
@@ -1,106 +1,106 @@
1
- import { ThemeProps } from 'lupine.web';
2
- import { sharedThemes } from './shared-themes';
3
-
4
- export const lightThemes: ThemeProps = {
5
- ...sharedThemes,
6
- '--theme-name': 'light',
7
-
8
- // scroll bar
9
- '--scrollbar-bg': '#d5d5d5',
10
- '--scrollbar-thumb-bg': '#979797',
11
- '--scrollbar-active-thumb-bg': '#737373',
12
-
13
- '--primary-color': '#303030',
14
- '--primary-color-disabled': '#a0a0a0',
15
- '--primary-bg-color': '#ffffff',
16
- '--primary-border-color': '#858585',
17
- '--primary-border': '1px solid var(--primary-border-color)',
18
- '--primary-opacity': 'unset', // used for dark theme
19
- '--primary-disabled-opacity': '0.5', // used for dark theme
20
- '--primary-accent-color': '#0a74c9', // used for radio and checkbox's background color
21
-
22
- '--secondary-color': '#818181',
23
- '--secondary-bg-color': '#eeeeee',
24
- '--secondary-border-color': '#a0a0a0',
25
- '--secondary-border': '1px solid var(--secondary-border-color)',
26
-
27
- // including menus, tabs, sidebars
28
- '--activatable-color-normal': 'var(--primary-color)',
29
- '--activatable-bg-color-normal': 'var(--primary-bg-color)',
30
- '--activatable-color-hover': '#1d1d1d',
31
- '--activatable-bg-color-hover': '#bcbcbc',
32
- '--activatable-color-selected': '#2d2d2d',
33
- '--activatable-bg-color-selected': '#dcdcdc',
34
- // '--menu-color-hover': '#303030',
35
- // '--menu-bg-color': '#ffffff',
36
- // '--menu-bg-color-hover': '#a0a0a0',
37
- '--menu-font-size': '1rem',
38
- '--menubar-color': '#eeeeee',
39
- '--menubar-bg-color': '#000000',
40
- '--menubar-sub-bg-color': '#f9f9f9',
41
- '--sidebar-color': 'var(--primary-color)',
42
- '--sidebar-bg-color': '#f4f3f4',
43
- // '--sidebar-sub-color': 'var(--sidebar-color)',
44
- // '--sidebar-sub-bg-color': '#eaeaea',
45
- '--sidebar-border': '1px solid #858585',
46
- // '--sidebar-hover-color': 'var(--sidebar-color)',
47
- // '--sidebar-hover-bg-color': '#e0e0e0',
48
-
49
- '--row-bg-color1': '#ffffff',
50
- '--row-bg-color2': '#ffffff',
51
-
52
- '--success-color': '#04AA6D',
53
- '--info-color': '#2196F3',
54
- '--warning-color': '#ff9800',
55
- '--error-color': '#f44336',
56
- '--success-bg-color': '#04AA6D',
57
- '--info-bg-color': '#2196F3',
58
- '--warning-bg-color': '#ff9800',
59
- '--error-bg-color': '#f44336',
60
- '--notice-color-with-bg': '#ffffff',
61
-
62
- '--cover-mask-bg-color': '#00000060',
63
- '--cover-bg-color': '#f5f5f5',
64
- // for dropdown-menu
65
- '--cover-box-shadow': '3px 3px 8px #767676',
66
- // for big block, deeper shadow arround, good for dark theme
67
- '--cover-box-shadow-around': '#000000 2px 4px 20px 1px',
68
-
69
- // for input, checkbox, radio box, select
70
- '--input-color': '#4e4e4e',
71
- '--input-bg-color': '#ffffff',
72
- '--input-box-shadow': '0px 0px 0px #000000, 1px 1px 0px 0px #50505045',
73
- '--input-border-focus': '1px solid #0074d9',
74
-
75
- // for button, div
76
- '--button-color': '#4e4e4e',
77
- '--button-bg': '-webkit-linear-gradient(top, #ffffff 0%, #f6f6f6 74%, #ededed 100%)',
78
- '--button-bg-hover': '-webkit-linear-gradient(top, #ffffff 0%, #e6e6e6 74%, #dddddd 100%)',
79
- '--button-border': '1px solid #f6f6f6',
80
- '--button-box-shadow': '1px 1px 1px #00000085, 0px 1px 0px 2px #0705053b',
81
-
82
- '--header-color': '#000080',
83
- '--header-bg-color': '#ffffff',
84
-
85
- // for setting-section
86
- '--ss-group-color': 'var(--primary-color)',
87
- '--ss-group-bg-color': 'var(--activatable-bg-color-selected)',
88
- '--ss-row-btn-color': '#eee',
89
- '--ss-row-btn-bg-color': '#333',
90
- '--ss-row-btn-warn-color': 'red',
91
- '--mobile-header-shadow': '0 4px 4px var(--primary-border-color)',
92
-
93
- // '--po-background': '#e5e5e5', // Background for surfaces on top of primary background
94
- // // backgroundSecondary: '#f5f5f5', // Secondary background
95
- // // backgroundOnSecondary: '#e5e5e5', // Background for surfaces on top of secondary background
96
- // '--background-modifier-hover': '', // Hovered elements
97
- // '--background-modifier-active-hover': '', // Active hovered elements
98
- // '--background-modifier-border': '', // Border color
99
- // '--background-modifier-border-hover': '', // Border color (hover)
100
- // '--background-modifier-border-focus': '', // Border color (focus)
101
- // '--background-modifier-error': '', // Error background
102
- // '--background-modifier-error-hover': '', // Error background (hover)
103
- // '--background-modifier-success': '', // Success background
104
- // '--background-modifier-message': '', // Messages background
105
- // '--background-modifier-form-field': '', // Form field background
106
- };
1
+ import { ThemeProps } from 'lupine.web';
2
+ import { sharedThemes } from './shared-themes';
3
+
4
+ export const lightThemes: ThemeProps = {
5
+ ...sharedThemes,
6
+ '--theme-name': 'light',
7
+
8
+ // scroll bar
9
+ '--scrollbar-bg': '#d5d5d5',
10
+ '--scrollbar-thumb-bg': '#979797',
11
+ '--scrollbar-active-thumb-bg': '#737373',
12
+
13
+ '--primary-color': '#303030',
14
+ '--primary-color-disabled': '#a0a0a0',
15
+ '--primary-bg-color': '#ffffff',
16
+ '--primary-border-color': '#858585',
17
+ '--primary-border': '1px solid var(--primary-border-color)',
18
+ '--primary-opacity': 'unset', // used for dark theme
19
+ '--primary-disabled-opacity': '0.5', // used for dark theme
20
+ '--primary-accent-color': '#0a74c9', // used for radio and checkbox's background color
21
+
22
+ '--secondary-color': '#818181',
23
+ '--secondary-bg-color': '#eeeeee',
24
+ '--secondary-border-color': '#a0a0a0',
25
+ '--secondary-border': '1px solid var(--secondary-border-color)',
26
+
27
+ // including menus, tabs, sidebars
28
+ '--activatable-color-normal': 'var(--primary-color)',
29
+ '--activatable-bg-color-normal': 'var(--primary-bg-color)',
30
+ '--activatable-color-hover': '#1d1d1d',
31
+ '--activatable-bg-color-hover': '#bcbcbc',
32
+ '--activatable-color-selected': '#2d2d2d',
33
+ '--activatable-bg-color-selected': '#dcdcdc',
34
+ // '--menu-color-hover': '#303030',
35
+ // '--menu-bg-color': '#ffffff',
36
+ // '--menu-bg-color-hover': '#a0a0a0',
37
+ '--menu-font-size': '1rem',
38
+ '--menubar-color': '#eeeeee',
39
+ '--menubar-bg-color': '#000000',
40
+ '--menubar-sub-bg-color': '#f9f9f9',
41
+ '--sidebar-color': 'var(--primary-color)',
42
+ '--sidebar-bg-color': '#f4f3f4',
43
+ // '--sidebar-sub-color': 'var(--sidebar-color)',
44
+ // '--sidebar-sub-bg-color': '#eaeaea',
45
+ '--sidebar-border': '1px solid #858585',
46
+ // '--sidebar-hover-color': 'var(--sidebar-color)',
47
+ // '--sidebar-hover-bg-color': '#e0e0e0',
48
+
49
+ '--row-bg-color1': '#ffffff',
50
+ '--row-bg-color2': '#ffffff',
51
+
52
+ '--success-color': '#04AA6D',
53
+ '--info-color': '#2196F3',
54
+ '--warning-color': '#ff9800',
55
+ '--error-color': '#f44336',
56
+ '--success-bg-color': '#04AA6D',
57
+ '--info-bg-color': '#2196F3',
58
+ '--warning-bg-color': '#ff9800',
59
+ '--error-bg-color': '#f44336',
60
+ '--notice-color-with-bg': '#ffffff',
61
+
62
+ '--cover-mask-bg-color': '#00000060',
63
+ '--cover-bg-color': '#f5f5f5',
64
+ // for dropdown-menu
65
+ '--cover-box-shadow': '3px 3px 8px #767676',
66
+ // for big block, deeper shadow arround, good for dark theme
67
+ '--cover-box-shadow-around': '#000000 2px 4px 20px 1px',
68
+
69
+ // for input, checkbox, radio box, select
70
+ '--input-color': '#4e4e4e',
71
+ '--input-bg-color': '#ffffff',
72
+ '--input-box-shadow': '0px 0px 0px #000000, 1px 1px 0px 0px #50505045',
73
+ '--input-border-focus': '1px solid #0074d9',
74
+
75
+ // for button, div
76
+ '--button-color': '#4e4e4e',
77
+ '--button-bg': '-webkit-linear-gradient(top, #ffffff 0%, #f6f6f6 74%, #ededed 100%)',
78
+ '--button-bg-hover': '-webkit-linear-gradient(top, #ffffff 0%, #e6e6e6 74%, #dddddd 100%)',
79
+ '--button-border': '1px solid #f6f6f6',
80
+ '--button-box-shadow': '1px 1px 1px #00000085, 0px 1px 0px 2px #0705053b',
81
+
82
+ '--header-color': '#000080',
83
+ '--header-bg-color': '#ffffff',
84
+
85
+ // for setting-section
86
+ '--ss-group-color': 'var(--primary-color)',
87
+ '--ss-group-bg-color': 'var(--activatable-bg-color-selected)',
88
+ '--ss-row-btn-color': '#eee',
89
+ '--ss-row-btn-bg-color': '#333',
90
+ '--ss-row-btn-warn-color': 'red',
91
+ '--mobile-header-shadow': '0 4px 4px var(--primary-border-color)',
92
+
93
+ // '--po-background': '#e5e5e5', // Background for surfaces on top of primary background
94
+ // // backgroundSecondary: '#f5f5f5', // Secondary background
95
+ // // backgroundOnSecondary: '#e5e5e5', // Background for surfaces on top of secondary background
96
+ // '--background-modifier-hover': '', // Hovered elements
97
+ // '--background-modifier-active-hover': '', // Active hovered elements
98
+ // '--background-modifier-border': '', // Border color
99
+ // '--background-modifier-border-hover': '', // Border color (hover)
100
+ // '--background-modifier-border-focus': '', // Border color (focus)
101
+ // '--background-modifier-error': '', // Error background
102
+ // '--background-modifier-error-hover': '', // Error background (hover)
103
+ // '--background-modifier-success': '', // Success background
104
+ // '--background-modifier-message': '', // Messages background
105
+ // '--background-modifier-form-field': '', // Form field background
106
+ };
@@ -1,93 +1,93 @@
1
- // export enum MediaQuery {
2
- // ExtraSmall = "@media only screen and (max-width: 480px)",
3
- // Mobile = "@media only screen and (min-width: 481px) and (max-width: 767px)",
4
- // Tablet = "@media only screen and (min-width: 768px) and (max-width: 991px)",
5
- // Desktop = "@media only screen and (min-width: 992px) and (max-width: 1399px)",
6
- // ExtraLarge = "@media only screen and (min-width: 1400px)",
7
- // }
8
-
9
- /*
10
- --> Bootstrap – 576px, 768px, 992px, 1200px, 1400px
11
- Tailwind - 640px, 768px, 1024px, 1280px, 1536px
12
- Foundation: <640px, ≥640px, ≥1200px
13
- Bulma: <769px, ≥769px, ≥1024px, ≥1216px, and ≥1408px
14
- Semantic UI: <768px, ≥768px, ≥992px, ≥1400px, ≥1920px
15
- Primer: <544px, ≥544px, ≥768px, ≥1012px, ≥1280px
16
- UIKit: <479px, ≥480px, ≥768px, ≥960px, ≥1200px
17
- */
18
-
19
- export class MediaQueryMaxWidth {
20
- private static _ExtraSmall = '480px';
21
- private static _Mobile = '767px'; // Grid: col-1, 12
22
- private static _Tablet = '991px'; // Grid: col-1-md, 12-md
23
- private static _Desktop = '1399px'; // Grid: col-1-lg, 12-lg
24
- public static get ExtraSmallMax() {
25
- return MediaQueryMaxWidth._ExtraSmall;
26
- }
27
- public static get MobileMax() {
28
- return MediaQueryMaxWidth._Mobile;
29
- }
30
- public static get TabletMax() {
31
- return MediaQueryMaxWidth._Tablet;
32
- }
33
- public static get DesktopMax() {
34
- return MediaQueryMaxWidth._Desktop;
35
- }
36
-
37
- public static set ExtraSmallMax(value: string) {
38
- MediaQueryMaxWidth._ExtraSmall = value;
39
- }
40
- public static set MobileMax(value: string) {
41
- MediaQueryMaxWidth._Mobile = value;
42
- }
43
- public static set TabletMax(value: string) {
44
- MediaQueryMaxWidth._Tablet = value;
45
- }
46
- public static set DesktopMax(value: string) {
47
- MediaQueryMaxWidth._Desktop = value;
48
- }
49
- }
50
- export class MediaQueryRange {
51
- public static get ExtraSmallBelow() {
52
- return `@media only screen and (max-width: ${MediaQueryMaxWidth.ExtraSmallMax})`;
53
- }
54
- public static get ExtraSmallAbove() {
55
- return `@media only screen and (min-width: ${MediaQueryMaxWidth.ExtraSmallMax})`;
56
- }
57
- public static get MobileBelow() {
58
- return `@media only screen and (max-width: ${MediaQueryMaxWidth.MobileMax})`;
59
- }
60
- public static get MobileAbove() {
61
- return `@media only screen and (min-width: ${MediaQueryMaxWidth.MobileMax})`;
62
- }
63
- public static get TabletBelow() {
64
- return `@media only screen and (max-width: ${MediaQueryMaxWidth.TabletMax})`;
65
- }
66
- public static get TabletAbove() {
67
- return `@media only screen and (min-width: ${MediaQueryMaxWidth.TabletMax})`;
68
- }
69
- public static get DesktopBelow() {
70
- return `@media only screen and (max-width: ${MediaQueryMaxWidth.DesktopMax})`;
71
- }
72
- public static get DesktopAbove() {
73
- return `@media only screen and (min-width: ${MediaQueryMaxWidth.DesktopMax})`;
74
- }
75
- }
76
-
77
- export enum MediaQueryDirection {
78
- Below,
79
- Above,
80
- }
81
- export function adjustedMediaQueryRange(
82
- direction: MediaQueryDirection,
83
- mediaQueryWidth: string,
84
- adjustWidth: number
85
- ): string {
86
- const adjustedWidth = Number.parseInt(mediaQueryWidth) + adjustWidth;
87
- if (direction === MediaQueryDirection.Below) {
88
- return `@media only screen and (max-width: ${adjustedWidth}px)`;
89
- } else {
90
- // if (direction === MediaQueryRangeDirection.Above) {
91
- return `@media only screen and (min-width: ${adjustedWidth}px)`;
92
- }
93
- }
1
+ // export enum MediaQuery {
2
+ // ExtraSmall = "@media only screen and (max-width: 480px)",
3
+ // Mobile = "@media only screen and (min-width: 481px) and (max-width: 767px)",
4
+ // Tablet = "@media only screen and (min-width: 768px) and (max-width: 991px)",
5
+ // Desktop = "@media only screen and (min-width: 992px) and (max-width: 1399px)",
6
+ // ExtraLarge = "@media only screen and (min-width: 1400px)",
7
+ // }
8
+
9
+ /*
10
+ --> Bootstrap – 576px, 768px, 992px, 1200px, 1400px
11
+ Tailwind - 640px, 768px, 1024px, 1280px, 1536px
12
+ Foundation: <640px, ≥640px, ≥1200px
13
+ Bulma: <769px, ≥769px, ≥1024px, ≥1216px, and ≥1408px
14
+ Semantic UI: <768px, ≥768px, ≥992px, ≥1400px, ≥1920px
15
+ Primer: <544px, ≥544px, ≥768px, ≥1012px, ≥1280px
16
+ UIKit: <479px, ≥480px, ≥768px, ≥960px, ≥1200px
17
+ */
18
+
19
+ export class MediaQueryMaxWidth {
20
+ private static _ExtraSmall = '480px';
21
+ private static _Mobile = '767px'; // Grid: col-1, 12
22
+ private static _Tablet = '991px'; // Grid: col-1-md, 12-md
23
+ private static _Desktop = '1399px'; // Grid: col-1-lg, 12-lg
24
+ public static get ExtraSmallMax() {
25
+ return MediaQueryMaxWidth._ExtraSmall;
26
+ }
27
+ public static get MobileMax() {
28
+ return MediaQueryMaxWidth._Mobile;
29
+ }
30
+ public static get TabletMax() {
31
+ return MediaQueryMaxWidth._Tablet;
32
+ }
33
+ public static get DesktopMax() {
34
+ return MediaQueryMaxWidth._Desktop;
35
+ }
36
+
37
+ public static set ExtraSmallMax(value: string) {
38
+ MediaQueryMaxWidth._ExtraSmall = value;
39
+ }
40
+ public static set MobileMax(value: string) {
41
+ MediaQueryMaxWidth._Mobile = value;
42
+ }
43
+ public static set TabletMax(value: string) {
44
+ MediaQueryMaxWidth._Tablet = value;
45
+ }
46
+ public static set DesktopMax(value: string) {
47
+ MediaQueryMaxWidth._Desktop = value;
48
+ }
49
+ }
50
+ export class MediaQueryRange {
51
+ public static get ExtraSmallBelow() {
52
+ return `@media only screen and (max-width: ${MediaQueryMaxWidth.ExtraSmallMax})`;
53
+ }
54
+ public static get ExtraSmallAbove() {
55
+ return `@media only screen and (min-width: ${MediaQueryMaxWidth.ExtraSmallMax})`;
56
+ }
57
+ public static get MobileBelow() {
58
+ return `@media only screen and (max-width: ${MediaQueryMaxWidth.MobileMax})`;
59
+ }
60
+ public static get MobileAbove() {
61
+ return `@media only screen and (min-width: ${MediaQueryMaxWidth.MobileMax})`;
62
+ }
63
+ public static get TabletBelow() {
64
+ return `@media only screen and (max-width: ${MediaQueryMaxWidth.TabletMax})`;
65
+ }
66
+ public static get TabletAbove() {
67
+ return `@media only screen and (min-width: ${MediaQueryMaxWidth.TabletMax})`;
68
+ }
69
+ public static get DesktopBelow() {
70
+ return `@media only screen and (max-width: ${MediaQueryMaxWidth.DesktopMax})`;
71
+ }
72
+ public static get DesktopAbove() {
73
+ return `@media only screen and (min-width: ${MediaQueryMaxWidth.DesktopMax})`;
74
+ }
75
+ }
76
+
77
+ export enum MediaQueryDirection {
78
+ Below,
79
+ Above,
80
+ }
81
+ export function adjustedMediaQueryRange(
82
+ direction: MediaQueryDirection,
83
+ mediaQueryWidth: string,
84
+ adjustWidth: number
85
+ ): string {
86
+ const adjustedWidth = Number.parseInt(mediaQueryWidth) + adjustWidth;
87
+ if (direction === MediaQueryDirection.Below) {
88
+ return `@media only screen and (max-width: ${adjustedWidth}px)`;
89
+ } else {
90
+ // if (direction === MediaQueryRangeDirection.Above) {
91
+ return `@media only screen and (min-width: ${adjustedWidth}px)`;
92
+ }
93
+ }
@@ -1,57 +1,57 @@
1
- import { ThemeProps } from "lupine.web";
2
-
3
- export const sharedThemes: ThemeProps = {
4
- // z-index
5
- '--layer-inside': '100', // for inside orders
6
- '--layer-cover': '200',
7
- '--layer-header-footer': '300',
8
- '--layer-sidebar': '400',
9
- '--layer-sidebar-sub': '410',
10
- '--layer-slider': '500', // screen slider
11
- '--layer-modal': '600',
12
- '--layer-modal-over': '610',
13
- '--layer-float-window': '700',
14
- '--layer-actionsheet-window': '710',
15
- '--layer-menu': '800', // popup menu
16
- '--layer-menu-sub': '810',
17
- '--layer-notice': '900', // notice, loading, toast
18
- '--layer-tooltip': '2000',
19
- '--layer-dragged-item': '2100',
20
- '--layer-guide': '2500', // learning guide
21
-
22
- '--font-size-base': '16px',
23
- '--font-weight-base': '', //'400',
24
- '--font-family-base': 'SimSun, "Microsoft YaHei", Helvetica, Arial, sans-serif',
25
- '--line-height-base': '1.1',
26
-
27
- '--font-size-h1-l': '2.5rem', //40px
28
- '--font-size-h1': '2rem', //32px
29
- '--font-size-h2': '1.5rem', //24px
30
- '--font-size-h3': '1.17rem', //18.72px
31
- '--font-size-h3-5': '1.08rem', //17.28px
32
- '--font-size-h4': '1rem', //16px
33
- '--font-size-h4-5': '.91rem', //14.56px
34
- '--font-size-h5': '.83rem', //13.28px
35
- '--font-size-h6': '.67rem', //10.72px
36
- '--font-size-h6-s': '.55rem', //9.28px
37
- '--font-size-title': 'var(--font-size-h2)',
38
- '--font-size-subtitle': 'var(--font-size-h3-5)',
39
- '--font-size-paragraph': 'var(--font-size-h4)',
40
- '--font-size-paragraph-s': 'var(--font-size-h5)',
41
-
42
- '--input-height': '2.2rem',
43
- '--input-padding': '.3rem .6rem',
44
- '--button-height': '2.1rem',
45
- '--button-padding': '.3rem .9rem',
46
-
47
- // space for margin, padding
48
- '--space-ss': '.15rem',
49
- '--space-s': '.25rem',
50
- '--space-m': '.5rem',
51
- '--space-l': '1rem',
52
- '--space-ll': '2rem',
53
-
54
- '--border-radius-s': '2px',
55
- '--border-radius-m': '4px',
56
- '--border-radius-l': '8px',
57
- };
1
+ import { ThemeProps } from 'lupine.web';
2
+
3
+ export const sharedThemes: ThemeProps = {
4
+ // z-index
5
+ '--layer-inside': '100', // for inside orders
6
+ '--layer-cover': '200',
7
+ '--layer-header-footer': '300',
8
+ '--layer-sidebar': '400',
9
+ '--layer-sidebar-sub': '410',
10
+ '--layer-slider': '500', // screen slider
11
+ '--layer-modal': '600',
12
+ '--layer-modal-over': '610',
13
+ '--layer-float-window': '700',
14
+ '--layer-actionsheet-window': '710',
15
+ '--layer-menu': '800', // popup menu
16
+ '--layer-menu-sub': '810',
17
+ '--layer-notice': '900', // notice, loading, toast
18
+ '--layer-tooltip': '2000',
19
+ '--layer-dragged-item': '2100',
20
+ '--layer-guide': '2500', // learning guide
21
+
22
+ '--font-size-base': '16px',
23
+ '--font-weight-base': '', //'400',
24
+ '--font-family-base': 'SimSun, "Microsoft YaHei", Helvetica, Arial, sans-serif',
25
+ '--line-height-base': '1.1',
26
+
27
+ '--font-size-h1-l': '2.5rem', //40px
28
+ '--font-size-h1': '2rem', //32px
29
+ '--font-size-h2': '1.5rem', //24px
30
+ '--font-size-h3': '1.17rem', //18.72px
31
+ '--font-size-h3-5': '1.08rem', //17.28px
32
+ '--font-size-h4': '1rem', //16px
33
+ '--font-size-h4-5': '.91rem', //14.56px
34
+ '--font-size-h5': '.83rem', //13.28px
35
+ '--font-size-h6': '.67rem', //10.72px
36
+ '--font-size-h6-s': '.55rem', //9.28px
37
+ '--font-size-title': 'var(--font-size-h2)',
38
+ '--font-size-subtitle': 'var(--font-size-h3-5)',
39
+ '--font-size-paragraph': 'var(--font-size-h4)',
40
+ '--font-size-paragraph-s': 'var(--font-size-h5)',
41
+
42
+ '--input-height': '2.2rem',
43
+ '--input-padding': '.3rem .6rem',
44
+ '--button-height': '2.1rem',
45
+ '--button-padding': '.3rem .9rem',
46
+
47
+ // space for margin, padding
48
+ '--space-ss': '.15rem',
49
+ '--space-s': '.25rem',
50
+ '--space-m': '.5rem',
51
+ '--space-l': '1rem',
52
+ '--space-ll': '2rem',
53
+
54
+ '--border-radius-s': '2px',
55
+ '--border-radius-m': '4px',
56
+ '--border-radius-l': '8px',
57
+ };