@ceed/ads 0.0.60 → 0.0.62

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/framer/index.js CHANGED
@@ -35980,9 +35980,50 @@ function Accordions(props) {
35980
35980
  }
35981
35981
  Accordions.displayName = "Accordions";
35982
35982
 
35983
- // src/components/Box/Box.tsx
35983
+ // src/components/FormControl/FormControl.tsx
35984
35984
  import { motion as motion2 } from "framer-motion";
35985
- var MotionBox = motion2(Box_default);
35985
+ var MotionFormControl = motion2(FormControl_default);
35986
+ var FormControl3 = MotionFormControl;
35987
+ FormControl3.displayName = "FormControl";
35988
+
35989
+ // src/components/FormControl/index.ts
35990
+ var FormControl_default2 = FormControl3;
35991
+
35992
+ // src/components/FormLabel/FormLabel.tsx
35993
+ import { motion as motion3 } from "framer-motion";
35994
+ var MotionFormLabel = motion3(FormLabel_default);
35995
+ var FormLabel3 = MotionFormLabel;
35996
+ FormLabel3.displayName = "FormLabel";
35997
+
35998
+ // src/components/FormLabel/index.ts
35999
+ var FormLabel_default2 = FormLabel3;
36000
+
36001
+ // src/components/FormHelperText/FormHelperText.tsx
36002
+ import { motion as motion4 } from "framer-motion";
36003
+ var MotionFormHelperText = motion4(FormHelperText_default);
36004
+ var FormHelperText3 = MotionFormHelperText;
36005
+ FormHelperText3.displayName = "FormHelperText";
36006
+
36007
+ // src/components/FormHelperText/index.ts
36008
+ var FormHelperText_default2 = FormHelperText3;
36009
+
36010
+ // src/components/Autocomplete/Autocomplete.tsx
36011
+ function Autocomplete3(props) {
36012
+ const _a = props, { label, error, helperText, color: color2, size } = _a, innerProps = __objRest(_a, ["label", "error", "helperText", "color", "size"]);
36013
+ if (label) {
36014
+ return /* @__PURE__ */ jsxs2(FormControl_default2, { color: color2, size, error, children: [
36015
+ /* @__PURE__ */ jsx2(FormLabel_default2, { children: label }),
36016
+ /* @__PURE__ */ jsx2(Autocomplete_default, __spreadValues({}, innerProps)),
36017
+ helperText && /* @__PURE__ */ jsx2(FormHelperText_default2, { children: helperText })
36018
+ ] });
36019
+ }
36020
+ return /* @__PURE__ */ jsx2(Autocomplete_default, __spreadProps(__spreadValues({}, innerProps), { color: color2, size }));
36021
+ }
36022
+ Autocomplete3.displayName = "Autocomplete";
36023
+
36024
+ // src/components/Box/Box.tsx
36025
+ import { motion as motion5 } from "framer-motion";
36026
+ var MotionBox = motion5(Box_default);
35986
36027
  var Box2 = MotionBox;
35987
36028
  Box2.displayName = "Box";
35988
36029
 
@@ -35991,8 +36032,8 @@ var Box_default2 = Box2;
35991
36032
 
35992
36033
  // src/components/Button/Button.tsx
35993
36034
  import { forwardRef as forwardRef79 } from "react";
35994
- import { motion as motion3 } from "framer-motion";
35995
- var MotionButton = motion3(Button_default);
36035
+ import { motion as motion6 } from "framer-motion";
36036
+ var MotionButton = motion6(Button_default);
35996
36037
  var Button3 = forwardRef79(
35997
36038
  (props, ref) => {
35998
36039
  return /* @__PURE__ */ jsx2(
@@ -36991,11 +37032,11 @@ var ChevronRight_default = createSvgIcon2(/* @__PURE__ */ _jsx107("path", {
36991
37032
  }), "ChevronRight");
36992
37033
 
36993
37034
  // src/components/Calendar/Calendar.tsx
36994
- import { AnimatePresence, motion as motion6 } from "framer-motion";
37035
+ import { AnimatePresence, motion as motion9 } from "framer-motion";
36995
37036
 
36996
37037
  // src/components/Typography/Typography.tsx
36997
- import { motion as motion4 } from "framer-motion";
36998
- var MotionTypography = motion4(Typography_default);
37038
+ import { motion as motion7 } from "framer-motion";
37039
+ var MotionTypography = motion7(Typography_default);
36999
37040
  var Typography3 = (props) => {
37000
37041
  return /* @__PURE__ */ jsx2(MotionTypography, __spreadValues({}, props));
37001
37042
  };
@@ -37075,8 +37116,8 @@ var isSameMonth = (date1, date2) => {
37075
37116
  };
37076
37117
 
37077
37118
  // src/components/IconButton/IconButton.tsx
37078
- import { motion as motion5 } from "framer-motion";
37079
- var MotionIconButton = motion5(IconButton_default);
37119
+ import { motion as motion8 } from "framer-motion";
37120
+ var MotionIconButton = motion8(IconButton_default);
37080
37121
  var IconButton3 = (props) => {
37081
37122
  return /* @__PURE__ */ jsx2(MotionIconButton, __spreadValues({}, props));
37082
37123
  };
@@ -37405,18 +37446,17 @@ var CalendarHeader = styled_default2("div", {
37405
37446
  var CalendarViewContainer = styled_default2("div", {
37406
37447
  name: "Calendar",
37407
37448
  slot: "viewContainer"
37408
- })(({ theme }) => ({
37449
+ })(({ theme, viewType }) => ({
37409
37450
  paddingLeft: theme.spacing(1),
37410
37451
  paddingRight: theme.spacing(1),
37411
37452
  position: "relative",
37412
37453
  overflow: "hidden",
37413
- minHeight: "250px"
37454
+ minHeight: viewType === "day" ? "250px" : "unset"
37414
37455
  }));
37415
- var CalendarViewTable = styled_default2(motion6.table, {
37456
+ var CalendarViewTable = styled_default2(motion9.table, {
37416
37457
  name: "Calendar",
37417
37458
  slot: "viewTable"
37418
37459
  })(({ theme }) => ({
37419
- position: "absolute",
37420
37460
  borderSpacing: 0,
37421
37461
  "& td, & th": {
37422
37462
  padding: 0
@@ -37568,12 +37608,14 @@ var variants = {
37568
37608
  };
37569
37609
  },
37570
37610
  center: {
37611
+ position: "relative",
37571
37612
  zIndex: 1,
37572
37613
  x: 0,
37573
37614
  opacity: 1
37574
37615
  },
37575
37616
  exit: (direction) => {
37576
37617
  return {
37618
+ position: "absolute",
37577
37619
  zIndex: 0,
37578
37620
  x: direction < 0 ? 300 : -300,
37579
37621
  opacity: 0
@@ -37595,7 +37637,7 @@ var PickerDays = (props) => {
37595
37637
  () => getWeekdayNames(ownerState.locale || "default"),
37596
37638
  [ownerState.locale]
37597
37639
  );
37598
- return /* @__PURE__ */ jsx2(CalendarViewContainer, { children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsxs2(
37640
+ return /* @__PURE__ */ jsx2(CalendarViewContainer, { viewType: "day", children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsxs2(
37599
37641
  CalendarViewTable,
37600
37642
  {
37601
37643
  custom: ownerState.direction,
@@ -37674,7 +37716,7 @@ var PickerMonths = (props) => {
37674
37716
  },
37675
37717
  [[]]
37676
37718
  );
37677
- return /* @__PURE__ */ jsx2(CalendarViewContainer, { children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsx2(
37719
+ return /* @__PURE__ */ jsx2(CalendarViewContainer, { viewType: "month", children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsx2(
37678
37720
  CalendarViewTable,
37679
37721
  {
37680
37722
  custom: ownerState.direction,
@@ -37781,8 +37823,8 @@ Calendar.displayName = "Calendar";
37781
37823
  var Calendar_default = Calendar;
37782
37824
 
37783
37825
  // src/components/Checkbox/Checkbox.tsx
37784
- import { motion as motion7 } from "framer-motion";
37785
- var MotionCheckbox = motion7(Checkbox_default);
37826
+ import { motion as motion10 } from "framer-motion";
37827
+ var MotionCheckbox = motion10(Checkbox_default);
37786
37828
  var Checkbox3 = (props) => {
37787
37829
  return /* @__PURE__ */ jsx2(MotionCheckbox, __spreadValues({}, props));
37788
37830
  };
@@ -37838,8 +37880,8 @@ import {
37838
37880
  } from "react";
37839
37881
 
37840
37882
  // src/components/Sheet/Sheet.tsx
37841
- import { motion as motion8 } from "framer-motion";
37842
- var MotionSheet = motion8(Sheet_default);
37883
+ import { motion as motion11 } from "framer-motion";
37884
+ var MotionSheet = motion11(Sheet_default);
37843
37885
  var Sheet3 = MotionSheet;
37844
37886
  Sheet3.displayName = "Sheet";
37845
37887
 
@@ -37930,8 +37972,8 @@ function TableBody(props) {
37930
37972
  TableBody.displayName = "TableBody";
37931
37973
 
37932
37974
  // src/components/Stack/Stack.tsx
37933
- import { motion as motion9 } from "framer-motion";
37934
- var MotionStack = motion9(Stack_default);
37975
+ import { motion as motion12 } from "framer-motion";
37976
+ var MotionStack = motion12(Stack_default);
37935
37977
  var Stack2 = MotionStack;
37936
37978
  Stack2.displayName = "Stack";
37937
37979
 
@@ -37939,6 +37981,21 @@ Stack2.displayName = "Stack";
37939
37981
  var Stack_default2 = Stack2;
37940
37982
 
37941
37983
  // src/components/DataTable/DataTable.tsx
37984
+ var OverlayWrapper = styled_default2("tr", {
37985
+ name: "DataTable",
37986
+ slot: "overlayWrapper"
37987
+ })({
37988
+ position: "sticky",
37989
+ top: `calc(var(--unstable_TableCell-height, 32px))`,
37990
+ left: 0,
37991
+ right: 0,
37992
+ zIndex: 1,
37993
+ "& > td": {
37994
+ height: 0,
37995
+ padding: 0,
37996
+ border: "none !important"
37997
+ }
37998
+ });
37942
37999
  var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
37943
38000
  function TablePagination(props) {
37944
38001
  const {
@@ -38206,11 +38263,14 @@ function DataTable(props) {
38206
38263
  rowCount: _4,
38207
38264
  columns: __,
38208
38265
  onPaginationModelChange: ___,
38266
+ paginationMode: ____,
38209
38267
  paginationModel: paginationModel,
38268
+ loading,
38210
38269
  slots: {
38211
38270
  checkbox: RenderCheckbox = Checkbox_default2,
38212
38271
  toolbar: Toolbar,
38213
- footer: Footer
38272
+ footer: Footer,
38273
+ loadingOverlay: LoadingOverlay = () => /* @__PURE__ */ jsx2(LinearProgress_default, {})
38214
38274
  } = {},
38215
38275
  slotProps: {
38216
38276
  checkbox: checkboxProps = {},
@@ -38228,7 +38288,10 @@ function DataTable(props) {
38228
38288
  // columns is used in useDataTableRenderer
38229
38289
  "onPaginationModelChange",
38230
38290
  // onPaginationModelChange is used in useDataTableRenderer
38291
+ "paginationMode",
38292
+ // paginationMode is used in useDataTableRenderer
38231
38293
  "paginationModel",
38294
+ "loading",
38232
38295
  "slots",
38233
38296
  "slotProps"
38234
38297
  ]);
@@ -38272,14 +38335,14 @@ function DataTable(props) {
38272
38335
  ] }),
38273
38336
  /* @__PURE__ */ jsxs2(Button_default2, { size: "sm", variant: "plain", onClick: onTotalSelect, children: [
38274
38337
  "Select all ",
38275
- numberFormatter(rows.length),
38338
+ numberFormatter(rowCount != null ? rowCount : rows.length),
38276
38339
  " items"
38277
38340
  ] })
38278
38341
  ] }),
38279
38342
  isTotalSelected && /* @__PURE__ */ jsxs2(Stack_default2, { direction: "row", spacing: 1, alignItems: "center", children: [
38280
38343
  /* @__PURE__ */ jsxs2(Typography_default2, { level: "body-xs", children: [
38281
38344
  "All ",
38282
- numberFormatter(rows.length),
38345
+ numberFormatter(rowCount != null ? rowCount : rows.length),
38283
38346
  " items are selected."
38284
38347
  ] }),
38285
38348
  /* @__PURE__ */ jsx2(
@@ -38336,50 +38399,65 @@ function DataTable(props) {
38336
38399
  c.field
38337
38400
  ))
38338
38401
  ] }) }),
38339
- /* @__PURE__ */ jsx2("tbody", { children: dataInPage.map((row, rowIndex) => {
38340
- const rowId = `${rowIndex + (page - 1) * pageSize2}`;
38341
- return /* @__PURE__ */ jsxs2(
38342
- "tr",
38402
+ /* @__PURE__ */ jsxs2("tbody", { children: [
38403
+ /* @__PURE__ */ jsx2(OverlayWrapper, { children: !!loading && /* @__PURE__ */ jsx2("td", { children: /* @__PURE__ */ jsx2(
38404
+ Box_default2,
38343
38405
  {
38344
- role: checkboxSelection ? "checkbox" : void 0,
38345
- tabIndex: checkboxSelection ? -1 : void 0,
38346
- onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
38347
- "aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0,
38348
- children: [
38349
- checkboxSelection && /* @__PURE__ */ jsx2(
38350
- "th",
38351
- {
38352
- scope: "row",
38353
- style: {
38354
- textAlign: "center"
38355
- },
38356
- children: /* @__PURE__ */ jsx2(
38357
- RenderCheckbox,
38358
- __spreadValues({
38359
- onChange: (e) => onCheckboxChange(e, rowId),
38360
- checked: isSelectedRow(rowId)
38361
- }, checkboxProps)
38362
- )
38363
- }
38364
- ),
38365
- columns.map((column2) => {
38366
- var _a2, _b;
38367
- return /* @__PURE__ */ jsx2(
38368
- "td",
38406
+ sx: {
38407
+ position: "absolute",
38408
+ top: 0,
38409
+ left: 0,
38410
+ right: 0
38411
+ },
38412
+ children: /* @__PURE__ */ jsx2(LoadingOverlay, {})
38413
+ }
38414
+ ) }) }),
38415
+ /* @__PURE__ */ jsx2(OverlayWrapper, {}),
38416
+ dataInPage.map((row, rowIndex) => {
38417
+ const rowId = `${rowIndex + (page - 1) * pageSize2}`;
38418
+ return /* @__PURE__ */ jsxs2(
38419
+ "tr",
38420
+ {
38421
+ role: checkboxSelection ? "checkbox" : void 0,
38422
+ tabIndex: checkboxSelection ? -1 : void 0,
38423
+ onClick: checkboxSelection ? (e) => onCheckboxChange(e, rowId) : void 0,
38424
+ "aria-checked": checkboxSelection ? isSelectedRow(rowId) : void 0,
38425
+ children: [
38426
+ checkboxSelection && /* @__PURE__ */ jsx2(
38427
+ "th",
38369
38428
  {
38429
+ scope: "row",
38370
38430
  style: {
38371
- textAlign: column2.type === "number" ? "end" : "start"
38431
+ textAlign: "center"
38372
38432
  },
38373
- children: (_b = (_a2 = column2.renderCell) == null ? void 0 : _a2.call(column2, { row, value: row[column2.field] })) != null ? _b : row[column2.field]
38374
- },
38375
- column2.field
38376
- );
38377
- })
38378
- ]
38379
- },
38380
- rowId
38381
- );
38382
- }) }),
38433
+ children: /* @__PURE__ */ jsx2(
38434
+ RenderCheckbox,
38435
+ __spreadValues({
38436
+ onChange: (e) => onCheckboxChange(e, rowId),
38437
+ checked: isSelectedRow(rowId)
38438
+ }, checkboxProps)
38439
+ )
38440
+ }
38441
+ ),
38442
+ columns.map((column2) => {
38443
+ var _a2, _b;
38444
+ return /* @__PURE__ */ jsx2(
38445
+ "td",
38446
+ {
38447
+ style: {
38448
+ textAlign: column2.type === "number" ? "end" : "start"
38449
+ },
38450
+ children: (_b = (_a2 = column2.renderCell) == null ? void 0 : _a2.call(column2, { row, value: row[column2.field] })) != null ? _b : row[column2.field]
38451
+ },
38452
+ column2.field
38453
+ );
38454
+ })
38455
+ ]
38456
+ },
38457
+ rowId
38458
+ );
38459
+ })
38460
+ ] }),
38383
38461
  Footer && /* @__PURE__ */ jsx2(Footer, {})
38384
38462
  ] }))
38385
38463
  })
@@ -41997,35 +42075,6 @@ var CalendarToday_default = createSvgIcon2(/* @__PURE__ */ _jsx108("path", {
41997
42075
 
41998
42076
  // src/components/Input/Input.tsx
41999
42077
  import { motion as motion13 } from "framer-motion";
42000
-
42001
- // src/components/FormControl/FormControl.tsx
42002
- import { motion as motion10 } from "framer-motion";
42003
- var MotionFormControl = motion10(FormControl_default);
42004
- var FormControl3 = MotionFormControl;
42005
- FormControl3.displayName = "FormControl";
42006
-
42007
- // src/components/FormControl/index.ts
42008
- var FormControl_default2 = FormControl3;
42009
-
42010
- // src/components/FormLabel/FormLabel.tsx
42011
- import { motion as motion11 } from "framer-motion";
42012
- var MotionFormLabel = motion11(FormLabel_default);
42013
- var FormLabel3 = MotionFormLabel;
42014
- FormLabel3.displayName = "FormLabel";
42015
-
42016
- // src/components/FormLabel/index.ts
42017
- var FormLabel_default2 = FormLabel3;
42018
-
42019
- // src/components/FormHelperText/FormHelperText.tsx
42020
- import { motion as motion12 } from "framer-motion";
42021
- var MotionFormHelperText = motion12(FormHelperText_default);
42022
- var FormHelperText3 = MotionFormHelperText;
42023
- FormHelperText3.displayName = "FormHelperText";
42024
-
42025
- // src/components/FormHelperText/index.ts
42026
- var FormHelperText_default2 = FormHelperText3;
42027
-
42028
- // src/components/Input/Input.tsx
42029
42078
  var MotionInput = motion13(Input_default);
42030
42079
  var Input3 = (props) => {
42031
42080
  const _a = props, { label, helperText, error, style: style4, size, color: color2 } = _a, innerProps = __objRest(_a, ["label", "helperText", "error", "style", "size", "color"]);
@@ -42895,6 +42944,19 @@ Tooltip3.displayName = "Tooltip";
42895
42944
  // src/components/Autocomplete/Autocomplete.framer.ts
42896
42945
  import { ControlType } from "framer";
42897
42946
  var autocompletePropertyControls = {
42947
+ label: {
42948
+ title: "Label",
42949
+ type: ControlType.String
42950
+ },
42951
+ helperText: {
42952
+ title: "Helper Text",
42953
+ type: ControlType.String
42954
+ },
42955
+ error: {
42956
+ title: "Error",
42957
+ type: ControlType.Boolean,
42958
+ defaultValue: false
42959
+ },
42898
42960
  options: {
42899
42961
  title: "Options",
42900
42962
  type: ControlType.Array,
@@ -43288,6 +43350,10 @@ var dataTablePropertyControls = {
43288
43350
  type: ControlType10.Boolean,
43289
43351
  defaultValue: false
43290
43352
  },
43353
+ loading: {
43354
+ type: ControlType10.Boolean,
43355
+ defaultValue: false
43356
+ },
43291
43357
  onPaginationModelChange: {
43292
43358
  type: ControlType10.EventHandler
43293
43359
  },
@@ -43950,12 +44016,12 @@ var textareaPropertyControls = {
43950
44016
  // src/components/Typography/Typography.framer.ts
43951
44017
  import { ControlType as ControlType27 } from "framer";
43952
44018
  var typographyPropertyControls = {
43953
- // color: {
43954
- // title: "Color",
43955
- // type: ControlType.Enum,
43956
- // options: ["primary", "neutral", "danger", "success", "warning"],
43957
- // optionTitles: ["Primary", "Neutral", "Danger", "Success", "Warning"],
43958
- // },
44019
+ textAlign: {
44020
+ title: "Text Align",
44021
+ type: ControlType27.Enum,
44022
+ options: ["start", "center", "end"],
44023
+ defaultValue: "start"
44024
+ },
43959
44025
  level: {
43960
44026
  title: "Level",
43961
44027
  type: ControlType27.Enum,
@@ -44010,7 +44076,7 @@ export {
44010
44076
  AccordionSummary3 as AccordionSummary,
44011
44077
  Accordions,
44012
44078
  AspectRatio_default as AspectRatio,
44013
- Autocomplete_default as Autocomplete,
44079
+ Autocomplete3 as Autocomplete,
44014
44080
  AutocompleteListbox_default as AutocompleteListbox,
44015
44081
  AutocompleteOption_default as AutocompleteOption,
44016
44082
  Avatar_default as Avatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/ads",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",