@ceed/ads 0.0.59 → 0.0.61

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
@@ -34612,9 +34612,50 @@ function Accordions(props) {
34612
34612
  }
34613
34613
  Accordions.displayName = "Accordions";
34614
34614
 
34615
- // src/components/Box/Box.tsx
34615
+ // src/components/FormControl/FormControl.tsx
34616
34616
  import { motion as motion2 } from "framer-motion";
34617
- var MotionBox = motion2(Box_default);
34617
+ var MotionFormControl = motion2(FormControl_default);
34618
+ var FormControl3 = MotionFormControl;
34619
+ FormControl3.displayName = "FormControl";
34620
+
34621
+ // src/components/FormControl/index.ts
34622
+ var FormControl_default2 = FormControl3;
34623
+
34624
+ // src/components/FormLabel/FormLabel.tsx
34625
+ import { motion as motion3 } from "framer-motion";
34626
+ var MotionFormLabel = motion3(FormLabel_default);
34627
+ var FormLabel3 = MotionFormLabel;
34628
+ FormLabel3.displayName = "FormLabel";
34629
+
34630
+ // src/components/FormLabel/index.ts
34631
+ var FormLabel_default2 = FormLabel3;
34632
+
34633
+ // src/components/FormHelperText/FormHelperText.tsx
34634
+ import { motion as motion4 } from "framer-motion";
34635
+ var MotionFormHelperText = motion4(FormHelperText_default);
34636
+ var FormHelperText3 = MotionFormHelperText;
34637
+ FormHelperText3.displayName = "FormHelperText";
34638
+
34639
+ // src/components/FormHelperText/index.ts
34640
+ var FormHelperText_default2 = FormHelperText3;
34641
+
34642
+ // src/components/Autocomplete/Autocomplete.tsx
34643
+ function Autocomplete3(props) {
34644
+ const _a = props, { label, error, helperText, color: color2, size } = _a, innerProps = __objRest(_a, ["label", "error", "helperText", "color", "size"]);
34645
+ if (label) {
34646
+ return /* @__PURE__ */ jsxs2(FormControl_default2, { color: color2, size, error, children: [
34647
+ /* @__PURE__ */ jsx2(FormLabel_default2, { children: label }),
34648
+ /* @__PURE__ */ jsx2(Autocomplete_default, __spreadValues({}, innerProps)),
34649
+ helperText && /* @__PURE__ */ jsx2(FormHelperText_default2, { children: helperText })
34650
+ ] });
34651
+ }
34652
+ return /* @__PURE__ */ jsx2(Autocomplete_default, __spreadProps(__spreadValues({}, innerProps), { color: color2, size }));
34653
+ }
34654
+ Autocomplete3.displayName = "Autocomplete";
34655
+
34656
+ // src/components/Box/Box.tsx
34657
+ import { motion as motion5 } from "framer-motion";
34658
+ var MotionBox = motion5(Box_default);
34618
34659
  var Box2 = MotionBox;
34619
34660
  Box2.displayName = "Box";
34620
34661
 
@@ -34623,8 +34664,8 @@ var Box_default2 = Box2;
34623
34664
 
34624
34665
  // src/components/Button/Button.tsx
34625
34666
  import { forwardRef as forwardRef79 } from "react";
34626
- import { motion as motion3 } from "framer-motion";
34627
- var MotionButton = motion3(Button_default);
34667
+ import { motion as motion6 } from "framer-motion";
34668
+ var MotionButton = motion6(Button_default);
34628
34669
  var Button3 = forwardRef79(
34629
34670
  (props, ref) => {
34630
34671
  return /* @__PURE__ */ jsx2(
@@ -35588,11 +35629,11 @@ var ChevronRight_default = createSvgIcon2(/* @__PURE__ */ _jsx105("path", {
35588
35629
  }), "ChevronRight");
35589
35630
 
35590
35631
  // src/components/Calendar/Calendar.tsx
35591
- import { AnimatePresence, motion as motion6 } from "framer-motion";
35632
+ import { AnimatePresence, motion as motion9 } from "framer-motion";
35592
35633
 
35593
35634
  // src/components/Typography/Typography.tsx
35594
- import { motion as motion4 } from "framer-motion";
35595
- var MotionTypography = motion4(Typography_default);
35635
+ import { motion as motion7 } from "framer-motion";
35636
+ var MotionTypography = motion7(Typography_default);
35596
35637
  var Typography3 = (props) => {
35597
35638
  return /* @__PURE__ */ jsx2(MotionTypography, __spreadValues({}, props));
35598
35639
  };
@@ -35672,8 +35713,8 @@ var isSameMonth = (date1, date2) => {
35672
35713
  };
35673
35714
 
35674
35715
  // src/components/IconButton/IconButton.tsx
35675
- import { motion as motion5 } from "framer-motion";
35676
- var MotionIconButton = motion5(IconButton_default);
35716
+ import { motion as motion8 } from "framer-motion";
35717
+ var MotionIconButton = motion8(IconButton_default);
35677
35718
  var IconButton3 = (props) => {
35678
35719
  return /* @__PURE__ */ jsx2(MotionIconButton, __spreadValues({}, props));
35679
35720
  };
@@ -36002,18 +36043,17 @@ var CalendarHeader = styled_default2("div", {
36002
36043
  var CalendarViewContainer = styled_default2("div", {
36003
36044
  name: "Calendar",
36004
36045
  slot: "viewContainer"
36005
- })(({ theme }) => ({
36046
+ })(({ theme, viewType }) => ({
36006
36047
  paddingLeft: theme.spacing(1),
36007
36048
  paddingRight: theme.spacing(1),
36008
36049
  position: "relative",
36009
36050
  overflow: "hidden",
36010
- minHeight: "250px"
36051
+ minHeight: viewType === "day" ? "250px" : "unset"
36011
36052
  }));
36012
- var CalendarViewTable = styled_default2(motion6.table, {
36053
+ var CalendarViewTable = styled_default2(motion9.table, {
36013
36054
  name: "Calendar",
36014
36055
  slot: "viewTable"
36015
36056
  })(({ theme }) => ({
36016
- position: "absolute",
36017
36057
  borderSpacing: 0,
36018
36058
  "& td, & th": {
36019
36059
  padding: 0
@@ -36165,12 +36205,14 @@ var variants = {
36165
36205
  };
36166
36206
  },
36167
36207
  center: {
36208
+ position: "relative",
36168
36209
  zIndex: 1,
36169
36210
  x: 0,
36170
36211
  opacity: 1
36171
36212
  },
36172
36213
  exit: (direction) => {
36173
36214
  return {
36215
+ position: "absolute",
36174
36216
  zIndex: 0,
36175
36217
  x: direction < 0 ? 300 : -300,
36176
36218
  opacity: 0
@@ -36192,7 +36234,7 @@ var PickerDays = (props) => {
36192
36234
  () => getWeekdayNames(ownerState.locale || "default"),
36193
36235
  [ownerState.locale]
36194
36236
  );
36195
- return /* @__PURE__ */ jsx2(CalendarViewContainer, { children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsxs2(
36237
+ return /* @__PURE__ */ jsx2(CalendarViewContainer, { viewType: "day", children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsxs2(
36196
36238
  CalendarViewTable,
36197
36239
  {
36198
36240
  custom: ownerState.direction,
@@ -36271,7 +36313,7 @@ var PickerMonths = (props) => {
36271
36313
  },
36272
36314
  [[]]
36273
36315
  );
36274
- return /* @__PURE__ */ jsx2(CalendarViewContainer, { children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsx2(
36316
+ return /* @__PURE__ */ jsx2(CalendarViewContainer, { viewType: "month", children: /* @__PURE__ */ jsx2(AnimatePresence, { initial: false, custom: ownerState.direction, children: /* @__PURE__ */ jsx2(
36275
36317
  CalendarViewTable,
36276
36318
  {
36277
36319
  custom: ownerState.direction,
@@ -36378,8 +36420,8 @@ Calendar.displayName = "Calendar";
36378
36420
  var Calendar_default = Calendar;
36379
36421
 
36380
36422
  // src/components/Checkbox/Checkbox.tsx
36381
- import { motion as motion7 } from "framer-motion";
36382
- var MotionCheckbox = motion7(Checkbox_default);
36423
+ import { motion as motion10 } from "framer-motion";
36424
+ var MotionCheckbox = motion10(Checkbox_default);
36383
36425
  var Checkbox3 = (props) => {
36384
36426
  return /* @__PURE__ */ jsx2(MotionCheckbox, __spreadValues({}, props));
36385
36427
  };
@@ -36435,8 +36477,8 @@ import {
36435
36477
  } from "react";
36436
36478
 
36437
36479
  // src/components/Sheet/Sheet.tsx
36438
- import { motion as motion8 } from "framer-motion";
36439
- var MotionSheet = motion8(Sheet_default);
36480
+ import { motion as motion11 } from "framer-motion";
36481
+ var MotionSheet = motion11(Sheet_default);
36440
36482
  var Sheet3 = MotionSheet;
36441
36483
  Sheet3.displayName = "Sheet";
36442
36484
 
@@ -36527,8 +36569,8 @@ function TableBody(props) {
36527
36569
  TableBody.displayName = "TableBody";
36528
36570
 
36529
36571
  // src/components/Stack/Stack.tsx
36530
- import { motion as motion9 } from "framer-motion";
36531
- var MotionStack = motion9(Stack_default);
36572
+ import { motion as motion12 } from "framer-motion";
36573
+ var MotionStack = motion12(Stack_default);
36532
36574
  var Stack2 = MotionStack;
36533
36575
  Stack2.displayName = "Stack";
36534
36576
 
@@ -36701,11 +36743,11 @@ function useDataTableRenderer({
36701
36743
  rows,
36702
36744
  columns,
36703
36745
  rowCount: totalRowsProp,
36746
+ paginationMode,
36704
36747
  paginationModel,
36705
36748
  onPaginationModelChange,
36706
36749
  selectionModel = [],
36707
- onSelectionModelChange,
36708
- stickyHeader
36750
+ onSelectionModelChange
36709
36751
  }) {
36710
36752
  const [page, setPage] = useState25((paginationModel == null ? void 0 : paginationModel.page) || 1);
36711
36753
  const pageSize2 = (paginationModel == null ? void 0 : paginationModel.pageSize) || 20;
@@ -36714,8 +36756,8 @@ function useDataTableRenderer({
36714
36756
  [selectionModel]
36715
36757
  );
36716
36758
  const dataInPage = useMemo35(
36717
- () => rows.slice((page - 1) * pageSize2, (page - 1) * pageSize2 + pageSize2),
36718
- [rows, page, pageSize2]
36759
+ () => paginationMode === "server" ? rows : rows.slice((page - 1) * pageSize2, (page - 1) * pageSize2 + pageSize2),
36760
+ [rows, page, pageSize2, paginationMode]
36719
36761
  );
36720
36762
  const isAllSelected = useMemo35(
36721
36763
  () => dataInPage.length > 0 && dataInPage.every(
@@ -36752,26 +36794,6 @@ function useDataTableRenderer({
36752
36794
  pageSize: pageSize2,
36753
36795
  onPaginationModelChange: handlePageChange,
36754
36796
  HeadCell,
36755
- // HeadCell: useCallback(
36756
- // (column: Column<any>) => {
36757
- // const ref = useRef<HTMLTableCellElement>(null);
36758
- // const style = {
36759
- // width: column.width,
36760
- // minWidth: column.minWidth ?? "50px",
36761
- // maxWidth: column.maxWidth,
36762
- // textAlign: column.type === "number" ? "end" : "start",
36763
- // position: stickyHeader ? undefined : "relative",
36764
- // } as React.CSSProperties;
36765
- // const resizer = column.resizable ?? true ? Resizer(ref) : null;
36766
- // return (
36767
- // <th ref={ref} key={column.field as string} style={style}>
36768
- // {column.headerName ?? (column.field as string)}
36769
- // {resizer}
36770
- // </th>
36771
- // );
36772
- // },
36773
- // [stickyHeader, columns]
36774
- // ),
36775
36797
  dataInPage,
36776
36798
  isAllSelected,
36777
36799
  // all rows are selected on this page
@@ -36808,7 +36830,8 @@ function useDataTableRenderer({
36808
36830
  ),
36809
36831
  onTotalSelect: useCallback26(() => {
36810
36832
  onSelectionModelChange == null ? void 0 : onSelectionModelChange(
36811
- isTotalSelected ? [] : rows.map((_4, i) => `${i}`)
36833
+ isTotalSelected ? [] : rows.map((_4, i) => `${i}`),
36834
+ isTotalSelected
36812
36835
  );
36813
36836
  }, [isTotalSelected, rows, onSelectionModelChange])
36814
36837
  };
@@ -36888,14 +36911,14 @@ function DataTable(props) {
36888
36911
  ] }),
36889
36912
  /* @__PURE__ */ jsxs2(Button_default2, { size: "sm", variant: "plain", onClick: onTotalSelect, children: [
36890
36913
  "Select all ",
36891
- numberFormatter(rows.length),
36914
+ numberFormatter(rowCount != null ? rowCount : rows.length),
36892
36915
  " items"
36893
36916
  ] })
36894
36917
  ] }),
36895
36918
  isTotalSelected && /* @__PURE__ */ jsxs2(Stack_default2, { direction: "row", spacing: 1, alignItems: "center", children: [
36896
36919
  /* @__PURE__ */ jsxs2(Typography_default2, { level: "body-xs", children: [
36897
36920
  "All ",
36898
- numberFormatter(rows.length),
36921
+ numberFormatter(rowCount != null ? rowCount : rows.length),
36899
36922
  " items are selected."
36900
36923
  ] }),
36901
36924
  /* @__PURE__ */ jsx2(
@@ -40613,35 +40636,6 @@ var CalendarToday_default = createSvgIcon2(/* @__PURE__ */ _jsx106("path", {
40613
40636
 
40614
40637
  // src/components/Input/Input.tsx
40615
40638
  import { motion as motion13 } from "framer-motion";
40616
-
40617
- // src/components/FormControl/FormControl.tsx
40618
- import { motion as motion10 } from "framer-motion";
40619
- var MotionFormControl = motion10(FormControl_default);
40620
- var FormControl3 = MotionFormControl;
40621
- FormControl3.displayName = "FormControl";
40622
-
40623
- // src/components/FormControl/index.ts
40624
- var FormControl_default2 = FormControl3;
40625
-
40626
- // src/components/FormLabel/FormLabel.tsx
40627
- import { motion as motion11 } from "framer-motion";
40628
- var MotionFormLabel = motion11(FormLabel_default);
40629
- var FormLabel3 = MotionFormLabel;
40630
- FormLabel3.displayName = "FormLabel";
40631
-
40632
- // src/components/FormLabel/index.ts
40633
- var FormLabel_default2 = FormLabel3;
40634
-
40635
- // src/components/FormHelperText/FormHelperText.tsx
40636
- import { motion as motion12 } from "framer-motion";
40637
- var MotionFormHelperText = motion12(FormHelperText_default);
40638
- var FormHelperText3 = MotionFormHelperText;
40639
- FormHelperText3.displayName = "FormHelperText";
40640
-
40641
- // src/components/FormHelperText/index.ts
40642
- var FormHelperText_default2 = FormHelperText3;
40643
-
40644
- // src/components/Input/Input.tsx
40645
40639
  var MotionInput = motion13(Input_default);
40646
40640
  var Input3 = (props) => {
40647
40641
  const _a = props, { label, helperText, error, style: style4, size, color: color2 } = _a, innerProps = __objRest(_a, ["label", "helperText", "error", "style", "size", "color"]);
@@ -41511,6 +41505,19 @@ Tooltip3.displayName = "Tooltip";
41511
41505
  // src/components/Autocomplete/Autocomplete.framer.ts
41512
41506
  import { ControlType } from "framer";
41513
41507
  var autocompletePropertyControls = {
41508
+ label: {
41509
+ title: "Label",
41510
+ type: ControlType.String
41511
+ },
41512
+ helperText: {
41513
+ title: "Helper Text",
41514
+ type: ControlType.String
41515
+ },
41516
+ error: {
41517
+ title: "Error",
41518
+ type: ControlType.Boolean,
41519
+ defaultValue: false
41520
+ },
41514
41521
  options: {
41515
41522
  title: "Options",
41516
41523
  type: ControlType.Array,
@@ -42566,12 +42573,12 @@ var textareaPropertyControls = {
42566
42573
  // src/components/Typography/Typography.framer.ts
42567
42574
  import { ControlType as ControlType27 } from "framer";
42568
42575
  var typographyPropertyControls = {
42569
- // color: {
42570
- // title: "Color",
42571
- // type: ControlType.Enum,
42572
- // options: ["primary", "neutral", "danger", "success", "warning"],
42573
- // optionTitles: ["Primary", "Neutral", "Danger", "Success", "Warning"],
42574
- // },
42576
+ textAlign: {
42577
+ title: "Text Align",
42578
+ type: ControlType27.Enum,
42579
+ options: ["start", "center", "end"],
42580
+ defaultValue: "start"
42581
+ },
42575
42582
  level: {
42576
42583
  title: "Level",
42577
42584
  type: ControlType27.Enum,
@@ -42626,7 +42633,7 @@ export {
42626
42633
  AccordionSummary3 as AccordionSummary,
42627
42634
  Accordions,
42628
42635
  AspectRatio_default as AspectRatio,
42629
- Autocomplete_default as Autocomplete,
42636
+ Autocomplete3 as Autocomplete,
42630
42637
  AutocompleteListbox_default as AutocompleteListbox,
42631
42638
  AutocompleteOption_default as AutocompleteOption,
42632
42639
  Avatar_default as Avatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/ads",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",