@moldable-ai/ui 0.2.32 → 0.2.33
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.
|
@@ -5,7 +5,7 @@ declare const materialVariants: (props?: ({
|
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export type MaterialVariant = 'regular' | 'clear' | 'ultra-thick' | 'thick' | 'medium' | 'thin' | 'ultra-thin';
|
|
7
7
|
export type MaterialShape = NonNullable<VariantProps<typeof materialVariants>['shape']>;
|
|
8
|
-
export type MaterialElevation = 'none' | 'panel' | 'overlay';
|
|
8
|
+
export type MaterialElevation = 'none' | 'control' | 'panel' | 'overlay';
|
|
9
9
|
export interface MaterialProps extends React.ComponentPropsWithoutRef<'div'>, VariantProps<typeof materialVariants> {
|
|
10
10
|
/**
|
|
11
11
|
* `regular` aliases the medium standard material and `clear` aliases the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/components/ui/material.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,QAAA,MAAM,gBAAgB;;8EAWpB,CAAA;AAEF,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,OAAO,GACP,aAAa,GACb,OAAO,GACP,QAAQ,GACR,MAAM,GACN,YAAY,CAAA;AAChB,MAAM,MAAM,aAAa,GAAG,WAAW,CACrC,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAC/C,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/components/ui/material.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OA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33
33
|
const button = (_jsx(Button, { "data-slot": "toolbar-button", "data-emphasis": emphasis, size: size ?? (group ? groupedSize : 'xl'), variant: resolvedVariant, className: cn('rounded-pill gap-[var(--m-ui-toolbar-action-gap,var(--density-control-gap))] px-[var(--m-ui-toolbar-action-padding-inline,var(--density-control-padding-inline))] [&_svg:not([class*="size-"])]:size-[var(--m-ui-toolbar-action-icon-size,13px)]', emphasis === 'primary' && 'font-semibold', group && 'shadow-none', className), ...props }));
|
|
34
34
|
if (resolvedMaterial === 'none')
|
|
35
35
|
return button;
|
|
36
|
-
return (_jsx(Material, { asChild: true, variant: resolvedMaterial, shape: "capsule", elevation: "
|
|
36
|
+
return (_jsx(Material, { asChild: true, variant: resolvedMaterial, shape: "capsule", elevation: "control", interactive: true, children: button }));
|
|
37
37
|
}
|
|
38
38
|
function ToolbarIconButton({ appearance = 'chrome', className, size, variant, ...props }) {
|
|
39
39
|
const group = React.useContext(ToolbarControlGroupContext);
|
package/package.json
CHANGED
package/src/styles/index.css
CHANGED
|
@@ -1394,6 +1394,10 @@
|
|
|
1394
1394
|
saturate(var(--material-saturation));
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
|
+
.moldable-material[data-material-elevation='control'] {
|
|
1398
|
+
--material-active-shadow: inset 0 0 0 1px rgb(255 255 255 / 15%);
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1397
1401
|
.moldable-material[data-material-elevation='panel'] {
|
|
1398
1402
|
--material-active-shadow: var(--material-shadow-panel);
|
|
1399
1403
|
}
|