@ndwnu/design-system 6.0.0 → 7.0.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/assets/icons.ts +83 -0
- package/fesm2022/ndwnu-design-system.mjs +869 -929
- package/fesm2022/ndwnu-design-system.mjs.map +1 -1
- package/index.d.ts +2 -5
- package/{components → lib/components}/card/card.component.d.ts +2 -1
- package/{components → lib/components}/form-field/checkbox/checkbox.component.d.ts +3 -2
- package/{components → lib/components}/form-field/clear-search-button/clear-search-button.component.d.ts +1 -1
- package/lib/components/form-field/clear-search-button/index.d.ts +1 -0
- package/{components → lib/components}/form-field/file-upload/file-upload.component.d.ts +8 -7
- package/{components → lib/components}/form-field/input-button/input-button.component.d.ts +1 -1
- package/{components → lib/components}/form-field/month-input/month-input.component.d.ts +8 -7
- package/{components → lib/components}/form-field/option-group/option-group.component.d.ts +7 -4
- package/lib/components/form-field/picker-button/index.d.ts +1 -0
- package/{components → lib/components}/form-field/picker-button/picker-button.component.d.ts +1 -2
- package/{components → lib/components}/icon/action-icon/action-icon.component.d.ts +1 -1
- package/lib/components/icon/icon.component.d.ts +6 -0
- package/{components → lib/components}/layout/layout.component.d.ts +2 -2
- package/{components → lib/components}/main-navigation/main-navigation.component.d.ts +2 -10
- package/lib/components/tab/tab.component.d.ts +17 -0
- package/{components → lib/components}/tab-group/tab-group.component.d.ts +7 -5
- package/{components → lib/components}/toast/toast.component.d.ts +4 -4
- package/package.json +14 -8
- package/styles/base/_colors.scss +234 -0
- package/styles/base/_typography.scss +135 -0
- package/styles/base/_variables.scss +79 -0
- package/styles/base/colors.stories.model.ts +143 -0
- package/styles/base/colors.stories.ts +14 -0
- package/styles/base/colors.stories.utils.ts +58 -0
- package/styles/base/index.scss +3 -0
- package/styles/base/typography.stories.ts +116 -0
- package/styles/components/_button.scss +133 -0
- package/styles/components/_card.scss +3 -0
- package/styles/components/_divider.scss +12 -0
- package/styles/components/_dropdown.scss +8 -0
- package/styles/components/_filter-button.scss +39 -0
- package/styles/components/_input.scss +198 -0
- package/styles/components/_label.scss +23 -0
- package/styles/components/_link.scss +35 -0
- package/styles/components/_menu-button.scss +38 -0
- package/styles/components/_popover.scss +19 -0
- package/styles/components/_summary-card.scss +227 -0
- package/styles/components/divider.stories.ts +80 -0
- package/styles/components/index.scss +11 -0
- package/styles/components/link.stories.ts +154 -0
- package/styles/index.scss +4 -0
- package/styles/layout/_grid.scss +57 -0
- package/styles/layout/_overlay.scss +7 -0
- package/styles/layout/grid.stories.ts +117 -0
- package/styles/layout/index.scss +2 -0
- package/styles/storybook/_core.scss +60 -0
- package/styles/storybook/_reset.scss +20 -0
- package/styles/storybook/index.scss +17 -0
- package/styles/storybook/overrides/_buttons.scss +95 -0
- package/styles/storybook/overrides/_code-previews.scss +97 -0
- package/styles/storybook/overrides/_content.scss +24 -0
- package/styles/storybook/overrides/_headers.scss +31 -0
- package/styles/storybook/overrides/_layout.scss +44 -0
- package/styles/storybook/overrides/_table.scss +112 -0
- package/styles/storybook/overrides/index.scss +6 -0
- package/styles/storybook/overrides.css +343 -0
- package/styles/utils/_screenreader.scss +18 -0
- package/styles/utils/index.scss +1 -0
- package/assets/fonts/ObjectSans-Bold.woff2 +0 -0
- package/assets/fonts/ObjectSans-Regular.woff2 +0 -0
- package/components/icon/icon.component.d.ts +0 -13
- package/components/tab/tab.component.d.ts +0 -9
- package/core/style/styles.css +0 -1380
- package/core/style/styles.scss +0 -1380
- package/public-api.d.ts +0 -1
- package/assets/images/{ndw-logo-short.svg → logos/ndw-logo-short.svg} +0 -0
- package/assets/images/{ndw-logo.svg → logos/ndw-logo.svg} +0 -0
- package/assets/images/{nwb-logo-short.svg → logos/nwb-logo-short.svg} +0 -0
- package/assets/images/{nwb-logo.svg → logos/nwb-logo.svg} +0 -0
- package/{components → lib/components}/accordion/accordion.component.d.ts +0 -0
- package/{components → lib/components}/accordion/accordion.service.d.ts +0 -0
- package/{components → lib/components}/accordion/index.d.ts +0 -0
- package/{components → lib/components}/alert/alert.component.d.ts +0 -0
- package/{components → lib/components}/alert/alert.model.d.ts +0 -0
- package/{components → lib/components}/alert/index.d.ts +0 -0
- package/{components → lib/components}/badge/badge.component.d.ts +0 -0
- package/{components → lib/components}/badge/index.d.ts +0 -0
- package/{components → lib/components}/banner/banner.component.d.ts +0 -0
- package/{components → lib/components}/banner/banner.model.d.ts +0 -0
- package/{components → lib/components}/banner/index.d.ts +0 -0
- package/{components → lib/components}/breadcrumb/breadcrumb.component.d.ts +0 -0
- package/{components → lib/components}/breadcrumb/index.d.ts +0 -0
- package/{components → lib/components}/breadcrumb-group/breadcrumb-group.component.d.ts +0 -0
- package/{components → lib/components}/breadcrumb-group/index.d.ts +0 -0
- package/{components → lib/components}/button/button.directive.d.ts +0 -0
- package/{components → lib/components}/button/index.d.ts +0 -0
- package/{components → lib/components}/card/card-content/card-content.component.d.ts +0 -0
- package/{components → lib/components}/card/card-content/index.d.ts +0 -0
- package/{components → lib/components}/card/card-footer/card-footer.component.d.ts +0 -0
- package/{components → lib/components}/card/card-footer/index.d.ts +0 -0
- package/{components → lib/components}/card/card-header/card-header.component.d.ts +0 -0
- package/{components → lib/components}/card/card-header/index.d.ts +0 -0
- package/{components → lib/components}/card/card.animation.d.ts +0 -0
- package/{components → lib/components}/card/index.d.ts +0 -0
- package/{components → lib/components}/collapsible/collapsible.animation.d.ts +0 -0
- package/{components → lib/components}/collapsible/collapsible.component.d.ts +0 -0
- package/{components → lib/components}/collapsible/index.d.ts +0 -0
- package/{components → lib/components}/dashboard-card/dashboard-card.component.d.ts +0 -0
- package/{components → lib/components}/dashboard-card/index.d.ts +0 -0
- package/{components → lib/components}/dropdown/dropdown.component.d.ts +0 -0
- package/{components → lib/components}/dropdown/index.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-add-option/autosuggest-add-option.component.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-add-option/index.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-option/autosuggest-option.component.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-option/autosuggest-option.model.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-option/base-autosuggest-option.component.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-option/index.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest-panel/autosuggest-panel.component.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/autosuggest.directive.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/index.d.ts +0 -0
- package/{components → lib/components}/form-field/autosuggest/match-bold.pipe.d.ts +0 -0
- package/{components → lib/components}/form-field/checkbox/index.d.ts +0 -0
- package/{components → lib/components}/form-field/checkbox-group/checkbox-group.component.d.ts +0 -0
- package/{components → lib/components}/form-field/checkbox-group/index.d.ts +0 -0
- package/{components → lib/components}/form-field/error/error.component.d.ts +0 -0
- package/{components → lib/components}/form-field/error/index.d.ts +0 -0
- package/{components → lib/components}/form-field/file-upload/file-upload-text.interface.d.ts +0 -0
- package/{components → lib/components}/form-field/file-upload/index.d.ts +0 -0
- package/{components → lib/components}/form-field/form-field.component.d.ts +0 -0
- package/{components → lib/components}/form-field/form-field.constant.d.ts +0 -0
- package/{components → lib/components}/form-field/form-field.model.d.ts +0 -0
- package/{components → lib/components}/form-field/index.d.ts +0 -0
- package/{components → lib/components}/form-field/info/index.d.ts +0 -0
- package/{components → lib/components}/form-field/info/info.component.d.ts +0 -0
- package/{components → lib/components}/form-field/input/index.d.ts +0 -0
- package/{components → lib/components}/form-field/input/input.directive.d.ts +0 -0
- package/{components → lib/components}/form-field/input/input.model.d.ts +0 -0
- package/{components → lib/components}/form-field/input-button/index.d.ts +0 -0
- package/{components → lib/components}/form-field/input-icon/index.d.ts +0 -0
- package/{components → lib/components}/form-field/input-icon/input-icon.component.d.ts +0 -0
- package/{components → lib/components}/form-field/month-input/index.d.ts +0 -0
- package/{components → lib/components}/form-field/month-input/month-input-utils.d.ts +0 -0
- package/{components → lib/components}/form-field/option-group/index.d.ts +0 -0
- package/{components → lib/components}/form-field/option-group/option-group.model.d.ts +0 -0
- package/{components → lib/components}/form-field/option-group/option.component.d.ts +0 -0
- package/{components → lib/components}/form-field/radio-button/index.d.ts +0 -0
- package/{components → lib/components}/form-field/radio-button/radio-button.component.d.ts +0 -0
- package/{components → lib/components}/form-field/radio-group/index.d.ts +0 -0
- package/{components → lib/components}/form-field/radio-group/radio-group.component.d.ts +0 -0
- package/{components → lib/components}/form-field/success/index.d.ts +0 -0
- package/{components → lib/components}/form-field/success/success.component.d.ts +0 -0
- package/{components → lib/components}/form-field/textarea/auto-grow.directive.d.ts +0 -0
- package/{components → lib/components}/form-field/textarea/index.d.ts +0 -0
- package/{components → lib/components}/form-field/textarea/max-char.directive.d.ts +0 -0
- package/{components → lib/components}/icon/action-icon/index.d.ts +0 -0
- package/{components → lib/components}/icon/index.d.ts +0 -0
- package/{components → lib/components}/index.d.ts +0 -0
- package/{components → lib/components}/layout/index.d.ts +0 -0
- package/{components → lib/components}/layout-banners/index.d.ts +0 -0
- package/{components → lib/components}/layout-banners/layout-banners.component.d.ts +0 -0
- package/{components → lib/components}/loader/index.d.ts +0 -0
- package/{components → lib/components}/loader/loader.component.d.ts +0 -0
- package/{components → lib/components}/main-navigation/index.d.ts +0 -0
- package/{components → lib/components}/main-navigation/main-navigation.imports.d.ts +0 -0
- package/{components → lib/components}/main-navigation/main-navigation.model.d.ts +0 -0
- package/{components → lib/components}/main-navigation-menu/index.d.ts +0 -0
- package/{components → lib/components}/main-navigation-menu/main-navigation-menu.component.d.ts +0 -0
- package/{components → lib/components}/modal/index.d.ts +0 -0
- package/{components → lib/components}/modal/modal-content/index.d.ts +0 -0
- package/{components → lib/components}/modal/modal-content/modal-content.component.d.ts +0 -0
- package/{components → lib/components}/modal/modal-footer/index.d.ts +0 -0
- package/{components → lib/components}/modal/modal-footer/modal-footer.component.d.ts +0 -0
- package/{components → lib/components}/modal/modal-header/index.d.ts +0 -0
- package/{components → lib/components}/modal/modal-header/modal-header.component.d.ts +0 -0
- package/{components → lib/components}/modal/modal-ref.d.ts +0 -0
- package/{components → lib/components}/modal/modal.component.d.ts +0 -0
- package/{components → lib/components}/modal/modal.service.d.ts +0 -0
- package/{components → lib/components}/multi-select/checkbox-data.interface.d.ts +0 -0
- package/{components → lib/components}/multi-select/index.d.ts +0 -0
- package/{components → lib/components}/multi-select/multi-select.component.d.ts +0 -0
- package/{components → lib/components}/multi-select/select-all-text.interface.d.ts +0 -0
- package/{components → lib/components}/pill/index.d.ts +0 -0
- package/{components → lib/components}/pill/pill.component.d.ts +0 -0
- package/{components → lib/components}/pill/pill.model.d.ts +0 -0
- package/{components → lib/components}/popover/index.d.ts +0 -0
- package/{components → lib/components}/popover/popover-trigger.directive.d.ts +0 -0
- package/{components → lib/components}/router-breadcrumbs/index.d.ts +0 -0
- package/{components → lib/components}/router-breadcrumbs/router-breadcrumbs.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/index.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-action/summary-card-action.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-actions/summary-card-actions.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-avatar/summary-card-avatar.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-content/summary-card-content.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-header/summary-card-header.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-subtitle/summary-card-subtitle.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-tag/summary-card-tag.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card-tags/summary-card-tags.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card.component.d.ts +0 -0
- package/{components → lib/components}/summary-card/summary-card.model.d.ts +0 -0
- package/{components → lib/components}/tab/index.d.ts +0 -0
- package/{components → lib/components}/tab-group/index.d.ts +0 -0
- package/{components → lib/components}/tag/index.d.ts +0 -0
- package/{components → lib/components}/tag/tag.component.d.ts +0 -0
- package/{components → lib/components}/toast/index.d.ts +0 -0
- package/{components → lib/components}/toast/toast.service.d.ts +0 -0
- package/{components → lib/components}/tooltip/index.d.ts +0 -0
- package/{components → lib/components}/tooltip/tooltip.component.d.ts +0 -0
- package/{components → lib/components}/tooltip/tooltip.directive.d.ts +1 -1
- /package/{models → lib/models}/aria.model.d.ts +0 -0
- /package/{models → lib/models}/index.d.ts +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..650;1,9..40,400..650&family=Material+Symbols+Rounded:opsz,wght@20..48,400&family=Nunito+Sans:ital,opsz,wght@0,6..12,400..650;1,6..12,400..650&family=Roboto+Flex:opsz,wght@8..144,100..1000&display=block');
|
|
2
|
+
|
|
3
|
+
/* Mixins */
|
|
4
|
+
@mixin ndw-heading-xl {
|
|
5
|
+
font-family: var(--ndw-font-family-heading);
|
|
6
|
+
font-size: 2.5rem;
|
|
7
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
8
|
+
line-height: 150%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin ndw-heading-lg {
|
|
12
|
+
font-family: var(--ndw-font-family-heading);
|
|
13
|
+
font-size: 2rem;
|
|
14
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
15
|
+
line-height: 150%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin ndw-heading-md {
|
|
19
|
+
font-family: var(--ndw-font-family-heading);
|
|
20
|
+
font-size: 1.5rem;
|
|
21
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
22
|
+
line-height: 150%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin ndw-heading-sm {
|
|
26
|
+
font-family: var(--ndw-font-family-heading);
|
|
27
|
+
font-size: 1.25rem;
|
|
28
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
29
|
+
line-height: 150%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin ndw-paragraph-bold-xl {
|
|
33
|
+
font-family: var(--ndw-font-family-body);
|
|
34
|
+
font-size: 1.125rem;
|
|
35
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
36
|
+
line-height: 150%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@mixin ndw-paragraph-xl {
|
|
40
|
+
font-family: var(--ndw-font-family-body);
|
|
41
|
+
font-size: 1.125rem;
|
|
42
|
+
font-weight: var(--ndw-font-weight-regular);
|
|
43
|
+
line-height: 150%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin ndw-paragraph-bold-lg {
|
|
47
|
+
font-family: var(--ndw-font-family-body);
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
50
|
+
line-height: 150%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin ndw-paragraph-lg {
|
|
54
|
+
font-family: var(--ndw-font-family-body);
|
|
55
|
+
font-size: 1rem;
|
|
56
|
+
font-weight: var(--ndw-font-weight-regular);
|
|
57
|
+
line-height: 150%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin ndw-paragraph-bold-md {
|
|
61
|
+
font-family: var(--ndw-font-family-body);
|
|
62
|
+
font-size: 0.8125rem;
|
|
63
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
64
|
+
line-height: 150%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@mixin ndw-paragraph-md {
|
|
68
|
+
font-family: var(--ndw-font-family-body);
|
|
69
|
+
font-size: 0.8125rem;
|
|
70
|
+
font-weight: var(--ndw-font-weight-regular);
|
|
71
|
+
line-height: 150%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@mixin ndw-paragraph-bold-sm {
|
|
75
|
+
font-family: var(--ndw-font-family-body);
|
|
76
|
+
font-size: 0.6875rem;
|
|
77
|
+
font-weight: var(--ndw-font-weight-bold);
|
|
78
|
+
line-height: 150%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@mixin ndw-paragraph-sm {
|
|
82
|
+
font-family: var(--ndw-font-family-body);
|
|
83
|
+
font-size: 0.6875rem;
|
|
84
|
+
font-weight: var(--ndw-font-weight-regular);
|
|
85
|
+
line-height: 150%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Classes */
|
|
89
|
+
.ndw-heading-xl {
|
|
90
|
+
@include ndw-heading-xl;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ndw-heading-lg {
|
|
94
|
+
@include ndw-heading-lg;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ndw-heading-md {
|
|
98
|
+
@include ndw-heading-md;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ndw-heading-sm {
|
|
102
|
+
@include ndw-heading-sm;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ndw-paragraph-bold-xl {
|
|
106
|
+
@include ndw-paragraph-bold-xl;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ndw-paragraph-xl {
|
|
110
|
+
@include ndw-paragraph-xl;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ndw-paragraph-bold-lg {
|
|
114
|
+
@include ndw-paragraph-bold-lg;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ndw-paragraph-lg {
|
|
118
|
+
@include ndw-paragraph-lg;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ndw-paragraph-bold-md {
|
|
122
|
+
@include ndw-paragraph-bold-md;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ndw-paragraph-md {
|
|
126
|
+
@include ndw-paragraph-md;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ndw-paragraph-bold-sm {
|
|
130
|
+
@include ndw-paragraph-bold-sm;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ndw-paragraph-sm {
|
|
134
|
+
@include ndw-paragraph-sm;
|
|
135
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Spacing */
|
|
3
|
+
--ndw-spacing-3xs: 0.125rem;
|
|
4
|
+
--ndw-spacing-2xs: 0.25rem;
|
|
5
|
+
--ndw-spacing-xs: 0.5rem;
|
|
6
|
+
--ndw-spacing-sm: 0.75rem;
|
|
7
|
+
--ndw-spacing-md: 1rem;
|
|
8
|
+
--ndw-spacing-lg: 1.5rem;
|
|
9
|
+
--ndw-spacing-xl: 2rem;
|
|
10
|
+
--ndw-spacing-2xl: 2.5rem;
|
|
11
|
+
--ndw-spacing-3xl: 3rem;
|
|
12
|
+
--ndw-spacing-4xl: 5rem;
|
|
13
|
+
--ndw-spacing-5xl: 8rem;
|
|
14
|
+
|
|
15
|
+
/* Border */
|
|
16
|
+
--ndw-border-size-sm: 1px;
|
|
17
|
+
--ndw-border-size-md: 2px;
|
|
18
|
+
--ndw-border-size-lg: 3px;
|
|
19
|
+
|
|
20
|
+
/* Radius */
|
|
21
|
+
--ndw-border-radius-xs: 0.125rem;
|
|
22
|
+
--ndw-border-radius-sm: 0.25rem;
|
|
23
|
+
--ndw-border-radius-md: 0.5rem;
|
|
24
|
+
--ndw-border-radius-lg: 1.5rem;
|
|
25
|
+
|
|
26
|
+
/* Elevation */
|
|
27
|
+
--ndw-elevation-info: 0 0 0.5rem 0 hsla(var(--_link-500), 0.25);
|
|
28
|
+
--ndw-elevation-content: 0 0.125rem 0.125rem 0 hsla(var(--_grey-600), 0.05);
|
|
29
|
+
--ndw-elevation-dropdown: 0 0.25rem 1rem hsla(var(--_grey-600), 0.125);
|
|
30
|
+
--ndw-elevation-popover: 0 0.5rem 1.25rem hsla(var(--_grey-600), 0.125);
|
|
31
|
+
--ndw-backdrop-color: var(--ndw-alpha-black-040);
|
|
32
|
+
|
|
33
|
+
/* Animation */
|
|
34
|
+
--ndw-animation-speed-very-fast: 100ms;
|
|
35
|
+
--ndw-animation-speed-fast: 200ms;
|
|
36
|
+
--ndw-animation-speed-default: 300ms;
|
|
37
|
+
--ndw-animation-speed-slow: 500ms;
|
|
38
|
+
|
|
39
|
+
/* Icon Size */
|
|
40
|
+
--ndw-icon-size-md: 1rem;
|
|
41
|
+
--ndw-icon-size-lg: 1.5rem;
|
|
42
|
+
|
|
43
|
+
/* Mult-select Size */
|
|
44
|
+
--multi-select-default-width: 18.75rem;
|
|
45
|
+
|
|
46
|
+
/* Typography */
|
|
47
|
+
// Font Family
|
|
48
|
+
--ndw-font-family-body: 'Nunito Sans', sans-serif;
|
|
49
|
+
--ndw-font-family-heading: 'DM Sans', sans-serif;
|
|
50
|
+
|
|
51
|
+
// Font Size
|
|
52
|
+
--ndw-base-font-size: 16px;
|
|
53
|
+
|
|
54
|
+
--ndw-font-size-2xs: 0.5625rem;
|
|
55
|
+
--ndw-font-size-xs: 0.6875rem;
|
|
56
|
+
--ndw-font-size-sm: 0.8125rem;
|
|
57
|
+
--ndw-font-size-md: 1.125rem;
|
|
58
|
+
--ndw-font-size-lg: 1.25rem;
|
|
59
|
+
--ndw-font-size-xl: 1.5rem;
|
|
60
|
+
|
|
61
|
+
// Font Weight
|
|
62
|
+
--ndw-font-weight-regular: 400;
|
|
63
|
+
--ndw-font-weight-bold: 650;
|
|
64
|
+
|
|
65
|
+
// Line Height
|
|
66
|
+
--ndw-line-height-sm: 1.375rem;
|
|
67
|
+
--ndw-line-height-md: 1.5rem;
|
|
68
|
+
|
|
69
|
+
/* Transform */
|
|
70
|
+
--ndw-rotate-half: rotate(180deg);
|
|
71
|
+
|
|
72
|
+
/* Modal */
|
|
73
|
+
--ndw-modal-width-sm: 31.25rem;
|
|
74
|
+
--ndw-modal-width-md: 45rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Screen sizes */
|
|
78
|
+
$ndw-screen-sm: 1024px;
|
|
79
|
+
$ndw-screen-md: 1440px;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { alphas, colors, header } from './colors.stories.utils';
|
|
2
|
+
|
|
3
|
+
interface ColorValue {
|
|
4
|
+
value?: number;
|
|
5
|
+
subName?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ColorGroup {
|
|
9
|
+
name: string;
|
|
10
|
+
colors: ColorValue[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const primary: ColorGroup = {
|
|
14
|
+
name: 'Primary',
|
|
15
|
+
colors: [
|
|
16
|
+
{ value: 50 },
|
|
17
|
+
{ value: 100 },
|
|
18
|
+
{ value: 200 },
|
|
19
|
+
{ value: 300 },
|
|
20
|
+
{ value: 400 },
|
|
21
|
+
{ value: 500 },
|
|
22
|
+
{ value: 600 },
|
|
23
|
+
{ value: 700 },
|
|
24
|
+
{ value: 800 },
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const secondary: ColorGroup = {
|
|
29
|
+
name: 'Secondary',
|
|
30
|
+
colors: [
|
|
31
|
+
{ value: 50 },
|
|
32
|
+
{ value: 100 },
|
|
33
|
+
{ value: 200 },
|
|
34
|
+
{ value: 300 },
|
|
35
|
+
{ value: 400 },
|
|
36
|
+
{ value: 500 },
|
|
37
|
+
{ value: 600 },
|
|
38
|
+
{ value: 700 },
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const tertiary: ColorGroup = {
|
|
43
|
+
name: 'Tertiary',
|
|
44
|
+
colors: [{ value: 400 }, { value: 500 }],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const grey: ColorGroup = {
|
|
48
|
+
name: 'Grey',
|
|
49
|
+
colors: [
|
|
50
|
+
{ value: 100 },
|
|
51
|
+
{ value: 200 },
|
|
52
|
+
{ value: 300 },
|
|
53
|
+
{ value: 400 },
|
|
54
|
+
{ value: 500 },
|
|
55
|
+
{ value: 600 },
|
|
56
|
+
{ value: 700 },
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const white: ColorGroup = {
|
|
61
|
+
name: 'White',
|
|
62
|
+
colors: [{ value: undefined }],
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const links: ColorGroup = {
|
|
66
|
+
name: 'Link',
|
|
67
|
+
colors: [{ value: 400 }, { value: 500 }],
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const positive: ColorGroup = {
|
|
71
|
+
name: 'Positive',
|
|
72
|
+
colors: [{ value: 100 }, { value: 500 }, { value: 600 }],
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const warning: ColorGroup = {
|
|
76
|
+
name: 'Warning',
|
|
77
|
+
colors: [{ value: 100 }, { value: 500 }, { value: 600 }],
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const info: ColorGroup = {
|
|
81
|
+
name: 'Info',
|
|
82
|
+
colors: [{ value: 100 }, { value: 500 }],
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const alternative: ColorGroup = {
|
|
86
|
+
name: 'Alternative',
|
|
87
|
+
colors: [{ value: 100 }, { value: 500 }],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const critical: ColorGroup = {
|
|
91
|
+
name: 'Critical',
|
|
92
|
+
colors: [{ value: 100 }, { value: 200 }, { value: 300 }, { value: 500 }],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const alphaValues = ['Black-007', 'Black-015', 'Black-040', 'Primary-007', 'Primary-015'];
|
|
96
|
+
|
|
97
|
+
// Todo - Update color values when switching between themes
|
|
98
|
+
export const template = `
|
|
99
|
+
<div class="sb">
|
|
100
|
+
<div class="sb_content overview colors">
|
|
101
|
+
<section>
|
|
102
|
+
<h2 class="ndw-heading-md">Primary</h2>
|
|
103
|
+
${header(['Color', 'Name', 'Value', 'Variable'])}
|
|
104
|
+
${colors(primary)}
|
|
105
|
+
</section>
|
|
106
|
+
<section>
|
|
107
|
+
<h2 class="ndw-heading-md">Secondary</h2>
|
|
108
|
+
${header(['Color', 'Name', 'Value', 'Variable'])}
|
|
109
|
+
${colors(secondary)}
|
|
110
|
+
</section>
|
|
111
|
+
<section>
|
|
112
|
+
<h2 class="ndw-heading-md">Tertiary</h2>
|
|
113
|
+
${header(['Color', 'Name', 'Value', 'Variable'])}
|
|
114
|
+
${colors(tertiary)}
|
|
115
|
+
</section>
|
|
116
|
+
<section>
|
|
117
|
+
<h2 class="ndw-heading-md">Grey</h2>
|
|
118
|
+
${header(['Color', 'Name', 'Value', 'Variable'])}
|
|
119
|
+
${colors(white)}
|
|
120
|
+
${colors(grey)}
|
|
121
|
+
</section>
|
|
122
|
+
<section>
|
|
123
|
+
<h2 class="ndw-heading-md">Links</h2>
|
|
124
|
+
${header(['Color', 'Name', 'Value', 'Variable'])}
|
|
125
|
+
${colors(links)}
|
|
126
|
+
</section>
|
|
127
|
+
<section>
|
|
128
|
+
<h2 class="ndw-heading-md">Notifications</h2>
|
|
129
|
+
${header(['Color', 'Name', 'Value', 'Variable'])}
|
|
130
|
+
${colors(positive)}
|
|
131
|
+
${colors(info)}
|
|
132
|
+
${colors(warning)}
|
|
133
|
+
${colors(critical)}
|
|
134
|
+
${colors(alternative)}
|
|
135
|
+
</section>
|
|
136
|
+
<section>
|
|
137
|
+
<h2 class="ndw-heading-md">Alpha</h2>
|
|
138
|
+
${header(['Alpha', 'Name', 'Value', 'Variable'])}
|
|
139
|
+
${alphas(alphaValues)}
|
|
140
|
+
</section>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/angular';
|
|
2
|
+
|
|
3
|
+
import { template } from './colors.stories.model';
|
|
4
|
+
|
|
5
|
+
const meta: Meta = {
|
|
6
|
+
title: 'Core/Colors',
|
|
7
|
+
tags: ['autodocs', 'ndw', 'nwb', 'ntm'],
|
|
8
|
+
render: () => ({ template }),
|
|
9
|
+
} as Meta;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj;
|
|
13
|
+
|
|
14
|
+
export const Colors: Story = {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ColorGroup } from './colors.stories.model';
|
|
2
|
+
|
|
3
|
+
export function header(values: string[]): string {
|
|
4
|
+
return `
|
|
5
|
+
<div class="header">
|
|
6
|
+
${values.map((value) => `<p class="ndw-heading-sm">${value}</p>`).join('')}
|
|
7
|
+
</div>
|
|
8
|
+
`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function colors(type: ColorGroup): string {
|
|
12
|
+
const style = getComputedStyle(document.body);
|
|
13
|
+
|
|
14
|
+
return `${type.colors
|
|
15
|
+
.map((color) => {
|
|
16
|
+
const subName = color.subName ? `-${color.subName}` : '';
|
|
17
|
+
const convertedValue = color.value && color.value < 100 ? `0${color.value}` : color.value;
|
|
18
|
+
const value = color.value ? `-${convertedValue}` : '';
|
|
19
|
+
const variable = `--ndw-color-${type.name}${subName}${value}`.toLowerCase();
|
|
20
|
+
|
|
21
|
+
return `
|
|
22
|
+
<div class="content">
|
|
23
|
+
<div
|
|
24
|
+
class="block"
|
|
25
|
+
style="background-color: var(${variable})"
|
|
26
|
+
></div>
|
|
27
|
+
<p>${type.name}${subName}${value}</p>
|
|
28
|
+
<p>${style.getPropertyValue(variable)}</p>
|
|
29
|
+
<p>${variable}</p>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
})
|
|
33
|
+
.join('')}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function alphas(values: string[]): string {
|
|
37
|
+
const style = getComputedStyle(document.body);
|
|
38
|
+
|
|
39
|
+
return `
|
|
40
|
+
${values
|
|
41
|
+
.map((alpha) => {
|
|
42
|
+
const variable = `--ndw-alpha-${alpha.toLowerCase()}`;
|
|
43
|
+
|
|
44
|
+
return `
|
|
45
|
+
<div class="content">
|
|
46
|
+
<div
|
|
47
|
+
class="block"
|
|
48
|
+
style="background-color: var(--ndw-alpha-${alpha.toLowerCase()})"
|
|
49
|
+
></div>
|
|
50
|
+
<p>${alpha}</p>
|
|
51
|
+
<p>${style.getPropertyValue(variable)}</p>
|
|
52
|
+
<p>${variable}</p>
|
|
53
|
+
</div>
|
|
54
|
+
`;
|
|
55
|
+
})
|
|
56
|
+
.join('')}
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/angular';
|
|
2
|
+
|
|
3
|
+
interface StoryArgs {
|
|
4
|
+
typographyList: Typography[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Typography {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
fontSizeInRem: string;
|
|
10
|
+
class: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const typographyList: Typography[] = [
|
|
14
|
+
{
|
|
15
|
+
fontSize: '40px',
|
|
16
|
+
fontSizeInRem: '2.5rem',
|
|
17
|
+
class: 'ndw-heading-xl',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
fontSize: '32px',
|
|
21
|
+
fontSizeInRem: '2rem',
|
|
22
|
+
class: 'ndw-heading-lg',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
fontSize: '24px',
|
|
26
|
+
fontSizeInRem: '1.5rem',
|
|
27
|
+
class: 'ndw-heading-md',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
fontSize: '20px',
|
|
31
|
+
fontSizeInRem: '1.25rem',
|
|
32
|
+
class: 'ndw-heading-sm',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
fontSize: '18px',
|
|
36
|
+
fontSizeInRem: '1.125rem',
|
|
37
|
+
class: 'ndw-paragraph-bold-xl',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
fontSize: '18px',
|
|
41
|
+
fontSizeInRem: '1.125rem',
|
|
42
|
+
class: 'ndw-paragraph-xl',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
fontSize: '16px',
|
|
46
|
+
fontSizeInRem: '1rem',
|
|
47
|
+
class: 'ndw-paragraph-bold-lg',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
fontSize: '16px',
|
|
51
|
+
fontSizeInRem: '1rem',
|
|
52
|
+
class: 'ndw-paragraph-lg',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
fontSize: '13px',
|
|
56
|
+
fontSizeInRem: '0.8125rem',
|
|
57
|
+
class: 'ndw-paragraph-bold-md',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
fontSize: '13px',
|
|
61
|
+
fontSizeInRem: '0.8125rem',
|
|
62
|
+
class: 'ndw-paragraph-md',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
fontSize: '11px',
|
|
66
|
+
fontSizeInRem: '0.6875rem',
|
|
67
|
+
class: 'ndw-paragraph-bold-sm',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
fontSize: '11px',
|
|
71
|
+
fontSizeInRem: '0.6875rem',
|
|
72
|
+
class: 'ndw-paragraph-sm',
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
const args: StoryArgs = {
|
|
77
|
+
typographyList,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const meta: Meta<StoryArgs> = {
|
|
81
|
+
title: 'Core/Typography',
|
|
82
|
+
render: ({ typographyList, ...props }) => ({
|
|
83
|
+
props,
|
|
84
|
+
template: `
|
|
85
|
+
<div class="sb">
|
|
86
|
+
<div class="sb_content overview typography">
|
|
87
|
+
<section>
|
|
88
|
+
<div class="header">
|
|
89
|
+
<p>Font Size</p>
|
|
90
|
+
<p>Line Height</p>
|
|
91
|
+
<p>CSS Class</p>
|
|
92
|
+
</div>
|
|
93
|
+
${typographyList
|
|
94
|
+
.map(
|
|
95
|
+
(typography: Typography) => `
|
|
96
|
+
<div class="content ${typography.class}">
|
|
97
|
+
<span>${typography.fontSize} / ${typography.fontSizeInRem}</span>
|
|
98
|
+
<span>150%</span>
|
|
99
|
+
<span>.${typography.class}</span>
|
|
100
|
+
</div>
|
|
101
|
+
`
|
|
102
|
+
)
|
|
103
|
+
.join('')}
|
|
104
|
+
</section>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`,
|
|
108
|
+
}),
|
|
109
|
+
} as Meta;
|
|
110
|
+
|
|
111
|
+
export default meta;
|
|
112
|
+
type Story = StoryObj<StoryArgs>;
|
|
113
|
+
|
|
114
|
+
export const Typography: Story = {
|
|
115
|
+
args,
|
|
116
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
button:not(:disabled) {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
[ndwButton] {
|
|
6
|
+
align-items: center;
|
|
7
|
+
background-color: var(--ndw-color-background);
|
|
8
|
+
border: var(--ndw-border-size-sm) solid var(--ndw-color-background);
|
|
9
|
+
border-radius: var(--ndw-border-radius-sm);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
color: var(--ndw-color-foreground);
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
display: flex;
|
|
14
|
+
font-family: var(--ndw-font-family-body);
|
|
15
|
+
font-size: var(--ndw-font-size-sm);
|
|
16
|
+
font-weight: var(--ndw-font-weight-regular);
|
|
17
|
+
gap: var(--ndw-spacing-2xs);
|
|
18
|
+
height: var(--ndw-spacing-xl);
|
|
19
|
+
justify-content: center;
|
|
20
|
+
padding: var(--ndw-spacing-2xs) var(--ndw-spacing-xs);
|
|
21
|
+
text-align: start;
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
transition: (color 200ms ease-out, background-color 200ms ease-out, border-color 200ms ease-out);
|
|
24
|
+
width: fit-content;
|
|
25
|
+
|
|
26
|
+
ndw-icon {
|
|
27
|
+
font-size: var(--ndw-spacing-md);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ndw-loader {
|
|
31
|
+
height: var(--ndw-spacing-md);
|
|
32
|
+
width: var(--ndw-spacing-md);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: var(--ndw-color-background-hover);
|
|
37
|
+
border-color: var(--ndw-color-background-hover);
|
|
38
|
+
color: var(--ndw-color-foreground-hover);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:active {
|
|
42
|
+
background-color: var(--ndw-color-background-active);
|
|
43
|
+
border-color: var(--ndw-color-background-active);
|
|
44
|
+
color: var(--ndw-color-foreground-active);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[secondary],
|
|
48
|
+
&[tertiary] {
|
|
49
|
+
background-color: transparent;
|
|
50
|
+
color: var(--ndw-color-background);
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
color: var(--ndw-color-background);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:active {
|
|
57
|
+
color: var(--ndw-color-background);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&[alternative] {
|
|
61
|
+
color: var(--ndw-color-text);
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background-color: var(--ndw-alpha-black-007);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:active {
|
|
68
|
+
background-color: var(--ndw-alpha-black-015);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&[secondary] {
|
|
74
|
+
border-color: var(--ndw-color-background);
|
|
75
|
+
|
|
76
|
+
&:hover {
|
|
77
|
+
background-color: var(--ndw-alpha-primary-007);
|
|
78
|
+
border-color: var(--ndw-color-background-hover);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:active {
|
|
82
|
+
background-color: var(--ndw-alpha-primary-015);
|
|
83
|
+
border-color: var(--ndw-color-background-active);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&[alternative] {
|
|
87
|
+
border-color: var(--ndw-color-grey-300);
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
border-color: var(--ndw-color-grey-500);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:active {
|
|
94
|
+
border-color: var(--ndw-color-grey-700);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&[tertiary] {
|
|
100
|
+
border-color: transparent;
|
|
101
|
+
border-radius: var(--button-ter-border-radius, var(--ndw-border-radius-sm));
|
|
102
|
+
border-width: var(--button-ter-border-width, var(--ndw-spacing-3xs));
|
|
103
|
+
padding-inline: var(--button-ter-padding-inline, var(--ndw-spacing-xs));
|
|
104
|
+
|
|
105
|
+
&:hover {
|
|
106
|
+
background-color: var(--button-ter-bg-color-hover, var(--ndw-alpha-primary-007));
|
|
107
|
+
border-color: var(--button-ter-border-color-hover, transparent);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:active {
|
|
111
|
+
background-color: var(--button-ter-bg-color-active, var(--ndw-alpha-primary-015));
|
|
112
|
+
border-color: var(--button-ter-border-color-active, transparent);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[extra-small] {
|
|
117
|
+
height: var(--ndw-spacing-lg);
|
|
118
|
+
padding-inline: var(--ndw-spacing-2xs);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&[large] {
|
|
122
|
+
height: var(--ndw-spacing-2xl);
|
|
123
|
+
padding-inline: var(--ndw-spacing-sm);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&[disabled] {
|
|
127
|
+
background-color: var(--ndw-color-background-disabled);
|
|
128
|
+
border-color: var(--ndw-color-background-disabled);
|
|
129
|
+
color: var(--ndw-color-text);
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
user-select: none;
|
|
132
|
+
}
|
|
133
|
+
}
|