@wistia/ui 0.6.12 → 0.6.13
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 +12 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +29 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2138,12 +2138,16 @@ type PopoverProps = ContentProps & PopoverControlProps & {
|
|
|
2138
2138
|
* An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
|
|
2139
2139
|
* */
|
|
2140
2140
|
trigger: JSX.Element;
|
|
2141
|
+
/**
|
|
2142
|
+
* If true, the popover will use the unstyled Content component instead of StyledContent
|
|
2143
|
+
*/
|
|
2144
|
+
unstyled?: boolean;
|
|
2141
2145
|
};
|
|
2142
2146
|
/**
|
|
2143
2147
|
* Displays rich content in a portal, triggered by a button.
|
|
2144
2148
|
*/
|
|
2145
2149
|
declare const Popover: {
|
|
2146
|
-
({ children, trigger, isOpen, hideCloseButton, onOpenChange, ...props }: PopoverProps): JSX.Element;
|
|
2150
|
+
({ children, trigger, isOpen, hideCloseButton, onOpenChange, unstyled, ...props }: PopoverProps): JSX.Element;
|
|
2147
2151
|
displayName: string;
|
|
2148
2152
|
};
|
|
2149
2153
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2138,12 +2138,16 @@ type PopoverProps = ContentProps & PopoverControlProps & {
|
|
|
2138
2138
|
* An interactive element. Most commonly a [Button](?path=/docs/components-button--docs) or [IconButton]([Button](?path=/docs/components-iconbutton--docs)).
|
|
2139
2139
|
* */
|
|
2140
2140
|
trigger: JSX.Element;
|
|
2141
|
+
/**
|
|
2142
|
+
* If true, the popover will use the unstyled Content component instead of StyledContent
|
|
2143
|
+
*/
|
|
2144
|
+
unstyled?: boolean;
|
|
2141
2145
|
};
|
|
2142
2146
|
/**
|
|
2143
2147
|
* Displays rich content in a portal, triggered by a button.
|
|
2144
2148
|
*/
|
|
2145
2149
|
declare const Popover: {
|
|
2146
|
-
({ children, trigger, isOpen, hideCloseButton, onOpenChange, ...props }: PopoverProps): JSX.Element;
|
|
2150
|
+
({ children, trigger, isOpen, hideCloseButton, onOpenChange, unstyled, ...props }: PopoverProps): JSX.Element;
|
|
2147
2151
|
displayName: string;
|
|
2148
2152
|
};
|
|
2149
2153
|
|
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.13
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9939,8 +9939,8 @@ var Modal = forwardRef17(
|
|
|
9939
9939
|
Modal.displayName = "Modal";
|
|
9940
9940
|
|
|
9941
9941
|
// src/components/Popover/Popover.tsx
|
|
9942
|
-
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close
|
|
9943
|
-
import styled46 from "styled-components";
|
|
9942
|
+
import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close } from "@radix-ui/react-popover";
|
|
9943
|
+
import styled46, { css as css25 } from "styled-components";
|
|
9944
9944
|
|
|
9945
9945
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
9946
9946
|
import { isNotNil as isNotNil18 } from "@wistia/type-guards";
|
|
@@ -9951,12 +9951,14 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
9951
9951
|
// src/components/Popover/Popover.tsx
|
|
9952
9952
|
import { jsx as jsx238, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9953
9953
|
var StyledContent2 = styled46(Content2)`
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9954
|
+
${({ $unstyled }) => !$unstyled && css25`
|
|
9955
|
+
border-radius: var(--wui-border-radius-02);
|
|
9956
|
+
padding: var(--wui-space-04);
|
|
9957
|
+
max-width: 320px;
|
|
9958
|
+
background-color: var(--wui-color-bg-surface);
|
|
9959
|
+
box-shadow: var(--wui-elevation-01);
|
|
9960
|
+
border: 1px solid var(--wui-color-border);
|
|
9961
|
+
`}
|
|
9960
9962
|
|
|
9961
9963
|
[data-wui-popover-close] {
|
|
9962
9964
|
position: absolute;
|
|
@@ -9964,16 +9966,13 @@ var StyledContent2 = styled46(Content2)`
|
|
|
9964
9966
|
right: var(--wui-space-02);
|
|
9965
9967
|
}
|
|
9966
9968
|
`;
|
|
9967
|
-
var StyledArrow = styled46(Arrow)`
|
|
9968
|
-
fill: white;
|
|
9969
|
-
display: none;
|
|
9970
|
-
`;
|
|
9971
9969
|
var Popover = ({
|
|
9972
9970
|
children,
|
|
9973
9971
|
trigger,
|
|
9974
9972
|
isOpen = false,
|
|
9975
9973
|
hideCloseButton = false,
|
|
9976
9974
|
onOpenChange,
|
|
9975
|
+
unstyled = false,
|
|
9977
9976
|
...props
|
|
9978
9977
|
}) => {
|
|
9979
9978
|
return /* @__PURE__ */ jsxs29(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
@@ -9981,10 +9980,10 @@ var Popover = ({
|
|
|
9981
9980
|
/* @__PURE__ */ jsx238(Portal, { children: /* @__PURE__ */ jsxs29(
|
|
9982
9981
|
StyledContent2,
|
|
9983
9982
|
{
|
|
9984
|
-
sideOffset:
|
|
9983
|
+
sideOffset: 8,
|
|
9985
9984
|
...props,
|
|
9985
|
+
$unstyled: unstyled,
|
|
9986
9986
|
children: [
|
|
9987
|
-
/* @__PURE__ */ jsx238(StyledArrow, {}),
|
|
9988
9987
|
!hideCloseButton && /* @__PURE__ */ jsx238(Close, { asChild: true, children: /* @__PURE__ */ jsx238(
|
|
9989
9988
|
IconButton,
|
|
9990
9989
|
{
|
|
@@ -10004,7 +10003,7 @@ Popover.displayName = "Popover";
|
|
|
10004
10003
|
|
|
10005
10004
|
// src/components/Radio/Radio.tsx
|
|
10006
10005
|
import { forwardRef as forwardRef18, useId as useId3 } from "react";
|
|
10007
|
-
import styled47, { css as
|
|
10006
|
+
import styled47, { css as css26 } from "styled-components";
|
|
10008
10007
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
10009
10008
|
import { jsx as jsx239, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10010
10009
|
var StyledLabelWrapper2 = styled47.div`
|
|
@@ -10038,11 +10037,11 @@ var StyledRadio = styled47.input`
|
|
|
10038
10037
|
transform: scale(1);
|
|
10039
10038
|
}
|
|
10040
10039
|
`;
|
|
10041
|
-
var disabledStyle2 =
|
|
10040
|
+
var disabledStyle2 = css26`
|
|
10042
10041
|
cursor: not-allowed;
|
|
10043
10042
|
opacity: 0.5;
|
|
10044
10043
|
`;
|
|
10045
|
-
var errorStyle =
|
|
10044
|
+
var errorStyle = css26`
|
|
10046
10045
|
/* TODO Lamp to design error state */
|
|
10047
10046
|
&:hover,
|
|
10048
10047
|
&:focus,
|
|
@@ -10050,7 +10049,7 @@ var errorStyle = css25`
|
|
|
10050
10049
|
border-color: transparent !important;
|
|
10051
10050
|
}
|
|
10052
10051
|
`;
|
|
10053
|
-
var defaultHoverStyle =
|
|
10052
|
+
var defaultHoverStyle = css26`
|
|
10054
10053
|
/* TODO Lamp to design hover state */
|
|
10055
10054
|
cursor: pointer;
|
|
10056
10055
|
`;
|
|
@@ -10134,7 +10133,7 @@ Radio.displayName = "Radio";
|
|
|
10134
10133
|
|
|
10135
10134
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10136
10135
|
import { forwardRef as forwardRef19 } from "react";
|
|
10137
|
-
import styled49, { css as
|
|
10136
|
+
import styled49, { css as css27 } from "styled-components";
|
|
10138
10137
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
10139
10138
|
import { isNil as isNil13 } from "@wistia/type-guards";
|
|
10140
10139
|
|
|
@@ -10225,7 +10224,7 @@ var SelectedItemIndicator = () => {
|
|
|
10225
10224
|
|
|
10226
10225
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10227
10226
|
import { jsx as jsx242, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10228
|
-
var segmentedControlStyles =
|
|
10227
|
+
var segmentedControlStyles = css27`
|
|
10229
10228
|
display: inline-flex;
|
|
10230
10229
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10231
10230
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10274,7 +10273,7 @@ SegmentedControl.displayName = "SegmentedControl";
|
|
|
10274
10273
|
|
|
10275
10274
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10276
10275
|
import { forwardRef as forwardRef20, useEffect as useEffect5, useRef as useRef9 } from "react";
|
|
10277
|
-
import styled50, { css as
|
|
10276
|
+
import styled50, { css as css28 } from "styled-components";
|
|
10278
10277
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
10279
10278
|
import { isNotNil as isNotNil20 } from "@wistia/type-guards";
|
|
10280
10279
|
|
|
@@ -10294,7 +10293,7 @@ var mergeRefs = (refs) => (value) => {
|
|
|
10294
10293
|
|
|
10295
10294
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10296
10295
|
import { jsxs as jsxs32 } from "react/jsx-runtime";
|
|
10297
|
-
var segmentedControlItemStyles =
|
|
10296
|
+
var segmentedControlItemStyles = css28`
|
|
10298
10297
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10299
10298
|
align-items: center;
|
|
10300
10299
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10617,7 +10616,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
10617
10616
|
|
|
10618
10617
|
// src/components/Table/Table.tsx
|
|
10619
10618
|
import { useMemo as useMemo10 } from "react";
|
|
10620
|
-
import styled54, { css as
|
|
10619
|
+
import styled54, { css as css29 } from "styled-components";
|
|
10621
10620
|
|
|
10622
10621
|
// src/components/Table/TableContext.tsx
|
|
10623
10622
|
import React from "react";
|
|
@@ -10629,7 +10628,7 @@ var StyledTable = styled54.table`
|
|
|
10629
10628
|
width: 100%;
|
|
10630
10629
|
border-collapse: collapse;
|
|
10631
10630
|
|
|
10632
|
-
${({ $striped }) => $striped &&
|
|
10631
|
+
${({ $striped }) => $striped && css29`
|
|
10633
10632
|
tbody tr:nth-child(even) {
|
|
10634
10633
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10635
10634
|
}
|
|
@@ -10668,9 +10667,9 @@ var TableBody = ({ children, ...props }) => {
|
|
|
10668
10667
|
|
|
10669
10668
|
// src/components/Table/TableCell.tsx
|
|
10670
10669
|
import { useContext as useContext7 } from "react";
|
|
10671
|
-
import styled56, { css as
|
|
10670
|
+
import styled56, { css as css30 } from "styled-components";
|
|
10672
10671
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
10673
|
-
var sharedStyles =
|
|
10672
|
+
var sharedStyles = css30`
|
|
10674
10673
|
color: var(--wui-color-text);
|
|
10675
10674
|
padding: var(--wui-space-02);
|
|
10676
10675
|
text-align: left;
|
|
@@ -11186,7 +11185,7 @@ var Tag = forwardRef26(
|
|
|
11186
11185
|
Tag.displayName = "Tag";
|
|
11187
11186
|
|
|
11188
11187
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11189
|
-
import styled66, { css as
|
|
11188
|
+
import styled66, { css as css31 } from "styled-components";
|
|
11190
11189
|
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
11191
11190
|
import { jsx as jsx258, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11192
11191
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
@@ -11244,12 +11243,12 @@ var WistiaLogoComponent = styled66.svg`
|
|
|
11244
11243
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11245
11244
|
if ($opticallyCentered) {
|
|
11246
11245
|
if ($iconOnly) {
|
|
11247
|
-
return
|
|
11246
|
+
return css31`
|
|
11248
11247
|
aspect-ratio: 1;
|
|
11249
11248
|
padding: 11.85% 3.12% 13.91%;
|
|
11250
11249
|
`;
|
|
11251
11250
|
}
|
|
11252
|
-
return
|
|
11251
|
+
return css31`
|
|
11253
11252
|
aspect-ratio: 127 / 32;
|
|
11254
11253
|
`;
|
|
11255
11254
|
}
|