@wistia/ui 0.1.2 → 0.2.1
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 +316 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +24 -26
- package/dist/index.d.ts +24 -26
- package/dist/index.mjs +324 -243
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -544,19 +544,17 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
|
|
|
544
544
|
};
|
|
545
545
|
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
546
546
|
|
|
547
|
-
type DividerProps = ComponentPropsWithoutRef<'
|
|
547
|
+
type DividerProps = ComponentPropsWithoutRef<'div'> & {
|
|
548
548
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* @type 'lg' | 'sm'
|
|
549
|
+
* Orientation of the divider.
|
|
552
550
|
*/
|
|
553
|
-
|
|
551
|
+
orientation?: 'horizontal' | 'vertical';
|
|
554
552
|
};
|
|
555
553
|
/**
|
|
556
|
-
* A line used to visually separate content
|
|
554
|
+
* A line used to visually separate content; note that dividers have no margin/spacing on their own.
|
|
557
555
|
*/
|
|
558
556
|
declare const Divider: {
|
|
559
|
-
({
|
|
557
|
+
({ orientation, ...otherProps }: DividerProps): JSX.Element;
|
|
560
558
|
displayName: string;
|
|
561
559
|
};
|
|
562
560
|
|
|
@@ -1205,22 +1203,7 @@ type UncontrolledMenuProps = {
|
|
|
1205
1203
|
onOpenChange?: never;
|
|
1206
1204
|
};
|
|
1207
1205
|
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
1208
|
-
type
|
|
1209
|
-
/**
|
|
1210
|
-
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1211
|
-
*/
|
|
1212
|
-
label: string;
|
|
1213
|
-
trigger?: never;
|
|
1214
|
-
};
|
|
1215
|
-
type MenuPropsWithCustomTrigger = {
|
|
1216
|
-
label?: never;
|
|
1217
|
-
/**
|
|
1218
|
-
* Replace the default trigger with a custom button or other element
|
|
1219
|
-
* */
|
|
1220
|
-
trigger: ReactNode;
|
|
1221
|
-
};
|
|
1222
|
-
type MenuTriggerProps = MenuPropsWithCustomTrigger | MenuPropsWithDefaultTrigger;
|
|
1223
|
-
type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
1206
|
+
type MenuProps = MenuControlProps & {
|
|
1224
1207
|
/**
|
|
1225
1208
|
* The position of the Menu
|
|
1226
1209
|
*/
|
|
@@ -1230,21 +1213,36 @@ type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
|
1230
1213
|
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
1231
1214
|
*/
|
|
1232
1215
|
children: ReactNode;
|
|
1216
|
+
/**
|
|
1217
|
+
* If the menu is compact
|
|
1218
|
+
*/
|
|
1219
|
+
compact?: boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* If disabled, the trigger will appear disabled and the menu will not open
|
|
1222
|
+
*/
|
|
1223
|
+
disabled?: boolean;
|
|
1224
|
+
/**
|
|
1225
|
+
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1226
|
+
*/
|
|
1227
|
+
label?: string;
|
|
1233
1228
|
/**
|
|
1234
1229
|
* Callback for when the user clicks or focuses outside of the menu
|
|
1235
1230
|
*/
|
|
1236
1231
|
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
1232
|
+
/**
|
|
1233
|
+
* Replace the default trigger with a custom button or other element
|
|
1234
|
+
* */
|
|
1235
|
+
trigger?: ReactNode;
|
|
1237
1236
|
/**
|
|
1238
1237
|
* Props to pass to the trigger component, the default trigger is Button
|
|
1239
1238
|
*/
|
|
1240
|
-
triggerProps?: ButtonProps
|
|
1239
|
+
triggerProps?: Partial<ButtonProps>;
|
|
1241
1240
|
};
|
|
1242
|
-
type MenuProps = BaseMenuProps & {};
|
|
1243
1241
|
/**
|
|
1244
1242
|
* Displays a menu to the users with a set of actions.
|
|
1245
1243
|
*/
|
|
1246
1244
|
declare const Menu: {
|
|
1247
|
-
({ align, children, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1245
|
+
({ align, children, disabled, compact, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1248
1246
|
displayName: string;
|
|
1249
1247
|
};
|
|
1250
1248
|
|
package/dist/index.d.ts
CHANGED
|
@@ -544,19 +544,17 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
|
|
|
544
544
|
};
|
|
545
545
|
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
546
546
|
|
|
547
|
-
type DividerProps = ComponentPropsWithoutRef<'
|
|
547
|
+
type DividerProps = ComponentPropsWithoutRef<'div'> & {
|
|
548
548
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* @type 'lg' | 'sm'
|
|
549
|
+
* Orientation of the divider.
|
|
552
550
|
*/
|
|
553
|
-
|
|
551
|
+
orientation?: 'horizontal' | 'vertical';
|
|
554
552
|
};
|
|
555
553
|
/**
|
|
556
|
-
* A line used to visually separate content
|
|
554
|
+
* A line used to visually separate content; note that dividers have no margin/spacing on their own.
|
|
557
555
|
*/
|
|
558
556
|
declare const Divider: {
|
|
559
|
-
({
|
|
557
|
+
({ orientation, ...otherProps }: DividerProps): JSX.Element;
|
|
560
558
|
displayName: string;
|
|
561
559
|
};
|
|
562
560
|
|
|
@@ -1205,22 +1203,7 @@ type UncontrolledMenuProps = {
|
|
|
1205
1203
|
onOpenChange?: never;
|
|
1206
1204
|
};
|
|
1207
1205
|
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
1208
|
-
type
|
|
1209
|
-
/**
|
|
1210
|
-
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1211
|
-
*/
|
|
1212
|
-
label: string;
|
|
1213
|
-
trigger?: never;
|
|
1214
|
-
};
|
|
1215
|
-
type MenuPropsWithCustomTrigger = {
|
|
1216
|
-
label?: never;
|
|
1217
|
-
/**
|
|
1218
|
-
* Replace the default trigger with a custom button or other element
|
|
1219
|
-
* */
|
|
1220
|
-
trigger: ReactNode;
|
|
1221
|
-
};
|
|
1222
|
-
type MenuTriggerProps = MenuPropsWithCustomTrigger | MenuPropsWithDefaultTrigger;
|
|
1223
|
-
type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
1206
|
+
type MenuProps = MenuControlProps & {
|
|
1224
1207
|
/**
|
|
1225
1208
|
* The position of the Menu
|
|
1226
1209
|
*/
|
|
@@ -1230,21 +1213,36 @@ type BaseMenuProps = MenuControlProps & MenuTriggerProps & {
|
|
|
1230
1213
|
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
1231
1214
|
*/
|
|
1232
1215
|
children: ReactNode;
|
|
1216
|
+
/**
|
|
1217
|
+
* If the menu is compact
|
|
1218
|
+
*/
|
|
1219
|
+
compact?: boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* If disabled, the trigger will appear disabled and the menu will not open
|
|
1222
|
+
*/
|
|
1223
|
+
disabled?: boolean;
|
|
1224
|
+
/**
|
|
1225
|
+
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
1226
|
+
*/
|
|
1227
|
+
label?: string;
|
|
1233
1228
|
/**
|
|
1234
1229
|
* Callback for when the user clicks or focuses outside of the menu
|
|
1235
1230
|
*/
|
|
1236
1231
|
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
1232
|
+
/**
|
|
1233
|
+
* Replace the default trigger with a custom button or other element
|
|
1234
|
+
* */
|
|
1235
|
+
trigger?: ReactNode;
|
|
1237
1236
|
/**
|
|
1238
1237
|
* Props to pass to the trigger component, the default trigger is Button
|
|
1239
1238
|
*/
|
|
1240
|
-
triggerProps?: ButtonProps
|
|
1239
|
+
triggerProps?: Partial<ButtonProps>;
|
|
1241
1240
|
};
|
|
1242
|
-
type MenuProps = BaseMenuProps & {};
|
|
1243
1241
|
/**
|
|
1244
1242
|
* Displays a menu to the users with a set of actions.
|
|
1245
1243
|
*/
|
|
1246
1244
|
declare const Menu: {
|
|
1247
|
-
({ align, children, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1245
|
+
({ align, children, disabled, compact, trigger, label, isOpen, triggerProps, onOpenChange, onInteractOutside, ...props }: MenuProps): JSX.Element;
|
|
1248
1246
|
displayName: string;
|
|
1249
1247
|
};
|
|
1250
1248
|
|