dso-toolkit 40.0.0 → 40.1.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.
Files changed (86) hide show
  1. package/dist/library/@dso-toolkit/core/cjs/dso-date-picker.cjs.entry.js +25 -10
  2. package/dist/library/@dso-toolkit/core/cjs/dso-ozon-content.cjs.entry.js +1 -1
  3. package/dist/library/@dso-toolkit/core/cjs/dso-pagination.cjs.entry.js +38 -0
  4. package/dist/library/@dso-toolkit/core/cjs/dso-toolkit.cjs.js +1 -1
  5. package/dist/library/@dso-toolkit/core/cjs/dso-tooltip.cjs.entry.js +40 -0
  6. package/dist/library/@dso-toolkit/core/cjs/loader.cjs.js +1 -1
  7. package/dist/library/@dso-toolkit/core/collection/collection-manifest.json +1 -0
  8. package/dist/library/@dso-toolkit/core/collection/components/date-picker/date-picker.js +25 -10
  9. package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.js +4 -1
  10. package/dist/library/@dso-toolkit/core/collection/components/ozon-content/ozon-content.template.js +3 -3
  11. package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.css +68 -0
  12. package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.interfaces.js +1 -0
  13. package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.js +114 -0
  14. package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.stories.js +11 -0
  15. package/dist/library/@dso-toolkit/core/collection/components/pagination/pagination.template.js +11 -0
  16. package/dist/library/@dso-toolkit/core/collection/components/tooltip/tooltip.js +60 -0
  17. package/dist/library/@dso-toolkit/core/custom-elements/index.d.ts +6 -0
  18. package/dist/library/@dso-toolkit/core/custom-elements/index.js +104 -14
  19. package/dist/library/@dso-toolkit/core/dso-toolkit/dso-toolkit.esm.js +1 -1
  20. package/dist/library/@dso-toolkit/core/dso-toolkit/p-0777c1c4.entry.js +1 -0
  21. package/dist/library/@dso-toolkit/core/dso-toolkit/{p-150fe323.entry.js → p-37e12c3c.entry.js} +1 -1
  22. package/dist/library/@dso-toolkit/core/dso-toolkit/p-4a41728e.entry.js +1 -0
  23. package/dist/library/@dso-toolkit/core/dso-toolkit/{p-a8cf15cf.entry.js → p-f1026921.entry.js} +1 -1
  24. package/dist/library/@dso-toolkit/core/esm/dso-date-picker.entry.js +25 -10
  25. package/dist/library/@dso-toolkit/core/esm/dso-ozon-content.entry.js +2 -2
  26. package/dist/library/@dso-toolkit/core/esm/dso-pagination.entry.js +34 -0
  27. package/dist/library/@dso-toolkit/core/esm/dso-toolkit.js +1 -1
  28. package/dist/library/@dso-toolkit/core/esm/dso-tooltip.entry.js +40 -0
  29. package/dist/library/@dso-toolkit/core/esm/loader.js +1 -1
  30. package/dist/library/@dso-toolkit/core/types/components/date-picker/date-picker.d.ts +1 -1
  31. package/dist/library/@dso-toolkit/core/types/components/ozon-content/ozon-content.template.d.ts +1 -1
  32. package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.d.ts +22 -0
  33. package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.interfaces.d.ts +6 -0
  34. package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.stories.d.ts +1 -0
  35. package/dist/library/@dso-toolkit/core/types/components/pagination/pagination.template.d.ts +2 -0
  36. package/dist/library/@dso-toolkit/core/types/components/tooltip/tooltip.d.ts +6 -0
  37. package/dist/library/@dso-toolkit/core/types/components.d.ts +50 -0
  38. package/dist/library/components/detail/form--autocomplete.html +1 -1
  39. package/dist/library/components/detail/form--form-horizontal.html +1 -1
  40. package/dist/library/components/detail/form--form-vertical.html +1 -1
  41. package/dist/library/components/detail/form--header-in-legend.html +1 -1
  42. package/dist/library/components/detail/form--multi-page.html +1 -1
  43. package/dist/library/components/detail/form--sections.html +1 -1
  44. package/dist/library/components/detail/form--simple-form.html +1 -1
  45. package/dist/library/components/detail/form--single-page.html +1 -1
  46. package/dist/library/components/detail/form.html +1 -1
  47. package/dist/library/dso-icons.svg +421 -387
  48. package/dist/library/styles/dso.css +196 -289
  49. package/dist/toolkit/core/packages/core/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  50. package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-0777c1c4.entry.js +1 -0
  51. package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-150fe323.entry.js → p-37e12c3c.entry.js} +1 -1
  52. package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-4a41728e.entry.js +1 -0
  53. package/dist/toolkit/core/packages/core/dist/dso-toolkit/{p-a8cf15cf.entry.js → p-f1026921.entry.js} +1 -1
  54. package/dist/toolkit/dso-icons.svg +421 -387
  55. package/dist/toolkit/styles/dso.css +196 -289
  56. package/hydrate/index.js +112 -12
  57. package/libs/@dso-toolkit/css/dist/dso-icons.svg +421 -387
  58. package/libs/@dso-toolkit/css/src/components/pagination/pagination.scss +1 -93
  59. package/{src/styles/components/_tabs.scss → libs/@dso-toolkit/css/src/components/tabs/tabs.scss} +69 -5
  60. package/libs/@dso-toolkit/css/src/dso.scss +1 -0
  61. package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.args.ts +16 -2
  62. package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.content.ts +3 -1
  63. package/libs/@dso-toolkit/sources/src/components/ozon-content/ozon-content.models.ts +2 -0
  64. package/libs/@dso-toolkit/sources/src/components/pagination/pagination.args.ts +13 -6
  65. package/libs/@dso-toolkit/sources/src/components/pagination/pagination.models.ts +11 -2
  66. package/libs/@dso-toolkit/sources/src/components/pagination/pagination.scss +101 -0
  67. package/libs/@dso-toolkit/sources/src/components/pagination/pagination.stories.ts +9 -7
  68. package/libs/@dso-toolkit/sources/src/components/tabs/tabs.args.ts +19 -0
  69. package/libs/@dso-toolkit/sources/src/components/tabs/tabs.models.ts +9 -0
  70. package/libs/@dso-toolkit/sources/src/components/tabs/tabs.stories.ts +86 -0
  71. package/libs/@dso-toolkit/sources/src/components/tooltip/tooltip.args.ts +9 -1
  72. package/libs/@dso-toolkit/sources/src/components/tooltip/tooltip.models.ts +3 -0
  73. package/libs/@dso-toolkit/sources/src/components.scss +1 -0
  74. package/libs/@dso-toolkit/sources/src/index.ts +2 -0
  75. package/libs/@dso-toolkit/sources/src/styling/grid/grid.scss +56 -0
  76. package/libs/@dso-toolkit/sources/src/styling/variables/colors.scss +3 -0
  77. package/libs/_bootstrap.scss +2 -2
  78. package/libs/bootstrap/_variables.scss +3 -7
  79. package/package.json +2 -2
  80. package/src/styles/dso.scss +2 -2
  81. package/src/styles/mixins/_bootstrap-variables.scss +0 -3
  82. package/dist/library/@dso-toolkit/core/dso-toolkit/p-7abe091d.entry.js +0 -1
  83. package/dist/toolkit/core/packages/core/dist/dso-toolkit/p-7abe091d.entry.js +0 -1
  84. package/libs/bootstrap/_navs.scss +0 -226
  85. package/libs/bootstrap/mixins/_nav-divider.scss +0 -10
  86. package/src/styles/mixins/_grid.scss +0 -63
@@ -1,95 +1,3 @@
1
- $dso-pagination-item-size: $u4;
2
- $dso-pagination-item-border-size: 2px;
3
- $dso-pagination-line-height: $dso-pagination-item-size;
4
- $dso-pagination-icon-margin: $u1 * 0.5;
5
-
6
1
  .pagination {
7
- text-align: center;
8
-
9
- .dso-previous,
10
- .dso-next {
11
- border-color: $grasgroen;
12
- height: $dso-pagination-item-size;
13
- text-indent: -9999px;
14
- width: $dso-pagination-item-size;
15
-
16
- &::before {
17
- content: "";
18
- display: inline-block;
19
- margin-top: $dso-pagination-icon-margin;
20
- }
21
- }
22
-
23
- .dso-previous {
24
- &::before {
25
- @include di("chevron-left");
26
- }
27
- }
28
-
29
- .dso-next {
30
- &::before {
31
- @include di("chevron-right");
32
- }
33
- }
34
-
35
- > li {
36
- display: inline-block;
37
- font-weight: bold;
38
- line-height: #{$dso-pagination-item-size - $dso-pagination-item-border-size * 2};
39
- text-align: center;
40
-
41
- > a,
42
- > span {
43
- color: $grasgroen;
44
- display: inline-block;
45
- height: $dso-pagination-item-size;
46
- position: relative;
47
- vertical-align: middle;
48
- width: $dso-pagination-item-size;
49
-
50
- &:active {
51
- background-color: $grasgroen-10;
52
- }
53
- }
54
-
55
- > span {
56
- border: $dso-pagination-item-border-size solid transparent;
57
- border-radius: 50%;
58
- }
59
-
60
- a {
61
- line-height: $dso-pagination-line-height;
62
- text-decoration: none;
63
-
64
- &:hover,
65
- &:focus {
66
- text-decoration: none;
67
-
68
- &::after {
69
- border-bottom-color: $grasgroen;
70
- }
71
- }
72
-
73
- &::after {
74
- border-bottom: 3px solid transparent;
75
- bottom: 0;
76
- content: "";
77
- display: inline-block;
78
- left: 0;
79
- position: absolute;
80
- width: 100%;
81
- }
82
- }
83
-
84
- &.active {
85
- span {
86
- background-color: $grasgroen;
87
- color: $wit;
88
- }
89
- }
90
-
91
- & + li {
92
- margin-left: $u1;
93
- }
94
- }
2
+ @include pagination_root(true);
95
3
  }
@@ -2,16 +2,69 @@ $dso-tabs-color: $grasgroen;
2
2
  $dso-tabs-hover-color: $grijs-5;
3
3
  $dso-tabs-text-color: $grijs-60;
4
4
  $dso-tabs-border-radius: 4px;
5
+ $dso-tabs-border-color: #ddd;
6
+ $dso-tabs-link-hover-border-color: $gray-lighter;
5
7
  $dso-tabs-height: 56px;
6
8
  $dso-tabs-horizontal-padding: $u2 - 1px;
7
9
  $dso-tabs-vertical-padding: $u3 - 1px;
8
10
  $dso-tabs-margin-bottom: $dso-vertical-spacing-large;
9
11
 
10
- ul.nav-tabs {
11
- border-bottom: 1px solid $nav-tabs-border-color;
12
+ $nav-link-padding: 10px 15px !default;
13
+ $nav-link-hover-bg: $gray-lighter !default;
14
+
15
+ .nav {
16
+ @include clearfix();
17
+
18
+ list-style: none;
19
+ margin-bottom: 0;
20
+ padding-left: 0; // Override default ul/ol
21
+
22
+ > li {
23
+ position: relative;
24
+ display: block;
25
+
26
+ > a {
27
+ position: relative;
28
+ display: block;
29
+ padding: $nav-link-padding;
30
+ &:hover,
31
+ &:focus {
32
+ text-decoration: none;
33
+ background-color: $nav-link-hover-bg;
34
+ }
35
+ }
36
+
37
+ // Disabled state sets text to gray and nukes hover/tab effects
38
+ &.disabled > a {
39
+ color: $nav-disabled-link-color;
40
+
41
+ &:hover,
42
+ &:focus {
43
+ color: $nav-disabled-link-hover-color;
44
+ text-decoration: none;
45
+ cursor: $cursor-disabled;
46
+ background-color: transparent;
47
+ }
48
+ }
49
+ }
50
+
51
+ // Open dropdowns
52
+ .open > a {
53
+ &,
54
+ &:hover,
55
+ &:focus {
56
+ background-color: $nav-link-hover-bg;
57
+ border-color: $link-color;
58
+ }
59
+ }
60
+ }
61
+
62
+ .nav.nav-tabs {
63
+ border-bottom: 1px solid $dso-tabs-border-color;
12
64
  display: flex;
13
65
  flex-wrap: wrap;
14
66
  margin-bottom: $dso-tabs-margin-bottom;
67
+ padding-left: 0;
15
68
 
16
69
  @media screen and (min-width: $screen-sm-min) {
17
70
  border-bottom: 1px solid $grasgroen;
@@ -24,8 +77,7 @@ ul.nav-tabs {
24
77
 
25
78
  > li {
26
79
  border-color: $dso-tabs-color;
27
- float: none;
28
- font-weight: bold;
80
+ font-weight: bold;
29
81
  // Make the list-items overlay the bottom border
30
82
  margin-bottom: -1px;
31
83
  min-height: $dso-tabs-height;
@@ -57,7 +109,7 @@ ul.nav-tabs {
57
109
  position: relative;
58
110
 
59
111
  &:hover {
60
- border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
112
+ border-color: $dso-tabs-link-hover-border-color $dso-tabs-link-hover-border-color $dso-tabs-border-color;
61
113
  }
62
114
  }
63
115
 
@@ -89,6 +141,18 @@ ul.nav-tabs {
89
141
  }
90
142
  }
91
143
 
144
+ &.disabled > a {
145
+ color: $nav-disabled-link-color;
146
+
147
+ &:hover,
148
+ &:focus {
149
+ color: $nav-disabled-link-hover-color;
150
+ text-decoration: none;
151
+ cursor: $cursor-disabled;
152
+ background-color: transparent;
153
+ }
154
+ }
155
+
92
156
  @media screen and (max-width: $screen-xs-max) {
93
157
  a {
94
158
  border-color: $wit;
@@ -56,6 +56,7 @@
56
56
  @import "components/selectable/selectable";
57
57
  @import "components/shopping-cart/shopping-cart";
58
58
  @import "components/subtitle/subtitle";
59
+ @import "components/tabs/tabs";
59
60
  @import "components/tile/tile";
60
61
  @import "components/tile-grid/tile-grid";
61
62
  @import "components/tooltip/tooltip";
@@ -6,8 +6,10 @@ import { OzonContent } from "./ozon-content.models";
6
6
  export interface OzonContentArgs {
7
7
  content: string;
8
8
  inline: boolean;
9
- interactive: boolean;
10
- deleted: boolean;
9
+ interactive?: boolean;
10
+ deleted?: boolean;
11
+ prefix?: string;
12
+ suffix?: string;
11
13
  onAnchorClick: HandlerFunction;
12
14
  onClick: HandlerFunction;
13
15
  }
@@ -33,6 +35,16 @@ export const ozonContentArgTypes: ArgTypes<OzonContentArgs> = {
33
35
  type: 'boolean'
34
36
  }
35
37
  },
38
+ prefix: {
39
+ control: {
40
+ type: 'text'
41
+ }
42
+ },
43
+ suffix: {
44
+ control: {
45
+ type: 'text'
46
+ }
47
+ },
36
48
  onAnchorClick: {
37
49
  ...noControl,
38
50
  action: "anchorClick",
@@ -49,6 +61,8 @@ export function ozonContentArgsMapper(a: OzonContentArgs): OzonContent {
49
61
  inline: a.inline,
50
62
  interactive: a.interactive,
51
63
  deleted: a.deleted,
64
+ prefix: a.prefix || undefined,
65
+ suffix: a.suffix || undefined,
52
66
  onAnchorClick: (e: any) => a.onAnchorClick(e.detail),
53
67
  onClick: a.onClick
54
68
  };
@@ -38,7 +38,9 @@ export const content = [
38
38
  `,
39
39
  args: {
40
40
  inline: true,
41
- interactive: true
41
+ interactive: true,
42
+ prefix: 'Afdeling 4.1 ',
43
+ suffix: ' [gereserveerd]'
42
44
  }
43
45
  },
44
46
  {
@@ -1,6 +1,8 @@
1
1
  export interface OzonContent {
2
2
  content: string;
3
3
  inline?: boolean;
4
+ prefix?: string;
5
+ suffix?: string;
4
6
  interactive?: boolean;
5
7
  deleted?: boolean;
6
8
  onAnchorClick: (e: unknown) => void;
@@ -1,28 +1,35 @@
1
+ import { HandlerFunction } from '@storybook/addon-actions';
1
2
  import { ArgTypes } from '../../stories-helpers';
2
3
 
3
4
  import { Pagination } from './pagination.models';
4
5
 
5
6
  export interface PaginationArgs {
6
- count: number;
7
- current: number;
7
+ totalPages: number;
8
+ currentPage: number;
9
+ onSelectPage: HandlerFunction;
8
10
  }
9
11
 
10
12
  export const paginationArgTypes: ArgTypes<PaginationArgs> = {
11
- count: {
13
+ totalPages: {
12
14
  control: {
13
15
  type: 'number'
14
16
  }
15
17
  },
16
- current: {
18
+ currentPage: {
17
19
  control: {
18
20
  type: 'number'
19
21
  }
22
+ },
23
+ onSelectPage: {
24
+ action: 'selectPage'
20
25
  }
21
26
  };
22
27
 
23
28
  export function paginationArgsMapper(a: PaginationArgs): Pagination {
24
29
  return {
25
- count: a.count,
26
- current: a.current
30
+ totalPages: a.totalPages,
31
+ currentPage: a.currentPage,
32
+ onSelectPage: a.onSelectPage,
33
+ formatHref: page => '#' + page,
27
34
  };
28
35
  }
@@ -1,4 +1,13 @@
1
+ export interface PaginationSelectPageEvent {
2
+ /** The selected page */
3
+ page: number;
4
+ /** The original pointer event */
5
+ originalEvent: MouseEvent;
6
+ }
7
+
1
8
  export interface Pagination {
2
- count: number;
3
- current: number;
9
+ totalPages: number;
10
+ currentPage: number;
11
+ formatHref: (page: number) => string;
12
+ onSelectPage: (e: CustomEvent<PaginationSelectPageEvent>) => void;
4
13
  }
@@ -0,0 +1,101 @@
1
+ $dso-pagination-item-size: $u4;
2
+ $dso-pagination-item-border-size: 2px;
3
+ $dso-pagination-line-height: $dso-pagination-item-size;
4
+ $dso-pagination-icon-margin: $u1 * 0.5;
5
+
6
+ @mixin pagination_root($css-icons: false) {
7
+ text-align: center;
8
+
9
+ @if ($css-icons) {
10
+ .dso-previous,
11
+ .dso-next {
12
+ border-color: $grasgroen;
13
+ height: $dso-pagination-item-size;
14
+ text-indent: -9999px;
15
+ width: $dso-pagination-item-size;
16
+
17
+ &::before {
18
+ content: "";
19
+ left: 50%;
20
+ position: absolute;
21
+ top: 50%;
22
+ transform: translate(-50%, -50%);
23
+ }
24
+ }
25
+
26
+ .dso-previous {
27
+ &::before {
28
+ @include di("chevron-left");
29
+ }
30
+ }
31
+
32
+ .dso-next {
33
+ &::before {
34
+ @include di("chevron-right");
35
+ }
36
+ }
37
+ }
38
+
39
+ > li {
40
+ display: inline-block;
41
+ font-weight: bold;
42
+ line-height: #{$dso-pagination-item-size - $dso-pagination-item-border-size * 2};
43
+ text-align: center;
44
+ vertical-align: middle;
45
+
46
+ > a,
47
+ > span {
48
+ align-items: center;
49
+ color: $grasgroen;
50
+ display: flex;
51
+ height: $dso-pagination-item-size;
52
+ justify-content: center;
53
+ position: relative;
54
+ width: $dso-pagination-item-size;
55
+
56
+ &:active {
57
+ background-color: $grasgroen-10;
58
+ }
59
+ }
60
+
61
+ > span {
62
+ border: $dso-pagination-item-border-size solid transparent;
63
+ border-radius: 50%;
64
+ }
65
+
66
+ a {
67
+ line-height: $dso-pagination-line-height;
68
+ text-decoration: none;
69
+
70
+ &:hover,
71
+ &:focus {
72
+ text-decoration: none;
73
+
74
+ &::after {
75
+ border-bottom-color: $grasgroen;
76
+ }
77
+ }
78
+
79
+ &::after {
80
+ border-bottom: 3px solid transparent;
81
+ bottom: 0;
82
+ content: "";
83
+ display: inline-block;
84
+ left: 0;
85
+ position: absolute;
86
+ width: 100%;
87
+ }
88
+ }
89
+
90
+ &.active {
91
+ span {
92
+ background-color: $grasgroen;
93
+ color: $wit;
94
+ }
95
+ }
96
+
97
+ & + li {
98
+ margin-left: $u1;
99
+ }
100
+ }
101
+ }
@@ -1,6 +1,6 @@
1
- import { bindTemplate, componentArgs, StorybookParameters } from '../../stories-helpers';
1
+ import { bindTemplate, StorybookParameters } from '../../stories-helpers';
2
2
 
3
- import { PaginationArgs, paginationArgsMapper, paginationArgTypes } from './pagination.args';
3
+ import { paginationArgsMapper, paginationArgTypes } from './pagination.args';
4
4
  import { Pagination } from './pagination.models';
5
5
 
6
6
  export interface PaginationParameters<TemplateFnReturnType> {
@@ -25,14 +25,16 @@ export function storiesOfPagination<TemplateFnReturnType>(
25
25
  page: readme
26
26
  },
27
27
  argTypes: paginationArgTypes,
28
- args: componentArgs<PaginationArgs>({
29
- count: 5,
30
- current: 3
31
- })
32
28
  });
33
29
 
34
30
  stories.add(
35
31
  'Pagination',
36
- template
32
+ template,
33
+ {
34
+ args: {
35
+ totalPages: 5,
36
+ currentPage: 3,
37
+ }
38
+ }
37
39
  );
38
40
  }
@@ -0,0 +1,19 @@
1
+ import { ArgTypes, noControl } from '../../stories-helpers';
2
+
3
+ import { Tabs, TabsItem } from './tabs.models';
4
+
5
+ export interface TabsArgs {
6
+ items: TabsItem[];
7
+ }
8
+
9
+ export const tabsArgTypes: ArgTypes<TabsArgs> = {
10
+ items: {
11
+ ...noControl
12
+ }
13
+ };
14
+
15
+ export function tabsArgsMapper(a: TabsArgs): Tabs {
16
+ return {
17
+ items: a.items
18
+ };
19
+ }
@@ -0,0 +1,9 @@
1
+ export interface Tabs {
2
+ items: TabsItem[];
3
+ }
4
+
5
+ export interface TabsItem {
6
+ label: string;
7
+ id: string;
8
+ modifiers?: 'active' | 'disabled';
9
+ }
@@ -0,0 +1,86 @@
1
+ import { bindTemplate, componentArgs, StorybookParameters } from '../../stories-helpers';
2
+
3
+ import { TabsArgs, tabsArgsMapper, tabsArgTypes } from './tabs.args';
4
+ import { Tabs } from './tabs.models';
5
+
6
+ export interface TabsParameters<TemplateFnReturnType> {
7
+ tabsTemplate: (tabsProperties: Tabs) => TemplateFnReturnType;
8
+ }
9
+
10
+ export function storiesOfTabs<TemplateFnReturnType>(
11
+ {
12
+ module: mainModule,
13
+ storiesOf,
14
+ readme
15
+ }: StorybookParameters,
16
+ {
17
+ tabsTemplate
18
+ }: TabsParameters<TemplateFnReturnType>
19
+ ) {
20
+ const template = bindTemplate(tabsArgsMapper, tabsTemplate);
21
+
22
+ const stories = storiesOf('Tabs', mainModule)
23
+ .addParameters({
24
+ docs: {
25
+ page: readme
26
+ },
27
+ argTypes: tabsArgTypes
28
+ });
29
+
30
+ stories.add(
31
+ 'default',
32
+ template,
33
+ {
34
+ args: componentArgs<TabsArgs>({
35
+ items: [
36
+ {
37
+ label: 'Zoek op adres',
38
+ id: 'tabitem-1',
39
+ modifiers: 'active'
40
+ },
41
+ {
42
+ label: 'Postcode en huisnummer',
43
+ id: 'tabitem-2'
44
+ },
45
+ {
46
+ label: 'Kadastraal nummer',
47
+ id: 'tabitem-3'
48
+ },
49
+ {
50
+ label: 'Coordinaten',
51
+ id: 'tabitem-4'
52
+ }
53
+ ]
54
+ })
55
+ }
56
+ );
57
+
58
+ stories.add(
59
+ 'inactief',
60
+ template,
61
+ {
62
+ args: componentArgs<TabsArgs>({
63
+ items: [
64
+ {
65
+ label: 'Zoek op adres',
66
+ id: 'tabitem-1'
67
+ },
68
+ {
69
+ label: 'Postcode en huisnummer',
70
+ id: 'tabitem-2',
71
+ modifiers: 'active'
72
+ },
73
+ {
74
+ label: 'Kadastraal nummer',
75
+ id: 'tabitem-3'
76
+ },
77
+ {
78
+ label: 'Coordinaten',
79
+ id: 'tabitem-4',
80
+ modifiers: 'disabled'
81
+ }
82
+ ]
83
+ })
84
+ }
85
+ );
86
+ }
@@ -2,12 +2,13 @@ import { HandlerFunction } from '@storybook/addon-actions';
2
2
 
3
3
  import { ArgTypes } from '../../stories-helpers';
4
4
 
5
- import { Tooltip, tooltipPositions } from './tooltip.models';
5
+ import { Tooltip, tooltipPositions, tooltipStrategy } from './tooltip.models';
6
6
 
7
7
  export interface TooltipArgs {
8
8
  active?: boolean;
9
9
  descriptive?: boolean;
10
10
  position: typeof tooltipPositions;
11
+ strategy: typeof tooltipStrategy;
11
12
  label?: string;
12
13
  id?: string;
13
14
  action: HandlerFunction
@@ -30,6 +31,12 @@ export const tooltipArgTypes: ArgTypes<TooltipArgs> = {
30
31
  type: 'select'
31
32
  }
32
33
  },
34
+ strategy: {
35
+ options: tooltipStrategy,
36
+ control: {
37
+ type: 'select'
38
+ }
39
+ },
33
40
  label: {
34
41
  control: {
35
42
  type: 'text'
@@ -51,6 +58,7 @@ export function tooltipArgsMapper(a: TooltipArgs): Tooltip {
51
58
  descriptive: a.descriptive,
52
59
  label: a.label || `Ik sta "${a.position}"`,
53
60
  position: a.position,
61
+ strategy: a.strategy,
54
62
  id: a.id
55
63
  };
56
64
  }
@@ -1,9 +1,12 @@
1
1
  export const tooltipPositions = ['top', 'right', 'bottom', 'left'] as const;
2
2
 
3
+ export const tooltipStrategy = ['auto', 'absolute', 'fixed'] as const;
4
+
3
5
  export interface Tooltip {
4
6
  active?: boolean;
5
7
  descriptive?: boolean;
6
8
  position: typeof tooltipPositions;
9
+ strategy: typeof tooltipStrategy;
7
10
  label: string;
8
11
  id?: string;
9
12
  }
@@ -18,6 +18,7 @@
18
18
  @import "components/link-list/link-list";
19
19
  @import "components/list-button/list-button";
20
20
  @import "components/label/label";
21
+ @import "components/pagination/pagination";
21
22
  @import "components/progress-bar/progress-bar";
22
23
  @import "components/progress-indicator/progress-indicator";
23
24
  @import "components/selectable/selectable";
@@ -99,6 +99,8 @@ export * from './components/selectable/selectable.models';
99
99
  export * from './components/selectable/selectable.stories';
100
100
  export * from './components/shopping-cart/shopping-cart.models';
101
101
  export * from './components/shopping-cart/shopping-cart.stories';
102
+ export * from './components/tabs/tabs.models';
103
+ export * from './components/tabs/tabs.stories';
102
104
  export * from './components/tile/tile.models';
103
105
  export * from './components/tile/tile.stories';
104
106
  export * from './components/tile-grid/tile-grid.models';