@lets-events/react 7.2.0 → 7.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.js CHANGED
@@ -1030,6 +1030,9 @@ __export(index_exports, {
1030
1030
  ButtonItem: () => ButtonItem,
1031
1031
  ButtonItemStyled: () => ButtonItemStyled,
1032
1032
  Calendar: () => Calendar,
1033
+ Card: () => Card,
1034
+ CardContainer: () => CardContainer,
1035
+ CardStyled: () => CardStyled,
1033
1036
  CheckboxGroup: () => CheckboxGroup,
1034
1037
  CheckboxGroupStyled: () => CheckboxGroupStyled,
1035
1038
  CheckboxItem: () => CheckboxItem,
@@ -1044,6 +1047,7 @@ __export(index_exports, {
1044
1047
  Grid: () => Grid,
1045
1048
  GridStyled: () => GridStyled,
1046
1049
  Icon: () => Icon,
1050
+ InputStyled: () => InputStyled,
1047
1051
  Modal: () => Modal,
1048
1052
  ModalContentStyled: () => ModalContentStyled,
1049
1053
  ModalStyled: () => ModalStyled,
@@ -8337,18 +8341,25 @@ function Calendar(_a) {
8337
8341
  }
8338
8342
  };
8339
8343
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { ref: dropdownRef, children: [
8340
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CalendarButtonStyled, { onClick: () => setShowCalendar((prev) => !prev), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8341
- TextField,
8344
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8345
+ CalendarButtonStyled,
8342
8346
  {
8343
- placeholder: "00/00/0000",
8344
- type: "text",
8345
- value: inputValue,
8346
- onChange: handleInputChange,
8347
- inputMode: "numeric",
8348
- textAlign: "right",
8349
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon_default, { name: "calendar", size: "xl" }) })
8347
+ type: "button",
8348
+ onClick: () => setShowCalendar((prev) => !prev),
8349
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8350
+ TextField,
8351
+ {
8352
+ placeholder: "00/00/0000",
8353
+ type: "text",
8354
+ value: inputValue,
8355
+ onChange: handleInputChange,
8356
+ inputMode: "numeric",
8357
+ textAlign: "right",
8358
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon_default, { name: "calendar", size: "xl" }) })
8359
+ }
8360
+ )
8350
8361
  }
8351
- ) }),
8362
+ ),
8352
8363
  showContainer && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
8353
8364
  CalendarContentStyled,
8354
8365
  {
@@ -8373,6 +8384,7 @@ function Calendar(_a) {
8373
8384
  {
8374
8385
  variant: "text",
8375
8386
  color: "brand",
8387
+ type: "button",
8376
8388
  onClick: () => {
8377
8389
  setShowCalendar(false);
8378
8390
  },
@@ -8436,6 +8448,31 @@ var TimerPickerContentStyled = styled("div", {
8436
8448
  textAlign: "center!important"
8437
8449
  }
8438
8450
  });
8451
+ var InputStyled = styled("input", {
8452
+ height: "$40",
8453
+ fontFamily: "$default",
8454
+ borderRadius: "$sm",
8455
+ boxSizing: "border-box",
8456
+ color: "$dark500",
8457
+ border: "1px solid $dark300",
8458
+ position: "relative",
8459
+ display: "flex",
8460
+ width: "100%",
8461
+ alignItems: "center",
8462
+ padding: "0",
8463
+ outline: "none",
8464
+ margin: 0,
8465
+ textAlign: "center",
8466
+ "&:has(input:focus)": {
8467
+ border: "2px solid $brand300"
8468
+ },
8469
+ "&:has(input:disabled)": {
8470
+ backgroundColor: "$dark100",
8471
+ color: "$dark400",
8472
+ border: "1px solid $dark200",
8473
+ cursor: "not-allowed"
8474
+ }
8475
+ });
8439
8476
  function TimePicker({
8440
8477
  selected,
8441
8478
  setSelected,
@@ -8510,6 +8547,7 @@ function TimePicker({
8510
8547
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8511
8548
  Button,
8512
8549
  {
8550
+ type: "button",
8513
8551
  variant: "text",
8514
8552
  onClick: () => handleIncrement(unit),
8515
8553
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
@@ -8541,20 +8579,18 @@ function TimePicker({
8541
8579
  }
8542
8580
  ),
8543
8581
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8544
- TextField,
8582
+ InputStyled,
8545
8583
  {
8546
8584
  value: unit === "hours" ? hours : minutes,
8547
8585
  onChange: (e5) => handleInputValue(e5.target.value),
8548
8586
  type: "text",
8549
- placeholder: "00",
8550
- typography: "labelSmall",
8551
- fontWeight: "regular",
8552
- textAlign: "center"
8587
+ placeholder: "00"
8553
8588
  }
8554
8589
  ),
8555
8590
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8556
8591
  Button,
8557
8592
  {
8593
+ type: "button",
8558
8594
  variant: "text",
8559
8595
  onClick: () => handleDecrement(unit),
8560
8596
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
@@ -8594,6 +8630,7 @@ function TimePicker({
8594
8630
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TimePickerFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8595
8631
  Button,
8596
8632
  {
8633
+ type: "button",
8597
8634
  variant: "text",
8598
8635
  color: "brand",
8599
8636
  onClick: () => handleInputValue(`${hours}:${minutes}`),
@@ -9080,11 +9117,66 @@ function StepWrapper(_a) {
9080
9117
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes17.Box, __spreadProps(__spreadValues({}, props), { children }));
9081
9118
  }
9082
9119
 
9083
- // src/components/TextareaField.tsx
9120
+ // src/components/Card.tsx
9121
+ var import_react8 = __toESM(require("react"));
9084
9122
  var import_themes18 = require("@radix-ui/themes");
9085
- var import_react8 = require("react");
9086
9123
  var import_jsx_runtime19 = require("react/jsx-runtime");
9087
- var TextareaFieldStyle = styled(import_themes18.TextArea, {
9124
+ var CardStyled = styled(import_themes18.Card, {
9125
+ display: "flex",
9126
+ flexDirection: "column",
9127
+ width: "370px",
9128
+ borderRadius: "$2xl",
9129
+ border: "1px solid $dark100",
9130
+ overflow: "hidden",
9131
+ padding: "16px",
9132
+ defaultVariants: {
9133
+ color: "primary",
9134
+ boxShadow: true
9135
+ },
9136
+ variants: {
9137
+ color: {
9138
+ primary: {
9139
+ backgroundColor: "$dark50",
9140
+ border: "1px solid $dark200"
9141
+ },
9142
+ disable: {
9143
+ backgroundColor: "$grey50",
9144
+ border: "1px solid $dark200"
9145
+ },
9146
+ error: {
9147
+ backgroundColor: "$error50",
9148
+ border: "1px solid $error600"
9149
+ }
9150
+ },
9151
+ boxShadow: {
9152
+ true: {
9153
+ boxShadow: "0 2px 4px rgba(35, 53, 67, 0.16), 0 4px 4px rgba(35, 53, 67, 0.08)"
9154
+ },
9155
+ false: {
9156
+ boxShadow: "none"
9157
+ }
9158
+ }
9159
+ }
9160
+ });
9161
+ var CardContainer = styled(import_themes18.Box, {
9162
+ display: "flex",
9163
+ flexDirection: "row"
9164
+ });
9165
+ function Card(_a) {
9166
+ var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
9167
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CardStyled, __spreadProps(__spreadValues({}, props), { children: import_react8.default.Children.map(children, (child) => {
9168
+ if (import_react8.default.isValidElement(child)) {
9169
+ return import_react8.default.cloneElement(child, { size: props.size });
9170
+ }
9171
+ return child;
9172
+ }) }));
9173
+ }
9174
+
9175
+ // src/components/TextareaField.tsx
9176
+ var import_themes19 = require("@radix-ui/themes");
9177
+ var import_react9 = require("react");
9178
+ var import_jsx_runtime20 = require("react/jsx-runtime");
9179
+ var TextareaFieldStyle = styled(import_themes19.TextArea, {
9088
9180
  display: "flex",
9089
9181
  width: "fit-content",
9090
9182
  flex: 1,
@@ -9141,18 +9233,18 @@ var TextareaLimitIndicator = styled("div", {
9141
9233
  });
9142
9234
  function TextareaField(_a) {
9143
9235
  var _b = _a, { maxLength } = _b, props = __objRest(_b, ["maxLength"]);
9144
- const inputRef = (0, import_react8.useRef)(null);
9145
- const badgeRef = (0, import_react8.useRef)(null);
9236
+ const inputRef = (0, import_react9.useRef)(null);
9237
+ const badgeRef = (0, import_react9.useRef)(null);
9146
9238
  if (!maxLength) {
9147
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TextareaContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TextareaFieldStyle, __spreadProps(__spreadValues({}, props), { ref: inputRef })) });
9239
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextareaContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextareaFieldStyle, __spreadProps(__spreadValues({}, props), { ref: inputRef })) });
9148
9240
  }
9149
9241
  const handleInput = () => {
9150
9242
  var _a2;
9151
9243
  const remainingChars = maxLength - (((_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value.length) || 0);
9152
9244
  if (badgeRef.current) badgeRef.current.textContent = String(remainingChars);
9153
9245
  };
9154
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TextareaContainer, { css: { paddingBottom: "3.25rem" }, children: [
9155
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9246
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(TextareaContainer, { css: { paddingBottom: "3.25rem" }, children: [
9247
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9156
9248
  TextareaFieldStyle,
9157
9249
  __spreadValues({
9158
9250
  ref: inputRef,
@@ -9160,14 +9252,14 @@ function TextareaField(_a) {
9160
9252
  maxLength
9161
9253
  }, props)
9162
9254
  ),
9163
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
9255
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
9164
9256
  ] });
9165
9257
  }
9166
9258
 
9167
9259
  // src/components/Grid.tsx
9168
- var import_themes19 = require("@radix-ui/themes");
9169
- var import_jsx_runtime20 = require("react/jsx-runtime");
9170
- var GridStyled = styled(import_themes19.Grid, {
9260
+ var import_themes20 = require("@radix-ui/themes");
9261
+ var import_jsx_runtime21 = require("react/jsx-runtime");
9262
+ var GridStyled = styled(import_themes20.Grid, {
9171
9263
  display: "grid",
9172
9264
  variants: {
9173
9265
  display: {
@@ -9288,13 +9380,13 @@ var GridStyled = styled(import_themes19.Grid, {
9288
9380
  });
9289
9381
  function Grid(_a) {
9290
9382
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9291
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9383
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9292
9384
  }
9293
9385
 
9294
9386
  // src/components/Container.tsx
9295
- var import_themes20 = require("@radix-ui/themes");
9296
- var import_jsx_runtime21 = require("react/jsx-runtime");
9297
- var ContainerStyled = styled(import_themes20.Container, {
9387
+ var import_themes21 = require("@radix-ui/themes");
9388
+ var import_jsx_runtime22 = require("react/jsx-runtime");
9389
+ var ContainerStyled = styled(import_themes21.Container, {
9298
9390
  variants: {
9299
9391
  size: {
9300
9392
  xs: { maxWidth: "576px" },
@@ -9323,13 +9415,13 @@ var ContainerStyled = styled(import_themes20.Container, {
9323
9415
  });
9324
9416
  function Container(_a) {
9325
9417
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9326
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9418
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9327
9419
  }
9328
9420
 
9329
9421
  // src/components/Section.tsx
9330
- var import_themes21 = require("@radix-ui/themes");
9331
- var import_jsx_runtime22 = require("react/jsx-runtime");
9332
- var SectionStyled = styled(import_themes21.Section, {
9422
+ var import_themes22 = require("@radix-ui/themes");
9423
+ var import_jsx_runtime23 = require("react/jsx-runtime");
9424
+ var SectionStyled = styled(import_themes22.Section, {
9333
9425
  variants: {
9334
9426
  size: {
9335
9427
  xs: { maxWidth: "576px" },
@@ -9352,7 +9444,7 @@ var SectionStyled = styled(import_themes21.Section, {
9352
9444
  });
9353
9445
  function Section(_a) {
9354
9446
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9355
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9447
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9356
9448
  }
9357
9449
  // Annotate the CommonJS export names for ESM import in node:
9358
9450
  0 && (module.exports = {
@@ -9375,6 +9467,9 @@ function Section(_a) {
9375
9467
  ButtonItem,
9376
9468
  ButtonItemStyled,
9377
9469
  Calendar,
9470
+ Card,
9471
+ CardContainer,
9472
+ CardStyled,
9378
9473
  CheckboxGroup,
9379
9474
  CheckboxGroupStyled,
9380
9475
  CheckboxItem,
@@ -9389,6 +9484,7 @@ function Section(_a) {
9389
9484
  Grid,
9390
9485
  GridStyled,
9391
9486
  Icon,
9487
+ InputStyled,
9392
9488
  Modal,
9393
9489
  ModalContentStyled,
9394
9490
  ModalStyled,
package/dist/index.mjs CHANGED
@@ -8260,18 +8260,25 @@ function Calendar(_a) {
8260
8260
  }
8261
8261
  };
8262
8262
  return /* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsxs5(CalendarStyled, __spreadProps(__spreadValues({}, props), { ref: dropdownRef, children: [
8263
- /* @__PURE__ */ jsx14(CalendarButtonStyled, { onClick: () => setShowCalendar((prev) => !prev), children: /* @__PURE__ */ jsx14(
8264
- TextField,
8263
+ /* @__PURE__ */ jsx14(
8264
+ CalendarButtonStyled,
8265
8265
  {
8266
- placeholder: "00/00/0000",
8267
- type: "text",
8268
- value: inputValue,
8269
- onChange: handleInputChange,
8270
- inputMode: "numeric",
8271
- textAlign: "right",
8272
- children: /* @__PURE__ */ jsx14(TextFieldSlot, { children: /* @__PURE__ */ jsx14(Icon_default, { name: "calendar", size: "xl" }) })
8266
+ type: "button",
8267
+ onClick: () => setShowCalendar((prev) => !prev),
8268
+ children: /* @__PURE__ */ jsx14(
8269
+ TextField,
8270
+ {
8271
+ placeholder: "00/00/0000",
8272
+ type: "text",
8273
+ value: inputValue,
8274
+ onChange: handleInputChange,
8275
+ inputMode: "numeric",
8276
+ textAlign: "right",
8277
+ children: /* @__PURE__ */ jsx14(TextFieldSlot, { children: /* @__PURE__ */ jsx14(Icon_default, { name: "calendar", size: "xl" }) })
8278
+ }
8279
+ )
8273
8280
  }
8274
- ) }),
8281
+ ),
8275
8282
  showContainer && /* @__PURE__ */ jsxs5(
8276
8283
  CalendarContentStyled,
8277
8284
  {
@@ -8296,6 +8303,7 @@ function Calendar(_a) {
8296
8303
  {
8297
8304
  variant: "text",
8298
8305
  color: "brand",
8306
+ type: "button",
8299
8307
  onClick: () => {
8300
8308
  setShowCalendar(false);
8301
8309
  },
@@ -8359,6 +8367,31 @@ var TimerPickerContentStyled = styled("div", {
8359
8367
  textAlign: "center!important"
8360
8368
  }
8361
8369
  });
8370
+ var InputStyled = styled("input", {
8371
+ height: "$40",
8372
+ fontFamily: "$default",
8373
+ borderRadius: "$sm",
8374
+ boxSizing: "border-box",
8375
+ color: "$dark500",
8376
+ border: "1px solid $dark300",
8377
+ position: "relative",
8378
+ display: "flex",
8379
+ width: "100%",
8380
+ alignItems: "center",
8381
+ padding: "0",
8382
+ outline: "none",
8383
+ margin: 0,
8384
+ textAlign: "center",
8385
+ "&:has(input:focus)": {
8386
+ border: "2px solid $brand300"
8387
+ },
8388
+ "&:has(input:disabled)": {
8389
+ backgroundColor: "$dark100",
8390
+ color: "$dark400",
8391
+ border: "1px solid $dark200",
8392
+ cursor: "not-allowed"
8393
+ }
8394
+ });
8362
8395
  function TimePicker({
8363
8396
  selected,
8364
8397
  setSelected,
@@ -8433,6 +8466,7 @@ function TimePicker({
8433
8466
  /* @__PURE__ */ jsx15(
8434
8467
  Button,
8435
8468
  {
8469
+ type: "button",
8436
8470
  variant: "text",
8437
8471
  onClick: () => handleIncrement(unit),
8438
8472
  children: /* @__PURE__ */ jsxs6(
@@ -8464,20 +8498,18 @@ function TimePicker({
8464
8498
  }
8465
8499
  ),
8466
8500
  /* @__PURE__ */ jsx15(
8467
- TextField,
8501
+ InputStyled,
8468
8502
  {
8469
8503
  value: unit === "hours" ? hours : minutes,
8470
8504
  onChange: (e5) => handleInputValue(e5.target.value),
8471
8505
  type: "text",
8472
- placeholder: "00",
8473
- typography: "labelSmall",
8474
- fontWeight: "regular",
8475
- textAlign: "center"
8506
+ placeholder: "00"
8476
8507
  }
8477
8508
  ),
8478
8509
  /* @__PURE__ */ jsx15(
8479
8510
  Button,
8480
8511
  {
8512
+ type: "button",
8481
8513
  variant: "text",
8482
8514
  onClick: () => handleDecrement(unit),
8483
8515
  children: /* @__PURE__ */ jsxs6(
@@ -8517,6 +8549,7 @@ function TimePicker({
8517
8549
  /* @__PURE__ */ jsx15(TimePickerFooterStyled, { children: /* @__PURE__ */ jsx15(
8518
8550
  Button,
8519
8551
  {
8552
+ type: "button",
8520
8553
  variant: "text",
8521
8554
  color: "brand",
8522
8555
  onClick: () => handleInputValue(`${hours}:${minutes}`),
@@ -9003,10 +9036,65 @@ function StepWrapper(_a) {
9003
9036
  return /* @__PURE__ */ jsx18(Box2, __spreadProps(__spreadValues({}, props), { children }));
9004
9037
  }
9005
9038
 
9039
+ // src/components/Card.tsx
9040
+ import React5 from "react";
9041
+ import { Box as Box3, Card as CardRadix } from "@radix-ui/themes";
9042
+ import { jsx as jsx19 } from "react/jsx-runtime";
9043
+ var CardStyled = styled(CardRadix, {
9044
+ display: "flex",
9045
+ flexDirection: "column",
9046
+ width: "370px",
9047
+ borderRadius: "$2xl",
9048
+ border: "1px solid $dark100",
9049
+ overflow: "hidden",
9050
+ padding: "16px",
9051
+ defaultVariants: {
9052
+ color: "primary",
9053
+ boxShadow: true
9054
+ },
9055
+ variants: {
9056
+ color: {
9057
+ primary: {
9058
+ backgroundColor: "$dark50",
9059
+ border: "1px solid $dark200"
9060
+ },
9061
+ disable: {
9062
+ backgroundColor: "$grey50",
9063
+ border: "1px solid $dark200"
9064
+ },
9065
+ error: {
9066
+ backgroundColor: "$error50",
9067
+ border: "1px solid $error600"
9068
+ }
9069
+ },
9070
+ boxShadow: {
9071
+ true: {
9072
+ boxShadow: "0 2px 4px rgba(35, 53, 67, 0.16), 0 4px 4px rgba(35, 53, 67, 0.08)"
9073
+ },
9074
+ false: {
9075
+ boxShadow: "none"
9076
+ }
9077
+ }
9078
+ }
9079
+ });
9080
+ var CardContainer = styled(Box3, {
9081
+ display: "flex",
9082
+ flexDirection: "row"
9083
+ });
9084
+ function Card(_a) {
9085
+ var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
9086
+ return /* @__PURE__ */ jsx19(CardStyled, __spreadProps(__spreadValues({}, props), { children: React5.Children.map(children, (child) => {
9087
+ if (React5.isValidElement(child)) {
9088
+ return React5.cloneElement(child, { size: props.size });
9089
+ }
9090
+ return child;
9091
+ }) }));
9092
+ }
9093
+
9006
9094
  // src/components/TextareaField.tsx
9007
9095
  import { TextArea as TextAreaRadix } from "@radix-ui/themes";
9008
9096
  import { useRef as useRef3 } from "react";
9009
- import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
9097
+ import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
9010
9098
  var TextareaFieldStyle = styled(TextAreaRadix, {
9011
9099
  display: "flex",
9012
9100
  width: "fit-content",
@@ -9067,7 +9155,7 @@ function TextareaField(_a) {
9067
9155
  const inputRef = useRef3(null);
9068
9156
  const badgeRef = useRef3(null);
9069
9157
  if (!maxLength) {
9070
- return /* @__PURE__ */ jsx19(TextareaContainer, { children: /* @__PURE__ */ jsx19(TextareaFieldStyle, __spreadProps(__spreadValues({}, props), { ref: inputRef })) });
9158
+ return /* @__PURE__ */ jsx20(TextareaContainer, { children: /* @__PURE__ */ jsx20(TextareaFieldStyle, __spreadProps(__spreadValues({}, props), { ref: inputRef })) });
9071
9159
  }
9072
9160
  const handleInput = () => {
9073
9161
  var _a2;
@@ -9075,7 +9163,7 @@ function TextareaField(_a) {
9075
9163
  if (badgeRef.current) badgeRef.current.textContent = String(remainingChars);
9076
9164
  };
9077
9165
  return /* @__PURE__ */ jsxs8(TextareaContainer, { css: { paddingBottom: "3.25rem" }, children: [
9078
- /* @__PURE__ */ jsx19(
9166
+ /* @__PURE__ */ jsx20(
9079
9167
  TextareaFieldStyle,
9080
9168
  __spreadValues({
9081
9169
  ref: inputRef,
@@ -9083,13 +9171,13 @@ function TextareaField(_a) {
9083
9171
  maxLength
9084
9172
  }, props)
9085
9173
  ),
9086
- /* @__PURE__ */ jsx19(TextareaLimitIndicator, { children: /* @__PURE__ */ jsx19(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
9174
+ /* @__PURE__ */ jsx20(TextareaLimitIndicator, { children: /* @__PURE__ */ jsx20(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
9087
9175
  ] });
9088
9176
  }
9089
9177
 
9090
9178
  // src/components/Grid.tsx
9091
9179
  import { Grid as GridRadix } from "@radix-ui/themes";
9092
- import { jsx as jsx20 } from "react/jsx-runtime";
9180
+ import { jsx as jsx21 } from "react/jsx-runtime";
9093
9181
  var GridStyled = styled(GridRadix, {
9094
9182
  display: "grid",
9095
9183
  variants: {
@@ -9211,12 +9299,12 @@ var GridStyled = styled(GridRadix, {
9211
9299
  });
9212
9300
  function Grid(_a) {
9213
9301
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9214
- return /* @__PURE__ */ jsx20(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9302
+ return /* @__PURE__ */ jsx21(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
9215
9303
  }
9216
9304
 
9217
9305
  // src/components/Container.tsx
9218
9306
  import { Container as ContainerRadix } from "@radix-ui/themes";
9219
- import { jsx as jsx21 } from "react/jsx-runtime";
9307
+ import { jsx as jsx22 } from "react/jsx-runtime";
9220
9308
  var ContainerStyled = styled(ContainerRadix, {
9221
9309
  variants: {
9222
9310
  size: {
@@ -9246,12 +9334,12 @@ var ContainerStyled = styled(ContainerRadix, {
9246
9334
  });
9247
9335
  function Container(_a) {
9248
9336
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9249
- return /* @__PURE__ */ jsx21(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9337
+ return /* @__PURE__ */ jsx22(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
9250
9338
  }
9251
9339
 
9252
9340
  // src/components/Section.tsx
9253
9341
  import { Section as SectionRadix } from "@radix-ui/themes";
9254
- import { jsx as jsx22 } from "react/jsx-runtime";
9342
+ import { jsx as jsx23 } from "react/jsx-runtime";
9255
9343
  var SectionStyled = styled(SectionRadix, {
9256
9344
  variants: {
9257
9345
  size: {
@@ -9275,7 +9363,7 @@ var SectionStyled = styled(SectionRadix, {
9275
9363
  });
9276
9364
  function Section(_a) {
9277
9365
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
9278
- return /* @__PURE__ */ jsx22(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9366
+ return /* @__PURE__ */ jsx23(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
9279
9367
  }
9280
9368
  export {
9281
9369
  Alert,
@@ -9297,6 +9385,9 @@ export {
9297
9385
  ButtonItem,
9298
9386
  ButtonItemStyled,
9299
9387
  Calendar,
9388
+ Card,
9389
+ CardContainer,
9390
+ CardStyled,
9300
9391
  CheckboxGroup,
9301
9392
  CheckboxGroupStyled,
9302
9393
  CheckboxItem,
@@ -9311,6 +9402,7 @@ export {
9311
9402
  Grid,
9312
9403
  GridStyled,
9313
9404
  Icon,
9405
+ InputStyled,
9314
9406
  Modal,
9315
9407
  ModalContentStyled,
9316
9408
  ModalStyled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -2,7 +2,6 @@ import React from 'react'
2
2
  import { ComponentProps, ElementType } from 'react'
3
3
  import { styled } from '../styles'
4
4
  import { Badge as BadgeRadix } from '@radix-ui/themes'
5
- import { fontWeights } from '@lets-events/tokens'
6
5
  export const BadgeStyled = styled(BadgeRadix, {
7
6
  fontFamily: '$default',
8
7
  borderRadius: '$sm',
@@ -75,7 +75,10 @@ export function Calendar({
75
75
  return (
76
76
  <div>
77
77
  <CalendarStyled {...props} ref={dropdownRef}>
78
- <CalendarButtonStyled onClick={() => setShowCalendar((prev) => !prev)}>
78
+ <CalendarButtonStyled
79
+ type="button"
80
+ onClick={() => setShowCalendar((prev) => !prev)}
81
+ >
79
82
  <TextField
80
83
  placeholder="00/00/0000"
81
84
  type="text"
@@ -114,6 +117,7 @@ export function Calendar({
114
117
  <Button
115
118
  variant="text"
116
119
  color="brand"
120
+ type="button"
117
121
  onClick={() => {
118
122
  setShowCalendar(false);
119
123
  }}
@@ -0,0 +1,69 @@
1
+ import React from 'react'
2
+ import { ComponentProps, ElementType } from 'react'
3
+ import { styled } from '../styles'
4
+ import { Box, Card as CardRadix } from '@radix-ui/themes'
5
+
6
+ export const CardStyled = styled(CardRadix, {
7
+ display: 'flex',
8
+ flexDirection: 'column',
9
+ width: '370px',
10
+ borderRadius: '$2xl',
11
+ border: '1px solid $dark100',
12
+ overflow: 'hidden',
13
+ padding: '16px',
14
+ defaultVariants: {
15
+ color: 'primary',
16
+ boxShadow: true,
17
+ },
18
+ variants: {
19
+ color: {
20
+ primary: {
21
+ backgroundColor: '$dark50',
22
+ border: '1px solid $dark200',
23
+ },
24
+ disable: {
25
+ backgroundColor: '$grey50',
26
+ border: '1px solid $dark200',
27
+ },
28
+ error: {
29
+ backgroundColor: '$error50',
30
+ border: '1px solid $error600',
31
+ }
32
+ },
33
+ boxShadow:{
34
+ true: {
35
+ boxShadow: '0 2px 4px rgba(35, 53, 67, 0.16), 0 4px 4px rgba(35, 53, 67, 0.08)',
36
+ },
37
+ false: {
38
+ boxShadow: 'none',
39
+ }
40
+ }
41
+ }
42
+ });
43
+
44
+
45
+
46
+ export const CardContainer = styled(Box, {
47
+ display: 'flex',
48
+ flexDirection: 'row'
49
+ })
50
+
51
+ export type CardProps = ComponentProps<typeof CardStyled> & {
52
+ children: React.ReactNode
53
+ as?: ElementType
54
+ }
55
+
56
+
57
+
58
+ export function Card({ asChild, children, ...props }: CardProps) {
59
+ return (
60
+ <CardStyled {...props}>
61
+ {React.Children.map(children, (child) => {
62
+ if (React.isValidElement(child)) {
63
+ return React.cloneElement(child, { size: props.size } as any)
64
+ }
65
+ return child
66
+ })}
67
+ </CardStyled>
68
+ )
69
+ }