@sovereignfs/ui 0.23.0 → 0.33.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/dist/Button.module.css +75 -8
- package/dist/Calendar.module.css +126 -0
- package/dist/Card.module.css +4 -2
- package/dist/Checkbox.module.css +14 -2
- package/dist/CodeTextarea.module.css +53 -0
- package/dist/ConfirmDialog.module.css +109 -0
- package/dist/DatePicker.module.css +57 -0
- package/dist/Dialog.module.css +73 -46
- package/dist/DragHandleRow.module.css +9 -3
- package/dist/Drawer.module.css +61 -0
- package/dist/Icon.module.css +5 -0
- package/dist/Menu.module.css +82 -0
- package/dist/NavTabs.module.css +4 -2
- package/dist/OverlayHeader.module.css +98 -0
- package/dist/Popover.module.css +31 -1
- package/dist/SegmentedControl.module.css +4 -2
- package/dist/Sheet.module.css +55 -0
- package/dist/SplitPane.module.css +85 -0
- package/dist/StatusBadge.module.css +59 -0
- package/dist/SystemBanner.module.css +4 -2
- package/dist/Tabs.module.css +4 -2
- package/dist/TagInput.module.css +141 -0
- package/dist/Toast.module.css +4 -2
- package/dist/Tooltip.module.css +6 -1
- package/dist/index.d.ts +493 -17
- package/dist/index.js +1390 -209
- package/dist/tokens/primitives.css +19 -0
- package/dist/tokens/semantic.css +13 -0
- package/package.json +1 -1
- package/src/__tests__/motion.test.tsx +105 -0
- package/src/components/Button/Button.module.css +75 -8
- package/src/components/Button/Button.stories.tsx +6 -0
- package/src/components/Button/Button.tsx +17 -1
- package/src/components/Button/__tests__/Button.test.tsx +19 -0
- package/src/components/Calendar/Calendar.module.css +126 -0
- package/src/components/Calendar/Calendar.tsx +213 -0
- package/src/components/Calendar/__tests__/Calendar.test.tsx +98 -0
- package/src/components/Calendar/dateUtils.ts +97 -0
- package/src/components/Card/Card.module.css +4 -2
- package/src/components/Checkbox/Checkbox.module.css +14 -2
- package/src/components/Checkbox/Checkbox.tsx +22 -12
- package/src/components/CodeTextarea/CodeTextarea.module.css +53 -0
- package/src/components/CodeTextarea/CodeTextarea.stories.tsx +77 -0
- package/src/components/CodeTextarea/CodeTextarea.tsx +36 -0
- package/src/components/ConfirmDialog/ConfirmDialog.module.css +109 -0
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +124 -0
- package/src/components/ConfirmDialog/__tests__/ConfirmDialog.test.tsx +146 -0
- package/src/components/DatePicker/DatePicker.module.css +57 -0
- package/src/components/DatePicker/DatePicker.tsx +103 -0
- package/src/components/DatePicker/__tests__/DatePicker.test.tsx +89 -0
- package/src/components/Dialog/Dialog.module.css +73 -46
- package/src/components/Dialog/Dialog.stories.tsx +51 -1
- package/src/components/Dialog/Dialog.tsx +86 -22
- package/src/components/Dialog/__tests__/Dialog.test.tsx +67 -3
- package/src/components/DragHandleRow/DragHandleRow.module.css +9 -3
- package/src/components/Drawer/Drawer.module.css +61 -0
- package/src/components/Drawer/Drawer.tsx +117 -13
- package/src/components/Drawer/__tests__/Drawer.test.tsx +123 -2
- package/src/components/Icon/Icon.module.css +5 -0
- package/src/components/Icon/Icon.stories.tsx +4 -3
- package/src/components/Icon/Icon.tsx +1 -1
- package/src/components/Icon/icons/calendar.tsx +23 -0
- package/src/components/Icon/icons/ellipsis-vertical.tsx +22 -0
- package/src/components/Icon/icons/index.ts +8 -4
- package/src/components/Icon/icons/sliders-horizontal.tsx +9 -9
- package/src/components/Menu/Menu.module.css +82 -0
- package/src/components/Menu/Menu.tsx +137 -0
- package/src/components/Menu/__tests__/Menu.test.tsx +197 -0
- package/src/components/NavTabs/NavTabs.module.css +4 -2
- package/src/components/OverlayHeader/OverlayHeader.module.css +98 -0
- package/src/components/OverlayHeader/OverlayHeader.tsx +62 -0
- package/src/components/OverlayHeader/__tests__/OverlayHeader.test.tsx +51 -0
- package/src/components/Popover/Popover.module.css +31 -1
- package/src/components/Popover/Popover.stories.tsx +126 -1
- package/src/components/Popover/Popover.tsx +140 -7
- package/src/components/SegmentedControl/SegmentedControl.module.css +4 -2
- package/src/components/Sheet/Sheet.module.css +55 -0
- package/src/components/Sheet/Sheet.tsx +151 -0
- package/src/components/Sheet/__tests__/Sheet.test.tsx +99 -0
- package/src/components/SplitPane/SplitPane.module.css +85 -0
- package/src/components/SplitPane/SplitPane.stories.tsx +160 -0
- package/src/components/SplitPane/SplitPane.tsx +149 -0
- package/src/components/SplitPane/__tests__/SplitPane.test.tsx +51 -0
- package/src/components/StatusBadge/StatusBadge.module.css +59 -0
- package/src/components/StatusBadge/StatusBadge.stories.tsx +74 -0
- package/src/components/StatusBadge/StatusBadge.tsx +65 -0
- package/src/components/SystemBanner/SystemBanner.module.css +4 -2
- package/src/components/Tabs/Tabs.module.css +4 -2
- package/src/components/TagInput/TagInput.module.css +141 -0
- package/src/components/TagInput/TagInput.stories.tsx +109 -0
- package/src/components/TagInput/TagInput.tsx +174 -0
- package/src/components/TagInput/__tests__/TagInput.test.tsx +69 -0
- package/src/components/Toast/Toast.module.css +4 -2
- package/src/components/Tooltip/Tooltip.module.css +6 -1
- package/src/hooks/__tests__/useDoubleTap.test.tsx +117 -0
- package/src/hooks/__tests__/useIsMobile.test.tsx +80 -0
- package/src/hooks/__tests__/useLongPress.test.tsx +158 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useDoubleTap.ts +91 -0
- package/src/hooks/useIsMobile.ts +33 -0
- package/src/hooks/useLongPress.ts +185 -0
- package/src/index.ts +30 -1
- package/src/motion.ts +78 -0
- package/src/stories/DesignSystemOverview.stories.tsx +292 -4
- package/src/stories/InteractionHooks.stories.tsx +388 -0
- package/src/stories/TokenGallery.stories.tsx +85 -1
- package/src/tokens/primitives.css +19 -0
- package/src/tokens/semantic.css +13 -0
- package/src/components/Icon/icons/terminal.tsx +0 -19
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--sv-space-1);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.control {
|
|
9
|
+
display: flex;
|
|
10
|
+
min-height: 40px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--sv-space-1);
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
padding: 5px var(--sv-space-2);
|
|
16
|
+
color: var(--sv-color-text-primary);
|
|
17
|
+
background: var(--sv-color-surface);
|
|
18
|
+
border: 1px solid var(--sv-color-border-strong);
|
|
19
|
+
border-radius: var(--sv-radius-md);
|
|
20
|
+
transition:
|
|
21
|
+
border-color 0.15s ease,
|
|
22
|
+
box-shadow 0.15s ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.control:focus-within {
|
|
26
|
+
border-color: var(--sv-color-accent);
|
|
27
|
+
box-shadow: 0 0 0 2px var(--sv-color-focus-ring);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.invalid {
|
|
31
|
+
border-color: var(--sv-color-error-border);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.invalid:focus-within {
|
|
35
|
+
border-color: var(--sv-color-error-border);
|
|
36
|
+
box-shadow: 0 0 0 2px var(--sv-color-error-border);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.disabled {
|
|
40
|
+
opacity: 0.5;
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tag {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
min-height: 28px;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: var(--sv-space-1);
|
|
50
|
+
padding-inline: var(--sv-space-2) 2px;
|
|
51
|
+
color: var(--sv-color-text-primary);
|
|
52
|
+
background: var(--sv-color-surface-sunken);
|
|
53
|
+
border: 1px solid var(--sv-color-border);
|
|
54
|
+
border-radius: var(--sv-radius-full);
|
|
55
|
+
font-family: var(--sv-font-family);
|
|
56
|
+
font-size: var(--sv-font-size-xs);
|
|
57
|
+
font-weight: var(--sv-font-weight-medium);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tagLabel {
|
|
61
|
+
min-width: 0;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.removeButton {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
width: 22px;
|
|
70
|
+
height: 22px;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
padding: 0;
|
|
74
|
+
color: var(--sv-color-text-muted);
|
|
75
|
+
background: transparent;
|
|
76
|
+
border: 0;
|
|
77
|
+
border-radius: var(--sv-radius-full);
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
font: inherit;
|
|
80
|
+
line-height: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@media (hover: hover) {
|
|
84
|
+
.removeButton:hover:not(:disabled) {
|
|
85
|
+
color: var(--sv-color-text-primary);
|
|
86
|
+
background: var(--sv-color-surface);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.removeButton:focus-visible {
|
|
91
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
92
|
+
outline-offset: 1px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.removeButton:disabled {
|
|
96
|
+
cursor: not-allowed;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.input {
|
|
100
|
+
min-width: 120px;
|
|
101
|
+
flex: 1 1 140px;
|
|
102
|
+
height: 28px;
|
|
103
|
+
padding: 0 var(--sv-space-1);
|
|
104
|
+
color: var(--sv-color-text-primary);
|
|
105
|
+
background: transparent;
|
|
106
|
+
border: 0;
|
|
107
|
+
outline: 0;
|
|
108
|
+
font-family: var(--sv-font-family);
|
|
109
|
+
font-size: var(--sv-font-size-sm);
|
|
110
|
+
line-height: 1.5;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.input::placeholder {
|
|
114
|
+
color: var(--sv-color-text-muted);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.input:disabled {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.hint,
|
|
122
|
+
.error {
|
|
123
|
+
margin: 0;
|
|
124
|
+
font-family: var(--sv-font-family);
|
|
125
|
+
font-size: var(--sv-font-size-caption);
|
|
126
|
+
line-height: 1.4;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.hint {
|
|
130
|
+
color: var(--sv-color-text-muted);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.error {
|
|
134
|
+
color: var(--sv-color-error-text);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (pointer: coarse) {
|
|
138
|
+
.input {
|
|
139
|
+
font-size: var(--sv-font-size-md);
|
|
140
|
+
}
|
|
141
|
+
}
|
package/dist/Toast.module.css
CHANGED