@sunggang/ui-lib 0.1.15 → 0.1.17

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
@@ -1170,6 +1170,10 @@ video {
1170
1170
  --tw-text-opacity: 1;
1171
1171
  color: rgb(115 115 115 / var(--tw-text-opacity));
1172
1172
  }
1173
+ .text-\[\#fff\] {
1174
+ --tw-text-opacity: 1;
1175
+ color: rgb(255 255 255 / var(--tw-text-opacity));
1176
+ }
1173
1177
  .text-accent-foreground {
1174
1178
  color: hsl(var(--accent-foreground));
1175
1179
  }
@@ -1368,12 +1372,13 @@ video {
1368
1372
  background-color: hsl(var(--secondary) / 0.8);
1369
1373
  }
1370
1374
 
1371
- .hover\:text-accent-foreground:hover {
1372
- color: hsl(var(--accent-foreground));
1375
+ .hover\:text-\[\#fff\]:hover {
1376
+ --tw-text-opacity: 1;
1377
+ color: rgb(255 255 255 / var(--tw-text-opacity));
1373
1378
  }
1374
1379
 
1375
- .hover\:text-primary-foreground:hover {
1376
- color: hsl(var(--primary-foreground));
1380
+ .hover\:text-accent-foreground:hover {
1381
+ color: hsl(var(--accent-foreground));
1377
1382
  }
1378
1383
 
1379
1384
  .hover\:underline:hover {
@@ -1389,8 +1394,9 @@ video {
1389
1394
  background-color: rgb(0 0 0 / var(--tw-bg-opacity));
1390
1395
  }
1391
1396
 
1392
- .focus\:text-primary-foreground:focus {
1393
- color: hsl(var(--primary-foreground));
1397
+ .focus\:text-\[\#fff\]:focus {
1398
+ --tw-text-opacity: 1;
1399
+ color: rgb(255 255 255 / var(--tw-text-opacity));
1394
1400
  }
1395
1401
 
1396
1402
  .focus-visible\:outline-none:focus-visible {
package/index.esm2.js CHANGED
@@ -4,7 +4,7 @@ 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';
7
+ import { format } from 'date-fns';
8
8
  import { Calendar as Calendar$1 } from 'lucide-react';
9
9
  import { Slot } from '@radix-ui/react-slot';
10
10
  import { cva } from 'class-variance-authority';
@@ -6658,7 +6658,7 @@ function Calendar(_param) {
6658
6658
  }), "h-8 w-8 p-0 font-normal aria-selected:opacity-100"),
6659
6659
  day_range_start: "day-range-start",
6660
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",
6661
+ day_selected: "bg-[#000] text-[#fff] hover:bg-[#000] hover:text-[#fff] focus:bg-[#000] focus:text-[#fff]",
6662
6662
  day_today: "bg-accent text-accent-foreground",
6663
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
6664
  day_disabled: "text-muted-foreground opacity-50",
@@ -6810,10 +6810,11 @@ function _unsupported_iterable_to_array(o, minLen) {
6810
6810
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
6811
6811
  }
6812
6812
  function DateRangePicker(param) {
6813
- var className = param.className, disable = param.disable, onChange = param.onChange;
6813
+ var className = param.className, disable = param.disable, onChange = param.onChange, dates = param.dates;
6814
+ console.log(dates);
6814
6815
  var _useState = _sliced_to_array(useState({
6815
- from: new Date(2024, 0, 20),
6816
- to: addDays(new Date(2024, 0, 20), 20)
6816
+ from: (dates === null || dates === void 0 ? void 0 : dates.from) || undefined,
6817
+ to: (dates === null || dates === void 0 ? void 0 : dates.to) || undefined
6817
6818
  }), 2), date = _useState[0], setDate = _useState[1];
6818
6819
  var handleDateChange = function(newDate) {
6819
6820
  if (newDate) {
@@ -6843,7 +6844,7 @@ function DateRangePicker(param) {
6843
6844
  format(date.to, "yyyy-MM-dd")
6844
6845
  ]
6845
6846
  }) : format(date.from, "yyyy-MM-dd") : /*#__PURE__*/ jsx("span", {
6846
- children: "Pick a date"
6847
+ children: "請選擇日期"
6847
6848
  })
6848
6849
  ]
6849
6850
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "dependencies": {
5
5
  "@radix-ui/react-popover": "^1.0.7",
6
6
  "@radix-ui/react-slot": "^1.0.2",
@@ -1,10 +1,15 @@
1
1
  import { DateRange } from 'react-day-picker';
2
+ interface DateRangeType {
3
+ from: Date | undefined;
4
+ to: Date | undefined;
5
+ }
2
6
  interface DateRangePickerProps {
3
7
  className?: string;
4
8
  disable?: boolean;
5
9
  onChange?: (date: DateRange) => void;
10
+ dates?: DateRangeType;
6
11
  }
7
- declare function DateRangePicker({ className, disable, onChange, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
12
+ declare function DateRangePicker({ className, disable, onChange, dates, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
8
13
  declare namespace DateRangePicker {
9
14
  var displayName: string;
10
15
  }