@rinzai/zen 0.6.0 → 0.7.0
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/LICENSE +27 -0
- package/README.md +12 -4
- package/dist/alert/index.d.ts +21 -0
- package/dist/alert/index.d.ts.map +1 -0
- package/dist/alert/index.js +49 -0
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.d.ts.map +1 -1
- package/dist/button/index.js +43 -12
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +86 -85
- package/dist/chart/donut.d.ts +4 -1
- package/dist/chart/donut.d.ts.map +1 -1
- package/dist/chart/donut.js +81 -60
- package/dist/chart/index.d.ts +8 -2
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart/index.js +151 -139
- package/dist/chart/palette.d.ts +11 -0
- package/dist/chart/palette.d.ts.map +1 -0
- package/dist/chart/palette.js +9 -0
- package/dist/chart/tooltip.d.ts +6 -2
- package/dist/chart/tooltip.d.ts.map +1 -1
- package/dist/chart/tooltip.js +6 -6
- package/dist/checkbox/index.d.ts.map +1 -1
- package/dist/checkbox/index.js +28 -44
- package/dist/chip/index.js +1 -1
- package/dist/code-block/index.js +1 -1
- package/dist/combobox/index.d.ts.map +1 -1
- package/dist/combobox/index.js +93 -91
- package/dist/date-picker/index.d.ts.map +1 -1
- package/dist/date-picker/index.js +24 -38
- package/dist/disclosure/index.js +1 -1
- package/dist/editable-cell/index.js +1 -1
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +33 -32
- package/dist/header/index.d.ts +9 -1
- package/dist/header/index.d.ts.map +1 -1
- package/dist/header/index.js +17 -9
- package/dist/icons/arrow-left.d.ts +3 -0
- package/dist/icons/arrow-left.d.ts.map +1 -0
- package/dist/icons/arrow-right.d.ts +3 -0
- package/dist/icons/arrow-right.d.ts.map +1 -0
- package/dist/icons/bars.d.ts +3 -0
- package/dist/icons/bars.d.ts.map +1 -0
- package/dist/icons/calendar.d.ts +3 -0
- package/dist/icons/calendar.d.ts.map +1 -0
- package/dist/icons/chart-bar.d.ts +3 -0
- package/dist/icons/chart-bar.d.ts.map +1 -0
- package/dist/icons/chevron-down.d.ts.map +1 -1
- package/dist/icons/chevron-down.js +4 -2
- package/dist/icons/chevron-left.d.ts.map +1 -1
- package/dist/icons/chevron-left.js +4 -2
- package/dist/icons/chevron-right.d.ts.map +1 -1
- package/dist/icons/chevron-right.js +4 -2
- package/dist/icons/chevron-up.d.ts.map +1 -1
- package/dist/icons/chevron-up.js +4 -2
- package/dist/icons/ellipsis.d.ts +0 -1
- package/dist/icons/ellipsis.d.ts.map +1 -1
- package/dist/icons/flag.d.ts +3 -0
- package/dist/icons/flag.d.ts.map +1 -0
- package/dist/icons/list-bullet.d.ts +3 -0
- package/dist/icons/list-bullet.d.ts.map +1 -0
- package/dist/icons/lock.d.ts +3 -0
- package/dist/icons/lock.d.ts.map +1 -0
- package/dist/icons/logout.d.ts +3 -0
- package/dist/icons/logout.d.ts.map +1 -0
- package/dist/icons/micro/calendar.d.ts +3 -0
- package/dist/icons/micro/calendar.d.ts.map +1 -0
- package/dist/icons/micro/calendar.js +21 -0
- package/dist/icons/micro/check.d.ts +3 -0
- package/dist/icons/micro/check.d.ts.map +1 -0
- package/dist/icons/micro/check.js +21 -0
- package/dist/icons/micro/chevron-down.d.ts +3 -0
- package/dist/icons/micro/chevron-down.d.ts.map +1 -0
- package/dist/icons/micro/chevron-down.js +21 -0
- package/dist/icons/micro/chevron-right.d.ts +3 -0
- package/dist/icons/micro/chevron-right.d.ts.map +1 -0
- package/dist/icons/micro/chevron-right.js +21 -0
- package/dist/icons/micro/exclamation-triangle.d.ts +3 -0
- package/dist/icons/micro/exclamation-triangle.d.ts.map +1 -0
- package/dist/icons/micro/exclamation-triangle.js +21 -0
- package/dist/icons/micro/information-circle.d.ts +3 -0
- package/dist/icons/micro/information-circle.d.ts.map +1 -0
- package/dist/icons/micro/information-circle.js +21 -0
- package/dist/icons/micro/minus.d.ts +3 -0
- package/dist/icons/micro/minus.d.ts.map +1 -0
- package/dist/icons/micro/minus.js +17 -0
- package/dist/icons/micro/moon.d.ts +3 -0
- package/dist/icons/micro/moon.d.ts.map +1 -0
- package/dist/icons/micro/moon.js +17 -0
- package/dist/icons/micro/sun.d.ts +3 -0
- package/dist/icons/micro/sun.d.ts.map +1 -0
- package/dist/icons/micro/sun.js +17 -0
- package/dist/icons/micro/x-mark.d.ts +3 -0
- package/dist/icons/micro/x-mark.d.ts.map +1 -0
- package/dist/icons/micro/x-mark.js +17 -0
- package/dist/icons/search.d.ts.map +1 -1
- package/dist/icons/search.js +4 -2
- package/dist/icons/settings.d.ts +3 -0
- package/dist/icons/settings.d.ts.map +1 -0
- package/dist/icons/squares.d.ts +3 -0
- package/dist/icons/squares.d.ts.map +1 -0
- package/dist/icons/table.d.ts +3 -0
- package/dist/icons/table.d.ts.map +1 -0
- package/dist/icons/x-mark.d.ts.map +1 -1
- package/dist/icons/x-mark.js +4 -2
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/lib.js +56 -61
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +67 -60
- package/dist/meter/index.d.ts +4 -3
- package/dist/meter/index.d.ts.map +1 -1
- package/dist/meter/index.js +9 -8
- package/dist/money-input/index.d.ts +7 -8
- package/dist/money-input/index.d.ts.map +1 -1
- package/dist/money-input/index.js +37 -19
- package/dist/month-picker/index.d.ts.map +1 -1
- package/dist/month-picker/index.js +55 -55
- package/dist/pills/index.d.ts +1 -1
- package/dist/pills/index.d.ts.map +1 -1
- package/dist/pills/index.js +6 -2
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +15 -13
- package/dist/select/index.d.ts.map +1 -1
- package/dist/select/index.js +96 -102
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/status-pill/index.d.ts +18 -0
- package/dist/status-pill/index.d.ts.map +1 -0
- package/dist/status-pill/index.js +25 -0
- package/dist/tab-bar/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/tabs/index.d.ts.map +1 -1
- package/dist/tabs/index.js +9 -5
- package/dist/theme-toggle/index.d.ts +2 -1
- package/dist/theme-toggle/index.d.ts.map +1 -1
- package/dist/theme-toggle/index.js +35 -32
- package/dist/theme.css +81 -19
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/index.js +119 -106
- package/dist/tooltip/index.d.ts.map +1 -1
- package/dist/tooltip/index.js +45 -43
- package/dist/tree/index.d.ts +22 -3
- package/dist/tree/index.d.ts.map +1 -1
- package/dist/tree/index.js +76 -56
- package/dist/utils/date.d.ts +6 -4
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +18 -16
- package/dist/utils/field-chevron.d.ts.map +1 -1
- package/dist/utils/field-chevron.js +5 -14
- package/dist/utils/status-icons.d.ts +1 -1
- package/dist/utils/status-icons.d.ts.map +1 -1
- package/dist/utils/status-icons.js +11 -41
- package/dist/utils/styles.d.ts +9 -3
- package/dist/utils/styles.d.ts.map +1 -1
- package/dist/utils/styles.js +2 -2
- package/dist/utils/theme-wave.d.ts +24 -0
- package/dist/utils/theme-wave.d.ts.map +1 -0
- package/dist/utils/theme-wave.js +219 -0
- package/dist/utils/typeahead.d.ts +12 -0
- package/dist/utils/typeahead.d.ts.map +1 -0
- package/dist/utils/typeahead.js +19 -0
- package/dist/utils/useAnchoredPopup.d.ts +23 -7
- package/dist/utils/useAnchoredPopup.d.ts.map +1 -1
- package/dist/utils/useAnchoredPopup.js +86 -30
- package/dist/zen.css +1 -1
- package/package.json +2 -1
- package/dist/icons/ellipsis.js +0 -31
- package/dist/icons/index.d.ts +0 -9
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/status.d.ts +0 -2
- package/dist/icons/status.d.ts.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region packages/icons/micro/sun.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
return /* @__PURE__ */ e("svg", {
|
|
6
|
+
className: "size-4",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
"data-slot": "icon",
|
|
12
|
+
...t,
|
|
13
|
+
children: /* @__PURE__ */ e("path", { d: "M8 1a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 8 1ZM10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM12.95 4.11a.75.75 0 1 0-1.06-1.06l-1.062 1.06a.75.75 0 0 0 1.061 1.062l1.06-1.061ZM15 8a.75.75 0 0 1-.75.75h-1.5a.75.75 0 0 1 0-1.5h1.5A.75.75 0 0 1 15 8ZM11.89 12.95a.75.75 0 0 0 1.06-1.06l-1.06-1.062a.75.75 0 0 0-1.062 1.061l1.061 1.06ZM8 12a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 8 12ZM5.172 11.89a.75.75 0 0 0-1.061-1.062L3.05 11.89a.75.75 0 1 0 1.06 1.06l1.06-1.06ZM4 8a.75.75 0 0 1-.75.75h-1.5a.75.75 0 0 1 0-1.5h1.5A.75.75 0 0 1 4 8ZM4.11 5.172A.75.75 0 0 0 5.173 4.11L4.11 3.05a.75.75 0 1 0-1.06 1.06l1.06 1.06Z" })
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-mark.d.ts","sourceRoot":"","sources":["../../../packages/icons/micro/x-mark.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,SAAS,+BAclD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region packages/icons/micro/x-mark.tsx
|
|
4
|
+
function t(t) {
|
|
5
|
+
return /* @__PURE__ */ e("svg", {
|
|
6
|
+
className: "size-4",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
"data-slot": "icon",
|
|
12
|
+
...t,
|
|
13
|
+
children: /* @__PURE__ */ e("path", { d: "M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z" })
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../packages/icons/search.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../packages/icons/search.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,SAAS,+BAoB9C"}
|
package/dist/icons/search.js
CHANGED
|
@@ -3,12 +3,14 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
3
3
|
//#region packages/icons/search.tsx
|
|
4
4
|
function t(t) {
|
|
5
5
|
return /* @__PURE__ */ e("svg", {
|
|
6
|
+
className: "size-6",
|
|
6
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
8
|
fill: "none",
|
|
8
9
|
viewBox: "0 0 24 24",
|
|
9
|
-
strokeWidth: 1.5,
|
|
10
|
+
strokeWidth: "1.5",
|
|
10
11
|
stroke: "currentColor",
|
|
11
|
-
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
"data-slot": "icon",
|
|
12
14
|
...t,
|
|
13
15
|
children: /* @__PURE__ */ e("path", {
|
|
14
16
|
strokeLinecap: "round",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../packages/icons/settings.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,SAAS,+BAqBhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"squares.d.ts","sourceRoot":"","sources":["../../packages/icons/squares.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,SAAS,+BAoB/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../packages/icons/table.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,SAAS,+BAoBjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-mark.d.ts","sourceRoot":"","sources":["../../packages/icons/x-mark.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"x-mark.d.ts","sourceRoot":"","sources":["../../packages/icons/x-mark.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,SAAS,+BAgB7C"}
|
package/dist/icons/x-mark.js
CHANGED
|
@@ -3,12 +3,14 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
3
3
|
//#region packages/icons/x-mark.tsx
|
|
4
4
|
function t(t) {
|
|
5
5
|
return /* @__PURE__ */ e("svg", {
|
|
6
|
+
className: "size-6",
|
|
6
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
8
|
fill: "none",
|
|
8
9
|
viewBox: "0 0 24 24",
|
|
9
|
-
strokeWidth: 1.5,
|
|
10
|
+
strokeWidth: "1.5",
|
|
10
11
|
stroke: "currentColor",
|
|
11
|
-
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
"data-slot": "icon",
|
|
12
14
|
...t,
|
|
13
15
|
children: /* @__PURE__ */ e("path", {
|
|
14
16
|
strokeLinecap: "round",
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as AnimatedNumber, AnimatedMoney, type AnimatedNumberProps } fr
|
|
|
3
3
|
export { default as Avatar, type AvatarProps, cropImageToSquare, ImageCropError } from './avatar';
|
|
4
4
|
export { default as Backdrop } from './backdrop';
|
|
5
5
|
export { default as Badge } from './badge';
|
|
6
|
+
export { default as StatusPill, StatusPillAction, type StatusPillProps } from './status-pill';
|
|
6
7
|
export { default as Button, buttonVariants } from './button';
|
|
7
8
|
export { default as Card, CardDescription, CardHeader, type CardProps, CardTitle, type CardTitleProps, Stat, StatRow, } from './card';
|
|
8
9
|
export { default as CodeBlock } from './code-block';
|
|
@@ -14,15 +15,15 @@ export { default as Dialog, DialogClose, DialogFooter, type DialogProps } from '
|
|
|
14
15
|
export { default as EditableCell, type EditableCellProps } from './editable-cell';
|
|
15
16
|
export { default as Disclosure, DisclosureContent, type DisclosureProps, DisclosureTrigger } from './disclosure';
|
|
16
17
|
export { default as Field, type FieldControl, type FieldProps, FormMessage, type FormMessageProps, useField, useFieldProps, } from './field';
|
|
17
|
-
export { default as Header } from './header';
|
|
18
|
+
export { default as Header, type HeaderProps } from './header';
|
|
19
|
+
export { default as Alert, type AlertProps } from './alert';
|
|
18
20
|
export { default as Inset, type InsetProps } from './inset';
|
|
19
|
-
export * from './icons';
|
|
20
21
|
export { default as Input } from './input';
|
|
21
22
|
export { default as InputGroup, InputGroupAddon, InputGroupInput } from './input-group';
|
|
22
23
|
export { default as Meter, type MeterProps } from './meter';
|
|
23
24
|
export { default as MonthPicker, type MonthPickerProps } from './month-picker';
|
|
24
25
|
export { default as Checkbox, type CheckboxProps } from './checkbox';
|
|
25
|
-
export { default as Chart, ChartArea, type ChartAreaProps, ChartBar, type ChartBarProps, ChartLine, type ChartLineProps, type ChartProps, ChartReference, type ChartReferenceProps, type ChartSeriesProps, ChartTooltipCard, type ChartTooltipCardProps, DonutChart, type DonutChartProps, niceTicks, } from './chart';
|
|
26
|
+
export { default as Chart, ChartArea, type ChartAreaProps, ChartBar, type ChartBarProps, ChartLine, type ChartLineProps, type ChartProps, ChartReference, type ChartPalette, type ChartReferenceProps, type ChartSeriesProps, ChartTooltipCard, type ChartTooltipCardProps, DonutChart, type DonutChartProps, niceTicks, } from './chart';
|
|
26
27
|
export { Radio, default as RadioGroup, type RadioGroupProps, type RadioProps } from './radio-group';
|
|
27
28
|
export { default as Calendar, type CalendarProps, type CalendarRangeProps, type CalendarSingleProps } from './calendar';
|
|
28
29
|
export { default as DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps } from './date-picker';
|
|
@@ -52,9 +53,10 @@ export { default as ThemeToggle, ThemeScript, themeScript } from './theme-toggle
|
|
|
52
53
|
export { cva, type VariantProps } from './utils/cva';
|
|
53
54
|
export { cx } from './utils/cx';
|
|
54
55
|
export { type Appearance, applyPreset, applyTheme, contrastRatio, customize, DEFAULT_THEME, type Intensity, INTENSITIES, normalizeTheme, oklchToLinearRgb, type PresetId, PRESETS, resetTheme, type ThemeSettings, themeVars, } from './utils/theme';
|
|
56
|
+
export { prepareThemeWave, themeWave } from './utils/theme-wave';
|
|
55
57
|
export { useHydrated } from './utils/useHydrated';
|
|
56
58
|
export { addMonths, currentMonth, formatMonth, fromMonthIndex, isMonth, type Month, monthIndex, monthNames, monthRange, monthsBetween, } from './utils/month';
|
|
57
|
-
export { addDays, addMonthsToDate, type DateRange, type DateString, dayIndex, dayOfWeek, daysBetween, daysInMonth, formatDate, formatDateRange, fromDayIndex, isDate, today, weekdayNames, weekStart, } from './utils/date';
|
|
59
|
+
export { addDays, addMonthsToDate, type DateRange, type DateString, type DateStyle, dayIndex, dayOfWeek, daysBetween, daysInMonth, formatDate, formatDateRange, fromDayIndex, isDate, today, weekdayNames, weekStart, } from './utils/date';
|
|
58
60
|
export { type AnchoredPopupOptions, useAnchoredPopup } from './utils/useAnchoredPopup';
|
|
59
61
|
export { useVirtualList, type VirtualItem, type VirtualListOptions } from './utils/useVirtualList';
|
|
60
62
|
export { applyGraphicsMode, detectGraphicsMode, type GraphicsMode } from './utils/graphics';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,CAAC;AACf,OAAO,EACH,OAAO,IAAI,IAAI,EACf,WAAW,EACX,KAAK,gBAAgB,EACrB,UAAU,EACV,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,aAAa,EACb,WAAW,EACX,KAAK,gBAAgB,GACxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,WAAW,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,E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AAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EACH,cAAc,EACd,YAAY,EACZ,WAAW,EACX,KAAK,KAAK,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,YAAY,EACZ,KAAK,aAAa,EAClB,WAAW,EACX,WAAW,EACX,KAAK,SAAS,EACd,oBAAoB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,QAAQ,OAAO,CAAC;IACnB,UAAU,aAAa;QACnB,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;KACzC;CACJ"}
|
package/dist/lib.js
CHANGED
|
@@ -10,65 +10,60 @@ import y, { ImageCropError as b, cropImageToSquare as x } from "./avatar/index.j
|
|
|
10
10
|
import S from "./backdrop/index.js";
|
|
11
11
|
import { cva as C } from "./utils/cva.js";
|
|
12
12
|
import w from "./badge/index.js";
|
|
13
|
-
import T from "./
|
|
14
|
-
import
|
|
15
|
-
import O, {
|
|
16
|
-
import P from "./
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import B from "./
|
|
20
|
-
import
|
|
13
|
+
import T, { StatusPillAction as E } from "./status-pill/index.js";
|
|
14
|
+
import D from "./spinner/index.js";
|
|
15
|
+
import O, { buttonVariants as k } from "./button/index.js";
|
|
16
|
+
import A, { CardDescription as j, CardHeader as M, CardTitle as N, Stat as P, StatRow as F } from "./card/index.js";
|
|
17
|
+
import I from "./code-block/index.js";
|
|
18
|
+
import L from "./chip/index.js";
|
|
19
|
+
import R, { PopoverClose as z, PopoverContent as B, PopoverTrigger as V } from "./popover/index.js";
|
|
20
|
+
import H from "./collapse/index.js";
|
|
21
|
+
import U from "./alert/index.js";
|
|
21
22
|
import W, { FormMessage as G, useField as K, useFieldProps as q } from "./field/index.js";
|
|
22
|
-
import J from "./
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import he from "./
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import be from "./
|
|
34
|
-
import xe from "./
|
|
35
|
-
import Se from "./
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import {
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import {
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import {
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import {
|
|
68
|
-
|
|
69
|
-
import un from "./toggle/index.js";
|
|
70
|
-
import dn, { TooltipContent as fn, TooltipTrigger as pn } from "./tooltip/index.js";
|
|
71
|
-
import mn, { ThemeScript as hn, themeScript as gn } from "./theme-toggle/index.js";
|
|
72
|
-
import { DEFAULT_THEME as _n, INTENSITIES as vn, PRESETS as yn, applyPreset as bn, applyTheme as xn, contrastRatio as Sn, customize as Cn, normalizeTheme as wn, oklchToLinearRgb as Tn, resetTheme as En, themeVars as Dn } from "./utils/theme.js";
|
|
73
|
-
import { useHydrated as On } from "./utils/useHydrated.js";
|
|
74
|
-
export { V as AlertTriangle, v as AnimatedMoney, _ as AnimatedNumber, y as Avatar, S as Backdrop, w as Badge, E as Button, lt as Calendar, O as Card, k as CardDescription, A as CardHeader, j as CardTitle, He as Chart, Ue as ChartArea, We as ChartBar, Ge as ChartLine, Ke as ChartReference, Be as ChartTooltipCard, H as Check, ze as Checkbox, Se as ChevronDown, Ce as ChevronLeft, we as ChevronRight, Te as ChevronUp, F as Chip, P as CodeBlock, B as Collapse, te as Combobox, ne as ComboboxCreate, re as ComboboxEmpty, ie as ComboboxItem, ae as ComboboxList, oe as ComboboxPopup, se as ComboboxSearch, ce as ComboboxTrigger, he as ConfirmDialog, _n as DEFAULT_THEME, ut as DatePicker, dt as DateRangePicker, fe as Dialog, pe as DialogClose, me as DialogFooter, _e as Disclosure, ve as DisclosureContent, ye as DisclosureTrigger, Ve as DonutChart, ge as EditableCell, Ee as Ellipsis, W as Field, $ as FieldChevron, G as FormMessage, be as Header, vn as INTENSITIES, b as ImageCropError, U as InfoCircle, De as Input, X as InputGroup, Z as InputGroupAddon, Q as InputGroupInput, xe as Inset, i as Menu, a as MenuContent, o as MenuHeader, s as MenuItem, c as MenuSeparator, l as MenuTrigger, Oe as Meter, _t as MoneyConversionHint, vt as MoneyCurrencyMenu, gt as MoneyInput, u as MoneyParseError, Re as MonthPicker, yn as PRESETS, Tt as PageHeader, Ct as Pill, wt as PillIndicator, St as Pills, I as Popover, L as PopoverClose, R as PopoverContent, z as PopoverTrigger, Et as ProgressRing, Ye as Radio, xt as RadioCard, bt as RadioCards, Je as RadioGroup, ft as RateUnavailableError, J as Search, Dt as Segmented, Ot as SegmentedItem, kt as Select, At as SelectGroup, jt as SelectItem, Mt as SelectSeparator, Nt as SideNav, Pt as SideNavGroup, Ft as SideNavLink, It as Skeleton, Lt as Slider, T as Spinner, M as Stat, N as StatRow, en as Tab, Rt as TabBar, zt as TabBarItem, tn as TabList, nn as TabPanel, Bt as Table, Vt as TableBody, Ht as TableCell, Ut as TableContainer, Wt as TableEmpty, Gt as TableFooter, Kt as TableFooterCell, qt as TableHead, Jt as TableHeader, Qt as TableOfContents, Yt as TableRow, Xt as TableSpacerRow, $t as Tabs, ln as TextArea, hn as ThemeScript, mn as ThemeToggle, le as ToastProvider, un as Toggle, dn as Tooltip, fn as TooltipContent, pn as TooltipTrigger, rn as TreeCell, an as TreeLabel, on as TreeRow, sn as TreeToggle, Y as XMark, Xe as addDays, ke as addMonths, Ze as addMonthsToDate, t as applyGraphicsMode, bn as applyPreset, xn as applyTheme, D as buttonVariants, Sn as contrastRatio, pt as convertMinor, x as cropImageToSquare, d as currencySymbol, Ae as currentMonth, Cn as customize, C as cva, e as cx, Qe as dayIndex, $e as dayOfWeek, et as daysBetween, tt as daysInMonth, n as detectGraphicsMode, f as formatAmount, nt as formatDate, rt as formatDateRange, p as formatMoney, je as formatMonth, it as fromDayIndex, Me as fromMonthIndex, at as isDate, Ne as isMonth, mt as isRateTable, m as minorDigits, Pe as monthIndex, Fe as monthNames, Ie as monthRange, Le as monthsBetween, qe as niceTicks, wn as normalizeTheme, Tn as oklchToLinearRgb, h as parseMoney, g as parseMoneyInput, ht as rateBetween, En as resetTheme, gn as themeScript, Dn as themeVars, ot as today, r as useAnchoredPopup, K as useField, q as useFieldProps, On as useHydrated, yt as useMoneyInput, Zt as useSort, ue as useToast, de as useToastHost, cn as useTree, ee as useVirtualList, st as weekStart, ct as weekdayNames };
|
|
23
|
+
import J, { InputGroupAddon as Y, InputGroupInput as X } from "./input-group/index.js";
|
|
24
|
+
import { FieldChevron as Z } from "./utils/field-chevron.js";
|
|
25
|
+
import { useVirtualList as Q } from "./utils/useVirtualList.js";
|
|
26
|
+
import $, { ComboboxCreate as ee, ComboboxEmpty as te, ComboboxItem as ne, ComboboxList as re, ComboboxPopup as ie, ComboboxSearch as ae, ComboboxTrigger as oe } from "./combobox/index.js";
|
|
27
|
+
import se, { useToast as ce, useToastHost as le } from "./toast/index.js";
|
|
28
|
+
import ue, { DialogClose as de, DialogFooter as fe } from "./dialog/index.js";
|
|
29
|
+
import pe from "./confirm-dialog/index.js";
|
|
30
|
+
import me from "./editable-cell/index.js";
|
|
31
|
+
import he, { DisclosureContent as ge, DisclosureTrigger as _e } from "./disclosure/index.js";
|
|
32
|
+
import ve from "./header/index.js";
|
|
33
|
+
import ye from "./inset/index.js";
|
|
34
|
+
import be from "./input/index.js";
|
|
35
|
+
import xe from "./meter/index.js";
|
|
36
|
+
import { addMonths as Se, currentMonth as Ce, formatMonth as we, fromMonthIndex as Te, isMonth as Ee, monthIndex as De, monthNames as Oe, monthRange as ke, monthsBetween as Ae } from "./utils/month.js";
|
|
37
|
+
import je from "./month-picker/index.js";
|
|
38
|
+
import Me from "./checkbox/index.js";
|
|
39
|
+
import { ChartTooltipCard as Ne } from "./chart/tooltip.js";
|
|
40
|
+
import Pe from "./chart/donut.js";
|
|
41
|
+
import Fe, { ChartArea as Ie, ChartBar as Le, ChartLine as Re, ChartReference as ze, niceTicks as Be } from "./chart/index.js";
|
|
42
|
+
import Ve, { Radio as He } from "./radio-group/index.js";
|
|
43
|
+
import { addDays as Ue, addMonthsToDate as We, dayIndex as Ge, dayOfWeek as Ke, daysBetween as qe, daysInMonth as Je, formatDate as Ye, formatDateRange as Xe, fromDayIndex as Ze, isDate as Qe, today as $e, weekStart as et, weekdayNames as tt } from "./utils/date.js";
|
|
44
|
+
import nt from "./calendar/index.js";
|
|
45
|
+
import rt, { DateRangePicker as it } from "./date-picker/index.js";
|
|
46
|
+
import { RateUnavailableError as at, convertMinor as ot, isRateTable as st, rateBetween as ct } from "./utils/fx.js";
|
|
47
|
+
import lt, { MoneyConversionHint as ut, MoneyCurrencyMenu as dt, useMoneyInput as ft } from "./money-input/index.js";
|
|
48
|
+
import pt, { RadioCard as mt } from "./radio-cards/index.js";
|
|
49
|
+
import ht, { Pill as gt, PillIndicator as _t } from "./pills/index.js";
|
|
50
|
+
import vt from "./page-header/index.js";
|
|
51
|
+
import yt from "./progress-ring/index.js";
|
|
52
|
+
import bt, { SegmentedItem as xt } from "./segmented/index.js";
|
|
53
|
+
import St, { SelectGroup as Ct, SelectItem as wt, SelectSeparator as Tt } from "./select/index.js";
|
|
54
|
+
import Et, { SideNavGroup as Dt, SideNavLink as Ot } from "./side-nav/index.js";
|
|
55
|
+
import kt from "./skeleton/index.js";
|
|
56
|
+
import At from "./slider/index.js";
|
|
57
|
+
import jt, { TabBarItem as Mt } from "./tab-bar/index.js";
|
|
58
|
+
import Nt, { TableBody as Pt, TableCell as Ft, TableContainer as It, TableEmpty as Lt, TableFooter as Rt, TableFooterCell as zt, TableHead as Bt, TableHeader as Vt, TableRow as Ht, TableSpacerRow as Ut, useSort as Wt } from "./table/index.js";
|
|
59
|
+
import Gt from "./table-of-contents/index.js";
|
|
60
|
+
import Kt, { Tab as qt, TabList as Jt, TabPanel as Yt } from "./tabs/index.js";
|
|
61
|
+
import { TreeCell as Xt, TreeLabel as Zt, TreeRow as Qt, TreeToggle as $t, useTree as en } from "./tree/index.js";
|
|
62
|
+
import tn from "./textarea/index.js";
|
|
63
|
+
import nn from "./toggle/index.js";
|
|
64
|
+
import rn, { TooltipContent as an, TooltipTrigger as on } from "./tooltip/index.js";
|
|
65
|
+
import { DEFAULT_THEME as sn, INTENSITIES as cn, PRESETS as ln, applyPreset as un, applyTheme as dn, contrastRatio as fn, customize as pn, normalizeTheme as mn, oklchToLinearRgb as hn, resetTheme as gn, themeVars as _n } from "./utils/theme.js";
|
|
66
|
+
import { prepareThemeWave as vn, themeWave as yn } from "./utils/theme-wave.js";
|
|
67
|
+
import bn, { ThemeScript as xn, themeScript as Sn } from "./theme-toggle/index.js";
|
|
68
|
+
import { useHydrated as Cn } from "./utils/useHydrated.js";
|
|
69
|
+
export { U as Alert, v as AnimatedMoney, _ as AnimatedNumber, y as Avatar, S as Backdrop, w as Badge, O as Button, nt as Calendar, A as Card, j as CardDescription, M as CardHeader, N as CardTitle, Fe as Chart, Ie as ChartArea, Le as ChartBar, Re as ChartLine, ze as ChartReference, Ne as ChartTooltipCard, Me as Checkbox, L as Chip, I as CodeBlock, H as Collapse, $ as Combobox, ee as ComboboxCreate, te as ComboboxEmpty, ne as ComboboxItem, re as ComboboxList, ie as ComboboxPopup, ae as ComboboxSearch, oe as ComboboxTrigger, pe as ConfirmDialog, sn as DEFAULT_THEME, rt as DatePicker, it as DateRangePicker, ue as Dialog, de as DialogClose, fe as DialogFooter, he as Disclosure, ge as DisclosureContent, _e as DisclosureTrigger, Pe as DonutChart, me as EditableCell, W as Field, Z as FieldChevron, G as FormMessage, ve as Header, cn as INTENSITIES, b as ImageCropError, be as Input, J as InputGroup, Y as InputGroupAddon, X as InputGroupInput, ye as Inset, i as Menu, a as MenuContent, o as MenuHeader, s as MenuItem, c as MenuSeparator, l as MenuTrigger, xe as Meter, ut as MoneyConversionHint, dt as MoneyCurrencyMenu, lt as MoneyInput, u as MoneyParseError, je as MonthPicker, ln as PRESETS, vt as PageHeader, gt as Pill, _t as PillIndicator, ht as Pills, R as Popover, z as PopoverClose, B as PopoverContent, V as PopoverTrigger, yt as ProgressRing, He as Radio, mt as RadioCard, pt as RadioCards, Ve as RadioGroup, at as RateUnavailableError, bt as Segmented, xt as SegmentedItem, St as Select, Ct as SelectGroup, wt as SelectItem, Tt as SelectSeparator, Et as SideNav, Dt as SideNavGroup, Ot as SideNavLink, kt as Skeleton, At as Slider, D as Spinner, P as Stat, F as StatRow, T as StatusPill, E as StatusPillAction, qt as Tab, jt as TabBar, Mt as TabBarItem, Jt as TabList, Yt as TabPanel, Nt as Table, Pt as TableBody, Ft as TableCell, It as TableContainer, Lt as TableEmpty, Rt as TableFooter, zt as TableFooterCell, Bt as TableHead, Vt as TableHeader, Gt as TableOfContents, Ht as TableRow, Ut as TableSpacerRow, Kt as Tabs, tn as TextArea, xn as ThemeScript, bn as ThemeToggle, se as ToastProvider, nn as Toggle, rn as Tooltip, an as TooltipContent, on as TooltipTrigger, Xt as TreeCell, Zt as TreeLabel, Qt as TreeRow, $t as TreeToggle, Ue as addDays, Se as addMonths, We as addMonthsToDate, t as applyGraphicsMode, un as applyPreset, dn as applyTheme, k as buttonVariants, fn as contrastRatio, ot as convertMinor, x as cropImageToSquare, d as currencySymbol, Ce as currentMonth, pn as customize, C as cva, e as cx, Ge as dayIndex, Ke as dayOfWeek, qe as daysBetween, Je as daysInMonth, n as detectGraphicsMode, f as formatAmount, Ye as formatDate, Xe as formatDateRange, p as formatMoney, we as formatMonth, Ze as fromDayIndex, Te as fromMonthIndex, Qe as isDate, Ee as isMonth, st as isRateTable, m as minorDigits, De as monthIndex, Oe as monthNames, ke as monthRange, Ae as monthsBetween, Be as niceTicks, mn as normalizeTheme, hn as oklchToLinearRgb, h as parseMoney, g as parseMoneyInput, vn as prepareThemeWave, ct as rateBetween, gn as resetTheme, Sn as themeScript, _n as themeVars, yn as themeWave, $e as today, r as useAnchoredPopup, K as useField, q as useFieldProps, Cn as useHydrated, ft as useMoneyInput, Wt as useSort, ce as useToast, le as useToastHost, en as useTree, Q as useVirtualList, et as weekStart, tt as weekdayNames };
|
package/dist/menu/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/menu/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/menu/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAA4C,SAAS,EAAqB,MAAM,OAAO,CAAC;AAkB/G;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,SAAS,+BAejE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BAelF;AAED,oHAAoH;AACpH,wBAAgB,WAAW,CAAC,EAAE,KAAa,EAAE,MAAU,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BA2C/G;AAKD;;;;;GAK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ils/cx.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useTypeahead as t } from "../utils/typeahead.js";
|
|
4
|
+
import { useGraphicsMode as n } from "../utils/graphics.js";
|
|
5
|
+
import { Slot as r } from "../utils/slot.js";
|
|
6
|
+
import { anchoredStyle as i, useAnchoredPopup as a } from "../utils/useAnchoredPopup.js";
|
|
7
|
+
import { createContext as o, useContext as s, useId as c } from "react";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
9
|
//#region packages/menu/index.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let t =
|
|
10
|
+
var d = o(() => {}), f = o(null);
|
|
11
|
+
function p(e) {
|
|
12
|
+
let t = s(f);
|
|
12
13
|
if (!t) throw Error(`<${e}> must be inside <Menu>`);
|
|
13
14
|
return t;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
let r =
|
|
18
|
-
t &&
|
|
16
|
+
function m({ onOpenChange: e, children: t }) {
|
|
17
|
+
n();
|
|
18
|
+
let r = c(), i = a({ onOpenChange: (t) => {
|
|
19
|
+
t && i.popupRef.current?.focus(), e?.(t);
|
|
19
20
|
} });
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ l(f.Provider, {
|
|
21
22
|
value: {
|
|
22
|
-
popup:
|
|
23
|
+
popup: i,
|
|
23
24
|
triggerId: r
|
|
24
25
|
},
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
-
value: () =>
|
|
27
|
-
children:
|
|
26
|
+
children: /* @__PURE__ */ l(d.Provider, {
|
|
27
|
+
value: () => i.setOpen(!1),
|
|
28
|
+
children: t
|
|
28
29
|
})
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let { popup:
|
|
33
|
-
id:
|
|
32
|
+
function h({ asChild: t, style: n, children: i, ...a }) {
|
|
33
|
+
let { popup: o, triggerId: s } = p("MenuTrigger"), c = {
|
|
34
|
+
id: s,
|
|
34
35
|
"aria-haspopup": "menu",
|
|
35
|
-
...
|
|
36
|
-
...
|
|
36
|
+
...o.triggerProps,
|
|
37
|
+
...a,
|
|
37
38
|
style: {
|
|
38
|
-
...
|
|
39
|
-
...
|
|
39
|
+
...o.triggerProps.style,
|
|
40
|
+
...n
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
|
-
return
|
|
43
|
-
...
|
|
44
|
-
children:
|
|
45
|
-
}) : /* @__PURE__ */
|
|
43
|
+
return t ? /* @__PURE__ */ l(r, {
|
|
44
|
+
...c,
|
|
45
|
+
children: i
|
|
46
|
+
}) : /* @__PURE__ */ l("button", {
|
|
46
47
|
type: "button",
|
|
47
|
-
...
|
|
48
|
-
|
|
48
|
+
...c,
|
|
49
|
+
className: e("cursor-pointer", c.className),
|
|
50
|
+
children: i
|
|
49
51
|
});
|
|
50
52
|
}
|
|
51
|
-
function
|
|
52
|
-
let { popup:
|
|
53
|
-
let t = Array.from(
|
|
53
|
+
function g({ align: n = "end", offset: r = 6, className: a, style: o, children: s, ...c }) {
|
|
54
|
+
let { popup: u, triggerId: d } = p("MenuContent"), f = t(), m = (e) => {
|
|
55
|
+
let t = Array.from(u.popupRef.current?.querySelectorAll("[role=\"menuitem\"]:not(:disabled)") ?? []), n = t.indexOf(document.activeElement), r = t.length - 1, i = f(e);
|
|
56
|
+
if (i) {
|
|
57
|
+
t.find((e) => e.textContent?.trim().toLowerCase().startsWith(i))?.focus();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
let a = {
|
|
54
61
|
ArrowDown: n + 1,
|
|
55
62
|
ArrowUp: n === -1 ? r : n - 1,
|
|
56
63
|
Home: 0,
|
|
57
64
|
End: r
|
|
58
65
|
}[e.key];
|
|
59
|
-
|
|
66
|
+
a !== void 0 && (e.preventDefault(), t[(a + t.length) % t.length]?.focus());
|
|
60
67
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
"aria-labelledby":
|
|
63
|
-
...
|
|
64
|
-
...
|
|
68
|
+
return /* @__PURE__ */ l("div", {
|
|
69
|
+
"aria-labelledby": d,
|
|
70
|
+
...c,
|
|
71
|
+
...u.popupProps,
|
|
65
72
|
role: "menu",
|
|
66
73
|
tabIndex: -1,
|
|
67
74
|
onKeyDown: (e) => {
|
|
68
|
-
|
|
75
|
+
c.onKeyDown?.(e), m(e);
|
|
69
76
|
},
|
|
70
77
|
style: {
|
|
71
|
-
...
|
|
72
|
-
align:
|
|
73
|
-
offset:
|
|
78
|
+
...i(u.id, {
|
|
79
|
+
align: n,
|
|
80
|
+
offset: r
|
|
74
81
|
}),
|
|
75
|
-
...
|
|
82
|
+
...o
|
|
76
83
|
},
|
|
77
|
-
className: e("zen__popover glass glass-blur text-foreground min-w-44 rounded-xl p-1.5 outline-hidden",
|
|
78
|
-
children:
|
|
84
|
+
className: e("zen__popover glass glass-blur text-foreground min-w-44 rounded-xl p-1.5 outline-hidden", a),
|
|
85
|
+
children: s
|
|
79
86
|
});
|
|
80
87
|
}
|
|
81
|
-
var
|
|
82
|
-
function
|
|
83
|
-
let m =
|
|
88
|
+
var _ = "flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left text-sm outline-hidden select-none hover:bg-tint/[0.07] focus:bg-tint/[0.07] disabled:cursor-not-allowed disabled:opacity-50";
|
|
89
|
+
function v({ icon: t, destructive: n, onSelect: i, asChild: a, className: o, children: c, onClick: f, ...p }) {
|
|
90
|
+
let m = s(d), h = {
|
|
84
91
|
...p,
|
|
85
92
|
role: "menuitem",
|
|
86
93
|
tabIndex: -1,
|
|
87
|
-
className: e(
|
|
94
|
+
className: e(_, n && "text-destructive", o),
|
|
88
95
|
onClick: (e) => {
|
|
89
96
|
f?.(e), m(), i?.();
|
|
90
97
|
}
|
|
91
98
|
};
|
|
92
|
-
return a ? /* @__PURE__ */
|
|
99
|
+
return a ? /* @__PURE__ */ l(r, {
|
|
93
100
|
...h,
|
|
94
|
-
children:
|
|
95
|
-
}) : /* @__PURE__ */
|
|
101
|
+
children: c
|
|
102
|
+
}) : /* @__PURE__ */ u("button", {
|
|
96
103
|
type: "button",
|
|
97
104
|
...h,
|
|
98
|
-
children: [t && /* @__PURE__ */
|
|
105
|
+
children: [t && /* @__PURE__ */ l("span", {
|
|
99
106
|
"aria-hidden": !0,
|
|
100
|
-
className: e("flex shrink-0", !
|
|
107
|
+
className: e("flex shrink-0", !n && "text-muted-foreground"),
|
|
101
108
|
children: t
|
|
102
|
-
}),
|
|
109
|
+
}), c]
|
|
103
110
|
});
|
|
104
111
|
}
|
|
105
|
-
function
|
|
106
|
-
return /* @__PURE__ */
|
|
112
|
+
function y({ className: t }) {
|
|
113
|
+
return /* @__PURE__ */ l("div", {
|
|
107
114
|
role: "separator",
|
|
108
115
|
className: e("bg-tint/[0.07] mx-2 my-1 h-px", t)
|
|
109
116
|
});
|
|
110
117
|
}
|
|
111
|
-
function
|
|
112
|
-
return /* @__PURE__ */
|
|
118
|
+
function b({ className: t, ...n }) {
|
|
119
|
+
return /* @__PURE__ */ l("div", {
|
|
113
120
|
className: e("flex items-center gap-3 px-3 py-2.5", t),
|
|
114
121
|
...n
|
|
115
122
|
});
|
|
116
123
|
}
|
|
117
124
|
//#endregion
|
|
118
|
-
export {
|
|
125
|
+
export { g as MenuContent, b as MenuHeader, v as MenuItem, y as MenuSeparator, h as MenuTrigger, m as default };
|
package/dist/meter/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* A measure against a limit, e.g. spend against a budget: a bar with a label,
|
|
4
4
|
* a figure and a note. Over the limit it turns red; near it, warm. Announced
|
|
5
5
|
* as a meter, with `valueText` read out instead of the bare number.
|
|
6
6
|
*/
|
|
7
|
-
export default function Meter({ value, max, label, detail, hint, valueText, tone, warnAt, className, }: MeterProps): import('react').JSX.Element;
|
|
8
|
-
|
|
7
|
+
export default function Meter({ value, max, label, detail, hint, valueText, tone, warnAt, className, ...rest }: MeterProps): import('react').JSX.Element;
|
|
8
|
+
/** Also takes the element's own props, e.g. `aria-label` when there's no visible label. */
|
|
9
|
+
export interface MeterProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
9
10
|
value: number;
|
|
10
11
|
/** The limit (default 100). Values past it fill the bar and turn it red. */
|
|
11
12
|
max?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/meter/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAS,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/meter/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAS,MAAM,OAAO,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC1B,KAAK,EACL,GAAS,EACT,KAAK,EACL,MAAM,EACN,IAAI,EACJ,SAAS,EACT,IAAa,EACb,MAAa,EACb,SAAS,EACT,GAAG,IAAI,EACV,EAAE,UAAU,+BAyDZ;AAED,2FAA2F;AAC3F,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/meter/index.js
CHANGED
|
@@ -3,11 +3,12 @@ import { cx as e } from "../utils/cx.js";
|
|
|
3
3
|
import { useId as t } from "react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region packages/meter/index.tsx
|
|
6
|
-
function i({ value: i, max: a = 100, label: o, detail: s, hint: c, valueText: l, tone: u = "auto", warnAt: d = .85, className: f }) {
|
|
7
|
-
let
|
|
6
|
+
function i({ value: i, max: a = 100, label: o, detail: s, hint: c, valueText: l, tone: u = "auto", warnAt: d = .85, className: f, ...p }) {
|
|
7
|
+
let m = t(), h = i > a, g = a > 0 ? i / a : +(i > 0), _ = Math.min(100, Math.max(0, Math.round(g * 100))), v = u === "auto" ? h ? "danger" : g >= d ? "warning" : "default" : u;
|
|
8
8
|
return /* @__PURE__ */ r("div", {
|
|
9
|
+
...p,
|
|
9
10
|
role: "meter",
|
|
10
|
-
"aria-labelledby": o ?
|
|
11
|
+
"aria-labelledby": o ? m : p["aria-labelledby"],
|
|
11
12
|
"aria-valuemin": 0,
|
|
12
13
|
"aria-valuemax": a,
|
|
13
14
|
"aria-valuenow": Math.min(i, a),
|
|
@@ -15,23 +16,23 @@ function i({ value: i, max: a = 100, label: o, detail: s, hint: c, valueText: l,
|
|
|
15
16
|
className: e("zen__meter grid grid-cols-2 gap-y-1.5", f),
|
|
16
17
|
children: [
|
|
17
18
|
o && /* @__PURE__ */ n("span", {
|
|
18
|
-
id:
|
|
19
|
+
id: m,
|
|
19
20
|
className: "text-sm font-medium",
|
|
20
21
|
children: o
|
|
21
22
|
}),
|
|
22
23
|
s && /* @__PURE__ */ n("span", {
|
|
23
|
-
className: e("col-start-2 text-right text-sm tabular-nums",
|
|
24
|
+
className: e("col-start-2 text-right text-sm tabular-nums", v === "danger" ? "text-destructive" : "text-muted-foreground"),
|
|
24
25
|
children: s
|
|
25
26
|
}),
|
|
26
27
|
/* @__PURE__ */ n("div", {
|
|
27
28
|
className: "bg-muted col-span-2 h-2 overflow-hidden rounded-full",
|
|
28
29
|
children: /* @__PURE__ */ n("div", {
|
|
29
|
-
className: e("h-full rounded-full transition-[width] duration-700 ease-[cubic-bezier(0.2,0.8,0.2,1)]",
|
|
30
|
-
style: { width: `${
|
|
30
|
+
className: e("h-full rounded-full transition-[width] duration-700 ease-[cubic-bezier(0.2,0.8,0.2,1)]", v === "danger" ? "bg-destructive shadow-[0_0_12px_oklch(var(--destructive)/0.7)]" : v === "warning" ? "bg-accent-foreground shadow-[0_0_12px_oklch(var(--accent-foreground)/0.6)]" : "from-primary to-glow-2 bg-gradient-to-r shadow-[0_0_12px_oklch(var(--glow)/0.6)]"),
|
|
31
|
+
style: { width: `${_}%` }
|
|
31
32
|
})
|
|
32
33
|
}),
|
|
33
34
|
c && /* @__PURE__ */ n("span", {
|
|
34
|
-
className: e("col-span-2 text-xs",
|
|
35
|
+
className: e("col-span-2 text-xs", v === "danger" ? "text-destructive" : "text-muted-foreground"),
|
|
35
36
|
children: c
|
|
36
37
|
})
|
|
37
38
|
]
|