@digiko-npm/designsystem 0.7.2 → 0.8.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/designsystem.css +6682 -4515
- package/dist/designsystem.min.css +2 -2
- package/package.json +18 -3
- package/src/components/accordion.css +129 -128
- package/src/components/alert.css +137 -134
- package/src/components/avatar.css +77 -77
- package/src/components/badge.css +52 -52
- package/src/components/bottom-nav.css +71 -71
- package/src/components/bottom-sheet.css +146 -0
- package/src/components/breadcrumb.css +61 -61
- package/src/components/button.css +162 -154
- package/src/components/card.css +94 -72
- package/src/components/chip.css +38 -38
- package/src/components/collapsible.css +96 -100
- package/src/components/color-picker.css +82 -0
- package/src/components/combobox.css +418 -0
- package/src/components/command.css +141 -140
- package/src/components/copy-button.css +106 -0
- package/src/components/datepicker.css +257 -251
- package/src/components/description-list.css +89 -87
- package/src/components/divider.css +45 -45
- package/src/components/drawer.css +185 -174
- package/src/components/drop-zone.css +85 -84
- package/src/components/dropdown.css +148 -140
- package/src/components/empty-state.css +50 -50
- package/src/components/field.css +35 -0
- package/src/components/gallery.css +257 -0
- package/src/components/icon-btn.css +2 -1
- package/src/components/index.css +14 -3
- package/src/components/input.css +205 -146
- package/src/components/kbd.css +10 -10
- package/src/components/modal.css +92 -90
- package/src/components/nav.css +140 -138
- package/src/components/number-input.css +163 -0
- package/src/components/pagination.css +152 -139
- package/src/components/pin-input.css +136 -0
- package/src/components/popover.css +72 -72
- package/src/components/progress.css +128 -129
- package/src/components/result.css +53 -57
- package/src/components/scroll-area.css +73 -0
- package/src/components/search.css +10 -4
- package/src/components/segmented-control.css +93 -0
- package/src/components/skeleton.css +58 -58
- package/src/components/slider.css +102 -100
- package/src/components/sortable.css +44 -45
- package/src/components/spinner.css +27 -27
- package/src/components/star-rating.css +121 -0
- package/src/components/stat-card.css +38 -25
- package/src/components/table.css +288 -3
- package/src/components/tabs.css +121 -121
- package/src/components/tag.css +124 -124
- package/src/components/timeline.css +99 -99
- package/src/components/toast.css +37 -38
- package/src/components/toggle.css +88 -88
- package/src/components/toolbar.css +137 -121
- package/src/components/tooltip.css +150 -150
- package/src/components/truncated-text.css +75 -0
- package/src/tokens/tokens.json +413 -0
package/src/components/chip.css
CHANGED
|
@@ -33,47 +33,47 @@
|
|
|
33
33
|
border: 1px solid var(--ds-color-border);
|
|
34
34
|
border-radius: var(--ds-radius-full);
|
|
35
35
|
white-space: nowrap;
|
|
36
|
-
}
|
|
37
36
|
|
|
38
|
-
/* Logic chip (AND/OR toggle) */
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
37
|
+
/* Logic chip (AND/OR toggle) */
|
|
38
|
+
&--logic {
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
color: var(--ds-color-text-tertiary);
|
|
42
|
+
background: transparent;
|
|
43
|
+
border-color: var(--ds-color-border);
|
|
44
|
+
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
46
|
+
&:hover {
|
|
47
|
+
background: var(--ds-color-overlay-hover);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
51
50
|
|
|
52
|
-
/* Sort chip (dashed border) */
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
51
|
+
/* Sort chip (dashed border) */
|
|
52
|
+
&--sort {
|
|
53
|
+
border-style: dashed;
|
|
54
|
+
}
|
|
56
55
|
|
|
57
|
-
/* Remove button */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
56
|
+
/* Remove button */
|
|
57
|
+
&__remove {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
width: 14px;
|
|
62
|
+
height: 14px;
|
|
63
|
+
min-width: 1.5rem; /* WCAG 2.5.8: minimum 24px target */
|
|
64
|
+
min-height: 1.5rem;
|
|
65
|
+
border: none;
|
|
66
|
+
border-radius: var(--ds-radius-full);
|
|
67
|
+
background: transparent;
|
|
68
|
+
color: var(--ds-color-text-tertiary);
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
transition:
|
|
71
|
+
color var(--ds-duration-fast) var(--ds-ease-default),
|
|
72
|
+
background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
&:hover {
|
|
75
|
+
color: var(--ds-color-text);
|
|
76
|
+
background: var(--ds-color-overlay-hover);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
79
|
}
|
|
@@ -8,109 +8,105 @@
|
|
|
8
8
|
- Content: id matching aria-controls
|
|
9
9
|
========================================================================== */
|
|
10
10
|
|
|
11
|
-
/* ---------------------------------------------------------------------------
|
|
12
|
-
Container
|
|
13
|
-
--------------------------------------------------------------------------- */
|
|
14
|
-
|
|
15
11
|
.ds-collapsible {
|
|
16
12
|
border: 1px solid var(--ds-color-border);
|
|
17
13
|
border-radius: var(--ds-radius-xl);
|
|
18
14
|
overflow: hidden;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* ---------------------------------------------------------------------------
|
|
22
|
-
Trigger (button)
|
|
23
|
-
--------------------------------------------------------------------------- */
|
|
24
|
-
|
|
25
|
-
.ds-collapsible__trigger {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: row;
|
|
28
|
-
justify-content: space-between;
|
|
29
|
-
align-items: center;
|
|
30
|
-
width: 100%;
|
|
31
|
-
padding: var(--ds-space-4);
|
|
32
|
-
text-align: start;
|
|
33
|
-
font-family: var(--ds-font-sans);
|
|
34
|
-
font-size: var(--ds-text-sm);
|
|
35
|
-
font-weight: var(--ds-weight-medium);
|
|
36
|
-
color: var(--ds-color-text);
|
|
37
|
-
background: transparent;
|
|
38
|
-
border: 0;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ds-collapsible__trigger:hover {
|
|
44
|
-
background-color: var(--ds-color-overlay);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.ds-collapsible__trigger:focus-visible {
|
|
48
|
-
outline: none;
|
|
49
|
-
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
50
|
-
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* ---------------------------------------------------------------------------
|
|
54
|
-
Chevron icon (CSS border-arrow)
|
|
55
|
-
--------------------------------------------------------------------------- */
|
|
56
|
-
|
|
57
|
-
.ds-collapsible__icon {
|
|
58
|
-
flex-shrink: 0;
|
|
59
|
-
width: 0.5rem;
|
|
60
|
-
height: 0.5rem;
|
|
61
|
-
border-inline-end: 2px solid var(--ds-color-text-secondary);
|
|
62
|
-
border-block-end: 2px solid var(--ds-color-text-secondary);
|
|
63
|
-
transform: rotate(45deg);
|
|
64
|
-
margin-inline-start: var(--ds-space-3);
|
|
65
|
-
transition: transform var(--ds-duration-fast) var(--ds-ease-default);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.ds-collapsible--open .ds-collapsible__icon {
|
|
69
|
-
transform: rotate(225deg);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* ---------------------------------------------------------------------------
|
|
73
|
-
Collapsible content
|
|
74
|
-
--------------------------------------------------------------------------- */
|
|
75
|
-
|
|
76
|
-
.ds-collapsible__content {
|
|
77
|
-
max-height: 0;
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
transition:
|
|
80
|
-
max-height var(--ds-duration-normal) var(--ds-ease-default),
|
|
81
|
-
padding var(--ds-duration-normal) var(--ds-ease-default);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.ds-collapsible--open .ds-collapsible__content {
|
|
85
|
-
max-height: 80rem;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* ---------------------------------------------------------------------------
|
|
89
|
-
Inner body
|
|
90
|
-
--------------------------------------------------------------------------- */
|
|
91
|
-
|
|
92
|
-
.ds-collapsible__body {
|
|
93
|
-
padding: var(--ds-space-4);
|
|
94
|
-
padding-block-start: 0;
|
|
95
|
-
font-size: var(--ds-text-sm);
|
|
96
|
-
color: var(--ds-color-text-secondary);
|
|
97
|
-
line-height: var(--ds-leading-relaxed);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* ---------------------------------------------------------------------------
|
|
101
|
-
Variant: Flush (no border, no radius)
|
|
102
|
-
--------------------------------------------------------------------------- */
|
|
103
|
-
|
|
104
|
-
.ds-collapsible--flush {
|
|
105
|
-
border: 0;
|
|
106
|
-
border-radius: 0;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* ---------------------------------------------------------------------------
|
|
110
|
-
Variant: Ghost (no border, transparent bg)
|
|
111
|
-
--------------------------------------------------------------------------- */
|
|
112
15
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
16
|
+
/* ---------------------------------------------------------------------------
|
|
17
|
+
Trigger (button)
|
|
18
|
+
--------------------------------------------------------------------------- */
|
|
19
|
+
|
|
20
|
+
&__trigger {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: row;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
align-items: center;
|
|
25
|
+
width: 100%;
|
|
26
|
+
padding: var(--ds-space-4);
|
|
27
|
+
text-align: start;
|
|
28
|
+
font-family: var(--ds-font-sans);
|
|
29
|
+
font-size: var(--ds-text-sm);
|
|
30
|
+
font-weight: var(--ds-weight-medium);
|
|
31
|
+
color: var(--ds-color-text);
|
|
32
|
+
background: transparent;
|
|
33
|
+
border: 0;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: var(--ds-color-overlay);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:focus-visible {
|
|
42
|
+
outline: none;
|
|
43
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
44
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* ---------------------------------------------------------------------------
|
|
49
|
+
Chevron icon (CSS border-arrow)
|
|
50
|
+
--------------------------------------------------------------------------- */
|
|
51
|
+
|
|
52
|
+
&__icon {
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
width: 0.5rem;
|
|
55
|
+
height: 0.5rem;
|
|
56
|
+
border-inline-end: 2px solid var(--ds-color-text-secondary);
|
|
57
|
+
border-block-end: 2px solid var(--ds-color-text-secondary);
|
|
58
|
+
transform: rotate(45deg);
|
|
59
|
+
margin-inline-start: var(--ds-space-3);
|
|
60
|
+
transition: transform var(--ds-duration-fast) var(--ds-ease-default);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--open &__icon {
|
|
64
|
+
transform: rotate(225deg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ---------------------------------------------------------------------------
|
|
68
|
+
Collapsible content
|
|
69
|
+
--------------------------------------------------------------------------- */
|
|
70
|
+
|
|
71
|
+
&__content {
|
|
72
|
+
max-height: 0;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
transition:
|
|
75
|
+
max-height var(--ds-duration-normal) var(--ds-ease-default),
|
|
76
|
+
padding var(--ds-duration-normal) var(--ds-ease-default);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&--open &__content {
|
|
80
|
+
max-height: 80rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ---------------------------------------------------------------------------
|
|
84
|
+
Inner body
|
|
85
|
+
--------------------------------------------------------------------------- */
|
|
86
|
+
|
|
87
|
+
&__body {
|
|
88
|
+
padding: var(--ds-space-4);
|
|
89
|
+
padding-block-start: 0;
|
|
90
|
+
font-size: var(--ds-text-sm);
|
|
91
|
+
color: var(--ds-color-text-secondary);
|
|
92
|
+
line-height: var(--ds-leading-relaxed);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ---------------------------------------------------------------------------
|
|
96
|
+
Variant: Flush (no border, no radius)
|
|
97
|
+
--------------------------------------------------------------------------- */
|
|
98
|
+
|
|
99
|
+
&--flush {
|
|
100
|
+
border: 0;
|
|
101
|
+
border-radius: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ---------------------------------------------------------------------------
|
|
105
|
+
Variant: Ghost (no border, transparent bg)
|
|
106
|
+
--------------------------------------------------------------------------- */
|
|
107
|
+
|
|
108
|
+
&--ghost {
|
|
109
|
+
border: 0;
|
|
110
|
+
background: transparent;
|
|
111
|
+
}
|
|
116
112
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Color Picker
|
|
3
|
+
Grid of color swatches for selection. CSS-only styling.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Container: role="radiogroup", aria-label="Color"
|
|
7
|
+
- Each swatch: role="radio", aria-checked="true|false", aria-label="[color name]"
|
|
8
|
+
- Keyboard: ArrowKeys to navigate, Space/Enter to select
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
<div class="ds-color-picker" role="radiogroup" aria-label="Color">
|
|
12
|
+
<button class="ds-color-picker__swatch ds-color-picker__swatch--active"
|
|
13
|
+
role="radio" aria-checked="true" aria-label="Red"
|
|
14
|
+
style="--swatch-color: #ef4444"></button>
|
|
15
|
+
<button class="ds-color-picker__swatch"
|
|
16
|
+
role="radio" aria-checked="false" aria-label="Blue"
|
|
17
|
+
style="--swatch-color: #3b82f6"></button>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
Modifiers:
|
|
21
|
+
.ds-color-picker--sm — Smaller swatches
|
|
22
|
+
.ds-color-picker--lg — Larger swatches
|
|
23
|
+
========================================================================== */
|
|
24
|
+
|
|
25
|
+
.ds-color-picker {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
gap: var(--ds-space-1-5);
|
|
29
|
+
|
|
30
|
+
&__swatch {
|
|
31
|
+
width: 2rem;
|
|
32
|
+
height: 2rem;
|
|
33
|
+
border-radius: var(--ds-radius-md);
|
|
34
|
+
border: 2px solid transparent;
|
|
35
|
+
background-color: var(--swatch-color);
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
padding: 0;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
transition:
|
|
40
|
+
border-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
41
|
+
transform var(--ds-duration-fast) var(--ds-ease-default),
|
|
42
|
+
box-shadow var(--ds-duration-fast) var(--ds-ease-default);
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
transform: scale(1.1);
|
|
46
|
+
border-color: var(--ds-color-border);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
outline: none;
|
|
51
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
52
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--active {
|
|
56
|
+
border-color: var(--ds-color-text);
|
|
57
|
+
box-shadow: 0 0 0 2px var(--ds-color-surface), 0 0 0 4px var(--swatch-color);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* --- Small variant --- */
|
|
62
|
+
&--sm &__swatch {
|
|
63
|
+
width: 1.5rem;
|
|
64
|
+
height: 1.5rem;
|
|
65
|
+
border-radius: var(--ds-radius-sm);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--sm {
|
|
69
|
+
gap: var(--ds-space-1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* --- Large variant --- */
|
|
73
|
+
&--lg &__swatch {
|
|
74
|
+
width: 2.5rem;
|
|
75
|
+
height: 2.5rem;
|
|
76
|
+
border-radius: var(--ds-radius-lg);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&--lg {
|
|
80
|
+
gap: var(--ds-space-2);
|
|
81
|
+
}
|
|
82
|
+
}
|