@astronox/core 0.2.0 → 0.2.2

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 (81) hide show
  1. package/README.md +9 -30
  2. package/package.json +7 -1
  3. package/src/admin/contracts.ts +28 -0
  4. package/src/admin/index.ts +2 -0
  5. package/src/admin/module.ts +28 -0
  6. package/src/auth/contracts.ts +53 -0
  7. package/src/auth/firebase/client.ts +53 -0
  8. package/src/auth/firebase/contracts.ts +8 -0
  9. package/src/auth/firebase/index.ts +1 -0
  10. package/src/auth/index.ts +2 -0
  11. package/src/auth/module.ts +99 -0
  12. package/src/client/index.ts +3 -0
  13. package/src/client/preferences.ts +400 -0
  14. package/src/components/actions/Button/Button.astro +42 -6
  15. package/src/components/actions/Button/Button.css +19 -0
  16. package/src/components/actions/IdentityProviderAction/IdentityProviderAction.astro +35 -0
  17. package/src/components/actions/MediaTrigger/MediaTrigger.astro +12 -4
  18. package/src/components/actions/MediaTrigger/MediaTrigger.css +1 -0
  19. package/src/components/content/CardBody/CardBody.astro +3 -0
  20. package/src/components/content/CardBody/CardBody.css +10 -0
  21. package/src/components/content/MarkdownContent/MarkdownContent.css +0 -1
  22. package/src/components/content/MarkdownContent/MarkdownNode.astro +1 -0
  23. package/src/components/content/MarkdownContent/markdownContentRenderer.ts +549 -0
  24. package/src/components/feedback/PreferenceBootstrap/PreferenceBootstrap.astro +403 -0
  25. package/src/components/forms/Checkbox/Checkbox.astro +66 -0
  26. package/src/components/forms/Checkbox/Checkbox.css +126 -0
  27. package/src/components/forms/ChoiceGroup/ChoiceGroup.astro +57 -0
  28. package/src/components/forms/ChoiceGroup/ChoiceGroup.css +108 -0
  29. package/src/components/forms/ChoiceGroup/contracts.ts +9 -0
  30. package/src/components/forms/DateTimeInput/DateTimeInput.astro +14 -0
  31. package/src/components/forms/FieldGroup/FieldGroup.astro +34 -0
  32. package/src/components/forms/FieldGroup/FieldGroup.css +30 -0
  33. package/src/components/forms/TextInput/TextInput.astro +7 -1
  34. package/src/components/forms/Textarea/Textarea.astro +32 -0
  35. package/src/components/forms/Textarea/Textarea.css +54 -0
  36. package/src/components/icons/BackIcon.astro +26 -0
  37. package/src/components/icons/CheckIcon.astro +22 -0
  38. package/src/components/icons/DeleteIcon.astro +22 -0
  39. package/src/components/icons/StatusIndicatorIcon.astro +16 -0
  40. package/src/components/index.ts +12 -0
  41. package/src/components/media/CanvasFrame/CanvasFrame.astro +1 -17
  42. package/src/components/media/EmbedFrame/EmbedFrame.astro +1 -19
  43. package/src/components/media/EmbedFrame/EmbedFrame.css +0 -2
  44. package/src/components/navigation/SubNavigation/SubNavigation.css +0 -5
  45. package/src/composition/Grid/Grid.astro +9 -0
  46. package/src/composition/Grid/Grid.css +52 -0
  47. package/src/composition/GridItem/GridItem.astro +9 -0
  48. package/src/composition/GridItem/GridItem.css +12 -0
  49. package/src/composition/SurfaceGroup/SurfaceGroup.css +21 -7
  50. package/src/composition/SurfaceGroup/stickySurfaceGroupController.ts +3 -0
  51. package/src/data/firestore/client/contracts.ts +55 -0
  52. package/src/data/firestore/client/firebase.ts +12 -0
  53. package/src/data/firestore/client/index.ts +3 -0
  54. package/src/data/firestore/client/repository.ts +111 -0
  55. package/src/display/contracts.ts +41 -0
  56. package/src/display/index.ts +1 -0
  57. package/src/display/tableProgressive.ts +62 -0
  58. package/src/patterns/Combobox/Combobox.astro +23 -0
  59. package/src/patterns/Combobox/comboboxController.ts +72 -0
  60. package/src/patterns/Fullscreen/FullscreenControl.astro +4 -14
  61. package/src/patterns/Fullscreen/FullscreenControl.css +0 -26
  62. package/src/patterns/Modal/Modal.astro +1 -1
  63. package/src/patterns/Modal/Modal.css +38 -1
  64. package/src/patterns/Table/Table.astro +122 -7
  65. package/src/patterns/Table/Table.css +2 -1
  66. package/src/patterns/Table/TableBody.astro +11 -1
  67. package/src/patterns/Table/TableBody.css +6 -0
  68. package/src/patterns/Table/TableCell.css +6 -0
  69. package/src/patterns/Table/TableCellValue.astro +31 -0
  70. package/src/patterns/Table/TableFooter.astro +3 -1
  71. package/src/patterns/Table/TableHeader.astro +1 -0
  72. package/src/patterns/Table/TablePagination.astro +63 -47
  73. package/src/patterns/Table/TableSkeleton.astro +18 -22
  74. package/src/patterns/Table/TableSkeleton.css +30 -5
  75. package/src/patterns/Table/tableClientController.ts +253 -0
  76. package/src/patterns/Table/tableFilterController.ts +83 -33
  77. package/src/patterns/Table/tableLayout.ts +10 -3
  78. package/src/patterns/Table/tableProgressiveController.ts +615 -227
  79. package/src/patterns/Table/tableSortController.ts +25 -7
  80. package/src/styles/interaction.css +16 -0
  81. package/src/styles/style.css +4 -0
@@ -0,0 +1,108 @@
1
+ .choice-group {
2
+ min-inline-size: 0;
3
+ margin: 0;
4
+ padding: 0;
5
+ border: 0;
6
+ }
7
+
8
+ .choice-group__legend {
9
+ margin-block-end: var(--nox-space-2);
10
+ padding: 0;
11
+ color: var(--nox-text-muted);
12
+ font-size: var(--nox-font-size-xs);
13
+ font-weight: var(--nox-font-weight-strong);
14
+ letter-spacing: var(--nox-letter-spacing-wide);
15
+ line-height: var(--nox-line-height-tight);
16
+ text-transform: uppercase;
17
+ }
18
+
19
+ .choice-group__options {
20
+ display: grid;
21
+ min-inline-size: 0;
22
+ grid-template-columns: repeat(
23
+ var(--choice-group-columns),
24
+ minmax(0, 1fr)
25
+ );
26
+ gap: var(--nox-space-2);
27
+ }
28
+
29
+ .choice-group__option {
30
+ position: relative;
31
+ display: flex;
32
+ min-inline-size: 0;
33
+ block-size: var(--nox-field-control-block-size);
34
+ align-items: center;
35
+ justify-content: center;
36
+ gap: var(--nox-space-2);
37
+ padding: var(--nox-space-2) var(--nox-space-3);
38
+ overflow: hidden;
39
+ border: var(--nox-border-width) solid var(--nox-field-border);
40
+ border-radius: var(--nox-radius-sm);
41
+ background: var(--nox-field-background);
42
+ color: var(--nox-text);
43
+ cursor: pointer;
44
+ }
45
+
46
+ .choice-group__input {
47
+ position: absolute;
48
+ inset: 0;
49
+ margin: 0;
50
+ opacity: 0;
51
+ cursor: pointer;
52
+ }
53
+
54
+ .choice-group__icon {
55
+ flex: 0 0 auto;
56
+ inline-size: 1rem;
57
+ block-size: 1rem;
58
+ color: var(--nox-tone-color);
59
+ }
60
+
61
+ .choice-group__label {
62
+ min-inline-size: 0;
63
+ overflow: hidden;
64
+ font-size: var(--nox-font-size-xs);
65
+ font-weight: var(--nox-font-weight-strong);
66
+ letter-spacing: var(--nox-letter-spacing-wide);
67
+ line-height: 1;
68
+ text-overflow: ellipsis;
69
+ text-transform: uppercase;
70
+ white-space: nowrap;
71
+ }
72
+
73
+ .choice-group__option:not(:has(.choice-group__input:checked)) {
74
+ background: var(--nox-field-background-disabled);
75
+ color: var(--nox-text-disabled);
76
+ opacity: 0.58;
77
+ }
78
+
79
+ .choice-group__option:has(.choice-group__input:checked) {
80
+ border-color: var(--nox-tone-color);
81
+ background: color-mix(
82
+ in srgb,
83
+ var(--nox-tone-seed) 12%,
84
+ var(--nox-mix-light)
85
+ );
86
+ color: var(--nox-tone-text);
87
+ }
88
+
89
+ .choice-group__option:has(.choice-group__input:focus-visible) {
90
+ border-color: var(--nox-tone-color);
91
+ box-shadow: var(--nox-field-focus-shadow);
92
+ }
93
+
94
+ .choice-group:disabled .choice-group__option {
95
+ background: var(--nox-field-background-disabled);
96
+ color: var(--nox-text-disabled);
97
+ cursor: not-allowed;
98
+ }
99
+
100
+ .choice-group:disabled .choice-group__input {
101
+ cursor: not-allowed;
102
+ }
103
+
104
+ @media (hover: hover) and (pointer: fine) {
105
+ .choice-group:not(:disabled) .choice-group__option:hover {
106
+ border-color: var(--nox-tone-color);
107
+ }
108
+ }
@@ -0,0 +1,9 @@
1
+ import type { AstroComponent } from '../../widgetTypes';
2
+ import type { Tone } from '../../../theme/contracts';
3
+
4
+ export type ChoiceOption = {
5
+ icon?: AstroComponent;
6
+ label: string;
7
+ tone?: Tone;
8
+ value: string;
9
+ };
@@ -0,0 +1,14 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+ import type { Tone } from '../../../theme/contracts';
4
+ import TextInput from '../TextInput/TextInput.astro';
5
+
6
+ type Props = Omit<HTMLAttributes<'input'>, 'type'> & {
7
+ invalid?: boolean;
8
+ tone?: Tone;
9
+ };
10
+
11
+ const props: Props = Astro.props;
12
+ ---
13
+
14
+ <TextInput {...props} type="datetime-local" clearable={false} />
@@ -0,0 +1,34 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+ import type { Tone } from '../../../theme/contracts';
4
+
5
+ type Props = Omit<HTMLAttributes<'fieldset'>, 'disabled'> & {
6
+ label: string;
7
+ disabled?: boolean;
8
+ tone?: Tone;
9
+ };
10
+
11
+ const {
12
+ class: className,
13
+ 'data-tone': dataTone,
14
+ disabled = false,
15
+ label,
16
+ tone,
17
+ ...attrs
18
+ }: Props = Astro.props;
19
+ const resolvedTone = tone ?? dataTone;
20
+ ---
21
+
22
+ <fieldset
23
+ {...attrs}
24
+ class:list={['field-group', className]}
25
+ disabled={disabled}
26
+ data-disabled={disabled ? true : undefined}
27
+ data-tone={resolvedTone}
28
+ data-widget="field-group"
29
+ >
30
+ <legend class="field-group__label">{label}</legend>
31
+ <div class="field-group__content">
32
+ <slot />
33
+ </div>
34
+ </fieldset>
@@ -0,0 +1,30 @@
1
+ .field-group {
2
+ min-inline-size: 0;
3
+ margin: 0;
4
+ padding: 0;
5
+ border: 0;
6
+ }
7
+
8
+ .field-group__label {
9
+ display: inline-flex;
10
+ min-inline-size: 0;
11
+ margin: 0;
12
+ padding: 0;
13
+ align-items: center;
14
+ color: var(--nox-tone-text);
15
+ font-size: var(--nox-font-size-sm);
16
+ font-weight: var(--nox-font-weight-strong);
17
+ letter-spacing: var(--nox-letter-spacing-wide);
18
+ line-height: 1.25;
19
+ overflow-wrap: anywhere;
20
+ text-transform: uppercase;
21
+ }
22
+
23
+ .field-group__content {
24
+ min-inline-size: 0;
25
+ margin-block-start: var(--nox-space-2);
26
+ }
27
+
28
+ .field-group[data-disabled] .field-group__label {
29
+ color: var(--nox-text-disabled);
30
+ }
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from 'astro/types';
3
+ import type { PreferenceBinding } from '../../../client/preferences';
3
4
  import type { Tone } from '../../../theme/contracts';
4
5
  import CloseIcon from '../../icons/CloseIcon.astro';
5
6
 
6
7
  type TextInputFraming = 'embedded' | 'standalone';
7
- type TextInputType = 'search' | 'text';
8
+ type TextInputType = 'datetime-local' | 'search' | 'text';
8
9
  type TextInputAutofocus = boolean | 'desktop';
9
10
 
10
11
  type Props = Omit<HTMLAttributes<'input'>, 'autofocus' | 'type'> & {
@@ -13,6 +14,7 @@ type Props = Omit<HTMLAttributes<'input'>, 'autofocus' | 'type'> & {
13
14
  clearLabel?: string;
14
15
  framing?: TextInputFraming;
15
16
  invalid?: boolean;
17
+ preference?: PreferenceBinding;
16
18
  tone?: Tone;
17
19
  type?: TextInputType;
18
20
  };
@@ -26,6 +28,7 @@ const {
26
28
  'data-tone': dataTone,
27
29
  framing = 'standalone',
28
30
  invalid = false,
31
+ preference,
29
32
  tone,
30
33
  type = 'text',
31
34
  ...attrs
@@ -43,6 +46,9 @@ const resolvedTone = tone ?? dataTone;
43
46
  data-tone={resolvedTone}
44
47
  data-text-input-autofocus={autofocus === 'desktop' ? 'desktop' : undefined}
45
48
  data-text-input-field
49
+ data-preference-id={preference?.id}
50
+ data-preference-path={preference?.path}
51
+ data-preference-control={preference ? 'text' : undefined}
46
52
  >
47
53
  <input
48
54
  {...attrs}
@@ -0,0 +1,32 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+ import type { Tone } from '../../../theme/contracts';
4
+
5
+ type Props = HTMLAttributes<'textarea'> & {
6
+ invalid?: boolean;
7
+ tone?: Tone;
8
+ value?: string;
9
+ };
10
+
11
+ const {
12
+ 'aria-invalid': ariaInvalid,
13
+ class: className,
14
+ 'data-tone': dataTone,
15
+ invalid = false,
16
+ tone,
17
+ value = '',
18
+ ...attrs
19
+ }: Props = Astro.props;
20
+ const resolvedInvalid =
21
+ invalid || ariaInvalid === true || ariaInvalid === 'true';
22
+ const resolvedTone = tone ?? dataTone;
23
+ ---
24
+
25
+ <textarea
26
+ {...attrs}
27
+ class:list={['textarea', className]}
28
+ data-widget="textarea"
29
+ data-invalid={resolvedInvalid ? true : undefined}
30
+ data-tone={resolvedTone}
31
+ aria-invalid={resolvedInvalid ? 'true' : ariaInvalid}
32
+ >{value}</textarea>
@@ -0,0 +1,54 @@
1
+ .textarea {
2
+ display: block;
3
+ width: 100%;
4
+ min-width: 0;
5
+ min-height: 28rem;
6
+ resize: vertical;
7
+ padding: var(--nox-field-control-padding-inline);
8
+ border: var(--nox-border-width) solid var(--nox-field-border);
9
+ border-radius: var(--nox-radius-sm);
10
+ outline: 0;
11
+ background: var(--nox-field-background);
12
+ color: var(--nox-field-color);
13
+ font-family: inherit;
14
+ font-size: var(--nox-field-control-font-size);
15
+ font-weight: var(--nox-font-weight-regular);
16
+ letter-spacing: 0;
17
+ line-height: 1.5;
18
+ transition:
19
+ border-color var(--nox-motion-duration-sm) var(--nox-motion-easing-standard),
20
+ box-shadow var(--nox-motion-duration-sm) var(--nox-motion-easing-standard);
21
+ }
22
+
23
+ .textarea::placeholder {
24
+ color: var(--nox-field-placeholder);
25
+ opacity: 1;
26
+ }
27
+
28
+ .textarea:focus {
29
+ border-color: var(--nox-field-border-active);
30
+ box-shadow: var(--nox-field-focus-shadow);
31
+ }
32
+
33
+ .textarea[data-invalid] {
34
+ border-color: var(--nox-field-border-invalid);
35
+ }
36
+
37
+ .textarea:disabled {
38
+ background: var(--nox-field-background-disabled);
39
+ color: var(--nox-text-disabled);
40
+ cursor: not-allowed;
41
+ }
42
+
43
+ @media (hover: hover) and (pointer: fine) {
44
+ .textarea:not(:disabled):not(:focus):not([data-invalid]):hover {
45
+ border-color: var(--nox-field-border-hover);
46
+ }
47
+ }
48
+
49
+ @media (width < 48rem), (hover: none) and (pointer: coarse) {
50
+ .textarea {
51
+ min-height: 20rem;
52
+ font-size: var(--nox-font-size-md);
53
+ }
54
+ }
@@ -0,0 +1,26 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+
4
+ type Props = HTMLAttributes<'svg'>;
5
+
6
+ const {
7
+ 'aria-hidden': ariaHidden = 'true',
8
+ focusable = 'false',
9
+ ...attrs
10
+ }: Props = Astro.props;
11
+ ---
12
+
13
+ <svg
14
+ {...attrs}
15
+ viewBox="0 0 32 32"
16
+ fill="none"
17
+ aria-hidden={ariaHidden}
18
+ focusable={focusable}
19
+ >
20
+ <path
21
+ d="M13 8 6 15l7 7M7 15h10c5 0 8 3 8 8"
22
+ stroke="currentColor"
23
+ stroke-linecap="round"
24
+ stroke-linejoin="round"
25
+ stroke-width="2.4"></path>
26
+ </svg>
@@ -0,0 +1,22 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+
4
+ type Props = HTMLAttributes<'svg'>;
5
+
6
+ const attrs: Props = Astro.props;
7
+ ---
8
+
9
+ <svg
10
+ {...attrs}
11
+ viewBox="0 0 32 32"
12
+ fill="none"
13
+ aria-hidden="true"
14
+ focusable="false"
15
+ >
16
+ <path
17
+ d="M7 16.5L13 22.5L25 9.5"
18
+ stroke="currentColor"
19
+ stroke-width="2.5"
20
+ stroke-linecap="round"
21
+ stroke-linejoin="round"></path>
22
+ </svg>
@@ -0,0 +1,22 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+
4
+ type Props = HTMLAttributes<'svg'>;
5
+
6
+ const attrs: Props = Astro.props;
7
+ ---
8
+
9
+ <svg
10
+ {...attrs}
11
+ viewBox="0 0 32 32"
12
+ fill="none"
13
+ aria-hidden="true"
14
+ focusable="false"
15
+ >
16
+ <path
17
+ d="M9 10H23M13 10V7H19V10M11 10L12 25H20L21 10M14.5 14V21M17.5 14V21"
18
+ stroke="currentColor"
19
+ stroke-width="2.5"
20
+ stroke-linecap="round"
21
+ stroke-linejoin="round"></path>
22
+ </svg>
@@ -0,0 +1,16 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types';
3
+
4
+ type Props = HTMLAttributes<'svg'>;
5
+ const attrs: Props = Astro.props;
6
+ ---
7
+
8
+ <svg
9
+ {...attrs}
10
+ viewBox="0 0 32 32"
11
+ fill="none"
12
+ aria-hidden="true"
13
+ focusable="false"
14
+ >
15
+ <circle cx="16" cy="16" r="8" fill="currentColor"></circle>
16
+ </svg>
@@ -1,6 +1,7 @@
1
1
  export { default as ActionListItem } from './actions/ActionListItem/ActionListItem.astro';
2
2
  export { default as Button } from './actions/Button/Button.astro';
3
3
  export { default as CardAction } from './actions/CardAction/CardAction.astro';
4
+ export { default as IdentityProviderAction } from './actions/IdentityProviderAction/IdentityProviderAction.astro';
4
5
  export { default as MediaTrigger } from './actions/MediaTrigger/MediaTrigger.astro';
5
6
  export { default as ScrollToTop } from './actions/ScrollToTop/ScrollToTop.astro';
6
7
  export { default as CardBody } from './content/CardBody/CardBody.astro';
@@ -15,10 +16,17 @@ export { default as IconList } from './data-display/IconList/IconList.astro';
15
16
  export { default as MetricTile } from './data-display/MetricTile/MetricTile.astro';
16
17
  export { default as Tag } from './data-display/Tag/Tag.astro';
17
18
  export { default as TextPair } from './data-display/TextPair/TextPair.astro';
19
+ export { default as Checkbox } from './forms/Checkbox/Checkbox.astro';
20
+ export { default as ChoiceGroup } from './forms/ChoiceGroup/ChoiceGroup.astro';
21
+ export type { ChoiceOption } from './forms/ChoiceGroup/contracts';
22
+ export { default as DateTimeInput } from './forms/DateTimeInput/DateTimeInput.astro';
18
23
  export { default as FieldError } from './forms/FieldError/FieldError.astro';
24
+ export { default as FieldGroup } from './forms/FieldGroup/FieldGroup.astro';
19
25
  export { default as FieldLabel } from './forms/FieldLabel/FieldLabel.astro';
20
26
  export { default as TextInput } from './forms/TextInput/TextInput.astro';
27
+ export { default as Textarea } from './forms/Textarea/Textarea.astro';
21
28
  export { default as Spinner } from './feedback/Spinner/Spinner.astro';
29
+ export { default as PreferenceBootstrap } from './feedback/PreferenceBootstrap/PreferenceBootstrap.astro';
22
30
  export { default as Tooltip } from './feedback/Tooltip/Tooltip.astro';
23
31
  export { default as CanvasFrame } from './media/CanvasFrame/CanvasFrame.astro';
24
32
  export { default as EmbedFrame } from './media/EmbedFrame/EmbedFrame.astro';
@@ -53,12 +61,15 @@ export { default as ArrowLeftIcon } from './icons/ArrowLeftIcon.astro';
53
61
  export { default as ArrowRightIcon } from './icons/ArrowRightIcon.astro';
54
62
  export { default as ArrowUpDownIcon } from './icons/ArrowUpDownIcon.astro';
55
63
  export { default as ArrowUpIcon } from './icons/ArrowUpIcon.astro';
64
+ export { default as BackIcon } from './icons/BackIcon.astro';
56
65
  export { default as BulletIcon } from './icons/BulletIcon.astro';
57
66
  export { default as BurnIcon } from './icons/BurnIcon.astro';
67
+ export { default as CheckIcon } from './icons/CheckIcon.astro';
58
68
  export { default as ClearIcon } from './icons/ClearIcon.astro';
59
69
  export { default as CloseIcon } from './icons/CloseIcon.astro';
60
70
  export { default as CopyIcon } from './icons/CopyIcon.astro';
61
71
  export { default as DayIcon } from './icons/DayIcon.astro';
72
+ export { default as DeleteIcon } from './icons/DeleteIcon.astro';
62
73
  export { default as DollarIcon } from './icons/DollarIcon.astro';
63
74
  export { default as DownloadIcon } from './icons/DownloadIcon.astro';
64
75
  export { default as EnterFullscreenIcon } from './icons/EnterFullscreenIcon.astro';
@@ -78,6 +89,7 @@ export { default as RibbonIcon } from './icons/RibbonIcon.astro';
78
89
  export { default as SlashIcon } from './icons/SlashIcon.astro';
79
90
  export { default as SlowIcon } from './icons/SlowIcon.astro';
80
91
  export { default as StarIcon } from './icons/StarIcon.astro';
92
+ export { default as StatusIndicatorIcon } from './icons/StatusIndicatorIcon.astro';
81
93
  export { default as StunIcon } from './icons/StunIcon.astro';
82
94
  export { default as TableSortIcon } from './icons/TableSortIcon.astro';
83
95
  export { default as WaterIcon } from './icons/WaterIcon.astro';
@@ -3,24 +3,18 @@ import type { HTMLAttributes } from 'astro/types';
3
3
  import type { Tone } from '../../../theme/contracts';
4
4
  import Button from '../../actions/Button/Button.astro';
5
5
  import Spinner from '../../feedback/Spinner/Spinner.astro';
6
- import FullscreenControl from '../../../patterns/Fullscreen/FullscreenControl.astro';
7
6
 
8
7
  type CanvasAspectRatio = '16/9' | '4/3';
9
8
  type CanvasActivation = 'immediate' | 'manual';
10
9
  type CanvasWheelInput = 'canvas' | 'page';
11
10
 
12
- type CanvasFullscreen = {
13
- enterLabel: string;
14
- exitLabel: string;
15
- };
16
-
17
11
  type Props = HTMLAttributes<'div'> & {
18
12
  activation?: CanvasActivation;
19
13
  activationLabel?: string;
20
14
  aspectRatio?: CanvasAspectRatio;
21
15
  canvasId?: string;
22
16
  frameId: string;
23
- fullscreen?: CanvasFullscreen;
17
+ fullscreen?: boolean;
24
18
  loadingLabel: string;
25
19
  title: string;
26
20
  tone?: Tone;
@@ -95,16 +89,6 @@ const resolvedCanvasId = canvasId ?? `${frameId}-canvas`;
95
89
  role="alert"
96
90
  hidden
97
91
  ></span>
98
- {
99
- fullscreen ? (
100
- <FullscreenControl
101
- targetId={frameId}
102
- enterLabel={fullscreen.enterLabel}
103
- exitLabel={fullscreen.exitLabel}
104
- placement="overlay"
105
- />
106
- ) : null
107
- }
108
92
  </nox-canvas-frame>
109
93
 
110
94
  <script>
@@ -3,19 +3,12 @@ import type { HTMLAttributes } from 'astro/types';
3
3
  import type { Tone } from '../../../theme/contracts';
4
4
  import Button from '../../actions/Button/Button.astro';
5
5
  import Spinner from '../../feedback/Spinner/Spinner.astro';
6
- import FullscreenControl from '../../../patterns/Fullscreen/FullscreenControl.astro';
7
6
 
8
7
  type EmbedAspectRatio = '16/9' | '4/3';
9
8
  type EmbedActivation = 'immediate' | 'manual';
10
9
  type EmbedLoading = 'eager' | 'lazy';
11
10
  type EmbedLoadingIndicator = 'none' | 'spinner';
12
11
 
13
- type EmbedFullscreen = {
14
- enterLabel: string;
15
- exitLabel: string;
16
- overlayOffset?: 'default' | 'native-controls';
17
- };
18
-
19
12
  type Props = Omit<
20
13
  HTMLAttributes<'iframe'>,
21
14
  'height' | 'loading' | 'src' | 'title' | 'width'
@@ -24,7 +17,7 @@ type Props = Omit<
24
17
  activationLabel?: string;
25
18
  aspectRatio?: EmbedAspectRatio;
26
19
  frameId?: string;
27
- fullscreen?: EmbedFullscreen;
20
+ fullscreen?: boolean;
28
21
  loading?: EmbedLoading;
29
22
  loadingIndicator?: EmbedLoadingIndicator;
30
23
  loadingLabel: string;
@@ -111,17 +104,6 @@ const resolvedTone = tone ?? dataTone;
111
104
  </span>
112
105
  ) : null
113
106
  }
114
- {
115
- fullscreen ? (
116
- <FullscreenControl
117
- targetId={frameId ?? ''}
118
- enterLabel={fullscreen.enterLabel}
119
- exitLabel={fullscreen.exitLabel}
120
- placement="overlay"
121
- overlayOffset={fullscreen.overlayOffset}
122
- />
123
- ) : null
124
- }
125
107
  </nox-embed-frame>
126
108
 
127
109
  <script>
@@ -1,6 +1,4 @@
1
1
  .embed-frame {
2
- --nox-fullscreen-native-controls-block-size: 2.5rem;
3
-
4
2
  position: relative;
5
3
  display: block;
6
4
  inline-size: 100%;
@@ -194,11 +194,6 @@
194
194
  row-gap: 0;
195
195
  }
196
196
 
197
- .sub-navigation__visual--media {
198
- inline-size: 100%;
199
- block-size: 100%;
200
- }
201
-
202
197
  .sub-navigation__label--with-visual {
203
198
  position: absolute;
204
199
  overflow: hidden;
@@ -3,6 +3,7 @@ import type { HTMLAttributes } from 'astro/types';
3
3
 
4
4
  type GridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  type GridColumns = 1 | 2 | 3 | 4 | 'content-sidebar';
6
+ type GridFlow = 'row' | 'column';
6
7
  type GridRows = 1 | 2 | 3 | 4;
7
8
  type GridItemAlignment = 'start' | 'center' | 'end' | 'stretch';
8
9
  type GridCollapseAt = 'none' | 'sm' | 'md' | 'lg' | 'xl';
@@ -14,8 +15,10 @@ type Props = Omit<HTMLAttributes<'div'>, 'class' | 'style'> & {
14
15
  collapseAt?: GridCollapseAt;
15
16
  class?: string;
16
17
  compactColumns?: 1 | 2 | 3 | 4;
18
+ compactFlow?: GridFlow;
17
19
  gap?: GridGap;
18
20
  columns?: GridColumns;
21
+ flow?: GridFlow;
19
22
  justifyItems?: GridItemAlignment;
20
23
  lastRow?: GridLastRow;
21
24
  minTrackWidth?: string;
@@ -28,8 +31,10 @@ const {
28
31
  collapseAt = 'md',
29
32
  class: className,
30
33
  compactColumns,
34
+ compactFlow,
31
35
  gap = 'md',
32
36
  columns,
37
+ flow = 'row',
33
38
  justifyItems = 'stretch',
34
39
  lastRow = 'preserve',
35
40
  minTrackWidth = '16rem',
@@ -52,6 +57,8 @@ const gridVariables = {
52
57
  ...(compactColumns
53
58
  ? { '--grid-compact-columns': String(compactColumns) }
54
59
  : {}),
60
+ '--grid-compact-flow': compactFlow ?? flow,
61
+ '--grid-flow': flow,
55
62
  ...(rows ? { '--grid-rows': String(rows) } : {}),
56
63
  '--grid-align-items': alignItems,
57
64
  '--grid-justify-items': justifyItems,
@@ -69,7 +76,9 @@ const gridStyle = Object.entries(gridVariables)
69
76
  data-align-items={alignItems}
70
77
  data-collapse-at={collapseMode}
71
78
  data-compact-columns={compactColumns}
79
+ data-compact-flow={compactFlow}
72
80
  data-columns={typeof columns === 'number' ? columns : undefined}
81
+ data-flow={flow}
73
82
  data-gap={gap}
74
83
  data-justify-items={justifyItems}
75
84
  data-layout={layout}