@dynamic-framework/ui-react 1.15.0 → 1.16.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 (40) hide show
  1. package/dist/css/dynamic-ui-non-root.css +1879 -1893
  2. package/dist/css/dynamic-ui-non-root.min.css +4 -1
  3. package/dist/css/dynamic-ui-root.css +6 -3
  4. package/dist/css/dynamic-ui-root.min.css +4 -1
  5. package/dist/css/dynamic-ui.css +1882 -1896
  6. package/dist/css/dynamic-ui.min.css +4 -1
  7. package/dist/index.esm.js +29 -38
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +27 -39
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DBadge/DBadge.d.ts +2 -1
  12. package/dist/types/components/index.d.ts +0 -1
  13. package/dist/types/contexts/DContext.d.ts +2 -2
  14. package/package.json +4 -3
  15. package/src/style/abstracts/variables/_accordion.scss +14 -6
  16. package/src/style/abstracts/variables/_body.scss +1 -1
  17. package/src/style/abstracts/variables/_buttons.scss +3 -3
  18. package/src/style/abstracts/variables/_close.scss +2 -2
  19. package/src/style/abstracts/variables/_modals.scss +2 -2
  20. package/src/style/base/_+import.scss +34 -1
  21. package/src/style/base/_accordion.scss +18 -0
  22. package/src/style/base/_breadcrumb.scss +10 -0
  23. package/src/style/{components/_d-button.scss → base/_button.scss} +15 -1
  24. package/src/style/components/_+import.scss +0 -36
  25. package/src/style/components/_d-modal.scss +1 -1
  26. package/src/style/helpers/_color-bg.scss +12 -0
  27. package/src/style/root/_root.scss +2 -2
  28. package/dist/types/components/banking/DPermissionGroup.d.ts +0 -11
  29. package/dist/types/components/banking/DPermissionItem.d.ts +0 -9
  30. package/dist/types/components/banking/DSummaryCard.d.ts +0 -12
  31. package/dist/types/components/banking/index.d.ts +0 -3
  32. package/dist/types/components/banking/interface.d.ts +0 -7
  33. package/src/style/components/_d-badge.scss +0 -26
  34. package/src/style/components/_d-permission-group.scss +0 -39
  35. /package/src/style/{components/_d-alert.scss → base/_alert.scss} +0 -0
  36. /package/src/style/{components/_d-collapse.scss → base/_collapse.scss} +0 -0
  37. /package/src/style/{components/_d-input-check.scss → base/_form-check.scss} +0 -0
  38. /package/src/style/{components/_d-input-switch.scss → base/_form-switch.scss} +0 -0
  39. /package/src/style/{components/_d-paginator.scss → base/_pagination.scss} +0 -0
  40. /package/src/style/{components/_d-progress.scss → base/_progress.scss} +0 -0
@@ -2,8 +2,9 @@ import type { BaseProps } from '../interface';
2
2
  type Props = BaseProps & {
3
3
  text?: string;
4
4
  dot?: boolean;
5
+ soft?: boolean;
5
6
  theme?: string;
6
7
  id?: string;
7
8
  };
8
- export default function DBadge({ text, dot, theme, id, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export default function DBadge({ text, dot, soft, theme, id, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -1,4 +1,3 @@
1
- export * from './banking';
2
1
  export { default as DAlert } from './DAlert';
3
2
  export { default as DBadge } from './DBadge';
4
3
  export { default as DBoxFile } from './DBoxFile';
@@ -39,9 +39,9 @@ type Props = {
39
39
  iconMap: IconMapProps;
40
40
  };
41
41
  type Context = Props & {
42
- setContext: (value: Props) => void;
42
+ setContext: (value: Partial<Props>) => void;
43
43
  };
44
- export declare const DContext: import("react").Context<Context>;
44
+ export declare const DContext: import("react").Context<Partial<Context>>;
45
45
  export declare function DContextProvider({ language, currency, icon, iconMap, children, }: PropsWithChildren<Partial<Props>>): import("react/jsx-runtime").JSX.Element;
46
46
  export declare function useDContext(): Context;
47
47
  export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "1.15.0",
6
+ "version": "1.16.0",
7
7
  "description": "React Dynamic Framework",
8
8
  "license": "MIT",
9
9
  "repository": {
@@ -57,7 +57,8 @@
57
57
  "eslint:stories": "eslint stories/**/*.stories.tsx",
58
58
  "eslint:test": "eslint src/**/*.spec.tsx",
59
59
  "stylelint": "stylelint \"**/*.{css,scss}\" --rd",
60
- "lint-staged": "lint-staged"
60
+ "lint-staged": "lint-staged",
61
+ "postversion": "pnpm build:scss"
61
62
  },
62
63
  "main": "./dist/index.js",
63
64
  "module": "./dist/index.esm.js",
@@ -147,5 +148,5 @@
147
148
  "react-dom": "^18.2.0",
148
149
  "react-i18next": "^13.3.1"
149
150
  },
150
- "gitHead": "a37c9aa8e3eac83d13f9c2b8837334aa35ad0128"
151
+ "gitHead": "1061bcbc122e8cfe94a0b4fbda24a6b327b93695"
151
152
  }
@@ -1,25 +1,33 @@
1
1
  // Accordion
2
2
 
3
3
  // scss-docs-start accordion-variables
4
- $accordion-padding-y: 1rem !default;
5
- $accordion-padding-x: 1.25rem !default;
6
- $accordion-color: var(--#{$prefix}body-color) !default;
7
- $accordion-bg: var(--#{$prefix}body-bg) !default;
4
+ $accordion-padding-y: var(--#{$prefix}ref-spacer-4) !default;
5
+ $accordion-padding-x: var(--#{$prefix}ref-spacer-3) !default;
6
+ $accordion-color: var(--#{$prefix}gray-700) !default;
7
+ $accordion-bg: var(--#{$prefix}white) !default;
8
8
  $accordion-border-width: var(--#{$prefix}border-width) !default;
9
9
  $accordion-border-color: var(--#{$prefix}border-color) !default;
10
10
  $accordion-border-radius: var(--#{$prefix}border-radius) !default;
11
11
  $accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;
12
12
 
13
13
  $accordion-body-padding-y: $accordion-padding-y !default;
14
+ // custom
15
+ $accordion-body-padding-top: $accordion-padding-x !default;
16
+ // end custom
14
17
  $accordion-body-padding-x: $accordion-padding-x !default;
15
18
 
16
19
  $accordion-button-padding-y: $accordion-padding-y !default;
17
20
  $accordion-button-padding-x: $accordion-padding-x !default;
18
21
  $accordion-button-color: var(--#{$prefix}body-color) !default;
22
+ $accordion-button-border-color: var(--#{$prefix}gray-100) !default;
19
23
  $accordion-button-bg: var(--#{$prefix}accordion-bg) !default;
24
+ // custom
25
+ $accordion-button-font-weight: var(--#{$prefix}ref-fw-bold) !default;
26
+ $accordion-button-font-size: var(--#{$prefix}ref-fs-6) !default;
27
+ // end custom
20
28
  $accordion-transition: $btn-transition, border-radius .15s ease !default;
21
- $accordion-button-active-bg: var(--#{$prefix}primary-bg-subtle) !default;
22
- $accordion-button-active-color: var(--#{$prefix}primary-text-emphasis) !default;
29
+ $accordion-button-active-bg: var(--#{$prefix}secondary-soft) !default;
30
+ $accordion-button-active-color: var(--#{$prefix}body-color) !default;
23
31
 
24
32
  $accordion-button-focus-border-color: $input-focus-border-color !default;
25
33
  $accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;
@@ -7,7 +7,7 @@ $body-text-align: null !default;
7
7
  // custom
8
8
  $body-color-mapping: "gray-900" !default;
9
9
  $body-color: map-get($all-colors, $body-color-mapping) !default;
10
- $body-bg-mapping: "white" !default;
10
+ $body-bg-mapping: "secondary-soft" !default;
11
11
  $body-bg: map-get($all-colors, $body-bg-mapping) !default;
12
12
 
13
13
  $body-secondary-color: var(--#{$prefix}body-color-rgb) !default;
@@ -32,9 +32,9 @@ $btn-link-color: var(--#{$prefix}link-color) !default;
32
32
  $btn-link-hover-color: var(--#{$prefix}link-hover-color) !default;
33
33
  $btn-link-disabled-color: $gray-600 !default;
34
34
 
35
- $btn-border-radius: $border-radius-sm !default;
36
- $btn-border-radius-sm: $border-radius-sm !default;
37
- $btn-border-radius-lg: $border-radius-lg !default;
35
+ $btn-border-radius: var(--#{$prefix}border-radius-sm) !default;
36
+ $btn-border-radius-sm: var(--#{$prefix}border-radius-sm) !default;
37
+ $btn-border-radius-lg: var(--#{$prefix}border-radius) !default;
38
38
 
39
39
  $btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
40
40
 
@@ -1,8 +1,8 @@
1
1
  // Close
2
2
 
3
3
  // scss-docs-start close-variables
4
- $btn-close-width: auto !default;
5
- $btn-close-height: auto !default;
4
+ $btn-close-width: 1em !default;
5
+ $btn-close-height: 1em !default;
6
6
  $btn-close-padding-x: 0 !default;
7
7
  $btn-close-padding-y: 0 !default;
8
8
  $btn-close-color: var(--#{$prefix}black) !default;
@@ -1,7 +1,7 @@
1
1
  // Modals
2
2
 
3
3
  // scss-docs-start modal-variables
4
- $modal-inner-padding: 0 !default;
4
+ $modal-inner-padding: $spacer-3 !default;
5
5
 
6
6
  // custom
7
7
  $modal-header-gap: $spacer-4 !default;
@@ -24,7 +24,7 @@ $modal-content-box-shadow-xs: $box-shadow-sm !default;
24
24
  $modal-content-box-shadow-sm-up: $box-shadow-sm !default;
25
25
 
26
26
  // custom
27
- $modal-body-padding: 0 !default;
27
+ $modal-body-padding: $modal-inner-padding !default;
28
28
  // end custom
29
29
 
30
30
  $modal-backdrop-bg: var(--#{$prefix}black) !default;
@@ -5,8 +5,41 @@
5
5
  @import "bootstrap/scss/images";
6
6
  @import "bootstrap/scss/containers";
7
7
  @import "bootstrap/scss/grid";
8
- // @import "bootstrap/scss/tables";
8
+ // @import "bootstrap/scss/tables"; we use our own bootstrap based implementation
9
9
  @import "tables";
10
10
 
11
11
  @import "bootstrap/scss/transitions";
12
12
 
13
+ @import "bootstrap/scss/forms";
14
+ // @import "bootstrap/scss/buttons"; we use our own bootstrap based implementation
15
+ @import "bootstrap/scss/dropdown";
16
+ @import "bootstrap/scss/button-group";
17
+ @import "bootstrap/scss/nav";
18
+ @import "bootstrap/scss/navbar";
19
+ @import "bootstrap/scss/card";
20
+ @import "bootstrap/scss/accordion";
21
+ @import "bootstrap/scss/breadcrumb";
22
+ @import "bootstrap/scss/pagination";
23
+ @import "bootstrap/scss/alert";
24
+ @import "bootstrap/scss/progress";
25
+ @import "bootstrap/scss/list-group";
26
+ @import "bootstrap/scss/close";
27
+ @import "bootstrap/scss/toasts";
28
+ @import "bootstrap/scss/modal";
29
+ @import "bootstrap/scss/tooltip";
30
+ @import "bootstrap/scss/popover";
31
+ @import "bootstrap/scss/carousel";
32
+ @import "bootstrap/scss/spinners";
33
+ @import "bootstrap/scss/offcanvas";
34
+ @import "bootstrap/scss/placeholders";
35
+ @import "bootstrap/scss/badge";
36
+
37
+ @import "accordion";
38
+ @import "form-switch";
39
+ @import "form-check";
40
+ @import "button";
41
+ @import "progress";
42
+ @import "alert";
43
+ @import "collapse";
44
+ @import "pagination";
45
+ @import "breadcrumb";
@@ -0,0 +1,18 @@
1
+ .accordion {
2
+ --#{$prefix}accordion-btn-font-weight: #{$accordion-button-font-weight};
3
+ --#{$prefix}accordion-btn-font-size: #{$accordion-button-font-size};
4
+ --#{$prefix}accordion-body-padding-top: #{$accordion-body-padding-top};
5
+
6
+ .accordion-button {
7
+ font-weight: var(--#{$prefix}accordion-btn-font-weight);
8
+ @include font-size(var(--#{$prefix}accordion-btn-font-size));
9
+ }
10
+
11
+ .accordion-item .show {
12
+ background-color: var(--#{$prefix}accordion-active-bg);
13
+ }
14
+
15
+ .accordion-body {
16
+ padding-top: var(--#{$prefix}accordion-body-padding-top);
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ .breadcrumb .separator {
2
+ float: left;
3
+ padding: 0 var(--#{$prefix}breadcrumb-item-padding-x);
4
+ color: var(--#{$prefix}breadcrumb-divider-color);
5
+ content: var(--#{$prefix}breadcrumb-divider, "/");
6
+ }
7
+
8
+ .breadcrumb .last {
9
+ color: var(--#{$prefix}breadcrumb-item-active-color);
10
+ }
@@ -160,7 +160,21 @@
160
160
  text-decoration: underline;
161
161
  }
162
162
 
163
- @include df-button-link-variant($color);
163
+ @if $color == "light" {
164
+ @include df-button-link-variant(
165
+ "gray",
166
+ $default-color: $value,
167
+ $hover-bg-color: var(--#{$prefix}gray-300),
168
+ $active-bg-color: var(--#{$prefix}gray-500)
169
+ );
170
+ } @else if $color == "dark" {
171
+ @include df-button-link-variant(
172
+ "gray",
173
+ $default-color: $value
174
+ );
175
+ } @else {
176
+ @include df-button-link-variant($color);
177
+ }
164
178
  }
165
179
  }
166
180
 
@@ -1,48 +1,16 @@
1
- @import "bootstrap/scss/forms";
2
- // @import "bootstrap/scss/buttons"; we use our own bootstrap based implementation
3
-
4
- @import "bootstrap/scss/dropdown";
5
- @import "bootstrap/scss/button-group";
6
- @import "bootstrap/scss/nav";
7
- @import "bootstrap/scss/navbar";
8
- @import "bootstrap/scss/card";
9
- @import "bootstrap/scss/accordion";
10
- @import "bootstrap/scss/breadcrumb";
11
- @import "bootstrap/scss/pagination";
12
- @import "bootstrap/scss/badge";
13
- @import "bootstrap/scss/alert";
14
- @import "bootstrap/scss/progress";
15
- @import "bootstrap/scss/list-group";
16
- @import "bootstrap/scss/close";
17
- @import "bootstrap/scss/toasts";
18
- @import "bootstrap/scss/modal";
19
- @import "bootstrap/scss/tooltip";
20
- @import "bootstrap/scss/popover";
21
- @import "bootstrap/scss/carousel";
22
- @import "bootstrap/scss/spinners";
23
- @import "bootstrap/scss/offcanvas";
24
- @import "bootstrap/scss/placeholders";
25
-
26
1
  @import "react-toastify/scss/main";
27
2
 
28
3
  @import "d-icon";
29
4
  @import "d-input";
30
- @import "d-input-switch";
31
- @import "d-input-check";
32
5
  @import "d-input-select";
33
6
  @import "d-input-pin";
34
- @import "d-button";
35
7
  @import "d-quick-action-button";
36
8
  @import "d-quick-action-select";
37
9
  @import "d-quick-action-check";
38
10
  @import "d-quick-action-switch";
39
- @import "d-progress";
40
- @import "d-alert";
41
- @import "d-badge";
42
11
  @import "d-chip";
43
12
  @import "d-modal";
44
13
  @import "d-offcanvas";
45
- @import "d-collapse";
46
14
  @import "d-collapse-icon-text";
47
15
  @import "d-datepicker";
48
16
  @import "d-timepicker";
@@ -53,10 +21,6 @@
53
21
  @import "d-carousel";
54
22
  @import "d-stepper-desktop";
55
23
  @import "d-stepper-mobile";
56
- @import "d-paginator";
57
24
  @import "d-card-account";
58
25
  @import "d-tooltip";
59
26
  @import "d-select";
60
-
61
- // TODO: review.
62
- @import "d-permission-group";
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .modal-body {
32
- padding: var(--#{$prefix}modal-body-padding);
32
+ padding: var(--#{$prefix}modal-component-body-padding, var(--#{$prefix}modal-body-padding));
33
33
  }
34
34
 
35
35
  .d-modal-separator {
@@ -4,4 +4,16 @@
4
4
  color: color-contrast-var($value) if($enable-important-utilities, !important, null);
5
5
  background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
6
6
  }
7
+
8
+ .text-bg-soft-#{$color} {
9
+ color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
10
+
11
+ @if $color == "light" {
12
+ background-color: RGBA(var(--#{$prefix}gray-700-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
13
+ } @else if $color == "dark" {
14
+ background-color: RGBA(var(--#{$prefix}gray-200-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
15
+ } @else {
16
+ background-color: RGBA(var(--#{$prefix}#{$color}-100-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
17
+ }
18
+ }
7
19
  }
@@ -121,11 +121,11 @@
121
121
  --#{$prefix}heading-color: #{$headings-color};
122
122
 
123
123
  --#{$prefix}link-color: rgb(var(--#{$prefix}link-color-rgb));
124
- --#{$prefix}link-color-rgb: var(--#{$prefix}#{$link-color-mapping});
124
+ --#{$prefix}link-color-rgb: var(--#{$prefix}#{$link-color-mapping}-rgb);
125
125
  --#{$prefix}link-decoration: #{$link-decoration};
126
126
 
127
127
  --#{$prefix}link-hover-color: rgb(var(--#{$prefix}link-hover-color-rgb));
128
- --#{$prefix}link-hover-color-rgb: var(--#{$prefix}#{$link-hover-color-mapping});
128
+ --#{$prefix}link-hover-color-rgb: var(--#{$prefix}#{$link-hover-color-mapping}-rgb);
129
129
 
130
130
  @if $link-hover-decoration != null {
131
131
  --#{$prefix}link-hover-decoration: #{$link-hover-decoration};
@@ -1,11 +0,0 @@
1
- import { PermissionItemType } from './interface';
2
- type Props = {
3
- title: string;
4
- description: string;
5
- permissionState: string;
6
- permissionList: Array<PermissionItemType>;
7
- onChangePermission: (permission: PermissionItemType, checked: boolean) => void;
8
- onCustomAction?: (permission: PermissionItemType) => void;
9
- };
10
- export default function DPermissionGroup({ title, description, permissionState, permissionList, onChangePermission, onCustomAction, }: Props): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,9 +0,0 @@
1
- import { PermissionItemType } from './interface';
2
- type Props = {
3
- permission: PermissionItemType;
4
- permissionState: string;
5
- onChange: (isChecked: boolean) => void;
6
- onAction?: () => void;
7
- };
8
- export default function DPermissionItem({ permission, permissionState, onChange, onAction, }: Props): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,12 +0,0 @@
1
- import { Trans } from 'react-i18next';
2
- import { ReactElement } from 'react';
3
- type Props = {
4
- title: string;
5
- description: string;
6
- icon: string;
7
- iconSize: string;
8
- iconTheme: string;
9
- Summary: ReactElement<typeof Trans> | string;
10
- };
11
- export default function DSummaryCard({ title, description, icon, iconSize, iconTheme, Summary, }: Props): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,3 +0,0 @@
1
- export { default as DPermissionGroup } from './DPermissionGroup';
2
- export { default as DPermissionItem } from './DPermissionItem';
3
- export { default as DSummaryCard } from './DSummaryCard';
@@ -1,7 +0,0 @@
1
- export type PermissionItemType = {
2
- id: string;
3
- enabled: boolean;
4
- label: string;
5
- type: string;
6
- value: unknown;
7
- };
@@ -1,26 +0,0 @@
1
- .badge {
2
- --#{$prefix}badge-bg: #{$badge-bg};
3
- --#{$prefix}badge-dot-height: #{$badge-dot-height};
4
-
5
- display: inline-block;
6
- background-color: var(--#{$prefix}badge-bg);
7
-
8
- @each $theme, $value in $theme-colors {
9
- $color: color-contrast-var($value);
10
- &.badge-#{$theme} {
11
- --#{$prefix}badge-color: #{$color};
12
- --#{$prefix}badge-bg: var(--#{$prefix}#{$theme});
13
- }
14
- }
15
-
16
- &.badge-dot {
17
- min-width: var(--#{$prefix}badge-dot-height);
18
- height: var(--#{$prefix}badge-dot-height);
19
- padding: 0;
20
- border-radius: var(--#{$prefix}badge-border-radius);
21
-
22
- > span {
23
- vertical-align: middle;
24
- }
25
- }
26
- }
@@ -1,39 +0,0 @@
1
- .operation-group {
2
- &:not(:last-child) {
3
- border-bottom: 1px solid var(--#{$prefix}gray-300);
4
- }
5
- }
6
-
7
- .permission-item {
8
- padding: 8px 0;
9
- .form-switch-box {
10
- width: auto;
11
- }
12
- .label {
13
- font-size: .875rem;
14
- }
15
- &:hover {
16
- background: #f7f7ff;
17
- }
18
- &:not(:last-child) {
19
- border-bottom: 1px solid var(--#{$prefix}gray-300);
20
- }
21
- }
22
-
23
- @media screen and (min-width: 768px) {
24
- .permission-item {
25
- padding: 8px 10px;
26
- }
27
- .permission-item .label {
28
- font-size: 1rem;
29
- }
30
- }
31
-
32
- @media screen and (min-width: 992px) {
33
- .operation-group {
34
- border-top: 1px solid var(--#{$prefix}gray-300);
35
- &:not(:last-child) {
36
- border-bottom: none;
37
- }
38
- }
39
- }