@wistia/ui 0.6.16 → 0.6.17
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/dist/index.cjs +39 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +19 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, MutableRefObject, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
import react__default, { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, MutableRefObject, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from 'react';
|
|
4
4
|
export * from 'use-file-picker/types';
|
|
5
5
|
export { useFilePicker, useImperativeFilePicker } from 'use-file-picker';
|
|
6
6
|
export { FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, ImageDimensionsValidator, PersistentFileAmountLimitValidator } from 'use-file-picker/validators';
|
|
@@ -2525,7 +2525,7 @@ type TableProps = ComponentPropsWithoutRef<'table'> & {
|
|
|
2525
2525
|
*/
|
|
2526
2526
|
declare const Table: ({ children, striped, divided, ...props }: TableProps) => JSX.Element;
|
|
2527
2527
|
|
|
2528
|
-
type TableRowProps =
|
|
2528
|
+
type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
2529
2529
|
children?: ReactNode;
|
|
2530
2530
|
};
|
|
2531
2531
|
declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, MutableRefObject, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
+
import react__default, { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, MutableRefObject, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from 'react';
|
|
4
4
|
export * from 'use-file-picker/types';
|
|
5
5
|
export { useFilePicker, useImperativeFilePicker } from 'use-file-picker';
|
|
6
6
|
export { FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, ImageDimensionsValidator, PersistentFileAmountLimitValidator } from 'use-file-picker/validators';
|
|
@@ -2525,7 +2525,7 @@ type TableProps = ComponentPropsWithoutRef<'table'> & {
|
|
|
2525
2525
|
*/
|
|
2526
2526
|
declare const Table: ({ children, striped, divided, ...props }: TableProps) => JSX.Element;
|
|
2527
2527
|
|
|
2528
|
-
type TableRowProps =
|
|
2528
|
+
type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
2529
2529
|
children?: ReactNode;
|
|
2530
2530
|
};
|
|
2531
2531
|
declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.17
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9771,12 +9771,11 @@ var Header = styled42.header`
|
|
|
9771
9771
|
display: flex;
|
|
9772
9772
|
order: 1;
|
|
9773
9773
|
gap: var(--wui-space-01);
|
|
9774
|
-
|
|
9775
|
-
justify-content: space-between;
|
|
9774
|
+
justify-content: ${({ $hideTitle }) => $hideTitle ? "flex-end" : "space-between"}; /* ensure ModalCloseButton is right-aligned */
|
|
9776
9775
|
|
|
9777
9776
|
/* DialogTitle creates an h2 element which inherits some margin */
|
|
9778
9777
|
h2 {
|
|
9779
|
-
margin
|
|
9778
|
+
margin: 0 0 var(--wui-space-03);
|
|
9780
9779
|
}
|
|
9781
9780
|
`;
|
|
9782
9781
|
var Title = styled42(DialogTitle)`
|
|
@@ -9791,7 +9790,7 @@ var ModalHeader = ({
|
|
|
9791
9790
|
hideCloseButton
|
|
9792
9791
|
}) => {
|
|
9793
9792
|
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx234(ScreenReaderOnly, { children: /* @__PURE__ */ jsx234(Title, { children: title }) }) : /* @__PURE__ */ jsx234(Title, { children: title });
|
|
9794
|
-
return /* @__PURE__ */ jsxs27(Header, { children: [
|
|
9793
|
+
return /* @__PURE__ */ jsxs27(Header, { $hideTitle: hideTitle, children: [
|
|
9795
9794
|
TitleComponent,
|
|
9796
9795
|
hideCloseButton ? null : /* @__PURE__ */ jsx234(ModalCloseButton, {})
|
|
9797
9796
|
] });
|
|
@@ -10757,14 +10756,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
10757
10756
|
};
|
|
10758
10757
|
|
|
10759
10758
|
// src/components/Table/Table.tsx
|
|
10760
|
-
import { useMemo as useMemo10 } from "react";
|
|
10761
10759
|
import styled55, { css as css30 } from "styled-components";
|
|
10762
|
-
|
|
10763
|
-
// src/components/Table/TableContext.tsx
|
|
10764
|
-
import React from "react";
|
|
10765
|
-
var TableContext = React.createContext({ divided: false });
|
|
10766
|
-
|
|
10767
|
-
// src/components/Table/Table.tsx
|
|
10768
10760
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
10769
10761
|
var StyledTable = styled55.table`
|
|
10770
10762
|
width: 100%;
|
|
@@ -10775,6 +10767,12 @@ var StyledTable = styled55.table`
|
|
|
10775
10767
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10776
10768
|
}
|
|
10777
10769
|
`}
|
|
10770
|
+
|
|
10771
|
+
${({ $divided }) => $divided && css30`
|
|
10772
|
+
tr {
|
|
10773
|
+
border-bottom: 1px solid var(--wui-color-border);
|
|
10774
|
+
}
|
|
10775
|
+
`}
|
|
10778
10776
|
`;
|
|
10779
10777
|
var Table = ({
|
|
10780
10778
|
children,
|
|
@@ -10782,15 +10780,15 @@ var Table = ({
|
|
|
10782
10780
|
divided = false,
|
|
10783
10781
|
...props
|
|
10784
10782
|
}) => {
|
|
10785
|
-
|
|
10786
|
-
return /* @__PURE__ */ jsx247(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx247(
|
|
10783
|
+
return /* @__PURE__ */ jsx247(
|
|
10787
10784
|
StyledTable,
|
|
10788
10785
|
{
|
|
10786
|
+
$divided: divided,
|
|
10789
10787
|
$striped: striped,
|
|
10790
10788
|
...props,
|
|
10791
10789
|
children
|
|
10792
10790
|
}
|
|
10793
|
-
)
|
|
10791
|
+
);
|
|
10794
10792
|
};
|
|
10795
10793
|
|
|
10796
10794
|
// src/components/Table/TableBody.tsx
|
|
@@ -10853,22 +10851,11 @@ var TableHead = ({ children, ...props }) => {
|
|
|
10853
10851
|
};
|
|
10854
10852
|
|
|
10855
10853
|
// src/components/Table/TableRow.tsx
|
|
10856
|
-
import { useContext as useContext8 } from "react";
|
|
10857
10854
|
import styled60 from "styled-components";
|
|
10858
10855
|
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
10859
|
-
var StyledTr = styled60.tr
|
|
10860
|
-
${({ $divided }) => $divided && `border-bottom: 1px solid var(--wui-color-border);`}
|
|
10861
|
-
`;
|
|
10856
|
+
var StyledTr = styled60.tr``;
|
|
10862
10857
|
var TableRow = ({ children, ...props }) => {
|
|
10863
|
-
|
|
10864
|
-
return /* @__PURE__ */ jsx252(
|
|
10865
|
-
StyledTr,
|
|
10866
|
-
{
|
|
10867
|
-
$divided: divided,
|
|
10868
|
-
...props,
|
|
10869
|
-
children
|
|
10870
|
-
}
|
|
10871
|
-
);
|
|
10858
|
+
return /* @__PURE__ */ jsx252(StyledTr, { ...props, children });
|
|
10872
10859
|
};
|
|
10873
10860
|
|
|
10874
10861
|
// src/components/Tabs/Tabs.tsx
|
|
@@ -10933,11 +10920,11 @@ import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
|
10933
10920
|
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
10934
10921
|
|
|
10935
10922
|
// src/components/Tabs/useTabsValue.tsx
|
|
10936
|
-
import { createContext as createContext9, useContext as
|
|
10923
|
+
import { createContext as createContext9, useContext as useContext8 } from "react";
|
|
10937
10924
|
var TabsValueContext = createContext9(null);
|
|
10938
10925
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
10939
10926
|
var useTabsValue = () => {
|
|
10940
|
-
const context =
|
|
10927
|
+
const context = useContext8(TabsValueContext);
|
|
10941
10928
|
if (context === null) {
|
|
10942
10929
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
10943
10930
|
}
|
|
@@ -11025,7 +11012,7 @@ var extractTabItems = (children) => {
|
|
|
11025
11012
|
};
|
|
11026
11013
|
|
|
11027
11014
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11028
|
-
import { useMemo as
|
|
11015
|
+
import { useMemo as useMemo10 } from "react";
|
|
11029
11016
|
import styled64 from "styled-components";
|
|
11030
11017
|
import { jsx as jsx255 } from "react/jsx-runtime";
|
|
11031
11018
|
var TabsSelectedItemIndicatorDiv = styled64(SelectedItemIndicatorDiv)`
|
|
@@ -11036,7 +11023,7 @@ var TabsSelectedItemIndicatorDiv = styled64(SelectedItemIndicatorDiv)`
|
|
|
11036
11023
|
var SelectedItemIndicator2 = () => {
|
|
11037
11024
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11038
11025
|
const selectedValue = useTabsValue();
|
|
11039
|
-
const selectedItemIndicatorStyle =
|
|
11026
|
+
const selectedItemIndicatorStyle = useMemo10(
|
|
11040
11027
|
() => selectedItemMeasurements != null ? {
|
|
11041
11028
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11042
11029
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|