@novi-ui/raster 0.5.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 +21 -0
- package/README.md +3 -0
- package/dist/avatar/avatar.styles.d.mts +3 -3
- package/dist/badge/badge.styles.d.mts +3 -3
- package/dist/button/button.styles.d.mts +3 -3
- package/dist/card/card.styles.d.mts +3 -3
- package/dist/combo-box/combo-box.d.mts +36 -0
- package/dist/combo-box/combo-box.d.mts.map +1 -0
- package/dist/combo-box/combo-box.mjs +128 -0
- package/dist/combo-box/combo-box.mjs.map +1 -0
- package/dist/combo-box/combo-box.styles.d.mts +88 -0
- package/dist/combo-box/combo-box.styles.d.mts.map +1 -0
- package/dist/combo-box/combo-box.styles.mjs +110 -0
- package/dist/combo-box/combo-box.styles.mjs.map +1 -0
- package/dist/combo-box/index.d.mts +3 -0
- package/dist/date-picker/date-picker.d.mts +15 -0
- package/dist/date-picker/date-picker.d.mts.map +1 -0
- package/dist/date-picker/date-picker.mjs +161 -0
- package/dist/date-picker/date-picker.mjs.map +1 -0
- package/dist/date-picker/date-picker.styles.d.mts +103 -0
- package/dist/date-picker/date-picker.styles.d.mts.map +1 -0
- package/dist/date-picker/date-picker.styles.mjs +126 -0
- package/dist/date-picker/date-picker.styles.mjs.map +1 -0
- package/dist/date-picker/index.d.mts +3 -0
- package/dist/index.d.mts +16 -1
- package/dist/index.mjs +11 -1
- package/dist/input/input.styles.d.mts +3 -3
- package/dist/menu/menu.styles.d.mts +6 -6
- package/dist/modal/modal.styles.d.mts +3 -3
- package/dist/number-field/index.d.mts +3 -0
- package/dist/number-field/number-field.d.mts +15 -0
- package/dist/number-field/number-field.d.mts.map +1 -0
- package/dist/number-field/number-field.mjs +114 -0
- package/dist/number-field/number-field.mjs.map +1 -0
- package/dist/number-field/number-field.styles.d.mts +76 -0
- package/dist/number-field/number-field.styles.d.mts.map +1 -0
- package/dist/number-field/number-field.styles.mjs +90 -0
- package/dist/number-field/number-field.styles.mjs.map +1 -0
- package/dist/pagination/index.d.mts +3 -0
- package/dist/pagination/pagination.d.mts +13 -0
- package/dist/pagination/pagination.d.mts.map +1 -0
- package/dist/pagination/pagination.mjs +97 -0
- package/dist/pagination/pagination.mjs.map +1 -0
- package/dist/pagination/pagination.styles.d.mts +73 -0
- package/dist/pagination/pagination.styles.d.mts.map +1 -0
- package/dist/pagination/pagination.styles.mjs +95 -0
- package/dist/pagination/pagination.styles.mjs.map +1 -0
- package/dist/popover/popover.styles.d.mts +3 -3
- package/dist/select/select.d.mts +1 -1
- package/dist/select/select.mjs +1 -1
- package/dist/select/select.mjs.map +1 -1
- package/dist/select/select.styles.d.mts +3 -3
- package/dist/skeleton/skeleton.styles.d.mts +3 -3
- package/dist/table/index.d.mts +3 -0
- package/dist/table/table.d.mts +104 -0
- package/dist/table/table.d.mts.map +1 -0
- package/dist/table/table.mjs +172 -0
- package/dist/table/table.mjs.map +1 -0
- package/dist/table/table.styles.d.mts +58 -0
- package/dist/table/table.styles.d.mts.map +1 -0
- package/dist/table/table.styles.mjs +82 -0
- package/dist/table/table.styles.mjs.map +1 -0
- package/dist/textarea/textarea.styles.d.mts +3 -3
- package/dist/toast/toast.styles.d.mts +3 -3
- package/package.json +6 -4
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { datePickerStyles } from "./date-picker.styles.mjs";
|
|
3
|
+
import { Button, Calendar, CalendarCell, CalendarGrid, DateInput, DatePicker, DateSegment, Dialog, FieldError, Group, Heading, Label, Popover, Text } from "react-aria-components";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/date-picker/date-picker.tsx
|
|
6
|
+
function CalendarIcon() {
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
width: "0.85em",
|
|
10
|
+
height: "0.85em",
|
|
11
|
+
fill: "none",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
14
|
+
x: "2.5",
|
|
15
|
+
y: "3.5",
|
|
16
|
+
width: "11",
|
|
17
|
+
height: "10",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: "1.5"
|
|
20
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
21
|
+
d: "M2.5 6.5h11M5.5 2v3M10.5 2v3",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
strokeWidth: "1.5"
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function ChevronIcon({ direction }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
29
|
+
viewBox: "0 0 16 16",
|
|
30
|
+
width: "0.75em",
|
|
31
|
+
height: "0.75em",
|
|
32
|
+
fill: "none",
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
35
|
+
d: direction === "prev" ? "M10 4l-4 4 4 4" : "M6 4l4 4-4 4",
|
|
36
|
+
stroke: "currentColor",
|
|
37
|
+
strokeWidth: "1.5"
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 日付を入力する。年 / 月 / 日のマスに直接打つか、カレンダーを開いて選ぶ。
|
|
43
|
+
*
|
|
44
|
+
* カレンダーは入力欄の隣に浮く(Tactile は画面下端のシート、Flatlay はフロー内に展開)。
|
|
45
|
+
* 値は `@internationalized/date` の `CalendarDate`(ADR-B6)。
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <DatePicker label="出荷日" value={date} onChange={setDate} minValue={today} />
|
|
49
|
+
*/
|
|
50
|
+
function DatePicker$1({ variant, size, radius, label, description, errorMessage, name, value, defaultValue, onChange, minValue, maxValue, isDateUnavailable, placeholderValue, isOpen, defaultOpen, onOpenChange, isDisabled, isReadOnly, isRequired, isInvalid, className, classNames, id }) {
|
|
51
|
+
const s = datePickerStyles({
|
|
52
|
+
variant,
|
|
53
|
+
size,
|
|
54
|
+
radius
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ jsxs(DatePicker, {
|
|
57
|
+
id,
|
|
58
|
+
name,
|
|
59
|
+
value,
|
|
60
|
+
defaultValue,
|
|
61
|
+
onChange,
|
|
62
|
+
minValue,
|
|
63
|
+
maxValue,
|
|
64
|
+
isDateUnavailable,
|
|
65
|
+
placeholderValue,
|
|
66
|
+
isOpen,
|
|
67
|
+
defaultOpen,
|
|
68
|
+
onOpenChange,
|
|
69
|
+
isDisabled,
|
|
70
|
+
isReadOnly,
|
|
71
|
+
isRequired,
|
|
72
|
+
isInvalid,
|
|
73
|
+
granularity: "day",
|
|
74
|
+
"data-slot": "root",
|
|
75
|
+
className: `group ${s.root({ class: [className, classNames?.root] })}`,
|
|
76
|
+
children: [
|
|
77
|
+
label !== void 0 && /* @__PURE__ */ jsx(Label, {
|
|
78
|
+
"data-slot": "label",
|
|
79
|
+
className: s.label({ class: classNames?.label }),
|
|
80
|
+
children: label
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ jsxs(Group, {
|
|
83
|
+
"data-slot": "inputWrapper",
|
|
84
|
+
className: s.inputWrapper({ class: classNames?.inputWrapper }),
|
|
85
|
+
children: [/* @__PURE__ */ jsx(DateInput, {
|
|
86
|
+
"data-slot": "dateInput",
|
|
87
|
+
className: s.dateInput({ class: classNames?.dateInput }),
|
|
88
|
+
children: (segment) => /* @__PURE__ */ jsx(DateSegment, {
|
|
89
|
+
segment,
|
|
90
|
+
"data-slot": "segment",
|
|
91
|
+
className: s.segment({ class: classNames?.segment })
|
|
92
|
+
})
|
|
93
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
94
|
+
"data-slot": "trigger",
|
|
95
|
+
className: s.trigger({ class: classNames?.trigger }),
|
|
96
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
97
|
+
"data-slot": "icon",
|
|
98
|
+
className: s.icon({ class: classNames?.icon }),
|
|
99
|
+
children: /* @__PURE__ */ jsx(CalendarIcon, {})
|
|
100
|
+
})
|
|
101
|
+
})]
|
|
102
|
+
}),
|
|
103
|
+
description !== void 0 && /* @__PURE__ */ jsx(Text, {
|
|
104
|
+
slot: "description",
|
|
105
|
+
"data-slot": "description",
|
|
106
|
+
className: s.description({ class: classNames?.description }),
|
|
107
|
+
children: description
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ jsx(FieldError, {
|
|
110
|
+
"data-slot": "errorMessage",
|
|
111
|
+
className: s.errorMessage({ class: classNames?.errorMessage }),
|
|
112
|
+
children: errorMessage
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ jsx(Popover, {
|
|
115
|
+
"data-slot": "popover",
|
|
116
|
+
className: s.popover({ class: classNames?.popover }),
|
|
117
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
118
|
+
className: "outline-none",
|
|
119
|
+
children: /* @__PURE__ */ jsxs(Calendar, {
|
|
120
|
+
"data-slot": "calendar",
|
|
121
|
+
className: s.calendar({ class: classNames?.calendar }),
|
|
122
|
+
children: [/* @__PURE__ */ jsxs("header", {
|
|
123
|
+
"data-slot": "calendarHeader",
|
|
124
|
+
className: s.calendarHeader({ class: classNames?.calendarHeader }),
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx(Button, {
|
|
127
|
+
slot: "previous",
|
|
128
|
+
"data-slot": "prevButton",
|
|
129
|
+
className: s.prevButton({ class: classNames?.prevButton }),
|
|
130
|
+
children: /* @__PURE__ */ jsx(ChevronIcon, { direction: "prev" })
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsx(Heading, {
|
|
133
|
+
"data-slot": "calendarTitle",
|
|
134
|
+
className: s.calendarTitle({ class: classNames?.calendarTitle })
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ jsx(Button, {
|
|
137
|
+
slot: "next",
|
|
138
|
+
"data-slot": "nextButton",
|
|
139
|
+
className: s.nextButton({ class: classNames?.nextButton }),
|
|
140
|
+
children: /* @__PURE__ */ jsx(ChevronIcon, { direction: "next" })
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
144
|
+
"data-slot": "calendarGrid",
|
|
145
|
+
className: s.calendarGrid({ class: classNames?.calendarGrid }),
|
|
146
|
+
children: (date) => /* @__PURE__ */ jsx(CalendarCell, {
|
|
147
|
+
date,
|
|
148
|
+
"data-slot": "calendarCell",
|
|
149
|
+
className: s.calendarCell({ class: classNames?.calendarCell })
|
|
150
|
+
})
|
|
151
|
+
})]
|
|
152
|
+
})
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
export { DatePicker$1 as DatePicker };
|
|
160
|
+
|
|
161
|
+
//# sourceMappingURL=date-picker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.mjs","names":["DatePicker","RACDatePicker"],"sources":["../../src/date-picker/date-picker.tsx"],"sourcesContent":["'use client'\n\nimport type { DatePickerProps } from '@novi-ui/core'\nimport {\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n FieldError,\n Group,\n Heading,\n Label,\n Popover,\n DatePicker as RACDatePicker,\n Text,\n} from 'react-aria-components'\nimport { datePickerStyles } from './date-picker.styles'\n\nfunction CalendarIcon() {\n return (\n <svg viewBox=\"0 0 16 16\" width=\"0.85em\" height=\"0.85em\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"2.5\" y=\"3.5\" width=\"11\" height=\"10\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M2.5 6.5h11M5.5 2v3M10.5 2v3\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n )\n}\n\nfunction ChevronIcon({ direction }: { direction: 'prev' | 'next' }) {\n const d = direction === 'prev' ? 'M10 4l-4 4 4 4' : 'M6 4l4 4-4 4'\n return (\n <svg viewBox=\"0 0 16 16\" width=\"0.75em\" height=\"0.75em\" fill=\"none\" aria-hidden=\"true\">\n <path d={d} stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n )\n}\n\n/**\n * 日付を入力する。年 / 月 / 日のマスに直接打つか、カレンダーを開いて選ぶ。\n *\n * カレンダーは入力欄の隣に浮く(Tactile は画面下端のシート、Flatlay はフロー内に展開)。\n * 値は `@internationalized/date` の `CalendarDate`(ADR-B6)。\n *\n * @example\n * <DatePicker label=\"出荷日\" value={date} onChange={setDate} minValue={today} />\n */\nexport function DatePicker({\n variant,\n size,\n radius,\n label,\n description,\n errorMessage,\n name,\n value,\n defaultValue,\n onChange,\n minValue,\n maxValue,\n isDateUnavailable,\n placeholderValue,\n isOpen,\n defaultOpen,\n onOpenChange,\n isDisabled,\n isReadOnly,\n isRequired,\n isInvalid,\n className,\n classNames,\n id,\n}: DatePickerProps) {\n const s = datePickerStyles({ variant, size, radius })\n\n return (\n <RACDatePicker\n id={id}\n name={name}\n value={value}\n defaultValue={defaultValue}\n onChange={onChange}\n minValue={minValue}\n maxValue={maxValue}\n isDateUnavailable={isDateUnavailable}\n placeholderValue={placeholderValue}\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n isInvalid={isInvalid}\n granularity=\"day\"\n data-slot=\"root\"\n className={`group ${s.root({ class: [className, classNames?.root] })}`}\n >\n {label !== undefined && (\n <Label data-slot=\"label\" className={s.label({ class: classNames?.label })}>\n {label}\n </Label>\n )}\n\n <Group\n data-slot=\"inputWrapper\"\n className={s.inputWrapper({ class: classNames?.inputWrapper })}\n >\n <DateInput data-slot=\"dateInput\" className={s.dateInput({ class: classNames?.dateInput })}>\n {(segment) => (\n <DateSegment\n segment={segment}\n data-slot=\"segment\"\n className={s.segment({ class: classNames?.segment })}\n />\n )}\n </DateInput>\n <Button data-slot=\"trigger\" className={s.trigger({ class: classNames?.trigger })}>\n <span data-slot=\"icon\" className={s.icon({ class: classNames?.icon })}>\n <CalendarIcon />\n </span>\n </Button>\n </Group>\n\n {description !== undefined && (\n <Text\n slot=\"description\"\n data-slot=\"description\"\n className={s.description({ class: classNames?.description })}\n >\n {description}\n </Text>\n )}\n\n <FieldError\n data-slot=\"errorMessage\"\n className={s.errorMessage({ class: classNames?.errorMessage })}\n >\n {errorMessage}\n </FieldError>\n\n <Popover data-slot=\"popover\" className={s.popover({ class: classNames?.popover })}>\n <Dialog className=\"outline-none\">\n <Calendar data-slot=\"calendar\" className={s.calendar({ class: classNames?.calendar })}>\n <header\n data-slot=\"calendarHeader\"\n className={s.calendarHeader({ class: classNames?.calendarHeader })}\n >\n <Button\n slot=\"previous\"\n data-slot=\"prevButton\"\n className={s.prevButton({ class: classNames?.prevButton })}\n >\n <ChevronIcon direction=\"prev\" />\n </Button>\n <Heading\n data-slot=\"calendarTitle\"\n className={s.calendarTitle({ class: classNames?.calendarTitle })}\n />\n <Button\n slot=\"next\"\n data-slot=\"nextButton\"\n className={s.nextButton({ class: classNames?.nextButton })}\n >\n <ChevronIcon direction=\"next\" />\n </Button>\n </header>\n <CalendarGrid\n data-slot=\"calendarGrid\"\n className={s.calendarGrid({ class: classNames?.calendarGrid })}\n >\n {(date) => (\n <CalendarCell\n date={date}\n data-slot=\"calendarCell\"\n className={s.calendarCell({ class: classNames?.calendarCell })}\n />\n )}\n </CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </RACDatePicker>\n )\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { VariantMap } from "@novi-ui/core";
|
|
2
|
+
//#region src/date-picker/date-picker.styles.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* DatePicker のスタイル定義。
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { datePickerStyles } from '@novi-ui/raster'
|
|
8
|
+
* import { tv } from 'tailwind-variants'
|
|
9
|
+
*
|
|
10
|
+
* const myPicker = tv({ extend: datePickerStyles, slots: { calendarCell: 'size-9' } })
|
|
11
|
+
*/
|
|
12
|
+
declare const datePickerStyles: import("tailwind-variants").TVReturnType<{
|
|
13
|
+
variant: VariantMap<"solid" | "outline" | "soft" | "ghost" | "plain", {
|
|
14
|
+
inputWrapper: string;
|
|
15
|
+
}>;
|
|
16
|
+
size: VariantMap<"sm" | "md" | "lg", {
|
|
17
|
+
inputWrapper: string;
|
|
18
|
+
dateInput: string;
|
|
19
|
+
}>;
|
|
20
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
21
|
+
inputWrapper: string;
|
|
22
|
+
}>;
|
|
23
|
+
}, {
|
|
24
|
+
root: string;
|
|
25
|
+
label: string;
|
|
26
|
+
inputWrapper: string;
|
|
27
|
+
dateInput: string;
|
|
28
|
+
segment: string;
|
|
29
|
+
trigger: string;
|
|
30
|
+
icon: string;
|
|
31
|
+
popover: string;
|
|
32
|
+
calendar: string;
|
|
33
|
+
calendarHeader: string;
|
|
34
|
+
calendarTitle: string;
|
|
35
|
+
prevButton: string;
|
|
36
|
+
nextButton: string;
|
|
37
|
+
calendarGrid: string;
|
|
38
|
+
calendarCell: string;
|
|
39
|
+
description: string;
|
|
40
|
+
errorMessage: string;
|
|
41
|
+
}, undefined, {
|
|
42
|
+
variant: VariantMap<"solid" | "outline" | "soft" | "ghost" | "plain", {
|
|
43
|
+
inputWrapper: string;
|
|
44
|
+
}>;
|
|
45
|
+
size: VariantMap<"sm" | "md" | "lg", {
|
|
46
|
+
inputWrapper: string;
|
|
47
|
+
dateInput: string;
|
|
48
|
+
}>;
|
|
49
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
50
|
+
inputWrapper: string;
|
|
51
|
+
}>;
|
|
52
|
+
}, {
|
|
53
|
+
root: string;
|
|
54
|
+
label: string;
|
|
55
|
+
inputWrapper: string;
|
|
56
|
+
dateInput: string;
|
|
57
|
+
segment: string;
|
|
58
|
+
trigger: string;
|
|
59
|
+
icon: string;
|
|
60
|
+
popover: string;
|
|
61
|
+
calendar: string;
|
|
62
|
+
calendarHeader: string;
|
|
63
|
+
calendarTitle: string;
|
|
64
|
+
prevButton: string;
|
|
65
|
+
nextButton: string;
|
|
66
|
+
calendarGrid: string;
|
|
67
|
+
calendarCell: string;
|
|
68
|
+
description: string;
|
|
69
|
+
errorMessage: string;
|
|
70
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
71
|
+
variant: VariantMap<"solid" | "outline" | "soft" | "ghost" | "plain", {
|
|
72
|
+
inputWrapper: string;
|
|
73
|
+
}>;
|
|
74
|
+
size: VariantMap<"sm" | "md" | "lg", {
|
|
75
|
+
inputWrapper: string;
|
|
76
|
+
dateInput: string;
|
|
77
|
+
}>;
|
|
78
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
79
|
+
inputWrapper: string;
|
|
80
|
+
}>;
|
|
81
|
+
}, {
|
|
82
|
+
root: string;
|
|
83
|
+
label: string;
|
|
84
|
+
inputWrapper: string;
|
|
85
|
+
dateInput: string;
|
|
86
|
+
segment: string;
|
|
87
|
+
trigger: string;
|
|
88
|
+
icon: string;
|
|
89
|
+
popover: string;
|
|
90
|
+
calendar: string;
|
|
91
|
+
calendarHeader: string;
|
|
92
|
+
calendarTitle: string;
|
|
93
|
+
prevButton: string;
|
|
94
|
+
nextButton: string;
|
|
95
|
+
calendarGrid: string;
|
|
96
|
+
calendarCell: string;
|
|
97
|
+
description: string;
|
|
98
|
+
errorMessage: string;
|
|
99
|
+
}>>;
|
|
100
|
+
type DatePickerStyleProps = Parameters<typeof datePickerStyles>[0];
|
|
101
|
+
//#endregion
|
|
102
|
+
export { DatePickerStyleProps, datePickerStyles };
|
|
103
|
+
//# sourceMappingURL=date-picker.styles.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.styles.d.mts","names":[],"sources":["../../src/date-picker/date-picker.styles.ts"],"mappings":";;;;;;;;;;;cA2Ia,8CAAgB;;IA7C0B;;;IAaN;IAAmB;;;IAef;;;;;;;;;;;;;;;;;;;;;;IA5BE;;;IAaN;IAAmB;;;IAef;;;;;;;;;;;;;;;;;;;;;;IA5BE;;;IAaN;IAAmB;;;IAef;;;;;;;;;;;;;;;;;;;;;KAuBzC,uBAAuB,kBAAkB"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { disabledState, focusRing } from "../styles/focus-ring.mjs";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
//#region src/date-picker/date-picker.styles.ts
|
|
4
|
+
/** 月送りのボタン。線で区切らず、記号だけを置く */
|
|
5
|
+
const monthButton = [
|
|
6
|
+
"inline-flex items-center justify-center size-8",
|
|
7
|
+
"text-[var(--novi-color-muted)] outline-none",
|
|
8
|
+
"rounded-[var(--novi-radius-sm)]",
|
|
9
|
+
"hover:text-[var(--novi-color-fg)] hover:bg-[var(--novi-color-subtle)]",
|
|
10
|
+
"data-[disabled]:opacity-40",
|
|
11
|
+
focusRing
|
|
12
|
+
].join(" ");
|
|
13
|
+
const slots = {
|
|
14
|
+
root: "flex flex-col gap-1.5",
|
|
15
|
+
label: "text-[length:var(--novi-text-sm)] font-medium text-[var(--novi-color-fg)]",
|
|
16
|
+
inputWrapper: [
|
|
17
|
+
"text-[var(--novi-color-fg)]",
|
|
18
|
+
"flex items-center w-full overflow-hidden",
|
|
19
|
+
"bg-[var(--novi-color-bg)]",
|
|
20
|
+
"border border-[var(--novi-color-border-strong)]",
|
|
21
|
+
"transition-[border-color,opacity]",
|
|
22
|
+
"duration-[var(--novi-duration-fast)] ease-[var(--novi-ease-standard)]",
|
|
23
|
+
"data-[invalid]:border-[var(--novi-color-danger)]",
|
|
24
|
+
focusRing,
|
|
25
|
+
disabledState
|
|
26
|
+
].join(" "),
|
|
27
|
+
dateInput: "flex items-center flex-1 min-w-0 whitespace-nowrap",
|
|
28
|
+
segment: [
|
|
29
|
+
"inline-flex items-center justify-center min-w-6 min-h-6 px-0.5 tabular-nums outline-none",
|
|
30
|
+
"rounded-[var(--novi-radius-sm)]",
|
|
31
|
+
"data-[placeholder]:text-[var(--novi-color-muted)]",
|
|
32
|
+
"data-[type=literal]:px-0 data-[type=literal]:text-[var(--novi-color-muted)]",
|
|
33
|
+
"data-[focused]:bg-[var(--novi-color-primary)] data-[focused]:text-[var(--novi-color-primary-fg)]",
|
|
34
|
+
"data-[invalid]:text-[var(--novi-color-danger)]"
|
|
35
|
+
].join(" "),
|
|
36
|
+
trigger: [
|
|
37
|
+
"shrink-0 self-stretch inline-flex items-center justify-center w-8",
|
|
38
|
+
"text-[var(--novi-color-muted)]",
|
|
39
|
+
"border-l border-[var(--novi-color-border)]",
|
|
40
|
+
"outline-none",
|
|
41
|
+
"hover:text-[var(--novi-color-fg)] hover:bg-[var(--novi-color-subtle)]",
|
|
42
|
+
"data-[focus-visible]:text-[var(--novi-color-fg)]",
|
|
43
|
+
"data-[disabled]:opacity-40 data-[disabled]:cursor-default",
|
|
44
|
+
"transition-[color,background-color]",
|
|
45
|
+
"duration-[var(--novi-duration-fast)] ease-[var(--novi-ease-standard)]"
|
|
46
|
+
].join(" "),
|
|
47
|
+
icon: "shrink-0 inline-flex",
|
|
48
|
+
popover: [
|
|
49
|
+
"bg-[var(--novi-color-bg)]",
|
|
50
|
+
"text-[var(--novi-color-fg)]",
|
|
51
|
+
"border border-[var(--novi-color-border)]",
|
|
52
|
+
"rounded-[var(--novi-radius-lg)]",
|
|
53
|
+
"shadow-[var(--novi-shadow-md)]",
|
|
54
|
+
"p-[var(--novi-pad-surface-y)]"
|
|
55
|
+
].join(" "),
|
|
56
|
+
calendar: "flex flex-col gap-[var(--novi-gap-inline)] outline-none",
|
|
57
|
+
calendarHeader: "flex items-center justify-between gap-[var(--novi-gap-inline)]",
|
|
58
|
+
calendarTitle: "text-[length:var(--novi-text-sm)] font-medium tabular-nums",
|
|
59
|
+
prevButton: monthButton,
|
|
60
|
+
nextButton: monthButton,
|
|
61
|
+
calendarGrid: ["border-collapse", "[&_th]:size-8 [&_th]:font-normal [&_th]:text-[length:var(--novi-text-xs)] [&_th]:text-[var(--novi-color-muted)]"].join(" "),
|
|
62
|
+
calendarCell: [
|
|
63
|
+
"size-8 inline-flex items-center justify-center",
|
|
64
|
+
"text-[length:var(--novi-text-sm)] tabular-nums cursor-pointer outline-none",
|
|
65
|
+
"rounded-[var(--novi-radius-sm)]",
|
|
66
|
+
"data-[hovered]:bg-[var(--novi-color-subtle)]",
|
|
67
|
+
"data-[selected]:bg-[var(--novi-color-primary)] data-[selected]:text-[var(--novi-color-primary-fg)]",
|
|
68
|
+
"data-[focus-visible]:outline-2 data-[focus-visible]:-outline-offset-2 data-[focus-visible]:outline-[var(--novi-color-ring)]",
|
|
69
|
+
"data-[disabled]:opacity-40 data-[disabled]:cursor-default",
|
|
70
|
+
"data-[unavailable]:line-through data-[unavailable]:text-[var(--novi-color-muted)]",
|
|
71
|
+
"data-[outside-month]:invisible"
|
|
72
|
+
].join(" "),
|
|
73
|
+
description: "text-[length:var(--novi-text-xs)] text-[var(--novi-color-muted)]",
|
|
74
|
+
errorMessage: "text-[length:var(--novi-text-xs)] text-[var(--novi-color-danger)]"
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* DatePicker のスタイル定義。
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* import { datePickerStyles } from '@novi-ui/raster'
|
|
81
|
+
* import { tv } from 'tailwind-variants'
|
|
82
|
+
*
|
|
83
|
+
* const myPicker = tv({ extend: datePickerStyles, slots: { calendarCell: 'size-9' } })
|
|
84
|
+
*/
|
|
85
|
+
const datePickerStyles = tv({
|
|
86
|
+
slots,
|
|
87
|
+
variants: {
|
|
88
|
+
variant: {
|
|
89
|
+
solid: { inputWrapper: "bg-[var(--novi-color-subtle)] border-[var(--novi-color-border-strong)]" },
|
|
90
|
+
outline: { inputWrapper: "bg-[var(--novi-color-bg)] border-[var(--novi-color-border-strong)]" },
|
|
91
|
+
soft: { inputWrapper: "bg-[var(--novi-color-subtle)] border-transparent" },
|
|
92
|
+
ghost: { inputWrapper: "bg-transparent border-transparent border-b-[var(--novi-color-border-strong)]" },
|
|
93
|
+
plain: { inputWrapper: "bg-transparent border-transparent" }
|
|
94
|
+
},
|
|
95
|
+
size: {
|
|
96
|
+
sm: {
|
|
97
|
+
inputWrapper: "h-8",
|
|
98
|
+
dateInput: "px-[var(--novi-pad-control-x-sm)] text-[length:var(--novi-text-sm)]"
|
|
99
|
+
},
|
|
100
|
+
md: {
|
|
101
|
+
inputWrapper: "h-10",
|
|
102
|
+
dateInput: "px-[var(--novi-pad-control-x-md)] text-[length:var(--novi-text-base)]"
|
|
103
|
+
},
|
|
104
|
+
lg: {
|
|
105
|
+
inputWrapper: "h-12",
|
|
106
|
+
dateInput: "px-[var(--novi-pad-control-x-lg)] text-[length:var(--novi-text-base)]"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
radius: {
|
|
110
|
+
none: { inputWrapper: "rounded-[var(--novi-radius-none)]" },
|
|
111
|
+
sm: { inputWrapper: "rounded-[var(--novi-radius-sm)]" },
|
|
112
|
+
md: { inputWrapper: "rounded-[var(--novi-radius-md)]" },
|
|
113
|
+
lg: { inputWrapper: "rounded-[var(--novi-radius-lg)]" },
|
|
114
|
+
full: { inputWrapper: "rounded-[var(--novi-radius-full)]" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
defaultVariants: {
|
|
118
|
+
variant: "outline",
|
|
119
|
+
size: "md",
|
|
120
|
+
radius: "md"
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
//#endregion
|
|
124
|
+
export { datePickerStyles };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=date-picker.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.styles.mjs","names":[],"sources":["../../src/date-picker/date-picker.styles.ts"],"sourcesContent":["import type {\n datePickerRequiredSlots,\n datePickerSlots,\n NoviRadius,\n NoviSize,\n NoviVariant,\n SlotMap,\n VariantMap,\n} from '@novi-ui/core'\nimport { tv } from 'tailwind-variants'\nimport { disabledState, focusRing } from '../styles/focus-ring'\n\n/** 月送りのボタン。線で区切らず、記号だけを置く */\nconst monthButton = [\n 'inline-flex items-center justify-center size-8',\n 'text-[var(--novi-color-muted)] outline-none',\n 'rounded-[var(--novi-radius-sm)]',\n 'hover:text-[var(--novi-color-fg)] hover:bg-[var(--novi-color-subtle)]',\n 'data-[disabled]:opacity-40',\n focusRing,\n].join(' ')\n\nconst slots = {\n root: 'flex flex-col gap-1.5',\n label: 'text-[length:var(--novi-text-sm)] font-medium text-[var(--novi-color-fg)]',\n // Input と同じ枠。開くボタンを縁まで届かせるため、左右の余白は dateInput 側に置く\n inputWrapper: [\n 'text-[var(--novi-color-fg)]',\n 'flex items-center w-full overflow-hidden',\n 'bg-[var(--novi-color-bg)]',\n 'border border-[var(--novi-color-border-strong)]',\n 'transition-[border-color,opacity]',\n 'duration-[var(--novi-duration-fast)] ease-[var(--novi-ease-standard)]',\n 'data-[invalid]:border-[var(--novi-color-danger)]',\n focusRing,\n disabledState,\n ].join(' '),\n dateInput: 'flex items-center flex-1 min-w-0 whitespace-nowrap',\n // 年 / 月 / 日の 1 マス。フォーカスは反転で示す(マス自体が小さく、リングでは潰れる)\n segment: [\n // 触れる対象として 24px 四方を確保する(WCAG 2.2 target-size)。文字幅 1〜2 桁のマスが小さくなりすぎる\n 'inline-flex items-center justify-center min-w-6 min-h-6 px-0.5 tabular-nums outline-none',\n 'rounded-[var(--novi-radius-sm)]',\n 'data-[placeholder]:text-[var(--novi-color-muted)]',\n 'data-[type=literal]:px-0 data-[type=literal]:text-[var(--novi-color-muted)]',\n 'data-[focused]:bg-[var(--novi-color-primary)] data-[focused]:text-[var(--novi-color-primary-fg)]',\n 'data-[invalid]:text-[var(--novi-color-danger)]',\n ].join(' '),\n trigger: [\n 'shrink-0 self-stretch inline-flex items-center justify-center w-8',\n 'text-[var(--novi-color-muted)]',\n 'border-l border-[var(--novi-color-border)]',\n 'outline-none',\n 'hover:text-[var(--novi-color-fg)] hover:bg-[var(--novi-color-subtle)]',\n 'data-[focus-visible]:text-[var(--novi-color-fg)]',\n 'data-[disabled]:opacity-40 data-[disabled]:cursor-default',\n 'transition-[color,background-color]',\n 'duration-[var(--novi-duration-fast)] ease-[var(--novi-ease-standard)]',\n ].join(' '),\n icon: 'shrink-0 inline-flex',\n // 影を使わず、1px の境界線と背景の差だけで浮かせる(Select と同じ)\n popover: [\n 'bg-[var(--novi-color-bg)]',\n 'text-[var(--novi-color-fg)]',\n 'border border-[var(--novi-color-border)]',\n 'rounded-[var(--novi-radius-lg)]',\n 'shadow-[var(--novi-shadow-md)]',\n 'p-[var(--novi-pad-surface-y)]',\n ].join(' '),\n calendar: 'flex flex-col gap-[var(--novi-gap-inline)] outline-none',\n calendarHeader: 'flex items-center justify-between gap-[var(--novi-gap-inline)]',\n calendarTitle: 'text-[length:var(--novi-text-sm)] font-medium tabular-nums',\n prevButton: monthButton,\n nextButton: monthButton,\n // 曜日の見出しと日の升目。升目は 7 列の正方形\n calendarGrid: [\n 'border-collapse',\n '[&_th]:size-8 [&_th]:font-normal [&_th]:text-[length:var(--novi-text-xs)] [&_th]:text-[var(--novi-color-muted)]',\n ].join(' '),\n calendarCell: [\n 'size-8 inline-flex items-center justify-center',\n 'text-[length:var(--novi-text-sm)] tabular-nums cursor-pointer outline-none',\n 'rounded-[var(--novi-radius-sm)]',\n 'data-[hovered]:bg-[var(--novi-color-subtle)]',\n 'data-[selected]:bg-[var(--novi-color-primary)] data-[selected]:text-[var(--novi-color-primary-fg)]',\n 'data-[focus-visible]:outline-2 data-[focus-visible]:-outline-offset-2 data-[focus-visible]:outline-[var(--novi-color-ring)]',\n 'data-[disabled]:opacity-40 data-[disabled]:cursor-default',\n 'data-[unavailable]:line-through data-[unavailable]:text-[var(--novi-color-muted)]',\n 'data-[outside-month]:invisible',\n ].join(' '),\n description: 'text-[length:var(--novi-text-xs)] text-[var(--novi-color-muted)]',\n errorMessage: 'text-[length:var(--novi-text-xs)] text-[var(--novi-color-danger)]',\n} satisfies SlotMap<typeof datePickerSlots, (typeof datePickerRequiredSlots)[number]>\n\nconst variant: VariantMap<NoviVariant, { inputWrapper: string }> = {\n solid: {\n inputWrapper: 'bg-[var(--novi-color-subtle)] border-[var(--novi-color-border-strong)]',\n },\n outline: { inputWrapper: 'bg-[var(--novi-color-bg)] border-[var(--novi-color-border-strong)]' },\n soft: { inputWrapper: 'bg-[var(--novi-color-subtle)] border-transparent' },\n ghost: {\n inputWrapper: 'bg-transparent border-transparent border-b-[var(--novi-color-border-strong)]',\n },\n plain: { inputWrapper: 'bg-transparent border-transparent' },\n}\n\n/** 高さは Button / Input と揃える。32 / 40 / 48px */\nconst size: VariantMap<NoviSize, { inputWrapper: string; dateInput: string }> = {\n sm: {\n inputWrapper: 'h-8',\n dateInput: 'px-[var(--novi-pad-control-x-sm)] text-[length:var(--novi-text-sm)]',\n },\n md: {\n inputWrapper: 'h-10',\n dateInput: 'px-[var(--novi-pad-control-x-md)] text-[length:var(--novi-text-base)]',\n },\n lg: {\n inputWrapper: 'h-12',\n dateInput: 'px-[var(--novi-pad-control-x-lg)] text-[length:var(--novi-text-base)]',\n },\n}\n\nconst radius: VariantMap<NoviRadius, { inputWrapper: string }> = {\n none: { inputWrapper: 'rounded-[var(--novi-radius-none)]' },\n sm: { inputWrapper: 'rounded-[var(--novi-radius-sm)]' },\n md: { inputWrapper: 'rounded-[var(--novi-radius-md)]' },\n lg: { inputWrapper: 'rounded-[var(--novi-radius-lg)]' },\n full: { inputWrapper: 'rounded-[var(--novi-radius-full)]' },\n}\n\n/**\n * DatePicker のスタイル定義。\n *\n * @example\n * import { datePickerStyles } from '@novi-ui/raster'\n * import { tv } from 'tailwind-variants'\n *\n * const myPicker = tv({ extend: datePickerStyles, slots: { calendarCell: 'size-9' } })\n */\nexport const datePickerStyles = tv({\n slots,\n variants: { variant, size, radius },\n defaultVariants: { variant: 'outline', size: 'md', radius: 'md' },\n})\n\nexport type DatePickerStyleProps = Parameters<typeof datePickerStyles>[0]\n"],"mappings":";;;;AAaA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,QAAQ;CACZ,MAAM;CACN,OAAO;CAEP,cAAc;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,GAAG;CACV,WAAW;CAEX,SAAS;EAEP;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,GAAG;CACV,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,GAAG;CACV,MAAM;CAEN,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,GAAG;CACV,UAAU;CACV,gBAAgB;CAChB,eAAe;CACf,YAAY;CACZ,YAAY;CAEZ,cAAc,CACZ,mBACA,iHACF,CAAC,CAAC,KAAK,GAAG;CACV,cAAc;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,GAAG;CACV,aAAa;CACb,cAAc;AAChB;;;;;;;;;;AA+CA,MAAa,mBAAmB,GAAG;CACjC;CACA,UAAU;EAAE;GA9CZ,OAAO,EACL,cAAc,yEAChB;GACA,SAAS,EAAE,cAAc,qEAAqE;GAC9F,MAAM,EAAE,cAAc,mDAAmD;GACzE,OAAO,EACL,cAAc,+EAChB;GACA,OAAO,EAAE,cAAc,oCAAoC;EAsC/C;EAAS;GAjCrB,IAAI;IACF,cAAc;IACd,WAAW;GACb;GACA,IAAI;IACF,cAAc;IACd,WAAW;GACb;GACA,IAAI;IACF,cAAc;IACd,WAAW;GACb;EAsBqB;EAAM;GAlB3B,MAAM,EAAE,cAAc,oCAAoC;GAC1D,IAAI,EAAE,cAAc,kCAAkC;GACtD,IAAI,EAAE,cAAc,kCAAkC;GACtD,IAAI,EAAE,cAAc,kCAAkC;GACtD,MAAM,EAAE,cAAc,oCAAoC;EAc/B;CAAO;CAClC,iBAAiB;EAAE,SAAS;EAAW,MAAM;EAAM,QAAQ;CAAK;AAClE,CAAC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -22,6 +22,12 @@ import "./checkbox/index.mjs";
|
|
|
22
22
|
import { COLOR_OPTIONS, ColorPicker } from "./color-picker/color-picker.mjs";
|
|
23
23
|
import { ColorPickerStyleProps, colorPickerStyles } from "./color-picker/color-picker.styles.mjs";
|
|
24
24
|
import "./color-picker/index.mjs";
|
|
25
|
+
import { ComboBox, ComboBoxItem, ComboBoxItemProps } from "./combo-box/combo-box.mjs";
|
|
26
|
+
import { ComboBoxStyleProps, comboBoxStyles } from "./combo-box/combo-box.styles.mjs";
|
|
27
|
+
import "./combo-box/index.mjs";
|
|
28
|
+
import { DatePicker } from "./date-picker/date-picker.mjs";
|
|
29
|
+
import { DatePickerStyleProps, datePickerStyles } from "./date-picker/date-picker.styles.mjs";
|
|
30
|
+
import "./date-picker/index.mjs";
|
|
25
31
|
import { Input } from "./input/input.mjs";
|
|
26
32
|
import { InputStyleProps, inputStyles } from "./input/input.styles.mjs";
|
|
27
33
|
import "./input/index.mjs";
|
|
@@ -31,6 +37,12 @@ import "./menu/index.mjs";
|
|
|
31
37
|
import { Modal, ModalBody, ModalFooter, ModalTitle } from "./modal/modal.mjs";
|
|
32
38
|
import { ModalStyleProps, modalStyles } from "./modal/modal.styles.mjs";
|
|
33
39
|
import "./modal/index.mjs";
|
|
40
|
+
import { NumberField } from "./number-field/number-field.mjs";
|
|
41
|
+
import { NumberFieldStyleProps, numberFieldStyles } from "./number-field/number-field.styles.mjs";
|
|
42
|
+
import "./number-field/index.mjs";
|
|
43
|
+
import { Pagination } from "./pagination/pagination.mjs";
|
|
44
|
+
import { PaginationStyleProps, paginationStyles } from "./pagination/pagination.styles.mjs";
|
|
45
|
+
import "./pagination/index.mjs";
|
|
34
46
|
import { Popover, PopoverContent, Tooltip } from "./popover/popover.mjs";
|
|
35
47
|
import { PopoverStyleProps, TooltipStyleProps, popoverStyles, tooltipStyles } from "./popover/popover.styles.mjs";
|
|
36
48
|
import "./popover/index.mjs";
|
|
@@ -52,6 +64,9 @@ import "./spinner/index.mjs";
|
|
|
52
64
|
import { Switch } from "./switch/switch.mjs";
|
|
53
65
|
import { SwitchStyleProps, switchStyles } from "./switch/switch.styles.mjs";
|
|
54
66
|
import "./switch/index.mjs";
|
|
67
|
+
import { Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableColumn, TableColumnProps, TableHeader, TableHeaderProps, TableRow, TableRowProps } from "./table/table.mjs";
|
|
68
|
+
import { TableStyleProps, tableStyles } from "./table/table.styles.mjs";
|
|
69
|
+
import "./table/index.mjs";
|
|
55
70
|
import { TabContent, TabItem, TabItems, Tabs } from "./tabs/tabs.mjs";
|
|
56
71
|
import { TabsStyleProps, tabsStyles } from "./tabs/tabs.styles.mjs";
|
|
57
72
|
import "./tabs/index.mjs";
|
|
@@ -61,4 +76,4 @@ import "./textarea/index.mjs";
|
|
|
61
76
|
import { NoviToast, NoviToastRegion, createToastQueue } from "./toast/toast.mjs";
|
|
62
77
|
import { ToastStyleProps, toastStyles } from "./toast/toast.styles.mjs";
|
|
63
78
|
import "./toast/index.mjs";
|
|
64
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionStyleProps, Avatar, type AvatarStyleProps, Badge, type BadgeStyleProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsStyleProps, Button, type ButtonStyleProps, COLOR_OPTIONS, Card, CardBody, CardFooter, CardHeader, CardImage, type CardStyleProps, Checkbox, CheckboxGroup, type CheckboxGroupStyleProps, type CheckboxStyleProps, ColorPicker, type ColorPickerStyleProps, Input, type InputStyleProps, Menu, MenuItemComponent as MenuItem, type MenuItemProps, MenuSection, MenuSeparator, type MenuStyleProps, Modal, ModalBody, ModalFooter, type ModalStyleProps, ModalTitle, type NoviToast, NoviToastRegion, Popover, PopoverContent, type PopoverStyleProps, Progress, type ProgressStyleProps, Radio, RadioGroup, type RadioGroupStyleProps, type RadioStyleProps, Select, SelectItem, type SelectItemProps, type SelectStyleProps, Skeleton, type SkeletonStyleProps, Spinner, type SpinnerStyleProps, Switch, type SwitchStyleProps, TabContent, TabItem, TabItems, Tabs, type TabsStyleProps, TextArea, type TextareaStyleProps, type ToastStyleProps, Tooltip, type TooltipStyleProps, accordionStyles, avatarStyles, badgeStyles, breadcrumbsStyles, buttonStyles, cardStyles, checkboxGroupStyles, checkboxStyles, colorPickerStyles, createToastQueue, initialsOf, inputStyles, menuStyles, modalStyles, popoverStyles, progressStyles, radioGroupStyles, radioStyles, selectStyles, skeletonStyles, spinnerStyles, switchStyles, tabsStyles, textareaStyles, toastStyles, tooltipStyles };
|
|
79
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionStyleProps, Avatar, type AvatarStyleProps, Badge, type BadgeStyleProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsStyleProps, Button, type ButtonStyleProps, COLOR_OPTIONS, Card, CardBody, CardFooter, CardHeader, CardImage, type CardStyleProps, Checkbox, CheckboxGroup, type CheckboxGroupStyleProps, type CheckboxStyleProps, ColorPicker, type ColorPickerStyleProps, ComboBox, ComboBoxItem, type ComboBoxItemProps, type ComboBoxStyleProps, DatePicker, type DatePickerStyleProps, Input, type InputStyleProps, Menu, MenuItemComponent as MenuItem, type MenuItemProps, MenuSection, MenuSeparator, type MenuStyleProps, Modal, ModalBody, ModalFooter, type ModalStyleProps, ModalTitle, type NoviToast, NoviToastRegion, NumberField, type NumberFieldStyleProps, Pagination, type PaginationStyleProps, Popover, PopoverContent, type PopoverStyleProps, Progress, type ProgressStyleProps, Radio, RadioGroup, type RadioGroupStyleProps, type RadioStyleProps, Select, SelectItem, type SelectItemProps, type SelectStyleProps, Skeleton, type SkeletonStyleProps, Spinner, type SpinnerStyleProps, Switch, type SwitchStyleProps, TabContent, TabItem, TabItems, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableHeader, type TableHeaderProps, TableRow, type TableRowProps, type TableStyleProps, Tabs, type TabsStyleProps, TextArea, type TextareaStyleProps, type ToastStyleProps, Tooltip, type TooltipStyleProps, accordionStyles, avatarStyles, badgeStyles, breadcrumbsStyles, buttonStyles, cardStyles, checkboxGroupStyles, checkboxStyles, colorPickerStyles, comboBoxStyles, createToastQueue, datePickerStyles, initialsOf, inputStyles, menuStyles, modalStyles, numberFieldStyles, paginationStyles, popoverStyles, progressStyles, radioGroupStyles, radioStyles, selectStyles, skeletonStyles, spinnerStyles, switchStyles, tableStyles, tabsStyles, textareaStyles, toastStyles, tooltipStyles };
|
package/dist/index.mjs
CHANGED
|
@@ -15,12 +15,20 @@ import { checkboxGroupStyles, checkboxStyles } from "./checkbox/checkbox.styles.
|
|
|
15
15
|
import { Checkbox, CheckboxGroup } from "./checkbox/checkbox.mjs";
|
|
16
16
|
import { colorPickerStyles } from "./color-picker/color-picker.styles.mjs";
|
|
17
17
|
import { COLOR_OPTIONS, ColorPicker } from "./color-picker/color-picker.mjs";
|
|
18
|
+
import { comboBoxStyles } from "./combo-box/combo-box.styles.mjs";
|
|
19
|
+
import { ComboBox, ComboBoxItem } from "./combo-box/combo-box.mjs";
|
|
20
|
+
import { datePickerStyles } from "./date-picker/date-picker.styles.mjs";
|
|
21
|
+
import { DatePicker } from "./date-picker/date-picker.mjs";
|
|
18
22
|
import { inputStyles } from "./input/input.styles.mjs";
|
|
19
23
|
import { Input } from "./input/input.mjs";
|
|
20
24
|
import { menuStyles } from "./menu/menu.styles.mjs";
|
|
21
25
|
import { Menu, MenuItemComponent, MenuSection, MenuSeparator } from "./menu/menu.mjs";
|
|
22
26
|
import { modalStyles } from "./modal/modal.styles.mjs";
|
|
23
27
|
import { Modal, ModalBody, ModalFooter, ModalTitle } from "./modal/modal.mjs";
|
|
28
|
+
import { numberFieldStyles } from "./number-field/number-field.styles.mjs";
|
|
29
|
+
import { NumberField } from "./number-field/number-field.mjs";
|
|
30
|
+
import { paginationStyles } from "./pagination/pagination.styles.mjs";
|
|
31
|
+
import { Pagination } from "./pagination/pagination.mjs";
|
|
24
32
|
import { popoverStyles, tooltipStyles } from "./popover/popover.styles.mjs";
|
|
25
33
|
import { Popover, PopoverContent, Tooltip } from "./popover/popover.mjs";
|
|
26
34
|
import { progressStyles } from "./progress/progress.styles.mjs";
|
|
@@ -35,10 +43,12 @@ import { spinnerStyles } from "./spinner/spinner.styles.mjs";
|
|
|
35
43
|
import { Spinner } from "./spinner/spinner.mjs";
|
|
36
44
|
import { switchStyles } from "./switch/switch.styles.mjs";
|
|
37
45
|
import { Switch } from "./switch/switch.mjs";
|
|
46
|
+
import { tableStyles } from "./table/table.styles.mjs";
|
|
47
|
+
import { Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "./table/table.mjs";
|
|
38
48
|
import { tabsStyles } from "./tabs/tabs.styles.mjs";
|
|
39
49
|
import { TabContent, TabItem, TabItems, Tabs } from "./tabs/tabs.mjs";
|
|
40
50
|
import { textareaStyles } from "./textarea/textarea.styles.mjs";
|
|
41
51
|
import { TextArea } from "./textarea/textarea.mjs";
|
|
42
52
|
import { toastStyles } from "./toast/toast.styles.mjs";
|
|
43
53
|
import { NoviToastRegion, createToastQueue } from "./toast/toast.mjs";
|
|
44
|
-
export { Accordion, AccordionItem, Avatar, Badge, Breadcrumb, Breadcrumbs, Button, COLOR_OPTIONS, Card, CardBody, CardFooter, CardHeader, CardImage, Checkbox, CheckboxGroup, ColorPicker, Input, Menu, MenuItemComponent as MenuItem, MenuSection, MenuSeparator, Modal, ModalBody, ModalFooter, ModalTitle, NoviToastRegion, Popover, PopoverContent, Progress, Radio, RadioGroup, Select, SelectItem, Skeleton, Spinner, Switch, TabContent, TabItem, TabItems, Tabs, TextArea, Tooltip, accordionStyles, avatarStyles, badgeStyles, breadcrumbsStyles, buttonStyles, cardStyles, checkboxGroupStyles, checkboxStyles, colorPickerStyles, createToastQueue, initialsOf, inputStyles, menuStyles, modalStyles, popoverStyles, progressStyles, radioGroupStyles, radioStyles, selectStyles, skeletonStyles, spinnerStyles, switchStyles, tabsStyles, textareaStyles, toastStyles, tooltipStyles };
|
|
54
|
+
export { Accordion, AccordionItem, Avatar, Badge, Breadcrumb, Breadcrumbs, Button, COLOR_OPTIONS, Card, CardBody, CardFooter, CardHeader, CardImage, Checkbox, CheckboxGroup, ColorPicker, ComboBox, ComboBoxItem, DatePicker, Input, Menu, MenuItemComponent as MenuItem, MenuSection, MenuSeparator, Modal, ModalBody, ModalFooter, ModalTitle, NoviToastRegion, NumberField, Pagination, Popover, PopoverContent, Progress, Radio, RadioGroup, Select, SelectItem, Skeleton, Spinner, Switch, TabContent, TabItem, TabItems, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, TextArea, Tooltip, accordionStyles, avatarStyles, badgeStyles, breadcrumbsStyles, buttonStyles, cardStyles, checkboxGroupStyles, checkboxStyles, colorPickerStyles, comboBoxStyles, createToastQueue, datePickerStyles, initialsOf, inputStyles, menuStyles, modalStyles, numberFieldStyles, paginationStyles, popoverStyles, progressStyles, radioGroupStyles, radioStyles, selectStyles, skeletonStyles, spinnerStyles, switchStyles, tableStyles, tabsStyles, textareaStyles, toastStyles, tooltipStyles };
|
|
@@ -22,7 +22,7 @@ declare const inputStyles: import("tailwind-variants").TVReturnType<{
|
|
|
22
22
|
inputWrapper: string;
|
|
23
23
|
input: string;
|
|
24
24
|
}>;
|
|
25
|
-
radius: VariantMap<"
|
|
25
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
26
26
|
inputWrapper: string;
|
|
27
27
|
}>;
|
|
28
28
|
}, {
|
|
@@ -42,7 +42,7 @@ declare const inputStyles: import("tailwind-variants").TVReturnType<{
|
|
|
42
42
|
inputWrapper: string;
|
|
43
43
|
input: string;
|
|
44
44
|
}>;
|
|
45
|
-
radius: VariantMap<"
|
|
45
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
46
46
|
inputWrapper: string;
|
|
47
47
|
}>;
|
|
48
48
|
}, {
|
|
@@ -62,7 +62,7 @@ declare const inputStyles: import("tailwind-variants").TVReturnType<{
|
|
|
62
62
|
inputWrapper: string;
|
|
63
63
|
input: string;
|
|
64
64
|
}>;
|
|
65
|
-
radius: VariantMap<"
|
|
65
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
66
66
|
inputWrapper: string;
|
|
67
67
|
}>;
|
|
68
68
|
}, {
|
|
@@ -10,12 +10,12 @@ declare const menuStyles: import("tailwind-variants").TVReturnType<{
|
|
|
10
10
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
11
11
|
item?: import("tailwind-variants").ClassValue;
|
|
12
12
|
trigger?: import("tailwind-variants").ClassValue;
|
|
13
|
-
popover?: import("tailwind-variants").ClassValue;
|
|
14
13
|
list?: import("tailwind-variants").ClassValue;
|
|
14
|
+
separator?: import("tailwind-variants").ClassValue;
|
|
15
15
|
itemLabel?: import("tailwind-variants").ClassValue;
|
|
16
|
+
popover?: import("tailwind-variants").ClassValue;
|
|
16
17
|
itemDescription?: import("tailwind-variants").ClassValue;
|
|
17
18
|
itemShortcut?: import("tailwind-variants").ClassValue;
|
|
18
|
-
separator?: import("tailwind-variants").ClassValue;
|
|
19
19
|
section?: import("tailwind-variants").ClassValue;
|
|
20
20
|
sectionLabel?: import("tailwind-variants").ClassValue;
|
|
21
21
|
};
|
|
@@ -25,12 +25,12 @@ declare const menuStyles: import("tailwind-variants").TVReturnType<{
|
|
|
25
25
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
26
26
|
item?: import("tailwind-variants").ClassValue;
|
|
27
27
|
trigger?: import("tailwind-variants").ClassValue;
|
|
28
|
-
popover?: import("tailwind-variants").ClassValue;
|
|
29
28
|
list?: import("tailwind-variants").ClassValue;
|
|
29
|
+
separator?: import("tailwind-variants").ClassValue;
|
|
30
30
|
itemLabel?: import("tailwind-variants").ClassValue;
|
|
31
|
+
popover?: import("tailwind-variants").ClassValue;
|
|
31
32
|
itemDescription?: import("tailwind-variants").ClassValue;
|
|
32
33
|
itemShortcut?: import("tailwind-variants").ClassValue;
|
|
33
|
-
separator?: import("tailwind-variants").ClassValue;
|
|
34
34
|
section?: import("tailwind-variants").ClassValue;
|
|
35
35
|
sectionLabel?: import("tailwind-variants").ClassValue;
|
|
36
36
|
};
|
|
@@ -51,12 +51,12 @@ declare const menuStyles: import("tailwind-variants").TVReturnType<{
|
|
|
51
51
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
52
52
|
item?: import("tailwind-variants").ClassValue;
|
|
53
53
|
trigger?: import("tailwind-variants").ClassValue;
|
|
54
|
-
popover?: import("tailwind-variants").ClassValue;
|
|
55
54
|
list?: import("tailwind-variants").ClassValue;
|
|
55
|
+
separator?: import("tailwind-variants").ClassValue;
|
|
56
56
|
itemLabel?: import("tailwind-variants").ClassValue;
|
|
57
|
+
popover?: import("tailwind-variants").ClassValue;
|
|
57
58
|
itemDescription?: import("tailwind-variants").ClassValue;
|
|
58
59
|
itemShortcut?: import("tailwind-variants").ClassValue;
|
|
59
|
-
separator?: import("tailwind-variants").ClassValue;
|
|
60
60
|
section?: import("tailwind-variants").ClassValue;
|
|
61
61
|
sectionLabel?: import("tailwind-variants").ClassValue;
|
|
62
62
|
};
|
|
@@ -10,7 +10,7 @@ declare const modalStyles: import("tailwind-variants").TVReturnType<{
|
|
|
10
10
|
size: VariantMap<"sm" | "md" | "lg" | "full", {
|
|
11
11
|
panel: string;
|
|
12
12
|
}>;
|
|
13
|
-
radius: VariantMap<"
|
|
13
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
14
14
|
panel: string;
|
|
15
15
|
}>;
|
|
16
16
|
}, {
|
|
@@ -25,7 +25,7 @@ declare const modalStyles: import("tailwind-variants").TVReturnType<{
|
|
|
25
25
|
size: VariantMap<"sm" | "md" | "lg" | "full", {
|
|
26
26
|
panel: string;
|
|
27
27
|
}>;
|
|
28
|
-
radius: VariantMap<"
|
|
28
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
29
29
|
panel: string;
|
|
30
30
|
}>;
|
|
31
31
|
}, {
|
|
@@ -40,7 +40,7 @@ declare const modalStyles: import("tailwind-variants").TVReturnType<{
|
|
|
40
40
|
size: VariantMap<"sm" | "md" | "lg" | "full", {
|
|
41
41
|
panel: string;
|
|
42
42
|
}>;
|
|
43
|
-
radius: VariantMap<"
|
|
43
|
+
radius: VariantMap<"sm" | "md" | "lg" | "none" | "full", {
|
|
44
44
|
panel: string;
|
|
45
45
|
}>;
|
|
46
46
|
}, {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NumberFieldProps } from "@novi-ui/core";
|
|
2
|
+
//#region src/number-field/number-field.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* 数値の入力。矢印キーと増減ボタンで `step` ずつ刻む。
|
|
5
|
+
*
|
|
6
|
+
* 増減ボタンは入力欄の右に並ぶ(Tactile は左右、Flatlay は罫線のセル)。
|
|
7
|
+
* 空欄は `NaN` ではなく `null` で `onChange` に渡す(ADR-B2)。
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <NumberField label="数量" defaultValue={1} minValue={0} step={1} />
|
|
11
|
+
*/
|
|
12
|
+
declare function NumberField({ variant, size, radius, label, placeholder, description, errorMessage, name, value, defaultValue, onChange, minValue, maxValue, step, formatOptions, onKeyDown, isDisabled, isReadOnly, isRequired, isInvalid, className, classNames, id }: NumberFieldProps): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { NumberField };
|
|
15
|
+
//# sourceMappingURL=number-field.d.mts.map
|