@sunggang/ui-lib 0.1.13 → 0.1.15

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/index.esm.css CHANGED
@@ -946,6 +946,10 @@ video {
946
946
  .bg-\[\#000000b3\] {
947
947
  background-color: #000000b3;
948
948
  }
949
+ .bg-\[\#000\] {
950
+ --tw-bg-opacity: 1;
951
+ background-color: rgb(0 0 0 / var(--tw-bg-opacity));
952
+ }
949
953
  .bg-\[\#0C7489\] {
950
954
  --tw-bg-opacity: 1;
951
955
  background-color: rgb(12 116 137 / var(--tw-bg-opacity));
@@ -1338,6 +1342,11 @@ video {
1338
1342
  z-index: 20;
1339
1343
  }
1340
1344
 
1345
+ .hover\:bg-\[\#000\]:hover {
1346
+ --tw-bg-opacity: 1;
1347
+ background-color: rgb(0 0 0 / var(--tw-bg-opacity));
1348
+ }
1349
+
1341
1350
  .hover\:bg-\[\#D9D9D9\]:hover {
1342
1351
  --tw-bg-opacity: 1;
1343
1352
  background-color: rgb(217 217 217 / var(--tw-bg-opacity));
@@ -1351,10 +1360,6 @@ video {
1351
1360
  background-color: hsl(var(--destructive) / 0.9);
1352
1361
  }
1353
1362
 
1354
- .hover\:bg-primary:hover {
1355
- background-color: hsl(var(--primary));
1356
- }
1357
-
1358
1363
  .hover\:bg-primary\/90:hover {
1359
1364
  background-color: hsl(var(--primary) / 0.9);
1360
1365
  }
@@ -1379,8 +1384,9 @@ video {
1379
1384
  opacity: 1;
1380
1385
  }
1381
1386
 
1382
- .focus\:bg-primary:focus {
1383
- background-color: hsl(var(--primary));
1387
+ .focus\:bg-\[\#000\]:focus {
1388
+ --tw-bg-opacity: 1;
1389
+ background-color: rgb(0 0 0 / var(--tw-bg-opacity));
1384
1390
  }
1385
1391
 
1386
1392
  .focus\:text-primary-foreground:focus {
package/index.esm.js CHANGED
@@ -1,6 +1,13 @@
1
- export { C as CkEditor, a as CustomUpload, D as DropImage, S as Spin, b as Switch, U as UiLibrary } from './index.esm2.js';
1
+ export { C as CkEditor, a as CustomUpload, d as DateRangePicker, D as DropImage, S as Spin, b as Switch, U as UiLibrary } from './index.esm2.js';
2
2
  import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import '@radix-ui/react-switch';
5
5
  import 'clsx';
6
6
  import 'tailwind-merge';
7
+ import 'date-fns';
8
+ import 'lucide-react';
9
+ import '@radix-ui/react-slot';
10
+ import 'class-variance-authority';
11
+ import 'react-day-picker';
12
+ import 'date-fns/locale';
13
+ import '@radix-ui/react-popover';
package/index.esm2.js CHANGED
@@ -4,6 +4,13 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
4
4
  import * as SwitchPrimitives from '@radix-ui/react-switch';
5
5
  import { clsx } from 'clsx';
6
6
  import { twMerge } from 'tailwind-merge';
7
+ import { addDays, format } from 'date-fns';
8
+ import { Calendar as Calendar$1 } from 'lucide-react';
9
+ import { Slot } from '@radix-ui/react-slot';
10
+ import { cva } from 'class-variance-authority';
11
+ import { DayPicker } from 'react-day-picker';
12
+ import { zhTW } from 'date-fns/locale';
13
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
7
14
 
8
15
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
9
16
  function getDefaultExportFromCjs(x) {
@@ -2494,7 +2501,7 @@ function _iterableToArray$1(iter) {
2494
2501
  function _arrayWithoutHoles$1(arr) {
2495
2502
  if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
2496
2503
  }
2497
- function ownKeys$4(object, enumerableOnly) {
2504
+ function ownKeys$5(object, enumerableOnly) {
2498
2505
  var keys = Object.keys(object);
2499
2506
  if (Object.getOwnPropertySymbols) {
2500
2507
  var symbols = Object.getOwnPropertySymbols(object);
@@ -2507,9 +2514,9 @@ function ownKeys$4(object, enumerableOnly) {
2507
2514
  function _objectSpread$1(target) {
2508
2515
  for(var i = 1; i < arguments.length; i++){
2509
2516
  var source = null != arguments[i] ? arguments[i] : {};
2510
- i % 2 ? ownKeys$4(Object(source), !0).forEach(function(key) {
2517
+ i % 2 ? ownKeys$5(Object(source), !0).forEach(function(key) {
2511
2518
  _defineProperty$1(target, key, source[key]);
2512
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function(key) {
2519
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function(key) {
2513
2520
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2514
2521
  });
2515
2522
  }
@@ -2903,7 +2910,7 @@ function _iterableToArrayLimit(arr, i) {
2903
2910
  function _arrayWithHoles(arr) {
2904
2911
  if (Array.isArray(arr)) return arr;
2905
2912
  }
2906
- function ownKeys$3(object, enumerableOnly) {
2913
+ function ownKeys$4(object, enumerableOnly) {
2907
2914
  var keys = Object.keys(object);
2908
2915
  if (Object.getOwnPropertySymbols) {
2909
2916
  var symbols = Object.getOwnPropertySymbols(object);
@@ -2916,9 +2923,9 @@ function ownKeys$3(object, enumerableOnly) {
2916
2923
  function _objectSpread(target) {
2917
2924
  for(var i = 1; i < arguments.length; i++){
2918
2925
  var source = null != arguments[i] ? arguments[i] : {};
2919
- i % 2 ? ownKeys$3(Object(source), !0).forEach(function(key) {
2926
+ i % 2 ? ownKeys$4(Object(source), !0).forEach(function(key) {
2920
2927
  _defineProperty(target, key, source[key]);
2921
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function(key) {
2928
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function(key) {
2922
2929
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2923
2930
  });
2924
2931
  }
@@ -3880,7 +3887,7 @@ function _create_class(Constructor, protoProps, staticProps) {
3880
3887
  if (staticProps) _defineProperties(Constructor, staticProps);
3881
3888
  return Constructor;
3882
3889
  }
3883
- function _define_property$2(obj, key, value) {
3890
+ function _define_property$5(obj, key, value) {
3884
3891
  if (key in obj) {
3885
3892
  Object.defineProperty(obj, key, {
3886
3893
  value: value,
@@ -3919,7 +3926,7 @@ function _instanceof(left, right) {
3919
3926
  return left instanceof right;
3920
3927
  }
3921
3928
  }
3922
- function _object_spread$2(target) {
3929
+ function _object_spread$5(target) {
3923
3930
  for(var i = 1; i < arguments.length; i++){
3924
3931
  var source = arguments[i] != null ? arguments[i] : {};
3925
3932
  var ownKeys = Object.keys(source);
@@ -3929,12 +3936,12 @@ function _object_spread$2(target) {
3929
3936
  }));
3930
3937
  }
3931
3938
  ownKeys.forEach(function(key) {
3932
- _define_property$2(target, key, source[key]);
3939
+ _define_property$5(target, key, source[key]);
3933
3940
  });
3934
3941
  }
3935
3942
  return target;
3936
3943
  }
3937
- function ownKeys$2(object, enumerableOnly) {
3944
+ function ownKeys$3(object, enumerableOnly) {
3938
3945
  var keys = Object.keys(object);
3939
3946
  if (Object.getOwnPropertySymbols) {
3940
3947
  var symbols = Object.getOwnPropertySymbols(object);
@@ -3947,12 +3954,12 @@ function ownKeys$2(object, enumerableOnly) {
3947
3954
  }
3948
3955
  return keys;
3949
3956
  }
3950
- function _object_spread_props$2(target, source) {
3957
+ function _object_spread_props$3(target, source) {
3951
3958
  source = source != null ? source : {};
3952
3959
  if (Object.getOwnPropertyDescriptors) {
3953
3960
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3954
3961
  } else {
3955
- ownKeys$2(Object(source)).forEach(function(key) {
3962
+ ownKeys$3(Object(source)).forEach(function(key) {
3956
3963
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3957
3964
  });
3958
3965
  }
@@ -4060,8 +4067,8 @@ var defaultIconTransformations = Object.freeze({
4060
4067
  vFlip: false,
4061
4068
  hFlip: false
4062
4069
  });
4063
- var defaultIconProps = Object.freeze(_object_spread$2({}, defaultIconDimensions, defaultIconTransformations));
4064
- var defaultExtendedIconProps = Object.freeze(_object_spread_props$2(_object_spread$2({}, defaultIconProps), {
4070
+ var defaultIconProps = Object.freeze(_object_spread$5({}, defaultIconDimensions, defaultIconTransformations));
4071
+ var defaultExtendedIconProps = Object.freeze(_object_spread_props$3(_object_spread$5({}, defaultIconProps), {
4065
4072
  body: "",
4066
4073
  hidden: false
4067
4074
  }));
@@ -4149,7 +4156,7 @@ function parseIconSet(data, callback) {
4149
4156
  }
4150
4157
  return names;
4151
4158
  }
4152
- var optionalPropertyDefaults = _object_spread$2({
4159
+ var optionalPropertyDefaults = _object_spread$5({
4153
4160
  provider: "",
4154
4161
  aliases: {},
4155
4162
  not_found: {}
@@ -4218,7 +4225,7 @@ function addIconSet(storage, data) {
4218
4225
  function addIconToStorage(storage, name, icon) {
4219
4226
  try {
4220
4227
  if (typeof icon.body === "string") {
4221
- storage.icons[name] = _object_spread$2({}, icon);
4228
+ storage.icons[name] = _object_spread$5({}, icon);
4222
4229
  return true;
4223
4230
  }
4224
4231
  } catch (err) {}
@@ -4281,7 +4288,7 @@ var defaultIconSizeCustomisations = Object.freeze({
4281
4288
  width: null,
4282
4289
  height: null
4283
4290
  });
4284
- var defaultIconCustomisations = Object.freeze(_object_spread$2({}, defaultIconSizeCustomisations, defaultIconTransformations));
4291
+ var defaultIconCustomisations = Object.freeze(_object_spread$5({}, defaultIconSizeCustomisations, defaultIconTransformations));
4285
4292
  var unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
4286
4293
  var unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
4287
4294
  function calculateSize(size, ratio, precision) {
@@ -4324,8 +4331,8 @@ var isUnsetKeyword = function(value) {
4324
4331
  return value === "unset" || value === "undefined" || value === "none";
4325
4332
  };
4326
4333
  function iconToSVG(icon, customisations) {
4327
- var fullIcon = _object_spread$2({}, defaultIconProps, icon);
4328
- var fullCustomisations = _object_spread$2({}, defaultIconCustomisations, customisations);
4334
+ var fullIcon = _object_spread$5({}, defaultIconProps, icon);
4335
+ var fullCustomisations = _object_spread$5({}, defaultIconCustomisations, customisations);
4329
4336
  var box = {
4330
4337
  left: fullIcon.left,
4331
4338
  top: fullIcon.top,
@@ -4947,7 +4954,7 @@ function sendQuery(config, payload, query, done) {
4947
4954
  }
4948
4955
  // src/index.ts
4949
4956
  function initRedundancy(cfg) {
4950
- var config = _object_spread$2({}, defaultConfig, cfg);
4957
+ var config = _object_spread$5({}, defaultConfig, cfg);
4951
4958
  var queries = [];
4952
4959
  function cleanup() {
4953
4960
  queries = queries.filter(function(item) {
@@ -5309,7 +5316,7 @@ var loadIcons = function(icons, callback) {
5309
5316
  return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
5310
5317
  };
5311
5318
  function mergeCustomisations(defaults, item) {
5312
- var result = _object_spread$2({}, defaults);
5319
+ var result = _object_spread$5({}, defaults);
5313
5320
  for(var key in item){
5314
5321
  var value = item[key];
5315
5322
  var valueType = typeof value === "undefined" ? "undefined" : _type_of(value);
@@ -5404,7 +5411,7 @@ function cleanUpInnerHTML(html) {
5404
5411
  }
5405
5412
  return policy ? policy.createHTML(html) : html;
5406
5413
  }
5407
- var defaultExtendedIconCustomisations = _object_spread_props$2(_object_spread$2({}, defaultIconCustomisations), {
5414
+ var defaultExtendedIconCustomisations = _object_spread_props$3(_object_spread$5({}, defaultIconCustomisations), {
5408
5415
  inline: false
5409
5416
  });
5410
5417
  /**
@@ -5445,7 +5452,7 @@ for(var prefix in propsToAddTo){
5445
5452
  }
5446
5453
  /**
5447
5454
  * Default values for customisations for inline icon
5448
- */ var inlineDefaults = _object_spread_props$2(_object_spread$2({}, defaultExtendedIconCustomisations), {
5455
+ */ var inlineDefaults = _object_spread_props$3(_object_spread$5({}, defaultExtendedIconCustomisations), {
5449
5456
  inline: true
5450
5457
  });
5451
5458
  /**
@@ -5470,7 +5477,7 @@ ref) {
5470
5477
  var style = {};
5471
5478
  var customStyle = props.style || {};
5472
5479
  // Create SVG component properties
5473
- var componentProps = _object_spread_props$2(_object_spread$2({}, mode === "svg" ? svgDefaults : {}), {
5480
+ var componentProps = _object_spread_props$3(_object_spread$5({}, mode === "svg" ? svgDefaults : {}), {
5474
5481
  ref: ref
5475
5482
  });
5476
5483
  // Get element properties
@@ -5536,7 +5543,7 @@ ref) {
5536
5543
  }
5537
5544
  if (mode === "svg") {
5538
5545
  // Add style
5539
- componentProps.style = _object_spread$2({}, style, customStyle);
5546
+ componentProps.style = _object_spread$5({}, style, customStyle);
5540
5547
  // Add icon stuff
5541
5548
  Object.assign(componentProps, renderAttribs);
5542
5549
  // Counter for ids based on "id" property to render icons consistently on server and client
@@ -5558,12 +5565,12 @@ ref) {
5558
5565
  var body = icon.body, width = icon.width, height = icon.height;
5559
5566
  var useMask = mode === "mask" || (mode === "bg" ? false : body.indexOf("currentColor") !== -1);
5560
5567
  // Generate SVG
5561
- var html = iconToHTML(body, _object_spread_props$2(_object_spread$2({}, renderAttribs), {
5568
+ var html = iconToHTML(body, _object_spread_props$3(_object_spread$5({}, renderAttribs), {
5562
5569
  width: width + "",
5563
5570
  height: height + ""
5564
5571
  }));
5565
5572
  // Generate style
5566
- componentProps.style = _object_spread$2(_object_spread_props$2(_object_spread$2({}, style), {
5573
+ componentProps.style = _object_spread$5(_object_spread_props$3(_object_spread$5({}, style), {
5567
5574
  "--svg": svgToURL(html),
5568
5575
  "width": fixSize(renderAttribs.width),
5569
5576
  "height": fixSize(renderAttribs.height)
@@ -5775,12 +5782,12 @@ var IconComponent = /*#__PURE__*/ function(_React_Component) {
5775
5782
  // Add classes
5776
5783
  var newProps = props;
5777
5784
  if (icon.classes) {
5778
- newProps = _object_spread_props$2(_object_spread$2({}, props), {
5785
+ newProps = _object_spread_props$3(_object_spread$5({}, props), {
5779
5786
  className: (typeof props.className === "string" ? props.className + " " : "") + icon.classes.join(" ")
5780
5787
  });
5781
5788
  }
5782
5789
  // Render icon
5783
- return render(_object_spread$2({}, defaultIconProps, icon.data), newProps, props._inline, props._ref);
5790
+ return render(_object_spread$5({}, defaultIconProps, icon.data), newProps, props._inline, props._ref);
5784
5791
  }
5785
5792
  }
5786
5793
  ]);
@@ -5791,7 +5798,7 @@ var IconComponent = /*#__PURE__*/ function(_React_Component) {
5791
5798
  *
5792
5799
  * @param props - Component properties
5793
5800
  */ var Icon = React__default.forwardRef(function Icon(props, ref) {
5794
- var newProps = _object_spread_props$2(_object_spread$2({}, props), {
5801
+ var newProps = _object_spread_props$3(_object_spread$5({}, props), {
5795
5802
  _ref: ref,
5796
5803
  _inline: false
5797
5804
  });
@@ -5802,22 +5809,22 @@ var IconComponent = /*#__PURE__*/ function(_React_Component) {
5802
5809
  *
5803
5810
  * @param props - Component properties
5804
5811
  */ React__default.forwardRef(function InlineIcon(props, ref) {
5805
- var newProps = _object_spread_props$2(_object_spread$2({}, props), {
5812
+ var newProps = _object_spread_props$3(_object_spread$5({}, props), {
5806
5813
  _ref: ref,
5807
5814
  _inline: true
5808
5815
  });
5809
5816
  return React__default.createElement(IconComponent, newProps);
5810
5817
  });
5811
5818
 
5812
- function _array_like_to_array$2(arr, len) {
5819
+ function _array_like_to_array$3(arr, len) {
5813
5820
  if (len == null || len > arr.length) len = arr.length;
5814
5821
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5815
5822
  return arr2;
5816
5823
  }
5817
- function _array_with_holes$2(arr) {
5824
+ function _array_with_holes$3(arr) {
5818
5825
  if (Array.isArray(arr)) return arr;
5819
5826
  }
5820
- function _define_property$1(obj, key, value) {
5827
+ function _define_property$4(obj, key, value) {
5821
5828
  if (key in obj) {
5822
5829
  Object.defineProperty(obj, key, {
5823
5830
  value: value,
@@ -5830,7 +5837,7 @@ function _define_property$1(obj, key, value) {
5830
5837
  }
5831
5838
  return obj;
5832
5839
  }
5833
- function _iterable_to_array_limit$2(arr, i) {
5840
+ function _iterable_to_array_limit$3(arr, i) {
5834
5841
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
5835
5842
  if (_i == null) return;
5836
5843
  var _arr = [];
@@ -5854,10 +5861,10 @@ function _iterable_to_array_limit$2(arr, i) {
5854
5861
  }
5855
5862
  return _arr;
5856
5863
  }
5857
- function _non_iterable_rest$2() {
5864
+ function _non_iterable_rest$3() {
5858
5865
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5859
5866
  }
5860
- function _object_spread$1(target) {
5867
+ function _object_spread$4(target) {
5861
5868
  for(var i = 1; i < arguments.length; i++){
5862
5869
  var source = arguments[i] != null ? arguments[i] : {};
5863
5870
  var ownKeys = Object.keys(source);
@@ -5867,12 +5874,12 @@ function _object_spread$1(target) {
5867
5874
  }));
5868
5875
  }
5869
5876
  ownKeys.forEach(function(key) {
5870
- _define_property$1(target, key, source[key]);
5877
+ _define_property$4(target, key, source[key]);
5871
5878
  });
5872
5879
  }
5873
5880
  return target;
5874
5881
  }
5875
- function ownKeys$1(object, enumerableOnly) {
5882
+ function ownKeys$2(object, enumerableOnly) {
5876
5883
  var keys = Object.keys(object);
5877
5884
  if (Object.getOwnPropertySymbols) {
5878
5885
  var symbols = Object.getOwnPropertySymbols(object);
@@ -5885,31 +5892,31 @@ function ownKeys$1(object, enumerableOnly) {
5885
5892
  }
5886
5893
  return keys;
5887
5894
  }
5888
- function _object_spread_props$1(target, source) {
5895
+ function _object_spread_props$2(target, source) {
5889
5896
  source = source != null ? source : {};
5890
5897
  if (Object.getOwnPropertyDescriptors) {
5891
5898
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
5892
5899
  } else {
5893
- ownKeys$1(Object(source)).forEach(function(key) {
5900
+ ownKeys$2(Object(source)).forEach(function(key) {
5894
5901
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
5895
5902
  });
5896
5903
  }
5897
5904
  return target;
5898
5905
  }
5899
- function _sliced_to_array$2(arr, i) {
5900
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
5906
+ function _sliced_to_array$3(arr, i) {
5907
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
5901
5908
  }
5902
- function _unsupported_iterable_to_array$2(o, minLen) {
5909
+ function _unsupported_iterable_to_array$3(o, minLen) {
5903
5910
  if (!o) return;
5904
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
5911
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
5905
5912
  var n = Object.prototype.toString.call(o).slice(8, -1);
5906
5913
  if (n === "Object" && o.constructor) n = o.constructor.name;
5907
5914
  if (n === "Map" || n === "Set") return Array.from(n);
5908
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
5915
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
5909
5916
  }
5910
5917
  var DropImage = function(param) {
5911
5918
  var _param_preview = param.preview, preview = _param_preview === void 0 ? true : _param_preview, setFiles = param.setFiles, imageUrls = param.imageUrls;
5912
- var _useState = _sliced_to_array$2(useState([]), 2), previewFiles = _useState[0], setPreviewFiles = _useState[1];
5919
+ var _useState = _sliced_to_array$3(useState([]), 2), previewFiles = _useState[0], setPreviewFiles = _useState[1];
5913
5920
  var _useDropzone = useDropzone({
5914
5921
  accept: {
5915
5922
  "image/png": [
@@ -5938,11 +5945,11 @@ var DropImage = function(param) {
5938
5945
  return /*#__PURE__*/ jsxs("section", {
5939
5946
  className: "w-full",
5940
5947
  children: [
5941
- /*#__PURE__*/ jsxs("div", _object_spread_props$1(_object_spread$1({}, getRootProps({
5948
+ /*#__PURE__*/ jsxs("div", _object_spread_props$2(_object_spread$4({}, getRootProps({
5942
5949
  className: "dropzone"
5943
5950
  })), {
5944
5951
  children: [
5945
- /*#__PURE__*/ jsx("input", _object_spread$1({}, getInputProps())),
5952
+ /*#__PURE__*/ jsx("input", _object_spread$4({}, getInputProps())),
5946
5953
  /*#__PURE__*/ jsx("div", {
5947
5954
  className: "flex justify-between",
5948
5955
  children: /*#__PURE__*/ jsx("div", {
@@ -6098,15 +6105,15 @@ var Modal = function(param) {
6098
6105
  });
6099
6106
  };
6100
6107
 
6101
- function _array_like_to_array$1(arr, len) {
6108
+ function _array_like_to_array$2(arr, len) {
6102
6109
  if (len == null || len > arr.length) len = arr.length;
6103
6110
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6104
6111
  return arr2;
6105
6112
  }
6106
- function _array_with_holes$1(arr) {
6113
+ function _array_with_holes$2(arr) {
6107
6114
  if (Array.isArray(arr)) return arr;
6108
6115
  }
6109
- function _iterable_to_array_limit$1(arr, i) {
6116
+ function _iterable_to_array_limit$2(arr, i) {
6110
6117
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6111
6118
  if (_i == null) return;
6112
6119
  var _arr = [];
@@ -6130,23 +6137,23 @@ function _iterable_to_array_limit$1(arr, i) {
6130
6137
  }
6131
6138
  return _arr;
6132
6139
  }
6133
- function _non_iterable_rest$1() {
6140
+ function _non_iterable_rest$2() {
6134
6141
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6135
6142
  }
6136
- function _sliced_to_array$1(arr, i) {
6137
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
6143
+ function _sliced_to_array$2(arr, i) {
6144
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
6138
6145
  }
6139
- function _unsupported_iterable_to_array$1(o, minLen) {
6146
+ function _unsupported_iterable_to_array$2(o, minLen) {
6140
6147
  if (!o) return;
6141
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
6148
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
6142
6149
  var n = Object.prototype.toString.call(o).slice(8, -1);
6143
6150
  if (n === "Object" && o.constructor) n = o.constructor.name;
6144
6151
  if (n === "Map" || n === "Set") return Array.from(n);
6145
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
6152
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
6146
6153
  }
6147
6154
  var BaseTemplate = function(param) {
6148
6155
  var file = param.file, imageUrl = param.imageUrl;
6149
- var _useState = _sliced_to_array$1(useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
6156
+ var _useState = _sliced_to_array$2(useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
6150
6157
  useEffect(function() {
6151
6158
  var fileReader;
6152
6159
  var isCancel = false;
@@ -6207,15 +6214,15 @@ var BaseTemplate = function(param) {
6207
6214
  });
6208
6215
  };
6209
6216
 
6210
- function _array_like_to_array(arr, len) {
6217
+ function _array_like_to_array$1(arr, len) {
6211
6218
  if (len == null || len > arr.length) len = arr.length;
6212
6219
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6213
6220
  return arr2;
6214
6221
  }
6215
- function _array_with_holes(arr) {
6222
+ function _array_with_holes$1(arr) {
6216
6223
  if (Array.isArray(arr)) return arr;
6217
6224
  }
6218
- function _iterable_to_array_limit(arr, i) {
6225
+ function _iterable_to_array_limit$1(arr, i) {
6219
6226
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6220
6227
  if (_i == null) return;
6221
6228
  var _arr = [];
@@ -6239,25 +6246,25 @@ function _iterable_to_array_limit(arr, i) {
6239
6246
  }
6240
6247
  return _arr;
6241
6248
  }
6242
- function _non_iterable_rest() {
6249
+ function _non_iterable_rest$1() {
6243
6250
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6244
6251
  }
6245
- function _sliced_to_array(arr, i) {
6246
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
6252
+ function _sliced_to_array$1(arr, i) {
6253
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
6247
6254
  }
6248
- function _unsupported_iterable_to_array(o, minLen) {
6255
+ function _unsupported_iterable_to_array$1(o, minLen) {
6249
6256
  if (!o) return;
6250
- if (typeof o === "string") return _array_like_to_array(o, minLen);
6257
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
6251
6258
  var n = Object.prototype.toString.call(o).slice(8, -1);
6252
6259
  if (n === "Object" && o.constructor) n = o.constructor.name;
6253
6260
  if (n === "Map" || n === "Set") return Array.from(n);
6254
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
6261
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
6255
6262
  }
6256
6263
  var CustomUpload = function(param) {
6257
6264
  var className = param.className, children = param.children, file = param.file, setFile = param.setFile, imageUrl = param.imageUrl;
6258
6265
  var imageMimeType = /image\/(png|jpg|jpeg)/i;
6259
6266
  var DEFAULT_IMAGE_SIZE_LIMIT_IN_BYTES = 5120000; // 5000 KB
6260
- var _useState = _sliced_to_array(useState(null), 2), modal = _useState[0], setModal = _useState[1];
6267
+ var _useState = _sliced_to_array$1(useState(null), 2), modal = _useState[0], setModal = _useState[1];
6261
6268
  var hiddenFileInput = useRef(null);
6262
6269
  var handleImageClick = function() {
6263
6270
  var _hiddenFileInput_current;
@@ -6334,7 +6341,7 @@ function cn() {
6334
6341
  return twMerge(clsx(inputs));
6335
6342
  }
6336
6343
 
6337
- function _define_property(obj, key, value) {
6344
+ function _define_property$3(obj, key, value) {
6338
6345
  if (key in obj) {
6339
6346
  Object.defineProperty(obj, key, {
6340
6347
  value: value,
@@ -6347,7 +6354,7 @@ function _define_property(obj, key, value) {
6347
6354
  }
6348
6355
  return obj;
6349
6356
  }
6350
- function _object_spread(target) {
6357
+ function _object_spread$3(target) {
6351
6358
  for(var i = 1; i < arguments.length; i++){
6352
6359
  var source = arguments[i] != null ? arguments[i] : {};
6353
6360
  var ownKeys = Object.keys(source);
@@ -6357,12 +6364,12 @@ function _object_spread(target) {
6357
6364
  }));
6358
6365
  }
6359
6366
  ownKeys.forEach(function(key) {
6360
- _define_property(target, key, source[key]);
6367
+ _define_property$3(target, key, source[key]);
6361
6368
  });
6362
6369
  }
6363
6370
  return target;
6364
6371
  }
6365
- function ownKeys(object, enumerableOnly) {
6372
+ function ownKeys$1(object, enumerableOnly) {
6366
6373
  var keys = Object.keys(object);
6367
6374
  if (Object.getOwnPropertySymbols) {
6368
6375
  var symbols = Object.getOwnPropertySymbols(object);
@@ -6375,20 +6382,20 @@ function ownKeys(object, enumerableOnly) {
6375
6382
  }
6376
6383
  return keys;
6377
6384
  }
6378
- function _object_spread_props(target, source) {
6385
+ function _object_spread_props$1(target, source) {
6379
6386
  source = source != null ? source : {};
6380
6387
  if (Object.getOwnPropertyDescriptors) {
6381
6388
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6382
6389
  } else {
6383
- ownKeys(Object(source)).forEach(function(key) {
6390
+ ownKeys$1(Object(source)).forEach(function(key) {
6384
6391
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6385
6392
  });
6386
6393
  }
6387
6394
  return target;
6388
6395
  }
6389
- function _object_without_properties(source, excluded) {
6396
+ function _object_without_properties$3(source, excluded) {
6390
6397
  if (source == null) return {};
6391
- var target = _object_without_properties_loose(source, excluded);
6398
+ var target = _object_without_properties_loose$3(source, excluded);
6392
6399
  var key, i;
6393
6400
  if (Object.getOwnPropertySymbols) {
6394
6401
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -6401,7 +6408,7 @@ function _object_without_properties(source, excluded) {
6401
6408
  }
6402
6409
  return target;
6403
6410
  }
6404
- function _object_without_properties_loose(source, excluded) {
6411
+ function _object_without_properties_loose$3(source, excluded) {
6405
6412
  if (source == null) return {};
6406
6413
  var target = {};
6407
6414
  var sourceKeys = Object.keys(source);
@@ -6414,10 +6421,10 @@ function _object_without_properties_loose(source, excluded) {
6414
6421
  return target;
6415
6422
  }
6416
6423
  var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
6417
- var className = _param.className, props = _object_without_properties(_param, [
6424
+ var className = _param.className, props = _object_without_properties$3(_param, [
6418
6425
  "className"
6419
6426
  ]);
6420
- return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props(_object_spread({
6427
+ return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props$1(_object_spread$3({
6421
6428
  className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className)
6422
6429
  }, props), {
6423
6430
  ref: ref,
@@ -6428,6 +6435,437 @@ var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
6428
6435
  });
6429
6436
  Switch.displayName = SwitchPrimitives.Root.displayName;
6430
6437
 
6438
+ function _define_property$2(obj, key, value) {
6439
+ if (key in obj) {
6440
+ Object.defineProperty(obj, key, {
6441
+ value: value,
6442
+ enumerable: true,
6443
+ configurable: true,
6444
+ writable: true
6445
+ });
6446
+ } else {
6447
+ obj[key] = value;
6448
+ }
6449
+ return obj;
6450
+ }
6451
+ function _object_spread$2(target) {
6452
+ for(var i = 1; i < arguments.length; i++){
6453
+ var source = arguments[i] != null ? arguments[i] : {};
6454
+ var ownKeys = Object.keys(source);
6455
+ if (typeof Object.getOwnPropertySymbols === "function") {
6456
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
6457
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
6458
+ }));
6459
+ }
6460
+ ownKeys.forEach(function(key) {
6461
+ _define_property$2(target, key, source[key]);
6462
+ });
6463
+ }
6464
+ return target;
6465
+ }
6466
+ function _object_without_properties$2(source, excluded) {
6467
+ if (source == null) return {};
6468
+ var target = _object_without_properties_loose$2(source, excluded);
6469
+ var key, i;
6470
+ if (Object.getOwnPropertySymbols) {
6471
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
6472
+ for(i = 0; i < sourceSymbolKeys.length; i++){
6473
+ key = sourceSymbolKeys[i];
6474
+ if (excluded.indexOf(key) >= 0) continue;
6475
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
6476
+ target[key] = source[key];
6477
+ }
6478
+ }
6479
+ return target;
6480
+ }
6481
+ function _object_without_properties_loose$2(source, excluded) {
6482
+ if (source == null) return {};
6483
+ var target = {};
6484
+ var sourceKeys = Object.keys(source);
6485
+ var key, i;
6486
+ for(i = 0; i < sourceKeys.length; i++){
6487
+ key = sourceKeys[i];
6488
+ if (excluded.indexOf(key) >= 0) continue;
6489
+ target[key] = source[key];
6490
+ }
6491
+ return target;
6492
+ }
6493
+ var buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
6494
+ variants: {
6495
+ variant: {
6496
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
6497
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
6498
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
6499
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
6500
+ ghost: "hover:bg-accent hover:text-accent-foreground",
6501
+ link: "text-primary underline-offset-4 hover:underline"
6502
+ },
6503
+ size: {
6504
+ default: "h-9 px-4 py-2",
6505
+ sm: "h-8 rounded-md px-3 text-xs",
6506
+ lg: "h-10 rounded-md px-8",
6507
+ icon: "h-9 w-9"
6508
+ }
6509
+ },
6510
+ defaultVariants: {
6511
+ variant: "default",
6512
+ size: "default"
6513
+ }
6514
+ });
6515
+ var Button = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
6516
+ var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties$2(_param, [
6517
+ "className",
6518
+ "variant",
6519
+ "size",
6520
+ "asChild"
6521
+ ]);
6522
+ var Comp = asChild ? Slot : "button";
6523
+ return /*#__PURE__*/ jsx(Comp, _object_spread$2({
6524
+ className: cn(buttonVariants({
6525
+ variant: variant,
6526
+ size: size,
6527
+ className: className
6528
+ })),
6529
+ ref: ref
6530
+ }, props));
6531
+ });
6532
+ Button.displayName = "Button";
6533
+
6534
+ function _define_property$1(obj, key, value) {
6535
+ if (key in obj) {
6536
+ Object.defineProperty(obj, key, {
6537
+ value: value,
6538
+ enumerable: true,
6539
+ configurable: true,
6540
+ writable: true
6541
+ });
6542
+ } else {
6543
+ obj[key] = value;
6544
+ }
6545
+ return obj;
6546
+ }
6547
+ function _extends() {
6548
+ _extends = Object.assign || function(target) {
6549
+ for(var i = 1; i < arguments.length; i++){
6550
+ var source = arguments[i];
6551
+ for(var key in source){
6552
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
6553
+ target[key] = source[key];
6554
+ }
6555
+ }
6556
+ }
6557
+ return target;
6558
+ };
6559
+ return _extends.apply(this, arguments);
6560
+ }
6561
+ function _object_destructuring_empty(o) {
6562
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
6563
+ return o;
6564
+ }
6565
+ function _object_spread$1(target) {
6566
+ for(var i = 1; i < arguments.length; i++){
6567
+ var source = arguments[i] != null ? arguments[i] : {};
6568
+ var ownKeys = Object.keys(source);
6569
+ if (typeof Object.getOwnPropertySymbols === "function") {
6570
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
6571
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
6572
+ }));
6573
+ }
6574
+ ownKeys.forEach(function(key) {
6575
+ _define_property$1(target, key, source[key]);
6576
+ });
6577
+ }
6578
+ return target;
6579
+ }
6580
+ function ownKeys(object, enumerableOnly) {
6581
+ var keys = Object.keys(object);
6582
+ if (Object.getOwnPropertySymbols) {
6583
+ var symbols = Object.getOwnPropertySymbols(object);
6584
+ if (enumerableOnly) {
6585
+ symbols = symbols.filter(function(sym) {
6586
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
6587
+ });
6588
+ }
6589
+ keys.push.apply(keys, symbols);
6590
+ }
6591
+ return keys;
6592
+ }
6593
+ function _object_spread_props(target, source) {
6594
+ source = source != null ? source : {};
6595
+ if (Object.getOwnPropertyDescriptors) {
6596
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
6597
+ } else {
6598
+ ownKeys(Object(source)).forEach(function(key) {
6599
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
6600
+ });
6601
+ }
6602
+ return target;
6603
+ }
6604
+ function _object_without_properties$1(source, excluded) {
6605
+ if (source == null) return {};
6606
+ var target = _object_without_properties_loose$1(source, excluded);
6607
+ var key, i;
6608
+ if (Object.getOwnPropertySymbols) {
6609
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
6610
+ for(i = 0; i < sourceSymbolKeys.length; i++){
6611
+ key = sourceSymbolKeys[i];
6612
+ if (excluded.indexOf(key) >= 0) continue;
6613
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
6614
+ target[key] = source[key];
6615
+ }
6616
+ }
6617
+ return target;
6618
+ }
6619
+ function _object_without_properties_loose$1(source, excluded) {
6620
+ if (source == null) return {};
6621
+ var target = {};
6622
+ var sourceKeys = Object.keys(source);
6623
+ var key, i;
6624
+ for(i = 0; i < sourceKeys.length; i++){
6625
+ key = sourceKeys[i];
6626
+ if (excluded.indexOf(key) >= 0) continue;
6627
+ target[key] = source[key];
6628
+ }
6629
+ return target;
6630
+ }
6631
+ function Calendar(_param) {
6632
+ var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties$1(_param, [
6633
+ "className",
6634
+ "classNames",
6635
+ "showOutsideDays"
6636
+ ]);
6637
+ return /*#__PURE__*/ jsx(DayPicker, _object_spread_props(_object_spread$1({
6638
+ showOutsideDays: showOutsideDays,
6639
+ className: cn("p-3", className),
6640
+ classNames: _object_spread$1({
6641
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
6642
+ month: "space-y-4",
6643
+ caption: "flex justify-center pt-1 relative items-center",
6644
+ caption_label: "text-sm font-medium",
6645
+ nav: "space-x-1 flex items-center",
6646
+ nav_button: cn(buttonVariants({
6647
+ variant: "outline"
6648
+ }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
6649
+ nav_button_previous: "absolute left-1",
6650
+ nav_button_next: "absolute right-1",
6651
+ table: "w-full border-collapse space-y-1",
6652
+ head_row: "flex",
6653
+ head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
6654
+ row: "flex w-full mt-2",
6655
+ cell: cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md", props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
6656
+ day: cn(buttonVariants({
6657
+ variant: "ghost"
6658
+ }), "h-8 w-8 p-0 font-normal aria-selected:opacity-100"),
6659
+ day_range_start: "day-range-start",
6660
+ day_range_end: "day-range-end",
6661
+ day_selected: "bg-[#000] text-primary-foreground hover:bg-[#000] hover:text-primary-foreground focus:bg-[#000] focus:text-primary-foreground",
6662
+ day_today: "bg-accent text-accent-foreground",
6663
+ day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
6664
+ day_disabled: "text-muted-foreground opacity-50",
6665
+ day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
6666
+ day_hidden: "invisible"
6667
+ }, classNames),
6668
+ components: {
6669
+ IconLeft: function(_param) {
6670
+ _extends({}, _object_destructuring_empty(_param));
6671
+ return /*#__PURE__*/ jsx(Icon, {
6672
+ icon: "heroicons-solid:arrow-left",
6673
+ width: "1rem",
6674
+ height: "1rem"
6675
+ });
6676
+ },
6677
+ IconRight: function(_param) {
6678
+ _extends({}, _object_destructuring_empty(_param));
6679
+ return /*#__PURE__*/ jsx(Icon, {
6680
+ icon: "heroicons-solid:arrow-right",
6681
+ width: "1rem",
6682
+ height: "1rem"
6683
+ });
6684
+ }
6685
+ }
6686
+ }, props), {
6687
+ locale: zhTW
6688
+ }));
6689
+ }
6690
+ Calendar.displayName = "Calendar";
6691
+
6692
+ function _define_property(obj, key, value) {
6693
+ if (key in obj) {
6694
+ Object.defineProperty(obj, key, {
6695
+ value: value,
6696
+ enumerable: true,
6697
+ configurable: true,
6698
+ writable: true
6699
+ });
6700
+ } else {
6701
+ obj[key] = value;
6702
+ }
6703
+ return obj;
6704
+ }
6705
+ function _object_spread(target) {
6706
+ for(var i = 1; i < arguments.length; i++){
6707
+ var source = arguments[i] != null ? arguments[i] : {};
6708
+ var ownKeys = Object.keys(source);
6709
+ if (typeof Object.getOwnPropertySymbols === "function") {
6710
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
6711
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
6712
+ }));
6713
+ }
6714
+ ownKeys.forEach(function(key) {
6715
+ _define_property(target, key, source[key]);
6716
+ });
6717
+ }
6718
+ return target;
6719
+ }
6720
+ function _object_without_properties(source, excluded) {
6721
+ if (source == null) return {};
6722
+ var target = _object_without_properties_loose(source, excluded);
6723
+ var key, i;
6724
+ if (Object.getOwnPropertySymbols) {
6725
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
6726
+ for(i = 0; i < sourceSymbolKeys.length; i++){
6727
+ key = sourceSymbolKeys[i];
6728
+ if (excluded.indexOf(key) >= 0) continue;
6729
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
6730
+ target[key] = source[key];
6731
+ }
6732
+ }
6733
+ return target;
6734
+ }
6735
+ function _object_without_properties_loose(source, excluded) {
6736
+ if (source == null) return {};
6737
+ var target = {};
6738
+ var sourceKeys = Object.keys(source);
6739
+ var key, i;
6740
+ for(i = 0; i < sourceKeys.length; i++){
6741
+ key = sourceKeys[i];
6742
+ if (excluded.indexOf(key) >= 0) continue;
6743
+ target[key] = source[key];
6744
+ }
6745
+ return target;
6746
+ }
6747
+ var Popover = PopoverPrimitive.Root;
6748
+ var PopoverTrigger = PopoverPrimitive.Trigger;
6749
+ var PopoverContent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
6750
+ var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
6751
+ "className",
6752
+ "align",
6753
+ "sideOffset"
6754
+ ]);
6755
+ return /*#__PURE__*/ jsx(PopoverPrimitive.Portal, {
6756
+ children: /*#__PURE__*/ jsx(PopoverPrimitive.Content, _object_spread({
6757
+ ref: ref,
6758
+ align: align,
6759
+ sideOffset: sideOffset,
6760
+ className: cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className)
6761
+ }, props))
6762
+ });
6763
+ });
6764
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
6765
+
6766
+ function _array_like_to_array(arr, len) {
6767
+ if (len == null || len > arr.length) len = arr.length;
6768
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6769
+ return arr2;
6770
+ }
6771
+ function _array_with_holes(arr) {
6772
+ if (Array.isArray(arr)) return arr;
6773
+ }
6774
+ function _iterable_to_array_limit(arr, i) {
6775
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
6776
+ if (_i == null) return;
6777
+ var _arr = [];
6778
+ var _n = true;
6779
+ var _d = false;
6780
+ var _s, _e;
6781
+ try {
6782
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
6783
+ _arr.push(_s.value);
6784
+ if (i && _arr.length === i) break;
6785
+ }
6786
+ } catch (err) {
6787
+ _d = true;
6788
+ _e = err;
6789
+ } finally{
6790
+ try {
6791
+ if (!_n && _i["return"] != null) _i["return"]();
6792
+ } finally{
6793
+ if (_d) throw _e;
6794
+ }
6795
+ }
6796
+ return _arr;
6797
+ }
6798
+ function _non_iterable_rest() {
6799
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6800
+ }
6801
+ function _sliced_to_array(arr, i) {
6802
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
6803
+ }
6804
+ function _unsupported_iterable_to_array(o, minLen) {
6805
+ if (!o) return;
6806
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
6807
+ var n = Object.prototype.toString.call(o).slice(8, -1);
6808
+ if (n === "Object" && o.constructor) n = o.constructor.name;
6809
+ if (n === "Map" || n === "Set") return Array.from(n);
6810
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
6811
+ }
6812
+ function DateRangePicker(param) {
6813
+ var className = param.className, disable = param.disable, onChange = param.onChange;
6814
+ var _useState = _sliced_to_array(useState({
6815
+ from: new Date(2024, 0, 20),
6816
+ to: addDays(new Date(2024, 0, 20), 20)
6817
+ }), 2), date = _useState[0], setDate = _useState[1];
6818
+ var handleDateChange = function(newDate) {
6819
+ if (newDate) {
6820
+ setDate(newDate);
6821
+ if (onChange) onChange(newDate);
6822
+ }
6823
+ };
6824
+ return /*#__PURE__*/ jsx("div", {
6825
+ className: cn("grid gap-2", className, disable ? "pointer-events-none opacity-55" : "pointer-events-auto opacity-100"),
6826
+ children: /*#__PURE__*/ jsxs(Popover, {
6827
+ children: [
6828
+ /*#__PURE__*/ jsx(PopoverTrigger, {
6829
+ asChild: true,
6830
+ children: /*#__PURE__*/ jsxs(Button, {
6831
+ id: "date",
6832
+ variant: "outline",
6833
+ className: cn("w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
6834
+ children: [
6835
+ /*#__PURE__*/ jsx(Calendar$1, {
6836
+ className: "mr-2 h-4 w-4"
6837
+ }),
6838
+ (date === null || date === void 0 ? void 0 : date.from) ? date.to ? /*#__PURE__*/ jsxs(Fragment$1, {
6839
+ children: [
6840
+ format(date.from, "yyyy-MM-dd"),
6841
+ " -",
6842
+ " ",
6843
+ format(date.to, "yyyy-MM-dd")
6844
+ ]
6845
+ }) : format(date.from, "yyyy-MM-dd") : /*#__PURE__*/ jsx("span", {
6846
+ children: "Pick a date"
6847
+ })
6848
+ ]
6849
+ })
6850
+ }),
6851
+ /*#__PURE__*/ jsx(PopoverContent, {
6852
+ className: "w-auto p-0",
6853
+ align: "start",
6854
+ children: /*#__PURE__*/ jsx(Calendar, {
6855
+ initialFocus: true,
6856
+ mode: "range",
6857
+ defaultMonth: date === null || date === void 0 ? void 0 : date.from,
6858
+ selected: date,
6859
+ onSelect: handleDateChange,
6860
+ numberOfMonths: 2
6861
+ })
6862
+ })
6863
+ ]
6864
+ })
6865
+ });
6866
+ }
6867
+ DateRangePicker.displayName = "DateRangePicker";
6868
+
6431
6869
  // Use this file to export React client components (e.g. those with 'use client' directive) or other non-server utilities
6432
6870
  var CkEditor = dynamic(function() {
6433
6871
  return import('./index.esm3.js');
@@ -6435,4 +6873,4 @@ var CkEditor = dynamic(function() {
6435
6873
  ssr: false
6436
6874
  });
6437
6875
 
6438
- export { CkEditor as C, DropImage as D, Spin as S, UiLibrary as U, CustomUpload as a, Switch as b, commonjsGlobal as c, getDefaultExportFromCjs as g };
6876
+ export { CkEditor as C, DropImage as D, Spin as S, UiLibrary as U, CustomUpload as a, Switch as b, commonjsGlobal as c, DateRangePicker as d, getDefaultExportFromCjs as g };
package/index.esm3.js CHANGED
@@ -4,6 +4,13 @@ import React__default from 'react';
4
4
  import '@radix-ui/react-switch';
5
5
  import 'clsx';
6
6
  import 'tailwind-merge';
7
+ import 'date-fns';
8
+ import 'lucide-react';
9
+ import '@radix-ui/react-slot';
10
+ import 'class-variance-authority';
11
+ import 'react-day-picker';
12
+ import 'date-fns/locale';
13
+ import '@radix-ui/react-popover';
7
14
 
8
15
  var dist = {
9
16
  exports: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "dependencies": {
5
5
  "@radix-ui/react-popover": "^1.0.7",
6
6
  "@radix-ui/react-slot": "^1.0.2",
package/src/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './lib/Spin';
6
6
  export * from './lib/DropImage';
7
7
  export * from './lib/UploadImage/CustomUpload';
8
8
  export * from './lib/Switch';
9
+ export * from './components/ui/dateRangePicker';