lupine.components 1.1.13 → 1.1.15

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 (92) 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 -101
  29. package/src/components/mobile-components/mobile-header-with-back.tsx +127 -117
  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 +285 -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 -27
  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
@@ -1,138 +1,147 @@
1
- import { CssProps, RefProps } from 'lupine.web';
2
-
3
- export enum ButtonPushAnimationSize {
4
- SmallSmall = 'button-ss',
5
- Small = 'button-s',
6
- Medium = 'button-m',
7
- Large = 'button-l',
8
- LargeLarge = 'button-ll',
9
- }
10
- export type ButtonPushAnimationHookProps = {
11
- setEnabled?: (enabled: boolean) => void;
12
- getEnabled?: () => boolean;
13
- };
14
- export type ButtonPushAnimationProps = {
15
- text: string;
16
- size: ButtonPushAnimationSize;
17
- disabled?: boolean;
18
- onClick?: () => void;
19
- hook?: ButtonPushAnimationHookProps;
20
- class?: string;
21
- css?: CssProps;
22
- };
23
- export const ButtonPushAnimation = (props: ButtonPushAnimationProps) => {
24
- let disabled = props.disabled || false;
25
- const onClick = () => {
26
- if (disabled) {
27
- return;
28
- }
29
- if (props.onClick) {
30
- props.onClick();
31
- }
32
- };
33
- if (props.hook) {
34
- props.hook.setEnabled = (enabled: boolean) => {
35
- disabled = !enabled;
36
- ref.current.disabled = disabled;
37
- };
38
- props.hook.getEnabled = () => {
39
- return !disabled;
40
- };
41
- }
42
-
43
- const ref: RefProps = {};
44
- const css: CssProps = {
45
- all: 'unset',
46
- cursor: 'pointer',
47
- '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)',
48
- position: 'relative',
49
- borderRadius: 'var(--border-radius-m)',
50
- backgroundColor: 'rgba(0, 0, 0, 0.75)',
51
- boxShadow: '-0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25), 0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1)',
52
- '.button-outer': {
53
- position: 'relative',
54
- zIndex: 1,
55
- borderRadius: 'inherit',
56
- transition: 'box-shadow 300ms ease',
57
- willChange: 'box-shadow',
58
- boxShadow: '0 0.05em 0.05em -0.01em rgba(5, 5, 5, 1), 0 0.01em 0.01em -0.01em rgba(5, 5, 5, 0.5), 0.15em 0.3em 0.1em -0.01em rgba(5, 5, 5, 0.25)',
59
- },
60
- '.button-inner': {
61
- position: 'relative',
62
- zIndex: 2,
63
- borderRadius: 'inherit',
64
- padding: 'var(--button-padding)',
65
- background: 'linear-gradient(135deg, #ffffff, #eeeeee)',
66
- transition: 'box-shadow 300ms ease, background-image 250ms ease, transform 250ms ease;',
67
- willChange: 'box-shadow, background-image, transform',
68
- overflow: 'clip',
69
- // clipPath: 'inset(0 0 0 0 round 999vw)',
70
- boxShadow: '0 0 0 0 inset rgba(5, 5, 5, 0.1), -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25), 0 0 0 0 inset rgba(5, 5, 5, 0.1), 0 0 0.05em 0.2em inset rgba(255, 255, 255, 0.25), 0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1), 0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25), -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25)',
71
- },
72
- '.button-inner span': {
73
- position: 'relative',
74
- zIndex: 4,
75
- // fontFamily: 'Inter, sans-serif',
76
- letterSpacing: '-0.05em',
77
- // fontWeight: 500,
78
- color: 'rgba(0, 0, 0, 0);',
79
- backgroundImage: 'linear-gradient(135deg, rgba(25, 25, 25, 1), rgba(75, 75, 75, 1))',
80
- backgroundClip: 'text',
81
- transition: 'transform 250ms ease',
82
- display: 'block',
83
- willChange: 'transform',
84
- textShadow: 'rgba(0, 0, 0, 0.1) 0 0 0.1em',
85
- userSelect: 'none',
86
- },
87
- '&.button-ss': {
88
- borderRadius: '2px',
89
- },
90
- '&.button-s': {
91
- borderRadius: '3px',
92
- },
93
- '&.button-l': {
94
- borderRadius: '6px',
95
- },
96
- '&.button-ll': {
97
- borderRadius: '10px',
98
- },
99
- '&.button-ss .button-inner': {
100
- padding: '0.1rem 0.3rem',
101
- fontSize: '0.65rem',
102
- },
103
- '&.button-s .button-inner': {
104
- padding: '0.2rem 0.5rem',
105
- fontSize: '0.85rem',
106
- },
107
- '&.button-l .button-inner': {
108
- padding: '0.4rem 1.2rem',
109
- fontSize: '1.5rem',
110
- },
111
- '&.button-ll .button-inner': {
112
- padding: '0.5rem 1.5rem',
113
- fontSize: '2rem',
114
- },
115
- '&:active .button-outer': {
116
- boxShadow: '0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5), 0 0 0 0 rgba(5, 5, 5, 0.25)',
117
- },
118
- '&:active .button-inner': {
119
- boxShadow: '0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75), -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5), 0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5), 0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15), 0 0 0 0 inset rgba(255, 255, 255, 1), 0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25), -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25)',
120
- },
121
- '&:hover .button-inner': {
122
- transform: 'scale(0.99)',
123
- },
124
- '&:hover .button-inner span': {
125
- transform: 'scale(0.975)',
126
- },
127
- ...props.css,
128
- };
129
- return (
130
- <button ref={ref} css={css} class={['button-push-animation', props.size, props.class].join(' ')} disabled={disabled} onClick={onClick}>
131
- <div class="button-outer">
132
- <div class="button-inner">
133
- <span>{props.text}</span>
134
- </div>
135
- </div>
136
- </button>
137
- );
138
- };
1
+ import { CssProps, RefProps } from 'lupine.web';
2
+
3
+ export enum ButtonPushAnimationSize {
4
+ SmallSmall = 'button-ss',
5
+ Small = 'button-s',
6
+ Medium = 'button-m',
7
+ Large = 'button-l',
8
+ LargeLarge = 'button-ll',
9
+ }
10
+ export type ButtonPushAnimationHookProps = {
11
+ setEnabled?: (enabled: boolean) => void;
12
+ getEnabled?: () => boolean;
13
+ };
14
+ export type ButtonPushAnimationProps = {
15
+ text: string;
16
+ size: ButtonPushAnimationSize;
17
+ disabled?: boolean;
18
+ onClick?: () => void;
19
+ hook?: ButtonPushAnimationHookProps;
20
+ class?: string;
21
+ css?: CssProps;
22
+ };
23
+ export const ButtonPushAnimation = (props: ButtonPushAnimationProps) => {
24
+ let disabled = props.disabled || false;
25
+ const onClick = () => {
26
+ if (disabled) {
27
+ return;
28
+ }
29
+ if (props.onClick) {
30
+ props.onClick();
31
+ }
32
+ };
33
+ if (props.hook) {
34
+ props.hook.setEnabled = (enabled: boolean) => {
35
+ disabled = !enabled;
36
+ ref.current.disabled = disabled;
37
+ };
38
+ props.hook.getEnabled = () => {
39
+ return !disabled;
40
+ };
41
+ }
42
+
43
+ const ref: RefProps = {};
44
+ const css: CssProps = {
45
+ all: 'unset',
46
+ cursor: 'pointer',
47
+ '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)',
48
+ position: 'relative',
49
+ borderRadius: 'var(--border-radius-m)',
50
+ backgroundColor: 'rgba(0, 0, 0, 0.75)',
51
+ boxShadow: '-0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25), 0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1)',
52
+ '.button-outer': {
53
+ position: 'relative',
54
+ zIndex: 1,
55
+ borderRadius: 'inherit',
56
+ transition: 'box-shadow 300ms ease',
57
+ willChange: 'box-shadow',
58
+ boxShadow:
59
+ '0 0.05em 0.05em -0.01em rgba(5, 5, 5, 1), 0 0.01em 0.01em -0.01em rgba(5, 5, 5, 0.5), 0.15em 0.3em 0.1em -0.01em rgba(5, 5, 5, 0.25)',
60
+ },
61
+ '.button-inner': {
62
+ position: 'relative',
63
+ zIndex: 2,
64
+ borderRadius: 'inherit',
65
+ padding: 'var(--button-padding)',
66
+ background: 'linear-gradient(135deg, #ffffff, #eeeeee)',
67
+ transition: 'box-shadow 300ms ease, background-image 250ms ease, transform 250ms ease;',
68
+ willChange: 'box-shadow, background-image, transform',
69
+ overflow: 'clip',
70
+ // clipPath: 'inset(0 0 0 0 round 999vw)',
71
+ boxShadow:
72
+ '0 0 0 0 inset rgba(5, 5, 5, 0.1), -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25), 0 0 0 0 inset rgba(5, 5, 5, 0.1), 0 0 0.05em 0.2em inset rgba(255, 255, 255, 0.25), 0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1), 0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25), -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25)',
73
+ },
74
+ '.button-inner span': {
75
+ position: 'relative',
76
+ zIndex: 4,
77
+ // fontFamily: 'Inter, sans-serif',
78
+ letterSpacing: '-0.05em',
79
+ // fontWeight: 500,
80
+ color: 'rgba(0, 0, 0, 0);',
81
+ backgroundImage: 'linear-gradient(135deg, rgba(25, 25, 25, 1), rgba(75, 75, 75, 1))',
82
+ backgroundClip: 'text',
83
+ transition: 'transform 250ms ease',
84
+ display: 'block',
85
+ willChange: 'transform',
86
+ textShadow: 'rgba(0, 0, 0, 0.1) 0 0 0.1em',
87
+ userSelect: 'none',
88
+ },
89
+ '&.button-ss': {
90
+ borderRadius: '2px',
91
+ },
92
+ '&.button-s': {
93
+ borderRadius: '3px',
94
+ },
95
+ '&.button-l': {
96
+ borderRadius: '6px',
97
+ },
98
+ '&.button-ll': {
99
+ borderRadius: '10px',
100
+ },
101
+ '&.button-ss .button-inner': {
102
+ padding: '0.1rem 0.3rem',
103
+ fontSize: '0.65rem',
104
+ },
105
+ '&.button-s .button-inner': {
106
+ padding: '0.2rem 0.5rem',
107
+ fontSize: '0.85rem',
108
+ },
109
+ '&.button-l .button-inner': {
110
+ padding: '0.4rem 1.2rem',
111
+ fontSize: '1.5rem',
112
+ },
113
+ '&.button-ll .button-inner': {
114
+ padding: '0.5rem 1.5rem',
115
+ fontSize: '2rem',
116
+ },
117
+ '&:active .button-outer': {
118
+ boxShadow: '0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5), 0 0 0 0 rgba(5, 5, 5, 0.25)',
119
+ },
120
+ '&:active .button-inner': {
121
+ boxShadow:
122
+ '0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75), -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5), 0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5), 0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15), 0 0 0 0 inset rgba(255, 255, 255, 1), 0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25), -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25)',
123
+ },
124
+ '&:hover .button-inner': {
125
+ transform: 'scale(0.99)',
126
+ },
127
+ '&:hover .button-inner span': {
128
+ transform: 'scale(0.975)',
129
+ },
130
+ ...props.css,
131
+ };
132
+ return (
133
+ <button
134
+ ref={ref}
135
+ css={css}
136
+ class={['button-push-animation', props.size, props.class].join(' ')}
137
+ disabled={disabled}
138
+ onClick={onClick}
139
+ >
140
+ <div class='button-outer'>
141
+ <div class='button-inner'>
142
+ <span>{props.text}</span>
143
+ </div>
144
+ </div>
145
+ </button>
146
+ );
147
+ };
@@ -1,55 +1,55 @@
1
- import { CssProps, RefProps } from 'lupine.web';
2
-
3
- export enum ButtonSize {
4
- SmallLarge = 'button-ss',
5
- Small = 'button-s',
6
- Medium = 'button-m',
7
- Large = 'button-l',
8
- LargeLarge = 'button-ll',
9
- }
10
- export type ButtonHookProps = {
11
- setEnabled?: (enabled: boolean) => void;
12
- getEnabled?: () => boolean;
13
- };
14
- export type ButtonProps = {
15
- text: string;
16
- size: ButtonSize;
17
- disabled?: boolean;
18
- onClick?: () => void;
19
- hook?: ButtonHookProps;
20
- class?: string;
21
- css?: CssProps;
22
- };
23
- export const Button = (props: ButtonProps) => {
24
- let disabled = props.disabled || false;
25
- const onClick = () => {
26
- if (disabled) {
27
- return;
28
- }
29
- if (props.onClick) {
30
- props.onClick();
31
- }
32
- };
33
- if (props.hook) {
34
- props.hook.setEnabled = (enabled: boolean) => {
35
- disabled = !enabled;
36
- ref.current.disabled = disabled;
37
- };
38
- props.hook.getEnabled = () => {
39
- return !disabled;
40
- };
41
- }
42
-
43
- const ref: RefProps = {};
44
- return (
45
- <button
46
- ref={ref}
47
- class={['button-base', props.size, props.class].join(' ')}
48
- css={props.css}
49
- disabled={disabled}
50
- onClick={onClick}
51
- >
52
- {props.text}
53
- </button>
54
- );
55
- };
1
+ import { CssProps, RefProps } from 'lupine.web';
2
+
3
+ export enum ButtonSize {
4
+ SmallLarge = 'button-ss',
5
+ Small = 'button-s',
6
+ Medium = 'button-m',
7
+ Large = 'button-l',
8
+ LargeLarge = 'button-ll',
9
+ }
10
+ export type ButtonHookProps = {
11
+ setEnabled?: (enabled: boolean) => void;
12
+ getEnabled?: () => boolean;
13
+ };
14
+ export type ButtonProps = {
15
+ text: string;
16
+ size: ButtonSize;
17
+ disabled?: boolean;
18
+ onClick?: () => void;
19
+ hook?: ButtonHookProps;
20
+ class?: string;
21
+ css?: CssProps;
22
+ };
23
+ export const Button = (props: ButtonProps) => {
24
+ let disabled = props.disabled || false;
25
+ const onClick = () => {
26
+ if (disabled) {
27
+ return;
28
+ }
29
+ if (props.onClick) {
30
+ props.onClick();
31
+ }
32
+ };
33
+ if (props.hook) {
34
+ props.hook.setEnabled = (enabled: boolean) => {
35
+ disabled = !enabled;
36
+ ref.current.disabled = disabled;
37
+ };
38
+ props.hook.getEnabled = () => {
39
+ return !disabled;
40
+ };
41
+ }
42
+
43
+ const ref: RefProps = {};
44
+ return (
45
+ <button
46
+ ref={ref}
47
+ class={['button-base', props.size, props.class].join(' ')}
48
+ css={props.css}
49
+ disabled={disabled}
50
+ onClick={onClick}
51
+ >
52
+ {props.text}
53
+ </button>
54
+ );
55
+ };
@@ -1,17 +1,17 @@
1
- import { CssProps } from 'lupine.components';
2
-
3
- export const DesktopFooter = (props: { title: string }) => {
4
- const css: CssProps = {
5
- display: 'flex',
6
- padding: '0 32px 16px',
7
- '.d-footer-cp': {
8
- padding: '1px 15px',
9
- margin: 'auto',
10
- },
11
- };
12
- return (
13
- <div css={css} class='d-footer-box'>
14
- <div class='d-footer-cp'>{props.title}</div>
15
- </div>
16
- );
17
- };
1
+ import { CssProps } from 'lupine.components';
2
+
3
+ export const DesktopFooter = (props: { title: string }) => {
4
+ const css: CssProps = {
5
+ display: 'flex',
6
+ padding: '0 32px 16px',
7
+ '.d-footer-cp': {
8
+ padding: '1px 15px',
9
+ margin: 'auto',
10
+ },
11
+ };
12
+ return (
13
+ <div css={css} class='d-footer-box'>
14
+ <div class='d-footer-cp'>{props.title}</div>
15
+ </div>
16
+ );
17
+ };
@@ -1,52 +1,52 @@
1
- import { CssProps } from 'lupine.components';
2
- import { IconMenuItemProps } from './mobile-components/icon-menu-item-props';
3
-
4
- export const DesktopHeader = (props: { title: string; items: IconMenuItemProps[] }) => {
5
- const css: CssProps = {
6
- display: 'flex',
7
- flexDirection: 'row',
8
- width: '100%',
9
- height: '100%',
10
- '.d-header-title': {
11
- display: 'flex',
12
- flex: '1',
13
- margin: '8px 16px',
14
- textShadow: '-3px -3px 10px white, 3px 3px 10px black',
15
- color: 'darkblue',
16
- fontSize: '22px',
17
- },
18
- '.desktop-menu-bar': {
19
- display: 'flex',
20
- flexDirection: 'row',
21
- width: 'auto',
22
- padding: '4px 16px 0',
23
- '.desktop-menu-item': {
24
- display: 'flex',
25
- padding: '0 8px',
26
- height: 'fit-content',
27
- a: {
28
- textDecoration: 'none',
29
- color: 'var(--sidebar-color)',
30
- i: {
31
- paddingRight: '4px',
32
- },
33
- },
34
- },
35
- },
36
- };
37
- return (
38
- <div css={css} class='desktop-menu-box'>
39
- <div class='flex-1 d-header-title'>{props.title}</div>
40
- <div class='desktop-menu-bar'>
41
- {props.items.map((item) => (
42
- <div class='desktop-menu-item'>
43
- <a href={item.href}>
44
- <i class={`ifc-icon ${item.icon}`}></i>
45
- {item.text}
46
- </a>
47
- </div>
48
- ))}
49
- </div>
50
- </div>
51
- );
52
- };
1
+ import { CssProps } from 'lupine.components';
2
+ import { IconMenuItemProps } from './mobile-components/icon-menu-item-props';
3
+
4
+ export const DesktopHeader = (props: { title: string; items: IconMenuItemProps[] }) => {
5
+ const css: CssProps = {
6
+ display: 'flex',
7
+ flexDirection: 'row',
8
+ width: '100%',
9
+ height: '100%',
10
+ '.d-header-title': {
11
+ display: 'flex',
12
+ flex: '1',
13
+ margin: '8px 16px',
14
+ textShadow: '-3px -3px 10px white, 3px 3px 10px black',
15
+ color: 'darkblue',
16
+ fontSize: '22px',
17
+ },
18
+ '.desktop-menu-bar': {
19
+ display: 'flex',
20
+ flexDirection: 'row',
21
+ width: 'auto',
22
+ padding: '4px 16px 0',
23
+ '.desktop-menu-item': {
24
+ display: 'flex',
25
+ padding: '0 8px',
26
+ height: 'fit-content',
27
+ a: {
28
+ textDecoration: 'none',
29
+ color: 'var(--sidebar-color)',
30
+ i: {
31
+ paddingRight: '4px',
32
+ },
33
+ },
34
+ },
35
+ },
36
+ };
37
+ return (
38
+ <div css={css} class='desktop-menu-box'>
39
+ <div class='flex-1 d-header-title'>{props.title}</div>
40
+ <div class='desktop-menu-bar'>
41
+ {props.items.map((item) => (
42
+ <div class='desktop-menu-item'>
43
+ <a href={item.href}>
44
+ <i class={`ifc-icon ${item.icon}`}></i>
45
+ {item.text}
46
+ </a>
47
+ </div>
48
+ ))}
49
+ </div>
50
+ </div>
51
+ );
52
+ };