@nswds/tokens 3.8.0 → 3.9.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.
@@ -1,10 +1,20 @@
1
1
  export declare const duration: {
2
+ none: string
3
+ instant: string
2
4
  fast: string
3
5
  base: string
4
6
  slow: string
7
+ slower: string
5
8
  }
6
9
  export declare const easing: {
7
10
  standard: string
8
11
  decelerate: string
9
12
  accelerate: string
13
+ linear: string
14
+ }
15
+ export declare const transition: {
16
+ hover: string
17
+ enter: string
18
+ exit: string
19
+ overlay: string
10
20
  }
@@ -1,10 +1,20 @@
1
1
  export const duration = {
2
+ none: '0ms',
3
+ instant: '100ms',
2
4
  fast: '150ms',
3
5
  base: '250ms',
4
6
  slow: '400ms',
7
+ slower: '600ms',
5
8
  }
6
9
  export const easing = {
7
10
  standard: 'cubic-bezier(0.4, 0, 0.2, 1)',
8
11
  decelerate: 'cubic-bezier(0, 0, 0.2, 1)',
9
12
  accelerate: 'cubic-bezier(0.4, 0, 1, 1)',
13
+ linear: 'cubic-bezier(0, 0, 1, 1)',
14
+ }
15
+ export const transition = {
16
+ hover: '100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
17
+ enter: '250ms cubic-bezier(0, 0, 0.2, 1) 0ms',
18
+ exit: '150ms cubic-bezier(0.4, 0, 1, 1) 0ms',
19
+ overlay: '400ms cubic-bezier(0, 0, 0.2, 1) 0ms',
10
20
  }
@@ -1,12 +1,22 @@
1
1
  {
2
2
  "duration": {
3
+ "duration-none": "0ms",
4
+ "duration-instant": "100ms",
3
5
  "duration-fast": "150ms",
4
6
  "duration-base": "250ms",
5
- "duration-slow": "400ms"
7
+ "duration-slow": "400ms",
8
+ "duration-slower": "600ms"
6
9
  },
7
10
  "easing": {
8
11
  "easing-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
9
12
  "easing-decelerate": "cubic-bezier(0, 0, 0.2, 1)",
10
- "easing-accelerate": "cubic-bezier(0.4, 0, 1, 1)"
13
+ "easing-accelerate": "cubic-bezier(0.4, 0, 1, 1)",
14
+ "easing-linear": "cubic-bezier(0, 0, 1, 1)"
15
+ },
16
+ "transition": {
17
+ "transition-hover": "100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
18
+ "transition-enter": "250ms cubic-bezier(0, 0, 0.2, 1) 0ms",
19
+ "transition-exit": "150ms cubic-bezier(0.4, 0, 1, 1) 0ms",
20
+ "transition-overlay": "400ms cubic-bezier(0, 0, 0.2, 1) 0ms"
11
21
  }
12
22
  }
@@ -1,6 +1,14 @@
1
- @duration-fast: 150ms; // Fast quick feedback on small elements (hovers, toggles, focus rings). DRAFT pending design review.
2
- @duration-base: 250ms; // Base the default duration for most UI transitions. DRAFT pending design review.
3
- @duration-slow: 400ms; // Slow larger surfaces entering or leaving (modals, drawers, sheets). DRAFT pending design review.
4
- @easing-standard: cubic-bezier(0.4, 0, 0.2, 1); // Standard ease-in-out — the default curve for elements moving within the viewport. DRAFT pending design review.
5
- @easing-decelerate: cubic-bezier(0, 0, 0.2, 1); // Decelerate (ease-out) elements entering the screen, fast then settling. DRAFT pending design review.
6
- @easing-accelerate: cubic-bezier(0.4, 0, 1, 1); // Accelerate (ease-in) — elements leaving the screen, building speed as they exit. DRAFT pending design review.
1
+ @duration-none: 0ms; // No motion. Used as the reduced-motion target and the default transition delay.
2
+ @duration-instant: 100ms; // Micro-feedback on small elements hover, focus rings, toggles, small fades.
3
+ @duration-fast: 150ms; // Quick transitions over short distances dropdowns, popovers, exits.
4
+ @duration-base: 250ms; // Default duration for most UI transitions.
5
+ @duration-slow: 400ms; // Larger surfaces entering or leaving modals, drawers, sheets.
6
+ @duration-slower: 600ms; // Full-screen transitions and background dimming behind overlays.
7
+ @easing-standard: cubic-bezier(0.4, 0, 0.2, 1); // Standard ease-in-out for elements moving within the viewport, visible from start to end.
8
+ @easing-decelerate: cubic-bezier(0, 0, 0.2, 1); // Entrance (ease-out) for elements appearing in view, fast then settling. Also used for surfaces that leave but stay nearby, ready to return (e.g. a side panel).
9
+ @easing-accelerate: cubic-bezier(0.4, 0, 1, 1); // Exit (ease-in) for elements leaving view permanently, building speed as they go.
10
+ @easing-linear: cubic-bezier(0, 0, 1, 1); // No easing. For continuous or progress-driven motion — spinners, progress bars, rotation.
11
+ @transition-hover: 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; // Hover, focus and toggle feedback on interactive elements.
12
+ @transition-enter: 250ms cubic-bezier(0, 0, 0.2, 1) 0ms; // Elements entering the view — menus, popovers, tooltips.
13
+ @transition-exit: 150ms cubic-bezier(0.4, 0, 1, 1) 0ms; // Elements leaving the view permanently.
14
+ @transition-overlay: 400ms cubic-bezier(0, 0, 0.2, 1) 0ms; // Modals, drawers and sheets entering over a dimmed background.
@@ -1,8 +1,8 @@
1
- @z-index-base: 0; // Base stacking level (0) — default in-flow content. DRAFT pending design review.
2
- @z-index-dropdown: 1000; // Dropdown menus and select popups. DRAFT pending design review.
3
- @z-index-sticky: 1100; // Sticky elements that pin on scroll (headers, toolbars). DRAFT pending design review.
4
- @z-index-overlay: 1200; // Full-screen overlay scrims sitting behind modal content. DRAFT pending design review.
5
- @z-index-modal: 1300; // Modal dialogs and side sheets. DRAFT pending design review.
6
- @z-index-popover: 1400; // Popovers anchored to a trigger, above modals. DRAFT pending design review.
7
- @z-index-toast: 1500; // Toast and snackbar notifications. DRAFT pending design review.
8
- @z-index-tooltip: 1600; // Tooltips — the top-most interactive layer. DRAFT pending design review.
1
+ @z-index-base: 0; // Base stacking level (0) — default in-flow content.
2
+ @z-index-dropdown: 1000; // Dropdown menus and select popups.
3
+ @z-index-sticky: 1100; // Sticky elements that pin on scroll (headers, toolbars).
4
+ @z-index-overlay: 1200; // Full-screen overlay scrims sitting behind modal content.
5
+ @z-index-modal: 1300; // Modal dialogs and side sheets.
6
+ @z-index-popover: 1400; // Popovers anchored to a trigger, above modals.
7
+ @z-index-toast: 1500; // Toast and snackbar notifications.
8
+ @z-index-tooltip: 1600; // Tooltips — the top-most interactive layer.
@@ -1,6 +1,14 @@
1
- $duration-fast: 150ms; // Fast quick feedback on small elements (hovers, toggles, focus rings). DRAFT pending design review.
2
- $duration-base: 250ms; // Base the default duration for most UI transitions. DRAFT pending design review.
3
- $duration-slow: 400ms; // Slow larger surfaces entering or leaving (modals, drawers, sheets). DRAFT pending design review.
4
- $easing-standard: cubic-bezier(0.4, 0, 0.2, 1); // Standard ease-in-out — the default curve for elements moving within the viewport. DRAFT pending design review.
5
- $easing-decelerate: cubic-bezier(0, 0, 0.2, 1); // Decelerate (ease-out) elements entering the screen, fast then settling. DRAFT pending design review.
6
- $easing-accelerate: cubic-bezier(0.4, 0, 1, 1); // Accelerate (ease-in) — elements leaving the screen, building speed as they exit. DRAFT pending design review.
1
+ $duration-none: 0ms; // No motion. Used as the reduced-motion target and the default transition delay.
2
+ $duration-instant: 100ms; // Micro-feedback on small elements hover, focus rings, toggles, small fades.
3
+ $duration-fast: 150ms; // Quick transitions over short distances dropdowns, popovers, exits.
4
+ $duration-base: 250ms; // Default duration for most UI transitions.
5
+ $duration-slow: 400ms; // Larger surfaces entering or leaving modals, drawers, sheets.
6
+ $duration-slower: 600ms; // Full-screen transitions and background dimming behind overlays.
7
+ $easing-standard: cubic-bezier(0.4, 0, 0.2, 1); // Standard ease-in-out for elements moving within the viewport, visible from start to end.
8
+ $easing-decelerate: cubic-bezier(0, 0, 0.2, 1); // Entrance (ease-out) for elements appearing in view, fast then settling. Also used for surfaces that leave but stay nearby, ready to return (e.g. a side panel).
9
+ $easing-accelerate: cubic-bezier(0.4, 0, 1, 1); // Exit (ease-in) for elements leaving view permanently, building speed as they go.
10
+ $easing-linear: cubic-bezier(0, 0, 1, 1); // No easing. For continuous or progress-driven motion — spinners, progress bars, rotation.
11
+ $transition-hover: 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; // Hover, focus and toggle feedback on interactive elements.
12
+ $transition-enter: 250ms cubic-bezier(0, 0, 0.2, 1) 0ms; // Elements entering the view — menus, popovers, tooltips.
13
+ $transition-exit: 150ms cubic-bezier(0.4, 0, 1, 1) 0ms; // Elements leaving the view permanently.
14
+ $transition-overlay: 400ms cubic-bezier(0, 0, 0.2, 1) 0ms; // Modals, drawers and sheets entering over a dimmed background.
@@ -1,8 +1,8 @@
1
- $z-index-base: 0; // Base stacking level (0) — default in-flow content. DRAFT pending design review.
2
- $z-index-dropdown: 1000; // Dropdown menus and select popups. DRAFT pending design review.
3
- $z-index-sticky: 1100; // Sticky elements that pin on scroll (headers, toolbars). DRAFT pending design review.
4
- $z-index-overlay: 1200; // Full-screen overlay scrims sitting behind modal content. DRAFT pending design review.
5
- $z-index-modal: 1300; // Modal dialogs and side sheets. DRAFT pending design review.
6
- $z-index-popover: 1400; // Popovers anchored to a trigger, above modals. DRAFT pending design review.
7
- $z-index-toast: 1500; // Toast and snackbar notifications. DRAFT pending design review.
8
- $z-index-tooltip: 1600; // Tooltips — the top-most interactive layer. DRAFT pending design review.
1
+ $z-index-base: 0; // Base stacking level (0) — default in-flow content.
2
+ $z-index-dropdown: 1000; // Dropdown menus and select popups.
3
+ $z-index-sticky: 1100; // Sticky elements that pin on scroll (headers, toolbars).
4
+ $z-index-overlay: 1200; // Full-screen overlay scrims sitting behind modal content.
5
+ $z-index-modal: 1300; // Modal dialogs and side sheets.
6
+ $z-index-popover: 1400; // Popovers anchored to a trigger, above modals.
7
+ $z-index-toast: 1500; // Toast and snackbar notifications.
8
+ $z-index-tooltip: 1600; // Tooltips — the top-most interactive layer.
@@ -1,8 +1,16 @@
1
1
  @theme {
2
+ --duration-none: 0ms;
3
+ --duration-instant: 100ms;
2
4
  --duration-fast: 150ms;
3
5
  --duration-base: 250ms;
4
6
  --duration-slow: 400ms;
7
+ --duration-slower: 600ms;
5
8
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
6
9
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
7
10
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
11
+ --ease-linear: cubic-bezier(0, 0, 1, 1);
12
+ --transition-hover: 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
13
+ --transition-enter: 250ms cubic-bezier(0, 0, 0.2, 1) 0ms;
14
+ --transition-exit: 150ms cubic-bezier(0.4, 0, 1, 1) 0ms;
15
+ --transition-overlay: 400ms cubic-bezier(0, 0, 0.2, 1) 0ms;
8
16
  }
@@ -960,12 +960,20 @@
960
960
 
961
961
  /* ── tailwind/motion/global.css ── */
962
962
  @theme {
963
+ --duration-none: 0ms;
964
+ --duration-instant: 100ms;
963
965
  --duration-fast: 150ms;
964
966
  --duration-base: 250ms;
965
967
  --duration-slow: 400ms;
968
+ --duration-slower: 600ms;
966
969
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
967
970
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
968
971
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
972
+ --ease-linear: cubic-bezier(0, 0, 1, 1);
973
+ --transition-hover: 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
974
+ --transition-enter: 250ms cubic-bezier(0, 0, 0.2, 1) 0ms;
975
+ --transition-exit: 150ms cubic-bezier(0.4, 0, 1, 1) 0ms;
976
+ --transition-overlay: 400ms cubic-bezier(0, 0, 0.2, 1) 0ms;
969
977
  }
970
978
 
971
979
 
@@ -1,45 +1,94 @@
1
1
  {
2
2
  "duration": {
3
+ "none": {
4
+ "$type": "duration",
5
+ "$description": "No motion. Used as the reduced-motion target and the default transition delay.",
6
+ "$value": { "value": 0, "unit": "ms" }
7
+ },
8
+ "instant": {
9
+ "$type": "duration",
10
+ "$description": "Micro-feedback on small elements — hover, focus rings, toggles, small fades.",
11
+ "$value": { "value": 100, "unit": "ms" }
12
+ },
3
13
  "fast": {
4
14
  "$type": "duration",
5
- "$description": "Fast quick feedback on small elements (hovers, toggles, focus rings). DRAFT pending design review.",
6
- "$value": {
7
- "value": 150,
8
- "unit": "ms"
9
- }
15
+ "$description": "Quick transitions over short distances dropdowns, popovers, exits.",
16
+ "$value": { "value": 150, "unit": "ms" }
10
17
  },
11
18
  "base": {
12
19
  "$type": "duration",
13
- "$description": "Base — the default duration for most UI transitions. DRAFT pending design review.",
14
- "$value": {
15
- "value": 250,
16
- "unit": "ms"
17
- }
20
+ "$description": "Default duration for most UI transitions.",
21
+ "$value": { "value": 250, "unit": "ms" }
18
22
  },
19
23
  "slow": {
20
24
  "$type": "duration",
21
- "$description": "Slow — larger surfaces entering or leaving (modals, drawers, sheets). DRAFT pending design review.",
22
- "$value": {
23
- "value": 400,
24
- "unit": "ms"
25
- }
25
+ "$description": "Larger surfaces entering or leaving modals, drawers, sheets.",
26
+ "$value": { "value": 400, "unit": "ms" }
27
+ },
28
+ "slower": {
29
+ "$type": "duration",
30
+ "$description": "Full-screen transitions and background dimming behind overlays.",
31
+ "$value": { "value": 600, "unit": "ms" }
26
32
  }
27
33
  },
28
34
  "easing": {
29
35
  "standard": {
30
36
  "$type": "cubicBezier",
31
- "$description": "Standard ease-in-out — the default curve for elements moving within the viewport. DRAFT pending design review.",
37
+ "$description": "Standard ease-in-out for elements moving within the viewport, visible from start to end.",
32
38
  "$value": [0.4, 0, 0.2, 1]
33
39
  },
34
40
  "decelerate": {
35
41
  "$type": "cubicBezier",
36
- "$description": "Decelerate (ease-out) elements entering the screen, fast then settling. DRAFT pending design review.",
42
+ "$description": "Entrance (ease-out) for elements appearing in view, fast then settling. Also used for surfaces that leave but stay nearby, ready to return (e.g. a side panel).",
37
43
  "$value": [0, 0, 0.2, 1]
38
44
  },
39
45
  "accelerate": {
40
46
  "$type": "cubicBezier",
41
- "$description": "Accelerate (ease-in) elements leaving the screen, building speed as they exit. DRAFT pending design review.",
47
+ "$description": "Exit (ease-in) for elements leaving view permanently, building speed as they go.",
42
48
  "$value": [0.4, 0, 1, 1]
49
+ },
50
+ "linear": {
51
+ "$type": "cubicBezier",
52
+ "$description": "No easing. For continuous or progress-driven motion — spinners, progress bars, rotation.",
53
+ "$value": [0, 0, 1, 1]
54
+ }
55
+ },
56
+ "transition": {
57
+ "hover": {
58
+ "$type": "transition",
59
+ "$description": "Hover, focus and toggle feedback on interactive elements.",
60
+ "$value": {
61
+ "duration": "{duration.instant}",
62
+ "delay": "{duration.none}",
63
+ "timingFunction": "{easing.standard}"
64
+ }
65
+ },
66
+ "enter": {
67
+ "$type": "transition",
68
+ "$description": "Elements entering the view — menus, popovers, tooltips.",
69
+ "$value": {
70
+ "duration": "{duration.base}",
71
+ "delay": "{duration.none}",
72
+ "timingFunction": "{easing.decelerate}"
73
+ }
74
+ },
75
+ "exit": {
76
+ "$type": "transition",
77
+ "$description": "Elements leaving the view permanently.",
78
+ "$value": {
79
+ "duration": "{duration.fast}",
80
+ "delay": "{duration.none}",
81
+ "timingFunction": "{easing.accelerate}"
82
+ }
83
+ },
84
+ "overlay": {
85
+ "$type": "transition",
86
+ "$description": "Modals, drawers and sheets entering over a dimmed background.",
87
+ "$value": {
88
+ "duration": "{duration.slow}",
89
+ "delay": "{duration.none}",
90
+ "timingFunction": "{easing.decelerate}"
91
+ }
43
92
  }
44
93
  }
45
94
  }
@@ -2,42 +2,42 @@
2
2
  "z-index": {
3
3
  "base": {
4
4
  "$type": "number",
5
- "$description": "Base stacking level (0) — default in-flow content. DRAFT pending design review.",
5
+ "$description": "Base stacking level (0) — default in-flow content.",
6
6
  "$value": 0
7
7
  },
8
8
  "dropdown": {
9
9
  "$type": "number",
10
- "$description": "Dropdown menus and select popups. DRAFT pending design review.",
10
+ "$description": "Dropdown menus and select popups.",
11
11
  "$value": 1000
12
12
  },
13
13
  "sticky": {
14
14
  "$type": "number",
15
- "$description": "Sticky elements that pin on scroll (headers, toolbars). DRAFT pending design review.",
15
+ "$description": "Sticky elements that pin on scroll (headers, toolbars).",
16
16
  "$value": 1100
17
17
  },
18
18
  "overlay": {
19
19
  "$type": "number",
20
- "$description": "Full-screen overlay scrims sitting behind modal content. DRAFT pending design review.",
20
+ "$description": "Full-screen overlay scrims sitting behind modal content.",
21
21
  "$value": 1200
22
22
  },
23
23
  "modal": {
24
24
  "$type": "number",
25
- "$description": "Modal dialogs and side sheets. DRAFT pending design review.",
25
+ "$description": "Modal dialogs and side sheets.",
26
26
  "$value": 1300
27
27
  },
28
28
  "popover": {
29
29
  "$type": "number",
30
- "$description": "Popovers anchored to a trigger, above modals. DRAFT pending design review.",
30
+ "$description": "Popovers anchored to a trigger, above modals.",
31
31
  "$value": 1400
32
32
  },
33
33
  "toast": {
34
34
  "$type": "number",
35
- "$description": "Toast and snackbar notifications. DRAFT pending design review.",
35
+ "$description": "Toast and snackbar notifications.",
36
36
  "$value": 1500
37
37
  },
38
38
  "tooltip": {
39
39
  "$type": "number",
40
- "$description": "Tooltips — the top-most interactive layer. DRAFT pending design review.",
40
+ "$description": "Tooltips — the top-most interactive layer.",
41
41
  "$value": 1600
42
42
  }
43
43
  }
@@ -1,10 +1,20 @@
1
1
  export const duration = {
2
+ none: '0ms',
3
+ instant: '100ms',
2
4
  fast: '150ms',
3
5
  base: '250ms',
4
6
  slow: '400ms',
7
+ slower: '600ms',
5
8
  }
6
9
  export const easing = {
7
10
  standard: 'cubic-bezier(0.4, 0, 0.2, 1)',
8
11
  decelerate: 'cubic-bezier(0, 0, 0.2, 1)',
9
12
  accelerate: 'cubic-bezier(0.4, 0, 1, 1)',
13
+ linear: 'cubic-bezier(0, 0, 1, 1)',
14
+ }
15
+ export const transition = {
16
+ hover: '100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
17
+ enter: '250ms cubic-bezier(0, 0, 0.2, 1) 0ms',
18
+ exit: '150ms cubic-bezier(0.4, 0, 1, 1) 0ms',
19
+ overlay: '400ms cubic-bezier(0, 0, 0.2, 1) 0ms',
10
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nswds/tokens",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "Design tokens for NSW Government digital products, providing colour tokens, theme outputs, and brand assets for use across CSS, SCSS, Less, JavaScript, TypeScript, JSON, Tailwind, Figma, and DTCG-compatible workflows.",
5
5
  "license": "MPL-2.0",
6
6
  "keywords": [