cetec-design-system 1.2.0 → 1.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/{cetec-preset-kUkA_FyU.js → cetec-preset-D3bQHejk.js} +71 -25
- package/dist/cetec-preset-D3bQHejk.js.map +1 -0
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +9 -2
- package/dist/preset.js +1 -1
- package/dist/specs/keyframes.json +22 -0
- package/dist/specs/recipes.json +10 -3
- package/dist/styles.css +83 -27
- package/dist/types/index.d.ts +6 -2
- package/package.json +1 -1
- package/src/recipes/listItem.ts +5 -0
- package/src/recipes/modal.ts +44 -14
- package/src/recipes/textInput.ts +0 -8
- package/src/styles/utilities/keyframes.ts +21 -0
- package/dist/cetec-preset-kUkA_FyU.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { forwardRef, useMemo, createElement, createContext, useContext, useLayoutEffect, useState, useRef, useId as useId$1, useEffect, Children, isValidElement, cloneElement, useReducer, useSyncExternalStore, useCallback } from "react";
|
|
3
3
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
|
-
import { b as breakpoints, c as containerSizes } from "./cetec-preset-
|
|
6
|
-
import { a } from "./cetec-preset-
|
|
5
|
+
import { b as breakpoints, c as containerSizes } from "./cetec-preset-D3bQHejk.js";
|
|
6
|
+
import { a } from "./cetec-preset-D3bQHejk.js";
|
|
7
7
|
function isObject(value) {
|
|
8
8
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
9
9
|
}
|
|
@@ -2554,9 +2554,25 @@ const menu = /* @__PURE__ */ Object.assign(menuFn, {
|
|
|
2554
2554
|
});
|
|
2555
2555
|
const modalDefaultVariants = {
|
|
2556
2556
|
"variant": "default",
|
|
2557
|
-
"size": "md"
|
|
2557
|
+
"size": "md",
|
|
2558
|
+
"position": "centered"
|
|
2558
2559
|
};
|
|
2559
|
-
const modalCompoundVariants = [
|
|
2560
|
+
const modalCompoundVariants = [
|
|
2561
|
+
{
|
|
2562
|
+
"position": "top",
|
|
2563
|
+
"size": "mobile",
|
|
2564
|
+
"css": {
|
|
2565
|
+
"container": {
|
|
2566
|
+
"top": "50%",
|
|
2567
|
+
"transform": "translate(-50%, -50%) scale(0.95) translateY(-10px)",
|
|
2568
|
+
"animation": "modalScaleIn 150ms ease-out forwards",
|
|
2569
|
+
'&[data-state="closing"]': {
|
|
2570
|
+
"animation": "modalScaleOut 150ms ease-out forwards"
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
];
|
|
2560
2576
|
const modalSlotNames = [
|
|
2561
2577
|
[
|
|
2562
2578
|
"overlay",
|
|
@@ -2593,6 +2609,7 @@ const modalFn = memo((props = {}) => {
|
|
|
2593
2609
|
});
|
|
2594
2610
|
const modalVariantKeys = [
|
|
2595
2611
|
"size",
|
|
2612
|
+
"position",
|
|
2596
2613
|
"variant"
|
|
2597
2614
|
];
|
|
2598
2615
|
const getVariantProps$3 = (variants) => ({ ...modalDefaultVariants, ...compact(variants) });
|
|
@@ -2611,6 +2628,10 @@ const modal = /* @__PURE__ */ Object.assign(modalFn, {
|
|
|
2611
2628
|
"full",
|
|
2612
2629
|
"mobile"
|
|
2613
2630
|
],
|
|
2631
|
+
"position": [
|
|
2632
|
+
"centered",
|
|
2633
|
+
"top"
|
|
2634
|
+
],
|
|
2614
2635
|
"variant": [
|
|
2615
2636
|
"default",
|
|
2616
2637
|
"confirmation"
|
|
@@ -16305,10 +16326,11 @@ const Modal = (props) => {
|
|
|
16305
16326
|
children,
|
|
16306
16327
|
id,
|
|
16307
16328
|
variant = "default",
|
|
16329
|
+
position = "centered",
|
|
16308
16330
|
...rest
|
|
16309
16331
|
} = props;
|
|
16310
16332
|
const [className, otherProps] = splitProps(rest);
|
|
16311
|
-
const classes = modal({ size: size2, variant });
|
|
16333
|
+
const classes = modal({ size: size2, variant, position });
|
|
16312
16334
|
const [{ phase }, dispatch] = useReducer(modalStateReducer, {
|
|
16313
16335
|
phase: open ? "open" : "closed"
|
|
16314
16336
|
});
|