@birdycom/omniaui 0.11.0 → 0.11.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 -21
- package/README.md +21 -21
- package/bin/lib/add.mjs +126 -126
- package/bin/lib/catalog.mjs +169 -169
- package/bin/lib/project.mjs +90 -90
- package/bin/omniaui.mjs +69 -69
- package/dist/code-block.css +25 -25
- package/dist/components-extra.css +916 -914
- package/dist/components.css +6559 -6469
- package/dist/components.min.css +1 -1
- package/dist/data-table.d.ts +9 -9
- package/dist/data-table.js +505 -505
- package/dist/docs-ui.css +267 -265
- package/dist/oc-theme.css +69 -69
- package/dist/parts/app-accordion-accent.css +60 -60
- package/dist/parts/app-alpha-tabs.css +68 -68
- package/dist/parts/app-busy-overlay.css +25 -25
- package/dist/parts/app-column-menu.css +85 -85
- package/dist/parts/app-confirm-dialog.css +70 -70
- package/dist/parts/app-cookie-consent.css +63 -63
- package/dist/parts/app-data-table.css +174 -174
- package/dist/parts/app-greeting.css +47 -47
- package/dist/parts/app-list-toolbar.css +81 -81
- package/dist/parts/app-page-header.css +54 -54
- package/dist/parts/app-severity-card.css +91 -91
- package/dist/parts/app-sidebar-dark.css +15 -15
- package/dist/parts/app-sortable-row.css +52 -52
- package/dist/parts/app-stat-card.css +68 -68
- package/dist/parts/app-table-actions.css +71 -71
- package/dist/parts/app-table-compact.css +54 -54
- package/dist/parts/app-top-progress.css +68 -68
- package/dist/parts/app-tree.css +104 -104
- package/dist/parts/app-upgrade-banner.css +90 -90
- package/dist/parts/app-version-banner.css +80 -80
- package/dist/parts/data-chart-line.css +167 -167
- package/dist/parts/forms-affix-input.css +75 -75
- package/dist/parts/forms-barcode-input.css +75 -75
- package/dist/parts/forms-chip-filter.css +91 -91
- package/dist/parts/forms-color-select.css +97 -89
- package/dist/parts/forms-decimal-input.css +51 -51
- package/dist/parts/forms-filter-counts.css +94 -94
- package/dist/parts/forms-language-select.css +89 -76
- package/dist/parts/forms-number-input.css +98 -95
- package/dist/parts/forms-password-requirements.css +55 -55
- package/dist/parts/forms-phone-input.css +85 -85
- package/dist/parts/forms-time-input.css +74 -74
- package/dist/parts/forms-toggle-field.css +69 -69
- package/dist/parts/media-art.css +21 -21
- package/dist/parts/media-attachment.css +160 -160
- package/dist/parts/media-browser-frame.css +73 -73
- package/dist/parts/media-card.css +83 -83
- package/dist/parts/media-chat-composer.css +90 -90
- package/dist/parts/media-doc-viewer.css +151 -151
- package/dist/parts/media-emoji-picker.css +88 -88
- package/dist/parts/media-entity-card.css +52 -52
- package/dist/parts/media-flip-card.css +78 -78
- package/dist/parts/media-image-zoom.css +68 -68
- package/dist/parts/media-lightbox.css +131 -131
- package/dist/parts/media-message-thread.css +136 -136
- package/dist/parts/media-message.css +160 -160
- package/dist/parts/media-row.css +78 -78
- package/dist/parts/media-stack-card.css +82 -82
- package/dist/parts/media-terminal-log.css +76 -76
- package/dist/parts/media-thumb.css +71 -71
- package/dist/parts/site-fact-list.css +25 -25
- package/dist/parts/site-link-arrow.css +34 -34
- package/dist/parts/site-marquee.css +34 -34
- package/dist/parts/site-next-teaser.css +75 -75
- package/dist/parts/site-price-card.css +91 -75
- package/dist/parts/site-product-mark.css +66 -66
- package/dist/parts/site-project-card.css +111 -111
- package/dist/parts/site-prose.css +124 -124
- package/dist/parts/site-stack-list.css +48 -48
- package/dist/parts/site-timeline.css +54 -54
- package/dist/showcase.css +404 -404
- package/package.json +69 -69
- package/snippets/accordion-accent.html +24 -24
- package/snippets/accordion.html +11 -11
- package/snippets/affix-input.html +30 -30
- package/snippets/alert-dialog.html +22 -22
- package/snippets/alert.html +5 -5
- package/snippets/alpha-tabs.html +37 -37
- package/snippets/aspect-ratio.html +15 -15
- package/snippets/attachment.html +43 -43
- package/snippets/avatar.html +6 -6
- package/snippets/back-link.html +5 -5
- package/snippets/badge.html +5 -5
- package/snippets/barcode-input.html +18 -18
- package/snippets/breadcrumb.html +6 -6
- package/snippets/browser-frame.html +18 -18
- package/snippets/busy-overlay.html +31 -31
- package/snippets/button-group.html +21 -21
- package/snippets/button.html +8 -8
- package/snippets/calendar.html +43 -43
- package/snippets/card.html +17 -17
- package/snippets/carousel.html +21 -21
- package/snippets/chart-line.html +46 -46
- package/snippets/chart.html +27 -27
- package/snippets/chat-composer.html +21 -21
- package/snippets/checkbox.html +5 -5
- package/snippets/checklist.html +23 -23
- package/snippets/chip-filter.html +14 -14
- package/snippets/code-window.html +20 -20
- package/snippets/collapsible.html +19 -19
- package/snippets/color-field.html +13 -13
- package/snippets/color-select.html +18 -18
- package/snippets/column-menu.html +38 -38
- package/snippets/combobox.html +19 -19
- package/snippets/command.html +24 -24
- package/snippets/confirm-dialog.html +32 -32
- package/snippets/context-menu.html +25 -25
- package/snippets/cookie-consent.html +70 -70
- package/snippets/copy-field.html +19 -19
- package/snippets/counter.html +2 -2
- package/snippets/data-table.html +151 -151
- package/snippets/date-picker.html +32 -32
- package/snippets/decimal-input.html +20 -20
- package/snippets/definition-list.html +20 -20
- package/snippets/demo-panel.html +18 -18
- package/snippets/doc-viewer.html +58 -58
- package/snippets/drawer.html +30 -30
- package/snippets/dropdown-menu.html +27 -27
- package/snippets/dropdown.html +9 -9
- package/snippets/dropzone.html +13 -13
- package/snippets/emoji-picker.html +51 -51
- package/snippets/empty-state.html +17 -17
- package/snippets/entity-card.html +26 -26
- package/snippets/expandable-table.html +26 -26
- package/snippets/fact-list.html +14 -14
- package/snippets/filter-counts.html +30 -30
- package/snippets/flip-card.html +22 -22
- package/snippets/form-field.html +6 -6
- package/snippets/greeting.html +22 -22
- package/snippets/heading.html +14 -14
- package/snippets/hover-card.html +18 -18
- package/snippets/image-zoom.html +30 -30
- package/snippets/input-group.html +10 -10
- package/snippets/input.html +5 -5
- package/snippets/item.html +26 -26
- package/snippets/kbd.html +13 -13
- package/snippets/label.html +9 -9
- package/snippets/language-select.html +26 -26
- package/snippets/launcher-card.html +14 -14
- package/snippets/lightbox.html +50 -50
- package/snippets/link-arrow.html +10 -10
- package/snippets/list-toolbar.html +33 -33
- package/snippets/marquee.html +15 -15
- package/snippets/media-card.html +28 -28
- package/snippets/media-row.html +21 -21
- package/snippets/media-thumb.html +12 -12
- package/snippets/menubar.html +30 -30
- package/snippets/message-thread.html +123 -123
- package/snippets/message.html +51 -51
- package/snippets/modal.html +15 -15
- package/snippets/native-select.html +15 -15
- package/snippets/navmenu.html +23 -23
- package/snippets/next-teaser.html +15 -15
- package/snippets/number-input.html +27 -27
- package/snippets/otp-input.html +9 -9
- package/snippets/page-header.html +24 -24
- package/snippets/pagination.html +6 -6
- package/snippets/password-input.html +24 -24
- package/snippets/password-requirements.html +30 -30
- package/snippets/phone-input.html +22 -22
- package/snippets/popover.html +15 -15
- package/snippets/price-card.html +34 -34
- package/snippets/product-mark.html +13 -13
- package/snippets/progress.html +4 -4
- package/snippets/project-card.html +23 -23
- package/snippets/prose.html +54 -54
- package/snippets/radio.html +17 -17
- package/snippets/recovery-codes.html +20 -20
- package/snippets/resizable.html +16 -16
- package/snippets/scroll-area.html +20 -20
- package/snippets/search.html +8 -8
- package/snippets/segmented.html +11 -11
- package/snippets/select.html +7 -7
- package/snippets/separator.html +15 -15
- package/snippets/severity-card.html +35 -35
- package/snippets/sheet.html +32 -32
- package/snippets/sidebar-docs.html +24 -24
- package/snippets/sidebar.html +55 -55
- package/snippets/site-footer.html +6 -6
- package/snippets/site-header.html +26 -26
- package/snippets/skeleton.html +4 -4
- package/snippets/slider.html +17 -17
- package/snippets/sortable-row.html +31 -31
- package/snippets/spinner.html +14 -14
- package/snippets/stack-card.html +17 -17
- package/snippets/stack-list.html +16 -16
- package/snippets/stat-card.html +24 -24
- package/snippets/stepper.html +13 -13
- package/snippets/switch.html +6 -6
- package/snippets/table-actions.html +39 -39
- package/snippets/table-compact.html +24 -24
- package/snippets/table.html +29 -29
- package/snippets/tabs.html +9 -9
- package/snippets/tag-input.html +60 -17
- package/snippets/terminal-log.html +23 -23
- package/snippets/textarea.html +3 -3
- package/snippets/theme-switch.html +6 -6
- package/snippets/time-input.html +26 -26
- package/snippets/timeline.html +28 -28
- package/snippets/toast-stack.html +10 -10
- package/snippets/toast.html +36 -36
- package/snippets/toc.html +13 -13
- package/snippets/toggle-field.html +20 -20
- package/snippets/toggle.html +22 -22
- package/snippets/tooltip.html +4 -4
- package/snippets/top-progress.html +12 -12
- package/snippets/tree.html +38 -38
- package/snippets/upgrade-banner.html +28 -28
- package/snippets/user.html +15 -15
- package/snippets/version-banner.html +15 -15
|
@@ -1,76 +1,89 @@
|
|
|
1
|
-
/* File: packages/ui/src/parts/forms-language-select.css
|
|
2
|
-
Map: wrapper (icon + native select) -> icon -> select control -> chevron -> states -> --ghost / --currency
|
|
3
|
-
Language select: compact locale (or currency) switcher for a site header.
|
|
4
|
-
A native <select> inside a small frame with a leading icon or symbol. The app reacts to "change". */
|
|
5
|
-
|
|
6
|
-
/* Wrapper: inline frame; the select is stretched over it so the whole pill is clickable. */
|
|
7
|
-
.oc-language-select {
|
|
8
|
-
position: relative;
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
gap: 0.375rem;
|
|
12
|
-
padding-inline: 0.625rem 0.5rem;
|
|
13
|
-
border: 1px solid var(--oc-input);
|
|
14
|
-
border-radius: 999px;
|
|
15
|
-
color: var(--oc-foreground);
|
|
16
|
-
font-size: 0.8rem;
|
|
17
|
-
transition: border-color var(--oc-transition-fast), background var(--oc-transition-fast);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.oc-language-select:hover { background: var(--oc-surface); }
|
|
21
|
-
|
|
22
|
-
.oc-language-select:focus-within {
|
|
23
|
-
border-color: var(--oc-ring);
|
|
24
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Leading icon (inline SVG globe) or symbol (€, $). Decorative: aria-hidden="true". */
|
|
28
|
-
.oc-language-select-icon {
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
flex: none;
|
|
31
|
-
inline-size: 1rem;
|
|
32
|
-
justify-content: center;
|
|
33
|
-
color: var(--oc-muted-foreground);
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.oc-language-select-icon svg { inline-size: 1rem; block-size: 1rem; }
|
|
38
|
-
|
|
39
|
-
/* Native select without its own frame; room on the right for the chevron. */
|
|
40
|
-
.oc-language-select-control {
|
|
41
|
-
appearance: none;
|
|
42
|
-
padding: 0.375rem 1.25rem 0.375rem 0;
|
|
43
|
-
border: 0;
|
|
44
|
-
background: transparent;
|
|
45
|
-
color: inherit;
|
|
46
|
-
font: inherit;
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
outline: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.oc-language-select-control option {
|
|
52
|
-
background: var(--oc-background);
|
|
53
|
-
color: var(--oc-foreground);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Chevron drawn with two borders (no image, follows currentColor). */
|
|
57
|
-
.oc-language-select::after {
|
|
58
|
-
content: "";
|
|
59
|
-
position: absolute;
|
|
60
|
-
inset-inline-end: 0.7rem;
|
|
61
|
-
inset-block-start: 50%;
|
|
62
|
-
inline-size: 0.35rem;
|
|
63
|
-
block-size: 0.35rem;
|
|
64
|
-
border-inline-end: 1.5px solid var(--oc-muted-foreground);
|
|
65
|
-
border-block-end: 1.5px solid var(--oc-muted-foreground);
|
|
66
|
-
transform: translateY(-70%) rotate(45deg);
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.oc-language-select:has(.oc-language-select-control:disabled) { opacity: 0.5; cursor: not-allowed; }
|
|
71
|
-
|
|
72
|
-
/* Ghost: no frame, for dense headers and footers. */
|
|
73
|
-
.oc-language-select--ghost { border-color: transparent; }
|
|
74
|
-
|
|
75
|
-
/* Currency: the symbol in the icon slot gets the primary color. */
|
|
76
|
-
.oc-language-select--currency .oc-language-select-icon { color: var(--oc-primary); }
|
|
1
|
+
/* File: packages/ui/src/parts/forms-language-select.css
|
|
2
|
+
Map: wrapper (icon + native select) -> icon -> select control -> chevron -> states -> --ghost / --currency
|
|
3
|
+
Language select: compact locale (or currency) switcher for a site header.
|
|
4
|
+
A native <select> inside a small frame with a leading icon or symbol. The app reacts to "change". */
|
|
5
|
+
|
|
6
|
+
/* Wrapper: inline frame; the select is stretched over it so the whole pill is clickable. */
|
|
7
|
+
.oc-language-select {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 0.375rem;
|
|
12
|
+
padding-inline: 0.625rem 0.5rem;
|
|
13
|
+
border: 1px solid var(--oc-input);
|
|
14
|
+
border-radius: 999px;
|
|
15
|
+
color: var(--oc-foreground);
|
|
16
|
+
font-size: 0.8rem;
|
|
17
|
+
transition: border-color var(--oc-transition-fast), background var(--oc-transition-fast);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.oc-language-select:hover { background: var(--oc-surface); }
|
|
21
|
+
|
|
22
|
+
.oc-language-select:focus-within {
|
|
23
|
+
border-color: var(--oc-ring);
|
|
24
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Leading icon (inline SVG globe) or symbol (€, $). Decorative: aria-hidden="true". */
|
|
28
|
+
.oc-language-select-icon {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
flex: none;
|
|
31
|
+
inline-size: 1rem;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
color: var(--oc-muted-foreground);
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.oc-language-select-icon svg { inline-size: 1rem; block-size: 1rem; }
|
|
38
|
+
|
|
39
|
+
/* Native select without its own frame; room on the right for the chevron. */
|
|
40
|
+
.oc-language-select-control {
|
|
41
|
+
appearance: none;
|
|
42
|
+
padding: 0.375rem 1.25rem 0.375rem 0;
|
|
43
|
+
border: 0;
|
|
44
|
+
background: transparent;
|
|
45
|
+
color: inherit;
|
|
46
|
+
font: inherit;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.oc-language-select-control option {
|
|
52
|
+
background: var(--oc-background);
|
|
53
|
+
color: var(--oc-foreground);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Chevron drawn with two borders (no image, follows currentColor). */
|
|
57
|
+
.oc-language-select::after {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset-inline-end: 0.7rem;
|
|
61
|
+
inset-block-start: 50%;
|
|
62
|
+
inline-size: 0.35rem;
|
|
63
|
+
block-size: 0.35rem;
|
|
64
|
+
border-inline-end: 1.5px solid var(--oc-muted-foreground);
|
|
65
|
+
border-block-end: 1.5px solid var(--oc-muted-foreground);
|
|
66
|
+
transform: translateY(-70%) rotate(45deg);
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.oc-language-select:has(.oc-language-select-control:disabled) { opacity: 0.5; cursor: not-allowed; }
|
|
71
|
+
|
|
72
|
+
/* Ghost: no frame, for dense headers and footers. */
|
|
73
|
+
.oc-language-select--ghost { border-color: transparent; }
|
|
74
|
+
|
|
75
|
+
/* Currency: the symbol in the icon slot gets the primary color. */
|
|
76
|
+
.oc-language-select--currency .oc-language-select-icon { color: var(--oc-primary); }
|
|
77
|
+
|
|
78
|
+
/* Menu: the same pill as a <button> that opens an OmniaUI dropdown (popovertarget + .oc-dropdown-menu),
|
|
79
|
+
for a list of links per language. Room on the right for the chevron. */
|
|
80
|
+
button.oc-language-select {
|
|
81
|
+
padding-block: 0.375rem;
|
|
82
|
+
padding-inline-end: 1.6rem;
|
|
83
|
+
background: transparent;
|
|
84
|
+
font: inherit;
|
|
85
|
+
font-size: 0.8rem;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
outline: none;
|
|
88
|
+
}
|
|
89
|
+
button.oc-language-select:hover { background: var(--oc-surface); }
|
|
@@ -1,95 +1,98 @@
|
|
|
1
|
-
/* File: packages/ui/src/parts/forms-number-input.css
|
|
2
|
-
Map: wrapper -> step buttons (- / +) -> number field (native spinners hidden) -> states -> sizes / block
|
|
3
|
-
Number input: input type="number" between a minus and a plus button.
|
|
4
|
-
The field works on its own (arrow keys, min/max/step); the buttons call stepDown()/stepUp() (tiny script or wrapper). */
|
|
5
|
-
|
|
6
|
-
/* Wrapper: one frame around the buttons and the field. */
|
|
7
|
-
.oc-number-input {
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: stretch;
|
|
10
|
-
border: 1px solid var(--oc-input);
|
|
11
|
-
border-radius: var(--oc-radius);
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.oc-number-input:focus-within {
|
|
17
|
-
border-color: var(--oc-ring);
|
|
18
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Step buttons: square, muted, with a divider towards the field. */
|
|
22
|
-
.oc-number-input-step {
|
|
23
|
-
flex: none;
|
|
24
|
-
inline-size: 2.25rem;
|
|
25
|
-
padding: 0;
|
|
26
|
-
border: 0;
|
|
27
|
-
background: var(--oc-surface);
|
|
28
|
-
color: var(--oc-muted-foreground);
|
|
29
|
-
font: inherit;
|
|
30
|
-
font-size: 1rem;
|
|
31
|
-
line-height: 1;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
transition: background var(--oc-transition-fast), color var(--oc-transition-fast);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.oc-number-input-step:first-child { border-inline-end: 1px solid var(--oc-input); }
|
|
37
|
-
.oc-number-input-step:last-child { border-inline-start: 1px solid var(--oc-input); }
|
|
38
|
-
|
|
39
|
-
.oc-number-input-step:hover {
|
|
40
|
-
background: var(--oc-surface-strong);
|
|
41
|
-
color: var(--oc-foreground);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.oc-number-input-step:focus-visible {
|
|
45
|
-
outline: 2px solid var(--oc-ring);
|
|
46
|
-
outline-offset: -2px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.oc-number-input-step:disabled {
|
|
50
|
-
opacity: 0.4;
|
|
51
|
-
cursor: not-allowed;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Field: centered digits, no native spinner arrows (the buttons replace them). */
|
|
55
|
-
.oc-number-input-field {
|
|
56
|
-
inline-size: 4.5rem;
|
|
57
|
-
min-inline-size: 0;
|
|
58
|
-
padding: 0.5rem 0.25rem;
|
|
59
|
-
border: 0;
|
|
60
|
-
background: transparent;
|
|
61
|
-
color: var(--oc-foreground);
|
|
62
|
-
font: inherit;
|
|
63
|
-
font-size: 0.875rem;
|
|
64
|
-
font-variant-numeric: tabular-nums;
|
|
65
|
-
text-align: center;
|
|
66
|
-
outline: none;
|
|
67
|
-
appearance: textfield;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.oc-number-input-field::-webkit-inner-spin-button,
|
|
71
|
-
.oc-number-input-field::-webkit-outer-spin-button {
|
|
72
|
-
appearance: none;
|
|
73
|
-
margin: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Invalid: outside min/max (after user input), aria-invalid or the modifier. */
|
|
77
|
-
.oc-number-input--error,
|
|
78
|
-
.oc-number-input:has([aria-invalid="true"]),
|
|
79
|
-
.oc-number-input:has(.oc-number-input-field:user-invalid) {
|
|
80
|
-
border-color: var(--oc-destructive);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Disabled: dim the whole control. */
|
|
84
|
-
.oc-number-input:has(.oc-number-input-field:disabled) {
|
|
85
|
-
opacity: 0.5;
|
|
86
|
-
cursor: not-allowed;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/*
|
|
90
|
-
.oc-number-input
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.oc-number-input--
|
|
95
|
-
|
|
1
|
+
/* File: packages/ui/src/parts/forms-number-input.css
|
|
2
|
+
Map: wrapper -> step buttons (- / +) -> number field (native spinners hidden) -> states -> sizes / block
|
|
3
|
+
Number input: input type="number" between a minus and a plus button.
|
|
4
|
+
The field works on its own (arrow keys, min/max/step); the buttons call stepDown()/stepUp() (tiny script or wrapper). */
|
|
5
|
+
|
|
6
|
+
/* Wrapper: one frame around the buttons and the field. */
|
|
7
|
+
.oc-number-input {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: stretch;
|
|
10
|
+
border: 1px solid var(--oc-input);
|
|
11
|
+
border-radius: var(--oc-radius);
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.oc-number-input:focus-within {
|
|
17
|
+
border-color: var(--oc-ring);
|
|
18
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Step buttons: square, muted, with a divider towards the field. */
|
|
22
|
+
.oc-number-input-step {
|
|
23
|
+
flex: none;
|
|
24
|
+
inline-size: 2.25rem;
|
|
25
|
+
padding: 0;
|
|
26
|
+
border: 0;
|
|
27
|
+
background: var(--oc-surface);
|
|
28
|
+
color: var(--oc-muted-foreground);
|
|
29
|
+
font: inherit;
|
|
30
|
+
font-size: 1rem;
|
|
31
|
+
line-height: 1;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
transition: background var(--oc-transition-fast), color var(--oc-transition-fast);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.oc-number-input-step:first-child { border-inline-end: 1px solid var(--oc-input); }
|
|
37
|
+
.oc-number-input-step:last-child { border-inline-start: 1px solid var(--oc-input); }
|
|
38
|
+
|
|
39
|
+
.oc-number-input-step:hover {
|
|
40
|
+
background: var(--oc-surface-strong);
|
|
41
|
+
color: var(--oc-foreground);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.oc-number-input-step:focus-visible {
|
|
45
|
+
outline: 2px solid var(--oc-ring);
|
|
46
|
+
outline-offset: -2px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.oc-number-input-step:disabled {
|
|
50
|
+
opacity: 0.4;
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Field: centered digits, no native spinner arrows (the buttons replace them). */
|
|
55
|
+
.oc-number-input-field {
|
|
56
|
+
inline-size: 4.5rem;
|
|
57
|
+
min-inline-size: 0;
|
|
58
|
+
padding: 0.5rem 0.25rem;
|
|
59
|
+
border: 0;
|
|
60
|
+
background: transparent;
|
|
61
|
+
color: var(--oc-foreground);
|
|
62
|
+
font: inherit;
|
|
63
|
+
font-size: 0.875rem;
|
|
64
|
+
font-variant-numeric: tabular-nums;
|
|
65
|
+
text-align: center;
|
|
66
|
+
outline: none;
|
|
67
|
+
appearance: textfield;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.oc-number-input-field::-webkit-inner-spin-button,
|
|
71
|
+
.oc-number-input-field::-webkit-outer-spin-button {
|
|
72
|
+
appearance: none;
|
|
73
|
+
margin: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Invalid: outside min/max (after user input), aria-invalid or the modifier. */
|
|
77
|
+
.oc-number-input--error,
|
|
78
|
+
.oc-number-input:has([aria-invalid="true"]),
|
|
79
|
+
.oc-number-input:has(.oc-number-input-field:user-invalid) {
|
|
80
|
+
border-color: var(--oc-destructive);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Disabled: dim the whole control. */
|
|
84
|
+
.oc-number-input:has(.oc-number-input-field:disabled) {
|
|
85
|
+
opacity: 0.5;
|
|
86
|
+
cursor: not-allowed;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Inside a grid the control keeps its own width (no empty strip next to the +); --block fills the cell. */
|
|
90
|
+
.oc-number-input { justify-self: start; }
|
|
91
|
+
|
|
92
|
+
/* Full width: the field grows, buttons keep their size. */
|
|
93
|
+
.oc-number-input--block { display: flex; inline-size: 100%; justify-self: stretch; }
|
|
94
|
+
.oc-number-input--block .oc-number-input-field { flex: 1; inline-size: auto; }
|
|
95
|
+
|
|
96
|
+
/* Small size. */
|
|
97
|
+
.oc-number-input--sm .oc-number-input-step { inline-size: 1.75rem; font-size: 0.875rem; }
|
|
98
|
+
.oc-number-input--sm .oc-number-input-field { padding-block: 0.25rem; font-size: 0.8rem; inline-size: 3.5rem; }
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/* File: packages/ui/src/parts/forms-password-requirements.css
|
|
2
|
-
Map: list -> rule (icon via ::before) -> met state -> --inline variant
|
|
3
|
-
Password requirements: a live checklist of password rules under a password field.
|
|
4
|
-
A rule is "met" with the modifier .oc-password-requirement--met (set by the tiny script or a wrapper).
|
|
5
|
-
The list uses aria-live="polite" so screen readers hear the changes. */
|
|
6
|
-
|
|
7
|
-
/* List: compact, no bullets. */
|
|
8
|
-
.oc-password-requirements {
|
|
9
|
-
display: grid;
|
|
10
|
-
gap: 0.25rem;
|
|
11
|
-
margin: 0.5rem 0 0;
|
|
12
|
-
padding: 0;
|
|
13
|
-
list-style: none;
|
|
14
|
-
font-size: 0.8rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* One rule: icon + text. Not met = muted with a cross. */
|
|
18
|
-
.oc-password-requirement {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
gap: 0.375rem;
|
|
22
|
-
color: var(--oc-muted-foreground);
|
|
23
|
-
transition: color var(--oc-transition-fast);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Icon in a small circle (text glyph, no icon font needed). */
|
|
27
|
-
.oc-password-requirement::before {
|
|
28
|
-
content: "\2715";
|
|
29
|
-
display: inline-grid;
|
|
30
|
-
place-items: center;
|
|
31
|
-
flex: none;
|
|
32
|
-
inline-size: 1rem;
|
|
33
|
-
block-size: 1rem;
|
|
34
|
-
border-radius: 999px;
|
|
35
|
-
background: var(--oc-surface-strong);
|
|
36
|
-
font-size: 0.6rem;
|
|
37
|
-
font-weight: 700;
|
|
38
|
-
line-height: 1;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Met: success color with a check mark. */
|
|
42
|
-
.oc-password-requirement--met { color: var(--oc-success); }
|
|
43
|
-
|
|
44
|
-
.oc-password-requirement--met::before {
|
|
45
|
-
content: "\2713";
|
|
46
|
-
background: var(--oc-success);
|
|
47
|
-
color: var(--oc-success-foreground);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Inline variant: rules side by side, wrapping (short rule texts). */
|
|
51
|
-
.oc-password-requirements--inline {
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-wrap: wrap;
|
|
54
|
-
gap: 0.25rem 1rem;
|
|
55
|
-
}
|
|
1
|
+
/* File: packages/ui/src/parts/forms-password-requirements.css
|
|
2
|
+
Map: list -> rule (icon via ::before) -> met state -> --inline variant
|
|
3
|
+
Password requirements: a live checklist of password rules under a password field.
|
|
4
|
+
A rule is "met" with the modifier .oc-password-requirement--met (set by the tiny script or a wrapper).
|
|
5
|
+
The list uses aria-live="polite" so screen readers hear the changes. */
|
|
6
|
+
|
|
7
|
+
/* List: compact, no bullets. */
|
|
8
|
+
.oc-password-requirements {
|
|
9
|
+
display: grid;
|
|
10
|
+
gap: 0.25rem;
|
|
11
|
+
margin: 0.5rem 0 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
list-style: none;
|
|
14
|
+
font-size: 0.8rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* One rule: icon + text. Not met = muted with a cross. */
|
|
18
|
+
.oc-password-requirement {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 0.375rem;
|
|
22
|
+
color: var(--oc-muted-foreground);
|
|
23
|
+
transition: color var(--oc-transition-fast);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Icon in a small circle (text glyph, no icon font needed). */
|
|
27
|
+
.oc-password-requirement::before {
|
|
28
|
+
content: "\2715";
|
|
29
|
+
display: inline-grid;
|
|
30
|
+
place-items: center;
|
|
31
|
+
flex: none;
|
|
32
|
+
inline-size: 1rem;
|
|
33
|
+
block-size: 1rem;
|
|
34
|
+
border-radius: 999px;
|
|
35
|
+
background: var(--oc-surface-strong);
|
|
36
|
+
font-size: 0.6rem;
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
line-height: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Met: success color with a check mark. */
|
|
42
|
+
.oc-password-requirement--met { color: var(--oc-success); }
|
|
43
|
+
|
|
44
|
+
.oc-password-requirement--met::before {
|
|
45
|
+
content: "\2713";
|
|
46
|
+
background: var(--oc-success);
|
|
47
|
+
color: var(--oc-success-foreground);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Inline variant: rules side by side, wrapping (short rule texts). */
|
|
51
|
+
.oc-password-requirements--inline {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
gap: 0.25rem 1rem;
|
|
55
|
+
}
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
/* File: packages/ui/src/parts/forms-phone-input.css
|
|
2
|
-
Map: wrapper (one border around both parts) -> dial-code select -> number input -> states (focus, invalid, disabled) -> sizes
|
|
3
|
-
Phone input: a country dial code (native <select>) and the national number (input type="tel") in one frame.
|
|
4
|
-
No JavaScript needed; the React/Vue wrappers only add digit grouping ("485 12 34 56"). */
|
|
5
|
-
|
|
6
|
-
/* Wrapper: draws the single border, so both controls look like one field. */
|
|
7
|
-
.oc-phone-input {
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: stretch;
|
|
10
|
-
inline-size: 100%;
|
|
11
|
-
border: 1px solid var(--oc-input);
|
|
12
|
-
border-radius: var(--oc-radius);
|
|
13
|
-
background: transparent;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Focus ring on the whole frame while either part has focus. */
|
|
19
|
-
.oc-phone-input:focus-within {
|
|
20
|
-
border-color: var(--oc-ring);
|
|
21
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* Dial code: compact native select, separated by a divider line. */
|
|
25
|
-
.oc-phone-input-dial {
|
|
26
|
-
flex: none;
|
|
27
|
-
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
|
|
28
|
-
border: 0;
|
|
29
|
-
border-inline-end: 1px solid var(--oc-input);
|
|
30
|
-
background: var(--oc-surface);
|
|
31
|
-
color: var(--oc-foreground);
|
|
32
|
-
font: inherit;
|
|
33
|
-
font-size: 0.875rem;
|
|
34
|
-
font-variant-numeric: tabular-nums;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
outline: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Dark mode: keep the opened option list readable (same as .oc-select option). */
|
|
40
|
-
.oc-phone-input-dial option {
|
|
41
|
-
background: var(--oc-background);
|
|
42
|
-
color: var(--oc-foreground);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* National number: borderless, fills the rest of the frame. */
|
|
46
|
-
.oc-phone-input-number {
|
|
47
|
-
flex: 1;
|
|
48
|
-
min-inline-size: 0;
|
|
49
|
-
padding: 0.5rem 0.75rem;
|
|
50
|
-
border: 0;
|
|
51
|
-
background: transparent;
|
|
52
|
-
color: var(--oc-foreground);
|
|
53
|
-
font: inherit;
|
|
54
|
-
font-size: 0.875rem;
|
|
55
|
-
font-variant-numeric: tabular-nums;
|
|
56
|
-
letter-spacing: 0.02em;
|
|
57
|
-
outline: none;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.oc-phone-input-number::placeholder { color: var(--oc-muted-foreground); }
|
|
61
|
-
|
|
62
|
-
/* Invalid: modifier, aria-invalid on the input, or the browser's own check after user input. */
|
|
63
|
-
.oc-phone-input--error,
|
|
64
|
-
.oc-phone-input:has([aria-invalid="true"]),
|
|
65
|
-
.oc-phone-input:has(.oc-phone-input-number:user-invalid) {
|
|
66
|
-
border-color: var(--oc-destructive);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.oc-phone-input--error:focus-within,
|
|
70
|
-
.oc-phone-input:has([aria-invalid="true"]):focus-within {
|
|
71
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-destructive) 25%, transparent);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* Disabled: dim the whole frame when the number input is disabled. */
|
|
75
|
-
.oc-phone-input:has(.oc-phone-input-number:disabled) {
|
|
76
|
-
opacity: 0.5;
|
|
77
|
-
cursor: not-allowed;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Small size for toolbars and dense forms. */
|
|
81
|
-
.oc-phone-input--sm .oc-phone-input-dial,
|
|
82
|
-
.oc-phone-input--sm .oc-phone-input-number {
|
|
83
|
-
padding-block: 0.25rem;
|
|
84
|
-
font-size: 0.8rem;
|
|
85
|
-
}
|
|
1
|
+
/* File: packages/ui/src/parts/forms-phone-input.css
|
|
2
|
+
Map: wrapper (one border around both parts) -> dial-code select -> number input -> states (focus, invalid, disabled) -> sizes
|
|
3
|
+
Phone input: a country dial code (native <select>) and the national number (input type="tel") in one frame.
|
|
4
|
+
No JavaScript needed; the React/Vue wrappers only add digit grouping ("485 12 34 56"). */
|
|
5
|
+
|
|
6
|
+
/* Wrapper: draws the single border, so both controls look like one field. */
|
|
7
|
+
.oc-phone-input {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: stretch;
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
border: 1px solid var(--oc-input);
|
|
12
|
+
border-radius: var(--oc-radius);
|
|
13
|
+
background: transparent;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Focus ring on the whole frame while either part has focus. */
|
|
19
|
+
.oc-phone-input:focus-within {
|
|
20
|
+
border-color: var(--oc-ring);
|
|
21
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-ring) 25%, transparent);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Dial code: compact native select, separated by a divider line. */
|
|
25
|
+
.oc-phone-input-dial {
|
|
26
|
+
flex: none;
|
|
27
|
+
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
|
|
28
|
+
border: 0;
|
|
29
|
+
border-inline-end: 1px solid var(--oc-input);
|
|
30
|
+
background: var(--oc-surface);
|
|
31
|
+
color: var(--oc-foreground);
|
|
32
|
+
font: inherit;
|
|
33
|
+
font-size: 0.875rem;
|
|
34
|
+
font-variant-numeric: tabular-nums;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Dark mode: keep the opened option list readable (same as .oc-select option). */
|
|
40
|
+
.oc-phone-input-dial option {
|
|
41
|
+
background: var(--oc-background);
|
|
42
|
+
color: var(--oc-foreground);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* National number: borderless, fills the rest of the frame. */
|
|
46
|
+
.oc-phone-input-number {
|
|
47
|
+
flex: 1;
|
|
48
|
+
min-inline-size: 0;
|
|
49
|
+
padding: 0.5rem 0.75rem;
|
|
50
|
+
border: 0;
|
|
51
|
+
background: transparent;
|
|
52
|
+
color: var(--oc-foreground);
|
|
53
|
+
font: inherit;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
font-variant-numeric: tabular-nums;
|
|
56
|
+
letter-spacing: 0.02em;
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.oc-phone-input-number::placeholder { color: var(--oc-muted-foreground); }
|
|
61
|
+
|
|
62
|
+
/* Invalid: modifier, aria-invalid on the input, or the browser's own check after user input. */
|
|
63
|
+
.oc-phone-input--error,
|
|
64
|
+
.oc-phone-input:has([aria-invalid="true"]),
|
|
65
|
+
.oc-phone-input:has(.oc-phone-input-number:user-invalid) {
|
|
66
|
+
border-color: var(--oc-destructive);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.oc-phone-input--error:focus-within,
|
|
70
|
+
.oc-phone-input:has([aria-invalid="true"]):focus-within {
|
|
71
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--oc-destructive) 25%, transparent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Disabled: dim the whole frame when the number input is disabled. */
|
|
75
|
+
.oc-phone-input:has(.oc-phone-input-number:disabled) {
|
|
76
|
+
opacity: 0.5;
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Small size for toolbars and dense forms. */
|
|
81
|
+
.oc-phone-input--sm .oc-phone-input-dial,
|
|
82
|
+
.oc-phone-input--sm .oc-phone-input-number {
|
|
83
|
+
padding-block: 0.25rem;
|
|
84
|
+
font-size: 0.8rem;
|
|
85
|
+
}
|