Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bestax-mcp/data/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
"import": "import { DateInput } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 52,
"exampleCount": 37
"exampleCount": 38
},
{
"name": "DateTimeInput",
Expand All @@ -382,7 +382,7 @@
"import": "import { DateTimeInput } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 62,
"exampleCount": 39
"exampleCount": 40
},
{
"name": "Delete",
Expand Down Expand Up @@ -1297,6 +1297,7 @@
"--bulma-dateinput-cell-today-color": "DateTimeInput",
"--bulma-dateinput-day-name-color": "DateTimeInput",
"--bulma-dateinput-day-name-size": "DateTimeInput",
"--bulma-dateinput-focus-ring-color": "DateTimeInput",
"--bulma-dateinput-header-padding": "DateTimeInput",
"--bulma-dateinput-min-width": "DateTimeInput",
"--bulma-dateinput-nav-button-size": "DateTimeInput",
Expand Down Expand Up @@ -1890,6 +1891,7 @@
"--bulma-timeinput-wheel-bg": "TimeInput",
"--bulma-timeinput-wheel-color": "TimeInput",
"--bulma-timeinput-wheel-dim-color": "TimeInput",
"--bulma-timeinput-wheel-focus-ring-color": "TimeInput",
"--bulma-timeinput-wheel-gap": "TimeInput",
"--bulma-timeinput-wheel-hover-bg": "TimeInput",
"--bulma-timeinput-wheel-item-height": "TimeInput",
Expand Down
12 changes: 11 additions & 1 deletion bestax-mcp/data/components/DateInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
"title": "Colors",
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <DateInput label=\"Primary\" color=\"primary\" openOnFocus={false} />\n <DateInput label=\"Info\" color=\"info\" openOnFocus={false} />\n <DateInput label=\"Success\" color=\"success\" openOnFocus={false} />\n <DateInput label=\"Warning\" color=\"warning\" openOnFocus={false} />\n <DateInput label=\"Danger\" color=\"danger\" openOnFocus={false} />\n</Block>"
},
{
"title": "Colors",
"code": "function example() {\n // The 1st of this month (the 2nd when today is the 1st), so the selected\n // date and today's date both show.\n const picked = new Date();\n picked.setDate(picked.getDate() === 1 ? 2 : 1);\n return (\n <Block display=\"flex\" flexWrap=\"wrap\">\n <Block mr=\"4\" mb=\"4\">\n <DateInput label=\"Link\" color=\"link\" inline defaultValue={picked} />\n </Block>\n <Block mr=\"4\" mb=\"4\">\n <DateInput\n label=\"Success\"\n color=\"success\"\n inline\n defaultValue={picked}\n />\n </Block>\n <Block mr=\"4\" mb=\"4\">\n <DateInput label=\"Danger\" color=\"danger\" inline defaultValue={picked} />\n </Block>\n </Block>\n );\n}"
},
{
"title": "States",
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <DateInput label=\"Disabled\" disabled />\n <DateInput label=\"Read only\" readOnly defaultValue={new Date()} />\n <DateInput label=\"Loading\" isLoading />\n</Block>"
Expand Down Expand Up @@ -522,7 +526,7 @@
"name": "color",
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
"default": null,
"description": "Bulma color modifier.",
"description": "Bulma color modifier for the input, also carried by the calendar, where it colors the selected date and today's date. The keyboard focus ring takes the color's `-on-scheme` variant, which Bulma adjusts to contrast with the background, so pale colors stay visible; that makes `'primary'` a shade off the unset ring, which is plain `primary`. Unset, the calendar uses its `--bulma-dateinput-*` variables, which follow `primary` by default.",
"required": false,
"inherited": true,
"deprecated": false
Expand Down Expand Up @@ -736,6 +740,12 @@
"default": "var(--bulma-primary)",
"scope": "element"
},
{
"css": "--bulma-dateinput-focus-ring-color",
"sass": "$dateinput-focus-ring-color",
"default": "var(--bulma-primary)",
"scope": "element"
},
{
"css": "--bulma-dateinput-cell-disabled-color",
"sass": "$dateinput-cell-disabled-color",
Expand Down
20 changes: 18 additions & 2 deletions bestax-mcp/data/components/DateTimeInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@
"title": "Colors",
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <DateTimeInput label=\"Primary\" color=\"primary\" openOnFocus={false} />\n <DateTimeInput label=\"Info\" color=\"info\" openOnFocus={false} />\n <DateTimeInput label=\"Success\" color=\"success\" openOnFocus={false} />\n <DateTimeInput label=\"Warning\" color=\"warning\" openOnFocus={false} />\n <DateTimeInput label=\"Danger\" color=\"danger\" openOnFocus={false} />\n</Block>"
},
{
"title": "Colors",
"code": "<DateTimeInput label=\"Danger\" color=\"danger\" inline defaultValue={new Date()} />"
},
{
"title": "States",
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <DateTimeInput label=\"Disabled\" disabled />\n <DateTimeInput label=\"Read only\" readOnly defaultValue={new Date()} />\n <DateTimeInput label=\"Loading\" isLoading />\n</Block>"
Expand Down Expand Up @@ -530,7 +534,7 @@
"name": "color",
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
"default": null,
"description": "Bulma color modifier for the input, also carried by the time wheels, where it colors the selection band and the keyboard focus ring. Unset, the wheels use `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`. The calendar does not take it.",
"description": "Bulma color modifier for the input, also carried by the calendar and the time wheels, where it colors the selected date, today's date and the selection band. The keyboard focus rings take the color's `-on-scheme` variant, which Bulma adjusts to contrast with the background, so pale colors stay visible; that makes `'primary'` a shade off the unset rings, which are plain `primary`. Unset, they use their `--bulma-dateinput-*` and `--bulma-timeinput-wheel-*` variables, which follow `primary` by default. The footer's time pill and Done button stay `primary` either way.",
"required": false,
"inherited": true,
"deprecated": false
Expand Down Expand Up @@ -816,6 +820,12 @@
"default": "var(--bulma-primary)",
"scope": "element"
},
{
"css": "--bulma-dateinput-focus-ring-color",
"sass": "$dateinput-focus-ring-color",
"default": "var(--bulma-primary)",
"scope": "element"
},
{
"css": "--bulma-dateinput-cell-disabled-color",
"sass": "$dateinput-cell-disabled-color",
Expand Down Expand Up @@ -969,7 +979,7 @@
{
"css": "--bulma-timeinput-wheel-bg",
"sass": "$timeinput-wheel-bg",
"default": "var(--bulma-scheme-main)",
"default": "transparent",
"scope": "element"
},
{
Expand Down Expand Up @@ -1008,6 +1018,12 @@
"default": "var(--bulma-radius)",
"scope": "element"
},
{
"css": "--bulma-timeinput-wheel-focus-ring-color",
"sass": "$timeinput-wheel-focus-ring-color",
"default": "var(--bulma-timeinput-wheel-selected-bg)",
"scope": "element"
},
{
"css": "--bulma-timeinput-wheel-mask",
"sass": "$timeinput-wheel-mask",
Expand Down
10 changes: 8 additions & 2 deletions bestax-mcp/data/components/TimeInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
"name": "color",
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
"default": null,
"description": "Bulma color modifier for the input, also carried by the wheels, where it colors the selection band and the keyboard focus ring. Unset, the wheels use `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.",
"description": "Bulma color modifier for the input, also carried by the wheels, where it colors the selection band. The keyboard focus ring takes the color's `-on-scheme` variant, which Bulma adjusts to contrast with the background, so pale colors stay visible; that makes `'primary'` a shade off the unset ring, which follows the band. Unset, the wheels use `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.",
"required": false,
"inherited": true,
"deprecated": false
Expand Down Expand Up @@ -795,7 +795,7 @@
{
"css": "--bulma-timeinput-wheel-bg",
"sass": "$timeinput-wheel-bg",
"default": "var(--bulma-scheme-main)",
"default": "transparent",
"scope": "element"
},
{
Expand Down Expand Up @@ -834,6 +834,12 @@
"default": "var(--bulma-radius)",
"scope": "element"
},
{
"css": "--bulma-timeinput-wheel-focus-ring-color",
"sass": "$timeinput-wheel-focus-ring-color",
"default": "var(--bulma-timeinput-wheel-selected-bg)",
"scope": "element"
},
{
"css": "--bulma-timeinput-wheel-mask",
"sass": "$timeinput-wheel-mask",
Expand Down
2 changes: 1 addition & 1 deletion bestax-mcp/data/skills.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
{
"id": "css-variables",
"file": "references/css-variables.md",
"bytes": 26899
"bytes": 27105
},
{
"id": "themeable-components",
Expand Down
33 changes: 33 additions & 0 deletions bulma-ui/src/form/DateInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,39 @@ export const Colors: Story = {
),
};

export const InlineColors: Story = {
render: () => {
// The 1st of this month (the 2nd when today is the 1st), so the selected
// date and today's date both show.
const picked = new Date();
picked.setDate(picked.getDate() === 1 ? 2 : 1);
return (
<Block display="flex" flexWrap="wrap">
{(
['primary', 'link', 'info', 'success', 'warning', 'danger'] as const
).map(color => (
<Block key={color} mr="4" mb="4">
<DateInput
label={color}
color={color}
inline
defaultValue={picked}
/>
</Block>
))}
</Block>
);
},
parameters: {
docs: {
description: {
story:
"Rendered inline so the calendar is visible without opening the popover: `color` tints the selected date, today's date and, for keyboard users, the focus ring. Tab into the grid to see the ring.",
},
},
},
};

export const States: Story = {
render: () => (
<Block>
Expand Down
9 changes: 8 additions & 1 deletion bulma-ui/src/form/DateInputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ export interface DateInputBaseProps
position?: PickerPosition;
/** Render the popover into `document.body` via portal. */
appendToBody?: boolean;
/** Bulma color modifier. */
/**
* Bulma color modifier for the input, also carried by the calendar, where it
* colors the selected date and today's date. The keyboard focus ring takes
* the color's `-on-scheme` variant, which Bulma adjusts to contrast with the
* background, so pale colors stay visible; that makes `'primary'` a shade
* off the unset ring, which is plain `primary`. Unset, the calendar uses its
* `--bulma-dateinput-*` variables, which follow `primary` by default.
*/
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
/** Size variant. */
size?: 'small' | 'medium' | 'large';
Expand Down
27 changes: 27 additions & 0 deletions bulma-ui/src/form/DateTimeInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,33 @@ export const Colors: Story = {
),
};

export const InlineColors: Story = {
render: () => (
<Block display="flex" flexWrap="wrap">
{(
['primary', 'link', 'info', 'success', 'warning', 'danger'] as const
).map(color => (
<Block key={color} mr="4" mb="4">
<DateTimeInput
label={color}
color={color}
inline
defaultValue={new Date()}
/>
</Block>
))}
</Block>
),
parameters: {
docs: {
description: {
story:
"Rendered inline so the panel is visible without opening the popover: `color` tints the calendar and, once the time row is opened, the wheels. The footer's time pill and Done button stay `primary`.",
},
},
},
};

export const States: Story = {
render: () => (
<Block>
Expand Down
12 changes: 8 additions & 4 deletions bulma-ui/src/form/DateTimeInputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ export interface DateTimeInputBaseProps
/** Render the popover into `document.body` via portal. */
appendToBody?: boolean;
/**
* Bulma color modifier for the input, also carried by the time wheels, where
* it colors the selection band and the keyboard focus ring. Unset, the
* wheels use `--bulma-timeinput-wheel-selected-bg`, which defaults to
* `primary`. The calendar does not take it.
* Bulma color modifier for the input, also carried by the calendar and the
* time wheels, where it colors the selected date, today's date and the
* selection band. The keyboard focus rings take the color's `-on-scheme`
* variant, which Bulma adjusts to contrast with the background, so pale
* colors stay visible; that makes `'primary'` a shade off the unset rings,
* which are plain `primary`. Unset, they use their `--bulma-dateinput-*` and
* `--bulma-timeinput-wheel-*` variables, which follow `primary` by default.
* The footer's time pill and Done button stay `primary` either way.
*/
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
/** Size variant. */
Expand Down
7 changes: 5 additions & 2 deletions bulma-ui/src/form/TimeInputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ export interface TimeInputBaseProps
appendToBody?: boolean;
/**
* Bulma color modifier for the input, also carried by the wheels, where it
* colors the selection band and the keyboard focus ring. Unset, the wheels
* use `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.
* colors the selection band. The keyboard focus ring takes the color's
* `-on-scheme` variant, which Bulma adjusts to contrast with the background,
* so pale colors stay visible; that makes `'primary'` a shade off the unset
* ring, which follows the band. Unset, the wheels use
* `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.
*/
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
/** Size variant. */
Expand Down
Loading
Loading