@wistia/ui 0.2.0 → 0.3.0
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 +160 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.mjs +156 -83
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -359,6 +359,8 @@ declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
359
359
|
label: string;
|
|
360
360
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
361
361
|
|
|
362
|
+
type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09' | 'space-10' | 'space-11';
|
|
363
|
+
|
|
362
364
|
type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
|
|
363
365
|
type AlignContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'stretch';
|
|
364
366
|
type AlignItemsType = 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
@@ -366,8 +368,8 @@ type AlignSelfType = 'auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start'
|
|
|
366
368
|
type DirectionType = 'column-reverse' | 'column' | 'row-reverse' | 'row';
|
|
367
369
|
type FillType = boolean | 'horizontal' | 'vertical';
|
|
368
370
|
type Gap = {
|
|
369
|
-
column:
|
|
370
|
-
row:
|
|
371
|
+
column: Spacings;
|
|
372
|
+
row: Spacings;
|
|
371
373
|
};
|
|
372
374
|
/**
|
|
373
375
|
* CSS property => Box prop:
|
|
@@ -427,7 +429,7 @@ type BoxProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
427
429
|
/**
|
|
428
430
|
* Specifies the gaps (gutters) between rows and columns
|
|
429
431
|
*/
|
|
430
|
-
gap?: Gap |
|
|
432
|
+
gap?: Gap | Spacings;
|
|
431
433
|
/**
|
|
432
434
|
* Specifies what amount of space inside the flex container the item should take up
|
|
433
435
|
*
|
|
@@ -1203,22 +1205,7 @@ type UncontrolledMenuProps = {
|
|
|
1203
1205
|
onOpenChange?: never;
|
|
1204
1206
|
};
|
|
1205
1207
|
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
1206
|
-
type
|
|
1207
|
-
/**
|
|
1208
|
-
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1209
|
-
*/
|
|
1210
|
-
label: string;
|
|
1211
|
-
trigger?: never;
|
|
1212
|
-
};
|
|
1213
|
-
type MenuPropsWithCustomTrigger = {
|
|
1214
|
-
label?: never;
|
|
1215
|
-
/**
|
|
1216
|
-
* Replace the default trigger with a custom button or other element
|
|
1217
|
-
* */
|
|
1218
|
-
trigger: ReactNode;
|
|
1219
|
-
};
|
|
1220
|
-
type MenuTriggerProps = MenuPropsWithCustomTrigger | MenuPropsWithDefaultTrigger;
|
|
1221
|
-
type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
1208
|
+
type MenuProps = MenuControlProps & {
|
|
1222
1209
|
/**
|
|
1223
1210
|
* The position of the Menu
|
|
1224
1211
|
*/
|
|
@@ -1228,21 +1215,36 @@ type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
|
1228
1215
|
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
1229
1216
|
*/
|
|
1230
1217
|
children: ReactNode;
|
|
1218
|
+
/**
|
|
1219
|
+
* If the menu is compact
|
|
1220
|
+
*/
|
|
1221
|
+
compact?: boolean;
|
|
1222
|
+
/**
|
|
1223
|
+
* If disabled, the trigger will appear disabled and the menu will not open
|
|
1224
|
+
*/
|
|
1225
|
+
disabled?: boolean;
|
|
1226
|
+
/**
|
|
1227
|
+
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1228
|
+
*/
|
|
1229
|
+
label?: string;
|
|
1231
1230
|
/**
|
|
1232
1231
|
* Callback for when the user clicks or focuses outside of the menu
|
|
1233
1232
|
*/
|
|
1234
1233
|
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
1234
|
+
/**
|
|
1235
|
+
* Replace the default trigger with a custom button or other element
|
|
1236
|
+
* */
|
|
1237
|
+
trigger?: ReactNode;
|
|
1235
1238
|
/**
|
|
1236
1239
|
* Props to pass to the trigger component, the default trigger is Button
|
|
1237
1240
|
*/
|
|
1238
|
-
triggerProps?: ButtonProps
|
|
1241
|
+
triggerProps?: Partial<ButtonProps>;
|
|
1239
1242
|
};
|
|
1240
|
-
type MenuProps = BaseMenuProps & {};
|
|
1241
1243
|
/**
|
|
1242
1244
|
* Displays a menu to the users with a set of actions.
|
|
1243
1245
|
*/
|
|
1244
1246
|
declare const Menu: {
|
|
1245
|
-
({ align, children, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1247
|
+
({ align, children, disabled, compact, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1246
1248
|
displayName: string;
|
|
1247
1249
|
};
|
|
1248
1250
|
|
|
@@ -1822,8 +1824,6 @@ declare const ScreenReaderOnly: {
|
|
|
1822
1824
|
displayName: string;
|
|
1823
1825
|
};
|
|
1824
1826
|
|
|
1825
|
-
type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09' | 'space-10' | 'space-11';
|
|
1826
|
-
|
|
1827
1827
|
type StackProps = {
|
|
1828
1828
|
/**
|
|
1829
1829
|
* Optional children
|
package/dist/index.d.ts
CHANGED
|
@@ -359,6 +359,8 @@ declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
359
359
|
label: string;
|
|
360
360
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
361
361
|
|
|
362
|
+
type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09' | 'space-10' | 'space-11';
|
|
363
|
+
|
|
362
364
|
type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
|
|
363
365
|
type AlignContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'stretch';
|
|
364
366
|
type AlignItemsType = 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
@@ -366,8 +368,8 @@ type AlignSelfType = 'auto' | 'baseline' | 'center' | 'flex-end' | 'flex-start'
|
|
|
366
368
|
type DirectionType = 'column-reverse' | 'column' | 'row-reverse' | 'row';
|
|
367
369
|
type FillType = boolean | 'horizontal' | 'vertical';
|
|
368
370
|
type Gap = {
|
|
369
|
-
column:
|
|
370
|
-
row:
|
|
371
|
+
column: Spacings;
|
|
372
|
+
row: Spacings;
|
|
371
373
|
};
|
|
372
374
|
/**
|
|
373
375
|
* CSS property => Box prop:
|
|
@@ -427,7 +429,7 @@ type BoxProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
427
429
|
/**
|
|
428
430
|
* Specifies the gaps (gutters) between rows and columns
|
|
429
431
|
*/
|
|
430
|
-
gap?: Gap |
|
|
432
|
+
gap?: Gap | Spacings;
|
|
431
433
|
/**
|
|
432
434
|
* Specifies what amount of space inside the flex container the item should take up
|
|
433
435
|
*
|
|
@@ -1203,22 +1205,7 @@ type UncontrolledMenuProps = {
|
|
|
1203
1205
|
onOpenChange?: never;
|
|
1204
1206
|
};
|
|
1205
1207
|
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
1206
|
-
type
|
|
1207
|
-
/**
|
|
1208
|
-
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1209
|
-
*/
|
|
1210
|
-
label: string;
|
|
1211
|
-
trigger?: never;
|
|
1212
|
-
};
|
|
1213
|
-
type MenuPropsWithCustomTrigger = {
|
|
1214
|
-
label?: never;
|
|
1215
|
-
/**
|
|
1216
|
-
* Replace the default trigger with a custom button or other element
|
|
1217
|
-
* */
|
|
1218
|
-
trigger: ReactNode;
|
|
1219
|
-
};
|
|
1220
|
-
type MenuTriggerProps = MenuPropsWithCustomTrigger | MenuPropsWithDefaultTrigger;
|
|
1221
|
-
type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
1208
|
+
type MenuProps = MenuControlProps & {
|
|
1222
1209
|
/**
|
|
1223
1210
|
* The position of the Menu
|
|
1224
1211
|
*/
|
|
@@ -1228,21 +1215,36 @@ type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
|
1228
1215
|
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
1229
1216
|
*/
|
|
1230
1217
|
children: ReactNode;
|
|
1218
|
+
/**
|
|
1219
|
+
* If the menu is compact
|
|
1220
|
+
*/
|
|
1221
|
+
compact?: boolean;
|
|
1222
|
+
/**
|
|
1223
|
+
* If disabled, the trigger will appear disabled and the menu will not open
|
|
1224
|
+
*/
|
|
1225
|
+
disabled?: boolean;
|
|
1226
|
+
/**
|
|
1227
|
+
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1228
|
+
*/
|
|
1229
|
+
label?: string;
|
|
1231
1230
|
/**
|
|
1232
1231
|
* Callback for when the user clicks or focuses outside of the menu
|
|
1233
1232
|
*/
|
|
1234
1233
|
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
1234
|
+
/**
|
|
1235
|
+
* Replace the default trigger with a custom button or other element
|
|
1236
|
+
* */
|
|
1237
|
+
trigger?: ReactNode;
|
|
1235
1238
|
/**
|
|
1236
1239
|
* Props to pass to the trigger component, the default trigger is Button
|
|
1237
1240
|
*/
|
|
1238
|
-
triggerProps?: ButtonProps
|
|
1241
|
+
triggerProps?: Partial<ButtonProps>;
|
|
1239
1242
|
};
|
|
1240
|
-
type MenuProps = BaseMenuProps & {};
|
|
1241
1243
|
/**
|
|
1242
1244
|
* Displays a menu to the users with a set of actions.
|
|
1243
1245
|
*/
|
|
1244
1246
|
declare const Menu: {
|
|
1245
|
-
({ align, children, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1247
|
+
({ align, children, disabled, compact, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1246
1248
|
displayName: string;
|
|
1247
1249
|
};
|
|
1248
1250
|
|
|
@@ -1822,8 +1824,6 @@ declare const ScreenReaderOnly: {
|
|
|
1822
1824
|
displayName: string;
|
|
1823
1825
|
};
|
|
1824
1826
|
|
|
1825
|
-
type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09' | 'space-10' | 'space-11';
|
|
1826
|
-
|
|
1827
1827
|
type StackProps = {
|
|
1828
1828
|
/**
|
|
1829
1829
|
* Optional children
|