@react-md/core 1.0.0-next.5 → 1.0.0-next.6

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 (74) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/CHANGELOG.md +6 -0
  3. package/dist/_core.scss +157 -240
  4. package/dist/_utils.scss +10 -0
  5. package/dist/app-bar/_app-bar.scss +95 -93
  6. package/dist/avatar/_avatar.scss +49 -47
  7. package/dist/badge/_badge.scss +19 -17
  8. package/dist/box/_box.scss +57 -55
  9. package/dist/button/_button.scss +122 -120
  10. package/dist/card/_card.scss +72 -70
  11. package/dist/chip/_chip.scss +105 -103
  12. package/dist/dialog/_dialog.scss +128 -126
  13. package/dist/divider/_divider.scss +24 -22
  14. package/dist/draggable/_draggable.scss +16 -12
  15. package/dist/expansion-panel/_expansion-panel.scss +69 -52
  16. package/dist/form/Form.d.ts +1 -1
  17. package/dist/form/Form.js +2 -1
  18. package/dist/form/Form.js.map +1 -1
  19. package/dist/form/_form.scss +1175 -1127
  20. package/dist/icon/_icon.scss +64 -62
  21. package/dist/interaction/_interaction.scss +39 -35
  22. package/dist/layout/_layout.scss +68 -67
  23. package/dist/link/_link.scss +52 -50
  24. package/dist/list/_list.scss +124 -122
  25. package/dist/menu/_menu.scss +9 -7
  26. package/dist/overlay/_overlay.scss +25 -23
  27. package/dist/progress/_progress.scss +11 -6
  28. package/dist/responsive-item/_responsive-item.scss +91 -89
  29. package/dist/segmented-button/_segmented-button.scss +54 -49
  30. package/dist/sheet/_sheet.scss +84 -82
  31. package/dist/snackbar/_snackbar.scss +128 -123
  32. package/dist/table/_table.scss +159 -157
  33. package/dist/tabs/_tabs.scss +10 -8
  34. package/dist/tooltip/_tooltip.scss +60 -58
  35. package/dist/transition/_transition.scss +44 -39
  36. package/dist/tree/_tree.scss +83 -81
  37. package/dist/typography/_typography.scss +58 -49
  38. package/dist/window-splitter/_window-splitter.scss +72 -70
  39. package/package.json +1 -1
  40. package/src/_core.scss +157 -240
  41. package/src/_utils.scss +10 -0
  42. package/src/app-bar/_app-bar.scss +95 -93
  43. package/src/avatar/_avatar.scss +49 -47
  44. package/src/badge/_badge.scss +19 -17
  45. package/src/box/_box.scss +57 -55
  46. package/src/button/_button.scss +122 -120
  47. package/src/card/_card.scss +72 -70
  48. package/src/chip/_chip.scss +105 -103
  49. package/src/dialog/_dialog.scss +128 -126
  50. package/src/divider/_divider.scss +24 -22
  51. package/src/draggable/_draggable.scss +16 -12
  52. package/src/expansion-panel/_expansion-panel.scss +69 -52
  53. package/src/form/Form.tsx +2 -1
  54. package/src/form/_form.scss +1175 -1127
  55. package/src/icon/_icon.scss +64 -62
  56. package/src/interaction/_interaction.scss +39 -35
  57. package/src/layout/_layout.scss +68 -67
  58. package/src/link/_link.scss +52 -50
  59. package/src/list/_list.scss +124 -122
  60. package/src/menu/_menu.scss +9 -7
  61. package/src/overlay/_overlay.scss +25 -23
  62. package/src/progress/_progress.scss +11 -6
  63. package/src/responsive-item/_responsive-item.scss +91 -89
  64. package/src/segmented-button/_segmented-button.scss +54 -49
  65. package/src/sheet/_sheet.scss +84 -82
  66. package/src/snackbar/_snackbar.scss +128 -123
  67. package/src/table/_table.scss +159 -157
  68. package/src/tabs/_tabs.scss +10 -8
  69. package/src/tooltip/_tooltip.scss +60 -58
  70. package/src/transition/_transition.scss +44 -39
  71. package/src/tree/_tree.scss +83 -81
  72. package/src/typography/_typography.scss +58 -49
  73. package/src/window-splitter/_window-splitter.scss +72 -70
  74. package/tsconfig.json +2 -2
@@ -16,74 +16,91 @@ $rotate-to: icon.$rotate-to !default;
16
16
  $box-shadow-overlay-height: 10px !default;
17
17
  $box-shadow-overlay-bottom: -6px !default;
18
18
 
19
- @mixin styles {
19
+ @mixin styles($disable-layer: false) {
20
20
  @if not $disable-everything {
21
- // does not require custom styles
22
- .rmd-expansion-panel {
23
- @if not $disable-margin-top-transition and $spacing {
24
- &--animate {
25
- transition: margin-top transition.$linear-duration;
21
+ @include utils.optional-layer(expansion-panel, $disable-layer) {
22
+ // does not require custom styles
23
+ .rmd-expansion-panel {
24
+ @if not $disable-margin-top-transition and $spacing {
25
+ &--animate {
26
+ transition: margin-top transition.$linear-duration;
27
+ }
26
28
  }
27
- }
28
29
 
29
- @if $spacing {
30
- &--expanded + .rmd-expansion-panel {
31
- margin-top: $spacing;
30
+ @if $spacing {
31
+ &--expanded + .rmd-expansion-panel {
32
+ margin-top: $spacing;
33
+ }
32
34
  }
33
- }
34
35
 
35
- @if not utils.$disable-has-selectors {
36
- // this makes it so that the box-shadow between closed panels is not
37
- // visible by covering it in a small overlay of the current
38
- // background-color
39
- &:where(:not(.rmd-expansion-panel--expanded)):has(
40
- + .rmd-expansion-panel
41
- ) {
42
- position: relative;
36
+ @if not utils.$disable-has-selectors {
37
+ // this makes it so that the box-shadow between closed panels is not
38
+ // visible by covering it in a small overlay of the current
39
+ // background-color
40
+ &:where(:not(.rmd-expansion-panel--expanded)):has(
41
+ + .rmd-expansion-panel
42
+ ) {
43
+ position: relative;
43
44
 
44
- &::after {
45
- @include theme.theme-use-var(background-color);
45
+ &::after {
46
+ @include theme.theme-use-var(background-color);
46
47
 
47
- bottom: $box-shadow-overlay-bottom;
48
- content: "";
49
- height: $box-shadow-overlay-height;
50
- left: 0;
51
- position: absolute;
52
- right: 0;
53
- z-index: 1;
48
+ bottom: $box-shadow-overlay-bottom;
49
+ content: "";
50
+ height: $box-shadow-overlay-height;
51
+ left: 0;
52
+ position: absolute;
53
+ right: 0;
54
+ z-index: 1;
55
+ }
54
56
  }
55
57
  }
56
58
  }
57
- }
58
59
 
59
- // .rmd-expansion-panel__header {
60
- // }
60
+ // .rmd-expansion-panel__header {
61
+ // }
61
62
 
62
- .rmd-expansion-panel__button {
63
- @if $rotate-from != icon.$rotate-from {
64
- @include icon.set-var(rotate-from, $rotate-from);
65
- }
63
+ .rmd-expansion-panel__button {
64
+ @if $rotate-from != icon.$rotate-from {
65
+ @include icon.set-var(rotate-from, $rotate-from);
66
+ }
66
67
 
67
- @if $rotate-to != icon.$rotate-to {
68
- @include icon.set-var(rotate-to, $rotate-to);
69
- }
68
+ @if $rotate-to != icon.$rotate-to {
69
+ @include icon.set-var(rotate-to, $rotate-to);
70
+ }
70
71
 
71
- @if button.$disable-unstyled-utility-class {
72
- @include button.unstyled;
73
- }
74
- @include utils.auto-rtl(text-align, left);
72
+ @if button.$disable-unstyled-utility-class {
73
+ @include button.unstyled;
74
+ }
75
+ @include utils.auto-rtl(text-align, left);
75
76
 
76
- align-items: center;
77
- color: inherit;
78
- font: inherit;
79
- gap: $button-spacing;
80
- justify-content: space-between;
81
- letter-spacing: inherit;
82
- padding: $padding;
83
- width: 100%;
77
+ align-items: center;
78
+ color: inherit;
79
+ font: inherit;
80
+ gap: $button-spacing;
81
+ justify-content: space-between;
82
+ letter-spacing: inherit;
83
+ padding: $padding;
84
+ width: 100%;
84
85
 
85
- &[aria-disabled="true"] {
86
- cursor: auto;
86
+ &[aria-disabled="true"] {
87
+ cursor: auto;
88
+ }
89
+
90
+ // need to raise the focus outline z-index so it is above the box-shadow
91
+ @if not utils.$disable-has-selectors {
92
+ @if not utils.$disable-focus-visible {
93
+ &::before {
94
+ z-index: 2;
95
+ }
96
+ } @else {
97
+ @include utils.keyboard-only {
98
+ &::before {
99
+ z-index: 2;
100
+ }
101
+ }
102
+ }
103
+ }
87
104
  }
88
105
  }
89
106
  }
@@ -10,7 +10,7 @@ export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
10
10
  disablePreventDefault?: boolean;
11
11
  }
12
12
  /**
13
- * **Server Component**
13
+ * **Client Component**
14
14
  *
15
15
  * This is probably one of the least useful components available as it doesn't
16
16
  * do much styling or logic. All this form component will do is add basic flex
package/dist/form/Form.js CHANGED
@@ -1,10 +1,11 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { forwardRef } from "react";
3
4
  const noop = ()=>{
4
5
  // do nothing
5
6
  };
6
7
  /**
7
- * **Server Component**
8
+ * **Client Component**
8
9
  *
9
10
  * This is probably one of the least useful components available as it doesn't
10
11
  * do much styling or logic. All this form component will do is add basic flex
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/form/Form.tsx"],"sourcesContent":["import { forwardRef, type FormHTMLAttributes } from \"react\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n /**\n * Boolean if the form should no longer prevent default submit behavior. If\n * you enable this prop you should honestly just use a `<form>` element\n * instead\n *\n * @defaultValue `false`\n */\n disablePreventDefault?: boolean;\n}\n\n/**\n * **Server Component**\n *\n * This is probably one of the least useful components available as it doesn't\n * do much styling or logic. All this form component will do is add basic flex\n * behavior and prevent the default form submit behavior.\n */\nexport const Form = forwardRef<HTMLFormElement, FormProps>(\n function Form(props, ref) {\n const {\n children,\n onSubmit = noop,\n disablePreventDefault = false,\n ...remaining\n } = props;\n\n return (\n <form\n {...remaining}\n onSubmit={(event) => {\n if (!disablePreventDefault) {\n event.preventDefault();\n }\n\n onSubmit(event);\n }}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n"],"names":["forwardRef","noop","Form","props","ref","children","onSubmit","disablePreventDefault","remaining","form","event","preventDefault"],"mappings":";AAAA,SAASA,UAAU,QAAiC,QAAQ;AAE5D,MAAMC,OAAO;AACX,aAAa;AACf;AAaA;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,QAAQ,EACRC,WAAWL,IAAI,EACfM,wBAAwB,KAAK,EAC7B,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbF,UAAU,CAACI;YACT,IAAI,CAACH,uBAAuB;gBAC1BG,MAAMC,cAAc;YACtB;YAEAL,SAASI;QACX;QACAN,KAAKA;kBAEJC;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/form/Form.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, type FormHTMLAttributes } from \"react\";\n\nconst noop = (): void => {\n // do nothing\n};\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n /**\n * Boolean if the form should no longer prevent default submit behavior. If\n * you enable this prop you should honestly just use a `<form>` element\n * instead\n *\n * @defaultValue `false`\n */\n disablePreventDefault?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This is probably one of the least useful components available as it doesn't\n * do much styling or logic. All this form component will do is add basic flex\n * behavior and prevent the default form submit behavior.\n */\nexport const Form = forwardRef<HTMLFormElement, FormProps>(\n function Form(props, ref) {\n const {\n children,\n onSubmit = noop,\n disablePreventDefault = false,\n ...remaining\n } = props;\n\n return (\n <form\n {...remaining}\n onSubmit={(event) => {\n if (!disablePreventDefault) {\n event.preventDefault();\n }\n\n onSubmit(event);\n }}\n ref={ref}\n >\n {children}\n </form>\n );\n }\n);\n"],"names":["forwardRef","noop","Form","props","ref","children","onSubmit","disablePreventDefault","remaining","form","event","preventDefault"],"mappings":"AAAA;;AACA,SAASA,UAAU,QAAiC,QAAQ;AAE5D,MAAMC,OAAO;AACX,aAAa;AACf;AAaA;;;;;;CAMC,GACD,OAAO,MAAMC,qBAAOF,WAClB,SAASE,KAAKC,KAAK,EAAEC,GAAG;IACtB,MAAM,EACJC,QAAQ,EACRC,WAAWL,IAAI,EACfM,wBAAwB,KAAK,EAC7B,GAAGC,WACJ,GAAGL;IAEJ,qBACE,KAACM;QACE,GAAGD,SAAS;QACbF,UAAU,CAACI;YACT,IAAI,CAACH,uBAAuB;gBAC1BG,MAAMC,cAAc;YACtB;YAEAL,SAASI;QACX;QACAN,KAAKA;kBAEJC;;AAGP,GACA"}