@tryghost/shade 0.1.0-alpha.41 → 0.1.0-alpha.42
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/es/components/ui/list.js +94 -0
- package/es/components/ui/list.js.map +1 -0
- package/es/components/ui/row-primary-action.js +48 -0
- package/es/components/ui/row-primary-action.js.map +1 -0
- package/es/components/ui/row-surface.js +18 -0
- package/es/components/ui/row-surface.js.map +1 -0
- package/es/components/ui/sortable-list.js +6 -2
- package/es/components/ui/sortable-list.js.map +1 -1
- package/es/components/ui/table.js +18 -7
- package/es/components/ui/table.js.map +1 -1
- package/es/components.js +4 -2
- package/es/hooks/use-row-behavior.js +94 -0
- package/es/hooks/use-row-behavior.js.map +1 -0
- package/es/hooks/use-row-press.js +63 -0
- package/es/hooks/use-row-press.js.map +1 -0
- package/es/index.js +4 -2
- package/package.json +1 -1
- package/styles.css +334 -0
- package/types/components/ui/list.d.ts +28 -0
- package/types/components/ui/list.d.ts.map +1 -0
- package/types/components/ui/row-primary-action.d.ts +8 -0
- package/types/components/ui/row-primary-action.d.ts.map +1 -0
- package/types/components/ui/row-surface.d.ts +11 -0
- package/types/components/ui/row-surface.d.ts.map +1 -0
- package/types/components/ui/sortable-list.d.ts.map +1 -1
- package/types/components/ui/table.d.ts +4 -1
- package/types/components/ui/table.d.ts.map +1 -1
- package/types/components.d.ts +3 -1
- package/types/components.d.ts.map +1 -1
- package/types/hooks/use-row-behavior.d.ts +24 -0
- package/types/hooks/use-row-behavior.d.ts.map +1 -0
- package/types/hooks/use-row-press.d.ts +11 -0
- package/types/hooks/use-row-press.d.ts.map +1 -0
- package/es/components/ui/action-list.js +0 -56
- package/es/components/ui/action-list.js.map +0 -1
- package/types/components/ui/action-list.d.ts +0 -21
- package/types/components/ui/action-list.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-list.js","names":[],"sources":["../../../src/components/ui/action-list.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst actionListItemVariants = cva(\n 'group/action-list-item relative flex min-w-0 items-stretch border-b border-border last:border-b-transparent',\n {\n variants: {\n hover: {\n true: 'before:pointer-events-none before:absolute before:-inset-x-4 before:inset-y-0 before:z-0 before:rounded-md before:bg-table-row-hover before:opacity-0 before:transition-opacity hover:border-b-transparent hover:before:opacity-100',\n false: '',\n },\n },\n defaultVariants: {\n hover: true,\n },\n },\n);\n\nconst ActionList = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col', className)} {...props} />\n ),\n);\nActionList.displayName = 'ActionList';\n\ninterface ActionListItemProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof actionListItemVariants> {}\n\nconst ActionListItem = React.forwardRef<HTMLDivElement, ActionListItemProps>(\n ({ className, hover, ...props }, ref) => (\n <div ref={ref} className={cn(actionListItemVariants({ hover, className }))} {...props} />\n ),\n);\nActionListItem.displayName = 'ActionListItem';\n\ninterface ActionListItemContentProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst ActionListItemContent = React.forwardRef<HTMLDivElement, ActionListItemContentProps>(\n ({ asChild = false, className, ...props }, ref) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component ref={ref} className={cn('relative z-10 min-w-0 grow', className)} {...props} />\n );\n },\n);\nActionListItemContent.displayName = 'ActionListItemContent';\n\nconst actionListItemActionsVariants = cva('relative z-10 flex shrink-0 items-center py-3 pl-2', {\n variants: {\n visibility: {\n always: '',\n hover:\n 'md:opacity-0 md:transition-opacity md:group-focus-within/action-list-item:opacity-100 md:group-hover/action-list-item:opacity-100',\n },\n },\n defaultVariants: {\n visibility: 'always',\n },\n});\n\ninterface ActionListItemActionsProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof actionListItemActionsVariants> {}\n\nconst ActionListItemActions = React.forwardRef<HTMLDivElement, ActionListItemActionsProps>(\n ({ className, visibility, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(actionListItemActionsVariants({ visibility, className }))}\n {...props}\n />\n ),\n);\nActionListItemActions.displayName = 'ActionListItemActions';\n\nexport { ActionList, ActionListItem, ActionListItemActions, ActionListItemContent };\n"],"mappings":";;;;;;AAMA,IAAM,yBAAyB,IAC7B,+GACA;CACE,UAAU,EACR,OAAO;EACL,MAAM;EACN,OAAO;CACT,EACF;CACA,iBAAiB,EACf,OAAO,KACT;AACF,CACF;AAEA,IAAM,aAAa,QAAM,YACtB,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,OAAD;CAAU;CAAK,WAAW,GAAG,iBAAiB,SAAS;CAAG,GAAI;AAAQ,CAAA,CAE1E;AACA,WAAW,cAAc;AAKzB,IAAM,iBAAiB,QAAM,YAC1B,EAAE,WAAW,OAAO,GAAG,SAAS,QAC/B,oBAAC,OAAD;CAAU;CAAK,WAAW,GAAG,uBAAuB;EAAE;EAAO;CAAU,CAAC,CAAC;CAAG,GAAI;AAAQ,CAAA,CAE5F;AACA,eAAe,cAAc;AAM7B,IAAM,wBAAwB,QAAM,YACjC,EAAE,UAAU,OAAO,WAAW,GAAG,SAAS,QAAQ;CAGjD,OACE,oBAHgB,UAAU,OAAO,OAGjC;EAAgB;EAAK,WAAW,GAAG,8BAA8B,SAAS;EAAG,GAAI;CAAQ,CAAA;AAE7F,CACF;AACA,sBAAsB,cAAc;AAEpC,IAAM,gCAAgC,IAAI,sDAAsD;CAC9F,UAAU,EACR,YAAY;EACV,QAAQ;EACR,OACE;CACJ,EACF;CACA,iBAAiB,EACf,YAAY,SACd;AACF,CAAC;AAOD,IAAM,wBAAwB,QAAM,YACjC,EAAE,WAAW,YAAY,GAAG,SAAS,QACpC,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,8BAA8B;EAAE;EAAY;CAAU,CAAC,CAAC;CACtE,GAAI;AACL,CAAA,CAEL;AACA,sBAAsB,cAAc"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
declare const actionListItemVariants: (props?: ({
|
|
4
|
-
hover?: boolean | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
declare const ActionList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
interface ActionListItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof actionListItemVariants> {
|
|
8
|
-
}
|
|
9
|
-
declare const ActionListItem: React.ForwardRefExoticComponent<ActionListItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
interface ActionListItemContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
-
asChild?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const ActionListItemContent: React.ForwardRefExoticComponent<ActionListItemContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const actionListItemActionsVariants: (props?: ({
|
|
15
|
-
visibility?: "always" | "hover" | null | undefined;
|
|
16
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
-
interface ActionListItemActionsProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof actionListItemActionsVariants> {
|
|
18
|
-
}
|
|
19
|
-
declare const ActionListItemActions: React.ForwardRefExoticComponent<ActionListItemActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
export { ActionList, ActionListItem, ActionListItemActions, ActionListItemContent };
|
|
21
|
-
//# sourceMappingURL=action-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-list.d.ts","sourceRoot":"","sources":["../../../src/components/ui/action-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,sBAAsB;;8EAa3B,CAAC;AAEF,QAAA,MAAM,UAAU,6GAIf,CAAC;AAGF,UAAU,mBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,OAAO,sBAAsB,CAAC;CAAG;AAE9F,QAAA,MAAM,cAAc,4FAInB,CAAC;AAGF,UAAU,0BAA2B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,qBAAqB,mGAQ1B,CAAC;AAGF,QAAA,MAAM,6BAA6B;;8EAWjC,CAAC;AAEH,UAAU,0BACR,SACE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,YAAY,CAAC,OAAO,6BAA6B,CAAC;CAAG;AAEzD,QAAA,MAAM,qBAAqB,mGAQ1B,CAAC;AAGF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC"}
|