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.
@@ -210,13 +210,19 @@
210
210
  "boxShadow]___[value:overlay",
211
211
  "textStyle]___[value:body.sm",
212
212
  "fill]___[value:icon",
213
+ "top]___[value:50%",
214
+ "transform]___[value:translate(-50%, -50%) scale(0.95) translateY(-10px)",
215
+ "animation]___[value:modalScaleIn 150ms ease-out forwards",
216
+ "animation]___[value:modalScaleOut 150ms ease-out forwards]___[cond:&[data-state=\"closing\"]",
213
217
  "textStyle]___[value:heading.xs",
214
218
  "textStyle]___[value:mono.sm",
219
+ "fontWeight]___[value:semibold",
215
220
  "gridTemplateColumns]___[value:1fr auto 1fr",
216
221
  "marginInline]___[value:8",
217
222
  "marginBlock]___[value:12",
218
223
  "fill]___[value:icon.decorative",
219
224
  "gap]___[value:3",
225
+ "padding]___[value:8",
220
226
  "textStyle]___[value:heading.xs]___[cond:sm",
221
227
  "background]___[value:bg.neutral.boldest",
222
228
  "width]___[value:sm",
@@ -413,7 +419,6 @@
413
419
  "borderBottomColor]___[value:border.selected]___[cond:_current",
414
420
  "color]___[value:text]___[cond:_current",
415
421
  "fontWeight]___[value:bold]___[cond:_current",
416
- "padding]___[value:8",
417
422
  "background]___[value:bg.warning]___[cond:_even",
418
423
  "background]___[value:surface]___[cond:_odd",
419
424
  "color]___[value:text.accent.gold]___[cond:_marker",
@@ -822,12 +827,14 @@
822
827
  "modal": [
823
828
  "variant]___[value:default]___[recipe:modal",
824
829
  "size]___[value:md]___[recipe:modal",
830
+ "position]___[value:centered]___[recipe:modal",
825
831
  "size]___[value:sm]___[recipe:modal",
826
832
  "size]___[value:lg]___[recipe:modal",
827
833
  "size]___[value:xl]___[recipe:modal",
828
834
  "size]___[value:full]___[recipe:modal",
829
835
  "size]___[value:mobile]___[recipe:modal",
830
- "variant]___[value:confirmation]___[recipe:modal"
836
+ "variant]___[value:confirmation]___[recipe:modal",
837
+ "position]___[value:top]___[recipe:modal"
831
838
  ],
832
839
  "textarea": [
833
840
  "size]___[value:md]___[recipe:textarea",
package/dist/preset.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "@pandacss/dev";
2
- import { a } from "./cetec-preset-kUkA_FyU.js";
2
+ import { a } from "./cetec-preset-D3bQHejk.js";
3
3
  export {
4
4
  a as cetecPreset
5
5
  };
@@ -132,6 +132,28 @@
132
132
  "<Box animationName=\"modalScaleOut\" />",
133
133
  "<Box animation=\"modalScaleOut 1s ease-in-out infinite\" />"
134
134
  ]
135
+ },
136
+ {
137
+ "name": "modalScaleInTop",
138
+ "functionExamples": [
139
+ "css({ animationName: 'modalScaleInTop' })",
140
+ "css({ animation: 'modalScaleInTop 1s ease-in-out infinite' })"
141
+ ],
142
+ "jsxExamples": [
143
+ "<Box animationName=\"modalScaleInTop\" />",
144
+ "<Box animation=\"modalScaleInTop 1s ease-in-out infinite\" />"
145
+ ]
146
+ },
147
+ {
148
+ "name": "modalScaleOutTop",
149
+ "functionExamples": [
150
+ "css({ animationName: 'modalScaleOutTop' })",
151
+ "css({ animation: 'modalScaleOutTop 1s ease-in-out infinite' })"
152
+ ],
153
+ "jsxExamples": [
154
+ "<Box animationName=\"modalScaleOutTop\" />",
155
+ "<Box animation=\"modalScaleOutTop 1s ease-in-out infinite\" />"
156
+ ]
135
157
  }
136
158
  ]
137
159
  }
@@ -972,6 +972,10 @@
972
972
  "full",
973
973
  "mobile"
974
974
  ],
975
+ "position": [
976
+ "centered",
977
+ "top"
978
+ ],
975
979
  "variant": [
976
980
  "default",
977
981
  "confirmation"
@@ -979,17 +983,20 @@
979
983
  },
980
984
  "defaultVariants": {
981
985
  "variant": "default",
982
- "size": "md"
986
+ "size": "md",
987
+ "position": "centered"
983
988
  },
984
989
  "functionExamples": [
985
990
  "modal({ size: 'sm' })",
991
+ "modal({ position: 'centered' })",
986
992
  "modal({ variant: 'default' })",
987
- "modal({ size: 'sm', variant: 'default' })"
993
+ "modal({ size: 'sm', position: 'centered', variant: 'default' })"
988
994
  ],
989
995
  "jsxExamples": [
990
996
  "<Modal size=\"sm\" />",
997
+ "<Modal position=\"centered\" />",
991
998
  "<Modal variant=\"default\" />",
992
- "<Modal size=\"sm\" variant=\"default\" />"
999
+ "<Modal size=\"sm\" position=\"centered\" variant=\"default\" />"
993
1000
  ]
994
1001
  },
995
1002
  {
package/dist/styles.css CHANGED
@@ -1351,6 +1351,30 @@
1351
1351
  opacity: 0;
1352
1352
  transform: translate(-50%, -50%) scale(0.95) translateY(-10px);
1353
1353
  }
1354
+ }
1355
+
1356
+ @keyframes modalScaleInTop {
1357
+ 0% {
1358
+ opacity: 0;
1359
+ transform: translateX(-50%) scale(0.95) translateY(-10px);
1360
+ }
1361
+
1362
+ 100% {
1363
+ opacity: 1;
1364
+ transform: translateX(-50%) scale(1) translateY(0);
1365
+ }
1366
+ }
1367
+
1368
+ @keyframes modalScaleOutTop {
1369
+ 0% {
1370
+ opacity: 1;
1371
+ transform: translateX(-50%) scale(1) translateY(0);
1372
+ }
1373
+
1374
+ 100% {
1375
+ opacity: 0;
1376
+ transform: translateX(-50%) scale(0.95) translateY(-10px);
1377
+ }
1354
1378
  }
1355
1379
  }
1356
1380
 
@@ -3336,7 +3360,6 @@
3336
3360
  margin: var(--cetec-spacing-0);
3337
3361
  padding: var(--cetec-spacing-0);
3338
3362
  background: var(--cetec-colors-surface-overlay);
3339
- animation: modalScaleIn 150ms ease-out forwards;
3340
3363
  border-radius: 12px;
3341
3364
  outline: var(--cetec-borders-none);
3342
3365
  box-sizing: border-box;
@@ -3350,18 +3373,12 @@
3350
3373
  flex-direction: column;
3351
3374
  box-shadow: var(--cetec-shadows-overlay);
3352
3375
  z-index: var(--cetec-z-index-1101);
3353
- opacity: 0;
3354
- transform: translate(-50%, -50%) scale(0.95) translateY(-10px);
3355
- top: 50%;
3356
3376
  left: 50%;
3357
3377
  width: var(--cetec-sizes-full);
3378
+ max-width: 95vw;
3358
3379
  max-height: 95vh;
3359
3380
  }
3360
3381
 
3361
- .cetec-modal__container[data-state="closing"] {
3362
- animation: modalScaleOut 150ms ease-out forwards;
3363
- }
3364
-
3365
3382
  .cetec-modal__header {
3366
3383
  gap: var(--cetec-spacing-12);
3367
3384
  padding-inline: var(--cetec-spacing-20);
@@ -3539,16 +3556,6 @@
3539
3556
  outline-color: var(--cetec-colors-transparent);
3540
3557
  }
3541
3558
 
3542
- .cetec-textInput__container:is(:read-only, [readonly], [data-read-only=true], [aria-readonly=true]) {
3543
- opacity: 0.4;
3544
- cursor: not-allowed;
3545
- }
3546
-
3547
- .cetec-textInput__container:is(:read-only, [readonly], [data-read-only=true], [aria-readonly=true]):focus-within {
3548
- border-color: var(--cetec-colors-border-input);
3549
- outline-color: var(--cetec-colors-transparent);
3550
- }
3551
-
3552
3559
  .group:is(:disabled, [disabled], [data-disabled=true], [aria-disabled=true]) .cetec-textInput__container {
3553
3560
  opacity: 1;
3554
3561
  }
@@ -4983,23 +4990,33 @@
4983
4990
  }
4984
4991
 
4985
4992
  .cetec-modal__container--size_md {
4986
- max-width: var(--cetec-sizes-xl);
4993
+ width: var(--cetec-sizes-xl);
4994
+ }
4995
+
4996
+ .cetec-modal__container--position_centered {
4997
+ animation: modalScaleIn 150ms ease-out forwards;
4998
+ transform: translate(-50%, -50%) scale(0.95) translateY(-10px);
4999
+ top: 50%;
5000
+ }
5001
+
5002
+ .cetec-modal__container--position_centered[data-state="closing"] {
5003
+ animation: modalScaleOut 150ms ease-out forwards;
4987
5004
  }
4988
5005
 
4989
5006
  .cetec-modal__container--size_sm {
4990
- max-width: var(--cetec-sizes-md);
5007
+ width: var(--cetec-sizes-md);
4991
5008
  }
4992
5009
 
4993
5010
  .cetec-modal__container--size_lg {
4994
- max-width: var(--cetec-sizes-3xl);
5011
+ width: var(--cetec-sizes-3xl);
4995
5012
  }
4996
5013
 
4997
5014
  .cetec-modal__container--size_xl {
4998
- max-width: var(--cetec-sizes-5xl);
5015
+ width: var(--cetec-sizes-5xl);
4999
5016
  }
5000
5017
 
5001
5018
  .cetec-modal__container--size_full {
5002
- max-width: 95vw;
5019
+ width: 95vw;
5003
5020
  }
5004
5021
 
5005
5022
  .cetec-modal__container--size_mobile {
@@ -5010,6 +5027,16 @@
5010
5027
  max-height: 100vh;
5011
5028
  }
5012
5029
 
5030
+ .cetec-modal__container--position_top {
5031
+ animation: modalScaleInTop 150ms ease-out forwards;
5032
+ transform: translate(-50%, 0) scale(0.95) translateY(-10px);
5033
+ top: min(2.5vh, var(--cetec-spacing-64));
5034
+ }
5035
+
5036
+ .cetec-modal__container--position_top[data-state="closing"] {
5037
+ animation: modalScaleOutTop 150ms ease-out forwards;
5038
+ }
5039
+
5013
5040
  .cetec-modal__container--variant_confirmation {
5014
5041
  height: var(--cetec-sizes-fit);
5015
5042
  width: var(--cetec-sizes-md);
@@ -5133,6 +5160,15 @@
5133
5160
  height: var(--cetec-sizes-full);
5134
5161
  max-width: 100vw;
5135
5162
  max-height: 100vh;
5163
+ }
5164
+ .cetec-modal__container--position_top {
5165
+ animation: modalScaleIn 150ms ease-out forwards;
5166
+ transform: translate(-50%, -50%) scale(0.95) translateY(-10px);
5167
+ top: 50%;
5168
+ }
5169
+
5170
+ .cetec-modal__container--position_top[data-state="closing"] {
5171
+ animation: modalScaleOut 150ms ease-out forwards;
5136
5172
  }
5137
5173
  }
5138
5174
  }
@@ -8902,6 +8938,10 @@
8902
8938
  border: var(--cetec-borders-none);
8903
8939
  }
8904
8940
 
8941
+ .cetec-anim_modalScaleIn_150ms_ease-out_forwards {
8942
+ animation: modalScaleIn 150ms ease-out forwards;
8943
+ }
8944
+
8905
8945
  .cetec-p_16 {
8906
8946
  padding: var(--cetec-spacing-16);
8907
8947
  }
@@ -8918,6 +8958,10 @@
8918
8958
  padding: var(--cetec-spacing-24);
8919
8959
  }
8920
8960
 
8961
+ .cetec-p_8 {
8962
+ padding: var(--cetec-spacing-8);
8963
+ }
8964
+
8921
8965
  .cetec-p_2 {
8922
8966
  padding: var(--cetec-spacing-2);
8923
8967
  }
@@ -8926,10 +8970,6 @@
8926
8970
  background: bg.surface.subtle;
8927
8971
  }
8928
8972
 
8929
- .cetec-p_8 {
8930
- padding: var(--cetec-spacing-8);
8931
- }
8932
-
8933
8973
  .cetec-p_20 {
8934
8974
  padding: var(--cetec-spacing-20);
8935
8975
  }
@@ -16232,6 +16272,10 @@
16232
16272
  padding-inline-end: var(--cetec-spacing-4);
16233
16273
  }
16234
16274
 
16275
+ .cetec-trf_translate\(-50\%\,_-50\%\)_scale\(0\.95\)_translateY\(-10px\) {
16276
+ transform: translate(-50%, -50%) scale(0.95) translateY(-10px);
16277
+ }
16278
+
16235
16279
  .cetec-ps_\[31px\] {
16236
16280
  padding-inline-start: 31px;
16237
16281
  }
@@ -16433,6 +16477,10 @@
16433
16477
  align-items: stretch;
16434
16478
  }
16435
16479
 
16480
+ .cetec-fw_semibold {
16481
+ font-weight: semibold;
16482
+ }
16483
+
16436
16484
  .cetec-grid-tc_1fr_auto_1fr {
16437
16485
  grid-template-columns: 1fr auto 1fr;
16438
16486
  }
@@ -19033,6 +19081,10 @@
19033
19081
  max-height: 83.333333%;
19034
19082
  }
19035
19083
 
19084
+ .cetec-top_50\% {
19085
+ top: 50%;
19086
+ }
19087
+
19036
19088
  .cetec-bd-t-w_1 {
19037
19089
  border-top-width: var(--cetec-border-widths-1);
19038
19090
  }
@@ -26001,6 +26053,10 @@
26001
26053
  border: var(--cetec-borders-none);
26002
26054
  }
26003
26055
 
26056
+ .\[\&\[data-state\=\"closing\"\]\]\:cetec-anim_modalScaleOut_150ms_ease-out_forwards[data-state="closing"] {
26057
+ animation: modalScaleOut 150ms ease-out forwards;
26058
+ }
26059
+
26004
26060
  .utility\:cetec-bg_bg\.accent\.neutral\.subtlest[data-utility=true] {
26005
26061
  background: var(--cetec-colors-bg-accent-neutral-subtlest);
26006
26062
  }
@@ -2237,6 +2237,10 @@ declare interface ModalVariant {
2237
2237
  * @default "md"
2238
2238
  */
2239
2239
  size: "sm" | "md" | "lg" | "xl" | "full" | "mobile"
2240
+ /**
2241
+ * @default "centered"
2242
+ */
2243
+ position: "centered" | "top"
2240
2244
  /**
2241
2245
  * @default "default"
2242
2246
  */
@@ -2244,7 +2248,7 @@ declare interface ModalVariant {
2244
2248
  }
2245
2249
 
2246
2250
  declare type ModalVariantProps = {
2247
- [key in keyof ModalVariant]?: ConditionalValue<ModalVariant[key]> | undefined
2251
+ [key in keyof ModalVariant]?: ModalVariant[key] | undefined
2248
2252
  }
2249
2253
 
2250
2254
  declare interface ModernCssProperties {
@@ -19732,7 +19736,7 @@ declare interface UtilityValues {
19732
19736
  transitionDuration: Tokens["durations"];
19733
19737
  transition: "all" | "common" | "size" | "position" | "background" | "colors" | "opacity" | "shadow" | "transform";
19734
19738
  animation: Tokens["animations"];
19735
- animationName: "spin" | "ping" | "pulse" | "bounce" | "badgePop" | "badgePopStandalone" | "slideLeft" | "slideRight" | "modalFadeIn" | "modalFadeOut" | "modalScaleIn" | "modalScaleOut";
19739
+ animationName: "spin" | "ping" | "pulse" | "bounce" | "badgePop" | "badgePopStandalone" | "slideLeft" | "slideRight" | "modalFadeIn" | "modalFadeOut" | "modalScaleIn" | "modalScaleOut" | "modalScaleInTop" | "modalScaleOutTop";
19736
19740
  animationTimingFunction: Tokens["easings"];
19737
19741
  animationDuration: Tokens["durations"];
19738
19742
  animationDelay: Tokens["durations"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cetec-design-system",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Cetec-ERP Design System",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,6 +13,11 @@ export const listItemRecipe = defineSlotRecipe({
13
13
  'itemDescription',
14
14
  'divider',
15
15
  ],
16
+ staticCss: [
17
+ {
18
+ selected: ['*'],
19
+ },
20
+ ],
16
21
  base: {
17
22
  wrapper: {
18
23
  ...globalBaseStyles,
@@ -19,25 +19,17 @@ const modalBase = {
19
19
  container: {
20
20
  ...globalBaseStyles,
21
21
  position: 'fixed',
22
- top: '50%',
23
22
  left: '50%',
24
23
  display: 'flex',
25
24
  flexDirection: 'column',
26
25
  width: 'full',
26
+ maxW: '95vw',
27
27
  maxHeight: '95vh',
28
28
  bg: 'surface.overlay',
29
29
  borderRadius: '12',
30
30
  boxShadow: 'overlay',
31
31
  outline: 'none',
32
32
  zIndex: 1101,
33
- // Initial state matches animation start
34
- opacity: '0',
35
- transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
36
- // Animation handled via data-state
37
- animation: 'modalScaleIn 150ms ease-out forwards',
38
- '&[data-state="closing"]': {
39
- animation: 'modalScaleOut 150ms ease-out forwards',
40
- },
41
33
  },
42
34
  header: {
43
35
  display: 'flex',
@@ -76,31 +68,41 @@ const modalBase = {
76
68
  },
77
69
  };
78
70
 
71
+ /** Base-like positioning when `position: top` would fight a full-viewport sheet */
72
+ const modalContainerCenteredOverlay = {
73
+ top: '50%',
74
+ transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
75
+ animation: 'modalScaleIn 150ms ease-out forwards',
76
+ '&[data-state="closing"]': {
77
+ animation: 'modalScaleOut 150ms ease-out forwards',
78
+ },
79
+ };
80
+
79
81
  const modalVariants = {
80
82
  size: {
81
83
  sm: {
82
84
  container: {
83
- maxWidth: 'md',
85
+ w: 'md',
84
86
  },
85
87
  },
86
88
  md: {
87
89
  container: {
88
- maxWidth: 'xl',
90
+ w: 'xl',
89
91
  },
90
92
  },
91
93
  lg: {
92
94
  container: {
93
- maxWidth: '3xl',
95
+ w: '3xl',
94
96
  },
95
97
  },
96
98
  xl: {
97
99
  container: {
98
- maxWidth: '5xl',
100
+ w: '5xl',
99
101
  },
100
102
  },
101
103
  full: {
102
104
  container: {
103
- maxWidth: '95vw',
105
+ w: '95vw',
104
106
  },
105
107
  },
106
108
  mobile: {
@@ -113,6 +115,24 @@ const modalVariants = {
113
115
  },
114
116
  },
115
117
  },
118
+ position: {
119
+ centered: {
120
+ container: modalContainerCenteredOverlay,
121
+ },
122
+ top: {
123
+ container: {
124
+ top: 'min(2.5vh, token(spacing.64))',
125
+ transform: 'translate(-50%, 0) scale(0.95) translateY(-10px)',
126
+ animation: 'modalScaleInTop 150ms ease-out forwards',
127
+ '&[data-state="closing"]': {
128
+ animation: 'modalScaleOutTop 150ms ease-out forwards',
129
+ },
130
+ // Align with default centered overlay at `xsDown` (full-viewport sheet):
131
+ // without this, `top` + fixed offset leaves a gap above the sheet.
132
+ xsDown: modalContainerCenteredOverlay,
133
+ },
134
+ },
135
+ },
116
136
  variant: {
117
137
  default: {
118
138
  container: {
@@ -149,8 +169,18 @@ export const modalRecipe = defineSlotRecipe({
149
169
  ],
150
170
  base: modalBase,
151
171
  variants: modalVariants,
172
+ compoundVariants: [
173
+ {
174
+ position: 'top',
175
+ size: 'mobile',
176
+ css: {
177
+ container: modalContainerCenteredOverlay,
178
+ },
179
+ },
180
+ ],
152
181
  defaultVariants: {
153
182
  variant: 'default',
154
183
  size: 'md',
184
+ position: 'centered',
155
185
  },
156
186
  });
@@ -47,14 +47,6 @@ const textInputBase = {
47
47
  borderColor: 'border.input',
48
48
  },
49
49
  },
50
- _readOnly: {
51
- opacity: 0.4,
52
- cursor: 'not-allowed',
53
- _focusWithin: {
54
- outlineColor: 'transparent',
55
- borderColor: 'border.input',
56
- },
57
- },
58
50
  _groupDisabled: {
59
51
  opacity: 1, // let FormField handle disabled state opacity
60
52
  },
@@ -86,4 +86,25 @@ export const keyframes = defineKeyframes({
86
86
  transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
87
87
  },
88
88
  },
89
+ /** Top-aligned modal: horizontal center only (see modal recipe `position: top`) */
90
+ modalScaleInTop: {
91
+ '0%': {
92
+ opacity: '0',
93
+ transform: 'translateX(-50%) scale(0.95) translateY(-10px)',
94
+ },
95
+ '100%': {
96
+ opacity: '1',
97
+ transform: 'translateX(-50%) scale(1) translateY(0)',
98
+ },
99
+ },
100
+ modalScaleOutTop: {
101
+ '0%': {
102
+ opacity: '1',
103
+ transform: 'translateX(-50%) scale(1) translateY(0)',
104
+ },
105
+ '100%': {
106
+ opacity: '0',
107
+ transform: 'translateX(-50%) scale(0.95) translateY(-10px)',
108
+ },
109
+ },
89
110
  });