@ksojecki/purpose-ui 0.0.0-stage → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +79 -2
- package/assets/fonts/Karla[wght].ttf +0 -0
- package/assets/fonts/OFL.txt +93 -0
- package/dist/Alert-D-5k0maf.js +23 -0
- package/dist/Button-T8UI5igR.js +112 -0
- package/dist/Dropdown-BZKzAbKB.js +56 -0
- package/dist/Heading-CWDWXU_n.js +27 -0
- package/dist/IconButton-P7nSooA3.js +18 -0
- package/dist/Link-9mNYgEzY.js +36 -0
- package/dist/Paragraph-DFwfb2Yt.js +14 -0
- package/dist/Switch-CI8vMkGz.js +84 -0
- package/dist/actions/Button.d.ts +69 -0
- package/dist/actions/ButtonGroup.d.ts +20 -0
- package/dist/actions/IconActionButtons.d.ts +34 -0
- package/dist/actions/IconButton.d.ts +21 -0
- package/dist/actions/index.d.ts +10 -0
- package/dist/actions/index.js +41 -0
- package/dist/classNames-x6JVYA2t.js +5 -0
- package/dist/data/DataTable.d.ts +47 -0
- package/dist/data/Metric.d.ts +46 -0
- package/dist/data/Table.d.ts +33 -0
- package/dist/data/index.d.ts +8 -0
- package/dist/data/index.js +85 -0
- package/dist/feedback/Alert.d.ts +23 -0
- package/dist/feedback/Badge.d.ts +23 -0
- package/dist/feedback/ConfirmDeletePanel.d.ts +32 -0
- package/dist/feedback/EmptyState.d.ts +22 -0
- package/dist/feedback/Progress.d.ts +24 -0
- package/dist/feedback/Skeleton.d.ts +10 -0
- package/dist/feedback/Spinner.d.ts +16 -0
- package/dist/feedback/Toast.d.ts +48 -0
- package/dist/feedback/Tooltip.d.ts +21 -0
- package/dist/feedback/index.d.ts +15 -0
- package/dist/feedback/index.js +138 -0
- package/dist/forms/Checkbox.d.ts +16 -0
- package/dist/forms/DatePicker.d.ts +51 -0
- package/dist/forms/Field.d.ts +65 -0
- package/dist/forms/FileInput.d.ts +20 -0
- package/dist/forms/FilterBar.d.ts +21 -0
- package/dist/forms/FilterRow.d.ts +20 -0
- package/dist/forms/FormActions.d.ts +28 -0
- package/dist/forms/FormField.d.ts +39 -0
- package/dist/forms/Input.d.ts +20 -0
- package/dist/forms/Radio.d.ts +52 -0
- package/dist/forms/Range.d.ts +24 -0
- package/dist/forms/SegmentedControl.d.ts +33 -0
- package/dist/forms/Select.d.ts +23 -0
- package/dist/forms/Switch.d.ts +15 -0
- package/dist/forms/Textarea.d.ts +20 -0
- package/dist/forms/TimePicker.d.ts +29 -0
- package/dist/forms/index.d.ts +21 -0
- package/dist/forms/index.js +429 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +2 -0
- package/dist/icons-CMOARHwx.js +18 -0
- package/dist/internal/classNames.d.ts +1 -0
- package/dist/internal/purpose.d.ts +7 -0
- package/dist/layout/BottomSheet.d.ts +25 -0
- package/dist/layout/Card.d.ts +22 -0
- package/dist/layout/Disclosure.d.ts +18 -0
- package/dist/layout/Divider.d.ts +16 -0
- package/dist/layout/Page/Content.d.ts +11 -0
- package/dist/layout/Page/Page.d.ts +6 -0
- package/dist/layout/Page/index.d.ts +19 -0
- package/dist/layout/PageContainer.d.ts +18 -0
- package/dist/layout/PageHeader.d.ts +25 -0
- package/dist/layout/Section.d.ts +22 -0
- package/dist/layout/index.d.ts +13 -0
- package/dist/layout/index.js +173 -0
- package/dist/navigation/Dropdown.d.ts +47 -0
- package/dist/navigation/Link.d.ts +32 -0
- package/dist/navigation/Menu.d.ts +89 -0
- package/dist/navigation/NavMenu.d.ts +56 -0
- package/dist/navigation/index.d.ts +9 -0
- package/dist/navigation/index.js +128 -0
- package/dist/navigation/popoverFade.d.ts +5 -0
- package/dist/overlays/ConsentBanner/ConsentBanner.d.ts +35 -0
- package/dist/overlays/ConsentBanner/index.d.ts +1 -0
- package/dist/overlays/ConsentSettings/ConsentSettings.d.ts +48 -0
- package/dist/overlays/ConsentSettings/index.d.ts +1 -0
- package/dist/overlays/ModalWindow/ModalWindow.d.ts +60 -0
- package/dist/overlays/ModalWindow/index.d.ts +3 -0
- package/dist/overlays/index.d.ts +8 -0
- package/dist/overlays/index.js +195 -0
- package/dist/typography/Heading/Heading.d.ts +24 -0
- package/dist/typography/Heading/index.d.ts +1 -0
- package/dist/typography/Paragraph.d.ts +16 -0
- package/dist/typography/Prose.d.ts +17 -0
- package/dist/typography/index.d.ts +8 -0
- package/dist/typography/index.js +12 -0
- package/package.json +121 -4
- package/styles/budget.css +9 -0
- package/styles/generic.css +9 -0
- package/styles/roadsign.css +9 -0
- package/styles/traffic.css +9 -0
- package/theme.css +341 -0
- package/themes/budget.css +103 -0
- package/themes/generic.css +103 -0
- package/themes/roadsign.css +103 -0
- package/themes/traffic.css +103 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ReactNode, RefObject } from 'react';
|
|
2
|
+
export type DialogSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type ModalWindowApi = {
|
|
4
|
+
show: () => void;
|
|
5
|
+
close: () => void;
|
|
6
|
+
};
|
|
7
|
+
export type ModalWindowProps = {
|
|
8
|
+
api: RefObject<ModalWindowApi | null>;
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
title: string;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
closeLabel?: string;
|
|
14
|
+
/** Dialog width. Default `lg`. */
|
|
15
|
+
size?: DialogSize;
|
|
16
|
+
};
|
|
17
|
+
export type NativeDialogProps = {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
api?: RefObject<ModalWindowApi | null>;
|
|
20
|
+
open?: boolean;
|
|
21
|
+
saving?: boolean;
|
|
22
|
+
onClose?: () => void;
|
|
23
|
+
backdropLabel?: string;
|
|
24
|
+
boxClassName?: string;
|
|
25
|
+
labelledBy?: string;
|
|
26
|
+
/** Dialog width. Omit to keep the daisyUI default width of `boxClassName`. */
|
|
27
|
+
size?: DialogSize;
|
|
28
|
+
/** Heading rendered at the top of the box. Labels the dialog unless `labelledBy` is set. */
|
|
29
|
+
title?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Bare native `<dialog>` box. Control it with `open` or the `api` ref; while `saving` is true, Escape does not close it.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <NativeDialog backdropLabel="Close" onClose={close} open={isOpen} size="sm" title="Rename">
|
|
37
|
+
* <Input label="Name" />
|
|
38
|
+
* </NativeDialog>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const NativeDialog: ({ children, api, open, saving, onClose, backdropLabel, boxClassName, labelledBy, size, title, }: NativeDialogProps) => import("react").JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Modal dialog with a title, a close button and an actions row. Open and close it through the `api` ref.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const modal = useRef<ModalWindowApi | null>(null);
|
|
48
|
+
*
|
|
49
|
+
* <Button onClick={() => modal.current?.show()}>Edit</Button>
|
|
50
|
+
* <ModalWindow
|
|
51
|
+
* actions={<Button purpose="save">Save</Button>}
|
|
52
|
+
* api={modal}
|
|
53
|
+
* closeLabel="Close"
|
|
54
|
+
* title="Edit item"
|
|
55
|
+
* >
|
|
56
|
+
* <Paragraph>Edit the item details before saving.</Paragraph>
|
|
57
|
+
* </ModalWindow>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const ModalWindow: ({ actions, api, children, title, onClose, closeLabel, size, }: ModalWindowProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { t as e } from "../IconButton-P7nSooA3.js";
|
|
2
|
+
import { t } from "../classNames-x6JVYA2t.js";
|
|
3
|
+
import { t as n } from "../icons-CMOARHwx.js";
|
|
4
|
+
import { t as r } from "../Heading-CWDWXU_n.js";
|
|
5
|
+
import { t as i } from "../Button-T8UI5igR.js";
|
|
6
|
+
import { t as a } from "../Link-9mNYgEzY.js";
|
|
7
|
+
import { t as o } from "../Paragraph-DFwfb2Yt.js";
|
|
8
|
+
import { t as s } from "../Switch-CI8vMkGz.js";
|
|
9
|
+
import { useId as c, useLayoutEffect as l, useRef as u, useState as d } from "react";
|
|
10
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
// src/overlays/ModalWindow/ModalWindow.tsx
|
|
12
|
+
var m = {
|
|
13
|
+
sm: "w-11/12 max-w-md",
|
|
14
|
+
md: "w-11/12 max-w-2xl",
|
|
15
|
+
lg: "w-11/12 max-w-5xl"
|
|
16
|
+
}, h = ({ children: e, api: n, open: i, saving: a = !1, onClose: o, backdropLabel: s, boxClassName: d = "modal-box", labelledBy: h, size: g, title: y }) => {
|
|
17
|
+
let b = u(null), x = c();
|
|
18
|
+
return l(() => {
|
|
19
|
+
n && (n.current = {
|
|
20
|
+
show: () => _(b.current),
|
|
21
|
+
close: () => v(b.current)
|
|
22
|
+
});
|
|
23
|
+
}, [n]), l(() => {
|
|
24
|
+
if (i === void 0) return;
|
|
25
|
+
let e = b.current;
|
|
26
|
+
i && !e?.open ? _(e) : !i && e?.open && v(e);
|
|
27
|
+
}, [i]), /* @__PURE__ */ p("dialog", {
|
|
28
|
+
"aria-labelledby": h ?? (y ? x : void 0),
|
|
29
|
+
className: "modal",
|
|
30
|
+
onCancel: (e) => {
|
|
31
|
+
a ? e.preventDefault() : e.currentTarget.close();
|
|
32
|
+
},
|
|
33
|
+
onClose: () => {
|
|
34
|
+
(i === void 0 || i && !a) && o?.();
|
|
35
|
+
},
|
|
36
|
+
ref: b,
|
|
37
|
+
children: [/* @__PURE__ */ p("div", {
|
|
38
|
+
className: t(d, g ? m[g] : void 0, "animate-scale-in"),
|
|
39
|
+
children: [y ? /* @__PURE__ */ f(r, {
|
|
40
|
+
id: x,
|
|
41
|
+
level: 3,
|
|
42
|
+
children: y
|
|
43
|
+
}) : null, e]
|
|
44
|
+
}), s ? /* @__PURE__ */ f("form", {
|
|
45
|
+
className: "modal-backdrop",
|
|
46
|
+
method: "dialog",
|
|
47
|
+
children: /* @__PURE__ */ f("button", {
|
|
48
|
+
"aria-label": s,
|
|
49
|
+
disabled: a,
|
|
50
|
+
type: "submit",
|
|
51
|
+
children: s
|
|
52
|
+
})
|
|
53
|
+
}) : null]
|
|
54
|
+
});
|
|
55
|
+
}, g = ({ actions: t, api: r, children: i, title: a, onClose: o, closeLabel: s, size: c = "lg" }) => /* @__PURE__ */ p(h, {
|
|
56
|
+
api: r,
|
|
57
|
+
onClose: o,
|
|
58
|
+
size: c,
|
|
59
|
+
title: a,
|
|
60
|
+
children: [/* @__PURE__ */ f("div", {
|
|
61
|
+
className: "py-4",
|
|
62
|
+
children: i
|
|
63
|
+
}), /* @__PURE__ */ p("form", {
|
|
64
|
+
method: "dialog",
|
|
65
|
+
className: "modal-action",
|
|
66
|
+
children: [/* @__PURE__ */ f(e, {
|
|
67
|
+
className: "absolute right-4 top-4 rounded-full",
|
|
68
|
+
icon: /* @__PURE__ */ f(n.TbX, { className: "h-4 w-4" }),
|
|
69
|
+
label: s ?? "Close",
|
|
70
|
+
size: "sm",
|
|
71
|
+
type: "submit"
|
|
72
|
+
}), t ?? null]
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
function _(e) {
|
|
76
|
+
e !== null && (typeof e.showModal == "function" ? e.showModal() : e.setAttribute("open", ""));
|
|
77
|
+
}
|
|
78
|
+
function v(e) {
|
|
79
|
+
e !== null && (typeof e.close == "function" ? e.close() : e.removeAttribute("open"));
|
|
80
|
+
}
|
|
81
|
+
// src/overlays/ConsentBanner/ConsentBanner.tsx
|
|
82
|
+
var y = {
|
|
83
|
+
size: "md",
|
|
84
|
+
tone: "neutral",
|
|
85
|
+
variant: "outline"
|
|
86
|
+
};
|
|
87
|
+
function b({ title: e, body: t, policyLink: n, settingsLabel: s, rejectLabel: l, acceptLabel: u, onSettings: d, onReject: m, onAccept: h }) {
|
|
88
|
+
let g = c();
|
|
89
|
+
return /* @__PURE__ */ f("section", {
|
|
90
|
+
"aria-labelledby": g,
|
|
91
|
+
className: "fixed inset-x-0 bottom-0 z-[1200] border-t border-base-300 bg-base-100 px-4 pt-4 pb-[max(1rem,env(safe-area-inset-bottom))] shadow-lg",
|
|
92
|
+
children: /* @__PURE__ */ p("div", {
|
|
93
|
+
className: "mx-auto flex max-w-5xl flex-col gap-3 md:flex-row md:items-center md:justify-between",
|
|
94
|
+
children: [/* @__PURE__ */ p("div", {
|
|
95
|
+
className: "min-w-0 flex-1 space-y-1",
|
|
96
|
+
children: [/* @__PURE__ */ f(r, {
|
|
97
|
+
id: g,
|
|
98
|
+
level: 2,
|
|
99
|
+
size: 4,
|
|
100
|
+
children: e
|
|
101
|
+
}), /* @__PURE__ */ p(o, {
|
|
102
|
+
className: "text-sm",
|
|
103
|
+
tone: "muted",
|
|
104
|
+
children: [
|
|
105
|
+
t,
|
|
106
|
+
" ",
|
|
107
|
+
/* @__PURE__ */ f(a, {
|
|
108
|
+
className: "text-sm",
|
|
109
|
+
to: n.to,
|
|
110
|
+
children: n.label
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})]
|
|
114
|
+
}), /* @__PURE__ */ p("div", {
|
|
115
|
+
className: "flex flex-wrap items-center gap-2 md:shrink-0 md:flex-nowrap",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ f(i, {
|
|
118
|
+
onClick: d,
|
|
119
|
+
size: "md",
|
|
120
|
+
tone: "ghost",
|
|
121
|
+
children: s
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ f(i, {
|
|
124
|
+
...y,
|
|
125
|
+
onClick: m,
|
|
126
|
+
children: l
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ f(i, {
|
|
129
|
+
...y,
|
|
130
|
+
onClick: h,
|
|
131
|
+
children: u
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
})]
|
|
135
|
+
})
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
// src/overlays/ConsentSettings/ConsentSettings.tsx
|
|
139
|
+
function x({ open: t, rumEnabled: r, onSave: c, onAcceptAll: l, onClose: u, title: m, intro: g, necessaryLabel: _, necessaryDescription: v, rumLabel: y, rumDescription: b, saveLabel: x, acceptAllLabel: S, closeLabel: C, policyLink: w }) {
|
|
140
|
+
let [T, E] = d(r), [D, O] = d(t);
|
|
141
|
+
return t !== D && (O(t), t && E(r)), /* @__PURE__ */ p(h, {
|
|
142
|
+
backdropLabel: C,
|
|
143
|
+
onClose: u,
|
|
144
|
+
open: t,
|
|
145
|
+
size: "md",
|
|
146
|
+
title: m,
|
|
147
|
+
children: [/* @__PURE__ */ p("div", {
|
|
148
|
+
className: "space-y-4 py-4",
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ f(o, { children: g }),
|
|
151
|
+
/* @__PURE__ */ f(s, {
|
|
152
|
+
checked: !0,
|
|
153
|
+
disabled: !0,
|
|
154
|
+
hint: v,
|
|
155
|
+
label: _,
|
|
156
|
+
readOnly: !0
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ f(s, {
|
|
159
|
+
checked: T,
|
|
160
|
+
hint: b,
|
|
161
|
+
label: y,
|
|
162
|
+
onChange: (e) => E(e.currentTarget.checked)
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ f(a, {
|
|
165
|
+
className: "text-sm",
|
|
166
|
+
to: w.to,
|
|
167
|
+
children: w.label
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
}), /* @__PURE__ */ p("div", {
|
|
171
|
+
className: "flex flex-wrap justify-end gap-2",
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ f(e, {
|
|
174
|
+
className: "absolute right-4 top-4 rounded-full",
|
|
175
|
+
icon: /* @__PURE__ */ f(n.TbX, { className: "h-4 w-4" }),
|
|
176
|
+
label: C,
|
|
177
|
+
onClick: u,
|
|
178
|
+
size: "sm"
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ f(i, {
|
|
181
|
+
onClick: () => c(T),
|
|
182
|
+
tone: "neutral",
|
|
183
|
+
variant: "outline",
|
|
184
|
+
children: x
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ f(i, {
|
|
187
|
+
onClick: l,
|
|
188
|
+
tone: "primary",
|
|
189
|
+
children: S
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
})]
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
export { b as ConsentBanner, x as ConsentSettings, g as ModalWindow, h as NativeDialog };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export interface HeadingProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
level: HeadingLevel;
|
|
7
|
+
/** Visual size when it differs from the level, so the tag can keep the document outline. `label` is a small bold section label. Defaults to `level`. */
|
|
8
|
+
size?: HeadingLevel | 'label';
|
|
9
|
+
id?: string;
|
|
10
|
+
/** Full text shown on hover, for truncated headings. */
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Heading whose tag (`level`) and visual size (`size`) are set separately, so the document outline stays correct.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Heading level={2}>Invoices</Heading>
|
|
19
|
+
* <Heading level={3} size="label">
|
|
20
|
+
* Totals
|
|
21
|
+
* </Heading>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const Heading: ({ children, className, id, level, size, title }: HeadingProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Heading, type HeadingProps, type HeadingLevel } from './Heading';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type ParagraphTone = 'default' | 'muted';
|
|
3
|
+
export interface ParagraphProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
tone?: ParagraphTone;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Body text paragraph. `tone="muted"` for secondary text.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Paragraph tone="muted">Updated two hours ago.</Paragraph>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function Paragraph({ children, className, tone }: ParagraphProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ProseProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Long-form reading column: caps the line length at about 65 characters and sets rhythm for the headings, paragraphs and lists inside.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Prose>
|
|
12
|
+
* <h2>Terms</h2>
|
|
13
|
+
* <p>By using the service you agree to these terms.</p>
|
|
14
|
+
* </Prose>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function Prose({ children, className }: ProseProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as e } from "../Paragraph-DFwfb2Yt.js";
|
|
2
|
+
import { t } from "../Heading-CWDWXU_n.js";
|
|
3
|
+
import { t as n } from "../classNames-x6JVYA2t.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/typography/Prose.tsx
|
|
6
|
+
function i({ children: e, className: t }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: n("flex max-w-prose flex-col gap-4", "[&_h1]:font-bold [&_h1]:tracking-tight [&_h1]:text-balance", "[&_h2]:mt-6 [&_h2]:font-semibold [&_h2]:tracking-tight [&_h2]:text-balance", "[&_h3]:mt-4 [&_h3]:font-semibold", "[&_li]:leading-7 [&_p]:leading-7 [&_p]:text-pretty", "[&_ol]:list-decimal [&_ol]:pl-6 [&_ul]:list-disc [&_ul]:pl-6", t),
|
|
9
|
+
children: e
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export { t as Heading, e as Paragraph, i as Prose };
|
package/package.json
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ksojecki/purpose-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "React UI components and daisyUI themes with semantic purpose props.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ksojecki/purpose-ui.git"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"assets",
|
|
13
|
+
"theme.css",
|
|
14
|
+
"themes",
|
|
15
|
+
"styles",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"!**/*.tsbuildinfo"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
"./package.json": "./package.json",
|
|
25
|
+
"./theme.css": "./theme.css",
|
|
26
|
+
"./themes/*.css": "./themes/*.css",
|
|
27
|
+
"./styles/*.css": "./styles/*.css",
|
|
28
|
+
"./actions": {
|
|
29
|
+
"types": "./dist/actions/index.d.ts",
|
|
30
|
+
"import": "./dist/actions/index.js",
|
|
31
|
+
"default": "./dist/actions/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./data": {
|
|
34
|
+
"types": "./dist/data/index.d.ts",
|
|
35
|
+
"import": "./dist/data/index.js",
|
|
36
|
+
"default": "./dist/data/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./feedback": {
|
|
39
|
+
"types": "./dist/feedback/index.d.ts",
|
|
40
|
+
"import": "./dist/feedback/index.js",
|
|
41
|
+
"default": "./dist/feedback/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./forms": {
|
|
44
|
+
"types": "./dist/forms/index.d.ts",
|
|
45
|
+
"import": "./dist/forms/index.js",
|
|
46
|
+
"default": "./dist/forms/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./icons": {
|
|
49
|
+
"types": "./dist/icons/index.d.ts",
|
|
50
|
+
"import": "./dist/icons/index.js",
|
|
51
|
+
"default": "./dist/icons/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./layout": {
|
|
54
|
+
"types": "./dist/layout/index.d.ts",
|
|
55
|
+
"import": "./dist/layout/index.js",
|
|
56
|
+
"default": "./dist/layout/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./navigation": {
|
|
59
|
+
"types": "./dist/navigation/index.d.ts",
|
|
60
|
+
"import": "./dist/navigation/index.js",
|
|
61
|
+
"default": "./dist/navigation/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./overlays": {
|
|
64
|
+
"types": "./dist/overlays/index.d.ts",
|
|
65
|
+
"import": "./dist/overlays/index.js",
|
|
66
|
+
"default": "./dist/overlays/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./typography": {
|
|
69
|
+
"types": "./dist/typography/index.d.ts",
|
|
70
|
+
"import": "./dist/typography/index.js",
|
|
71
|
+
"default": "./dist/typography/index.js"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"access": "public"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "vite build && tsc -p tsconfig.lib.json",
|
|
79
|
+
"build:docs": "pnpm --filter @ksojecki/ui-docs build",
|
|
80
|
+
"changeset": "changeset",
|
|
81
|
+
"dev:docs": "pnpm --filter @ksojecki/ui-docs dev",
|
|
82
|
+
"format": "oxfmt --write",
|
|
83
|
+
"format:check": "oxfmt --check",
|
|
84
|
+
"lint": "oxlint src tests vite.config.mts docs/src docs/astro.config.mjs",
|
|
85
|
+
"test": "vitest run --config vite.config.mts",
|
|
86
|
+
"typecheck": "tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.spec.json"
|
|
87
|
+
},
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"cally": "0.9.2",
|
|
90
|
+
"react-icons": "^5.7.0"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@changesets/cli": "3.0.3",
|
|
94
|
+
"@testing-library/dom": "10.4.2",
|
|
95
|
+
"@testing-library/jest-dom": "7.0.1",
|
|
96
|
+
"@testing-library/react": "16.3.3",
|
|
97
|
+
"@types/node": "26.6.6",
|
|
98
|
+
"@types/react": "19.3.0",
|
|
99
|
+
"@types/react-dom": "19.3.0",
|
|
100
|
+
"@vitejs/plugin-react": "6.3.0",
|
|
101
|
+
"daisyui": "5.8.1",
|
|
102
|
+
"jsdom": "31.0.1",
|
|
103
|
+
"oxfmt": "0.79.0",
|
|
104
|
+
"oxlint": "1.94.0",
|
|
105
|
+
"react": "19.3.1",
|
|
106
|
+
"react-dom": "19.3.1",
|
|
107
|
+
"react-hook-form": "7.92.0",
|
|
108
|
+
"react-router": "8.5.2",
|
|
109
|
+
"tailwindcss": "4.3.5",
|
|
110
|
+
"tslib": "2.9.1",
|
|
111
|
+
"typescript": "7.0.2",
|
|
112
|
+
"vite": "8.3.8",
|
|
113
|
+
"vitest": "5.1.1"
|
|
114
|
+
},
|
|
115
|
+
"peerDependencies": {
|
|
116
|
+
"daisyui": "^5.6.0",
|
|
117
|
+
"react": "^19.0.0",
|
|
118
|
+
"react-dom": "^19.0.0",
|
|
119
|
+
"react-router": "^8.4.0",
|
|
120
|
+
"tailwindcss": "^4.0.0"
|
|
121
|
+
},
|
|
122
|
+
"packageManager": "pnpm@12.16.1"
|
|
123
|
+
}
|