@latte-macchiat-io/latte-vanilla-components 0.0.222 → 0.0.224
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/package.json
CHANGED
@@ -4,13 +4,15 @@ import { columnsRecipe, ColumnsVariants } from './styles.css';
|
|
4
4
|
|
5
5
|
export type ColumnsProps = React.HTMLAttributes<HTMLDivElement> &
|
6
6
|
ColumnsVariants & {
|
7
|
-
columns: number[];
|
7
|
+
columns: number[];
|
8
8
|
children: React.ReactNode;
|
9
9
|
};
|
10
10
|
|
11
11
|
export const Columns = ({ align, vAlign, columns, children, className }: ColumnsProps) => {
|
12
|
+
const columnsValue = columns.map((c) => `${c}fr`).join(' ');
|
13
|
+
|
12
14
|
return (
|
13
|
-
<div className={clsx(columnsRecipe({ align, vAlign }), className)} style={{ ['--columns' as never]:
|
15
|
+
<div className={clsx(columnsRecipe({ align, vAlign }), className)} style={{ ['--columns' as never]: columnsValue }}>
|
14
16
|
{children}
|
15
17
|
</div>
|
16
18
|
);
|
@@ -14,6 +14,7 @@ import {
|
|
14
14
|
videoRecipe,
|
15
15
|
type VideoVariants,
|
16
16
|
} from './styles.css';
|
17
|
+
import { Icon } from '../Icon';
|
17
18
|
|
18
19
|
export type VideoProps = React.HTMLAttributes<HTMLDivElement> &
|
19
20
|
VideoVariants & {
|
@@ -92,15 +93,27 @@ export const Video = ({
|
|
92
93
|
)}
|
93
94
|
|
94
95
|
{!hidePlayButton && !isAutoPlay && (
|
95
|
-
<button className={playButton} data-playing={isPlaying} onClick={playVideo} aria-label="Play video" type="button"
|
96
|
+
<button className={playButton} data-playing={isPlaying} onClick={playVideo} aria-label="Play video" type="button">
|
97
|
+
<Icon icon="play" />
|
98
|
+
</button>
|
96
99
|
)}
|
97
100
|
|
98
|
-
{isPlayingFullScreen &&
|
101
|
+
{isPlayingFullScreen && (
|
102
|
+
<button className={closeButton} onClick={closeVideo} aria-label="Close video" type="button">
|
103
|
+
<Icon icon="close" />
|
104
|
+
</button>
|
105
|
+
)}
|
99
106
|
|
100
|
-
{isPlaying && showControls &&
|
107
|
+
{isPlaying && showControls && (
|
108
|
+
<button className={pauseButton} onClick={pauseVideo} aria-label="Pause video" type="button">
|
109
|
+
<Icon icon="pause" />
|
110
|
+
</button>
|
111
|
+
)}
|
101
112
|
|
102
113
|
{showControls && (
|
103
|
-
<button className={soundButton} onClick={toggleMutedVideo} aria-label={isMuted ? 'Unmute video' : 'Mute video'} type="button"
|
114
|
+
<button className={soundButton} onClick={toggleMutedVideo} aria-label={isMuted ? 'Unmute video' : 'Mute video'} type="button">
|
115
|
+
{isMuted ? <Icon icon="volumeUp" /> : <Icon icon="volumeMute" />}
|
116
|
+
</button>
|
104
117
|
)}
|
105
118
|
</div>
|
106
119
|
);
|