@ids-group-ltd/ids-design-system 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@ids-group-ltd/ids-design-system",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "IDS Group Angular design system: components, tokens, themes",
5
- "license": "UNLICENSED",
5
+ "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://bitbucket.org/itband/ids-design-system.git"
9
9
  },
10
+ "homepage": "https://ids-ds.proto.ids-group.co.uk/",
10
11
  "keywords": [
11
12
  "angular",
12
13
  "design-system",
@@ -1,117 +1,117 @@
1
- // Dropdown panel styles — GLOBAL because the panel is portaled via CDK
2
- // Overlay outside the host component's DOM tree, so emulated encapsulation
3
- // (and any `:host ::ng-deep` selectors) cannot reach it. The component sets
4
- // `panelClass: 'ds-dropdown-panel'` on the overlay config; this partial
5
- // declares the matching rules so the portaled panel renders styled.
6
-
7
- .ds-dropdown-panel {
8
- .dropdown-panel {
9
- // Fill the cdk-overlay-pane width (set from trigger.getBoundingClientRect()
10
- // in dropdown.component.ts). Without `width: 100%` the panel is a flex
11
- // child of the pane and shrinks to its own option content width.
12
- width: 100%;
13
- background: var(--surface-overlay);
14
- border: var(--border-width-default) solid var(--border-default);
15
- border-radius: var(--radius-md);
16
- box-shadow: var(--shadow-popover);
17
- padding: var(--space-1);
18
- max-height: 320px;
19
- overflow-y: auto;
20
- z-index: var(--layer-popover);
21
- }
22
-
23
- .dropdown-list {
24
- list-style: none;
25
- margin: 0;
26
- padding: 0;
27
- display: flex;
28
- flex-direction: column;
29
- gap: 2px;
30
- }
31
-
32
- .optgroup {
33
- list-style: none;
34
- display: flex;
35
- flex-direction: column;
36
- gap: 2px;
37
- }
38
-
39
- .optgroup-label {
40
- display: block;
41
- padding: var(--space-2) var(--space-3) var(--space-1);
42
- font: var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);
43
- color: var(--text-tertiary);
44
- text-transform: uppercase;
45
- letter-spacing: var(--letter-spacing-wide);
46
-
47
- // First group sits flush against the panel padding — no extra top space.
48
- &.is-first {
49
- padding-top: var(--space-1);
50
- }
51
- }
52
-
53
- .optgroup-list {
54
- list-style: none;
55
- margin: 0;
56
- padding: 0;
57
- display: flex;
58
- flex-direction: column;
59
- gap: 2px;
60
- }
61
-
62
- .option {
63
- display: flex;
64
- align-items: center;
65
- gap: var(--space-2);
66
- width: 100%;
67
- padding: var(--space-2) var(--space-2-5);
68
- border: 0;
69
- background: transparent;
70
- font: var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);
71
- color: var(--text-primary);
72
- cursor: pointer;
73
- border-radius: var(--radius-sm);
74
- text-align: left;
75
-
76
- .option-icon {
77
- color: var(--icon-default);
78
- flex: 0 0 auto;
79
- }
80
-
81
- .option-label {
82
- flex: 1;
83
- min-width: 0;
84
- overflow: hidden;
85
- text-overflow: ellipsis;
86
- white-space: nowrap;
87
- }
88
-
89
- .option-check {
90
- color: var(--primary);
91
- flex: 0 0 auto;
92
- }
93
-
94
- &:hover:not(.is-disabled),
95
- &.is-active:not(.is-disabled) {
96
- background: var(--surface-secondary);
97
- }
98
-
99
- &:focus-visible {
100
- outline: none;
101
- box-shadow: var(--focus-ring);
102
- }
103
-
104
- &.is-selected {
105
- background: var(--primary-subtle);
106
- color: var(--primary-strong);
107
-
108
- .option-icon { color: var(--primary-strong); }
109
- }
110
-
111
- &.is-disabled {
112
- color: var(--text-disabled);
113
- cursor: not-allowed;
114
- opacity: var(--opacity-muted);
115
- }
116
- }
117
- }
1
+ // Dropdown panel styles — GLOBAL because the panel is portaled via CDK
2
+ // Overlay outside the host component's DOM tree, so emulated encapsulation
3
+ // (and any `:host ::ng-deep` selectors) cannot reach it. The component sets
4
+ // `panelClass: 'ds-dropdown-panel'` on the overlay config; this partial
5
+ // declares the matching rules so the portaled panel renders styled.
6
+
7
+ .ds-dropdown-panel {
8
+ .dropdown-panel {
9
+ // Fill the cdk-overlay-pane width (set from trigger.getBoundingClientRect()
10
+ // in dropdown.component.ts). Without `width: 100%` the panel is a flex
11
+ // child of the pane and shrinks to its own option content width.
12
+ width: 100%;
13
+ background: var(--surface-overlay);
14
+ border: var(--border-width-default) solid var(--border-default);
15
+ border-radius: var(--radius-md);
16
+ box-shadow: var(--shadow-popover);
17
+ padding: var(--space-1);
18
+ max-height: 320px;
19
+ overflow-y: auto;
20
+ z-index: var(--layer-popover);
21
+ }
22
+
23
+ .dropdown-list {
24
+ list-style: none;
25
+ margin: 0;
26
+ padding: 0;
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: 2px;
30
+ }
31
+
32
+ .optgroup {
33
+ list-style: none;
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 2px;
37
+ }
38
+
39
+ .optgroup-label {
40
+ display: block;
41
+ padding: var(--space-2) var(--space-3) var(--space-1);
42
+ font: var(--font-weight-semibold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);
43
+ color: var(--text-tertiary);
44
+ text-transform: uppercase;
45
+ letter-spacing: var(--letter-spacing-wide);
46
+
47
+ // First group sits flush against the panel padding — no extra top space.
48
+ &.is-first {
49
+ padding-top: var(--space-1);
50
+ }
51
+ }
52
+
53
+ .optgroup-list {
54
+ list-style: none;
55
+ margin: 0;
56
+ padding: 0;
57
+ display: flex;
58
+ flex-direction: column;
59
+ gap: 2px;
60
+ }
61
+
62
+ .option {
63
+ display: flex;
64
+ align-items: center;
65
+ gap: var(--space-2);
66
+ width: 100%;
67
+ padding: var(--space-2) var(--space-2-5);
68
+ border: 0;
69
+ background: transparent;
70
+ font: var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);
71
+ color: var(--text-primary);
72
+ cursor: pointer;
73
+ border-radius: var(--radius-sm);
74
+ text-align: left;
75
+
76
+ .option-icon {
77
+ color: var(--icon-default);
78
+ flex: 0 0 auto;
79
+ }
80
+
81
+ .option-label {
82
+ flex: 1;
83
+ min-width: 0;
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ white-space: nowrap;
87
+ }
88
+
89
+ .option-check {
90
+ color: var(--primary);
91
+ flex: 0 0 auto;
92
+ }
93
+
94
+ &:hover:not(.is-disabled),
95
+ &.is-active:not(.is-disabled) {
96
+ background: var(--surface-secondary);
97
+ }
98
+
99
+ &:focus-visible {
100
+ outline: none;
101
+ box-shadow: var(--focus-ring);
102
+ }
103
+
104
+ &.is-selected {
105
+ background: var(--primary-subtitle);
106
+ color: var(--primary-strong);
107
+
108
+ .option-icon { color: var(--primary-strong); }
109
+ }
110
+
111
+ &.is-disabled {
112
+ color: var(--text-disabled);
113
+ cursor: not-allowed;
114
+ opacity: var(--opacity-muted);
115
+ }
116
+ }
117
+ }
@@ -1,59 +1,59 @@
1
- // Self-hosted DS default fonts (latin subset). Consumers override --font-sans / --font-mono to swap.
2
-
3
- @font-face {
4
- font-family: 'Mulish';
5
- font-style: normal;
6
- font-weight: 400;
7
- font-display: swap;
8
- src: url('./fonts/mulish-latin-400-normal.woff2') format('woff2');
9
- }
10
- @font-face {
11
- font-family: 'Mulish';
12
- font-style: normal;
13
- font-weight: 500;
14
- font-display: swap;
15
- src: url('./fonts/mulish-latin-500-normal.woff2') format('woff2');
16
- }
17
- @font-face {
18
- font-family: 'Mulish';
19
- font-style: normal;
20
- font-weight: 600;
21
- font-display: swap;
22
- src: url('./fonts/mulish-latin-600-normal.woff2') format('woff2');
23
- }
24
- @font-face {
25
- font-family: 'Mulish';
26
- font-style: normal;
27
- font-weight: 700;
28
- font-display: swap;
29
- src: url('./fonts/mulish-latin-700-normal.woff2') format('woff2');
30
- }
31
- @font-face {
32
- font-family: 'Mulish';
33
- font-style: normal;
34
- font-weight: 800;
35
- font-display: swap;
36
- src: url('./fonts/mulish-latin-800-normal.woff2') format('woff2');
37
- }
38
-
39
- @font-face {
40
- font-family: 'JetBrains Mono';
41
- font-style: normal;
42
- font-weight: 400;
43
- font-display: swap;
44
- src: url('./fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
45
- }
46
- @font-face {
47
- font-family: 'JetBrains Mono';
48
- font-style: normal;
49
- font-weight: 500;
50
- font-display: swap;
51
- src: url('./fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
52
- }
53
- @font-face {
54
- font-family: 'JetBrains Mono';
55
- font-style: normal;
56
- font-weight: 600;
57
- font-display: swap;
58
- src: url('./fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
59
- }
1
+ // Self-hosted DS default fonts (latin subset). Consumers override --font-sans / --font-mono to swap.
2
+
3
+ @font-face {
4
+ font-family: 'Mulish';
5
+ font-style: normal;
6
+ font-weight: 400;
7
+ font-display: swap;
8
+ src: url('./fonts/mulish-latin-400-normal.woff2') format('woff2');
9
+ }
10
+ @font-face {
11
+ font-family: 'Mulish';
12
+ font-style: normal;
13
+ font-weight: 500;
14
+ font-display: swap;
15
+ src: url('./fonts/mulish-latin-500-normal.woff2') format('woff2');
16
+ }
17
+ @font-face {
18
+ font-family: 'Mulish';
19
+ font-style: normal;
20
+ font-weight: 600;
21
+ font-display: swap;
22
+ src: url('./fonts/mulish-latin-600-normal.woff2') format('woff2');
23
+ }
24
+ @font-face {
25
+ font-family: 'Mulish';
26
+ font-style: normal;
27
+ font-weight: 700;
28
+ font-display: swap;
29
+ src: url('./fonts/mulish-latin-700-normal.woff2') format('woff2');
30
+ }
31
+ @font-face {
32
+ font-family: 'Mulish';
33
+ font-style: normal;
34
+ font-weight: 800;
35
+ font-display: swap;
36
+ src: url('./fonts/mulish-latin-800-normal.woff2') format('woff2');
37
+ }
38
+
39
+ @font-face {
40
+ font-family: 'JetBrains Mono';
41
+ font-style: normal;
42
+ font-weight: 400;
43
+ font-display: swap;
44
+ src: url('./fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
45
+ }
46
+ @font-face {
47
+ font-family: 'JetBrains Mono';
48
+ font-style: normal;
49
+ font-weight: 500;
50
+ font-display: swap;
51
+ src: url('./fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
52
+ }
53
+ @font-face {
54
+ font-family: 'JetBrains Mono';
55
+ font-style: normal;
56
+ font-weight: 600;
57
+ font-display: swap;
58
+ src: url('./fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
59
+ }
@@ -1,9 +1,9 @@
1
- // Icon-base sizing — `.icon` class is used inside components to size <ds-icon> svg elements.
2
- // The actual <svg> is rendered by IconComponent; this class sets default size.
3
- .icon {
4
- --_icon-size: var(--ds-icon-size, var(--icon-md));
5
-
6
- width: var(--_icon-size);
7
- height: var(--_icon-size);
8
- flex-shrink: 0;
9
- }
1
+ // Icon-base sizing — `.icon` class is used inside components to size <ds-icon> svg elements.
2
+ // The actual <svg> is rendered by IconComponent; this class sets default size.
3
+ .icon {
4
+ --_icon-size: var(--ds-icon-size, var(--icon-md));
5
+
6
+ width: var(--_icon-size);
7
+ height: var(--_icon-size);
8
+ flex-shrink: 0;
9
+ }
package/styles/_link.scss CHANGED
@@ -1,77 +1,77 @@
1
- /* Global .link helper — pure CSS class (no Angular wrapper) so consumers
2
- can apply it to inline anchors inside <p> text without disrupting line
3
- flow. Modifiers: .quiet, .inline, .standalone, .xs, .sm, .lg. */
4
-
5
- .link {
6
- /* Public --ds-link-* are read with fallbacks, never declared — consumer
7
- overrides inherit in. Hover/active derive from the resolved color. */
8
- --_link-color: var(--ds-link-color, var(--text-link));
9
- --_link-color-hover: var(--ds-link-color-hover, color-mix(in srgb, var(--_link-color) 80%, black));
10
- --_link-color-active: var(--ds-link-color-active, color-mix(in srgb, var(--_link-color) 65%, black));
11
-
12
- color: var(--_link-color);
13
- text-decoration: underline;
14
- text-decoration-color: var(--_link-color);
15
- text-underline-offset: 2px;
16
- text-decoration-thickness: 1px;
17
- font-weight: var(--font-weight-medium);
18
- cursor: pointer;
19
- transition: color var(--duration-fast) var(--ease-standard), text-decoration-color var(--duration-fast) var(--ease-standard);
20
-
21
- &:hover {
22
- color: var(--_link-color-hover);
23
- text-decoration-color: var(--_link-color-hover);
24
- }
25
-
26
- &:active {
27
- color: var(--_link-color-active);
28
- text-decoration-color: var(--_link-color-active);
29
- }
30
-
31
- &:focus-visible {
32
- outline: none;
33
- box-shadow: var(--focus-ring);
34
- border-radius: var(--radius-sm);
35
- text-decoration-color: var(--_link-color);
36
- }
37
-
38
- &[aria-disabled="true"] {
39
- color: var(--text-disabled);
40
- text-decoration-color: var(--text-disabled);
41
- pointer-events: none;
42
- cursor: default;
43
- }
44
-
45
- .icon {
46
- color: currentColor;
47
- flex-shrink: 0;
48
- }
49
-
50
- &.quiet {
51
- color: var(--text-secondary);
52
- /* Pull the underline down to match the muted text — the base rule sets
53
- text-decoration-color to the link color, which would leave a bright
54
- underline under grey text at rest. */
55
- text-decoration-color: var(--text-secondary);
56
- font-weight: var(--font-weight-medium);
57
-
58
- &:hover {
59
- color: var(--text-primary);
60
- text-decoration-color: var(--text-primary);
61
- }
62
- }
63
-
64
- &.inline {
65
- font-weight: inherit;
66
- font-size: inherit;
67
- line-height: inherit;
68
- }
69
-
70
- &.standalone {
71
- font-weight: var(--font-weight-bold);
72
- }
73
-
74
- &.xs { font-size: var(--font-size-xs); }
75
- &.sm { font-size: var(--font-size-s); }
76
- &.lg { font-size: var(--font-size-l); }
77
- }
1
+ /* Global .link helper — pure CSS class (no Angular wrapper) so consumers
2
+ can apply it to inline anchors inside <p> text without disrupting line
3
+ flow. Modifiers: .quiet, .inline, .standalone, .xs, .sm, .lg. */
4
+
5
+ .link {
6
+ /* Public --ds-link-* are read with fallbacks, never declared — consumer
7
+ overrides inherit in. Hover/active derive from the resolved color. */
8
+ --_link-color: var(--ds-link-color, var(--text-link));
9
+ --_link-color-hover: var(--ds-link-color-hover, color-mix(in srgb, var(--_link-color) 80%, black));
10
+ --_link-color-active: var(--ds-link-color-active, color-mix(in srgb, var(--_link-color) 65%, black));
11
+
12
+ color: var(--_link-color);
13
+ text-decoration: underline;
14
+ text-decoration-color: var(--_link-color);
15
+ text-underline-offset: 2px;
16
+ text-decoration-thickness: 1px;
17
+ font-weight: var(--font-weight-medium);
18
+ cursor: pointer;
19
+ transition: color var(--duration-fast) var(--ease-standard), text-decoration-color var(--duration-fast) var(--ease-standard);
20
+
21
+ &:hover {
22
+ color: var(--_link-color-hover);
23
+ text-decoration-color: var(--_link-color-hover);
24
+ }
25
+
26
+ &:active {
27
+ color: var(--_link-color-active);
28
+ text-decoration-color: var(--_link-color-active);
29
+ }
30
+
31
+ &:focus-visible {
32
+ outline: none;
33
+ box-shadow: var(--focus-ring);
34
+ border-radius: var(--radius-sm);
35
+ text-decoration-color: var(--_link-color);
36
+ }
37
+
38
+ &[aria-disabled="true"] {
39
+ color: var(--text-disabled);
40
+ text-decoration-color: var(--text-disabled);
41
+ pointer-events: none;
42
+ cursor: default;
43
+ }
44
+
45
+ .icon {
46
+ color: currentColor;
47
+ flex-shrink: 0;
48
+ }
49
+
50
+ &.quiet {
51
+ color: var(--text-secondary);
52
+ /* Pull the underline down to match the muted text — the base rule sets
53
+ text-decoration-color to the link color, which would leave a bright
54
+ underline under grey text at rest. */
55
+ text-decoration-color: var(--text-secondary);
56
+ font-weight: var(--font-weight-medium);
57
+
58
+ &:hover {
59
+ color: var(--text-primary);
60
+ text-decoration-color: var(--text-primary);
61
+ }
62
+ }
63
+
64
+ &.inline {
65
+ font-weight: inherit;
66
+ font-size: inherit;
67
+ line-height: inherit;
68
+ }
69
+
70
+ &.standalone {
71
+ font-weight: var(--font-weight-bold);
72
+ }
73
+
74
+ &.xs { font-size: var(--font-size-xs); }
75
+ &.sm { font-size: var(--font-size-s); }
76
+ &.lg { font-size: var(--font-size-l); }
77
+ }
@@ -1,17 +1,17 @@
1
- // Reset — ported from CLAUDE_DESIGN_DS/tokens.css §Base.
2
-
3
- *, *::before, *::after { box-sizing: border-box; }
4
- html, body {
5
- margin: 0;
6
- font-family: var(--font-sans);
7
- color: var(--text-primary);
8
- background: var(--surface-canvas);
9
- -webkit-font-smoothing: antialiased;
10
- text-rendering: optimizeLegibility;
11
- }
12
- button, input, select, textarea { font-family: inherit; }
13
-
14
- /* Zero the browser's default heading margins (~0.83em) — they otherwise leak
15
- into consumers and mangle spacing. Headings get their size from .t-* utils;
16
- spacing is owned by the surrounding layout (gap / margin), not the element. */
17
- h1, h2, h3, h4, h5, h6 { margin: 0; }
1
+ // Reset — ported from CLAUDE_DESIGN_DS/tokens.css §Base.
2
+
3
+ *, *::before, *::after { box-sizing: border-box; }
4
+ html, body {
5
+ margin: 0;
6
+ font-family: var(--font-sans);
7
+ color: var(--text-primary);
8
+ background: var(--surface-canvas);
9
+ -webkit-font-smoothing: antialiased;
10
+ text-rendering: optimizeLegibility;
11
+ }
12
+ button, input, select, textarea { font-family: inherit; }
13
+
14
+ /* Zero the browser's default heading margins (~0.83em) — they otherwise leak
15
+ into consumers and mangle spacing. Headings get their size from .t-* utils;
16
+ spacing is owned by the surrounding layout (gap / margin), not the element. */
17
+ h1, h2, h3, h4, h5, h6 { margin: 0; }
@@ -1,17 +1,17 @@
1
- // Scrollbar — ported verbatim from CLAUDE_DESIGN_DS/components-extras.css §Global scrollbar.
2
- // Brand-tinted neutral thumb applied globally.
3
-
4
- html { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
5
- *::-webkit-scrollbar { width: var(--scrollbar-w); height: var(--scrollbar-w); }
6
- *::-webkit-scrollbar-track { background: transparent; }
7
- *::-webkit-scrollbar-thumb {
8
- background: var(--scrollbar-thumb);
9
- border-radius: var(--radius-pill);
10
- border: var(--space-0-5) solid transparent;
11
- background-clip: padding-box;
12
- }
13
- *::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
14
- *::-webkit-scrollbar-thumb:active { background: var(--scrollbar-thumb-active); background-clip: padding-box; }
15
-
16
- // Global text-selection — sourced from components-extras.css line 910.
17
- ::selection { background: var(--select-bg, color-mix(in srgb, var(--primary) 22%, transparent)); color: var(--text-primary); }
1
+ // Scrollbar — ported verbatim from CLAUDE_DESIGN_DS/components-extras.css §Global scrollbar.
2
+ // Brand-tinted neutral thumb applied globally.
3
+
4
+ html { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
5
+ *::-webkit-scrollbar { width: var(--scrollbar-w); height: var(--scrollbar-w); }
6
+ *::-webkit-scrollbar-track { background: transparent; }
7
+ *::-webkit-scrollbar-thumb {
8
+ background: var(--scrollbar-thumb);
9
+ border-radius: var(--radius-pill);
10
+ border: var(--space-0-5) solid transparent;
11
+ background-clip: padding-box;
12
+ }
13
+ *::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
14
+ *::-webkit-scrollbar-thumb:active { background: var(--scrollbar-thumb-active); background-clip: padding-box; }
15
+
16
+ // Global text-selection — sourced from components-extras.css line 910.
17
+ ::selection { background: var(--select-bg, color-mix(in srgb, var(--primary) 22%, transparent)); color: var(--text-primary); }
@@ -1,6 +1,6 @@
1
- // Toast overlay panel — GLOBAL (portaled via CDK Overlay, outside component DOM).
2
- // ToastService sets panelClass: 'ds-toast-panel'. CDK overlays stack by DOM
3
- // insertion order, so lift the toast wrapper above modals/drawers explicitly.
4
- .cdk-global-overlay-wrapper:has(> .ds-toast-panel) {
5
- z-index: var(--layer-toast);
6
- }
1
+ // Toast overlay panel — GLOBAL (portaled via CDK Overlay, outside component DOM).
2
+ // ToastService sets panelClass: 'ds-toast-panel'. CDK overlays stack by DOM
3
+ // insertion order, so lift the toast wrapper above modals/drawers explicitly.
4
+ .cdk-global-overlay-wrapper:has(> .ds-toast-panel) {
5
+ z-index: var(--layer-toast);
6
+ }