@pienter/ui 0.2.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/CHANGELOG.md +64 -0
- package/CONVENTIONS.md +1499 -0
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/components/action/button/Button.astro +95 -0
- package/components/action/button/Button.vue +92 -0
- package/components/action/button/IconButton.astro +86 -0
- package/components/action/button/IconButton.vue +85 -0
- package/components/action/button/button.css +194 -0
- package/components/action/toggle/Toggle.vue +38 -0
- package/components/action/toggle/toggle.css +77 -0
- package/components/action/toggle-group/ToggleGroup.vue +67 -0
- package/components/action/toggle-group/toggle-group.css +78 -0
- package/components/display/avatar/Avatar.astro +17 -0
- package/components/display/avatar/Avatar.vue +30 -0
- package/components/display/avatar/AvatarStack.astro +9 -0
- package/components/display/avatar/AvatarStack.vue +11 -0
- package/components/display/avatar/avatar.css +58 -0
- package/components/display/badge/Badge.astro +15 -0
- package/components/display/badge/Badge.vue +23 -0
- package/components/display/badge/badge.css +56 -0
- package/components/display/empty/Empty.astro +9 -0
- package/components/display/empty/Empty.vue +11 -0
- package/components/display/empty/empty.css +39 -0
- package/components/display/icon/Icon.astro +52 -0
- package/components/display/icon/Icon.vue +57 -0
- package/components/display/icon/icon.css +47 -0
- package/components/feedback/alert/Alert.astro +52 -0
- package/components/feedback/alert/Alert.vue +60 -0
- package/components/feedback/alert/alert.css +78 -0
- package/components/feedback/progress/Progress.astro +68 -0
- package/components/feedback/progress/Progress.vue +82 -0
- package/components/feedback/progress/progress.css +68 -0
- package/components/feedback/skeleton/Skeleton.astro +32 -0
- package/components/feedback/skeleton/Skeleton.vue +39 -0
- package/components/feedback/skeleton/skeleton.css +56 -0
- package/components/feedback/spinner/Spinner.astro +25 -0
- package/components/feedback/spinner/Spinner.vue +36 -0
- package/components/feedback/spinner/spinner.css +91 -0
- package/components/feedback/toast/Toast.astro +50 -0
- package/components/feedback/toast/Toast.vue +74 -0
- package/components/feedback/toast/toast.css +128 -0
- package/components/form/checkbox/Checkbox.astro +79 -0
- package/components/form/checkbox/Checkbox.vue +95 -0
- package/components/form/checkbox/checkbox.css +59 -0
- package/components/form/combobox/Combobox.vue +508 -0
- package/components/form/combobox/combobox.css +110 -0
- package/components/form/date-input/DateInput.astro +105 -0
- package/components/form/date-input/DateInput.vue +121 -0
- package/components/form/date-input/date-input.css +19 -0
- package/components/form/form/Form.astro +106 -0
- package/components/form/form/Form.vue +181 -0
- package/components/form/form/form.css +46 -0
- package/components/form/input-otp/InputOTP.astro +147 -0
- package/components/form/input-otp/InputOTP.vue +209 -0
- package/components/form/input-otp/input-otp.css +52 -0
- package/components/form/label/Label.astro +13 -0
- package/components/form/label/Label.vue +20 -0
- package/components/form/label/label.css +11 -0
- package/components/form/number-field/NumberField.astro +142 -0
- package/components/form/number-field/NumberField.vue +155 -0
- package/components/form/number-field/number-field.css +115 -0
- package/components/form/radio-group/RadioGroup.astro +105 -0
- package/components/form/radio-group/RadioGroup.vue +110 -0
- package/components/form/radio-group/radio-group.css +114 -0
- package/components/form/radio-group/types.ts +14 -0
- package/components/form/select/Segmented.vue +36 -0
- package/components/form/select/Select.astro +105 -0
- package/components/form/select/Select.vue +109 -0
- package/components/form/select/select.css +96 -0
- package/components/form/slider/Slider.astro +205 -0
- package/components/form/slider/Slider.vue +321 -0
- package/components/form/slider/slider.css +115 -0
- package/components/form/switch/Switch.astro +75 -0
- package/components/form/switch/Switch.vue +89 -0
- package/components/form/switch/switch.css +64 -0
- package/components/form/tags-input/TagsInput.astro +153 -0
- package/components/form/tags-input/TagsInput.vue +207 -0
- package/components/form/tags-input/tags-input.css +128 -0
- package/components/form/text-input/TextInput.astro +84 -0
- package/components/form/text-input/TextInput.vue +99 -0
- package/components/form/text-input/text-input.css +165 -0
- package/components/form/textarea/Textarea.astro +86 -0
- package/components/form/textarea/Textarea.vue +102 -0
- package/components/form/textarea/textarea.css +25 -0
- package/components/layout/accordion/Accordion.vue +59 -0
- package/components/layout/accordion/accordion.css +87 -0
- package/components/layout/card/Card.astro +13 -0
- package/components/layout/card/Card.vue +20 -0
- package/components/layout/card/card.css +55 -0
- package/components/layout/collapsible/Collapsible.vue +77 -0
- package/components/layout/collapsible/collapsible.css +76 -0
- package/components/layout/separator/Separator.astro +31 -0
- package/components/layout/separator/Separator.vue +33 -0
- package/components/layout/separator/separator.css +27 -0
- package/components/layout/table/DataTable.vue +127 -0
- package/components/layout/table/Table.astro +116 -0
- package/components/layout/table/Table.vue +146 -0
- package/components/layout/table/TableRow.vue +59 -0
- package/components/layout/table/table.css +201 -0
- package/components/layout/table/types.ts +35 -0
- package/components/layout/table/useTable.ts +7 -0
- package/components/navigation/breadcrumb/Breadcrumb.astro +36 -0
- package/components/navigation/breadcrumb/Breadcrumb.vue +36 -0
- package/components/navigation/breadcrumb/breadcrumb.css +37 -0
- package/components/navigation/navbar/Navbar.astro +62 -0
- package/components/navigation/navbar/Navbar.vue +50 -0
- package/components/navigation/navbar/navbar.css +77 -0
- package/components/navigation/pagination/Pagination.vue +107 -0
- package/components/navigation/pagination/pagination.css +53 -0
- package/components/navigation/sidebar/Sidebar.astro +132 -0
- package/components/navigation/sidebar/Sidebar.vue +174 -0
- package/components/navigation/sidebar/SidebarItemRender.astro +83 -0
- package/components/navigation/sidebar/SidebarItemRender.vue +98 -0
- package/components/navigation/sidebar/sidebar.css +303 -0
- package/components/navigation/sidebar/types.ts +72 -0
- package/components/navigation/tabs/Tabs.vue +84 -0
- package/components/navigation/tabs/tabs.css +39 -0
- package/components/overlay/alert-dialog/AlertDialog.astro +112 -0
- package/components/overlay/alert-dialog/AlertDialog.vue +117 -0
- package/components/overlay/alert-dialog/alert-dialog.css +57 -0
- package/components/overlay/command/Command.vue +356 -0
- package/components/overlay/command/command.css +179 -0
- package/components/overlay/dropdown-menu/DropdownMenu.vue +143 -0
- package/components/overlay/dropdown-menu/dropdown-menu.css +120 -0
- package/components/overlay/modal/Modal.astro +66 -0
- package/components/overlay/modal/Modal.vue +85 -0
- package/components/overlay/modal/modal.css +60 -0
- package/components/overlay/popover/Popover.vue +113 -0
- package/components/overlay/popover/popover.css +53 -0
- package/components/overlay/sheet/Sheet.vue +88 -0
- package/components/overlay/sheet/sheet.css +108 -0
- package/components/overlay/tooltip/Tooltip.vue +210 -0
- package/components/overlay/tooltip/tooltip.css +50 -0
- package/composables/useUrlSort.ts +48 -0
- package/icons/alert-triangle.ts +1 -0
- package/icons/arrow-down.ts +1 -0
- package/icons/arrow-up-down.ts +5 -0
- package/icons/arrow-up.ts +1 -0
- package/icons/bell.ts +1 -0
- package/icons/check.ts +1 -0
- package/icons/chevron-down.ts +1 -0
- package/icons/chevron-left.ts +1 -0
- package/icons/chevron-right.ts +1 -0
- package/icons/chevron-up-down.ts +5 -0
- package/icons/chevron-up.ts +1 -0
- package/icons/circle-alert.ts +1 -0
- package/icons/circle-check.ts +1 -0
- package/icons/clipboard.ts +1 -0
- package/icons/download.ts +1 -0
- package/icons/edit.ts +1 -0
- package/icons/external-link.ts +1 -0
- package/icons/eye.ts +1 -0
- package/icons/file.ts +1 -0
- package/icons/filter.ts +1 -0
- package/icons/folder.ts +1 -0
- package/icons/image.ts +1 -0
- package/icons/inbox.ts +1 -0
- package/icons/index.ts +91 -0
- package/icons/info.ts +1 -0
- package/icons/layers.ts +1 -0
- package/icons/link-2.ts +1 -0
- package/icons/list.ts +1 -0
- package/icons/loader.ts +3 -0
- package/icons/menu.ts +1 -0
- package/icons/more-horizontal.ts +1 -0
- package/icons/more-vertical.ts +1 -0
- package/icons/plus-circle.ts +1 -0
- package/icons/plus.ts +1 -0
- package/icons/save.ts +1 -0
- package/icons/search.ts +1 -0
- package/icons/send.ts +1 -0
- package/icons/settings.ts +1 -0
- package/icons/tool.ts +1 -0
- package/icons/trash-2.ts +1 -0
- package/icons/trash.ts +1 -0
- package/icons/upload-cloud.ts +1 -0
- package/icons/upload.ts +1 -0
- package/icons/x.ts +1 -0
- package/package.json +150 -0
- package/styles/0-settings/colors.css +241 -0
- package/styles/0-settings/index.css +5 -0
- package/styles/0-settings/layout.css +52 -0
- package/styles/0-settings/motion.css +11 -0
- package/styles/0-settings/spacing.css +15 -0
- package/styles/0-settings/typography.css +37 -0
- package/styles/0-utils/index.css +1 -0
- package/styles/1-reset/index.css +1 -0
- package/styles/1-reset/reset.css +26 -0
- package/styles/2-base/base.css +42 -0
- package/styles/2-base/forms.css +23 -0
- package/styles/2-base/index.css +2 -0
- package/styles/3-layout/container.css +57 -0
- package/styles/3-layout/index.css +2 -0
- package/styles/3-layout/section.css +17 -0
- package/styles/5-utilities/accessibility.css +13 -0
- package/styles/5-utilities/index.css +2 -0
- package/styles/5-utilities/text.css +5 -0
- package/styles/main.css +8 -0
- package/styles/styles.d.ts +6 -0
- package/utils/a11y/focus.ts +68 -0
- package/utils/a11y/id.ts +10 -0
- package/utils/a11y/index.ts +9 -0
- package/utils/a11y/keyboard.ts +32 -0
- package/utils/a11y/live-region.ts +36 -0
- package/utils/controllers/dialog.ts +205 -0
- package/utils/controllers/disclosure.ts +117 -0
- package/utils/controllers/form.ts +524 -0
- package/utils/controllers/index.ts +39 -0
- package/utils/controllers/menu.ts +255 -0
- package/utils/controllers/number-field.ts +103 -0
- package/utils/controllers/otp.ts +252 -0
- package/utils/controllers/popover.ts +434 -0
- package/utils/controllers/sidebar.ts +610 -0
- package/utils/controllers/slider.ts +336 -0
- package/utils/controllers/tags-input.ts +255 -0
- package/utils/controllers/toast.ts +426 -0
- package/utils/dom/index.ts +1 -0
- package/utils/dom/scroll-lock.ts +48 -0
- package/utils/index.ts +3 -0
- package/utils/sort/index.ts +3 -0
- package/utils/sort/serialize.ts +19 -0
- package/utils/sort/state.ts +11 -0
- package/utils/sort/types.ts +15 -0
- package/utils/validation/form.ts +93 -0
- package/utils/validation/index.ts +13 -0
- package/utils/validation/rules.ts +31 -0
package/icons/index.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import info from './info.js';
|
|
2
|
+
import check from './check.js';
|
|
3
|
+
import alertTriangle from './alert-triangle.js';
|
|
4
|
+
import x from './x.js';
|
|
5
|
+
import chevronDown from './chevron-down.js';
|
|
6
|
+
import chevronLeft from './chevron-left.js';
|
|
7
|
+
import chevronRight from './chevron-right.js';
|
|
8
|
+
import arrowUp from './arrow-up.js';
|
|
9
|
+
import arrowDown from './arrow-down.js';
|
|
10
|
+
import arrowUpDown from './arrow-up-down.js';
|
|
11
|
+
import search from './search.js';
|
|
12
|
+
import plus from './plus.js';
|
|
13
|
+
import eye from './eye.js';
|
|
14
|
+
import trash2 from './trash-2.js';
|
|
15
|
+
import edit from './edit.js';
|
|
16
|
+
import moreHorizontal from './more-horizontal.js';
|
|
17
|
+
import moreVertical from './more-vertical.js';
|
|
18
|
+
import menu from './menu.js';
|
|
19
|
+
import circleCheck from './circle-check.js';
|
|
20
|
+
import circleAlert from './circle-alert.js';
|
|
21
|
+
import loader from './loader.js';
|
|
22
|
+
import chevronUp from './chevron-up.js';
|
|
23
|
+
import chevronUpDown from './chevron-up-down.js';
|
|
24
|
+
import bell from './bell.js';
|
|
25
|
+
import clipboard from './clipboard.js';
|
|
26
|
+
import download from './download.js';
|
|
27
|
+
import upload from './upload.js';
|
|
28
|
+
import uploadCloud from './upload-cloud.js';
|
|
29
|
+
import externalLink from './external-link.js';
|
|
30
|
+
import file from './file.js';
|
|
31
|
+
import filter from './filter.js';
|
|
32
|
+
import folder from './folder.js';
|
|
33
|
+
import image from './image.js';
|
|
34
|
+
import inbox from './inbox.js';
|
|
35
|
+
import layers from './layers.js';
|
|
36
|
+
import link2 from './link-2.js';
|
|
37
|
+
import list from './list.js';
|
|
38
|
+
import plusCircle from './plus-circle.js';
|
|
39
|
+
import save from './save.js';
|
|
40
|
+
import send from './send.js';
|
|
41
|
+
import settings from './settings.js';
|
|
42
|
+
import tool from './tool.js';
|
|
43
|
+
import trash from './trash.js';
|
|
44
|
+
|
|
45
|
+
export const icons = {
|
|
46
|
+
info: info,
|
|
47
|
+
check: check,
|
|
48
|
+
'alert-triangle': alertTriangle,
|
|
49
|
+
x: x,
|
|
50
|
+
'chevron-down': chevronDown,
|
|
51
|
+
'chevron-left': chevronLeft,
|
|
52
|
+
'chevron-right': chevronRight,
|
|
53
|
+
'arrow-up': arrowUp,
|
|
54
|
+
'arrow-down': arrowDown,
|
|
55
|
+
'arrow-up-down': arrowUpDown,
|
|
56
|
+
search: search,
|
|
57
|
+
plus: plus,
|
|
58
|
+
eye: eye,
|
|
59
|
+
'trash-2': trash2,
|
|
60
|
+
edit: edit,
|
|
61
|
+
'more-horizontal': moreHorizontal,
|
|
62
|
+
'more-vertical': moreVertical,
|
|
63
|
+
menu: menu,
|
|
64
|
+
'circle-check': circleCheck,
|
|
65
|
+
'circle-alert': circleAlert,
|
|
66
|
+
loader: loader,
|
|
67
|
+
'chevron-up': chevronUp,
|
|
68
|
+
'chevron-up-down': chevronUpDown,
|
|
69
|
+
bell: bell,
|
|
70
|
+
clipboard: clipboard,
|
|
71
|
+
download: download,
|
|
72
|
+
upload: upload,
|
|
73
|
+
'upload-cloud': uploadCloud,
|
|
74
|
+
'external-link': externalLink,
|
|
75
|
+
file: file,
|
|
76
|
+
filter: filter,
|
|
77
|
+
folder: folder,
|
|
78
|
+
image: image,
|
|
79
|
+
inbox: inbox,
|
|
80
|
+
layers: layers,
|
|
81
|
+
'link-2': link2,
|
|
82
|
+
list: list,
|
|
83
|
+
'plus-circle': plusCircle,
|
|
84
|
+
save: save,
|
|
85
|
+
send: send,
|
|
86
|
+
settings: settings,
|
|
87
|
+
tool: tool,
|
|
88
|
+
trash: trash,
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
export type IconName = keyof typeof icons;
|
package/icons/info.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4m0-4h.01"/></svg>';
|
package/icons/layers.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M12 2 2 7l10 5 10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>';
|
package/icons/link-2.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3m-1 5h8"/></svg>';
|
package/icons/list.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg>';
|
package/icons/loader.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Eight spokes as separate paths, clockwise from 12 o'clock — spinner.css ramps their opacity
|
|
2
|
+
// with :nth-child(); merging them into one `d` (svgo's mergePaths) or reordering breaks the ramp.
|
|
3
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M12 2v4"/><path d="m16.24 7.76 2.83-2.83"/><path d="M18 12h4"/><path d="m16.24 16.24 2.83 2.83"/><path d="M12 18v4"/><path d="m4.93 19.07 2.83-2.83"/><path d="M2 12h4"/><path d="m4.93 4.93 2.83 2.83"/></svg>';
|
package/icons/menu.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M4 5h16M4 12h16M4 19h16"/></svg>';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M12 8v8m-4-4h8"/></svg>';
|
package/icons/plus.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M5 12h14m-7-7v14"/></svg>';
|
package/icons/save.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2"/><path d="M17 21v-8H7v8M7 3v5h8"/></svg>';
|
package/icons/search.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.34-4.34"/></svg>';
|
package/icons/send.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M22 2 11 13M22 2l-7 20-4-9-9-4z"/></svg>';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1"/></svg>';
|
package/icons/tool.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>';
|
package/icons/trash-2.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M3 6h18m-2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m-6 5v6m4-6v6"/></svg>';
|
package/icons/trash.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M3 6h18m-2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="m16 16-4-4-4 4m4-4v9"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>';
|
package/icons/upload.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4m14-7-5-5-5 5m5-5v12"/></svg>';
|
package/icons/x.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="var(--pui-icon-clr, currentColor)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M18 6 6 18M6 6l12 12"/></svg>';
|
package/package.json
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pienter/ui",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Shared Pienter UI components, styles, icons, and browser utilities.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://git.pienter.space/pienter/ui.git",
|
|
10
|
+
"directory": "packages/ui"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://git.pienter.space/pienter/ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://git.pienter.space/pienter/ui#readme",
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css",
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
"./package.json": "./package.json",
|
|
25
|
+
"./styles": {
|
|
26
|
+
"types": "./styles/styles.d.ts",
|
|
27
|
+
"default": "./styles/main.css"
|
|
28
|
+
},
|
|
29
|
+
"./styles/*": "./styles/*",
|
|
30
|
+
"./components/Button.astro": "./components/action/button/Button.astro",
|
|
31
|
+
"./components/Button.vue": "./components/action/button/Button.vue",
|
|
32
|
+
"./components/IconButton.astro": "./components/action/button/IconButton.astro",
|
|
33
|
+
"./components/IconButton.vue": "./components/action/button/IconButton.vue",
|
|
34
|
+
"./components/Toggle.vue": "./components/action/toggle/Toggle.vue",
|
|
35
|
+
"./components/ToggleGroup.vue": "./components/action/toggle-group/ToggleGroup.vue",
|
|
36
|
+
"./components/Avatar.astro": "./components/display/avatar/Avatar.astro",
|
|
37
|
+
"./components/Avatar.vue": "./components/display/avatar/Avatar.vue",
|
|
38
|
+
"./components/AvatarStack.astro": "./components/display/avatar/AvatarStack.astro",
|
|
39
|
+
"./components/AvatarStack.vue": "./components/display/avatar/AvatarStack.vue",
|
|
40
|
+
"./components/Badge.astro": "./components/display/badge/Badge.astro",
|
|
41
|
+
"./components/Badge.vue": "./components/display/badge/Badge.vue",
|
|
42
|
+
"./components/Empty.astro": "./components/display/empty/Empty.astro",
|
|
43
|
+
"./components/Empty.vue": "./components/display/empty/Empty.vue",
|
|
44
|
+
"./components/Icon.astro": "./components/display/icon/Icon.astro",
|
|
45
|
+
"./components/Icon.vue": "./components/display/icon/Icon.vue",
|
|
46
|
+
"./components/Alert.astro": "./components/feedback/alert/Alert.astro",
|
|
47
|
+
"./components/Alert.vue": "./components/feedback/alert/Alert.vue",
|
|
48
|
+
"./components/Progress.astro": "./components/feedback/progress/Progress.astro",
|
|
49
|
+
"./components/Progress.vue": "./components/feedback/progress/Progress.vue",
|
|
50
|
+
"./components/Skeleton.astro": "./components/feedback/skeleton/Skeleton.astro",
|
|
51
|
+
"./components/Skeleton.vue": "./components/feedback/skeleton/Skeleton.vue",
|
|
52
|
+
"./components/Spinner.astro": "./components/feedback/spinner/Spinner.astro",
|
|
53
|
+
"./components/Spinner.vue": "./components/feedback/spinner/Spinner.vue",
|
|
54
|
+
"./components/Toast.astro": "./components/feedback/toast/Toast.astro",
|
|
55
|
+
"./components/Toast.vue": "./components/feedback/toast/Toast.vue",
|
|
56
|
+
"./components/Checkbox.astro": "./components/form/checkbox/Checkbox.astro",
|
|
57
|
+
"./components/Checkbox.vue": "./components/form/checkbox/Checkbox.vue",
|
|
58
|
+
"./components/Combobox.vue": "./components/form/combobox/Combobox.vue",
|
|
59
|
+
"./components/DateInput.astro": "./components/form/date-input/DateInput.astro",
|
|
60
|
+
"./components/DateInput.vue": "./components/form/date-input/DateInput.vue",
|
|
61
|
+
"./components/Form.astro": "./components/form/form/Form.astro",
|
|
62
|
+
"./components/Form.vue": "./components/form/form/Form.vue",
|
|
63
|
+
"./components/InputOTP.astro": "./components/form/input-otp/InputOTP.astro",
|
|
64
|
+
"./components/InputOTP.vue": "./components/form/input-otp/InputOTP.vue",
|
|
65
|
+
"./components/Label.astro": "./components/form/label/Label.astro",
|
|
66
|
+
"./components/Label.vue": "./components/form/label/Label.vue",
|
|
67
|
+
"./components/NumberField.astro": "./components/form/number-field/NumberField.astro",
|
|
68
|
+
"./components/NumberField.vue": "./components/form/number-field/NumberField.vue",
|
|
69
|
+
"./components/RadioGroup.astro": "./components/form/radio-group/RadioGroup.astro",
|
|
70
|
+
"./components/RadioGroup.vue": "./components/form/radio-group/RadioGroup.vue",
|
|
71
|
+
"./components/RadioGroup.types": "./components/form/radio-group/types.ts",
|
|
72
|
+
"./components/Segmented.vue": "./components/form/select/Segmented.vue",
|
|
73
|
+
"./components/Select.astro": "./components/form/select/Select.astro",
|
|
74
|
+
"./components/Select.vue": "./components/form/select/Select.vue",
|
|
75
|
+
"./components/Slider.astro": "./components/form/slider/Slider.astro",
|
|
76
|
+
"./components/Slider.vue": "./components/form/slider/Slider.vue",
|
|
77
|
+
"./components/Switch.astro": "./components/form/switch/Switch.astro",
|
|
78
|
+
"./components/Switch.vue": "./components/form/switch/Switch.vue",
|
|
79
|
+
"./components/TagsInput.astro": "./components/form/tags-input/TagsInput.astro",
|
|
80
|
+
"./components/TagsInput.vue": "./components/form/tags-input/TagsInput.vue",
|
|
81
|
+
"./components/TextInput.astro": "./components/form/text-input/TextInput.astro",
|
|
82
|
+
"./components/TextInput.vue": "./components/form/text-input/TextInput.vue",
|
|
83
|
+
"./components/Textarea.astro": "./components/form/textarea/Textarea.astro",
|
|
84
|
+
"./components/Textarea.vue": "./components/form/textarea/Textarea.vue",
|
|
85
|
+
"./components/Accordion.vue": "./components/layout/accordion/Accordion.vue",
|
|
86
|
+
"./components/Card.astro": "./components/layout/card/Card.astro",
|
|
87
|
+
"./components/Card.vue": "./components/layout/card/Card.vue",
|
|
88
|
+
"./components/Collapsible.vue": "./components/layout/collapsible/Collapsible.vue",
|
|
89
|
+
"./components/Separator.astro": "./components/layout/separator/Separator.astro",
|
|
90
|
+
"./components/Separator.vue": "./components/layout/separator/Separator.vue",
|
|
91
|
+
"./components/Table.astro": "./components/layout/table/Table.astro",
|
|
92
|
+
"./components/Table.vue": "./components/layout/table/Table.vue",
|
|
93
|
+
"./components/TableRow.vue": "./components/layout/table/TableRow.vue",
|
|
94
|
+
"./components/DataTable.vue": "./components/layout/table/DataTable.vue",
|
|
95
|
+
"./components/Table.types": "./components/layout/table/types.ts",
|
|
96
|
+
"./components/Breadcrumb.astro": "./components/navigation/breadcrumb/Breadcrumb.astro",
|
|
97
|
+
"./components/Breadcrumb.vue": "./components/navigation/breadcrumb/Breadcrumb.vue",
|
|
98
|
+
"./components/Navbar.astro": "./components/navigation/navbar/Navbar.astro",
|
|
99
|
+
"./components/Navbar.vue": "./components/navigation/navbar/Navbar.vue",
|
|
100
|
+
"./components/Pagination.vue": "./components/navigation/pagination/Pagination.vue",
|
|
101
|
+
"./components/Sidebar.astro": "./components/navigation/sidebar/Sidebar.astro",
|
|
102
|
+
"./components/Sidebar.vue": "./components/navigation/sidebar/Sidebar.vue",
|
|
103
|
+
"./components/Sidebar.types": "./components/navigation/sidebar/types.ts",
|
|
104
|
+
"./components/Tabs.vue": "./components/navigation/tabs/Tabs.vue",
|
|
105
|
+
"./components/AlertDialog.astro": "./components/overlay/alert-dialog/AlertDialog.astro",
|
|
106
|
+
"./components/AlertDialog.vue": "./components/overlay/alert-dialog/AlertDialog.vue",
|
|
107
|
+
"./components/Command.vue": "./components/overlay/command/Command.vue",
|
|
108
|
+
"./components/DropdownMenu.vue": "./components/overlay/dropdown-menu/DropdownMenu.vue",
|
|
109
|
+
"./components/Modal.astro": "./components/overlay/modal/Modal.astro",
|
|
110
|
+
"./components/Modal.vue": "./components/overlay/modal/Modal.vue",
|
|
111
|
+
"./components/Popover.vue": "./components/overlay/popover/Popover.vue",
|
|
112
|
+
"./components/Sheet.vue": "./components/overlay/sheet/Sheet.vue",
|
|
113
|
+
"./components/Tooltip.vue": "./components/overlay/tooltip/Tooltip.vue",
|
|
114
|
+
"./composables/useUrlSort": "./composables/useUrlSort.ts",
|
|
115
|
+
"./icons": "./icons/index.ts",
|
|
116
|
+
"./icons/*": "./icons/*",
|
|
117
|
+
"./utils": "./utils/index.ts",
|
|
118
|
+
"./utils/*": "./utils/*"
|
|
119
|
+
},
|
|
120
|
+
"files": [
|
|
121
|
+
"styles",
|
|
122
|
+
"components",
|
|
123
|
+
"composables",
|
|
124
|
+
"icons",
|
|
125
|
+
"utils",
|
|
126
|
+
"CONVENTIONS.md",
|
|
127
|
+
"CHANGELOG.md",
|
|
128
|
+
"README.md",
|
|
129
|
+
"!components/**/AUDIT.md"
|
|
130
|
+
],
|
|
131
|
+
"peerDependencies": {
|
|
132
|
+
"astro": ">=5.0.0",
|
|
133
|
+
"vue": ">=3.5.0",
|
|
134
|
+
"vue-router": ">=4.0.0"
|
|
135
|
+
},
|
|
136
|
+
"peerDependenciesMeta": {
|
|
137
|
+
"astro": {
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
"vue": {
|
|
141
|
+
"optional": true
|
|
142
|
+
},
|
|
143
|
+
"vue-router": {
|
|
144
|
+
"optional": true
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"engines": {
|
|
148
|
+
"node": ">=22.12.0"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Color Tokens
|
|
3
|
+
==========================================================================
|
|
4
|
+
Two layers: per-theme primitives (--clr-*) and a theme-agnostic semantic
|
|
5
|
+
layer. Every primitive name is redefined in each theme block, so the
|
|
6
|
+
semantic layer never needs light-dark() — it names a role once and the
|
|
7
|
+
theme underneath decides what that role looks like.
|
|
8
|
+
|
|
9
|
+
PRIMITIVES are named by intensity, relative to the theme they live in.
|
|
10
|
+
"strong" means more emphatic here, not darker: in the light theme it steps
|
|
11
|
+
down in lightness, in the dark theme it steps up.
|
|
12
|
+
|
|
13
|
+
Neutrals, front-most surface to furthest back, then up through the ink:
|
|
14
|
+
--clr-base panels and cards (the front-most surface)
|
|
15
|
+
--clr-mantle the page behind them
|
|
16
|
+
--clr-surface-0 accent panels, hover fills, table stripes
|
|
17
|
+
--clr-surface-1 hairline borders
|
|
18
|
+
--clr-overlay input borders (clears 3:1)
|
|
19
|
+
--clr-subtext secondary text (clears 4.5:1)
|
|
20
|
+
--clr-text body text
|
|
21
|
+
--clr-inverse text sitting on a fill or an inverted bar
|
|
22
|
+
--clr-shade inverted bars and scrims — dark in both themes
|
|
23
|
+
|
|
24
|
+
Accents split by job, because one value cannot do both:
|
|
25
|
+
--clr-<hue>-soft a wash to sit behind text
|
|
26
|
+
--clr-<hue>-fill a fill solid enough to carry --clr-inverse
|
|
27
|
+
--clr-<hue>-fill-strong the same fill, one step up
|
|
28
|
+
--clr-<hue>-fg reads against --clr-base and --clr-surface-0
|
|
29
|
+
--clr-<hue>-fg-strong the same foreground, one step up
|
|
30
|
+
A hue only defines the rungs it is used for. In the light theme
|
|
31
|
+
-fill-strong and -fg land on the same value; in the dark theme they are
|
|
32
|
+
far apart, which is the whole reason the two ladders are separate.
|
|
33
|
+
|
|
34
|
+
SEMANTIC tokens are named by role, and derived ones by the state that
|
|
35
|
+
triggers them (--bg-clr-brand-hover), never by intensity — a hover goes
|
|
36
|
+
darker in light and lighter in dark, so only the state name stays true in
|
|
37
|
+
both themes.
|
|
38
|
+
|
|
39
|
+
Verified: every -fg clears WCAG AA (4.5:1) against --clr-base,
|
|
40
|
+
--clr-mantle, --clr-surface-0 and its own -soft; every -fill and
|
|
41
|
+
-fill-strong clears 4.5:1 against its ink; --clr-overlay clears 3:1.
|
|
42
|
+
|
|
43
|
+
Components consume the semantic layer, never the primitives directly.
|
|
44
|
+
========================================================================== */
|
|
45
|
+
|
|
46
|
+
:root,
|
|
47
|
+
:root[data-theme='light'] {
|
|
48
|
+
color-scheme: light;
|
|
49
|
+
|
|
50
|
+
/* neutral */
|
|
51
|
+
--clr-base: hsl(220 23% 98%);
|
|
52
|
+
--clr-mantle: hsl(220 22% 95.5%);
|
|
53
|
+
--clr-surface-0: hsl(222 20% 91%);
|
|
54
|
+
--clr-surface-1: hsl(225 14% 82%);
|
|
55
|
+
--clr-overlay: hsl(231 13% 54%);
|
|
56
|
+
--clr-subtext: hsl(233 11% 40%);
|
|
57
|
+
--clr-text: hsl(237 16% 27%);
|
|
58
|
+
--clr-inverse: hsl(220 23% 98%);
|
|
59
|
+
--clr-shade: hsl(237 16% 27%);
|
|
60
|
+
|
|
61
|
+
/* blue — brand */
|
|
62
|
+
--clr-blue-soft: hsl(220 90% 94%);
|
|
63
|
+
--clr-blue-fill: hsl(220 88% 46%);
|
|
64
|
+
--clr-blue-fill-strong: hsl(220 86% 39%);
|
|
65
|
+
--clr-blue-fg: hsl(220 86% 39%);
|
|
66
|
+
--clr-blue-fg-strong: hsl(220 84% 30%);
|
|
67
|
+
|
|
68
|
+
/* cyan — links */
|
|
69
|
+
--clr-cyan-soft: hsl(190 80% 92%);
|
|
70
|
+
--clr-cyan-fg: hsl(190 86% 28%);
|
|
71
|
+
--clr-cyan-fg-strong: hsl(190 88% 22%);
|
|
72
|
+
|
|
73
|
+
/* green — success */
|
|
74
|
+
--clr-green-soft: hsl(150 60% 91%);
|
|
75
|
+
--clr-green-fill: hsl(150 80% 27%);
|
|
76
|
+
--clr-green-fg: hsl(150 82% 24%);
|
|
77
|
+
|
|
78
|
+
/* amber — warning */
|
|
79
|
+
--clr-amber-soft: hsl(36 92% 92%);
|
|
80
|
+
--clr-amber-fill: hsl(36 92% 52%);
|
|
81
|
+
--clr-amber-fg: hsl(36 84% 30%);
|
|
82
|
+
|
|
83
|
+
/* red — danger */
|
|
84
|
+
--clr-red-soft: hsl(348 90% 95%);
|
|
85
|
+
--clr-red-fill: hsl(348 80% 45%);
|
|
86
|
+
--clr-red-fill-strong: hsl(348 82% 38%);
|
|
87
|
+
--clr-red-fg: hsl(348 82% 38%);
|
|
88
|
+
--clr-red-fg-strong: hsl(348 84% 30%);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (prefers-color-scheme: dark) {
|
|
92
|
+
:root:not([data-theme]) {
|
|
93
|
+
color-scheme: dark;
|
|
94
|
+
|
|
95
|
+
/* neutral */
|
|
96
|
+
--clr-base: hsl(240 20% 18%);
|
|
97
|
+
--clr-mantle: hsl(240 21% 11%);
|
|
98
|
+
--clr-surface-0: hsl(237 16% 27%);
|
|
99
|
+
--clr-surface-1: hsl(234 13% 36%);
|
|
100
|
+
--clr-overlay: hsl(228 12% 68%);
|
|
101
|
+
--clr-subtext: hsl(225 14% 82%);
|
|
102
|
+
--clr-text: hsl(220 22% 95.5%);
|
|
103
|
+
--clr-inverse: hsl(220 22% 95.5%);
|
|
104
|
+
--clr-shade: hsl(240 21% 8%);
|
|
105
|
+
|
|
106
|
+
/* blue — brand */
|
|
107
|
+
--clr-blue-soft: hsl(220 55% 22%);
|
|
108
|
+
--clr-blue-fill: hsl(220 88% 41%);
|
|
109
|
+
--clr-blue-fill-strong: hsl(220 90% 50%);
|
|
110
|
+
--clr-blue-fg: hsl(220 92% 74%);
|
|
111
|
+
--clr-blue-fg-strong: hsl(220 94% 84%);
|
|
112
|
+
|
|
113
|
+
/* cyan — links */
|
|
114
|
+
--clr-cyan-soft: hsl(190 45% 20%);
|
|
115
|
+
--clr-cyan-fg: hsl(190 80% 66%);
|
|
116
|
+
--clr-cyan-fg-strong: hsl(190 85% 78%);
|
|
117
|
+
|
|
118
|
+
/* green — success */
|
|
119
|
+
--clr-green-soft: hsl(150 40% 18%);
|
|
120
|
+
--clr-green-fill: hsl(150 80% 26%);
|
|
121
|
+
--clr-green-fg: hsl(150 65% 64%);
|
|
122
|
+
|
|
123
|
+
/* amber — warning */
|
|
124
|
+
--clr-amber-soft: hsl(36 45% 20%);
|
|
125
|
+
--clr-amber-fill: hsl(36 92% 52%);
|
|
126
|
+
--clr-amber-fg: hsl(36 85% 68%);
|
|
127
|
+
|
|
128
|
+
/* red — danger */
|
|
129
|
+
--clr-red-soft: hsl(348 45% 22%);
|
|
130
|
+
--clr-red-fill: hsl(348 80% 40%);
|
|
131
|
+
--clr-red-fill-strong: hsl(348 82% 47%);
|
|
132
|
+
--clr-red-fg: hsl(348 90% 76%);
|
|
133
|
+
--clr-red-fg-strong: hsl(348 92% 86%);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:root[data-theme='dark'] {
|
|
138
|
+
color-scheme: dark;
|
|
139
|
+
|
|
140
|
+
/* neutral */
|
|
141
|
+
--clr-base: hsl(240 20% 18%);
|
|
142
|
+
--clr-mantle: hsl(240 21% 11%);
|
|
143
|
+
--clr-surface-0: hsl(237 16% 27%);
|
|
144
|
+
--clr-surface-1: hsl(234 13% 36%);
|
|
145
|
+
--clr-overlay: hsl(228 12% 68%);
|
|
146
|
+
--clr-subtext: hsl(225 14% 82%);
|
|
147
|
+
--clr-text: hsl(220 22% 95.5%);
|
|
148
|
+
--clr-inverse: hsl(220 22% 95.5%);
|
|
149
|
+
--clr-shade: hsl(240 21% 8%);
|
|
150
|
+
|
|
151
|
+
/* blue — brand */
|
|
152
|
+
--clr-blue-soft: hsl(220 55% 22%);
|
|
153
|
+
--clr-blue-fill: hsl(220 88% 41%);
|
|
154
|
+
--clr-blue-fill-strong: hsl(220 90% 50%);
|
|
155
|
+
--clr-blue-fg: hsl(220 92% 74%);
|
|
156
|
+
--clr-blue-fg-strong: hsl(220 94% 84%);
|
|
157
|
+
|
|
158
|
+
/* cyan — links */
|
|
159
|
+
--clr-cyan-soft: hsl(190 45% 20%);
|
|
160
|
+
--clr-cyan-fg: hsl(190 80% 66%);
|
|
161
|
+
--clr-cyan-fg-strong: hsl(190 85% 78%);
|
|
162
|
+
|
|
163
|
+
/* green — success */
|
|
164
|
+
--clr-green-soft: hsl(150 40% 18%);
|
|
165
|
+
--clr-green-fill: hsl(150 80% 26%);
|
|
166
|
+
--clr-green-fg: hsl(150 65% 64%);
|
|
167
|
+
|
|
168
|
+
/* amber — warning */
|
|
169
|
+
--clr-amber-soft: hsl(36 45% 20%);
|
|
170
|
+
--clr-amber-fill: hsl(36 92% 52%);
|
|
171
|
+
--clr-amber-fg: hsl(36 85% 68%);
|
|
172
|
+
|
|
173
|
+
/* red — danger */
|
|
174
|
+
--clr-red-soft: hsl(348 45% 22%);
|
|
175
|
+
--clr-red-fill: hsl(348 80% 40%);
|
|
176
|
+
--clr-red-fill-strong: hsl(348 82% 47%);
|
|
177
|
+
--clr-red-fg: hsl(348 90% 76%);
|
|
178
|
+
--clr-red-fg-strong: hsl(348 92% 86%);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:root {
|
|
182
|
+
/* ---- Text -------------------------------------------------------- */
|
|
183
|
+
--text-clr-base: var(--clr-text);
|
|
184
|
+
--text-clr-muted: var(--clr-subtext);
|
|
185
|
+
--text-clr-inverse: var(--clr-inverse);
|
|
186
|
+
--text-clr-brand: var(--clr-blue-fg);
|
|
187
|
+
--text-clr-brand-hover: var(--clr-blue-fg-strong);
|
|
188
|
+
--text-clr-brand-selected: var(--clr-blue-fg-strong);
|
|
189
|
+
--text-clr-danger: var(--clr-red-fg);
|
|
190
|
+
--text-clr-success: var(--clr-green-fg);
|
|
191
|
+
--text-clr-warning: var(--clr-amber-fg);
|
|
192
|
+
--text-clr-link: var(--clr-cyan-fg);
|
|
193
|
+
--text-clr-link-hover: var(--clr-cyan-fg-strong);
|
|
194
|
+
|
|
195
|
+
/* ---- Background -------------------------------------------------- */
|
|
196
|
+
--bg-clr-base: var(--clr-mantle);
|
|
197
|
+
--bg-clr-surface: var(--clr-base);
|
|
198
|
+
--bg-clr-surface-2: var(--clr-surface-0);
|
|
199
|
+
--bg-clr-accent: var(--clr-surface-0);
|
|
200
|
+
--bg-clr-brand: var(--clr-blue-fill);
|
|
201
|
+
--bg-clr-brand-hover: var(--clr-blue-fill-strong);
|
|
202
|
+
--bg-clr-brand-ink: var(--clr-inverse);
|
|
203
|
+
--bg-clr-brand-soft: var(--clr-blue-soft);
|
|
204
|
+
--bg-clr-danger: var(--clr-red-fill);
|
|
205
|
+
--bg-clr-danger-hover: var(--clr-red-fill-strong);
|
|
206
|
+
--bg-clr-danger-ink: var(--clr-inverse);
|
|
207
|
+
--bg-clr-danger-soft: var(--clr-red-soft);
|
|
208
|
+
--bg-clr-success: var(--clr-green-fill);
|
|
209
|
+
--bg-clr-success-ink: var(--clr-inverse);
|
|
210
|
+
--bg-clr-success-soft: var(--clr-green-soft);
|
|
211
|
+
--bg-clr-warning: var(--clr-amber-fill);
|
|
212
|
+
--bg-clr-warning-ink: var(--clr-shade);
|
|
213
|
+
--bg-clr-warning-soft: var(--clr-amber-soft);
|
|
214
|
+
--bg-clr-dark: var(--clr-shade);
|
|
215
|
+
--shadow-clr: var(--clr-shade);
|
|
216
|
+
--bg-clr-backdrop: hsl(from var(--clr-shade) h s l / 0.45);
|
|
217
|
+
--bg-clr-gradient: radial-gradient(
|
|
218
|
+
circle at 20% 10%,
|
|
219
|
+
var(--bg-clr-accent),
|
|
220
|
+
var(--bg-clr-base) 45%
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
/* ---- Icon -------------------------------------------------------- */
|
|
224
|
+
/* Glyphs that must stay legible but recede — a decorative or inactive icon
|
|
225
|
+
is a non-text graphic, so it rides the 3:1 rung rather than the 4.5:1 one
|
|
226
|
+
--text-clr-muted is pinned to. Keeping it a step below the text ramp is
|
|
227
|
+
what makes an emphasised icon next to a dimmed one actually read. */
|
|
228
|
+
--icon-clr-dim: var(--clr-overlay);
|
|
229
|
+
|
|
230
|
+
/* ---- Border ------------------------------------------------------ */
|
|
231
|
+
--border-clr-base: var(--clr-surface-1);
|
|
232
|
+
--border-clr-strong: var(--clr-text);
|
|
233
|
+
--border-clr-input: var(--clr-overlay);
|
|
234
|
+
--border-clr-brand: var(--clr-blue-fg);
|
|
235
|
+
--border-clr-danger: var(--clr-red-fg);
|
|
236
|
+
--border-clr-success: var(--clr-green-fg);
|
|
237
|
+
--border-clr-warning: var(--clr-amber-fg);
|
|
238
|
+
|
|
239
|
+
/* ---- Outline / focus --------------------------------------------- */
|
|
240
|
+
--outline-clr-base: var(--clr-blue-fg);
|
|
241
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--container-width-sm: 56rem;
|
|
3
|
+
--container-width-md: 60rem;
|
|
4
|
+
--container-width-lg: 70rem;
|
|
5
|
+
--container-width-xl: 90rem;
|
|
6
|
+
--container-padding: var(--space-m);
|
|
7
|
+
--gap: var(--space-l);
|
|
8
|
+
--grid-columns: 12;
|
|
9
|
+
|
|
10
|
+
--radius-xs: 0.25rem; /* 4px — checkboxes, swatches */
|
|
11
|
+
--radius-sm: 0.375rem; /* 6px — buttons, inputs, alerts */
|
|
12
|
+
--radius-md: 0.5rem; /* 8px — cards, panels, sections */
|
|
13
|
+
--radius-lg: 0.75rem; /* 12px — dialogs, sheets */
|
|
14
|
+
--radius-pill: 999px; /* a sentinel, not a rung — stays px */
|
|
15
|
+
|
|
16
|
+
/* Border widths stay in px on purpose: a hairline that scales with the root
|
|
17
|
+
font size lands on fractional device pixels and renders soft. */
|
|
18
|
+
--stroke-sm: 1px;
|
|
19
|
+
--stroke-md: 1.5px;
|
|
20
|
+
--stroke-lg: 4px; /* leading rules on alerts, active tab markers */
|
|
21
|
+
|
|
22
|
+
/* One shared control rhythm, so a button and the input beside it line up. */
|
|
23
|
+
--control-height-sm: 1.875rem; /* 30px — clears the 24px WCAG 2.5.8 target */
|
|
24
|
+
--control-height-md: 2.375rem; /* 38px */
|
|
25
|
+
--control-inline-pad-sm: var(--space-xs);
|
|
26
|
+
--control-inline-pad-md: var(--space-s);
|
|
27
|
+
--control-gap: var(--space-2xs);
|
|
28
|
+
|
|
29
|
+
--icon-size-sm: 0.875rem; /* 14px — inside sm controls */
|
|
30
|
+
--icon-size-md: 1rem; /* 16px */
|
|
31
|
+
--icon-size-lg: 1.125rem; /* 18px — alert leading icons */
|
|
32
|
+
|
|
33
|
+
/* px for the same reason as the strokes: this is a drawn line, not a measure. */
|
|
34
|
+
--outline-width: 2px;
|
|
35
|
+
--outline-offset: 2px;
|
|
36
|
+
|
|
37
|
+
--opacity-disabled: 0.45;
|
|
38
|
+
|
|
39
|
+
/* Soft elevation. The shadow reads as depth, not as a drawn edge. */
|
|
40
|
+
--shadow-sm: 0 1px 2px
|
|
41
|
+
color-mix(in srgb, var(--shadow-clr) 14%, transparent);
|
|
42
|
+
--shadow-md: 0 3px 8px
|
|
43
|
+
color-mix(in srgb, var(--shadow-clr) 18%, transparent);
|
|
44
|
+
--shadow-brand: 0 3px 8px
|
|
45
|
+
color-mix(in srgb, var(--outline-clr-base) 18%, transparent);
|
|
46
|
+
|
|
47
|
+
/* DEPRECATED — the hard-offset "spark" shadows are retired. These aliases keep
|
|
48
|
+
the ~18 existing call sites rendering the new soft language until each
|
|
49
|
+
component is swept, then both names go. Do not use in new code. */
|
|
50
|
+
--shadow-spark: var(--shadow-sm);
|
|
51
|
+
--shadow-spark-lg: var(--shadow-md);
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--duration-fast: 80ms; /* hover and press feedback */
|
|
3
|
+
--duration-base: 120ms; /* colour and background transitions */
|
|
4
|
+
--duration-slow: 2s; /* one spinner revolution — deliberately unhurried */
|
|
5
|
+
|
|
6
|
+
--ease-base: ease;
|
|
7
|
+
--ease-out: cubic-bezier(0.2, 0, 0, 1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Duration and easing only — anything that loops or travels still needs its own
|
|
11
|
+
prefers-reduced-motion escape in the component. */
|