@conboai/storybook.components 0.1.22 → 0.1.23

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.
@@ -4,3 +4,5 @@ export declare const getStartTime: (type: OpUnitType, timeType: UnitType, time:
4
4
  export declare const getEndTime: (type: OpUnitType, timeType: UnitType, time: number) => dayjs.Dayjs;
5
5
  export declare const getStartTimeOfYesterday: (time: number) => dayjs.Dayjs;
6
6
  export declare const subtractTime: (time: number, timeType: ManipulateType | undefined) => dayjs.Dayjs;
7
+ export declare const getLocalDateTimeFormat: () => string;
8
+ export declare const formatDateWithLocal: (date: Date) => string;
@@ -7739,7 +7739,7 @@ process.env.NODE_ENV !== "production" && (Dn.propTypes = {
7739
7739
  */
7740
7740
  variant: s.oneOfType([s.oneOf(["contained", "outlined", "text"]), s.string])
7741
7741
  });
7742
- const gn = "#ffffff", od = "#000000", d1 = "#F5F6FA", Z5 = "#ECEDEF", f1 = "rgba(0, 0, 0, 0.26)", p1 = "#354290", $t = "#5360AE", Sb = "#3F4C9A", h1 = "#303D8B", Sp = "#CCD0E7", m1 = "#FBFBFD", g1 = "#CCD0E7", du = "#5360AE", Ep = "#E6E7EB", Cp = "#989BAF", b1 = "#8A8B8D", y1 = "#8d8ea1", v1 = "#e5e6ea", x1 = "#c2c6db", T1 = "#4b569d", sd = "#CECFD1", Rp = "#BABBBD", S1 = "#323d7b", E1 = "#535ea4", C1 = "#6f79b3", R1 = "#646ead", w1 = {
7742
+ const gn = "#ffffff", od = "#000000", d1 = "#F5F6FA", Q5 = "#ECEDEF", f1 = "rgba(0, 0, 0, 0.26)", p1 = "#354290", $t = "#5360AE", Sb = "#3F4C9A", h1 = "#303D8B", Sp = "#CCD0E7", m1 = "#FBFBFD", g1 = "#CCD0E7", du = "#5360AE", Ep = "#E6E7EB", Cp = "#989BAF", b1 = "#8A8B8D", y1 = "#8d8ea1", v1 = "#e5e6ea", x1 = "#c2c6db", T1 = "#4b569d", sd = "#CECFD1", Rp = "#BABBBD", S1 = "#323d7b", E1 = "#535ea4", C1 = "#6f79b3", R1 = "#646ead", w1 = {
7743
7743
  small: {
7744
7744
  width: "40px",
7745
7745
  minWidth: "40px"
@@ -39762,7 +39762,7 @@ const E2 = {
39762
39762
  };
39763
39763
  St.extend(wL);
39764
39764
  St.extend(DL);
39765
- const Q5 = ({
39765
+ const J5 = ({
39766
39766
  label: t = "",
39767
39767
  onChange: e,
39768
39768
  value: n,
@@ -40819,7 +40819,7 @@ const $y = {
40819
40819
  id: n.key,
40820
40820
  subItemValues: r.subItemValues
40821
40821
  };
40822
- }), J5 = ({
40822
+ }), e3 = ({
40823
40823
  title: t,
40824
40824
  filterTitle: e,
40825
40825
  data: n,
@@ -41123,7 +41123,7 @@ const $y = {
41123
41123
  ]
41124
41124
  }
41125
41125
  );
41126
- }, e3 = ({
41126
+ }, t3 = ({
41127
41127
  tabs: t,
41128
41128
  activeId: e,
41129
41129
  onDelete: n,
@@ -41158,7 +41158,7 @@ const $y = {
41158
41158
  c(),
41159
41159
  /* @__PURE__ */ E.jsx(Dn, { onClick: a, variant: "text", sx: { minWidth: "40px" }, children: /* @__PURE__ */ E.jsx(Yt, { icon: "add", fill: "white" }) })
41160
41160
  ] });
41161
- }, t3 = ({ children: t }) => /* @__PURE__ */ E.jsx(
41161
+ }, n3 = ({ children: t }) => /* @__PURE__ */ E.jsx(
41162
41162
  at,
41163
41163
  {
41164
41164
  justifyContent: "space-between",
@@ -41168,7 +41168,7 @@ const $y = {
41168
41168
  sx: { backgroundColor: Sb, display: "flex" },
41169
41169
  children: t
41170
41170
  }
41171
- ), n3 = ({ linkContent: t, link: e }) => /* @__PURE__ */ E.jsx(o0, { href: e, height: "100%", children: t }), pB = ({ setValue: t, value: e, tabs: n }) => {
41171
+ ), r3 = ({ linkContent: t, link: e }) => /* @__PURE__ */ E.jsx(o0, { href: e, height: "100%", children: t }), pB = ({ setValue: t, value: e, tabs: n }) => {
41172
41172
  const r = {
41173
41173
  ...Fy,
41174
41174
  "& .MuiTabs-flexContainer": {
@@ -41190,7 +41190,7 @@ const $y = {
41190
41190
  }, hB = ({ tabsContent: t }) => t.map((e) => /* @__PURE__ */ E.jsx(Xd, { value: e.value, sx: { padding: "20px 0 0" }, children: e.content }, e.value)), mB = ({ setValue: t, value: e, tabs: n, tabsContent: r }) => /* @__PURE__ */ E.jsxs(qd, { value: e, children: [
41191
41191
  /* @__PURE__ */ E.jsx(pB, { setValue: t, value: e, tabs: n }),
41192
41192
  /* @__PURE__ */ E.jsx(hB, { tabsContent: r })
41193
- ] }), r3 = ({ tabsContent: t, tabs: e }) => {
41193
+ ] }), o3 = ({ tabsContent: t, tabs: e }) => {
41194
41194
  const [n, r] = dt("0"), o = { background: "none", padding: "20px" };
41195
41195
  return /* @__PURE__ */ E.jsx(mt, { sx: o, children: /* @__PURE__ */ E.jsx(
41196
41196
  mB,
@@ -41215,7 +41215,7 @@ const $y = {
41215
41215
  /* @__PURE__ */ E.jsx("circle", { cx: "2", cy: "14", r: "2", fill: "black", fillOpacity: "0.6" })
41216
41216
  ]
41217
41217
  }
41218
- ), o3 = ({ title: t }) => /* @__PURE__ */ E.jsxs(
41218
+ ), s3 = ({ title: t }) => /* @__PURE__ */ E.jsxs(
41219
41219
  at,
41220
41220
  {
41221
41221
  container: !0,
@@ -41239,7 +41239,7 @@ const $y = {
41239
41239
  ]
41240
41240
  }
41241
41241
  ), gB = { display: "flex", flexWrap: "wrap", gap: 0.5 };
41242
- function s3({
41242
+ function i3({
41243
41243
  options: t,
41244
41244
  label: e,
41245
41245
  value: n,
@@ -58274,7 +58274,7 @@ const M5 = {
58274
58274
  )
58275
58275
  }
58276
58276
  );
58277
- }, l3 = ({
58277
+ }, c3 = ({
58278
58278
  onGenerate: t,
58279
58279
  isLoading: e,
58280
58280
  src: n,
@@ -58296,7 +58296,7 @@ const M5 = {
58296
58296
  }
58297
58297
  );
58298
58298
  };
58299
- function c3({ label: t, imageSrc: e }) {
58299
+ function u3({ label: t, imageSrc: e }) {
58300
58300
  return /* @__PURE__ */ E.jsxs(
58301
58301
  mt,
58302
58302
  {
@@ -58320,7 +58320,7 @@ function c3({ label: t, imageSrc: e }) {
58320
58320
  const N5 = {
58321
58321
  border: `1px solid ${gn}`,
58322
58322
  opacity: "40%"
58323
- }, u3 = () => /* @__PURE__ */ E.jsx(mt, { sx: N5 }), $5 = {
58323
+ }, d3 = () => /* @__PURE__ */ E.jsx(mt, { sx: N5 }), $5 = {
58324
58324
  width: "36px",
58325
58325
  height: "36px",
58326
58326
  borderRadius: "50%",
@@ -58330,7 +58330,7 @@ const N5 = {
58330
58330
  fontSize: "20px",
58331
58331
  lineHeight: "20px",
58332
58332
  color: gn
58333
- }, d3 = ({ logo: t, title: e }) => /* @__PURE__ */ E.jsxs(at, { container: !0, gap: "8px", alignItems: "center", children: [
58333
+ }, f3 = ({ logo: t, title: e }) => /* @__PURE__ */ E.jsxs(at, { container: !0, gap: "8px", alignItems: "center", children: [
58334
58334
  /* @__PURE__ */ E.jsx(mt, { sx: $5, children: /* @__PURE__ */ E.jsx("img", { src: t, alt: e, loading: "lazy" }) }),
58335
58335
  /* @__PURE__ */ E.jsx(wt, { sx: F5, children: e })
58336
58336
  ] }), B5 = (t) => {
@@ -58350,7 +58350,7 @@ const N5 = {
58350
58350
  }, H5 = (t) => ({
58351
58351
  ...t,
58352
58352
  boxShadow: "none"
58353
- }), f3 = ({ columnDefs: t, data: e, sx: n }) => /* @__PURE__ */ E.jsx(Pd, { component: wr, sx: H5(n), children: /* @__PURE__ */ E.jsx(Ad, { children: /* @__PURE__ */ E.jsx(kd, { children: t.map((r, o) => /* @__PURE__ */ E.jsxs(Wo, { children: [
58353
+ }), p3 = ({ columnDefs: t, data: e, sx: n }) => /* @__PURE__ */ E.jsx(Pd, { component: wr, sx: H5(n), children: /* @__PURE__ */ E.jsx(Ad, { children: /* @__PURE__ */ E.jsx(kd, { children: t.map((r, o) => /* @__PURE__ */ E.jsxs(Wo, { children: [
58354
58354
  /* @__PURE__ */ E.jsx(mr, { component: "th", scope: "row", sx: U5, children: /* @__PURE__ */ E.jsx(wt, { fontWeight: "600", children: r.headerName }) }),
58355
58355
  /* @__PURE__ */ E.jsx(mr, { sx: V5, children: r.renderCell ? r.renderCell(e[r.field]) : j5(e[r.field]) })
58356
58356
  ] }, o)) }) }) }), W5 = {
@@ -58359,7 +58359,7 @@ const N5 = {
58359
58359
  borderRadius: "50%",
58360
58360
  overflow: "hidden",
58361
58361
  cursor: "pointer"
58362
- }, p3 = ({ imageSrc: t, alt: e }) => /* @__PURE__ */ E.jsx(mt, { sx: W5, children: /* @__PURE__ */ E.jsx("img", { src: t, alt: e }) }), z5 = {
58362
+ }, h3 = ({ imageSrc: t, alt: e }) => /* @__PURE__ */ E.jsx(mt, { sx: W5, children: /* @__PURE__ */ E.jsx("img", { src: t, alt: e }) }), z5 = {
58363
58363
  "& .MuiSwitch-switchBase.Mui-checked": {
58364
58364
  color: gn
58365
58365
  },
@@ -58373,7 +58373,7 @@ const N5 = {
58373
58373
  lineHeight: "16px",
58374
58374
  letterSpacing: "0.15px",
58375
58375
  color: od
58376
- }, h3 = ({
58376
+ }, m3 = ({
58377
58377
  checked: t,
58378
58378
  onChange: e,
58379
58379
  leftLabel: n,
@@ -58391,7 +58391,7 @@ const N5 = {
58391
58391
  ),
58392
58392
  o && /* @__PURE__ */ E.jsx(ds, { sx: rg, children: o })
58393
58393
  ] });
58394
- function m3({ images: t }) {
58394
+ function g3({ images: t }) {
58395
58395
  const [e, n] = dt(0), r = () => {
58396
58396
  n((i) => (i + 1) % t.length);
58397
58397
  }, o = () => {
@@ -58469,18 +58469,49 @@ function m3({ images: t }) {
58469
58469
  )
58470
58470
  ] });
58471
58471
  }
58472
- const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()), og = (t, e, n) => St().startOf(t).set(e, n), Y5 = (t, e, n) => St().endOf(t).set(e, n), K5 = (t) => St().subtract(1, "day").startOf("day").set("hour", t), sg = (t, e) => St().subtract(t, e), g3 = [
58472
+ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()), og = (t, e, n) => St().startOf(t).set(e, n), Y5 = (t, e, n) => St().endOf(t).set(e, n), K5 = (t) => St().subtract(1, "day").startOf("day").set("hour", t), sg = (t, e) => St().subtract(t, e), q5 = () => {
58473
+ const e = new Intl.DateTimeFormat(void 0, {
58474
+ year: "numeric",
58475
+ month: "2-digit",
58476
+ day: "2-digit",
58477
+ hour: "numeric",
58478
+ minute: "2-digit"
58479
+ }).formatToParts(/* @__PURE__ */ new Date());
58480
+ let n = !1;
58481
+ const r = e.map((o) => {
58482
+ switch (o.type) {
58483
+ case "day":
58484
+ return "DD";
58485
+ case "month":
58486
+ return "MM";
58487
+ case "year":
58488
+ return "YYYY";
58489
+ case "hour":
58490
+ return n = o.value.toLowerCase().includes("am") || o.value.toLowerCase().includes("pm"), "hh";
58491
+ case "minute":
58492
+ return "mm";
58493
+ case "dayPeriod":
58494
+ return "A";
58495
+ default:
58496
+ return o.value;
58497
+ }
58498
+ }).join("");
58499
+ return n ? r.replace("hh", "hh") : r.replace("hh", "HH");
58500
+ }, b3 = (t) => {
58501
+ const e = q5();
58502
+ return St(t).format(e);
58503
+ }, y3 = [
58473
58504
  "Camera 1 (all items)",
58474
58505
  "Camera 5 (all items)",
58475
58506
  "Camera 2 (10 items)",
58476
58507
  "Camera 3 (Zone 1)",
58477
58508
  "Camera 4 (24 items)"
58478
- ], b3 = [
58509
+ ], v3 = [
58479
58510
  { key: "classifier", label: "Classifier" },
58480
58511
  { key: "value", label: "Value" },
58481
58512
  { key: "count", label: "Count" },
58482
58513
  { key: "score", label: "Score" }
58483
- ], y3 = [
58514
+ ], x3 = [
58484
58515
  {
58485
58516
  label: "Summary",
58486
58517
  value: "0",
@@ -58491,14 +58522,14 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58491
58522
  value: "1",
58492
58523
  disabled: !0
58493
58524
  }
58494
- ], v3 = [
58525
+ ], T3 = [
58495
58526
  { classifier: "Color", value: "Black", count: 50, score: "80%" },
58496
58527
  { classifier: "Color", value: "Yellow", count: 60, score: "70%" },
58497
58528
  { classifier: "Manufacture", value: "Volvo", count: 50, score: "80%" },
58498
58529
  { classifier: "Color", value: "Red", count: 50, score: "40%" },
58499
58530
  { classifier: "Color", value: "Green", count: 75, score: "70%" },
58500
58531
  { classifier: "Manufacture", value: "Man", count: 3, score: "80%" }
58501
- ], x3 = (t) => [
58532
+ ], S3 = (t) => [
58502
58533
  {
58503
58534
  value: "0",
58504
58535
  content: /* @__PURE__ */ E.jsx(aB, { ...t })
@@ -58507,7 +58538,7 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58507
58538
  value: "1",
58508
58539
  content: "More"
58509
58540
  }
58510
- ], T3 = {
58541
+ ], E3 = {
58511
58542
  data: [
58512
58543
  {
58513
58544
  id: "1",
@@ -58565,15 +58596,15 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58565
58596
  value: "kit"
58566
58597
  }
58567
58598
  ]
58568
- }, S3 = [
58599
+ }, C3 = [
58569
58600
  { key: "id", label: "ID" },
58570
58601
  { key: "name", label: "Name" },
58571
58602
  { key: "age", label: "Age" }
58572
- ], E3 = [
58603
+ ], R3 = [
58573
58604
  { id: 1, name: "John Doe", age: 30 },
58574
58605
  { id: 2, name: "Jane Smith", age: 25 },
58575
58606
  { id: 3, name: "Bob Johnson", age: 40 }
58576
- ], C3 = {
58607
+ ], w3 = {
58577
58608
  feed: 139,
58578
58609
  conbo_key: "28145-139-021-64216",
58579
58610
  event_id: "CNB-7987",
@@ -58583,7 +58614,7 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58583
58614
  end: "2024-05-15T21:05:27.745000Z",
58584
58615
  cargo: "N/A",
58585
58616
  zones: ["Dock main road ", "Hello dock"]
58586
- }, R3 = [
58617
+ }, I3 = [
58587
58618
  { headerName: "Event ID", field: "event_id" },
58588
58619
  {
58589
58620
  headerName: "Move",
@@ -58602,7 +58633,7 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58602
58633
  },
58603
58634
  { headerName: "Cargo", field: "cargo" },
58604
58635
  { headerName: "Zones", field: "zones" }
58605
- ], w3 = [
58636
+ ], D3 = [
58606
58637
  { id: "1", color: "#f99191", title: "New title" },
58607
58638
  {
58608
58639
  id: "2",
@@ -58610,7 +58641,7 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58610
58641
  title: "Message should contain more information"
58611
58642
  },
58612
58643
  { id: "3", color: "#7095f4", title: "Hello, World!" }
58613
- ], I3 = [
58644
+ ], O3 = [
58614
58645
  {
58615
58646
  label: "Start of the day",
58616
58647
  getValue: () => og("day", "hour", 6)
@@ -58635,7 +58666,7 @@ const G5 = (t) => t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()),
58635
58666
  label: "One day ago",
58636
58667
  getValue: () => sg(1, "day")
58637
58668
  }
58638
- ], D3 = [
58669
+ ], A3 = [
58639
58670
  {
58640
58671
  value: 864e5,
58641
58672
  label: "1 day"
@@ -58651,39 +58682,39 @@ export {
58651
58682
  S1 as ACTIVE_TAB,
58652
58683
  Yr as ActionButton,
58653
58684
  EL as ActionSelect,
58654
- c3 as AppTitleBar,
58685
+ u3 as AppTitleBar,
58655
58686
  sd as BETWEEN_GRAY_BORDER,
58656
58687
  d1 as BG_GRAY_COLOR,
58657
58688
  od as BLACK,
58658
58689
  Rp as BORDER_MAIN_TABLE,
58659
58690
  R1 as BORDER_TAB,
58660
58691
  CL as ChipsBar,
58661
- s3 as ChipsMultiSelect,
58692
+ i3 as ChipsMultiSelect,
58662
58693
  T1 as DARK_BLUE_BORDER,
58663
58694
  E1 as DEFAULT_TAB,
58664
- Z5 as DETAILS_VIEW_BG,
58695
+ Q5 as DETAILS_VIEW_BG,
58665
58696
  y1 as DISABLED_BORDER,
58666
58697
  Sp as DISABLED_BTN_PRIMARY,
58667
58698
  Ep as DISABLED_BTN_SECONDARY,
58668
58699
  f1 as DISABLED_CHECKBOX,
58669
58700
  Cp as DISABLED_TEXT,
58670
58701
  b1 as DISABLED_TEXT_ICON,
58671
- Q5 as DatePicker,
58672
- u3 as Delimiter,
58673
- r3 as DetailsView,
58674
- o3 as DetailsViewPanel,
58702
+ J5 as DatePicker,
58703
+ d3 as Delimiter,
58704
+ o3 as DetailsView,
58705
+ s3 as DetailsViewPanel,
58675
58706
  rB as Filter,
58676
- J5 as FilterBox,
58707
+ e3 as FilterBox,
58677
58708
  v1 as GRAY_BORDER,
58678
58709
  Sb as HOVER_BTN_PRIMARY,
58679
58710
  g1 as HOVER_BTN_SECONDARY,
58680
58711
  p1 as HOVER_DARK_BLUE_ICON,
58681
58712
  C1 as HOVER_TAB,
58682
- t3 as Header,
58683
- n3 as HomeLink,
58684
- m3 as ImageBox,
58713
+ n3 as Header,
58714
+ r3 as HomeLink,
58715
+ g3 as ImageBox,
58685
58716
  x1 as LIGHT_GRAY_BORDER,
58686
- d3 as Logo,
58717
+ f3 as Logo,
58687
58718
  aB as MainTable,
58688
58719
  eB as NotificationBar,
58689
58720
  $t as PASSIVE_BTN_PRIMARY,
@@ -58691,34 +58722,36 @@ export {
58691
58722
  al as PLACEMENTS,
58692
58723
  Y2 as SearchInput,
58693
58724
  Yt as Svg,
58694
- y3 as TABS,
58725
+ x3 as TABS,
58695
58726
  fB as Tab,
58696
- e3 as TabsBar,
58697
- h3 as Toggle,
58698
- p3 as UserAvatar,
58699
- f3 as VerticalTable,
58700
- l3 as VideoBox,
58727
+ t3 as TabsBar,
58728
+ m3 as Toggle,
58729
+ h3 as UserAvatar,
58730
+ p3 as VerticalTable,
58731
+ c3 as VideoBox,
58701
58732
  gn as WHITE,
58702
- b3 as columnDefs,
58703
- S3 as columns,
58704
- g3 as dataMock,
58705
- v3 as detailsViewDataMock,
58733
+ v3 as columnDefs,
58734
+ C3 as columns,
58735
+ y3 as dataMock,
58736
+ T3 as detailsViewDataMock,
58737
+ b3 as formatDateWithLocal,
58706
58738
  Y5 as getEndTime,
58739
+ q5 as getLocalDateTimeFormat,
58707
58740
  og as getStartTime,
58708
58741
  K5 as getStartTimeOfYesterday,
58709
- x3 as getTabsContent,
58742
+ S3 as getTabsContent,
58710
58743
  j2 as inputLabelSx,
58711
58744
  By as loaderSx,
58712
- E3 as mainTableDataMock,
58713
- D3 as mockSelectOptions,
58714
- I3 as mockShortcut,
58715
- T3 as newFilterMock,
58745
+ R3 as mainTableDataMock,
58746
+ A3 as mockSelectOptions,
58747
+ O3 as mockShortcut,
58748
+ E3 as newFilterMock,
58716
58749
  B2 as selectSx,
58717
58750
  G5 as snakeCaseToTitleCase,
58718
58751
  sg as subtractTime,
58719
58752
  $y as tabSx,
58720
- w3 as tabsMock,
58753
+ D3 as tabsMock,
58721
58754
  Fy as tabsSx,
58722
- R3 as verticalTableColumnDefs,
58723
- C3 as verticalTableDataMock
58755
+ I3 as verticalTableColumnDefs,
58756
+ w3 as verticalTableDataMock
58724
58757
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/storybook.components",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "main": "dist/storybook.components.mjs",
5
5
  "types": "dist/build/index.d.ts",
6
6
  "files": [