@julseb-lib/react 0.1.39 → 0.1.42

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.cjs CHANGED
@@ -47,7 +47,6 @@ var __copyProps = (to, from, except, desc) => {
47
47
  }
48
48
  return to;
49
49
  };
50
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
51
50
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
52
51
  // If the importer is in node compatibility mode or this is not an ESM
53
52
  // file that has been converted to a CommonJS file using a Babel-
@@ -177,8 +176,27 @@ __export(index_exports, {
177
176
  Tooltip: () => Tooltip,
178
177
  URL_REGEX: () => URL_REGEX,
179
178
  Wrapper: () => Wrapper,
179
+ addDay: () => import_utils150.addDay,
180
+ addMonth: () => import_utils150.addMonth,
181
+ addYear: () => import_utils150.addYear,
182
+ calculateAverage: () => import_utils150.calculateAverage,
183
+ calculateTotalSum: () => import_utils150.calculateTotalSum,
184
+ capitalize: () => import_utils150.capitalize,
180
185
  clsx: () => clsx,
186
+ convertDate: () => import_utils150.convertDate,
187
+ convertDateShort: () => import_utils150.convertDateShort,
188
+ convertPrice: () => import_utils150.convertPrice,
189
+ convertToEmail: () => import_utils150.convertToEmail,
190
+ convertYoutube: () => import_utils150.convertYoutube,
191
+ deleteDuplicates: () => import_utils150.deleteDuplicates,
181
192
  designTokens: () => designTokens,
193
+ detectLanguage: () => import_utils150.detectLanguage,
194
+ disableScroll: () => import_utils150.disableScroll,
195
+ emailRegex: () => import_utils150.emailRegex,
196
+ enableScroll: () => import_utils150.enableScroll,
197
+ filterObject: () => import_utils150.filterObject,
198
+ formatDate: () => import_utils150.formatDate,
199
+ formatHour: () => import_utils150.formatHour,
182
200
  genAlignContent: () => genAlignContent,
183
201
  genAlignItems: () => genAlignItems,
184
202
  genBgAllColors: () => genBgAllColors,
@@ -213,10 +231,43 @@ __export(index_exports, {
213
231
  genTextColorHover: () => genTextColorHover,
214
232
  genTextColorShort: () => genTextColorShort,
215
233
  genVAlign: () => genVAlign,
234
+ generateNumbers: () => import_utils150.generateNumbers,
235
+ getFirstName: () => import_utils150.getFirstName,
236
+ getInitials: () => import_utils150.getInitials,
237
+ getLastName: () => import_utils150.getLastName,
238
+ getNextDay: () => import_utils150.getNextDay,
239
+ getPercentage: () => import_utils150.getPercentage,
240
+ getRandom: () => import_utils150.getRandom,
241
+ getRandomAvatar: () => import_utils150.getRandomAvatar,
242
+ getRandomDate: () => import_utils150.getRandomDate,
243
+ getRandomNumber: () => import_utils150.getRandomNumber,
244
+ getRandomString: () => import_utils150.getRandomString,
245
+ getRandomTime: () => import_utils150.getRandomTime,
246
+ getTimeNow: () => import_utils150.getTimeNow,
247
+ getToday: () => import_utils150.getToday,
248
+ getTomorrow: () => import_utils150.getTomorrow,
249
+ getYesterday: () => import_utils150.getYesterday,
250
+ hexToRgb: () => import_utils150.hexToRgb,
216
251
  libMarkdownEditorOptions: () => libMarkdownEditorOptions,
217
252
  libOptionsMarkdown: () => libOptionsMarkdown,
218
253
  linkifyText: () => linkifyText,
254
+ passwordRegex: () => import_utils150.passwordRegex,
255
+ rgbToHex: () => import_utils150.rgbToHex,
256
+ scrollToTop: () => import_utils150.scrollToTop,
257
+ slugify: () => import_utils150.slugify,
258
+ sortByFrequency: () => import_utils150.sortByFrequency,
259
+ stringifyPx: () => import_utils150.stringifyPx,
260
+ toCamelCase: () => import_utils150.toCamelCase,
261
+ toConstantCase: () => import_utils150.toConstantCase,
262
+ toDotCase: () => import_utils150.toDotCase,
263
+ toKebabCase: () => import_utils150.toKebabCase,
264
+ toPascalCase: () => import_utils150.toPascalCase,
265
+ toPathCase: () => import_utils150.toPathCase,
266
+ toSentenceCase: () => import_utils150.toSentenceCase,
267
+ toSnakeCase: () => import_utils150.toSnakeCase,
268
+ toTitleCase: () => import_utils150.toTitleCase,
219
269
  toast: () => toast,
270
+ unslugify: () => import_utils150.unslugify,
220
271
  useClickOutside: () => useClickOutside,
221
272
  useCopyToClipboard: () => useCopyToClipboard,
222
273
  useDebounce: () => useDebounce,
@@ -232,7 +283,8 @@ __export(index_exports, {
232
283
  usePaginatedData: () => usePaginatedData,
233
284
  usePagination: () => usePagination,
234
285
  useTouchScreen: () => useTouchScreen,
235
- useTranslation: () => useTranslation
286
+ useTranslation: () => useTranslation,
287
+ uuid: () => import_utils150.uuid
236
288
  });
237
289
  module.exports = __toCommonJS(index_exports);
238
290
 
@@ -2266,7 +2318,7 @@ var genRingColorChildren = {
2266
2318
  };
2267
2319
 
2268
2320
  // src/lib/index.ts
2269
- __reExport(index_exports, require("@julseb-lib/utils"), module.exports);
2321
+ var import_utils150 = require("@julseb-lib/utils");
2270
2322
 
2271
2323
  // src/lib/hooks/useClickOutside.tsx
2272
2324
  var import_react2 = require("react");
@@ -5621,6 +5673,7 @@ var Input = (_a) => {
5621
5673
  labelComment,
5622
5674
  helper,
5623
5675
  helperBottom,
5676
+ containerClassName,
5624
5677
  validation: validation,
5625
5678
  value,
5626
5679
  counter: counter,
@@ -5633,6 +5686,7 @@ var Input = (_a) => {
5633
5686
  "labelComment",
5634
5687
  "helper",
5635
5688
  "helperBottom",
5689
+ "containerClassName",
5636
5690
  // @ts-ignore
5637
5691
  "validation",
5638
5692
  "value",
@@ -5653,6 +5707,7 @@ var Input = (_a) => {
5653
5707
  counter,
5654
5708
  maxLength,
5655
5709
  id,
5710
+ className: containerClassName,
5656
5711
  children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5657
5712
  InputFunction,
5658
5713
  __spreadValues({
@@ -5724,7 +5779,8 @@ var InputImage = (_a) => {
5724
5779
  icons,
5725
5780
  borderRadius = "md",
5726
5781
  disabled,
5727
- id
5782
+ id,
5783
+ containerClassName
5728
5784
  } = _b, rest = __objRest(_b, [
5729
5785
  "className",
5730
5786
  "ref",
@@ -5737,7 +5793,8 @@ var InputImage = (_a) => {
5737
5793
  "icons",
5738
5794
  "borderRadius",
5739
5795
  "disabled",
5740
- "id"
5796
+ "id",
5797
+ "containerClassName"
5741
5798
  ]);
5742
5799
  const [isHovered, setIsHovered] = (0, import_react28.useState)(false);
5743
5800
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
@@ -5748,6 +5805,7 @@ var InputImage = (_a) => {
5748
5805
  helper,
5749
5806
  helperBottom,
5750
5807
  validation,
5808
+ className: containerClassName,
5751
5809
  children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
5752
5810
  "label",
5753
5811
  {
@@ -7070,7 +7128,8 @@ var InputPhone = (_a) => {
7070
7128
  helperBottom,
7071
7129
  validation,
7072
7130
  inputVariant,
7073
- inputBackground
7131
+ inputBackground,
7132
+ containerClassName
7074
7133
  } = _b, rest = __objRest(_b, [
7075
7134
  "className",
7076
7135
  "ref",
@@ -7089,7 +7148,8 @@ var InputPhone = (_a) => {
7089
7148
  "helperBottom",
7090
7149
  "validation",
7091
7150
  "inputVariant",
7092
- "inputBackground"
7151
+ "inputBackground",
7152
+ "containerClassName"
7093
7153
  ]);
7094
7154
  var _a2, _b2;
7095
7155
  const [isOpen, setIsOpen] = (0, import_react29.useState)(false);
@@ -7114,6 +7174,7 @@ var InputPhone = (_a) => {
7114
7174
  helperBottom,
7115
7175
  validation,
7116
7176
  hasListOpen: isOpen,
7177
+ className: containerClassName,
7117
7178
  children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(InputWithListWrapper, { isOpen, children: [
7118
7179
  /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
7119
7180
  InputWrapper,
@@ -7291,7 +7352,8 @@ var InputCounter = (_a) => {
7291
7352
  id,
7292
7353
  min = 1,
7293
7354
  max = 100,
7294
- step = 1
7355
+ step = 1,
7356
+ containerClassName
7295
7357
  } = _b, rest = __objRest(_b, [
7296
7358
  "className",
7297
7359
  "ref",
@@ -7312,7 +7374,8 @@ var InputCounter = (_a) => {
7312
7374
  "id",
7313
7375
  "min",
7314
7376
  "max",
7315
- "step"
7377
+ "step",
7378
+ "containerClassName"
7316
7379
  ]);
7317
7380
  var _a2, _b2;
7318
7381
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
@@ -7323,6 +7386,7 @@ var InputCounter = (_a) => {
7323
7386
  helper,
7324
7387
  helperBottom,
7325
7388
  id,
7389
+ className: containerClassName,
7326
7390
  children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
7327
7391
  "div",
7328
7392
  {
@@ -7404,7 +7468,8 @@ var InputSlider = (_a) => {
7404
7468
  showValue = "never",
7405
7469
  min = 0,
7406
7470
  max = 100,
7407
- value
7471
+ value,
7472
+ containerClassName
7408
7473
  } = _b, rest = __objRest(_b, [
7409
7474
  "className",
7410
7475
  "ref",
@@ -7418,7 +7483,8 @@ var InputSlider = (_a) => {
7418
7483
  "showValue",
7419
7484
  "min",
7420
7485
  "max",
7421
- "value"
7486
+ "value",
7487
+ "containerClassName"
7422
7488
  ]);
7423
7489
  const percentage = (Number(value) - min) / (max - min) * 100;
7424
7490
  const [isTooltipVisible, setIsTooltipVisible] = (0, import_react30.useState)(
@@ -7455,6 +7521,7 @@ var InputSlider = (_a) => {
7455
7521
  helperBottom,
7456
7522
  id,
7457
7523
  validation,
7524
+ className: containerClassName,
7458
7525
  children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
7459
7526
  "div",
7460
7527
  {
@@ -7528,7 +7595,8 @@ var Select = (_a) => {
7528
7595
  helperBottom,
7529
7596
  id,
7530
7597
  validation,
7531
- disabled
7598
+ disabled,
7599
+ containerClassName
7532
7600
  } = _b, rest = __objRest(_b, [
7533
7601
  "className",
7534
7602
  "ref",
@@ -7545,7 +7613,8 @@ var Select = (_a) => {
7545
7613
  "helperBottom",
7546
7614
  "id",
7547
7615
  "validation",
7548
- "disabled"
7616
+ "disabled",
7617
+ "containerClassName"
7549
7618
  ]);
7550
7619
  var _a2;
7551
7620
  const el = (0, import_react31.useRef)(null);
@@ -7566,6 +7635,7 @@ var Select = (_a) => {
7566
7635
  helperBottom,
7567
7636
  hasListOpen: isOpen,
7568
7637
  validation,
7638
+ className: containerClassName,
7569
7639
  children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(InputWithListWrapper, { ref: el, isOpen, children: [
7570
7640
  /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7571
7641
  InputWrapper,
@@ -7680,7 +7750,8 @@ var Autocomplete = (_a) => {
7680
7750
  showKeys,
7681
7751
  textNoResult = "No result.",
7682
7752
  disabled,
7683
- validation
7753
+ validation,
7754
+ containerClassName
7684
7755
  } = _b, rest = __objRest(_b, [
7685
7756
  "className",
7686
7757
  "ref",
@@ -7701,7 +7772,8 @@ var Autocomplete = (_a) => {
7701
7772
  "showKeys",
7702
7773
  "textNoResult",
7703
7774
  "disabled",
7704
- "validation"
7775
+ "validation",
7776
+ "containerClassName"
7705
7777
  ]);
7706
7778
  var _a2;
7707
7779
  const isTouchScreen = useTouchScreen();
@@ -7732,6 +7804,7 @@ var Autocomplete = (_a) => {
7732
7804
  id,
7733
7805
  validation,
7734
7806
  hasListOpen: isOpen,
7807
+ className: containerClassName,
7735
7808
  children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(InputWithListWrapper, { isOpen, children: [
7736
7809
  /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7737
7810
  InputWrapper,
@@ -7845,7 +7918,8 @@ var Rating = (_a) => {
7845
7918
  helper,
7846
7919
  helperBottom,
7847
7920
  id,
7848
- validation
7921
+ validation,
7922
+ containerClassName
7849
7923
  } = _b, rest = __objRest(_b, [
7850
7924
  "className",
7851
7925
  "ref",
@@ -7858,7 +7932,8 @@ var Rating = (_a) => {
7858
7932
  "helper",
7859
7933
  "helperBottom",
7860
7934
  "id",
7861
- "validation"
7935
+ "validation",
7936
+ "containerClassName"
7862
7937
  ]);
7863
7938
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7864
7939
  InputContainer,
@@ -7868,6 +7943,7 @@ var Rating = (_a) => {
7868
7943
  helper,
7869
7944
  helperBottom,
7870
7945
  id,
7946
+ className: containerClassName,
7871
7947
  children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7872
7948
  "div",
7873
7949
  __spreadProps(__spreadValues({
@@ -7930,7 +8006,8 @@ var InputPin = (_a) => {
7930
8006
  hideValues,
7931
8007
  disabled,
7932
8008
  inputBackground,
7933
- autoFocus
8009
+ autoFocus,
8010
+ containerClassName
7934
8011
  } = _b, rest = __objRest(_b, [
7935
8012
  "className",
7936
8013
  "ref",
@@ -7946,7 +8023,8 @@ var InputPin = (_a) => {
7946
8023
  "hideValues",
7947
8024
  "disabled",
7948
8025
  "inputBackground",
7949
- "autoFocus"
8026
+ "autoFocus",
8027
+ "containerClassName"
7950
8028
  ]);
7951
8029
  const [inputsRefsArr] = (0, import_react33.useState)(
7952
8030
  () => Array.from({ length: Object.keys(values).length }, () => (0, import_react33.createRef)())
@@ -7967,6 +8045,7 @@ var InputPin = (_a) => {
7967
8045
  helperBottom,
7968
8046
  id,
7969
8047
  validation,
8048
+ className: containerClassName,
7970
8049
  children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7971
8050
  "div",
7972
8051
  __spreadProps(__spreadValues({
@@ -8023,7 +8102,8 @@ var Fieldset = (_a) => {
8023
8102
  id,
8024
8103
  validation,
8025
8104
  legend,
8026
- borderRadius = "md"
8105
+ borderRadius = "md",
8106
+ containerClassName
8027
8107
  } = _b, rest = __objRest(_b, [
8028
8108
  "className",
8029
8109
  "ref",
@@ -8035,7 +8115,8 @@ var Fieldset = (_a) => {
8035
8115
  "id",
8036
8116
  "validation",
8037
8117
  "legend",
8038
- "borderRadius"
8118
+ "borderRadius",
8119
+ "containerClassName"
8039
8120
  ]);
8040
8121
  return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
8041
8122
  InputContainer,
@@ -8046,6 +8127,7 @@ var Fieldset = (_a) => {
8046
8127
  helperBottom,
8047
8128
  id,
8048
8129
  validation,
8130
+ className: containerClassName,
8049
8131
  children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
8050
8132
  "fieldset",
8051
8133
  __spreadProps(__spreadValues({
@@ -10775,7 +10857,8 @@ var MarkdownEditor = (_a) => {
10775
10857
  defaultView = "live",
10776
10858
  options,
10777
10859
  textButtonTitles = "Titles",
10778
- icons
10860
+ icons,
10861
+ containerClassName
10779
10862
  } = _b, rest = __objRest(_b, [
10780
10863
  "className",
10781
10864
  "ref",
@@ -10791,7 +10874,8 @@ var MarkdownEditor = (_a) => {
10791
10874
  "defaultView",
10792
10875
  "options",
10793
10876
  "textButtonTitles",
10794
- "icons"
10877
+ "icons",
10878
+ "containerClassName"
10795
10879
  ]);
10796
10880
  const [view, setView] = (0, import_react50.useState)(defaultView);
10797
10881
  const [isTitlesOpen, setIsTitlesOpen] = (0, import_react50.useState)(false);
@@ -10810,6 +10894,7 @@ var MarkdownEditor = (_a) => {
10810
10894
  helperBottom,
10811
10895
  validation,
10812
10896
  hasListOpen: isTitlesOpen,
10897
+ className: containerClassName,
10813
10898
  children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
10814
10899
  "div",
10815
10900
  {
@@ -11655,8 +11740,27 @@ var SrOnly = ({ element = "div", ref, children }) => {
11655
11740
  Tooltip,
11656
11741
  URL_REGEX,
11657
11742
  Wrapper,
11743
+ addDay,
11744
+ addMonth,
11745
+ addYear,
11746
+ calculateAverage,
11747
+ calculateTotalSum,
11748
+ capitalize,
11658
11749
  clsx,
11750
+ convertDate,
11751
+ convertDateShort,
11752
+ convertPrice,
11753
+ convertToEmail,
11754
+ convertYoutube,
11755
+ deleteDuplicates,
11659
11756
  designTokens,
11757
+ detectLanguage,
11758
+ disableScroll,
11759
+ emailRegex,
11760
+ enableScroll,
11761
+ filterObject,
11762
+ formatDate,
11763
+ formatHour,
11660
11764
  genAlignContent,
11661
11765
  genAlignItems,
11662
11766
  genBgAllColors,
@@ -11691,10 +11795,43 @@ var SrOnly = ({ element = "div", ref, children }) => {
11691
11795
  genTextColorHover,
11692
11796
  genTextColorShort,
11693
11797
  genVAlign,
11798
+ generateNumbers,
11799
+ getFirstName,
11800
+ getInitials,
11801
+ getLastName,
11802
+ getNextDay,
11803
+ getPercentage,
11804
+ getRandom,
11805
+ getRandomAvatar,
11806
+ getRandomDate,
11807
+ getRandomNumber,
11808
+ getRandomString,
11809
+ getRandomTime,
11810
+ getTimeNow,
11811
+ getToday,
11812
+ getTomorrow,
11813
+ getYesterday,
11814
+ hexToRgb,
11694
11815
  libMarkdownEditorOptions,
11695
11816
  libOptionsMarkdown,
11696
11817
  linkifyText,
11818
+ passwordRegex,
11819
+ rgbToHex,
11820
+ scrollToTop,
11821
+ slugify,
11822
+ sortByFrequency,
11823
+ stringifyPx,
11824
+ toCamelCase,
11825
+ toConstantCase,
11826
+ toDotCase,
11827
+ toKebabCase,
11828
+ toPascalCase,
11829
+ toPathCase,
11830
+ toSentenceCase,
11831
+ toSnakeCase,
11832
+ toTitleCase,
11697
11833
  toast,
11834
+ unslugify,
11698
11835
  useClickOutside,
11699
11836
  useCopyToClipboard,
11700
11837
  useDebounce,
@@ -11711,6 +11848,6 @@ var SrOnly = ({ element = "div", ref, children }) => {
11711
11848
  usePagination,
11712
11849
  useTouchScreen,
11713
11850
  useTranslation,
11714
- ...require("@julseb-lib/utils")
11851
+ uuid
11715
11852
  });
11716
11853
  //# sourceMappingURL=index.cjs.map