luaniverse 4.1.0 → 4.1.1
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 +204 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +199 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,9 @@ var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
|
20
20
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
21
21
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
22
22
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
23
|
+
var lucideReact = require('lucide-react');
|
|
24
|
+
var reactDayPicker = require('react-day-picker');
|
|
25
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
23
26
|
|
|
24
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
28
|
|
|
@@ -53,6 +56,7 @@ var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive
|
|
|
53
56
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
54
57
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
55
58
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
59
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
56
60
|
|
|
57
61
|
var __defProp = Object.defineProperty;
|
|
58
62
|
var __export = (target, all) => {
|
|
@@ -6011,6 +6015,201 @@ var Slider = React118__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6011
6015
|
}
|
|
6012
6016
|
));
|
|
6013
6017
|
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
6018
|
+
function CalendarRoot({ className, rootRef, ...props }) {
|
|
6019
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6020
|
+
"div",
|
|
6021
|
+
{
|
|
6022
|
+
"data-slot": "calendar",
|
|
6023
|
+
ref: rootRef,
|
|
6024
|
+
className: cn(className),
|
|
6025
|
+
...props
|
|
6026
|
+
}
|
|
6027
|
+
);
|
|
6028
|
+
}
|
|
6029
|
+
function CalendarChevron({
|
|
6030
|
+
className,
|
|
6031
|
+
orientation,
|
|
6032
|
+
...props
|
|
6033
|
+
}) {
|
|
6034
|
+
if (orientation === "left") {
|
|
6035
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: cn("lua:size-3", className), ...props });
|
|
6036
|
+
}
|
|
6037
|
+
if (orientation === "right") {
|
|
6038
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: cn("lua:size-3", className), ...props });
|
|
6039
|
+
}
|
|
6040
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: cn("lua:size-3", className), ...props });
|
|
6041
|
+
}
|
|
6042
|
+
function CalendarWeekNumber({ children, ...props }) {
|
|
6043
|
+
return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lua:flex lua:size-[--cell-size] lua:items-center lua:justify-center lua:text-center lua:font-onest", children }) });
|
|
6044
|
+
}
|
|
6045
|
+
function CalendarDayButton({
|
|
6046
|
+
className,
|
|
6047
|
+
day,
|
|
6048
|
+
modifiers,
|
|
6049
|
+
...props
|
|
6050
|
+
}) {
|
|
6051
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
6052
|
+
const ref = React118__namespace.useRef(null);
|
|
6053
|
+
React118__namespace.useEffect(() => {
|
|
6054
|
+
if (modifiers.focused) ref.current?.focus();
|
|
6055
|
+
}, [modifiers.focused]);
|
|
6056
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6057
|
+
"button",
|
|
6058
|
+
{
|
|
6059
|
+
ref,
|
|
6060
|
+
type: "button",
|
|
6061
|
+
"data-day": day.date.toLocaleDateString(),
|
|
6062
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
6063
|
+
"data-range-start": modifiers.range_start,
|
|
6064
|
+
"data-range-end": modifiers.range_end,
|
|
6065
|
+
"data-range-middle": modifiers.range_middle,
|
|
6066
|
+
className: cn(defaultClassNames.day, className),
|
|
6067
|
+
...props
|
|
6068
|
+
}
|
|
6069
|
+
);
|
|
6070
|
+
}
|
|
6071
|
+
function Calendar({
|
|
6072
|
+
className,
|
|
6073
|
+
classNames,
|
|
6074
|
+
showOutsideDays = true,
|
|
6075
|
+
captionLayout = "label",
|
|
6076
|
+
formatters,
|
|
6077
|
+
components,
|
|
6078
|
+
...props
|
|
6079
|
+
}) {
|
|
6080
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
6081
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6082
|
+
reactDayPicker.DayPicker,
|
|
6083
|
+
{
|
|
6084
|
+
showOutsideDays,
|
|
6085
|
+
className: cn(
|
|
6086
|
+
"lua:group/calendar lua:p-1.5 lua:rounded-md [--cell-size:1.5rem] lua:font-onest",
|
|
6087
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:lua:rotate-180`,
|
|
6088
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:lua:rotate-180`,
|
|
6089
|
+
className
|
|
6090
|
+
),
|
|
6091
|
+
captionLayout,
|
|
6092
|
+
formatters: {
|
|
6093
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
6094
|
+
...formatters
|
|
6095
|
+
},
|
|
6096
|
+
classNames: {
|
|
6097
|
+
root: cn("lua:w-fit", defaultClassNames.root),
|
|
6098
|
+
months: cn(
|
|
6099
|
+
"lua:relative lua:flex lua:flex-col lua:gap-2 md:lua:flex-row",
|
|
6100
|
+
defaultClassNames.months
|
|
6101
|
+
),
|
|
6102
|
+
month: cn(
|
|
6103
|
+
"lua:flex lua:w-full lua:flex-col lua:gap-2",
|
|
6104
|
+
defaultClassNames.month
|
|
6105
|
+
),
|
|
6106
|
+
nav: cn(
|
|
6107
|
+
"lua:absolute lua:inset-x-0 lua:top-0 lua:flex lua:w-full lua:items-center lua:justify-between lua:gap-1",
|
|
6108
|
+
defaultClassNames.nav
|
|
6109
|
+
),
|
|
6110
|
+
button_previous: cn(defaultClassNames.button_previous),
|
|
6111
|
+
button_next: cn(
|
|
6112
|
+
// Luaniverse button style
|
|
6113
|
+
"lua:inline-flex lua:items-center lua:justify-center lua:rounded-full lua:transition-all lua:duration-200",
|
|
6114
|
+
"lua:text-gray-900 hover:lua:bg-gray-100",
|
|
6115
|
+
"focus-visible:lua:outline-hidden focus-visible:lua:ring-1 focus-visible:lua:ring-gray-900 focus-visible:lua:ring-offset-1 focus-visible:lua:ring-offset-white",
|
|
6116
|
+
"lua:h-[--cell-size] lua:w-[--cell-size] lua:select-none lua:p-0 aria-disabled:lua:opacity-50",
|
|
6117
|
+
defaultClassNames.button_next
|
|
6118
|
+
),
|
|
6119
|
+
month_caption: cn(
|
|
6120
|
+
"lua:flex lua:h-[--cell-size] lua:w-full lua:items-center lua:justify-center lua:px-[--cell-size]",
|
|
6121
|
+
defaultClassNames.month_caption
|
|
6122
|
+
),
|
|
6123
|
+
dropdowns: cn(
|
|
6124
|
+
"lua:flex lua:h-[--cell-size] lua:w-full lua:items-center lua:justify-center lua:gap-1 lua:text-sm lua:font-onest lua:font-semibold lua:text-gray-900",
|
|
6125
|
+
defaultClassNames.dropdowns
|
|
6126
|
+
),
|
|
6127
|
+
dropdown_root: cn(
|
|
6128
|
+
"has-focus:lua:border-gray-300 lua:border-gray-300 has-focus:lua:ring-gray-900/50 has-focus:lua:ring-2 lua:relative lua:rounded-md lua:border",
|
|
6129
|
+
defaultClassNames.dropdown_root
|
|
6130
|
+
),
|
|
6131
|
+
dropdown: cn(
|
|
6132
|
+
"lua:absolute lua:inset-0 lua:opacity-0",
|
|
6133
|
+
defaultClassNames.dropdown
|
|
6134
|
+
),
|
|
6135
|
+
caption_label: cn(
|
|
6136
|
+
"lua:select-none lua:font-onest lua:font-semibold lua:text-gray-900",
|
|
6137
|
+
captionLayout === "label" ? "lua:text-xs" : "[&>svg]:lua:text-gray-600 lua:flex lua:h-6 lua:items-center lua:gap-1 lua:rounded-md lua:pl-2 lua:pr-1 lua:text-xs [&>svg]:lua:size-3",
|
|
6138
|
+
defaultClassNames.caption_label
|
|
6139
|
+
),
|
|
6140
|
+
table: "lua:w-full lua:border-collapse",
|
|
6141
|
+
weekdays: cn("lua:flex", defaultClassNames.weekdays),
|
|
6142
|
+
weekday: cn(
|
|
6143
|
+
"lua:text-gray-600 lua:flex-1 lua:select-none lua:text-xs lua:font-onest lua:font-medium",
|
|
6144
|
+
defaultClassNames.weekday
|
|
6145
|
+
),
|
|
6146
|
+
week: cn("lua:mt-1 lua:flex lua:w-full", defaultClassNames.week),
|
|
6147
|
+
week_number_header: cn(
|
|
6148
|
+
"lua:w-[--cell-size] lua:select-none",
|
|
6149
|
+
defaultClassNames.week_number_header
|
|
6150
|
+
),
|
|
6151
|
+
week_number: cn(
|
|
6152
|
+
"lua:text-gray-600 lua:select-none lua:text-xs lua:font-onest",
|
|
6153
|
+
defaultClassNames.week_number
|
|
6154
|
+
),
|
|
6155
|
+
day: cn(
|
|
6156
|
+
"lua:relative lua:w-full lua:h-full lua:p-0 lua:text-center lua:group/day lua:aspect-square lua:select-none",
|
|
6157
|
+
defaultClassNames.day
|
|
6158
|
+
),
|
|
6159
|
+
range_start: cn("lua:bg-gray-100", defaultClassNames.range_start),
|
|
6160
|
+
range_middle: cn("lua:bg-gray-50", defaultClassNames.range_middle),
|
|
6161
|
+
range_end: cn("lua:bg-gray-100", defaultClassNames.range_end),
|
|
6162
|
+
today: cn(
|
|
6163
|
+
"lua:bg-gray-100 lua:text-gray-900 lua:font-bold",
|
|
6164
|
+
defaultClassNames.today
|
|
6165
|
+
),
|
|
6166
|
+
outside: cn(
|
|
6167
|
+
"lua:text-gray-400 aria-selected:lua:text-gray-400",
|
|
6168
|
+
defaultClassNames.outside
|
|
6169
|
+
),
|
|
6170
|
+
disabled: cn(
|
|
6171
|
+
"lua:text-gray-400 lua:opacity-50",
|
|
6172
|
+
defaultClassNames.disabled
|
|
6173
|
+
),
|
|
6174
|
+
hidden: cn("lua:invisible", defaultClassNames.hidden),
|
|
6175
|
+
...classNames
|
|
6176
|
+
},
|
|
6177
|
+
components: {
|
|
6178
|
+
Root: CalendarRoot,
|
|
6179
|
+
Chevron: CalendarChevron,
|
|
6180
|
+
DayButton: CalendarDayButton,
|
|
6181
|
+
WeekNumber: CalendarWeekNumber,
|
|
6182
|
+
...components
|
|
6183
|
+
},
|
|
6184
|
+
...props
|
|
6185
|
+
}
|
|
6186
|
+
);
|
|
6187
|
+
}
|
|
6188
|
+
Calendar.displayName = "Calendar";
|
|
6189
|
+
var Popover = PopoverPrimitive__namespace.Root;
|
|
6190
|
+
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
6191
|
+
var PopoverContent = React118__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6192
|
+
PopoverPrimitive__namespace.Content,
|
|
6193
|
+
{
|
|
6194
|
+
ref,
|
|
6195
|
+
align,
|
|
6196
|
+
sideOffset,
|
|
6197
|
+
className: cn(
|
|
6198
|
+
// Base styles - Luaniverse design
|
|
6199
|
+
"lua:z-50 lua:rounded-md lua:border lua:border-gray-200 lua:bg-white lua:shadow-lg lua:font-onest",
|
|
6200
|
+
// Animation
|
|
6201
|
+
"lua:transition-all lua:duration-200",
|
|
6202
|
+
"data-[state=open]:lua:animate-in data-[state=open]:lua:fade-in-0 data-[state=open]:lua:zoom-in-95",
|
|
6203
|
+
"data-[state=closed]:lua:animate-out data-[state=closed]:lua:fade-out-0 data-[state=closed]:lua:zoom-out-95",
|
|
6204
|
+
"data-[side=bottom]:lua:slide-in-from-top-2 data-[side=left]:lua:slide-in-from-right-2 data-[side=right]:lua:slide-in-from-left-2 data-[side=top]:lua:slide-in-from-bottom-2",
|
|
6205
|
+
// Focus
|
|
6206
|
+
"focus-visible:lua:outline-none focus-visible:lua:ring-2 focus-visible:lua:ring-gray-900 focus-visible:lua:ring-offset-2",
|
|
6207
|
+
className
|
|
6208
|
+
),
|
|
6209
|
+
...props
|
|
6210
|
+
}
|
|
6211
|
+
) }));
|
|
6212
|
+
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
6014
6213
|
|
|
6015
6214
|
// src/safelist.js
|
|
6016
6215
|
var luaniverseSafelist = [
|
|
@@ -6424,6 +6623,8 @@ exports.C4dIcon = c4d_exports;
|
|
|
6424
6623
|
exports.CDR = CDR;
|
|
6425
6624
|
exports.CSS = CSS;
|
|
6426
6625
|
exports.CSV = CSV;
|
|
6626
|
+
exports.Calendar = Calendar;
|
|
6627
|
+
exports.CalendarDayButton = CalendarDayButton;
|
|
6427
6628
|
exports.Camera = Camera;
|
|
6428
6629
|
exports.Caption = Caption;
|
|
6429
6630
|
exports.Card = Card;
|
|
@@ -6572,6 +6773,9 @@ exports.PencilSimple = PencilSimple;
|
|
|
6572
6773
|
exports.PlugsRegular = PlugsRegular;
|
|
6573
6774
|
exports.Plus = Plus;
|
|
6574
6775
|
exports.PngIcon = png_exports;
|
|
6776
|
+
exports.Popover = Popover;
|
|
6777
|
+
exports.PopoverContent = PopoverContent;
|
|
6778
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
6575
6779
|
exports.PptIcon = ppt_exports;
|
|
6576
6780
|
exports.PsdIcon = psd_exports;
|
|
6577
6781
|
exports.RadioGroup = RadioGroup2;
|