@noxlovette/material 0.9.3 → 0.10.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 (68) hide show
  1. package/dist/components/buttons/connected/theme.d.ts +15 -15
  2. package/dist/components/buttons/connected/theme.js +20 -5
  3. package/dist/components/buttons/split-button/theme.d.ts +15 -15
  4. package/dist/components/buttons/split-button/theme.js +21 -15
  5. package/dist/components/buttons/theme.d.ts +40 -40
  6. package/dist/components/buttons/theme.js +29 -29
  7. package/dist/components/cards/theme.js +1 -1
  8. package/dist/components/chips/Chip.svelte +1 -1
  9. package/dist/components/chips/theme.js +1 -1
  10. package/dist/components/containers/bottom-sheet/theme.js +1 -1
  11. package/dist/components/containers/carousel/theme.js +1 -1
  12. package/dist/components/containers/context-menu/theme.js +2 -2
  13. package/dist/components/containers/dialogue/theme.js +1 -1
  14. package/dist/components/containers/list/theme.d.ts +3 -3
  15. package/dist/components/containers/list/theme.js +8 -8
  16. package/dist/components/containers/menu/theme.js +3 -3
  17. package/dist/components/date/theme.js +2 -2
  18. package/dist/components/forms/checkbox/theme.js +1 -1
  19. package/dist/components/forms/command/theme.js +1 -1
  20. package/dist/components/forms/index.d.ts +1 -0
  21. package/dist/components/forms/index.js +1 -0
  22. package/dist/components/forms/search/theme.js +1 -1
  23. package/dist/components/forms/select/theme.js +2 -2
  24. package/dist/components/forms/slider/Slider.svelte +8 -0
  25. package/dist/components/forms/slider/theme.js +7 -7
  26. package/dist/components/forms/slider/types.d.ts +13 -0
  27. package/dist/components/forms/textarea/Textarea.mdx +63 -0
  28. package/dist/components/forms/textarea/Textarea.stories.svelte +99 -0
  29. package/dist/components/forms/textarea/Textarea.stories.svelte.d.ts +19 -0
  30. package/dist/components/forms/textarea/Textarea.svelte +142 -0
  31. package/dist/components/forms/textarea/Textarea.svelte.d.ts +13 -0
  32. package/dist/components/forms/textarea/index.d.ts +3 -0
  33. package/dist/components/forms/textarea/index.js +6 -0
  34. package/dist/components/forms/textarea/theme.d.ts +150 -0
  35. package/dist/components/forms/textarea/theme.js +155 -0
  36. package/dist/components/forms/textarea/types.d.ts +59 -0
  37. package/dist/components/forms/textarea/types.js +1 -0
  38. package/dist/components/forms/textfield/theme.js +4 -4
  39. package/dist/components/forms/toggle-group/theme.js +2 -2
  40. package/dist/components/misc/ThemeSettings.svelte +1 -1
  41. package/dist/components/misc/materialAvatarPalette.js +1 -1
  42. package/dist/components/nav/appbar/theme.js +22 -6
  43. package/dist/components/nav/navbar/theme.js +1 -1
  44. package/dist/components/nav/tabs/theme.js +1 -1
  45. package/dist/components/progress/CircularProgress.svelte +5 -3
  46. package/dist/components/progress/CircularProgress.svelte.d.ts +2 -1
  47. package/dist/components/progress/LinearProgress.svelte +5 -2
  48. package/dist/components/progress/LinearProgress.svelte.d.ts +2 -1
  49. package/dist/components/progress/WavyLinearProgress.svelte +5 -3
  50. package/dist/components/progress/WavyLinearProgress.svelte.d.ts +2 -1
  51. package/dist/components/progress/index.d.ts +1 -0
  52. package/dist/components/progress/index.js +1 -0
  53. package/dist/components/progress/types.d.ts +16 -0
  54. package/dist/components/progress/types.js +1 -0
  55. package/dist/components/snackbar/theme.js +1 -1
  56. package/dist/components/table/TableHeader.svelte +1 -1
  57. package/dist/components/toolbar/theme.js +2 -2
  58. package/dist/styles/components.css +7 -2
  59. package/dist/styles/icon.css +19 -0
  60. package/dist/styles/rounding.css +4 -0
  61. package/dist/utils/Theme.svelte +1 -1
  62. package/dist/utils/ThemeScript.svelte +1 -1
  63. package/dist/utils/icon/Icon.svelte +5 -5
  64. package/dist/utils/index.d.ts +2 -2
  65. package/dist/utils/index.js +1 -1
  66. package/package.json +1 -1
  67. /package/dist/utils/{theme.svelte.d.ts → themeState.svelte.d.ts} +0 -0
  68. /package/dist/utils/{theme.svelte.js → themeState.svelte.js} +0 -0
@@ -1,10 +1,15 @@
1
1
  /*
2
- * M3 component dimensions that aren't on the spacing scale (issue #30). Each property is named
3
- * after its token in the M3 token database, md.comp.<component>.<…> with dots as dashes, and
2
+ * M3 component dimensions that aren't on the spacing scale (issue #30). Database-backed properties
3
+ * are named after md.comp.<component>.<…> with dots as dashes; local component-specific dimensions
4
+ * are named for their use. Both are
4
5
  * used as `w-(--md-comp-…)`. A dimension that lands on the spacing grid uses the spacing token
5
6
  * instead (the rail's 4dp item gap is `gap-spacing-50`, not a property here).
6
7
  */
7
8
  :root {
9
+ /* XL button pill: half its 136dp height, beyond the system shape scale. */
10
+ --md-comp-button-xl-round-corner: 4.25rem;
11
+ --md-comp-slider-inner-corner: 0.125rem; /* 2dp, smaller than system shape XS */
12
+
8
13
  /* Navigation rail: https://m3.material.io/components/navigation-rail/specs */
9
14
  --md-comp-nav-rail-collapsed-container-width: 6rem; /* 96dp */
10
15
  --md-comp-nav-rail-collapsed-top-space: 2.75rem; /* 44dp */
@@ -1,3 +1,22 @@
1
+ /* Icon sizes used by the M3 components and the Material Symbols font. The 18, 22, 26, 38 and
2
+ 50dp steps are component-specific glyph dimensions (chips, split buttons), not M3 system sizes.
3
+ Each token controls both the glyph font size and its box, so they cannot drift apart. */
4
+ @theme {
5
+ --text-icon-16: 1rem;
6
+ --text-icon-18: 1.125rem;
7
+ --text-icon-20: 1.25rem;
8
+ --text-icon-22: 1.375rem;
9
+ --text-icon-24: 1.5rem;
10
+ --text-icon-26: 1.625rem;
11
+ --text-icon-28: 1.75rem;
12
+ --text-icon-32: 2rem;
13
+ --text-icon-36: 2.25rem;
14
+ --text-icon-38: 2.375rem;
15
+ --text-icon-40: 2.5rem;
16
+ --text-icon-48: 3rem;
17
+ --text-icon-50: 3.125rem;
18
+ }
19
+
1
20
  /*
2
21
  Default grade for Icon's `grad="auto"`. Light icons on a dark background look heavier than dark
3
22
  ones on a light background (visual bleed), so M3 drops the grade to -25 on dark UI.
@@ -1,10 +1,14 @@
1
+ /* M3 shape scale: https://m3.material.io/styles/shape/corner-radius-scale */
1
2
  @theme {
2
3
  --radius-none: 0;
3
4
  --radius-xs: 4px;
4
5
  --radius-sm: 8px;
5
6
  --radius-md: 12px;
6
7
  --radius-lg: 16px;
8
+ --radius-lg-increased: 20px;
7
9
  --radius-xl: 28px;
10
+ --radius-xl-increased: 32px;
11
+ --radius-xxl: 48px;
8
12
  --radius-full: calc(infinity * 1px);
9
13
 
10
14
  --md-util-optical-centering-coefficient: 0.11;
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { MediaQuery } from 'svelte/reactivity';
3
- import { generateThemeCSS, themeState, STORAGE_KEY } from './theme.svelte.js';
3
+ import { generateThemeCSS, themeState, STORAGE_KEY } from './themeState.svelte.js';
4
4
 
5
5
  /**
6
6
  * Whether to generate and inject the M3 dynamic-color CSS custom properties
@@ -9,7 +9,7 @@ Add this to your root +layout.svelte (or any layout that wraps the whole app):
9
9
  <App>...</App>
10
10
  -->
11
11
  <script lang="ts">
12
- import { THEME_INIT_SCRIPT } from './theme.svelte.js';
12
+ import { THEME_INIT_SCRIPT } from './themeState.svelte.js';
13
13
  </script>
14
14
 
15
15
  <svelte:head>
@@ -24,11 +24,11 @@ With `transition`, a change of `name` crossfades on a spring instead of swapping
24
24
  */
25
25
  const sizeMap: Record<IconSize, { cls: string; opsz: number }> = {
26
26
  inline: { cls: 'size-[1em] align-[-0.115em]', opsz: 20 },
27
- xs: { cls: 'size-spacing-200 text-[16px]', opsz: 20 },
28
- sm: { cls: 'size-spacing-250 text-[20px]', opsz: 20 },
29
- md: { cls: 'size-spacing-300 text-[24px]', opsz: 24 },
30
- lg: { cls: 'size-spacing-500 text-[40px]', opsz: 40 },
31
- xl: { cls: 'size-spacing-600 text-[48px]', opsz: 48 }
27
+ xs: { cls: 'size-(--text-icon-16) text-icon-16', opsz: 20 },
28
+ sm: { cls: 'size-(--text-icon-20) text-icon-20', opsz: 20 },
29
+ md: { cls: 'size-(--text-icon-24) text-icon-24', opsz: 24 },
30
+ lg: { cls: 'size-(--text-icon-40) text-icon-40', opsz: 40 },
31
+ xl: { cls: 'size-(--text-icon-48) text-icon-48', opsz: 48 }
32
32
  };
33
33
 
34
34
  const {
@@ -1,9 +1,9 @@
1
1
  export * from './icon/index.js';
2
2
  export * from './shortcut.js';
3
- export * from './theme.svelte.js';
3
+ export * from './themeState.svelte.js';
4
4
  export * from './types.js';
5
5
  export * from './ui.js';
6
- export type { ColorScheme, ContrastMode, ThemeConfig, ThemeVariant } from './theme.svelte.js';
6
+ export type { ColorScheme, ContrastMode, ThemeConfig, ThemeVariant } from './themeState.svelte.js';
7
7
  export { default as Layer } from './Layer.svelte';
8
8
  export { default as Theme } from './Theme.svelte';
9
9
  export { default as ThemeScript } from './ThemeScript.svelte';
@@ -1,6 +1,6 @@
1
1
  export * from './icon/index.js';
2
2
  export * from './shortcut.js';
3
- export * from './theme.svelte.js';
3
+ export * from './themeState.svelte.js';
4
4
  export * from './types.js';
5
5
  export * from './ui.js';
6
6
  export { default as Layer } from './Layer.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noxlovette/material",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "description": "A Material Design 3 component library for Svelte, built on Bits UI.",
6
6
  "keywords": [