Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(input-time-picker): add hour-format property #10997

Open
wants to merge 31 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
dbaa4ee
first attempt at lit-ifying the branch
eriklharper Nov 18, 2024
ddc8252
somehow hourcycle snuck back in there, no idea how that happened
eriklharper Nov 18, 2024
52f572c
i don't know how these changes aren't applying when I commit
eriklharper Nov 18, 2024
c1ef503
somehow hourFormat got set as a state variable instead of a property …
eriklharper Nov 18, 2024
9a08303
resolving a few problems pointed out by vscode
eriklharper Nov 18, 2024
d550a16
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Dec 4, 2024
a74a569
Merge branch 'dev' of github.com:Esri/calcite-design-system into erik…
eriklharper Dec 5, 2024
5261f48
ungrouping all the tests unrelated to render tests
eriklharper Dec 5, 2024
7d46d05
fixing getMeridiemOrder to restore RTL logic for arabic and hebrew
eriklharper Dec 5, 2024
775633e
reverting last commit by restoring time spec tests from my original b…
eriklharper Dec 5, 2024
8eafcce
Restoring a call to updateLocale that used to be in connectedCallback…
eriklharper Dec 5, 2024
98fec6a
special es-MX conditional is no longer needed in the locale test, whi…
eriklharper Dec 6, 2024
f5d217d
removing the rest of the es-mx test conditions, they no longer seem t…
eriklharper Dec 7, 2024
0dc2777
fixing test to assert correct danish time value when lang changes
eriklharper Dec 9, 2024
ea73410
setting time-picker container div to use normal word-break. This ove…
eriklharper Dec 10, 2024
da1594d
adding control to input-time-picker story
eriklharper Dec 11, 2024
99e9420
converting assigned bound method to a class method
eriklharper Dec 11, 2024
5a37292
updating to use an effectiveHourFormat internal state property that r…
eriklharper Dec 14, 2024
3ca41c2
adding comprehensive locale testing to time-picker. Fixing bs and mk…
eriklharper Dec 16, 2024
4d7c6f6
adding basic hour-format="user" tests to both components
eriklharper Dec 16, 2024
e829efd
adding spec tests for getLocaleOppositeHourFormat and isLocaleHourFor…
eriklharper Dec 16, 2024
d8d91f4
Revise hour-format documentation description for input-time-picker
eriklharper Dec 17, 2024
8973357
Revise documentation description for hour-format in time-picker
eriklharper Dec 17, 2024
c6856bf
adding comments with link and instructions to reference the cldr for …
eriklharper Dec 17, 2024
92be1fd
adding cldr-json link comments to all locale overrides in getExtended…
eriklharper Dec 17, 2024
6f72ee7
fixing bug with macedonian locale where the period at the end of the …
eriklharper Dec 19, 2024
c8701ca
adding comment explaining the fix for mk in more detail
eriklharper Dec 19, 2024
a25da03
keeping some localized meridiems from breaking onto 2 lines when widt…
eriklharper Dec 19, 2024
e73b370
hiding the bulgarian second suffix in time-picker
eriklharper Dec 19, 2024
b2ace3c
Merge branch 'dev' into eriklharper/4756-input-time-picker-hour-format
eriklharper Dec 20, 2024
a26ebc1
Removing changes no longer needed with the fix to popover applied her…
eriklharper Dec 20, 2024
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ import { boolean, createBreakpointStories, modesDarkDefault } from "../../../.st
import { html } from "../../../support/formatting";
import { defaultMenuPlacement, menuPlacements } from "../../utils/floating-ui";
import { ATTRIBUTES } from "../../../.storybook/resources";
import { hourFormats } from "../../utils/time";
import { InputTimePicker } from "./input-time-picker";

const { scale, status } = ATTRIBUTES;

interface InputTimePickerStoryArgs
extends Pick<
InputTimePicker,
"disabled" | "name" | "placement" | "scale" | "status" | "step" | "validationMessage" | "validationIcon" | "value"
| "disabled"
| "hourFormat"
| "name"
| "placement"
| "scale"
| "status"
| "step"
| "validationMessage"
| "validationIcon"
| "value"
> {
hidden: boolean;
}
Expand All @@ -20,6 +30,7 @@ export default {
args: {
disabled: false,
hidden: false,
hourFormat: undefined,
name: "simple",
placement: defaultMenuPlacement,
scale: scale.defaultValue,
Expand All @@ -30,6 +41,10 @@ export default {
value: "10:37",
},
argTypes: {
hourFormat: {
options: hourFormats,
control: { type: "select" },
},
placement: {
options: menuPlacements,
control: { type: "select" },
Expand All @@ -53,6 +68,7 @@ export const simple = (args: InputTimePickerStoryArgs): string => html`
<calcite-input-time-picker
${boolean("disabled", args.disabled)}
${boolean("hidden", args.hidden)}
hour-format="${args.hourFormat}"
name="${args.name}"
placement="${args.placement}"
scale="${args.scale}"
Expand Down
Loading
Loading