@golemui/gui-shared 1.6.0 → 2.0.0-rc.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,83 @@
1
+ ## 2.0.0-rc.1 (2026-10-09)
2
+
3
+ This was a version bump only for gui-shared to align it with other projects, there were no code changes.
4
+
5
+ ## 2.0.0-rc.0 (2026-10-08)
6
+
7
+ ### 🚀 Features
8
+
9
+ - ⚠️ **gui-components:** Make @golemui/gui-components a standalone project ([#406](https://github.com/golemui/golemui/pull/406))
10
+
11
+ ### ⚠️ Breaking Changes
12
+
13
+ - **gui-components:** Make @golemui/gui-components a standalone project ([#406](https://github.com/golemui/golemui/pull/406))
14
+ Deprecate Flex layout
15
+ * fix(gui-components): add migration guide to v2.0
16
+ BREAKING CHANGE: GolemUI 2.0 makes @golemui/gui-components a standalone project.
17
+ - Styles: index.css no longer includes the form container, repeater and
18
+ invalid submit button styles. Import @golemui/gui-shared/forms.css after it.
19
+ - Styles: every rule is in a golemui.* cascade layer, so unlayered app CSS,
20
+ including global resets, now overrides component styles.
21
+ - Styles: component selectors are no longer nested under .gui-form, and
22
+ narrow layouts query the gui-container container instead of gui-form.
23
+ - Layouts: a grid without direction is now a stack instead of a row. Add
24
+ direction: 'row' to keep a row.
25
+ - Layouts: flex is deprecated and renders as a grid. Grid gaps are tokens
26
+ (none to xl) instead of pixels, justify places children along a row, and
27
+ autoFit, columnGap, rowGap and align are deprecated. The root layout is grid.
28
+ - Markup: tabs, accordions and alerts render gui-tabs, gui-accordion and
29
+ gui-alert. Their old classes (.gui-accordion__section,
30
+ .gui-alert-notification--*, .active) are gone, as are the .gui-flex and
31
+ .gui-grid__widget classes. Errors render as divs instead of a ul.
32
+ - Elements: every event is prefixed with gui- (input/change -> gui-input and
33
+ gui-change, blur -> gui-blur, inputError -> gui-input-error, and so on),
34
+ bubbles and is composed.
35
+ - Elements: multi-word attributes are kebab-case (autogrow -> auto-grow).
36
+ - Elements: gui-button's actionType is now type, and invalid is removed.
37
+ - Elements: touched is unset by default, so errors show as soon as they are set.
38
+ - Packages: @golemui/gui-components only peers on lit, and @golemui/gui-shared
39
+ now depends on it. @golemui/gui-components/internals no longer exports
40
+ createIntersectionObserver or NO_AVAILABLE_TIMES_MESSAGE.
41
+ * chore: update gitignore
42
+ * refactor(lit): move ssr to lit-utils
43
+ move ssr to lit-utils
44
+ * docs: update readme
45
+ * refactor(lit): move ssr to lit-utils, add ssr to components
46
+ * fix(gui-components): report missing upload service when dependencies are set
47
+ * fix(gui-components): avoid duplicated ids in all pickers
48
+ * fix(gui-components): set caret icon as a CSS property
49
+ * test: check ssr parity across frameworks with components
50
+ * ci: add workflow to test lit-labs/ssr against our implementation
51
+ * feat(gui-components): add timeLabel prop to date-time inputs
52
+ * chore: fix lint errors
53
+ * chore: improve ssr performance
54
+ * docs: move components ssr docs to website
55
+ * fix(gui-components): send value in numeric inputs
56
+ * feat(gui-components): add nitro plugin for nuxt users
57
+ * fix(gui-components): avoid ssr rendering for time lists
58
+ * chore: reset harnesses
59
+ * docs: update components readme
60
+ * fix(gui-components): misc issues related with required, aria and styling
61
+ * test(gui-components): fix tests
62
+ * test(gui-components): fix firefox test failing by 0.000001
63
+ * fix(gui-components): fix layout issues with pickers
64
+ * fix(schemas): make grid a the reserved root
65
+ * fix(schemas): make grid a the reserved root
66
+ * docs: fix astro template, update migration guide
67
+ * fix(gui-components): avoid double hints in pickers
68
+ * fix(gui-react): fix singleOpen in react accordion
69
+ * fix(gui-components): fix currency stepping
70
+ * fix(gui-components): reset value on form reset
71
+ * fix(gui-components): Segmented date and time inputs keep an outdated validity
72
+ * fix(gui-components): block pickers submissions with partly typed or impossible dates
73
+ * fix(gui-components): Dates and times outside their bounds now block a native submit
74
+ * fix(gui-components): block native submit with pending uploads in progress
75
+ * test: fix typing issues with specs
76
+
77
+ ### ❤️ Thank You
78
+
79
+ - Raúl Jiménez @Elecash
80
+
1
81
  ## 1.6.0 (2026-10-03)
2
82
 
3
83
  ### 🚀 Features
package/forms.css ADDED
@@ -0,0 +1,106 @@
1
+ @layer golemui.tokens, golemui.base, golemui.components, golemui.forms, golemui.theme;
2
+ @layer golemui.base {
3
+ .gui-form {
4
+ display: block;
5
+ container-type: inline-size;
6
+ container-name: gui-form gui-container;
7
+ border-radius: var(--gui-radius-md);
8
+ /* Base reset for all gui-* components */
9
+ font-family: var(--gui-font-family);
10
+ font-size: var(--gui-font-sm);
11
+ color: var(--gui-text-default);
12
+ box-sizing: border-box;
13
+ /* Safari (WebKit) ignores font inheritance on native <button>; re-assert it
14
+ so widget buttons match the surrounding form text in every browser. */
15
+ }
16
+ .gui-form button {
17
+ font-family: inherit;
18
+ font-size: inherit;
19
+ }
20
+ }
21
+ @layer golemui.forms {
22
+ .gui-form .gui-repeater__card.gui-repeater__main-card {
23
+ margin-bottom: 0;
24
+ }
25
+ .gui-form .gui-repeater__card {
26
+ margin-bottom: var(--gui-space-3);
27
+ padding: var(--gui-space-3);
28
+ border: 1px solid var(--gui-border-default);
29
+ border-radius: var(--gui-radius-md);
30
+ background: var(--gui-bg-default);
31
+ color: var(--gui-text-default);
32
+ }
33
+ .gui-form .gui-repeater__card[aria-invalid=true] {
34
+ border-color: var(--gui-intent-error);
35
+ }
36
+ .gui-form .gui-repeater__card-header {
37
+ display: flex;
38
+ align-items: center;
39
+ margin-bottom: var(--gui-space-2);
40
+ }
41
+ .gui-form .gui-repeater__card-header .gui-repeater__remove-btn {
42
+ margin-inline-start: auto;
43
+ gap: var(--gui-space-1);
44
+ }
45
+ .gui-form .gui-repeater__card--focused {
46
+ outline: 0;
47
+ border-color: var(--gui-border-focus);
48
+ box-shadow: var(--gui-shadow-focus);
49
+ }
50
+ .gui-form .gui-repeater__card--focused[aria-invalid=true] {
51
+ outline: 0;
52
+ border-color: var(--gui-intent-error);
53
+ box-shadow: var(--gui-shadow-focus-error);
54
+ }
55
+ .gui-form .gui-repeater__card-title {
56
+ font-weight: 500;
57
+ }
58
+ .gui-form .gui-repeater button.gui-button .gui-button-icon {
59
+ padding: 0;
60
+ }
61
+ .gui-form .gui-repeater button.gui-button.gui-repeater__remove-btn {
62
+ padding: var(--gui-space-1) var(--gui-space-2);
63
+ background: transparent;
64
+ color: var(--gui-intent-error);
65
+ border: 1px solid var(--gui-border-default);
66
+ transition: background var(--gui-transition-normal, 0.2s), border-color var(--gui-transition-normal, 0.2s);
67
+ }
68
+ .gui-form .gui-repeater button.gui-button.gui-repeater__remove-btn:focus {
69
+ border-color: var(--gui-intent-error);
70
+ }
71
+ .gui-form .gui-repeater button.gui-button.gui-repeater__remove-btn:focus .gui-button-icon {
72
+ color: var(--gui-intent-error-text);
73
+ }
74
+ .gui-form .gui-repeater button.gui-button.gui-repeater__remove-btn:hover {
75
+ color: var(--gui-intent-error-text);
76
+ background: var(--gui-intent-error-bg);
77
+ border-color: var(--gui-intent-error);
78
+ opacity: 1;
79
+ }
80
+ .gui-form .gui-repeater button.gui-button.gui-repeater__remove-btn:hover .gui-button-icon {
81
+ color: var(--gui-intent-error-text);
82
+ }
83
+ .gui-form .gui-repeater button.gui-button.gui-repeater__add-btn {
84
+ width: 100%;
85
+ border: 1px dashed var(--gui-intent-primary);
86
+ background: transparent;
87
+ color: var(--gui-intent-primary);
88
+ opacity: 0.6;
89
+ transition: opacity var(--gui-transition-normal, 0.2s);
90
+ gap: var(--gui-space-1);
91
+ }
92
+ .gui-form .gui-repeater button.gui-button.gui-repeater__add-btn:hover {
93
+ background: color-mix(in srgb, var(--gui-intent-primary) 10%, transparent);
94
+ opacity: 1;
95
+ }
96
+ .gui-form .gui-repeater button.gui-button.gui-repeater__add-btn:disabled {
97
+ opacity: 0.3;
98
+ }
99
+ .gui-button--invalid :is(button, a) {
100
+ border: 2px solid var(--gui-intent-error);
101
+ }
102
+ .gui-button--invalid :is(button, a):focus {
103
+ outline: 0;
104
+ box-shadow: var(--gui-shadow-focus-error);
105
+ }
106
+ }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as p } from "./resolveFormInput-DM2I_8nF.js";
1
+ import { g as p } from "./resolveFormInput-Bs-iyptu.js";
2
2
  import "@golemui/dx";
3
3
  import "@golemui/core";
4
4
  function s(r) {
package/index.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./resolveFormInput-Bi4buDf0.cjs");require("@golemui/dx");require("@golemui/core");function c(e){return typeof e=="object"&&e!==null&&"$ref"in e&&typeof e.$ref=="string"&&Object.keys(e).length===1}async function a(e,t){const r=new URL(e,t).href,n=await fetch(r);if(!n.ok)throw new Error(`Failed to load form chunk ${r}: ${n.status}`);const{$schema:s,...u}=await n.json();return o(u,r)}async function o(e,t){if(c(e))return a(e.$ref,t);const r=e;if(Array.isArray(r.children)){const n=await Promise.all(r.children.map(s=>o(s,t)));return{...r,children:n}}return e}async function f(e,t){const r=await Promise.all(e.form.map(n=>o(n,t)));return{...e,form:r}}exports.gui=i.gui;exports.resolveChunkRefs=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./resolveFormInput-B7fb-g3v.cjs");require("@golemui/dx");require("@golemui/core");function c(e){return typeof e=="object"&&e!==null&&"$ref"in e&&typeof e.$ref=="string"&&Object.keys(e).length===1}async function a(e,t){const r=new URL(e,t).href,n=await fetch(r);if(!n.ok)throw new Error(`Failed to load form chunk ${r}: ${n.status}`);const{$schema:s,...u}=await n.json();return o(u,r)}async function o(e,t){if(c(e))return a(e.$ref,t);const r=e;if(Array.isArray(r.children)){const n=await Promise.all(r.children.map(s=>o(s,t)));return{...r,children:n}}return e}async function f(e,t){const r=await Promise.all(e.form.map(n=>o(n,t)));return{...e,form:r}}exports.gui=i.gui;exports.resolveChunkRefs=f;
package/internals.d.ts CHANGED
@@ -2,7 +2,7 @@ export { _guiAccordion, _guiAlert, _guiBooleanInput, _guiButton, _guiCalendar, _
2
2
  export { _gslAccordionByUid, _gslAccordions, _gslActionByUid, _gslActions, _gslAlertByUid, _gslAlerts, _gslBooleanInputs, _gslCalendarByUid, _gslCalendars, _gslDateTimeCalendarByUid, _gslDateTimeCalendars, _gslCheckboxByUid, _gslCheckboxes, _gslCurrencies, _gslCurrencyByUid, _gslCustomActionByUid, _gslCustomActions, _gslCustomDisplayByUid, _gslCustomDisplays, _gslCustomInputByUid, _gslCustomInputs, _gslCustomLayoutByUid, _gslCustomLayouts, _gslDateInputByUid, _gslDateInputs, _gslDatePickerByUid, _gslDatePickers, _gslDateTimePickerByUid, _gslDateTimePickers, _gslDateTimeInputByUid, _gslDateTimeInputs, _gslDisplayByUid, _gslDisplays, _gslDropdownByUid, _gslDropdowns, _gslFileUploadByUid, _gslFileUploads, _gslInputByUid, _gslInputs, _gslLayoutByUid, _gslLayouts, _gslListByUid, _gslLists, _gslMarkdownByUid, _gslMarkdowns, _gslMarkdownTextByUid, _gslMarkdownTexts, _gslMultiDropdownByUid, _gslMultiDropdowns, _gslMultiFileUploadByUid, _gslMultiFileUploads, _gslMultiListByUid, _gslMultiLists, _gslNumberInputs, _gslPasswordByUid, _gslPasswords, _gslRadiogroupByUid, _gslRadiogroups, _gslRangeCalendarByUid, _gslRangeCalendars, _gslRangeDateInputByUid, _gslRangeDateInputs, _gslRangeDateTimeInputByUid, _gslRangeDateTimeInputs, _gslRangeDateTimeCalendarByUid, _gslRangeDateTimeCalendars, _gslRangeDateTimePickerByUid, _gslRangeDateTimePickers, _gslRangeTimeInputByUid, _gslRangeTimeInputs, _gslRangeDatePickerByUid, _gslRangeDatePickers, _gslRangeTimePickerByUid, _gslRangeTimePickers, _gslRepeaterByUid, _gslRepeaters, _gslSelectByUid, _gslSelects, _gslStates, _gslTabs, _gslTabsByUid, _gslTag, _gslTags, _gslTagsByUid, _gslTextareaByUid, _gslTextareas, _gslTextInputs, _gslTimeInputByUid, _gslTimeInputs, _gslTimePickerByUid, _gslTimePickers, } from './lib/dx';
3
3
  export { createGslSelector, defineShortcutType, extractWidgetProps, formDefs, isDxDefinitions, processAutoLabel, processAutoPlaceholder, resolveFormInput, } from './lib/dx';
4
4
  export type { AccordionDecorator, ActionDecorator, AlertDecorator, BooleanDataInputDecorator, CalendarDecorator, DateTimeCalendarDecorator, GslDateTimeCalendarConfig, CheckboxDecorator, CurrencyDecorator, CustomActionDecorator, CustomDisplayDecorator, CustomInputDecorator, CustomLayoutDecorator, DateInputDecorator, DatePickerDecorator, DateTimePickerDecorator, DateTimeInputDecorator, DefOrCallback, DisplayDecorator, DropdownDecorator, DxActionBase, DxCommonFields, DxDisplayBase, DxDisplayRenderFn, DxFormEvent, DxInputBase, DxInternalFields, DxLayoutBase, DxResult, DxRuntimeParams, DxValidator, FileUploadDecorator, FormConfig, FormEvents, FormInput, GslAccordionConfig, GslActionsConfig, GslAlertsConfig, GslCalendarConfig, GslCheckboxConfig, GslConfigBase, GslCurrencyConfig, GslCustomActionConfig, GslCustomDisplayConfig, GslCustomInputConfig, GslCustomLayoutConfig, GslDateInputConfig, GslDatePickerConfig, GslDateTimePickerConfig, GslDateTimeInputConfig, GslDecoratorCallback, GslDisplaysConfig, GslDropdownConfig, GslFileUploadConfig, GslInputsConfig, GslLayoutsConfig, GslListConfig, GslMarkdownConfig, GslMultiDropdownConfig, GslMultiFileUploadConfig, GslMultiListConfig, GslPasswordConfig, GslRadiogroupConfig, GslRangeCalendarConfig, GslRangeDateInputConfig, GslRangeDateTimeInputConfig, GslRangeDateTimeCalendarConfig, GslRangeDateTimePickerConfig, GslRangeTimeInputConfig, GslRangeDatePickerConfig, GslRangeTimePickerConfig, GslRepeaterConfig, GslSelectConfig, GslTabsConfig, GslTagsConfig, GslTextareaConfig, GslTimeInputConfig, GslTimePickerConfig, GuiShortcutOf, InputDecorator, InputTags, LayoutDecorator, ListDecorator, MarkdownDecorator, MultiDropdownDecorator, MultiFileUploadDecorator, MultiListDecorator, NumberDataInputDecorator, PasswordDecorator, RadiogroupDecorator, RangeCalendarDecorator, RangeDateInputDecorator, RangeDateTimeInputDecorator, RangeDateTimeCalendarDecorator, RangeDateTimePickerDecorator, RangeTimeInputDecorator, RangeDatePickerDecorator, RangeTimePickerDecorator, RepeaterDecorator, ResolvedFormInput, SelectDecorator, ShortcutTypeSelectors, SimpleFieldDef, TabsDecorator, TagsDecorator, TextareaDecorator, TextDataInputDecorator, TimeInputDecorator, TimePickerDecorator, ValidShortcutType, } from './lib/dx';
5
- export type { AccordionProps, AlertProps, ButtonProps, CalendarProps, DateTimeCalendarProps, DateTimePickerProps, CheckboxProps, ComponentRendererProps, CurrencyProps, DateinputProps, DatePickerProps, DateTimeInputProps, DateRange, DateTimeRange, DisabledTimeRange, DropdownProps, FileUploadBaseProps, FileUploadProps, FlexProps, GridProps, ListItem, ListProps, MarkdownProps, MarkdownTextProps, MultiDropdownProps, MultiFileUploadProps, MultiListProps, NumberinputProps, OneOfProps, Option, OptionValue, PasswordProps, RadiogroupProps, RangeCalendarProps, RangeDateInputProps, RangeDatePickerProps, RangeDateTimeInputProps, RangeDateTimeCalendarProps, RangeDateTimePickerProps, RangeTimeInputProps, RangeTimePickerProps, RendererProps, RepeaterProps, SelectProps, TabsProps, TagsProps, TagsSeparator, TextareaProps, TextinputProps, TimeInputProps, TimePickerProps, TimeRange, ToggleProps, } from './lib/widget.props';
5
+ export type { AccordionProps, AlertProps, ButtonProps, CalendarProps, DateTimeCalendarProps, DateTimePickerProps, CheckboxProps, ComponentRendererProps, CurrencyProps, DateinputProps, DatePickerProps, DateTimeInputProps, DateRange, DateTimeRange, DisabledTimeRange, DropdownProps, FileUploadBaseProps, FileUploadProps, FlexProps, GridGap, GridJustify, GridProps, ListItem, ListProps, MarkdownProps, MarkdownTextProps, MultiDropdownProps, MultiFileUploadProps, MultiListProps, NumberinputProps, OneOfProps, Option, OptionValue, PasswordProps, RadiogroupProps, RangeCalendarProps, RangeDateInputProps, RangeDatePickerProps, RangeDateTimeInputProps, RangeDateTimeCalendarProps, RangeDateTimePickerProps, RangeTimeInputProps, RangeTimePickerProps, RendererProps, RepeaterProps, SelectProps, TabsProps, TagsProps, TagsSeparator, TextareaProps, TextinputProps, TimeInputProps, TimePickerProps, TimeRange, ToggleProps, } from './lib/widget.props';
6
6
  export type { Dependencies, FileItem, FileStatus, UploadService } from './lib/shared';
7
7
  export type { GolemWidget } from './lib/widgets';
8
8
  export { actionWidgets, displayWidgets, inputWidgets, layoutWidgets } from './lib/widgets';
@@ -10,3 +10,4 @@ export { golemForm } from './lib/golem-form';
10
10
  export { isOption } from './lib/utils/one-of';
11
11
  export { accordionButtonId, accordionSectionId, tabButtonId, tabPanelId, } from './lib/utils/layout-ids';
12
12
  export { getItemKey, repeaterIndexSuffix } from './lib/utils/repeater';
13
+ export { gapFromPixels, gridCellClasses, gridClasses, resolveGrid, type ResolvedGrid, } from './lib/utils/grid';